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
|
---|---|---|---|---|
3-mid/impact/source/2d/dynamics/joints/impact-d2-joint-line.ads
|
charlie5/lace
| 20 |
21546
|
<reponame>charlie5/lace
package impact.d2.Joint.line
--
--
--
is
-- #ifndef B2_LINE_JOINT_H
-- #define B2_LINE_JOINT_H
--
-- #include <Box2D/Dynamics/Joints/b2Joint.h>
--
-- /// Line joint definition. This requires defining a line of
-- /// motion using an axis and an anchor point. The definition uses local
-- /// anchor points and a local axis so that the initial configuration
-- /// can violate the constraint slightly. The joint translation is zero
-- /// when the local anchor points coincide in world space. Using local
-- /// anchors and a local axis helps when saving and loading a game.
-- struct b2LineJointDef : public b2JointDef
-- {
-- b2LineJointDef()
-- {
-- type = e_lineJoint;
-- localAnchorA.SetZero();
-- localAnchorB.SetZero();
-- localAxisA.Set(1.0f, 0.0f);
-- enableLimit = false;
-- lowerTranslation = 0.0f;
-- upperTranslation = 0.0f;
-- enableMotor = false;
-- maxMotorForce = 0.0f;
-- motorSpeed = 0.0f;
-- }
--
-- /// Initialize the bodies, anchors, axis, and reference angle using the world
-- /// anchor and world axis.
-- void Initialize(b2Body* bodyA, b2Body* bodyB, const b2Vec2& anchor, const b2Vec2& axis);
--
-- /// The local anchor point relative to body1's origin.
-- b2Vec2 localAnchorA;
--
-- /// The local anchor point relative to body2's origin.
-- b2Vec2 localAnchorB;
--
-- /// The local translation axis in body1.
-- b2Vec2 localAxisA;
--
-- /// Enable/disable the joint limit.
-- bool enableLimit;
--
-- /// The lower translation limit, usually in meters.
-- float32 lowerTranslation;
--
-- /// The upper translation limit, usually in meters.
-- float32 upperTranslation;
--
-- /// Enable/disable the joint motor.
-- bool enableMotor;
--
-- /// The maximum motor torque, usually in N-m.
-- float32 maxMotorForce;
--
-- /// The desired motor speed in radians per second.
-- float32 motorSpeed;
-- };
--
-- /// A line joint. This joint provides two degrees of freedom: translation
-- /// along an axis fixed in body1 and rotation in the plane. You can use a
-- /// joint limit to restrict the range of motion and a joint motor to drive
-- /// the motion or to model joint friction.
-- class b2LineJoint : public b2Joint
-- {
-- public:
-- b2Vec2 GetAnchorA() const;
-- b2Vec2 GetAnchorB() const;
--
-- b2Vec2 GetReactionForce(float32 inv_dt) const;
-- float32 GetReactionTorque(float32 inv_dt) const;
--
-- /// Get the current joint translation, usually in meters.
-- float32 GetJointTranslation() const;
--
-- /// Get the current joint translation speed, usually in meters per second.
-- float32 GetJointSpeed() const;
--
-- /// Is the joint limit enabled?
-- bool IsLimitEnabled() const;
--
-- /// Enable/disable the joint limit.
-- void EnableLimit(bool flag);
--
-- /// Get the lower joint limit, usually in meters.
-- float32 GetLowerLimit() const;
--
-- /// Get the upper joint limit, usually in meters.
-- float32 GetUpperLimit() const;
--
-- /// Set the joint limits, usually in meters.
-- void SetLimits(float32 lower, float32 upper);
--
-- /// Is the joint motor enabled?
-- bool IsMotorEnabled() const;
--
-- /// Enable/disable the joint motor.
-- void EnableMotor(bool flag);
--
-- /// Set the motor speed, usually in meters per second.
-- void SetMotorSpeed(float32 speed);
--
-- /// Get the motor speed, usually in meters per second.
-- float32 GetMotorSpeed() const;
--
-- /// Set/Get the maximum motor force, usually in N.
-- void SetMaxMotorForce(float32 force);
-- float32 GetMaxMotorForce() const;
--
-- /// Get the current motor force, usually in N.
-- float32 GetMotorForce() const;
--
-- protected:
--
-- friend class b2Joint;
-- b2LineJoint(const b2LineJointDef* def);
--
-- void InitVelocityConstraints(const b2TimeStep& step);
-- void SolveVelocityConstraints(const b2TimeStep& step);
-- bool SolvePositionConstraints(float32 baumgarte);
--
-- b2Vec2 m_localAnchor1;
-- b2Vec2 m_localAnchor2;
-- b2Vec2 m_localXAxis1;
-- b2Vec2 m_localYAxis1;
--
-- b2Vec2 m_axis, m_perp;
-- float32 m_s1, m_s2;
-- float32 m_a1, m_a2;
--
-- b2Mat22 m_K;
-- b2Vec2 m_impulse;
--
-- float32 m_motorMass; // effective mass for motor/limit translational constraint.
-- float32 m_motorImpulse;
--
-- float32 m_lowerTranslation;
-- float32 m_upperTranslation;
-- float32 m_maxMotorForce;
-- float32 m_motorSpeed;
--
-- bool m_enableLimit;
-- bool m_enableMotor;
-- b2LimitState m_limitState;
-- };
--
-- inline float32 b2LineJoint::GetMotorSpeed() const
-- {
-- return m_motorSpeed;
-- }
--
-- #endif
procedure dummy;
end impact.d2.Joint.line;
|
Projetos/I-VM/bin/nasm/SimpleEq.nasm
|
mariaeduardabicalho/Z01
| 2 |
82966
|
; 0 - EQ
leaw $SP,%A
movw (%A),%D
decw %D
movw %D,(%A)
movw (%A),%A
movw (%A),%D
leaw $SP,%A
subw (%A),$1,%A
subw (%A),%D,%D
leaw $EQscripts/../src/vmExamples/SimpleEq0,%A
je %D
nop
leaw $SP,%A
subw (%A),$1,%A
movw $0,(%A)
leaw $EQ2scripts/../src/vmExamples/SimpleEq0,%A
jmp
nop
EQscripts/../src/vmExamples/SimpleEq0:
leaw $SP,%A
subw (%A),$1,%A
movw $-1,(%A)
EQ2scripts/../src/vmExamples/SimpleEq0:
; End
|
oeis/163/A163325.asm
|
neoneye/loda-programs
| 11 |
23487
|
; A163325: Pick digits at the even distance from the least significant end of the ternary expansion of n, then convert back to decimal.
; Submitted by <NAME>(s4)
; 0,1,2,0,1,2,0,1,2,3,4,5,3,4,5,3,4,5,6,7,8,6,7,8,6,7,8,0,1,2,0,1,2,0,1,2,3,4,5,3,4,5,3,4,5,6,7,8,6,7,8,6,7,8,0,1,2,0,1,2,0,1,2,3,4,5,3,4,5,3,4,5,6,7,8,6,7,8,6,7,8,9,10,11,9,10,11,9,10,11,12,13,14,12,13,14,12,13,14,15
mov $2,4
lpb $0
mul $2,3
mov $3,$0
div $0,3
add $3,$0
mul $0,2
div $0,6
mod $3,4
mul $3,$2
add $1,$3
lpe
mov $0,$1
div $0,12
|
Client-Unity/Assets/Scripts/Antlr4/math.g4
|
cor14095/graficadorRV
| 0 |
3042
|
grammar math;
prog: (expr|equ);
//-------------------------Characters------------------------------//
WS : [ \t\r\n]+ -> channel(HIDDEN); //Whitespace declaration
fragment LETTER : ('a'..'z' | 'A'..'Z');
fragment DIGIT : ('0'..'9');
ID : (LETTER)+;
NUM : (INT|DOUBLE);
INT : (DIGIT)+;
DOUBLE : INT '.'(DIGIT)*;
// no sirve la a
term
: NUM //numbers
| constant
// | matrix
| trig
| logarithm
| ID //variables
| '(' expr ')' //parentheses
;
//Implicit multiplication
factor
: term
| <assoc=right> term '^' factor
| term factor
;
//Unary minus/plus
expr
: factor
| ('+' | '-') expr //unary plus/minus
| expr '/' expr //division
| expr '*' expr //explicit multiplication
| expr ('+' | '-') expr //addition/subtraction
;
//Ecuation
equ
: expr '=' expr
;
// ADDED between 10/11/17 and 12/11/17
//pi constant
pi
: '(pi)'
;
//euler constant, using parentheses to diferintiate between sen
e
: '(' 'e' ')'
;
//constant
constant
: pi
| e
;
/**
remember to uncomment line 17 : term matrix
//Matrix functions
matrix
: matrixdec
| trace
| determinant
| inverse
| evector
| evalues
| transpose
| rank
| nullity
| adjacent
| diagonal
| li
;
//Matrix declaration
matrixdec
: LETTERCAPS '[' INT 'x' INT ']'
;
//Matrix trace
trace
: 't' 'r' '[' matrix ']'
;
//Matrix determinant
determinant
: 'd' 'e' 't' '[' matrix ']'
;
//Matrix inverse
inverse
: 'I' 'n' 'v' '[' matrix ']'
;
//Matrix eigenvector
evector
: 'E' 'v' 'e' 'c' 't' 'o' 'r' '[' matrix ']'
;
//Matrix eigenvalues
evalues
: 'E' 'v' 'a' 'l' 'o' 'r' '[' matrix ']'
;
//Matrix transpose
transpose
: 'T' 'r' 'a' '[' matrix ']'
;
//Matrix rank
rank
: 'r' 'a' 'n' 'k' '[' matrix ']'
;
//Matrix nullity
nullity
: 'n' 'u' 'l' '[' matrix ']'
;
//Adjacent matrix
adjacent
: 'A' 'd' 'j' '[' matrix ']'
;
//Diagonal Matrix
diagonal
: 'D' '[' matrix ']'
;
//Matrix Linear independence
li
: 'L' 'I' '[' matrix ']'
| ',' '[' matrix ']'
| ',' '[' matrix ']'
| ',' '[' matrix ']'
;
*/
//logarithm functions
logarithm
: log
| ln
;
//logarithm with base
log
: 'log' INT '(' expr ')' //expressions?
| 'log' '(' expr ')'
| 'log' '(' 'e' ')'
;
//Natural logarithm
ln
: 'ln' '(' expr ')'
;
//trigonometric functions
trig
: sin
| sinh
| arcsin
| arcsinh
| cos
| cosh
| arccos
| arccosh
| tan
| tanh
| arctan
| arctanh
;
//sine
sin
: 'sen' '(' expr ')'
;
//cosine
cos
: 'cos' '(' expr ')'
;
//tangent
tan
: 'tan' '(' expr ')'
;
//hyperbolic sine
sinh
: 'senh' '(' expr ')'
;
//hyperbolic cosine
cosh
: 'cosh' '(' expr ')'
;
//hyperbolic tangent
tanh
: 'tanh' '(' expr ')'
;
//inverse sine
arcsin
: 'arcsen' '(' expr ')'
;
//inverse cosine
arccos
: 'arccos' '(' expr ')'
;
//inverse tangent
arctan
: 'arctan' '(' expr ')'
;
//hyperbolic inverse sine
arcsinh
: 'arcsenh' '(' expr ')'
;
//hyperbolic inverse cosine
arccosh
: 'arccosh' '(' expr ')'
;
//hyperbolic inverse tangent
arctanh
: 'arctanh' '(' expr ')'
;
|
test/Succeed/Attributes.agda
|
hborum/agda
| 2 |
5622
|
-- Andreas, 2018-06-14, issue #2513, parsing attributes
-- Run-time only use.
postulate
@0 RT₁ : Set
@erased RT₂ : Set
-- Default: unrestricted use.
postulate
@ω CT₁ : Set
@plenty CT₂ : Set
-- Irrelevance.
postulate
. I₀ : Set
@irr I₁ : Set
@irrelevant I₂ : Set
-- Shape-irrelevance
postulate
-- .. SI₀ : Set -- Does not parse (yet).
@shirr SI₁ : Set
@shape-irrelevant SI₂ : Set
-- Relevance (default).
postulate
R₀ : Set
@relevant R₁ : Set
-- Mix.
postulate
@0 @shape-irrelevant M : Set
-- In function spaces and telescopes.
@ω id : ∀{@0 A : Set} → @relevant @ω A → A
id x = x
data Wrap (@0 A : Set) : Set where
wrap' : @relevant A → Wrap A
wrap : ∀ (@0 A) → A → Wrap A
wrap A x = wrap' x
-- In record fields.
record Squash (@0 A : Set) : Set where
no-eta-equality; constructor squash; field
@irrelevant squashed : A
|
src/fot/FOTC/Program/Mirror/Tree/TotalityATP.agda
|
asr/fotc
| 11 |
839
|
<filename>src/fot/FOTC/Program/Mirror/Tree/TotalityATP.agda
------------------------------------------------------------------------------
-- Totality properties for Tree
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K #-}
module FOTC.Program.Mirror.Tree.TotalityATP where
open import FOTC.Base
open import FOTC.Base.List
open import FOTC.Data.List
open import FOTC.Program.Mirror.Forest.TotalityATP
open import FOTC.Program.Mirror.Mirror
open import FOTC.Program.Mirror.Type
------------------------------------------------------------------------------
mirror-Tree : ∀ {t} → Tree t → Tree (mirror · t)
mirror-Tree = Tree-mutual-ind {A} {B} hA B[] hB
where
A : D → Set
A t = Tree (mirror · t)
{-# ATP definition A #-}
B : D → Set
B ts = Forest (map mirror ts)
{-# ATP definition B #-}
postulate
hA : ∀ d {ts} → Forest ts → B ts → A (node d ts)
B[] : B []
hB : ∀ {t ts} → Tree t → A t → Forest ts → B ts → B (t ∷ ts)
{-# ATP prove hA reverse-Forest #-}
{-# ATP prove B[] #-}
{-# ATP prove hB #-}
|
Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xa0_notsx.log_7_1075.asm
|
ljhsiun2/medusa
| 9 |
160464
|
.global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r15
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WC_ht+0x135c5, %rbp
nop
nop
add $47309, %r15
movb (%rbp), %dl
nop
nop
nop
and %rdx, %rdx
lea addresses_WT_ht+0x199c5, %rsi
lea addresses_normal_ht+0x3645, %rdi
nop
nop
nop
nop
nop
inc %r13
mov $122, %rcx
rep movsw
sub $4604, %rdi
lea addresses_WT_ht+0x1daef, %rdx
nop
nop
nop
nop
cmp %r15, %r15
mov $0x6162636465666768, %rcx
movq %rcx, %xmm5
movups %xmm5, (%rdx)
nop
nop
nop
nop
nop
xor %rdi, %rdi
lea addresses_D_ht+0xc845, %r15
clflush (%r15)
cmp $35008, %rbp
mov (%r15), %rdi
nop
nop
nop
nop
nop
cmp %rcx, %rcx
lea addresses_UC_ht+0x61c5, %rsi
lea addresses_UC_ht+0xf845, %rdi
nop
nop
nop
and $22722, %rdx
mov $43, %rcx
rep movsl
nop
nop
and $19978, %rcx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r15
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %rax
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
// REPMOV
lea addresses_WT+0x3245, %rsi
lea addresses_D+0x6845, %rdi
clflush (%rdi)
nop
nop
nop
nop
and $63037, %r11
mov $23, %rcx
rep movsw
nop
nop
sub %rdi, %rdi
// Load
mov $0x66ccc90000000438, %rbx
nop
nop
nop
sub %rdx, %rdx
mov (%rbx), %si
nop
nop
dec %rbx
// Store
lea addresses_RW+0x14e79, %rax
nop
nop
nop
dec %r11
movl $0x51525354, (%rax)
nop
sub $43784, %rax
// Load
lea addresses_UC+0x46e5, %rsi
nop
nop
nop
nop
xor %r11, %r11
movups (%rsi), %xmm4
vpextrq $1, %xmm4, %rdx
nop
nop
nop
nop
nop
inc %r11
// Store
lea addresses_normal+0x15945, %rsi
nop
nop
dec %rcx
mov $0x5152535455565758, %rbx
movq %rbx, %xmm0
vmovups %ymm0, (%rsi)
and %r11, %r11
// Faulty Load
lea addresses_D+0x6845, %rdx
nop
nop
sub $64096, %rcx
movb (%rdx), %r11b
lea oracles, %rbx
and $0xff, %r11
shlq $12, %r11
mov (%rbx,%r11,1), %r11
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_D', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT', 'congruent': 8, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D', 'congruent': 0, 'same': True}}
{'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 1}}
{'src': {'type': 'addresses_UC', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 2}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 8}}
[Faulty Load]
{'src': {'type': 'addresses_D', 'AVXalign': False, 'size': 1, 'NT': True, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 6}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 0}}
{'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 11}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 7, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 7, 'same': False}}
{'39': 7}
39 39 39 39 39 39 39
*/
|
programs/oeis/127/A127917.asm
|
neoneye/loda
| 22 |
5155
|
; A127917: Product of three numbers: n-th prime, previous number, and following number.
; 6,24,120,336,1320,2184,4896,6840,12144,24360,29760,50616,68880,79464,103776,148824,205320,226920,300696,357840,388944,492960,571704,704880,912576,1030200,1092624,1224936,1294920,1442784,2048256,2247960,2571216,2685480,3307800,3442800,3869736,4330584,4657296,5177544,5735160,5929560,6967680,7188864,7645176,7880400,9393720,11089344,11696856,12008760,12649104,13651680,13997280,15813000,16974336,18191184,19464840,19902240,21253656,22187760,22664904,25153464,28934136,30079920,30663984,31854696,36264360,38272416,41781576,42508200,43986624,46267920,49430496,51894744,54439560,56181504,58863480,62570376,64480800,68417520,73559640,74618040,80062560,81182304,84604080,86937864,90518400,95443536,97971720,99252384,101847096,109901760,115500816,118370280,124251000,127263024,131871720,141420240,143055144,158339880
seq $0,40 ; The prime numbers.
add $0,1
bin $0,3
mul $0,6
|
oeis/010/A010968.asm
|
neoneye/loda-programs
| 11 |
15184
|
<reponame>neoneye/loda-programs
; A010968: a(n) = binomial(n,15).
; 1,16,136,816,3876,15504,54264,170544,490314,1307504,3268760,7726160,17383860,37442160,77558760,155117520,300540195,565722720,1037158320,1855967520,3247943160,5567902560,9364199760,15471286560,25140840660,40225345056,63432274896,98672427616,151532656696,229911617056,344867425584,511738760544,751616304549,1093260079344,1575580702584,2250829575120,3188675231420,4481381406320,6250347750920,8654327655120,11899700525790,16253249498640,22057981462440,29752626158640,39895566894540,53194089192720
add $0,15
bin $0,15
|
Cubical/Data/BinNat/BinNat.agda
|
cj-xu/cubical
| 0 |
2194
|
<reponame>cj-xu/cubical<gh_stars>0
{- Binary natural numbers (<NAME>, Jan. 2019)
This file defines two representations of binary numbers. We prove that
they are equivalent to unary numbers and univalence is then used to
transport both programs and properties between the representations.
This is an example of how having computational univalence can be
useful for practical programming.
The first definition is [Binℕ] and the numbers are essentially lists
of 0/1 with no trailing zeroes (in little-endian format). The main
definitions and examples are:
- Equivalence between Binℕ and ℕ ([Binℕ≃ℕ]) with an equality obtained
using univalence ([Binℕ≡ℕ]).
- Addition on Binℕ defined by transporting addition on ℕ to Binℕ
([_+Binℕ_]) along Binℕ≡ℕ together with a proof that addition on Binℕ
is associative obtained by transporting the proof for ℕ ([+Binℕ-assoc]).
- Functions testing whether a binary number is odd or even in O(1)
([oddBinℕ], [evenBinℕ]) and the corresponding functions for ℕ
obtained by transport. Proof that odd numbers are not even
transported from Binℕ to ℕ ([oddℕnotEvenℕ]).
- An example of the structure identity principle for natural number
structures ([NatImpl]). We first prove that Binℕ≡ℕ lifts to natural
number structures ([NatImplℕ≡Binℕ]) and we then use this to
transport "+-suc : m + suc n ≡ suc (m + n)" from ℕ to Binℕ ([+Binℕ-suc]).
- An example of program/data refinement using the structure identity
principle where we transport a property that is infeasible to prove
by computation for ℕ ([propDoubleℕ]):
2^20 * 2^10 = 2^5 * (2^15 * 2^10)
from the corresponding result on Binℕ which is proved instantly by
refl ([propDoubleBinℕ]).
These examples are inspired from an old cubicaltt formalization:
https://github.com/mortberg/cubicaltt/blob/master/examples/binnat.ctt
which itself is based on an even older cubical formalization (from 2014):
https://github.com/simhu/cubical/blob/master/examples/binnat.cub
The second representation is more non-standard and inspired by:
https://github.com/RedPRL/redtt/blob/master/library/cool/nats.red
Only some of the experiments have been done for this representation,
but it has the virtue of being a bit simpler to prove equivalent to
ℕ. The same representation can be found in:
http://www.cs.bham.ac.uk/~mhe/agda-new/BinaryNaturals.html
-}
{-# OPTIONS --cubical --no-exact-split --safe #-}
module Cubical.Data.BinNat.BinNat where
open import Cubical.Core.Glue
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Univalence
open import Cubical.Foundations.Isomorphism
open import Cubical.Data.Nat
open import Cubical.Data.Bool
open import Cubical.Data.Empty
open import Cubical.Relation.Nullary
-- Positive binary numbers
data Pos : Type₀ where
pos1 : Pos
x0 : Pos → Pos
x1 : Pos → Pos
sucPos : Pos → Pos
sucPos pos1 = x0 pos1
sucPos (x0 ps) = x1 ps
sucPos (x1 ps) = x0 (sucPos ps)
Pos→ℕ : Pos → ℕ
Pos→ℕ pos1 = suc zero
Pos→ℕ (x0 ps) = doubleℕ (Pos→ℕ ps)
Pos→ℕ (x1 ps) = suc (doubleℕ (Pos→ℕ ps))
posInd : {P : Pos → Type₀} → P pos1 → ((p : Pos) → P p → P (sucPos p)) → (p : Pos) → P p
posInd {P} h1 hs ps = f ps
where
H : (p : Pos) → P (x0 p) → P (x0 (sucPos p))
H p hx0p = hs (x1 p) (hs (x0 p) hx0p)
f : (ps : Pos) → P ps
f pos1 = h1
f (x0 ps) = posInd (hs pos1 h1) H ps
f (x1 ps) = hs (x0 ps) (posInd (hs pos1 h1) H ps)
Pos→ℕsucPos : (p : Pos) → Pos→ℕ (sucPos p) ≡ suc (Pos→ℕ p)
Pos→ℕsucPos pos1 = refl
Pos→ℕsucPos (x0 p) = refl
Pos→ℕsucPos (x1 p) = λ i → doubleℕ (Pos→ℕsucPos p i)
zero≠Pos→ℕ : (p : Pos) → ¬ (zero ≡ Pos→ℕ p)
zero≠Pos→ℕ p = posInd (λ prf → znots prf) hs p
where
hs : (p : Pos) → ¬ (zero ≡ Pos→ℕ p) → zero ≡ Pos→ℕ (sucPos p) → ⊥
hs p neq ieq = ⊥-elim (znots (ieq ∙ (Pos→ℕsucPos p)))
ℕ→Pos : ℕ → Pos
ℕ→Pos zero = pos1
ℕ→Pos (suc zero) = pos1
ℕ→Pos (suc (suc n)) = sucPos (ℕ→Pos (suc n))
ℕ→PosSuc : ∀ n → ¬ (zero ≡ n) → ℕ→Pos (suc n) ≡ sucPos (ℕ→Pos n)
ℕ→PosSuc zero neq = ⊥-elim (neq refl)
ℕ→PosSuc (suc n) neq = refl
Pos→ℕ→Pos : (p : Pos) → ℕ→Pos (Pos→ℕ p) ≡ p
Pos→ℕ→Pos p = posInd refl hs p
where
hs : (p : Pos) → ℕ→Pos (Pos→ℕ p) ≡ p → ℕ→Pos (Pos→ℕ (sucPos p)) ≡ sucPos p
hs p hp =
ℕ→Pos (Pos→ℕ (sucPos p)) ≡⟨ cong ℕ→Pos (Pos→ℕsucPos p) ⟩
ℕ→Pos (suc (Pos→ℕ p)) ≡⟨ ℕ→PosSuc (Pos→ℕ p) (zero≠Pos→ℕ p) ⟩
sucPos (ℕ→Pos (Pos→ℕ p)) ≡⟨ cong sucPos hp ⟩
sucPos p ∎
ℕ→Pos→ℕ : (n : ℕ) → Pos→ℕ (ℕ→Pos (suc n)) ≡ suc n
ℕ→Pos→ℕ zero = refl
ℕ→Pos→ℕ (suc n) =
Pos→ℕ (sucPos (ℕ→Pos (suc n))) ≡⟨ Pos→ℕsucPos (ℕ→Pos (suc n)) ⟩
suc (Pos→ℕ (ℕ→Pos (suc n))) ≡⟨ cong suc (ℕ→Pos→ℕ n) ⟩
suc (suc n) ∎
-- Binary numbers
data Binℕ : Type₀ where
binℕ0 : Binℕ
binℕpos : Pos → Binℕ
ℕ→Binℕ : ℕ → Binℕ
ℕ→Binℕ zero = binℕ0
ℕ→Binℕ (suc n) = binℕpos (ℕ→Pos (suc n))
Binℕ→ℕ : Binℕ → ℕ
Binℕ→ℕ binℕ0 = zero
Binℕ→ℕ (binℕpos x) = Pos→ℕ x
ℕ→Binℕ→ℕ : (n : ℕ) → Binℕ→ℕ (ℕ→Binℕ n) ≡ n
ℕ→Binℕ→ℕ zero = refl
ℕ→Binℕ→ℕ (suc zero) = refl
ℕ→Binℕ→ℕ (suc (suc n)) =
Pos→ℕ (sucPos (ℕ→Pos (suc n))) ≡⟨ Pos→ℕsucPos (ℕ→Pos (suc n)) ⟩
suc (Pos→ℕ (ℕ→Pos (suc n))) ≡⟨ cong suc (ℕ→Binℕ→ℕ (suc n)) ⟩
suc (suc n) ∎
Binℕ→ℕ→Binℕ : (n : Binℕ) → ℕ→Binℕ (Binℕ→ℕ n) ≡ n
Binℕ→ℕ→Binℕ binℕ0 = refl
Binℕ→ℕ→Binℕ (binℕpos p) = posInd refl (λ p _ → rem p) p
where
rem : (p : Pos) → ℕ→Binℕ (Pos→ℕ (sucPos p)) ≡ binℕpos (sucPos p)
rem p =
ℕ→Binℕ (Pos→ℕ (sucPos p)) ≡⟨ cong ℕ→Binℕ (Pos→ℕsucPos p) ⟩
binℕpos (ℕ→Pos (suc (Pos→ℕ p))) ≡⟨ cong binℕpos ((ℕ→PosSuc (Pos→ℕ p) (zero≠Pos→ℕ p)) ∙
(cong sucPos (Pos→ℕ→Pos p))) ⟩
binℕpos (sucPos p) ∎
Binℕ≃ℕ : Binℕ ≃ ℕ
Binℕ≃ℕ = isoToEquiv (iso Binℕ→ℕ ℕ→Binℕ ℕ→Binℕ→ℕ Binℕ→ℕ→Binℕ)
-- Use univalence (in fact only "ua") to get an equality from the
-- above equivalence
Binℕ≡ℕ : Binℕ ≡ ℕ
Binℕ≡ℕ = ua Binℕ≃ℕ
sucBinℕ : Binℕ → Binℕ
sucBinℕ binℕ0 = binℕpos pos1
sucBinℕ (binℕpos x) = binℕpos (sucPos x)
Binℕ→ℕsuc : (x : Binℕ) → suc (Binℕ→ℕ x) ≡ Binℕ→ℕ (sucBinℕ x)
Binℕ→ℕsuc binℕ0 = refl
Binℕ→ℕsuc (binℕpos x) = sym (Pos→ℕsucPos x)
-- We can transport addition on ℕ to Binℕ
_+Binℕ_ : Binℕ → Binℕ → Binℕ
_+Binℕ_ = transport (λ i → Binℕ≡ℕ (~ i) → Binℕ≡ℕ (~ i) → Binℕ≡ℕ (~ i)) _+_
-- Test: 4 + 1 = 5
private
_ : binℕpos (x0 (x0 pos1)) +Binℕ binℕpos pos1 ≡ binℕpos (x1 (x0 pos1))
_ = refl
-- It is easy to test if binary numbers are odd
oddBinℕ : Binℕ → Bool
oddBinℕ binℕ0 = false
oddBinℕ (binℕpos pos1) = true
oddBinℕ (binℕpos (x0 _)) = false
oddBinℕ (binℕpos (x1 _)) = true
evenBinℕ : Binℕ → Bool
evenBinℕ n = oddBinℕ (sucBinℕ n)
-- And prove the following property (without induction)
oddBinℕnotEvenBinℕ : (n : Binℕ) → oddBinℕ n ≡ not (evenBinℕ n)
oddBinℕnotEvenBinℕ binℕ0 = refl
oddBinℕnotEvenBinℕ (binℕpos pos1) = refl
oddBinℕnotEvenBinℕ (binℕpos (x0 x)) = refl
oddBinℕnotEvenBinℕ (binℕpos (x1 x)) = refl
-- It is also easy to define and prove the property for unary numbers,
-- however the definition uses recursion and the proof induction
private
oddn : ℕ → Bool
oddn zero = true
oddn (suc x) = not (oddn x)
evenn : ℕ → Bool
evenn n = not (oddn n)
oddnSuc : (n : ℕ) → oddn n ≡ not (evenn n)
oddnSuc zero = refl
oddnSuc (suc n) = cong not (oddnSuc n)
-- So what we can do instead is to transport the odd test from Binℕ to
-- ℕ along the equality
oddℕ : ℕ → Bool
oddℕ = transport (λ i → Binℕ≡ℕ i → Bool) oddBinℕ
evenℕ : ℕ → Bool
evenℕ = transport (λ i → Binℕ≡ℕ i → Bool) evenBinℕ
-- We can then also transport the property
oddℕnotEvenℕ : (n : ℕ) → oddℕ n ≡ not (evenℕ n)
oddℕnotEvenℕ =
let -- We first build a path from oddBinℕ to oddℕ. When i=1 this is
-- "transp (λ j → Binℕ≡ℕ j → Bool) i0 oddBinℕ" (i.e. oddℕ)
oddp : PathP (λ i → Binℕ≡ℕ i → Bool) oddBinℕ oddℕ
oddp i = transp (λ j → Binℕ≡ℕ (i ∧ j) → Bool) (~ i) oddBinℕ
-- We then build a path from evenBinℕ to evenℕ
evenp : PathP (λ i → Binℕ≡ℕ i → Bool) evenBinℕ evenℕ
evenp i = transp (λ j → Binℕ≡ℕ (i ∧ j) → Bool) (~ i) evenBinℕ
in -- Then transport oddBinℕnotEvenBinℕ in a suitable equality type
-- When i=0 this is "(n : Binℕ) → oddBinℕ n ≡ not (evenBinℕ n)"
-- When i=1 this is "(n : ℕ) → oddℕ n ≡ not (evenℕ n)"
transport (λ i → (n : Binℕ≡ℕ i) → oddp i n ≡ not (evenp i n)) oddBinℕnotEvenBinℕ
-- We can do the same for natural numbers:
-- First construct the path
addp : PathP (λ i → Binℕ≡ℕ (~ i) → Binℕ≡ℕ (~ i) → Binℕ≡ℕ (~ i)) _+_ _+Binℕ_
addp i = transp (λ j → Binℕ≡ℕ (~ i ∨ ~ j) → Binℕ≡ℕ (~ i ∨ ~ j) → Binℕ≡ℕ (~ i ∨ ~ j)) (~ i) _+_
-- Then transport associativity:
+Binℕ-assoc : ∀ m n o → m +Binℕ (n +Binℕ o) ≡ (m +Binℕ n) +Binℕ o
+Binℕ-assoc =
transport (λ i → (m n o : Binℕ≡ℕ (~ i))
→ addp i m (addp i n o) ≡ addp i (addp i m n) o) +-assoc
-- We can also define what it means to be an implementation of natural
-- numbers and use this to transport properties between different
-- implementation of natural numbers. This can be seen as a special
-- case of the structure identity principle: any property that holds
-- for one structure also holds for an equivalent one.
-- An implementation of natural numbers (i.e. a "natural number
-- structure") has a zero and successor.
record NatImpl (A : Type₀) : Type₀ where
field
z : A
s : A → A
open NatImpl
NatImplℕ : NatImpl ℕ
z NatImplℕ = zero
s NatImplℕ = suc
NatImplBinℕ : NatImpl Binℕ
z NatImplBinℕ = binℕ0
s NatImplBinℕ = sucBinℕ
-- Using the equality between binary and unary numbers we can get an
-- equality between the two implementations of the NatImpl interface
NatImplℕ≡Binℕ : PathP (λ i → NatImpl (Binℕ≡ℕ (~ i))) NatImplℕ NatImplBinℕ
z (NatImplℕ≡Binℕ i) = transp (λ j → Binℕ≡ℕ (~ i ∨ ~ j)) (~ i) zero
s (NatImplℕ≡Binℕ i) =
λ x → glue (λ { (i = i0) → suc x
; (i = i1) → sucBinℕ x })
-- We need to do use and hcomp to do and endpoint
-- correction as "suc (unglue x)" connects "suc x"
-- with "suc (Binℕ→ℕ x)" along i (which makes sense as
-- x varies from ℕ to Binℕ along i), but we need
-- something from "suc x" to "Binℕ→ℕ (sucBinℕ x)" for
-- the glue to be well-formed
(hcomp (λ j → λ { (i = i0) → suc x
; (i = i1) → Binℕ→ℕsuc x j })
(suc (unglue (i ∨ ~ i) x)))
-- We then use this to transport +-suc from unary to binary numbers
+Binℕ-suc : ∀ m n → m +Binℕ sucBinℕ n ≡ sucBinℕ (m +Binℕ n)
+Binℕ-suc =
transport (λ i → (m n : Binℕ≡ℕ (~ i))
→ addp i m (NatImplℕ≡Binℕ i .s n) ≡ NatImplℕ≡Binℕ i .s (addp i m n)) +-suc
-- Doubling experiment: we define a notion of "doubling structure" and
-- transport a proof that is proved directly using refl for binary
-- numbers to unary numbers. This is an example of program/data
-- refinement: we can use univalence to prove properties about
-- inefficient data-structures using efficient ones.
-- Doubling structures
record Double {ℓ} (A : Type ℓ) : Type (ℓ-suc ℓ) where
field
-- doubling function computing 2 * x
double : A → A
-- element to double
elt : A
open Double
-- Compute: 2^n * x
doubles : ∀ {ℓ} {A : Type ℓ} (D : Double A) → ℕ → A → A
doubles D n x = iter n (double D) x
Doubleℕ : Double ℕ
double Doubleℕ = doubleℕ
elt Doubleℕ = n1024
where
-- 1024 = 2^8 * 2^2 = 2^10
n1024 : ℕ
n1024 = doublesℕ 8 4
-- The doubling operation on binary numbers is O(1), while for unary
-- numbers it is O(n). What is of course even more problematic is that
-- we cannot handle very big unary natural numbers, but with binary
-- there is no problem to represent very big numbers
doubleBinℕ : Binℕ → Binℕ
doubleBinℕ binℕ0 = binℕ0
doubleBinℕ (binℕpos x) = binℕpos (x0 x)
DoubleBinℕ : Double Binℕ
double DoubleBinℕ = doubleBinℕ
elt DoubleBinℕ = bin1024
where
-- 1024 = 2^10 = 10000000000₂
bin1024 : Binℕ
bin1024 = binℕpos (x0 (x0 (x0 (x0 (x0 (x0 (x0 (x0 (x0 (x0 pos1))))))))))
-- As these function don't commute strictly we have to prove it
-- separately and insert it in the proof of DoubleBinℕ≡Doubleℕ below
-- (just like we had to in NatImplℕ≡NatImplBinℕ
Binℕ→ℕdouble : (x : Binℕ) → doubleℕ (Binℕ→ℕ x) ≡ Binℕ→ℕ (doubleBinℕ x)
Binℕ→ℕdouble binℕ0 = refl
Binℕ→ℕdouble (binℕpos x) = refl
-- We use the equality between Binℕ and ℕ to get an equality of
-- doubling structures
DoubleBinℕ≡Doubleℕ : PathP (λ i → Double (Binℕ≡ℕ i)) DoubleBinℕ Doubleℕ
double (DoubleBinℕ≡Doubleℕ i) =
λ x → glue (λ { (i = i0) → doubleBinℕ x
; (i = i1) → doubleℕ x })
(hcomp (λ j → λ { (i = i0) → Binℕ→ℕdouble x j
; (i = i1) → doubleℕ x })
(doubleℕ (unglue (i ∨ ~ i) x)))
elt (DoubleBinℕ≡Doubleℕ i) = transp (λ j → Binℕ≡ℕ (i ∨ ~ j)) i (Doubleℕ .elt)
-- We can now use transport to prove a property that is too slow to
-- check with unary numbers. We define the property we want to check
-- as a record so that Agda does not try to unfold it eagerly.
record propDouble {ℓ} {A : Type ℓ} (D : Double A) : Type ℓ where
field
-- 2^20 * e = 2^5 * (2^15 * e)
proof : doubles D 20 (elt D) ≡ doubles D 5 (doubles D 15 (elt D))
open propDouble
-- The property we want to prove takes too long to typecheck for ℕ:
-- propDoubleℕ : propDouble Doubleℕ
-- propDoubleℕ = refl
-- With binary numbers it is instant
propDoubleBinℕ : propDouble DoubleBinℕ
proof propDoubleBinℕ = refl
-- By transporting the proof along the equality we then get it for
-- unary numbers
propDoubleℕ : propDouble Doubleℕ
propDoubleℕ = transport (λ i → propDouble (DoubleBinℕ≡Doubleℕ i)) propDoubleBinℕ
--------------------------------------------------------------------------------
--
-- Alternative encoding of binary natural numbers inspired by:
-- https://github.com/RedPRL/redtt/blob/master/library/cool/nats.red
--
-- This representation makes the equivalence with ℕ a bit easier to
-- prove, but the doubling example wouldn't work as nicely as we
-- cannot define it as an O(1) operation
data binnat : Type₀ where
zero : binnat -- 0
consOdd : binnat → binnat -- 2^n + 1
consEven : binnat → binnat -- 2^{n+1}
binnat→ℕ : binnat → ℕ
binnat→ℕ zero = 0
binnat→ℕ (consOdd n) = suc (doubleℕ (binnat→ℕ n))
binnat→ℕ (consEven n) = suc (suc (doubleℕ (binnat→ℕ n)))
suc-binnat : binnat → binnat
suc-binnat zero = consOdd zero
suc-binnat (consOdd n) = consEven n
suc-binnat (consEven n) = consOdd (suc-binnat n)
ℕ→binnat : ℕ → binnat
ℕ→binnat zero = zero
ℕ→binnat (suc n) = suc-binnat (ℕ→binnat n)
binnat→ℕ-suc : (n : binnat) → binnat→ℕ (suc-binnat n) ≡ suc (binnat→ℕ n)
binnat→ℕ-suc zero = refl
binnat→ℕ-suc (consOdd n) = refl
binnat→ℕ-suc (consEven n) = λ i → suc (doubleℕ (binnat→ℕ-suc n i))
ℕ→binnat→ℕ : (n : ℕ) → binnat→ℕ (ℕ→binnat n) ≡ n
ℕ→binnat→ℕ zero = refl
ℕ→binnat→ℕ (suc n) = (binnat→ℕ-suc (ℕ→binnat n)) ∙ (cong suc (ℕ→binnat→ℕ n))
suc-ℕ→binnat-double : (n : ℕ) → suc-binnat (ℕ→binnat (doubleℕ n)) ≡ consOdd (ℕ→binnat n)
suc-ℕ→binnat-double zero = refl
suc-ℕ→binnat-double (suc n) = λ i → suc-binnat (suc-binnat (suc-ℕ→binnat-double n i))
binnat→ℕ→binnat : (n : binnat) → ℕ→binnat (binnat→ℕ n) ≡ n
binnat→ℕ→binnat zero = refl
binnat→ℕ→binnat (consOdd n) =
(suc-ℕ→binnat-double (binnat→ℕ n)) ∙ (cong consOdd (binnat→ℕ→binnat n))
binnat→ℕ→binnat (consEven n) =
(λ i → suc-binnat (suc-ℕ→binnat-double (binnat→ℕ n) i)) ∙ (cong consEven (binnat→ℕ→binnat n))
ℕ≃binnat : ℕ ≃ binnat
ℕ≃binnat = isoToEquiv (iso ℕ→binnat binnat→ℕ binnat→ℕ→binnat ℕ→binnat→ℕ)
ℕ≡binnat : ℕ ≡ binnat
ℕ≡binnat = ua ℕ≃binnat
-- We can transport addition on ℕ to binnat
_+binnat_ : binnat → binnat → binnat
_+binnat_ = transport (λ i → ℕ≡binnat i → ℕ≡binnat i → ℕ≡binnat i) _+_
-- Test: 4 + 1 = 5
_ : consEven (consOdd zero) +binnat consOdd zero ≡ consOdd (consEven zero)
_ = refl
oddbinnat : binnat → Bool
oddbinnat zero = false
oddbinnat (consOdd _) = true
oddbinnat (consEven _) = false
oddℕ' : ℕ → Bool
oddℕ' = transport (λ i → ℕ≡binnat (~ i) → Bool) oddbinnat
-- The NatImpl example for this representation of binary numbers
private
NatImplbinnat : NatImpl binnat
z NatImplbinnat = zero
s NatImplbinnat = suc-binnat
-- Note that the s case is a bit simpler as no end-point correction
-- is necessary (things commute strictly)
NatImplℕ≡NatImplbinnat : PathP (λ i → NatImpl (ℕ≡binnat i)) NatImplℕ NatImplbinnat
z (NatImplℕ≡NatImplbinnat i) = transp (λ j → ℕ≡binnat (i ∨ ~ j)) i zero
s (NatImplℕ≡NatImplbinnat i) =
λ x → glue (λ { (i = i0) → suc x
; (i = i1) → suc-binnat x })
(suc-binnat (unglue (i ∨ ~ i) x))
oddSuc : (n : binnat) → oddbinnat n ≡ not (oddbinnat (suc-binnat n))
oddSuc zero = refl
oddSuc (consOdd _) = refl
oddSuc (consEven _) = refl
oddℕSuc' : (n : ℕ) → oddℕ' n ≡ not (oddℕ' (suc n))
oddℕSuc' =
let eq : (i : I) → ℕ≡binnat (~ i) → Bool
eq i = transp (λ j → ℕ≡binnat (~ i ∨ ~ j) → Bool) (~ i) oddbinnat
in transport
(λ i → (n : ℕ≡binnat (~ i)) → eq i n ≡ not (eq i (NatImplℕ≡NatImplbinnat (~ i) .NatImpl.s n)))
oddSuc
|
oeis/158/A158420.asm
|
neoneye/loda-programs
| 11 |
19857
|
<reponame>neoneye/loda-programs
; A158420: 1024n^2 - 2n.
; 1022,4092,9210,16376,25590,36852,50162,65520,82926,102380,123882,147432,173030,200676,230370,262112,295902,331740,369626,409560,451542,495572,541650,589776,639950,692172,746442,802760,861126,921540,984002,1048512,1115070,1183676,1254330,1327032,1401782,1478580,1557426,1638320,1721262,1806252,1893290,1982376,2073510,2166692,2261922,2359200,2458526,2559900,2663322,2768792,2876310,2985876,3097490,3211152,3326862,3444620,3564426,3686280,3810182,3936132,4064130,4194176,4326270,4460412,4596602
mov $1,16
mov $2,$0
add $2,1
mul $2,2
mul $1,$2
pow $1,2
sub $1,$2
mov $0,$1
|
programs/oeis/194/A194220.asm
|
neoneye/loda
| 22 |
171086
|
<filename>programs/oeis/194/A194220.asm
; A194220: [sum{(k/4) : 1<=k<=n}], where [ ]=floor, ( )=fractional part.
; 0,0,1,1,1,2,3,3,3,3,4,4,4,5,6,6,6,6,7,7,7,8,9,9,9,9,10,10,10,11,12,12,12,12,13,13,13,14,15,15,15,15,16,16,16,17,18,18,18,18,19,19,19,20,21,21,21,21,22,22,22,23,24,24,24,24,25,25,25,26,27,27,27,27,28,28,28,29,30,30,30,30,31,31,31,32,33,33,33,33,34,34,34,35,36,36,36,36,37,37
lpb $0
trn $0,4
add $1,$0
trn $0,2
sub $1,$0
sub $0,1
trn $0,2
add $0,1
add $1,1
lpe
mov $0,$1
|
README/Unsafe/Sized-types.agda
|
nad/equality
| 3 |
1897
|
<filename>README/Unsafe/Sized-types.agda
------------------------------------------------------------------------
-- Modules that are not safe because they use --sized-types
------------------------------------------------------------------------
{-# OPTIONS --without-K --sized-types #-}
module README.Unsafe.Sized-types where
-- Support for sized types.
import Prelude.Size
-- Some results that could not be placed in Function-universe because
-- they make use of --sized-types.
import Function-universe.Size
-- Conatural numbers.
import Conat
-- Colists.
import Colist
-- M-types.
import M
|
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c3/c37208b.ada
|
best08618/asylo
| 7 |
3590
|
<filename>gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c3/c37208b.ada
-- C37208B.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.
--*
-- FOR A TYPE WITH DEFAULT DISCRIMINANT VALUES, CHECK THAT A
-- DISCRIMINANT CONSTRAINT CAN BE OMITTED IN A GENERIC FORMAL
-- PARAMETER, AND HENCE, FOR BOTH IN AND IN OUT PARAMETERS, THE
-- 'CONSTRAINED ATTRIBUTE OF THE ACTUAL PARAMETER BECOMES THE
-- 'CONSTRAINED ATTRIBUTE OF THE FORMAL PARAMETER, AND, FOR IN
-- OUT PARAMETERS, IF THE 'CONSTRAINED ATTRIBUTE IS FALSE,
-- ASSIGNMENTS TO THE FORMAL PARAMETERS CAN CHANGE THE
-- DISCRIMINANTS OF THE ACTUAL PARAMETER; IF THE 'CONSTRAINED
-- ATTRIBUTE IS TRUE, ASSIGNMENTS THAT ATTEMPT TO CHANGE THE
-- DISCRIMINANTS OF THE ACTUAL PARAMETER RAISE CONSTRAINT_ERROR.
-- ASL 7/29/81
-- VKG 1/20/83
-- EDS 7/16/98 AVOID OPTIMIZATION
WITH REPORT;
PROCEDURE C37208B IS
USE REPORT;
BEGIN
TEST ("C37208B","FOR TYPES WITH DEFAULT DISCRIMINANT " &
"VALUES, DISCRIMINANT CONSTRAINTS CAN BE OMITTED " &
"IN GENERIC FORMAL PARAMETERS, AND THE " &
"'CONSTRAINED ATTRIBUTE HAS CORRECT VALUES " &
"DEPENDING ON THE ACTUAL PARAMETERS");
DECLARE
TYPE REC(DISC : INTEGER := 7) IS
RECORD
NULL;
END RECORD;
KC : CONSTANT REC(3) := (DISC => 3);
KU : CONSTANT REC := (DISC => 3);
OBJC1,OBJC2 : REC(3) := (DISC => 3);
OBJU1,OBJU2 : REC := (DISC => 3);
GENERIC
P_IN1 : REC;
P_IN2 : REC;
P_IN_OUT : IN OUT REC;
STATUS : BOOLEAN;
PROCEDURE PROC;
PROCEDURE PROC IS
BEGIN
IF P_IN1'CONSTRAINED /= TRUE OR
P_IN2'CONSTRAINED /= TRUE OR
P_IN_OUT'CONSTRAINED /= STATUS
THEN
FAILED ("'CONSTRAINED ATTRIBUTES DO NOT MATCH " &
"FOR ACTUAL AND FORMAL PARAMETERS");
END IF;
IF NOT STATUS THEN
BEGIN
P_IN_OUT := (DISC => IDENT_INT(7));
EXCEPTION
WHEN OTHERS =>
FAILED ("EXCEPTION RAISED " &
"WHEN TRYING TO " &
"CHANGE UNCONSTRAINED " &
"DISCRIMINANT VALUE");
END;
ELSE
BEGIN
P_IN_OUT := (DISC => IDENT_INT(7));
FAILED ("DISCRIMINANT OF CONSTRAINED " &
"ACTUAL PARAMETER ILLEGALLY " &
"CHANGED BY ASSIGNMENT");
EXCEPTION
WHEN CONSTRAINT_ERROR => NULL;
WHEN OTHERS => FAILED ("WRONG EXCEPTION");
END;
END IF;
END PROC;
BEGIN
DECLARE
PROCEDURE PROC_C IS NEW PROC(KC,OBJC1,OBJC2,IDENT_BOOL(TRUE));
PROCEDURE PROC_U IS NEW PROC(KU,OBJU1,OBJU2,IDENT_BOOL(FALSE));
BEGIN
PROC_C;
PROC_U;
IF OBJU2.DISC /= 7 THEN
FAILED ("ASSIGNMENT TO UNCONSTRAINED ACTUAL " &
"PARAMETER FAILED TO CHANGE DISCRIMINANT ");
END IF;
END;
END;
RESULT;
END C37208B;
|
llvm-gcc-4.2-2.9/gcc/ada/sem.ads
|
vidkidz/crossbridge
| 1 |
830
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S E M --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
--------------------------------------
-- Semantic Analysis: General Model --
--------------------------------------
-- Semantic processing involves 3 phases which are highly interwined
-- (ie mutually recursive):
-- Analysis implements the bulk of semantic analysis such as
-- name analysis and type resolution for declarations,
-- instructions and expressions. The main routine
-- driving this process is procedure Analyze given below.
-- This analysis phase is really a bottom up pass that is
-- achieved during the recursive traversal performed by the
-- Analyze_... procedures implemented in the sem_* packages.
-- For expressions this phase determines unambiguous types
-- and collects sets of possible types where the
-- interpretation is potentially ambiguous.
-- Resolution is carried out only for expressions to finish type
-- resolution that was initiated but not necessarily
-- completed during analysis (because of overloading
-- ambiguities). Specifically, after completing the bottom
-- up pass carried out during analysis for expressions, the
-- Resolve routine (see the spec of sem_res for more info)
-- is called to perform a top down resolution with
-- recursive calls to itself to resolve operands.
-- Expansion if we are not generating code this phase is a no-op.
-- otherwise this phase expands, ie transforms, original
-- declaration, expressions or instructions into simpler
-- structures that can be handled by the back-end. This
-- phase is also in charge of generating code which is
-- implicit in the original source (for instance for
-- default initializations, controlled types, etc.)
-- There are two separate instances where expansion is
-- invoked. For declarations and instructions, expansion is
-- invoked just after analysis since no resolution needs
-- to be performed. For expressions, expansion is done just
-- after resolution. In both cases expansion is done from the
-- bottom up just before the end of Analyze for instructions
-- and declarations or the call to Resolve for expressions.
-- The main routine driving expansion is Expand.
-- See the spec of Expander for more details.
-- To summarize, in normal code generation mode we recursively traverse the
-- abstract syntax tree top-down performing semantic analysis bottom
-- up. For instructions and declarations, before the call to the Analyze
-- routine completes we perform expansion since at that point we have all
-- semantic information needed. For expression nodes, after the call to
-- Analysis terminates we invoke the Resolve routine to transmit top-down
-- the type that was gathered by Analyze which will resolve possible
-- ambiguities in the expression. Just before the call to Resolve
-- terminates, the expression can be expanded since all the semantic
-- information is available at that point.
-- If we are not generating code then the expansion phase is a no-op
-- When generating code there are a number of exceptions to the basic
-- Analysis-Resolution-Expansion model for expressions. The most prominent
-- examples are the handling of default expressions and aggregates.
----------------------------------------------------
-- Handling of Default and Per-Object Expressions --
----------------------------------------------------
-- The default expressions in component declarations and in procedure
-- specifications (but not the ones in object declarations) are quite
-- tricky to handle. The problem is that some processing is required
-- at the point where the expression appears:
-- visibility analysis (including user defined operators)
-- freezing of static expressions
-- but other processing must be deferred until the enclosing entity
-- (record or procedure specification) is frozen:
-- freezing of any other types in the expression
-- expansion
-- A similar situation occurs with the argument of priority and interrupt
-- priority pragmas that appear in task and protected definition specs and
-- other cases of per-object expressions (see RM 3.8(18)).
-- Expansion has to be deferred since you can't generate code for
-- expressions that refernce types that have not been frozen yet. As an
-- example, consider the following:
-- type x is delta 0.5 range -10.0 .. +10.0;
-- ...
-- type q is record
-- xx : x := y * z;
-- end record;
-- for x'small use 0.25
-- The expander is in charge of dealing with fixed-point, and of course
-- the small declaration, which is not too late, since the declaration of
-- type q does *not* freeze type x, definitely affects the expanded code.
-- Another reason that we cannot expand early is that expansion can generate
-- range checks. These range checks need to be inserted not at the point of
-- definition but at the point of use. The whole point here is that the value
-- of the expression cannot be obtained at the point of declaration, only at
-- the point of use.
-- Generally our model is to combine analysis resolution and expansion, but
-- this is the one case where this model falls down. Here is how we patch
-- it up without causing too much distortion to our basic model.
-- A switch (sede below) is set to indicate that we are in the initial
-- occurence of a default expression. The analyzer is then called on this
-- expression with the switch set true. Analysis and resolution proceed
-- almost as usual, except that Freeze_Expression will not freeze
-- non-static expressions if this switch is set, and the call to Expand at
-- the end of resolution is skipped. This also skips the code that normally
-- sets the Analyzed flag to True). The result is that when we are done the
-- tree is still marked as unanalyzed, but all types for static expressions
-- are frozen as required, and all entities of variables have been
-- recorded. We then turn off the switch, and later on reanalyze the
-- expression with the switch off. The effect is that this second analysis
-- freezes the rest of the types as required, and generates code but
-- visibility analysis is not repeated since all the entities are marked.
-- The second analysis (the one that generates code) is in the context
-- where the code is required. For a record field default, this is in
-- the initialization procedure for the record and for a subprogram
-- default parameter, it is at the point the subprogram is frozen.
-- For a priority or storage size pragma it is in the context of the
-- Init_Proc for the task or protected object.
------------------
-- Pre-Analysis --
------------------
-- For certain kind of expressions, such as aggregates, we need to defer
-- expansion of the aggregate and its inner expressions after the whole
-- set of expressions appearing inside the aggregate have been analyzed.
-- Consider, for instance the following example:
--
-- (1 .. 100 => new Thing (Function_Call))
--
-- The normal Analysis-Resolution-Expansion mechanism where expansion
-- of the children is performed before expansion of the parent does not
-- work if the code generated for the children by the expander needs
-- to be evaluated repeatdly (for instance in the above aggregate
-- "new Thing (Function_Call)" needs to be called 100 times.)
-- The reason why this mecanism does not work is that, the expanded code
-- for the children is typically inserted above the parent and thus
-- when the father gets expanded no re-evaluation takes place. For instance
-- in the case of aggregates if "new Thing (Function_Call)" is expanded
-- before of the aggregate the expanded code will be placed outside
-- of the aggregate and when expanding the aggregate the loop from 1 to 100
-- will not surround the expanded code for "new Thing (Function_Call)".
--
-- To remedy this situation we introduce a new flag which signals whether
-- we want a full analysis (ie expansion is enabled) or a pre-analysis
-- which performs Analysis and Resolution but no expansion.
--
-- After the complete pre-analysis of an expression has been carried out
-- we can transform the expression and then carry out the full
-- Analyze-Resolve-Expand cycle on the transformed expression top-down
-- so that the expansion of inner expressions happens inside the newly
-- generated node for the parent expression.
--
-- Note that the difference between processing of default expressions and
-- pre-analysis of other expressions is that we do carry out freezing in
-- the latter but not in the former (except for static scalar expressions).
-- The routine that performs pre-analysis is called Pre_Analyze_And_Resolve
-- and is in Sem_Res.
with Alloc;
with Einfo; use Einfo;
with Opt; use Opt;
with Table;
with Types; use Types;
package Sem is
New_Nodes_OK : Int := 1;
-- Temporary flag for use in checking out HLO. Set non-zero if it is
-- OK to generate new nodes.
-----------------------------
-- Semantic Analysis Flags --
-----------------------------
Explicit_Overriding : Boolean := False;
-- Switch to indicate whether checking mechanism described in AI-218
-- is enforced: subprograms that override inherited operations must be
-- be marked explicitly, to prevent accidental or omitted overriding.
Full_Analysis : Boolean := True;
-- Switch to indicate whether we are doing a full analysis or a
-- pre-analysis. In normal analysis mode (Analysis-Expansion for
-- instructions or declarations) or (Analysis-Resolution-Expansion for
-- expressions) this flag is set. Note that if we are not generating
-- code the expansion phase merely sets the Analyzed flag to True in
-- this case. If we are in Pre-Analysis mode (see above) this flag is
-- set to False then the expansion phase is skipped.
-- When this flag is False the flag Expander_Active is also False
-- (the Expander_Activer flag defined in the spec of package Expander
-- tells you whether expansion is currently enabled).
-- You should really regard this as a read only flag.
In_Default_Expression : Boolean := False;
-- Switch to indicate that we are in a default expression, as described
-- above. Note that this must be recursively saved on a Semantics call
-- since it is possible for the analysis of an expression to result in
-- a recursive call (e.g. to get the entity for System.Address as part
-- of the processing of an Address attribute reference).
-- When this switch is True then Full_Analysis above must be False.
-- You should really regard this as a read only flag.
In_Deleted_Code : Boolean := False;
-- If the condition in an if-statement is statically known, the branch
-- that is not taken is analyzed with expansion disabled, and the tree
-- is deleted after analysis. Itypes generated in deleted code must be
-- frozen from start, because the tree on which they depend will not
-- be available at the freeze point.
In_Inlined_Body : Boolean := False;
-- Switch to indicate that we are analyzing and resolving an inlined
-- body. Type checking is disabled in this context, because types are
-- known to be compatible. This avoids problems with private types whose
-- full view is derived from private types.
Inside_A_Generic : Boolean := False;
-- This flag is set if we are processing a generic specification,
-- generic definition, or generic body. When this flag is True the
-- Expander_Active flag is False to disable any code expansion (see
-- package Expander). Only the generic processing can modify the
-- status of this flag, any other client should regard it as read-only.
Unloaded_Subunits : Boolean := False;
-- This flag is set True if we have subunits that are not loaded. This
-- occurs when the main unit is a subunit, and contains lower level
-- subunits that are not loaded. We use this flag to suppress warnings
-- about unused variables, since these warnings are unreliable in this
-- case. We could perhaps do a more accurate job and retain some of the
-- warnings, but it is quite a tricky job. See test 4323-002.
-----------------
-- Scope Stack --
-----------------
-- The scope stack holds all entries of the scope table. As in the parser,
-- we use Last as the stack pointer, so that we can always find the scope
-- that is currently open in Scope_Stack.Table (Scope_Stack.Last). The
-- oldest entry, at Scope_Stack (0) is Standard. The entries in the table
-- include the entity for the referenced scope, together with information
-- used to restore the proper setting of check suppressions on scope exit.
type Scope_Stack_Entry is record
Entity : Entity_Id;
-- Entity representing the scope
Last_Subprogram_Name : String_Ptr;
-- Pointer to name of last subprogram body in this scope. Used for
-- testing proper alpha ordering of subprogram bodies in scope.
Save_Scope_Suppress : Suppress_Array;
-- Save contents of Scope_Suppress on entry
Save_Local_Entity_Suppress : Int;
-- Save contents of Local_Entity_Suppress.Last on entry
Is_Transient : Boolean;
-- Marks Transient Scopes (See Exp_Ch7 body for details)
Previous_Visibility : Boolean;
-- Used when installing the parent (s) of the current compilation
-- unit. The parent may already be visible because of an ongoing
-- compilation, and the proper visibility must be restored on exit.
Node_To_Be_Wrapped : Node_Id;
-- Only used in transient scopes. Records the node which will
-- be wrapped by the transient block.
Actions_To_Be_Wrapped_Before : List_Id;
Actions_To_Be_Wrapped_After : List_Id;
-- Actions that have to be inserted at the start or at the end of a
-- transient block. Used to temporarily hold these actions until the
-- block is created, at which time the actions are moved to the
-- block.
Pending_Freeze_Actions : List_Id;
-- Used to collect freeze entity nodes and associated actions that
-- are generated in a inner context but need to be analyzed outside,
-- such as records and initialization procedures. On exit from the
-- scope, this list of actions is inserted before the scope construct
-- and analyzed to generate the corresponding freeze processing and
-- elaboration of other associated actions.
First_Use_Clause : Node_Id;
-- Head of list of Use_Clauses in current scope. The list is built
-- when the declarations in the scope are processed. The list is
-- traversed on scope exit to undo the effect of the use clauses.
Component_Alignment_Default : Component_Alignment_Kind;
-- Component alignment to be applied to any record or array types
-- that are declared for which a specific component alignment pragma
-- does not set the alignment.
Is_Active_Stack_Base : Boolean;
-- Set to true only when entering the scope for Standard_Standard from
-- from within procedure Semantics. Indicates the base of the current
-- active set of scopes. Needed by In_Open_Scopes to handle cases
-- where Standard_Standard can be pushed in the middle of the active
-- set of scopes (occurs for instantiations of generic child units).
end record;
package Scope_Stack is new Table.Table (
Table_Component_Type => Scope_Stack_Entry,
Table_Index_Type => Int,
Table_Low_Bound => 0,
Table_Initial => Alloc.Scope_Stack_Initial,
Table_Increment => Alloc.Scope_Stack_Increment,
Table_Name => "Sem.Scope_Stack");
-----------------------------------
-- Handling of Check Suppression --
-----------------------------------
-- There are two kinds of suppress checks: scope based suppress checks,
-- and entity based suppress checks.
-- Scope based suppress chems (from initial command line arguments,
-- or from Suppress pragmas not including an entity name) are recorded
-- in the Sem.Supress variable, and all that is necessary is to save the
-- state of this variable on scope entry, and restore it on scope exit.
-- Entity based suppress checks, from Suppress pragmas giving an Entity_Id,
-- are handled as follows. If a suppress or unsuppress pragma is
-- encountered for a given entity, then the flag Checks_May_Be_Suppressed
-- is set in the entity and an entry is made in either the
-- Local_Entity_Suppress table (case of pragma that appears in other than
-- a package spec), or in the Global_Entity_Suppress table (case of pragma
-- that appears in a package spec, which is by the rule of RM 11.5(7)
-- applicable throughout the life of the entity).
-- If the Checks_May_Be_Suppressed flag is set in an entity then the
-- procedure is to search first the local and then the global suppress
-- tables (the local one being searched in reverse order, i.e. last in
-- searched first). The only other point is that we have to make sure
-- that we have proper nested interaction between such specific pragmas
-- and locally applied general pragmas applying to all entities. This
-- is achieved by including in the Local_Entity_Suppress table dummy
-- entries with an empty Entity field that are applicable to all entities.
Scope_Suppress : Suppress_Array := Suppress_Options;
-- This array contains the current scope based settings of the suppress
-- switches. It is initialized from the options as shown, and then modified
-- by pragma Suppress. On entry to each scope, the current setting is saved
-- the scope stack, and then restored on exit from the scope. This record
-- may be rapidly checked to determine the current status of a check if
-- no specific entity is involved or if the specific entity involved is
-- one for which no specific Suppress/Unsuppress pragma has been set (as
-- indicated by the Checks_May_Be_Suppressed flag being set).
-- This scheme is a little complex, but serves the purpose of enabling
-- a very rapid check in the common case where no entity specific pragma
-- applies, and gives the right result when such pragmas are used even
-- in complex cases of nested Suppress and Unsuppress pragmas.
type Entity_Check_Suppress_Record is record
Entity : Entity_Id;
-- Entity to which the check applies, or Empty for a local check
-- that has no entity name (and thus applies to all entities).
Check : Check_Id;
-- Check which is set (note this cannot be All_Checks, if the All_Checks
-- case, a sequence of eentries appears for the individual checks.
Suppress : Boolean;
-- Set True for Suppress, and False for Unsuppress
end record;
-- The Local_Entity_Suppress table is a stack, to which new entries are
-- added for Suppress and Unsuppress pragmas appearing in other than
-- package specs. Such pragmas are effective only to the end of the scope
-- in which they appear. This is achieved by marking the stack on entry
-- to a scope and then cutting back the stack to that marked point on
-- scope exit.
package Local_Entity_Suppress is new Table.Table (
Table_Component_Type => Entity_Check_Suppress_Record,
Table_Index_Type => Int,
Table_Low_Bound => 0,
Table_Initial => Alloc.Entity_Suppress_Initial,
Table_Increment => Alloc.Entity_Suppress_Increment,
Table_Name => "Local_Entity_Suppress");
-- The Global_Entity_Suppress table is used for entities which have
-- a Suppress or Unsuppress pragma naming a specific entity in a
-- package spec. Such pragmas always refer to entities in the package
-- spec and are effective throughout the lifetime of the named entity.
package Global_Entity_Suppress is new Table.Table (
Table_Component_Type => Entity_Check_Suppress_Record,
Table_Index_Type => Int,
Table_Low_Bound => 0,
Table_Initial => Alloc.Entity_Suppress_Initial,
Table_Increment => Alloc.Entity_Suppress_Increment,
Table_Name => "Global_Entity_Suppress");
-----------------
-- Subprograms --
-----------------
procedure Initialize;
-- Initialize internal tables
procedure Lock;
-- Lock internal tables before calling back end
procedure Semantics (Comp_Unit : Node_Id);
-- This procedure is called to perform semantic analysis on the specified
-- node which is the N_Compilation_Unit node for the unit.
procedure Analyze (N : Node_Id);
procedure Analyze (N : Node_Id; Suppress : Check_Id);
-- This is the recursive procedure which is applied to individual nodes
-- of the tree, starting at the top level node (compilation unit node)
-- and then moving down the tree in a top down traversal. It calls
-- individual routines with names Analyze_xxx to analyze node xxx. Each
-- of these routines is responsible for calling Analyze on the components
-- of the subtree.
--
-- Note: In the case of expression components (nodes whose Nkind is in
-- N_Subexpr), the call to Analyze does not complete the semantic analysis
-- of the node, since the type resolution cannot be completed until the
-- complete context is analyzed. The completion of the type analysis occurs
-- in the corresponding Resolve routine (see Sem_Res).
--
-- Note: for integer and real literals, the analyzer sets the flag to
-- indicate that the result is a static expression. If the expander
-- generates a literal that does NOT correspond to a static expression,
-- e.g. by folding an expression whose value is known at compile-time,
-- but is not technically static, then the caller should reset the
-- Is_Static_Expression flag after analyzing but before resolving.
--
-- If the Suppress argument is present, then the analysis is done
-- with the specified check suppressed (can be All_Checks to suppress
-- all checks).
procedure Analyze_List (L : List_Id);
procedure Analyze_List (L : List_Id; Suppress : Check_Id);
-- Analyzes each element of a list. If the Suppress argument is present,
-- then the analysis is done with the specified check suppressed (can
-- be All_Checks to suppress all checks).
procedure Copy_Suppress_Status
(C : Check_Id;
From : Entity_Id;
To : Entity_Id);
-- If From is an entity for which check C is explicitly suppressed
-- then also explicitly suppress the corresponding check in To.
procedure Insert_List_After_And_Analyze
(N : Node_Id; L : List_Id);
procedure Insert_List_After_And_Analyze
(N : Node_Id; L : List_Id; Suppress : Check_Id);
-- Inserts list L after node N using Nlists.Insert_List_After, and then,
-- after this insertion is complete, analyzes all the nodes in the list,
-- including any additional nodes generated by this analysis. If the list
-- is empty or be No_List, the call has no effect. If the Suppress
-- argument is present, then the analysis is done with the specified
-- check suppressed (can be All_Checks to suppress all checks).
procedure Insert_List_Before_And_Analyze
(N : Node_Id; L : List_Id);
procedure Insert_List_Before_And_Analyze
(N : Node_Id; L : List_Id; Suppress : Check_Id);
-- Inserts list L before node N using Nlists.Insert_List_Before, and then,
-- after this insertion is complete, analyzes all the nodes in the list,
-- including any additional nodes generated by this analysis. If the list
-- is empty or be No_List, the call has no effect. If the Suppress
-- argument is present, then the analysis is done with the specified
-- check suppressed (can be All_Checks to suppress all checks).
procedure Insert_After_And_Analyze
(N : Node_Id; M : Node_Id);
procedure Insert_After_And_Analyze
(N : Node_Id; M : Node_Id; Suppress : Check_Id);
-- Inserts node M after node N and then after the insertion is complete,
-- analyzes the inserted node and all nodes that are generated by
-- this analysis. If the node is empty, the call has no effect. If the
-- Suppress argument is present, then the analysis is done with the
-- specified check suppressed (can be All_Checks to suppress all checks).
procedure Insert_Before_And_Analyze
(N : Node_Id; M : Node_Id);
procedure Insert_Before_And_Analyze
(N : Node_Id; M : Node_Id; Suppress : Check_Id);
-- Inserts node M before node N and then after the insertion is complete,
-- analyzes the inserted node and all nodes that could be generated by
-- this analysis. If the node is empty, the call has no effect. If the
-- Suppress argument is present, then the analysis is done with the
-- specified check suppressed (can be All_Checks to suppress all checks).
function External_Ref_In_Generic (E : Entity_Id) return Boolean;
-- Return True if we are in the context of a generic and E is
-- external (more global) to it.
procedure Enter_Generic_Scope (S : Entity_Id);
-- Shall be called each time a Generic subprogram or package scope is
-- entered. S is the entity of the scope.
-- ??? At the moment, only called for package specs because this mechanism
-- is only used for avoiding freezing of external references in generics
-- and this can only be an issue if the outer generic scope is a package
-- spec (otherwise all external entities are already frozen)
procedure Exit_Generic_Scope (S : Entity_Id);
-- Shall be called each time a Generic subprogram or package scope is
-- exited. S is the entity of the scope.
-- ??? At the moment, only called for package specs exit.
function Explicit_Suppress (E : Entity_Id; C : Check_Id) return Boolean;
-- This function returns True if an explicit pragma Suppress for check C
-- is present in the package defining E.
function Is_Check_Suppressed (E : Entity_Id; C : Check_Id) return Boolean;
-- This function is called if Checks_May_Be_Suppressed (E) is True to
-- determine whether check C is suppressed either on the entity E or
-- as the result of a scope suppress pragma. If Checks_May_Be_Suppressed
-- is False, then the status of the check can be determined simply by
-- examining Scope_Checks (C), so this routine is not called in that case.
end Sem;
|
programs/oeis/017/A017154.asm
|
neoneye/loda
| 22 |
15939
|
<filename>programs/oeis/017/A017154.asm
; A017154: a(n) = (8*n + 7)^6.
; 117649,11390625,148035889,887503681,3518743761,10779215329,27680640625,62523502209,128100283921,243087455521,433626201009,735091890625,1194052296529,1870414552161,2839760855281,4195872914689,6053445140625,8550986578849,11853911588401,16157819263041,21691961596369,28722900390625,37558352909169,48551226272641,62103840598801,78672340886049,98771297640625,122978496247489,151939915084881,186374892382561,227081481823729,274941996890625,330928743953809,396109944105121,471655843734321,558845013849409,659070838140625,773848189788129,904820297013361,1053765797374081,1222605980803089,1413412221390625,1628413597910449,1870004703089601,2140753641621841,2443410216924769,2780914306640625,3156404426880769,3573226485213841,4034942722397601,4545340842854449,5108443333890625,5728516973659089,6410082527866081,7157924635221361,7977101881632129,8872957063140625,9851127637605409,10917556365126321,12078502137213121,13340550994697809,14710627334390625,16196005304479729,17804320388674561,19543581179092881,21422181337891489,23448911747640625,25632972850442049,27983987175790801,30512012057180641,33227552537453169,36141574462890625,39265517766052369,42611309937355041,46191379685396401,50018670786022849,54106656120140625,58469351900270689,63121332085847281,68077742987260161,73354318058640529,78967392879390625,84933920324457009,91271485923347521,97998323407891921,105133330448746209,112696084580640625,120706859316371329,129186640449535761,138157142546011681,147640825624179889,157660912023890625,168241403464173649,179407098289692001,191183608905939441,203597379403181569,216675703369140625,230446741890423969,244939541742696241,260184053769595201
mul $0,8
add $0,7
pow $0,6
|
Loop Counter/count.asm
|
KyleErwin/Assembly
| 0 |
23565
|
<filename>Loop Counter/count.asm<gh_stars>0
segment .data
input: db 0
;New line string
newLine: db "\n", 0x0a
segment .text
global _start
_start:
;Get input
mov rax, 0
mov rdi, 0
mov rdx, 2
mov rsi, input
syscall
;use rcx as the counter. We set it do 0
mov rbx, 1
;start of the while loop
while:
cmp rbx, 12
jg end_while
inc rbx ;increase the counter
;output the digit
mov rax, 1
mov rdi, 1
mov rdx, 1
mov rsi, input
syscall
movzx rax, byte [input]
cmp rax, 'z'
je end_while
cmp rax, '9'
je becomeCharacter
jne increment
becomeCharacter:
add rax, 40
mov [input], rax
jmp while
increment:
;increase the input to the next consecutive value
add rax, 1
;update the varaible
mov [input], rax
;increase the input to the next consecutive value
jmp while
end_while:
;output new line
mov r8, 0x0a
mov [newLine], r8
mov rax, 1
mov rdi, 1
mov rdx, 1
mov rsi, newLine
syscall
;exit the program
mov rax, 60
xor rdi, rdi
syscall
|
library/fmGUI_Menus/fmGUI_CopySelected.applescript
|
NYHTC/applescript-fm-helper
| 1 |
1721
|
<gh_stars>1-10
-- fmGUI_CopySelected({})
-- <NAME>, NYHTC
-- Copy the selected objects in the current window in FileMaker
(*
HISTORY:
1.3.1 - 2017-11-06 ( eshagdar ): try block encompasses param declaration. added clipboardClear to helper fucntions.
1.3 - 2016-10-18 ( eshagdar ): use fmGUI_clickMenuItem handler
1.2 - 2016-10-18 ( eshagdar ): make sure the menu item is available again
1.1 - 2016-10-14 ( eshagdar ): 1.0 was looking only for script steps. now looks at non-zero length
REQUIRES:
fmGUI_AppFrontMost
fmGUI_Wait_MenuItemAvailable
*)
on run
fmGUI_CopySelected({})
end run
--------------------
-- START OF CODE
--------------------
on fmGUI_CopySelected(prefs)
-- version 1.3.1, <NAME>
try
set defaultPrefs to {}
set prefs to prefs & defaultPrefs
fmGUI_AppFrontMost()
clipboardClear() -- want clipboard to be EMPTY before we copy, so we can check for copied scripts.
tell application "System Events"
tell application process "FileMaker Pro Advanced"
set copyMenuItem to menu item "Copy" of menu 1 of menu bar item "Edit" of menu bar 1
end tell
end tell
return fmGUI_clickMenuItem({menuItemRef:copyMenuItem, waitForMenuAvailable:true})
on error errMsg number errNum
error "Couldn't fmGUI_CopySelected - " & errMsg number errNum
end try
end fmGUI_CopySelected
--------------------
-- END OF CODE
--------------------
on fmGUI_AppFrontMost()
tell application "htcLib" to fmGUI_AppFrontMost()
end fmGUI_AppFrontMost
on clipboardClear()
tell application "htcLib" to clipboardClear()
end clipboardClear
on fmGUI_clickMenuItem(prefs)
set prefs to {menuItemRef:my coerceToString(menuItemRef of prefs)} & prefs
tell application "htcLib" to fmGUI_clickMenuItem(prefs)
end fmGUI_clickMenuItem
on coerceToString(incomingObject)
-- 2017-07-12 ( eshagdar ): bootstrap code to bring a coerceToString into this file for the sample to run ( instead of having a copy of the handler locally ).
tell application "Finder" to set coercePath to (container of (container of (path to me)) as text) & "text parsing:coerceToString.applescript"
set codeCoerce to read file coercePath as text
tell application "htcLib" to set codeCoerce to "script codeCoerce " & return & getTextBetween({sourceText:codeCoerce, beforeText:"-- START OF CODE", afterText:"-- END OF CODE"}) & return & "end script" & return & "return codeCoerce"
set codeCoerce to run script codeCoerce
tell codeCoerce to coerceToString(incomingObject)
end coerceToString
|
programs/oeis/176/A176566.asm
|
neoneye/loda
| 22 |
19057
|
<gh_stars>10-100
; A176566: Triangle T(n, k) = binomial(n*(n+1)/2 + k, k), read by rows.
; 1,1,1,1,2,3,1,4,10,20,1,7,28,84,210,1,11,66,286,1001,3003,1,16,136,816,3876,15504,54264,1,22,253,2024,12650,65780,296010,1184040,1,29,435,4495,35960,237336,1344904,6724520,30260340,1,37,703,9139,91390,749398,5245786,32224114,177232627,886163135
mov $1,$0
lpb $0
sub $1,1
add $2,1
sub $0,$2
lpe
bin $1,$0
mov $0,$1
|
stm32f1/stm32gd-clock-tree.adb
|
ekoeppen/STM32_Generic_Ada_Drivers
| 1 |
5347
|
<filename>stm32f1/stm32gd-clock-tree.adb
with STM32_SVD; use STM32_SVD;
with STM32_SVD.RCC; use STM32_SVD.RCC;
with STM32_SVD.PWR; use STM32_SVD.PWR;
package body STM32GD.Clock.Tree is
function Frequency (Clock : Clock_Type) return Integer is
begin
case Clock is
when STM32GD.Clock.RTCCLK => return RTCCLK;
when STM32GD.Clock.SYSCLK => return SYSCLK;
when STM32GD.Clock.PCLK => return PCLK;
when STM32GD.Clock.HSI => return HSI_Value;
when STM32GD.Clock.LSI => return LSI_Value;
when STM32GD.Clock.LSE => return LSE_Value;
when STM32GD.Clock.PLLCLK => return PLL_Output_Value;
when STM32GD.Clock.HCLK => return HCLK;
end case;
end Frequency;
procedure Init is
begin
if LSI_Enabled then
RCC_Periph.CSR.LSION := 1;
while RCC_Periph.CSR.LSIRDY = 0 loop
null;
end loop;
end if;
if LSE_Enabled then
RCC_Periph.APB1ENR.PWREN := 1;
PWR_Periph.CR.DBP := 1;
RCC_Periph.BDCR.LSEON := 1;
while RCC_Periph.BDCR.LSERDY = 0 loop
null;
end loop;
end if;
end Init;
end STM32GD.Clock.Tree;
|
lib/am335x_sdk/ti/csl/arch/c7x/src/c7vectors_gs.asm
|
brandonbraun653/Apollo
| 2 |
82156
|
<reponame>brandonbraun653/Apollo<filename>lib/am335x_sdk/ti/csl/arch/c7x/src/c7vectors_gs.asm
;;*****************************************************************************
;; Copyright (C) 2015 Texas Instruments Incorporated - http:;;www.ti.com/
;;
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions
;; are met:
;;
;; Redistributions of source code must retain the above copyright
;; notice, this list of conditions and the following disclaimer.
;;
;; Redistributions in binary form must reproduce the above copyright
;; notice, this list of conditions and the following disclaimer in the
;; documentation and/or other materials provided with the
;; distribution.
;;
;; Neither the name of Texas Instruments Incorporated nor the names of
;; its contributors may be used to endorse or promote products derived
;; from this software without specific prior written permission.
;;
;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
;; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
;; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
;; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
;; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
;; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
;; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
;; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
;; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
;; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
;; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;;*****************************************************************************
;;*****************************************************************************
;; c7vectors_gs.asm
;;
;; Description
;; GS Event vectors for C7x Processor
;;
;;; Revision History:
;;; 01Oct15 - Initial coding
;;*****************************************************************************
;;.include "int_list.h"
.sect ".gs_vectors"
.global gs_stack_pointer
.global gs_evt_vector_table
.global gs_vector_table
.global test_end
.weak gs_curr_soft_reset_vector
.weak gs_curr_int_exp_vector
.weak gs_curr_page_fault_vector
.weak gs_curr_nme_vector
.weak gs_curr_evt_vector
.global CSL_c7x_SaveAllEABIRegs
.global CSL_c7x_RestoreAllEABIRegs
.global CSL_c7x_SaveSARegs
.global CSL_c7x_SaveSERegs
.global CSL_c7x_RestoreSARegs
.global CSL_c7x_RestoreSERegs
; // .align 0x100000
gs_vector_table:
gs_soft_reset:
MVK64 .L1 gs_curr_soft_reset_vector, A0
[A0] BA .S1 A0 ;if vector exists go there
MVK64 .L1 0x0000C0000, A0 ;load boot address
BA .S1 A0 ;branch to boot code
.align 0x200
gs_int_excp:
; // Make sure gs_curr_int_excp_vector is linked. Call gs_curr_int_excp_vector, which has user handler code
; //if gs_curr_int_excp_vector is not defined while(1)
MVK64 .L1 gs_curr_int_exp_vector , A0
[!A0] B .B1 loop_die
CALLA .S1 A0 ; // Call gs_curr_int_exp_vector
.align 0x200
gs_page_fault:
; // Make sure gs_curr_page_fault_vector is linked. Call gs_curr_page_fault_vector, which has user handler code
; //if gs_curr_page_fault_vector is not defined while(1)
MVK64 .L1 gs_curr_page_fault_vector , A0
[!A0] B .B1 loop_die
CALLA .S1 A0 ; // Call the page fault handler
.align 0x200
gs_nme:
; // Make sure gs_curr_nme_vector is linked. Call gs_curr_nme_vector, which has user handler code
; //if gs_curr_nme_vector is not defined while(1)
MVK64 .L1 gs_curr_nme_vector, A0
[!A0] B .B1 loop_die
CALLA .S1 A0 ; // Call the NME handler
.align 0x200
; //comments describing the event handler
gs_evt:
; // Save A0-A7
STD .D1 A0 , *ECSP[0x300] ;
|| STD .D2X A1 , *ECSP[0x301] ;
STD .D1 A2 , *ECSP[0x302] ;
|| STD .D2X A3 , *ECSP[0x303] ;
STD .D1 A4 , *ECSP[0x304] ;
|| STD .D2X A5 , *ECSP[0x305] ;
STD .D1 A6 , *ECSP[0x306] ;
|| STD .D2X A7 , *ECSP[0x307] ;
; //Save the current stack pointer (could be the Task's SP or could be the Handlers SP, either way,
; //we need to restore it before we return
; //Also, we're going to need VB15 in the save/restore handlers, so save it too
STD .D1 D15 , *ECSP[0x318] ; // Store D15 at a location AFTER where we store VB14, VB15. VB14, VB15 takes up 16 DWORDS in memory, so increment by 16
|| VST8D .D2 VB14 , *ECSP[0x308] ; // 0x308 is aligned to a 8 double word offset, so put VB14 at the aligned location
VST8D .D2 VB15 , *ECSP[0x310] ; // 0x310 is aligned to a 8 double word offset, so put VB15 at the aligned location
; // Save RP
MVC .S1 RP , A3 ;
STD .D1 A3 , *ECSP[0x340] ;
; // Test the TSR.HDL bit of the task we pre-empted to see if D15 is already loaded with the supervisor stack pointer
LDD .D1 *ECSP[1], A0 ; // Grab the previous TSR
SHRD .L1 A0, 3, A0 ; // HDL bit is bit 3 of TSR/ITSR
ANDD .L1 A0, 1, A0 ; // Isolate the HDL bit
[A0] B .B1 skip_gs_sp_load ; // HDL is set: skip loading of the SP
; // Load the supervisor stack pointer, and allocate 8KB of space
MVK64 .S1 gs_stack_pointer, A0 ; // Get the stack pointer's address
LDD .D1 *A0, D15 ; // Load the stack into
skip_gs_sp_load:
; // Allocate 8KB on the stack for the local variables
MVK32 .L1 0x2000, A0 ;
SUBAB .D1 D15, A0, D15 ;
; // Save all EABI registers
MVK32 .L1 16, A0 ; // EABI reserves first 16B of every stack frame for functions that are called by this function
ADDAB .D1 D15, A0, A4 ; // A4 is the first argument
MVK64 .L1 CSL_c7x_SaveAllEABIRegs, A0 ;
CALLA .S1 A0
; // Save the SA registers
; // Create a pointer to the area we want to save the SA register state too. There must be 512 bytes available
MVK32 .L1 3200, A3
ADDAB .D1 D15, A3, A4 ; // Point to the area in the stack frame reserved for these registers (512 bytes starting at offset 32 from the SP)
MVK64 .L1 CSL_c7x_SaveSARegs, A0
CALLA .S1 A0
; // Save the SE registers
; // Create a pointer to the area we want to save the SE state too. There must be 512 bytes available
MVK32 .L1 3712, A3
ADDAB .D1 D15, A3, A4 ; // Point to the area in the stack frame reserved for these registers (512 bytes starting at offset 32 from the SP)
MVK64 .L1 CSL_c7x_SaveSERegs, A0
CALLA .S1 A0
; // Make sure curr_evt_vector is linked. Call curr_evt_vector, which has user handler code that can be in C
; // Loop up the event in the registered event table and call it if it exists
MVC .S1 AHPEE , D0
|| MVK64 .L1 gs_evt_vector_table, A0
LDD .D1 *A0[D0] , A0
[A0] CALLA .S1 A0
; // Restore all EABI registers
MVK32 .L1 16, A0 ; // EABI reserves first 16B of every stack frame for functions that are called by this function
ADDAB .D1 D15, A0, A4 ; // A4 is the first argument
MVK64 .L1 CSL_c7x_RestoreAllEABIRegs, A0
CALLA .S1 A0
; // Restore the SA registers
; // Create a pointer to the area we want to save the SA register state too. There must be 512 bytes available
MVK32 .L1 3200, A3
ADDAB .D1 D15, A3, A4 ; Point to the area in the stack frame reserved for these registers (512 bytes starting at offset 32 from the SP)
MVK64 .L1 CSL_c7x_RestoreSARegs, A0
CALLA .S1 A0
; // Restore the SE registers
; // Create a pointer to the area we want to save the SE state too. There must be 512 bytes available
MVK32 .L1 3712, A3
ADDAB .D1 D15, A3, A4 ; Point to the area in the stack frame reserved for these registers (512 bytes starting at offset 32 from the SP)
MVK64 .L1 CSL_c7x_RestoreSERegs, A0
CALLA .S1 A0
; //Restore the stack pointer (could be the Task's SP or could be the Handlers SP, either way,
; //we need to restore it what it was before we return
LDD .D2 *ECSP[0x318] , D15 ;
|| VLD8D .D1 *ECSP[0x310] , VB15 ;
; // Retrieve RP
LDD .D2 *ECSP[0x340] , A0 ;
|| VLD8D .D1 *ECSP[0x308] , VB14 ;
MVC .S1 A0 , RP ;
; //Restore A2-A7
LDD .D1 *ECSP[0x302] , A2 ;
|| LDD .D2 *ECSP[0x303] , A3 ;
LDD .D1 *ECSP[0x304] , A4 ;
|| LDD .D2 *ECSP[0x305] , A5 ;
LDD .D1 *ECSP[0x306] , A6 ;
|| LDD .D2 *ECSP[0x307] , A7 ;
; // Retrieve ITSR, IRP from ECSP save area
LDD .D1 *ECSP[0x0] , A0 ;
|| LDD .D2 *ECSP[0x1] , A1 ;
; // Retrieve A0-A1 and return
LDD .D1 *ECSP[0x300] , A0 ;
|| LDD .D2 *ECSP[0x301] , A1 ;
|| RETE .S1 A0 , A1 ;
.align 0x200
loop_die:
idle
b .B1 loop_die
.align 0x200
gs_evt_vector_table:
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.global gs_evt_ecq
.sect .gs_evtecq
gs_evt_ecq:
|
src/Auto/Example/Sublists.agda
|
wenkokke/AutoInAgda
| 22 |
7415
|
open import Function using (flip; _∘_; _$_)
open import Auto.Counting
open import Data.Nat using (ℕ)
open import Data.List using (List; _∷_; [])
open import Data.Product using (∃; _,_; proj₂)
open import Data.Maybe
open import Data.Sum using (inj₁; inj₂; isInj₂)
module Auto.Example.Sublists where
infix 3 _⊆_
data _⊆_ {a} {A : Set a} : List A → List A → Set a where
stop : [] ⊆ []
drop : ∀ {xs y ys} → xs ⊆ ys → xs ⊆ y ∷ ys
keep : ∀ {x xs ys} → xs ⊆ ys → x ∷ xs ⊆ x ∷ ys
refl : ∀ {a} {A : Set a} {xs : List A} → xs ⊆ xs
refl {xs = []} = stop
refl {xs = x ∷ xs} = keep refl
trans : ∀ {a} {A : Set a} {xs ys zs : List A} → xs ⊆ ys → ys ⊆ zs → xs ⊆ zs
trans p stop = p
trans p (drop q) = drop (trans p q)
trans (drop p) (keep q) = drop (trans p q)
trans (keep p) (keep q) = keep (trans p q)
hintdb₁ : HintDB
hintdb₁ = ε << quote drop
<< quote keep
<< quote trans
lemma₁ : {ws xs ys zs : List ℕ}
→ ws ⊆ 1 ∷ xs → xs ⊆ ys → ys ⊆ zs → ws ⊆ 1 ∷ 2 ∷ zs
lemma₁ = tactic (auto dfs 10 hintdb₁)
lemma₂ : {ws xs ys zs : List ℕ}
→ ws ⊆ 1 ∷ xs → xs ⊆ ys → ys ⊆ zs → ws ⊆ 2 ∷ zs
lemma₂ = tactic (auto dfs 10 hintdb₁)
{-
db₂ : HintDB
db₂ = ε << quote trans
<< quote keep
<< quote drop
test₂ : {A : Set} {ws xs ys zs : List A} → ws ⊆ xs → ys ⊆ zs → ws ⊆ zs
test₂ = tactic (auto dfs 10 db₁)
-}
|
library/02_functions_batch1/unknown_1000408e.asm
|
SamantazFox/dds140-reverse-engineering
| 1 |
163108
|
<filename>library/02_functions_batch1/unknown_1000408e.asm<gh_stars>1-10
1000408e: 39 45 08 cmp DWORD PTR [ebp+0x8],eax
10004091: 77 09 ja 0x1000409c
10004093: e8 ae 09 00 00 call 0x10004a46
100038d0: 83 3d f8 5d 01 10 00 cmp DWORD PTR ds:0x10015df8,0x0
100038d7: 74 2d je 0x10003906
100038d9: 55 push ebp
100038da: 8b ec mov ebp,esp
100038dc: 83 ec 08 sub esp,0x8
100038df: 83 e4 f8 and esp,0xfffffff8
100038e2: dd 1c 24 fstp QWORD PTR [esp]
100038e5: f2 0f 2c 04 24 cvttsd2si eax,QWORD PTR [esp]
100038ea: c9 leave
100038eb: c3 ret
100038ec: 83 3d f8 5d 01 10 00 cmp DWORD PTR ds:0x10015df8,0x0
100038f3: 74 11 je 0x10003906
100038f5: 83 ec 04 sub esp,0x4
100038f8: d9 3c 24 fnstcw WORD PTR [esp]
100038fb: 58 pop eax
100038fc: 66 83 e0 7f and ax,0x7f
10003900: 66 83 f8 7f cmp ax,0x7f
10003904: 74 d3 je 0x100038d9
10003906: 55 push ebp
10003907: 8b ec mov ebp,esp
10003909: 83 ec 20 sub esp,0x20
1000390c: 83 e4 f0 and esp,0xfffffff0
1000390f: d9 c0 fld st(0)
10003911: d9 54 24 18 fst DWORD PTR [esp+0x18]
10003915: df 7c 24 10 fistp QWORD PTR [esp+0x10]
10003919: df 6c 24 10 fild QWORD PTR [esp+0x10]
1000391d: 8b 54 24 18 mov edx,DWORD PTR [esp+0x18]
10003921: 8b 44 24 10 mov eax,DWORD PTR [esp+0x10]
10003925: 85 c0 test eax,eax
10003927: 74 3c je 0x10003965
10003929: de e9 fsubrp st(1),st
1000392b: 85 d2 test edx,edx
1000392d: 79 1e jns 0x1000394d
1000392f: d9 1c 24 fstp DWORD PTR [esp]
10003932: 8b 0c 24 mov ecx,DWORD PTR [esp]
10003935: 81 f1 00 00 00 80 xor ecx,0x80000000
1000393b: 81 c1 ff ff ff 7f add ecx,0x7fffffff
10003941: 83 d0 00 adc eax,0x0
10003944: 8b 54 24 14 mov edx,DWORD PTR [esp+0x14]
10003948: 83 d2 00 adc edx,0x0
1000394b: eb 2c jmp 0x10003979
1000394d: d9 1c 24 fstp DWORD PTR [esp]
10003950: 8b 0c 24 mov ecx,DWORD PTR [esp]
10003953: 81 c1 ff ff ff 7f add ecx,0x7fffffff
10003959: 83 d8 00 sbb eax,0x0
1000395c: 8b 54 24 14 mov edx,DWORD PTR [esp+0x14]
10003960: 83 da 00 sbb edx,0x0
10003963: eb 14 jmp 0x10003979
10003965: 8b 54 24 14 mov edx,DWORD PTR [esp+0x14]
10003969: f7 c2 ff ff ff 7f test edx,0x7fffffff
1000396f: 75 b8 jne 0x10003929
10003971: d9 5c 24 18 fstp DWORD PTR [esp+0x18]
10003975: d9 5c 24 18 fstp DWORD PTR [esp+0x18]
10003979: c9 leave
1000397a: c3 ret
1000397b: 6a 0c push 0xc
1000397d: 68 c0 e3 00 10 push 0x1000e3c0
10003982: e8 a1 1e 00 00 call 0x10005828
10003987: 8b 75 08 mov esi,DWORD PTR [ebp+0x8]
1000398a: 85 f6 test esi,esi
1000398c: 74 75 je 0x10003a03
1000398e: 83 3d f0 5d 01 10 03 cmp DWORD PTR ds:0x10015df0,0x3
10003995: 75 43 jne 0x100039da
10003997: 6a 04 push 0x4
10003999: e8 5a 13 00 00 call 0x10004cf8
1000399e: 59 pop ecx
1000399f: 83 65 fc 00 and DWORD PTR [ebp-0x4],0x0
100039a3: 56 push esi
100039a4: e8 c8 13 00 00 call 0x10004d71
100039a9: 59 pop ecx
100039aa: 89 45 e4 mov DWORD PTR [ebp-0x1c],eax
100039ad: 85 c0 test eax,eax
100039af: 74 09 je 0x100039ba
100039b1: 56 push esi
100039b2: 50 push eax
100039b3: e8 e4 13 00 00 call 0x10004d9c
100039b8: 59 pop ecx
100039b9: 59 pop ecx
100039ba: c7 45 fc fe ff ff ff mov DWORD PTR [ebp-0x4],0xfffffffe
100039c1: e8 0b 00 00 00 call 0x100039d1
100039c6: 83 7d e4 00 cmp DWORD PTR [ebp-0x1c],0x0
100039ca: 75 37 jne 0x10003a03
100039cc: ff 75 08 push DWORD PTR [ebp+0x8]
100039cf: eb 0a jmp 0x100039db
100039d1: 6a 04 push 0x4
100039d3: e8 48 12 00 00 call 0x10004c20
100039d8: 59 pop ecx
100039d9: c3 ret
100039da: 56 push esi
100039db: 6a 00 push 0x0
100039dd: ff 35 4c 52 01 10 push DWORD PTR ds:0x1001524c
100039e3: ff 15 34 d0 00 10 call DWORD PTR ds:0x1000d034
100039e9: 85 c0 test eax,eax
100039eb: 75 16 jne 0x10003a03
100039ed: e8 54 10 00 00 call 0x10004a46
100039f2: 8b f0 mov esi,eax
100039f4: ff 15 1c d0 00 10 call DWORD PTR ds:0x1000d01c
100039fa: 50 push eax
100039fb: e8 0b 10 00 00 call 0x10004a0b
10003a00: 89 06 mov DWORD PTR [esi],eax
10003a02: 59 pop ecx
10003a03: e8 65 1e 00 00 call 0x1000586d
10003a08: c3 ret
10003a09: 6a 0c push 0xc
10003a0b: 68 e0 e3 00 10 push 0x1000e3e0
10003a10: e8 13 1e 00 00 call 0x10005828
10003a15: 83 65 e4 00 and DWORD PTR [ebp-0x1c],0x0
10003a19: 8b 75 08 mov esi,DWORD PTR [ebp+0x8]
10003a1c: 3b 35 e0 5d 01 10 cmp esi,DWORD PTR ds:0x10015de0
10003a22: 77 22 ja 0x10003a46
10003a24: 6a 04 push 0x4
10003a26: e8 cd 12 00 00 call 0x10004cf8
10003a2b: 59 pop ecx
10003a2c: 83 65 fc 00 and DWORD PTR [ebp-0x4],0x0
10003a30: 56 push esi
10003a31: e8 0f 1b 00 00 call 0x10005545
10003a36: 59 pop ecx
10003a37: 89 45 e4 mov DWORD PTR [ebp-0x1c],eax
10003a3a: c7 45 fc fe ff ff ff mov DWORD PTR [ebp-0x4],0xfffffffe
10003a41: e8 09 00 00 00 call 0x10003a4f
10003a46: 8b 45 e4 mov eax,DWORD PTR [ebp-0x1c]
10003a49: e8 1f 1e 00 00 call 0x1000586d
10003a4e: c3 ret
10003a4f: 6a 04 push 0x4
10003a51: e8 ca 11 00 00 call 0x10004c20
10003a56: 59 pop ecx
10003a57: c3 ret
10003a58: 55 push ebp
10003a59: 8b 6c 24 08 mov ebp,DWORD PTR [esp+0x8]
10003a5d: 83 fd e0 cmp ebp,0xffffffe0
10003a60: 0f 87 9f 00 00 00 ja 0x10003b05
10003a66: 53 push ebx
10003a67: 8b 1d 38 d0 00 10 mov ebx,DWORD PTR ds:0x1000d038
10003a6d: 56 push esi
10003a6e: 57 push edi
10003a6f: 33 f6 xor esi,esi
10003a71: 39 35 4c 52 01 10 cmp DWORD PTR ds:0x1001524c,esi
10003a77: 8b fd mov edi,ebp
10003a79: 75 18 jne 0x10003a93
10003a7b: e8 42 24 00 00 call 0x10005ec2
10003a80: 6a 1e push 0x1e
10003a82: e8 9b 22 00 00 call 0x10005d22
10003a87: 68 ff 00 00 00 push 0xff
10003a8c: e8 df 1f 00 00 call 0x10005a70
10003a91: 59 pop ecx
10003a92: 59 pop ecx
10003a93: a1 f0 5d 01 10 mov eax,ds:0x10015df0
10003a98: 83 f8 01 cmp eax,0x1
10003a9b: 75 0e jne 0x10003aab
10003a9d: 3b ee cmp ebp,esi
10003a9f: 74 04 je 0x10003aa5
10003aa1: 8b c5 mov eax,ebp
10003aa3: eb 03 jmp 0x10003aa8
10003aa5: 33 c0 xor eax,eax
10003aa7: 40 inc eax
10003aa8: 50 push eax
10003aa9: eb 1e jmp 0x10003ac9
10003aab: 83 f8 03 cmp eax,0x3
10003aae: 75 0b jne 0x10003abb
10003ab0: 55 push ebp
10003ab1: e8 53 ff ff ff call 0x10003a09
10003ab6: 3b c6 cmp eax,esi
10003ab8: 59 pop ecx
10003ab9: 75 17 jne 0x10003ad2
10003abb: 3b ee cmp ebp,esi
10003abd: 75 03 jne 0x10003ac2
10003abf: 33 ff xor edi,edi
10003ac1: 47 inc edi
10003ac2: 83 c7 0f add edi,0xf
10003ac5: 83 e7 f0 and edi,0xfffffff0
10003ac8: 57 push edi
10003ac9: 56 push esi
10003aca: ff 35 4c 52 01 10 push DWORD PTR ds:0x1001524c
10003ad0: ff d3 call ebx
10003ad2: 8b f0 mov esi,eax
10003ad4: 85 f6 test esi,esi
10003ad6: 75 26 jne 0x10003afe
10003ad8: 39 05 08 57 01 10 cmp DWORD PTR ds:0x10015708,eax
10003ade: 6a 0c push 0xc
10003ae0: 5f pop edi
10003ae1: 74 0d je 0x10003af0
10003ae3: 55 push ebp
10003ae4: e8 1c 24 00 00 call 0x10005f05
10003ae9: 85 c0 test eax,eax
10003aeb: 59 pop ecx
10003aec: 75 81 jne 0x10003a6f
10003aee: eb 07 jmp 0x10003af7
10003af0: e8 51 0f 00 00 call 0x10004a46
10003af5: 89 38 mov DWORD PTR [eax],edi
10003af7: e8 4a 0f 00 00 call 0x10004a46
10003afc: 89 38 mov DWORD PTR [eax],edi
10003afe: 5f pop edi
10003aff: 8b c6 mov eax,esi
10003b01: 5e pop esi
10003b02: 5b pop ebx
10003b03: 5d pop ebp
10003b04: c3 ret
10003b05: 55 push ebp
10003b06: e8 fa 23 00 00 call 0x10005f05
10003b0b: 59 pop ecx
10003b0c: e8 35 0f 00 00 call 0x10004a46
10003b11: c7 00 0c 00 00 00 mov DWORD PTR [eax],0xc
10003b17: 33 c0 xor eax,eax
10003b19: 5d pop ebp
10003b1a: c3 ret
10003b1b: 3b 0d 10 00 01 10 cmp ecx,DWORD PTR ds:0x10010010
10003b21: 75 02 jne 0x10003b25
10003b23: f3 c3 repz ret
10003b25: e9 fd 23 00 00 jmp 0x10005f27
10003b2a: 55 push ebp
10003b2b: 8b ec mov ebp,esp
10003b2d: 51 push ecx
10003b2e: 8b 45 0c mov eax,DWORD PTR [ebp+0xc]
10003b31: 83 f8 01 cmp eax,0x1
10003b34: 53 push ebx
10003b35: 56 push esi
10003b36: 57 push edi
10003b37: 0f 85 17 01 00 00 jne 0x10003c54
10003b3d: 8b 1d 48 d0 00 10 mov ebx,DWORD PTR ds:0x1000d048
10003b43: bf 94 00 00 00 mov edi,0x94
10003b48: 57 push edi
10003b49: 6a 00 push 0x0
10003b4b: ff d3 call ebx
10003b4d: 50 push eax
10003b4e: ff 15 38 d0 00 10 call DWORD PTR ds:0x1000d038
10003b54: 8b f0 mov esi,eax
10003b56: 85 f6 test esi,esi
10003b58: 75 07 jne 0x10003b61
10003b5a: 33 c0 xor eax,eax
10003b5c: e9 9b 01 00 00 jmp 0x10003cfc
10003b61: 56 push esi
10003b62: 89 3e mov DWORD PTR [esi],edi
10003b64: ff 15 44 d0 00 10 call DWORD PTR ds:0x1000d044
10003b6a: 85 c0 test eax,eax
10003b6c: 56 push esi
10003b6d: 6a 00 push 0x0
10003b6f: 75 0b jne 0x10003b7c
10003b71: ff d3 call ebx
10003b73: 50 push eax
10003b74: ff 15 34 d0 00 10 call DWORD PTR ds:0x1000d034
10003b7a: eb de jmp 0x10003b5a
10003b7c: 8b 46 10 mov eax,DWORD PTR [esi+0x10]
10003b7f: 8b 7e 0c mov edi,DWORD PTR [esi+0xc]
10003b82: 89 45 0c mov DWORD PTR [ebp+0xc],eax
10003b85: 8b 46 04 mov eax,DWORD PTR [esi+0x4]
10003b88: 89 45 10 mov DWORD PTR [ebp+0x10],eax
10003b8b: 8b 46 08 mov eax,DWORD PTR [esi+0x8]
10003b8e: 89 45 fc mov DWORD PTR [ebp-0x4],eax
10003b91: 81 e7 ff 7f 00 00 and edi,0x7fff
10003b97: ff d3 call ebx
10003b99: 50 push eax
10003b9a: ff 15 34 d0 00 10 call DWORD PTR ds:0x1000d034
10003ba0: 8b 45 0c mov eax,DWORD PTR [ebp+0xc]
10003ba3: 83 f8 02 cmp eax,0x2
10003ba6: 74 06 je 0x10003bae
10003ba8: 81 cf 00 80 00 00 or edi,0x8000
10003bae: 8b 4d fc mov ecx,DWORD PTR [ebp-0x4]
10003bb1: a3 a8 53 01 10 mov ds:0x100153a8,eax
10003bb6: 8b 45 10 mov eax,DWORD PTR [ebp+0x10]
10003bb9: 8b d0 mov edx,eax
10003bbb: c1 e2 08 shl edx,0x8
10003bbe: 03 d1 add edx,ecx
10003bc0: 6a 01 push 0x1
10003bc2: 89 15 b0 53 01 10 mov DWORD PTR ds:0x100153b0,edx
10003bc8: a3 b4 53 01 10 mov ds:0x100153b4,eax
10003bcd: 89 0d b8 53 01 10 mov DWORD PTR ds:0x100153b8,ecx
10003bd3: 89 3d ac 53 01 10 mov DWORD PTR ds:0x100153ac,edi
10003bd9: e8 d6 0e 00 00 call 0x10004ab4
10003bde: 85 c0 test eax,eax
10003be0: 59 pop ecx
10003be1: 0f 84 73 ff ff ff je 0x10003b5a
10003be7: e8 e0 28 00 00 call 0x100064cc
10003bec: 85 c0 test eax,eax
10003bee: 75 0a jne 0x10003bfa
10003bf0: e8 19 0f 00 00 call 0x10004b0e
10003bf5: e9 60 ff ff ff jmp 0x10003b5a
10003bfa: e8 25 32 00 00 call 0x10006e24
10003bff: ff 15 40 d0 00 10 call DWORD PTR ds:0x1000d040
10003c05: a3 fc 5d 01 10 mov ds:0x10015dfc,eax
10003c0a: e8 e0 30 00 00 call 0x10006cef
10003c0f: a3 3c 52 01 10 mov ds:0x1001523c,eax
10003c14: e8 0a 2b 00 00 call 0x10006723
10003c19: 85 c0 test eax,eax
10003c1b: 7d 07 jge 0x10003c24
10003c1d: e8 95 25 00 00 call 0x100061b7
10003c22: eb cc jmp 0x10003bf0
10003c24: e8 0d 30 00 00 call 0x10006c36
10003c29: 85 c0 test eax,eax
10003c2b: 7c 20 jl 0x10003c4d
10003c2d: e8 91 2d 00 00 call 0x100069c3
10003c32: 85 c0 test eax,eax
10003c34: 7c 17 jl 0x10003c4d
10003c36: 6a 00 push 0x0
10003c38: e8 05 1f 00 00 call 0x10005b42
10003c3d: 85 c0 test eax,eax
10003c3f: 59 pop ecx
10003c40: 75 0b jne 0x10003c4d
10003c42: ff 05 38 52 01 10 inc DWORD PTR ds:0x10015238
10003c48: e9 ac 00 00 00 jmp 0x10003cf9
10003c4d: e8 25 2d 00 00 call 0x10006977
10003c52: eb c9 jmp 0x10003c1d
10003c54: 33 ff xor edi,edi
10003c56: 3b c7 cmp eax,edi
10003c58: 75 35 jne 0x10003c8f
10003c5a: 39 3d 38 52 01 10 cmp DWORD PTR ds:0x10015238,edi
10003c60: 0f 8e f4 fe ff ff jle 0x10003b5a
10003c66: ff 0d 38 52 01 10 dec DWORD PTR ds:0x10015238
10003c6c: 39 3d e4 53 01 10 cmp DWORD PTR ds:0x100153e4,edi
10003c72: 75 05 jne 0x10003c79
10003c74: e8 4e 20 00 00 call 0x10005cc7
10003c79: 39 7d 10 cmp DWORD PTR [ebp+0x10],edi
10003c7c: 75 7b jne 0x10003cf9
10003c7e: e8 f4 2c 00 00 call 0x10006977
10003c83: e8 2f 25 00 00 call 0x100061b7
10003c88: e8 81 0e 00 00 call 0x10004b0e
10003c8d: eb 6a jmp 0x10003cf9
10003c8f: 83 f8 02 cmp eax,0x2
10003c92: 75 59 jne 0x10003ced
10003c94: e8 ec 24 00 00 call 0x10006185
10003c99: 68 14 02 00 00 push 0x214
10003c9e: 6a 01 push 0x1
10003ca0: e8 eb 29 00 00 call 0x10006690
10003ca5: 8b f0 mov esi,eax
10003ca7: 3b f7 cmp esi,edi
10003ca9: 59 pop ecx
10003caa: 59 pop ecx
10003cab: 0f 84 a9 fe ff ff je 0x10003b5a
10003cb1: 56 push esi
10003cb2: ff 35 98 03 01 10 push DWORD PTR ds:0x10010398
10003cb8: ff 35 3c 5a 01 10 push DWORD PTR ds:0x10015a3c
10003cbe: e8 4b 24 00 00 call 0x1000610e
10003cc3: 59 pop ecx
10003cc4: ff d0 call eax
10003cc6: 85 c0 test eax,eax
10003cc8: 74 17 je 0x10003ce1
10003cca: 57 push edi
10003ccb: 56 push esi
10003ccc: e8 23 25 00 00 call 0x100061f4
10003cd1: 59 pop ecx
10003cd2: 59 pop ecx
10003cd3: ff 15 3c d0 00 10 call DWORD PTR ds:0x1000d03c
10003cd9: 83 4e 04 ff or DWORD PTR [esi+0x4],0xffffffff
10003cdd: 89 06 mov DWORD PTR [esi],eax
10003cdf: eb 18 jmp 0x10003cf9
10003ce1: 56 push esi
10003ce2: e8 94 fc ff ff call 0x1000397b
10003ce7: 59 pop ecx
10003ce8: e9 6d fe ff ff jmp 0x10003b5a
10003ced: 83 f8 03 cmp eax,0x3
10003cf0: 75 07 jne 0x10003cf9
10003cf2: 57 push edi
10003cf3: e8 6b 27 00 00 call 0x10006463
10003cf8: 59 pop ecx
10003cf9: 33 c0 xor eax,eax
10003cfb: 40 inc eax
10003cfc: 5f pop edi
10003cfd: 5e pop esi
10003cfe: 5b pop ebx
10003cff: c9 leave
10003d00: c2 0c 00 ret 0xc
10003d03: 6a 0c push 0xc
10003d05: 68 00 e4 00 10 push 0x1000e400
10003d0a: e8 19 1b 00 00 call 0x10005828
10003d0f: 8b f9 mov edi,ecx
10003d11: 8b f2 mov esi,edx
10003d13: 8b 5d 08 mov ebx,DWORD PTR [ebp+0x8]
10003d16: 33 c0 xor eax,eax
10003d18: 40 inc eax
10003d19: 89 45 e4 mov DWORD PTR [ebp-0x1c],eax
10003d1c: 85 f6 test esi,esi
10003d1e: 75 0c jne 0x10003d2c
10003d20: 39 15 38 52 01 10 cmp DWORD PTR ds:0x10015238,edx
10003d26: 0f 84 c5 00 00 00 je 0x10003df1
10003d2c: 83 65 fc 00 and DWORD PTR [ebp-0x4],0x0
10003d30: 3b f0 cmp esi,eax
10003d32: 74 05 je 0x10003d39
10003d34: 83 fe 02 cmp esi,0x2
10003d37: 75 2e jne 0x10003d67
10003d39: a1 fc d1 00 10 mov eax,ds:0x1000d1fc
10003d3e: 85 c0 test eax,eax
10003d40: 74 08 je 0x10003d4a
10003d42: 57 push edi
10003d43: 56 push esi
10003d44: 53 push ebx
10003d45: ff d0 call eax
10003d47: 89 45 e4 mov DWORD PTR [ebp-0x1c],eax
10003d4a: 83 7d e4 00 cmp DWORD PTR [ebp-0x1c],0x0
10003d4e: 0f 84 96 00 00 00 je 0x10003dea
10003d54: 57 push edi
10003d55: 56 push esi
10003d56: 53 push ebx
10003d57: e8 ce fd ff ff call 0x10003b2a
10003d5c: 89 45 e4 mov DWORD PTR [ebp-0x1c],eax
10003d5f: 85 c0 test eax,eax
10003d61: 0f 84 83 00 00 00 je 0x10003dea
10003d67: 57 push edi
10003d68: 56 push esi
10003d69: 53 push ebx
10003d6a: e8 91 d2 ff ff call 0x10001000
10003d6f: 89 45 e4 mov DWORD PTR [ebp-0x1c],eax
10003d72: 83 fe 01 cmp esi,0x1
10003d75: 75 24 jne 0x10003d9b
10003d77: 85 c0 test eax,eax
10003d79: 75 20 jne 0x10003d9b
10003d7b: 57 push edi
10003d7c: 50 push eax
10003d7d: 53 push ebx
10003d7e: e8 7d d2 ff ff call 0x10001000
10003d83: 57 push edi
10003d84: 6a 00 push 0x0
10003d86: 53 push ebx
10003d87: e8 9e fd ff ff call 0x10003b2a
10003d8c: a1 fc d1 00 10 mov eax,ds:0x1000d1fc
10003d91: 85 c0 test eax,eax
10003d93: 74 06 je 0x10003d9b
10003d95: 57 push edi
10003d96: 6a 00 push 0x0
10003d98: 53 push ebx
10003d99: ff d0 call eax
10003d9b: 85 f6 test esi,esi
10003d9d: 74 05 je 0x10003da4
10003d9f: 83 fe 03 cmp esi,0x3
10003da2: 75 26 jne 0x10003dca
10003da4: 57 push edi
10003da5: 56 push esi
10003da6: 53 push ebx
10003da7: e8 7e fd ff ff call 0x10003b2a
10003dac: 85 c0 test eax,eax
10003dae: 75 03 jne 0x10003db3
10003db0: 21 45 e4 and DWORD PTR [ebp-0x1c],eax
10003db3: 83 7d e4 00 cmp DWORD PTR [ebp-0x1c],0x0
10003db7: 74 11 je 0x10003dca
10003db9: a1 fc d1 00 10 mov eax,ds:0x1000d1fc
10003dbe: 85 c0 test eax,eax
10003dc0: 74 08 je 0x10003dca
10003dc2: 57 push edi
10003dc3: 56 push esi
10003dc4: 53 push ebx
10003dc5: ff d0 call eax
10003dc7: 89 45 e4 mov DWORD PTR [ebp-0x1c],eax
10003dca: c7 45 fc fe ff ff ff mov DWORD PTR [ebp-0x4],0xfffffffe
10003dd1: 8b 45 e4 mov eax,DWORD PTR [ebp-0x1c]
10003dd4: eb 1d jmp 0x10003df3
10003dd6: 8b 45 ec mov eax,DWORD PTR [ebp-0x14]
10003dd9: 8b 08 mov ecx,DWORD PTR [eax]
10003ddb: 8b 09 mov ecx,DWORD PTR [ecx]
10003ddd: 50 push eax
10003dde: 51 push ecx
10003ddf: e8 e6 31 00 00 call 0x10006fca
10003de4: 59 pop ecx
10003de5: 59 pop ecx
10003de6: c3 ret
10003de7: 8b 65 e8 mov esp,DWORD PTR [ebp-0x18]
10003dea: c7 45 fc fe ff ff ff mov DWORD PTR [ebp-0x4],0xfffffffe
10003df1: 33 c0 xor eax,eax
10003df3: e8 75 1a 00 00 call 0x1000586d
10003df8: c3 ret
10003df9: 83 7c 24 08 01 cmp DWORD PTR [esp+0x8],0x1
10003dfe: 75 05 jne 0x10003e05
10003e00: e8 e0 31 00 00 call 0x10006fe5
10003e05: ff 74 24 04 push DWORD PTR [esp+0x4]
10003e09: 8b 4c 24 10 mov ecx,DWORD PTR [esp+0x10]
10003e0d: 8b 54 24 0c mov edx,DWORD PTR [esp+0xc]
10003e11: e8 ed fe ff ff call 0x10003d03
10003e16: 59 pop ecx
10003e17: c2 0c 00 ret 0xc
10003e1a: 8b 44 24 04 mov eax,DWORD PTR [esp+0x4]
10003e1e: 85 c0 test eax,eax
10003e20: 56 push esi
10003e21: 8b f1 mov esi,ecx
10003e23: c6 46 0c 00 mov BYTE PTR [esi+0xc],0x0
10003e27: 75 63 jne 0x10003e8c
10003e29: e8 fc 24 00 00 call 0x1000632a
10003e2e: 89 46 08 mov DWORD PTR [esi+0x8],eax
10003e31: 8b 48 6c mov ecx,DWORD PTR [eax+0x6c]
10003e34: 89 0e mov DWORD PTR [esi],ecx
10003e36: 8b 48 68 mov ecx,DWORD PTR [eax+0x68]
10003e39: 89 4e 04 mov DWORD PTR [esi+0x4],ecx
10003e3c: 8b 0e mov ecx,DWORD PTR [esi]
10003e3e: 3b 0d 78 0a 01 10 cmp ecx,DWORD PTR ds:0x10010a78
10003e44: 74 12 je 0x10003e58
10003e46: 8b 0d 94 09 01 10 mov ecx,DWORD PTR ds:0x10010994
10003e4c: 85 48 70 test DWORD PTR [eax+0x70],ecx
10003e4f: 75 07 jne 0x10003e58
10003e51: e8 a4 3b 00 00 call 0x100079fa
10003e56: 89 06 mov DWORD PTR [esi],eax
10003e58: 8b 46 04 mov eax,DWORD PTR [esi+0x4]
10003e5b: 3b 05 98 08 01 10 cmp eax,DWORD PTR ds:0x10010898
10003e61: 74 16 je 0x10003e79
10003e63: 8b 46 08 mov eax,DWORD PTR [esi+0x8]
10003e66: 8b 0d 94 09 01 10 mov ecx,DWORD PTR ds:0x10010994
10003e6c: 85 48 70 test DWORD PTR [eax+0x70],ecx
10003e6f: 75 08 jne 0x10003e79
10003e71: e8 45 34 00 00 call 0x100072bb
10003e76: 89 46 04 mov DWORD PTR [esi+0x4],eax
10003e79: 8b 46 08 mov eax,DWORD PTR [esi+0x8]
10003e7c: f6 40 70 02 test BYTE PTR [eax+0x70],0x2
10003e80: 75 14 jne 0x10003e96
10003e82: 83 48 70 02 or DWORD PTR [eax+0x70],0x2
10003e86: c6 46 0c 01 mov BYTE PTR [esi+0xc],0x1
10003e8a: eb 0a jmp 0x10003e96
10003e8c: 8b 08 mov ecx,DWORD PTR [eax]
10003e8e: 89 0e mov DWORD PTR [esi],ecx
10003e90: 8b 40 04 mov eax,DWORD PTR [eax+0x4]
10003e93: 89 46 04 mov DWORD PTR [esi+0x4],eax
10003e96: 8b c6 mov eax,esi
10003e98: 5e pop esi
10003e99: c2 04 00 ret 0x4
10003e9c: 55 push ebp
10003e9d: 8b ec mov ebp,esp
10003e9f: 83 ec 10 sub esp,0x10
10003ea2: 56 push esi
10003ea3: ff 75 0c push DWORD PTR [ebp+0xc]
10003ea6: 8d 4d f0 lea ecx,[ebp-0x10]
10003ea9: e8 6c ff ff ff call 0x10003e1a
10003eae: 8b 75 08 mov esi,DWORD PTR [ebp+0x8]
10003eb1: 0f be 06 movsx eax,BYTE PTR [esi]
10003eb4: 50 push eax
10003eb5: e8 6f 3e 00 00 call 0x10007d29
10003eba: 83 f8 65 cmp eax,0x65
10003ebd: eb 0c jmp 0x10003ecb
10003ebf: 46 inc esi
10003ec0: 0f b6 06 movzx eax,BYTE PTR [esi]
10003ec3: 50 push eax
10003ec4: e8 20 3d 00 00 call 0x10007be9
10003ec9: 85 c0 test eax,eax
10003ecb: 59 pop ecx
10003ecc: 75 f1 jne 0x10003ebf
10003ece: 0f be 06 movsx eax,BYTE PTR [esi]
10003ed1: 50 push eax
10003ed2: e8 52 3e 00 00 call 0x10007d29
10003ed7: 83 f8 78 cmp eax,0x78
10003eda: 59 pop ecx
10003edb: 75 02 jne 0x10003edf
10003edd: 46 inc esi
10003ede: 46 inc esi
10003edf: 8b 4d f0 mov ecx,DWORD PTR [ebp-0x10]
10003ee2: 8b 89 bc 00 00 00 mov ecx,DWORD PTR [ecx+0xbc]
10003ee8: 8b 09 mov ecx,DWORD PTR [ecx]
10003eea: 8a 06 mov al,BYTE PTR [esi]
10003eec: 8a 09 mov cl,BYTE PTR [ecx]
10003eee: 88 0e mov BYTE PTR [esi],cl
10003ef0: 46 inc esi
10003ef1: 8a 0e mov cl,BYTE PTR [esi]
10003ef3: 88 06 mov BYTE PTR [esi],al
10003ef5: 8a c1 mov al,cl
10003ef7: 8a 0e mov cl,BYTE PTR [esi]
10003ef9: 46 inc esi
10003efa: 84 c9 test cl,cl
10003efc: 75 f3 jne 0x10003ef1
10003efe: 38 4d fc cmp BYTE PTR [ebp-0x4],cl
10003f01: 5e pop esi
10003f02: 74 07 je 0x10003f0b
10003f04: 8b 45 f8 mov eax,DWORD PTR [ebp-0x8]
10003f07: 83 60 70 fd and DWORD PTR [eax+0x70],0xfffffffd
10003f0b: c9 leave
10003f0c: c3 ret
10003f0d: 55 push ebp
10003f0e: 8b ec mov ebp,esp
10003f10: 83 ec 10 sub esp,0x10
10003f13: 56 push esi
10003f14: ff 75 0c push DWORD PTR [ebp+0xc]
10003f17: 8d 4d f0 lea ecx,[ebp-0x10]
10003f1a: e8 fb fe ff ff call 0x10003e1a
10003f1f: 8b 45 08 mov eax,DWORD PTR [ebp+0x8]
10003f22: 8a 08 mov cl,BYTE PTR [eax]
10003f24: 84 c9 test cl,cl
10003f26: 8b 75 f0 mov esi,DWORD PTR [ebp-0x10]
10003f29: 74 15 je 0x10003f40
10003f2b: 8b 96 bc 00 00 00 mov edx,DWORD PTR [esi+0xbc]
10003f31: 8b 12 mov edx,DWORD PTR [edx]
10003f33: 8a 12 mov dl,BYTE PTR [edx]
10003f35: 3a ca cmp cl,dl
10003f37: 74 07 je 0x10003f40
10003f39: 40 inc eax
10003f3a: 8a 08 mov cl,BYTE PTR [eax]
10003f3c: 84 c9 test cl,cl
10003f3e: 75 f5 jne 0x10003f35
10003f40: 8a 08 mov cl,BYTE PTR [eax]
10003f42: 40 inc eax
10003f43: 84 c9 test cl,cl
10003f45: 74 36 je 0x10003f7d
10003f47: eb 0b jmp 0x10003f54
10003f49: 80 f9 65 cmp cl,0x65
10003f4c: 74 0c je 0x10003f5a
10003f4e: 80 f9 45 cmp cl,0x45
10003f51: 74 07 je 0x10003f5a
10003f53: 40 inc eax
10003f54: 8a 08 mov cl,BYTE PTR [eax]
10003f56: 84 c9 test cl,cl
10003f58: 75 ef jne 0x10003f49
10003f5a: 8b d0 mov edx,eax
10003f5c: 48 dec eax
10003f5d: 80 38 30 cmp BYTE PTR [eax],0x30
10003f60: 74 fa je 0x10003f5c
10003f62: 8b 8e bc 00 00 00 mov ecx,DWORD PTR [esi+0xbc]
10003f68: 8b 09 mov ecx,DWORD PTR [ecx]
10003f6a: 53 push ebx
10003f6b: 8a 18 mov bl,BYTE PTR [eax]
10003f6d: 3a 19 cmp bl,BYTE PTR [ecx]
10003f6f: 5b pop ebx
10003f70: 75 01 jne 0x10003f73
10003f72: 48 dec eax
10003f73: 8a 0a mov cl,BYTE PTR [edx]
10003f75: 40 inc eax
10003f76: 42 inc edx
10003f77: 84 c9 test cl,cl
10003f79: 88 08 mov BYTE PTR [eax],cl
10003f7b: 75 f6 jne 0x10003f73
10003f7d: 80 7d fc 00 cmp BYTE PTR [ebp-0x4],0x0
10003f81: 5e pop esi
10003f82: 74 07 je 0x10003f8b
10003f84: 8b 45 f8 mov eax,DWORD PTR [ebp-0x8]
10003f87: 83 60 70 fd and DWORD PTR [eax+0x70],0xfffffffd
10003f8b: c9 leave
10003f8c: c3 ret
10003f8d: d9 ee fldz
10003f8f: 8b 44 24 04 mov eax,DWORD PTR [esp+0x4]
10003f93: dc 18 fcomp QWORD PTR [eax]
10003f95: df e0 fnstsw ax
10003f97: f6 c4 41 test ah,0x41
10003f9a: 7a 04 jp 0x10003fa0
10003f9c: 33 c0 xor eax,eax
10003f9e: 40 inc eax
10003f9f: c3 ret
10003fa0: 33 c0 xor eax,eax
10003fa2: c3 ret
10003fa3: 55 push ebp
10003fa4: 8b ec mov ebp,esp
10003fa6: 51 push ecx
10003fa7: 51 push ecx
10003fa8: 83 7d 08 00 cmp DWORD PTR [ebp+0x8],0x0
10003fac: ff 75 14 push DWORD PTR [ebp+0x14]
10003faf: ff 75 10 push DWORD PTR [ebp+0x10]
10003fb2: 74 19 je 0x10003fcd
10003fb4: 8d 45 f8 lea eax,[ebp-0x8]
10003fb7: 50 push eax
10003fb8: e8 93 3d 00 00 call 0x10007d50
10003fbd: 8b 4d f8 mov ecx,DWORD PTR [ebp-0x8]
10003fc0: 8b 45 0c mov eax,DWORD PTR [ebp+0xc]
10003fc3: 89 08 mov DWORD PTR [eax],ecx
10003fc5: 8b 4d fc mov ecx,DWORD PTR [ebp-0x4]
10003fc8: 89 48 04 mov DWORD PTR [eax+0x4],ecx
10003fcb: eb 11 jmp 0x10003fde
10003fcd: 8d 45 08 lea eax,[ebp+0x8]
10003fd0: 50 push eax
10003fd1: e8 20 3e 00 00 call 0x10007df6
10003fd6: 8b 45 0c mov eax,DWORD PTR [ebp+0xc]
10003fd9: 8b 4d 08 mov ecx,DWORD PTR [ebp+0x8]
10003fdc: 89 08 mov DWORD PTR [eax],ecx
10003fde: 83 c4 0c add esp,0xc
10003fe1: c9 leave
10003fe2: c3 ret
10003fe3: 6a 00 push 0x0
10003fe5: ff 74 24 10 push DWORD PTR [esp+0x10]
10003fe9: ff 74 24 10 push DWORD PTR [esp+0x10]
10003fed: ff 74 24 10 push DWORD PTR [esp+0x10]
10003ff1: e8 ad ff ff ff call 0x10003fa3
10003ff6: 83 c4 10 add esp,0x10
10003ff9: c3 ret
10003ffa: 85 ff test edi,edi
10003ffc: 56 push esi
10003ffd: 8b f0 mov esi,eax
10003fff: 74 14 je 0x10004015
10004001: 56 push esi
10004002: e8 09 42 00 00 call 0x10008210
10004007: 40 inc eax
10004008: 50 push eax
10004009: 56 push esi
1000400a: 03 f7 add esi,edi
1000400c: 56 push esi
1000400d: e8 8e 3e 00 00 call 0x10007ea0
10004012: 83 c4 10 add esp,0x10
10004015: 5e pop esi
10004016: c3 ret
10004017: 6a 00 push 0x0
10004019: ff 74 24 08 push DWORD PTR [esp+0x8]
1000401d: e8 7a fe ff ff call 0x10003e9c
10004022: 59 pop ecx
10004023: 59 pop ecx
10004024: c3 ret
10004025: 6a 00 push 0x0
10004027: ff 74 24 08 push DWORD PTR [esp+0x8]
1000402b: e8 dd fe ff ff call 0x10003f0d
10004030: 59 pop ecx
10004031: 59 pop ecx
10004032: c3 ret
10004033: 55 push ebp
10004034: 8b ec mov ebp,esp
10004036: 83 ec 10 sub esp,0x10
10004039: 53 push ebx
1000403a: 56 push esi
1000403b: 57 push edi
1000403c: ff 75 1c push DWORD PTR [ebp+0x1c]
1000403f: 8d 4d f0 lea ecx,[ebp-0x10]
10004042: 8b d8 mov ebx,eax
10004044: e8 d1 fd ff ff call 0x10003e1a
10004049: 33 f6 xor esi,esi
1000404b: 3b de cmp ebx,esi
1000404d: 75 2b jne 0x1000407a
1000404f: e8 f2 09 00 00 call 0x10004a46
10004054: 6a 16 push 0x16
10004056: 5f pop edi
10004057: 56 push esi
10004058: 56 push esi
10004059: 56 push esi
1000405a: 56 push esi
1000405b: 56 push esi
1000405c: 89 38 mov DWORD PTR [eax],edi
1000405e: e8 13 3b 00 00 call 0x10007b76
10004063: 83 c4 14 add esp,0x14
10004066: 80 7d fc 00 cmp BYTE PTR [ebp-0x4],0x0
1000406a: 74 07 je 0x10004073
1000406c: 8b 45 f8 mov eax,DWORD PTR [ebp-0x8]
1000406f: 83 60 70 fd and DWORD PTR [eax+0x70],0xfffffffd
10004073: 8b c7 mov eax,edi
10004075: e9 21 01 00 00 jmp 0x1000419b
1000407a: 39 75 08 cmp DWORD PTR [ebp+0x8],esi
1000407d: 76 d0 jbe 0x1000404f
1000407f: 39 75 0c cmp DWORD PTR [ebp+0xc],esi
10004082: 7e 05 jle 0x10004089
10004084: 8b 45 0c mov eax,DWORD PTR [ebp+0xc]
10004087: eb 02 jmp 0x1000408b
10004089: 33 c0 xor eax,eax
1000408b: 83 c0 09 add eax,0x9
10004098: 6a 22 push 0x22
1000409a: eb ba jmp 0x10004056
1000409c: 80 7d 18 00 cmp BYTE PTR [ebp+0x18],0x0
100040a0: 74 1e je 0x100040c0
100040a2: 8b 55 14 mov edx,DWORD PTR [ebp+0x14]
100040a5: 33 c0 xor eax,eax
100040a7: 39 75 0c cmp DWORD PTR [ebp+0xc],esi
100040aa: 0f 9f c0 setg al
100040ad: 33 c9 xor ecx,ecx
100040af: 83 3a 2d cmp DWORD PTR [edx],0x2d
100040b2: 0f 94 c1 sete cl
100040b5: 8b f8 mov edi,eax
100040b7: 03 cb add ecx,ebx
100040b9: 8b c1 mov eax,ecx
100040bb: e8 3a ff ff ff call 0x10003ffa
100040c0: 8b 7d 14 mov edi,DWORD PTR [ebp+0x14]
100040c3: 83 3f 2d cmp DWORD PTR [edi],0x2d
100040c6: 8b f3 mov esi,ebx
100040c8: 75 06 jne 0x100040d0
100040ca: c6 03 2d mov BYTE PTR [ebx],0x2d
100040cd: 8d 73 01 lea esi,[ebx+0x1]
100040d0: 83 7d 0c 00 cmp DWORD PTR [ebp+0xc],0x0
100040d4: 7e 18 jle 0x100040ee
100040d6: 8d 46 01 lea eax,[esi+0x1]
100040d9: 8a 08 mov cl,BYTE PTR [eax]
100040db: 88 0e mov BYTE PTR [esi],cl
100040dd: 8b f0 mov esi,eax
100040df: 8b 45 f0 mov eax,DWORD PTR [ebp-0x10]
100040e2: 8b 80 bc 00 00 00 mov eax,DWORD PTR [eax+0xbc]
100040e8: 8b 00 mov eax,DWORD PTR [eax]
100040ea: 8a 00 mov al,BYTE PTR [eax]
100040ec: 88 06 mov BYTE PTR [esi],al
100040ee: 33 c0 xor eax,eax
100040f0: 38 45 18 cmp BYTE PTR [ebp+0x18],al
100040f3: 0f 94 c0 sete al
100040f6: 03 45 0c add eax,DWORD PTR [ebp+0xc]
100040f9: 03 f0 add esi,eax
100040fb: 83 7d 08 ff cmp DWORD PTR [ebp+0x8],0xffffffff
100040ff: 75 05 jne 0x10004106
10004101: 83 cb ff or ebx,0xffffffff
10004104: eb 05 jmp 0x1000410b
10004106: 2b de sub ebx,esi
10004108: 03 5d 08 add ebx,DWORD PTR [ebp+0x8]
1000410b: 68 00 d2 00 10 push 0x1000d200
10004110: 53 push ebx
10004111: 56 push esi
10004112: e8 84 41 00 00 call 0x1000829b
10004117: 83 c4 0c add esp,0xc
1000411a: 33 db xor ebx,ebx
1000411c: 85 c0 test eax,eax
1000411e: 74 0d je 0x1000412d
10004120: 53 push ebx
10004121: 53 push ebx
10004122: 53 push ebx
10004123: 53 push ebx
10004124: 53 push ebx
10004125: e8 50 39 00 00 call 0x10007a7a
1000412a: 83 c4 14 add esp,0x14
1000412d: 39 5d 10 cmp DWORD PTR [ebp+0x10],ebx
10004130: 8d 4e 02 lea ecx,[esi+0x2]
10004133: 74 03 je 0x10004138
10004135: c6 06 45 mov BYTE PTR [esi],0x45
10004138: 8b 47 0c mov eax,DWORD PTR [edi+0xc]
1000413b: 46 inc esi
1000413c: 80 38 30 cmp BYTE PTR [eax],0x30
1000413f: 74 2e je 0x1000416f
10004141: 8b 47 04 mov eax,DWORD PTR [edi+0x4]
10004144: 48 dec eax
10004145: 79 05 jns 0x1000414c
10004147: f7 d8 neg eax
10004149: c6 06 2d mov BYTE PTR [esi],0x2d
1000414c: 46 inc esi
1000414d: 83 f8 64 cmp eax,0x64
10004150: 7c 0a jl 0x1000415c
10004152: 99 cdq
10004153: 6a 64 push 0x64
10004155: 5f pop edi
10004156: f7 ff idiv edi
10004158: 00 06 add BYTE PTR [esi],al
1000415a: 8b c2 mov eax,edx
1000415c: 46 inc esi
1000415d: 83 f8 0a cmp eax,0xa
10004160: 7c 0a jl 0x1000416c
10004162: 99 cdq
10004163: 6a 0a push 0xa
10004165: 5f pop edi
10004166: f7 ff idiv edi
10004168: 00 06 add BYTE PTR [esi],al
1000416a: 8b c2 mov eax,edx
1000416c: 00 46 01 add BYTE PTR [esi+0x1],al
1000416f: f6 05 98 5b 01 10 01 test BYTE PTR ds:0x10015b98,0x1
10004176: 74 14 je 0x1000418c
10004178: 80 39 30 cmp BYTE PTR [ecx],0x30
1000417b: 75 0f jne 0x1000418c
1000417d: 6a 03 push 0x3
1000417f: 8d 41 01 lea eax,[ecx+0x1]
10004182: 50 push eax
10004183: 51 push ecx
10004184: e8 17 3d 00 00 call 0x10007ea0
10004189: 83 c4 0c add esp,0xc
1000418c: 80 7d fc 00 cmp BYTE PTR [ebp-0x4],0x0
10004190: 74 07 je 0x10004199
10004192: 8b 45 f8 mov eax,DWORD PTR [ebp-0x8]
10004195: 83 60 70 fd and DWORD PTR [eax+0x70],0xfffffffd
10004199: 33 c0 xor eax,eax
1000419b: 5f pop edi
1000419c: 5e pop esi
1000419d: 5b pop ebx
1000419e: c9 leave
1000419f: c3 ret
100041a0: 55 push ebp
100041a1: 8b ec mov ebp,esp
100041a3: 83 ec 2c sub esp,0x2c
100041a6: a1 10 00 01 10 mov eax,ds:0x10010010
100041ab: 33 c5 xor eax,ebp
100041ad: 89 45 fc mov DWORD PTR [ebp-0x4],eax
100041b0: 8b 45 08 mov eax,DWORD PTR [ebp+0x8]
100041b3: 53 push ebx
100041b4: 56 push esi
100041b5: 57 push edi
100041b6: 8b 7d 0c mov edi,DWORD PTR [ebp+0xc]
100041b9: 6a 16 push 0x16
100041bb: 5e pop esi
100041bc: 56 push esi
100041bd: 8d 4d e4 lea ecx,[ebp-0x1c]
100041c0: 51 push ecx
100041c1: 8d 4d d4 lea ecx,[ebp-0x2c]
100041c4: 51 push ecx
100041c5: ff 70 04 push DWORD PTR [eax+0x4]
100041c8: ff 30 push DWORD PTR [eax]
100041ca: e8 a9 42 00 00 call 0x10008478
100041cf: 33 db xor ebx,ebx
100041d1: 83 c4 14 add esp,0x14
100041d4: 3b fb cmp edi,ebx
100041d6: 75 18 jne 0x100041f0
100041d8: e8 69 08 00 00 call 0x10004a46
100041dd: 53 push ebx
100041de: 53 push ebx
100041df: 53 push ebx
100041e0: 53 push ebx
100041e1: 53 push ebx
100041e2: 89 30 mov DWORD PTR [eax],esi
100041e4: e8 8d 39 00 00 call 0x10007b76
100041e9: 83 c4 14 add esp,0x14
100041ec: 8b c6 mov eax,esi
100041ee: eb 6f jmp 0x1000425f
100041f0: 8b 45 10 mov eax,DWORD PTR [ebp+0x10]
100041f3: 3b c3 cmp eax,ebx
100041f5: 76 e1 jbe 0x100041d8
100041f7: 83 f8 ff cmp eax,0xffffffff
100041fa: 8b 75 14 mov esi,DWORD PTR [ebp+0x14]
100041fd: 75 05 jne 0x10004204
100041ff: 83 c8 ff or eax,0xffffffff
10004202: eb 14 jmp 0x10004218
10004204: 33 c9 xor ecx,ecx
10004206: 83 7d d4 2d cmp DWORD PTR [ebp-0x2c],0x2d
1000420a: 0f 94 c1 sete cl
1000420d: 2b c1 sub eax,ecx
1000420f: 33 c9 xor ecx,ecx
10004211: 3b f3 cmp esi,ebx
10004213: 0f 9f c1 setg cl
10004216: 2b c1 sub eax,ecx
10004218: 8d 4d d4 lea ecx,[ebp-0x2c]
1000421b: 51 push ecx
1000421c: 8d 4e 01 lea ecx,[esi+0x1]
1000421f: 51 push ecx
10004220: 50 push eax
10004221: 33 c0 xor eax,eax
10004223: 83 7d d4 2d cmp DWORD PTR [ebp-0x2c],0x2d
10004227: 0f 94 c0 sete al
1000422a: 33 c9 xor ecx,ecx
1000422c: 3b f3 cmp esi,ebx
1000422e: 0f 9f c1 setg cl
10004231: 03 c7 add eax,edi
10004233: 03 c8 add ecx,eax
10004235: 51 push ecx
10004236: e8 c5 40 00 00 call 0x10008300
1000423b: 83 c4 10 add esp,0x10
1000423e: 3b c3 cmp eax,ebx
10004240: 74 04 je 0x10004246
10004242: 88 1f mov BYTE PTR [edi],bl
10004244: eb 19 jmp 0x1000425f
10004246: ff 75 1c push DWORD PTR [ebp+0x1c]
10004249: 8d 45 d4 lea eax,[ebp-0x2c]
1000424c: 53 push ebx
1000424d: 50 push eax
1000424e: ff 75 18 push DWORD PTR [ebp+0x18]
10004251: 8b c7 mov eax,edi
10004253: 56 push esi
10004254: ff 75 10 push DWORD PTR [ebp+0x10]
10004257: e8 d7 fd ff ff call 0x10004033
1000425c: 83 c4 18 add esp,0x18
1000425f: 8b 4d fc mov ecx,DWORD PTR [ebp-0x4]
10004262: 5f pop edi
10004263: 5e pop esi
10004264: 33 cd xor ecx,ebp
10004266: 5b pop ebx
10004267: e8 af f8 ff ff call 0x10003b1b
1000426c: c9 leave
1000426d: c3 ret
1000426e: 55 push ebp
1000426f: 8b ec mov ebp,esp
10004271: 6a 00 push 0x0
10004273: ff 75 18 push DWORD PTR [ebp+0x18]
10004276: ff 75 14 push DWORD PTR [ebp+0x14]
10004279: ff 75 10 push DWORD PTR [ebp+0x10]
1000427c: ff 75 0c push DWORD PTR [ebp+0xc]
1000427f: ff 75 08 push DWORD PTR [ebp+0x8]
10004282: e8 19 ff ff ff call 0x100041a0
10004287: 83 c4 18 add esp,0x18
1000428a: 5d pop ebp
1000428b: c3 ret
1000428c: 55 push ebp
1000428d: 8b ec mov ebp,esp
1000428f: 83 ec 24 sub esp,0x24
10004292: 56 push esi
10004293: 57 push edi
10004294: ff 75 1c push DWORD PTR [ebp+0x1c]
10004297: 8d 4d dc lea ecx,[ebp-0x24]
1000429a: c7 45 ec ff 03 00 00 mov DWORD PTR [ebp-0x14],0x3ff
100042a1: 33 ff xor edi,edi
100042a3: c7 45 fc 30 00 00 00 mov DWORD PTR [ebp-0x4],0x30
100042aa: e8 6b fb ff ff call 0x10003e1a
100042af: 39 7d 14 cmp DWORD PTR [ebp+0x14],edi
100042b2: 7d 03 jge 0x100042b7
100042b4: 89 7d 14 mov DWORD PTR [ebp+0x14],edi
100042b7: 8b 75 0c mov esi,DWORD PTR [ebp+0xc]
100042ba: 3b f7 cmp esi,edi
100042bc: 75 2b jne 0x100042e9
100042be: e8 83 07 00 00 call 0x10004a46
100042c3: 6a 16 push 0x16
100042c5: 5e pop esi
100042c6: 57 push edi
100042c7: 57 push edi
100042c8: 57 push edi
100042c9: 57 push edi
100042ca: 57 push edi
100042cb: 89 30 mov DWORD PTR [eax],esi
100042cd: e8 a4 38 00 00 call 0x10007b76
100042d2: 83 c4 14 add esp,0x14
100042d5: 80 7d e8 00 cmp BYTE PTR [ebp-0x18],0x0
100042d9: 74 07 je 0x100042e2
100042db: 8b 45 e4 mov eax,DWORD PTR [ebp-0x1c]
100042de: 83 60 70 fd and DWORD PTR [eax+0x70],0xfffffffd
100042e2: 8b c6 mov eax,esi
100042e4: e9 10 03 00 00 jmp 0x100045f9
100042e9: 39 7d 10 cmp DWORD PTR [ebp+0x10],edi
100042ec: 76 d0 jbe 0x100042be
100042ee: 8b 45 14 mov eax,DWORD PTR [ebp+0x14]
100042f1: 83 c0 0b add eax,0xb
100042f4: 39 45 10 cmp DWORD PTR [ebp+0x10],eax
100042f7: c6 06 00 mov BYTE PTR [esi],0x0
100042fa: 77 09 ja 0x10004305
100042fc: e8 45 07 00 00 call 0x10004a46
10004301: 6a 22 push 0x22
10004303: eb c0 jmp 0x100042c5
10004305: 8b 7d 08 mov edi,DWORD PTR [ebp+0x8]
10004308: 8b 07 mov eax,DWORD PTR [edi]
1000430a: 89 45 f4 mov DWORD PTR [ebp-0xc],eax
1000430d: 8b 47 04 mov eax,DWORD PTR [edi+0x4]
10004310: 8b c8 mov ecx,eax
10004312: c1 e9 14 shr ecx,0x14
10004315: ba ff 07 00 00 mov edx,0x7ff
1000431a: 53 push ebx
1000431b: 23 ca and ecx,edx
1000431d: 33 db xor ebx,ebx
1000431f: 3b ca cmp ecx,edx
10004321: 0f 85 90 00 00 00 jne 0x100043b7
10004327: 85 db test ebx,ebx
10004329: 0f 85 88 00 00 00 jne 0x100043b7
1000432f: 8b 45 10 mov eax,DWORD PTR [ebp+0x10]
10004332: 83 f8 ff cmp eax,0xffffffff
10004335: 75 04 jne 0x1000433b
10004337: 0b c0 or eax,eax
10004339: eb 03 jmp 0x1000433e
1000433b: 83 c0 fe add eax,0xfffffffe
1000433e: 6a 00 push 0x0
10004340: ff 75 14 push DWORD PTR [ebp+0x14]
10004343: 8d 5e 02 lea ebx,[esi+0x2]
10004346: 50 push eax
10004347: 53 push ebx
10004348: 57 push edi
10004349: e8 20 ff ff ff call 0x1000426e
1000434e: 83 c4 14 add esp,0x14
10004351: 85 c0 test eax,eax
10004353: 74 19 je 0x1000436e
10004355: 80 7d e8 00 cmp BYTE PTR [ebp-0x18],0x0
10004359: c6 06 00 mov BYTE PTR [esi],0x0
1000435c: 0f 84 96 02 00 00 je 0x100045f8
10004362: 8b 4d e4 mov ecx,DWORD PTR [ebp-0x1c]
10004365: 83 61 70 fd and DWORD PTR [ecx+0x70],0xfffffffd
10004369: e9 8a 02 00 00 jmp 0x100045f8
1000436e: 80 3b 2d cmp BYTE PTR [ebx],0x2d
10004371: 75 04 jne 0x10004377
10004373: c6 06 2d mov BYTE PTR [esi],0x2d
10004376: 46 inc esi
10004377: c6 06 30 mov BYTE PTR [esi],0x30
1000437a: 46 inc esi
1000437b: 83 7d 18 00 cmp DWORD PTR [ebp+0x18],0x0
1000437f: 6a 65 push 0x65
10004381: 0f 94 c0 sete al
10004384: fe c8 dec al
10004386: 24 e0 and al,0xe0
10004388: 04 78 add al,0x78
1000438a: 88 06 mov BYTE PTR [esi],al
1000438c: 46 inc esi
1000438d: 56 push esi
1000438e: e8 ed 2c 00 00 call 0x10007080
10004393: 85 c0 test eax,eax
10004395: 59 pop ecx
10004396: 59 pop ecx
10004397: 0f 84 4c 02 00 00 je 0x100045e9
1000439d: 83 7d 18 00 cmp DWORD PTR [ebp+0x18],0x0
100043a1: 0f 94 c1 sete cl
100043a4: fe c9 dec cl
100043a6: 80 e1 e0 and cl,0xe0
100043a9: 80 c1 70 add cl,0x70
100043ac: 88 08 mov BYTE PTR [eax],cl
100043ae: c6 40 03 00 mov BYTE PTR [eax+0x3],0x0
100043b2: e9 32 02 00 00 jmp 0x100045e9
100043b7: 25 00 00 00 80 and eax,0x80000000
100043bc: 33 c9 xor ecx,ecx
100043be: 0b c8 or ecx,eax
100043c0: 74 04 je 0x100043c6
100043c2: c6 06 2d mov BYTE PTR [esi],0x2d
100043c5: 46 inc esi
100043c6: 8b 5d 18 mov ebx,DWORD PTR [ebp+0x18]
100043c9: c6 06 30 mov BYTE PTR [esi],0x30
100043cc: 46 inc esi
100043cd: 85 db test ebx,ebx
100043cf: 0f 94 c0 sete al
100043d2: fe c8 dec al
100043d4: 24 e0 and al,0xe0
100043d6: 04 78 add al,0x78
100043d8: 88 06 mov BYTE PTR [esi],al
100043da: 8b 4f 04 mov ecx,DWORD PTR [edi+0x4]
100043dd: 46 inc esi
100043de: f7 db neg ebx
100043e0: 1b db sbb ebx,ebx
100043e2: 83 e3 e0 and ebx,0xffffffe0
100043e5: 81 e1 00 00 f0 7f and ecx,0x7ff00000
100043eb: 33 c0 xor eax,eax
100043ed: 83 c3 27 add ebx,0x27
100043f0: 33 d2 xor edx,edx
100043f2: 0b c1 or eax,ecx
100043f4: 75 21 jne 0x10004417
100043f6: c6 06 30 mov BYTE PTR [esi],0x30
100043f9: 8b 4f 04 mov ecx,DWORD PTR [edi+0x4]
100043fc: 8b 07 mov eax,DWORD PTR [edi]
100043fe: 81 e1 ff ff 0f 00 and ecx,0xfffff
10004404: 46 inc esi
10004405: 0b c1 or eax,ecx
10004407: 75 05 jne 0x1000440e
10004409: 89 55 ec mov DWORD PTR [ebp-0x14],edx
1000440c: eb 0d jmp 0x1000441b
1000440e: c7 45 ec fe 03 00 00 mov DWORD PTR [ebp-0x14],0x3fe
10004415: eb 04 jmp 0x1000441b
10004417: c6 06 31 mov BYTE PTR [esi],0x31
1000441a: 46 inc esi
1000441b: 8b c6 mov eax,esi
1000441d: 46 inc esi
1000441e: 39 55 14 cmp DWORD PTR [ebp+0x14],edx
10004421: 89 45 0c mov DWORD PTR [ebp+0xc],eax
10004424: 75 04 jne 0x1000442a
10004426: 88 10 mov BYTE PTR [eax],dl
10004428: eb 0f jmp 0x10004439
1000442a: 8b 4d dc mov ecx,DWORD PTR [ebp-0x24]
1000442d: 8b 89 bc 00 00 00 mov ecx,DWORD PTR [ecx+0xbc]
10004433: 8b 09 mov ecx,DWORD PTR [ecx]
10004435: 8a 09 mov cl,BYTE PTR [ecx]
10004437: 88 08 mov BYTE PTR [eax],cl
10004439: 8b 4f 04 mov ecx,DWORD PTR [edi+0x4]
1000443c: 8b 07 mov eax,DWORD PTR [edi]
1000443e: 81 e1 ff ff 0f 00 and ecx,0xfffff
10004444: 89 4d f8 mov DWORD PTR [ebp-0x8],ecx
10004447: 77 08 ja 0x10004451
10004449: 3b c2 cmp eax,edx
1000444b: 0f 86 b5 00 00 00 jbe 0x10004506
10004451: 89 55 f4 mov DWORD PTR [ebp-0xc],edx
10004454: c7 45 f8 00 00 0f 00 mov DWORD PTR [ebp-0x8],0xf0000
1000445b: 83 7d 14 00 cmp DWORD PTR [ebp+0x14],0x0
1000445f: 7e 4d jle 0x100044ae
10004461: 8b 57 04 mov edx,DWORD PTR [edi+0x4]
10004464: 23 55 f8 and edx,DWORD PTR [ebp-0x8]
10004467: 8b 07 mov eax,DWORD PTR [edi]
10004469: 0f bf 4d fc movsx ecx,WORD PTR [ebp-0x4]
1000446d: 23 45 f4 and eax,DWORD PTR [ebp-0xc]
10004470: 81 e2 ff ff 0f 00 and edx,0xfffff
10004476: e8 f5 41 00 00 call 0x10008670
1000447b: 66 05 30 00 add ax,0x30
1000447f: 0f b7 c0 movzx eax,ax
10004482: 66 3d 39 00 cmp ax,0x39
10004486: 76 02 jbe 0x1000448a
10004488: 03 c3 add eax,ebx
1000448a: 8b 4d f8 mov ecx,DWORD PTR [ebp-0x8]
1000448d: 83 6d fc 04 sub DWORD PTR [ebp-0x4],0x4
10004491: 88 06 mov BYTE PTR [esi],al
10004493: 8b 45 f4 mov eax,DWORD PTR [ebp-0xc]
10004496: 0f ac c8 04 shrd eax,ecx,0x4
1000449a: c1 e9 04 shr ecx,0x4
1000449d: 46 inc esi
1000449e: ff 4d 14 dec DWORD PTR [ebp+0x14]
100044a1: 66 83 7d fc 00 cmp WORD PTR [ebp-0x4],0x0
100044a6: 89 45 f4 mov DWORD PTR [ebp-0xc],eax
100044a9: 89 4d f8 mov DWORD PTR [ebp-0x8],ecx
100044ac: 7d ad jge 0x1000445b
100044ae: 66 83 7d fc 00 cmp WORD PTR [ebp-0x4],0x0
100044b3: 7c 51 jl 0x10004506
100044b5: 8b 57 04 mov edx,DWORD PTR [edi+0x4]
100044b8: 23 55 f8 and edx,DWORD PTR [ebp-0x8]
100044bb: 8b 07 mov eax,DWORD PTR [edi]
100044bd: 0f bf 4d fc movsx ecx,WORD PTR [ebp-0x4]
100044c1: 23 45 f4 and eax,DWORD PTR [ebp-0xc]
100044c4: 81 e2 ff ff 0f 00 and edx,0xfffff
100044ca: e8 a1 41 00 00 call 0x10008670
100044cf: 66 3d 08 00 cmp ax,0x8
100044d3: 76 31 jbe 0x10004506
100044d5: 8d 46 ff lea eax,[esi-0x1]
100044d8: 8a 08 mov cl,BYTE PTR [eax]
100044da: 80 f9 66 cmp cl,0x66
100044dd: 74 05 je 0x100044e4
100044df: 80 f9 46 cmp cl,0x46
100044e2: 75 06 jne 0x100044ea
100044e4: c6 00 30 mov BYTE PTR [eax],0x30
100044e7: 48 dec eax
100044e8: eb ee jmp 0x100044d8
100044ea: 3b 45 0c cmp eax,DWORD PTR [ebp+0xc]
100044ed: 74 14 je 0x10004503
100044ef: 8a 08 mov cl,BYTE PTR [eax]
100044f1: 80 f9 39 cmp cl,0x39
100044f4: 75 07 jne 0x100044fd
100044f6: 80 c3 3a add bl,0x3a
100044f9: 88 18 mov BYTE PTR [eax],bl
100044fb: eb 09 jmp 0x10004506
100044fd: fe c1 inc cl
100044ff: 88 08 mov BYTE PTR [eax],cl
10004501: eb 03 jmp 0x10004506
10004503: fe 40 ff inc BYTE PTR [eax-0x1]
10004506: 83 7d 14 00 cmp DWORD PTR [ebp+0x14],0x0
1000450a: 7e 11 jle 0x1000451d
1000450c: ff 75 14 push DWORD PTR [ebp+0x14]
1000450f: 6a 30 push 0x30
10004511: 56 push esi
10004512: e8 d9 40 00 00 call 0x100085f0
10004517: 83 c4 0c add esp,0xc
1000451a: 03 75 14 add esi,DWORD PTR [ebp+0x14]
1000451d: 8b 45 0c mov eax,DWORD PTR [ebp+0xc]
10004520: 80 38 00 cmp BYTE PTR [eax],0x0
10004523: 75 02 jne 0x10004527
10004525: 8b f0 mov esi,eax
10004527: 83 7d 18 00 cmp DWORD PTR [ebp+0x18],0x0
1000452b: b1 34 mov cl,0x34
1000452d: 0f 94 c0 sete al
10004530: fe c8 dec al
10004532: 24 e0 and al,0xe0
10004534: 04 70 add al,0x70
10004536: 88 06 mov BYTE PTR [esi],al
10004538: 8b 07 mov eax,DWORD PTR [edi]
1000453a: 8b 57 04 mov edx,DWORD PTR [edi+0x4]
1000453d: 46 inc esi
1000453e: e8 2d 41 00 00 call 0x10008670
10004543: 33 db xor ebx,ebx
10004545: 25 ff 07 00 00 and eax,0x7ff
1000454a: 23 d3 and edx,ebx
1000454c: 2b 45 ec sub eax,DWORD PTR [ebp-0x14]
1000454f: 53 push ebx
10004550: 59 pop ecx
10004551: 1b d1 sbb edx,ecx
10004553: 78 0c js 0x10004561
10004555: 7f 04 jg 0x1000455b
10004557: 3b c3 cmp eax,ebx
10004559: 72 06 jb 0x10004561
1000455b: c6 06 2b mov BYTE PTR [esi],0x2b
1000455e: 46 inc esi
1000455f: eb 0a jmp 0x1000456b
10004561: c6 06 2d mov BYTE PTR [esi],0x2d
10004564: 46 inc esi
10004565: f7 d8 neg eax
10004567: 13 d3 adc edx,ebx
10004569: f7 da neg edx
1000456b: 3b d3 cmp edx,ebx
1000456d: 8b fe mov edi,esi
1000456f: c6 06 30 mov BYTE PTR [esi],0x30
10004572: 7c 24 jl 0x10004598
10004574: b9 e8 03 00 00 mov ecx,0x3e8
10004579: 7f 04 jg 0x1000457f
1000457b: 3b c1 cmp eax,ecx
1000457d: 72 19 jb 0x10004598
1000457f: 53 push ebx
10004580: 51 push ecx
10004581: 52 push edx
10004582: 50 push eax
10004583: e8 88 3f 00 00 call 0x10008510
10004588: 04 30 add al,0x30
1000458a: 88 06 mov BYTE PTR [esi],al
1000458c: 46 inc esi
1000458d: 3b f7 cmp esi,edi
1000458f: 89 55 f0 mov DWORD PTR [ebp-0x10],edx
10004592: 8b c1 mov eax,ecx
10004594: 8b d3 mov edx,ebx
10004596: 75 0b jne 0x100045a3
10004598: 85 d2 test edx,edx
1000459a: 7c 1e jl 0x100045ba
1000459c: 7f 05 jg 0x100045a3
1000459e: 83 f8 64 cmp eax,0x64
100045a1: 72 17 jb 0x100045ba
100045a3: 6a 00 push 0x0
100045a5: 6a 64 push 0x64
100045a7: 52 push edx
100045a8: 50 push eax
100045a9: e8 62 3f 00 00 call 0x10008510
100045ae: 04 30 add al,0x30
100045b0: 88 06 mov BYTE PTR [esi],al
100045b2: 89 55 f0 mov DWORD PTR [ebp-0x10],edx
100045b5: 46 inc esi
100045b6: 8b c1 mov eax,ecx
100045b8: 8b d3 mov edx,ebx
100045ba: 3b f7 cmp esi,edi
100045bc: 75 0b jne 0x100045c9
100045be: 85 d2 test edx,edx
100045c0: 7c 1f jl 0x100045e1
100045c2: 7f 05 jg 0x100045c9
100045c4: 83 f8 0a cmp eax,0xa
100045c7: 72 18 jb 0x100045e1
100045c9: 6a 00 push 0x0
100045cb: 6a 0a push 0xa
100045cd: 52 push edx
100045ce: 50 push eax
100045cf: e8 3c 3f 00 00 call 0x10008510
100045d4: 04 30 add al,0x30
100045d6: 88 06 mov BYTE PTR [esi],al
100045d8: 89 55 f0 mov DWORD PTR [ebp-0x10],edx
100045db: 46 inc esi
100045dc: 8b c1 mov eax,ecx
100045de: 89 5d f0 mov DWORD PTR [ebp-0x10],ebx
100045e1: 04 30 add al,0x30
100045e3: 88 06 mov BYTE PTR [esi],al
100045e5: c6 46 01 00 mov BYTE PTR [esi+0x1],0x0
100045e9: 80 7d e8 00 cmp BYTE PTR [ebp-0x18],0x0
100045ed: 74 07 je 0x100045f6
100045ef: 8b 45 e4 mov eax,DWORD PTR [ebp-0x1c]
100045f2: 83 60 70 fd and DWORD PTR [eax+0x70],0xfffffffd
100045f6: 33 c0 xor eax,eax
100045f8: 5b pop ebx
100045f9: 5f pop edi
100045fa: 5e pop esi
100045fb: c9 leave
100045fc: c3 ret
100045fd: 55 push ebp
100045fe: 8b ec mov ebp,esp
10004600: 83 ec 10 sub esp,0x10
10004603: 53 push ebx
10004604: 56 push esi
10004605: 57 push edi
10004606: ff 75 14 push DWORD PTR [ebp+0x14]
10004609: 8b d8 mov ebx,eax
1000460b: 8b 73 04 mov esi,DWORD PTR [ebx+0x4]
1000460e: 8b f9 mov edi,ecx
10004610: 8d 4d f0 lea ecx,[ebp-0x10]
10004613: 4e dec esi
10004614: e8 01 f8 ff ff call 0x10003e1a
10004619: 85 ff test edi,edi
1000461b: 75 2d jne 0x1000464a
1000461d: e8 24 04 00 00 call 0x10004a46
10004622: 6a 16 push 0x16
10004624: 5e pop esi
10004625: 89 30 mov DWORD PTR [eax],esi
10004627: 33 c0 xor eax,eax
10004629: 50 push eax
1000462a: 50 push eax
1000462b: 50 push eax
1000462c: 50 push eax
1000462d: 50 push eax
1000462e: e8 43 35 00 00 call 0x10007b76
10004633: 83 c4 14 add esp,0x14
10004636: 80 7d fc 00 cmp BYTE PTR [ebp-0x4],0x0
1000463a: 74 07 je 0x10004643
1000463c: 8b 45 f8 mov eax,DWORD PTR [ebp-0x8]
1000463f: 83 60 70 fd and DWORD PTR [eax+0x70],0xfffffffd
10004643: 8b c6 mov eax,esi
10004645: e9 a3 00 00 00 jmp 0x100046ed
1000464a: 83 7d 08 00 cmp DWORD PTR [ebp+0x8],0x0
1000464e: 76 cd jbe 0x1000461d
10004650: 80 7d 10 00 cmp BYTE PTR [ebp+0x10],0x0
10004654: 74 18 je 0x1000466e
10004656: 3b 75 0c cmp esi,DWORD PTR [ebp+0xc]
10004659: 75 13 jne 0x1000466e
1000465b: 33 c0 xor eax,eax
1000465d: 83 3b 2d cmp DWORD PTR [ebx],0x2d
10004660: 0f 94 c0 sete al
10004663: 03 c6 add eax,esi
10004665: 03 c7 add eax,edi
10004667: c6 00 30 mov BYTE PTR [eax],0x30
1000466a: c6 40 01 00 mov BYTE PTR [eax+0x1],0x0
1000466e: 83 3b 2d cmp DWORD PTR [ebx],0x2d
10004671: 8b f7 mov esi,edi
10004673: 75 06 jne 0x1000467b
10004675: c6 07 2d mov BYTE PTR [edi],0x2d
10004678: 8d 77 01 lea esi,[edi+0x1]
1000467b: 8b 43 04 mov eax,DWORD PTR [ebx+0x4]
1000467e: 33 ff xor edi,edi
10004680: 47 inc edi
10004681: 85 c0 test eax,eax
10004683: 7f 0d jg 0x10004692
10004685: 8b c6 mov eax,esi
10004687: e8 6e f9 ff ff call 0x10003ffa
1000468c: c6 06 30 mov BYTE PTR [esi],0x30
1000468f: 46 inc esi
10004690: eb 02 jmp 0x10004694
10004692: 03 f0 add esi,eax
10004694: 83 7d 0c 00 cmp DWORD PTR [ebp+0xc],0x0
10004698: 7e 44 jle 0x100046de
1000469a: 8b c6 mov eax,esi
1000469c: e8 59 f9 ff ff call 0x10003ffa
100046a1: 8b 45 f0 mov eax,DWORD PTR [ebp-0x10]
100046a4: 8b 80 bc 00 00 00 mov eax,DWORD PTR [eax+0xbc]
100046aa: 8b 00 mov eax,DWORD PTR [eax]
100046ac: 8a 00 mov al,BYTE PTR [eax]
100046ae: 88 06 mov BYTE PTR [esi],al
100046b0: 8b 5b 04 mov ebx,DWORD PTR [ebx+0x4]
100046b3: 46 inc esi
100046b4: 85 db test ebx,ebx
100046b6: 7d 26 jge 0x100046de
100046b8: f7 db neg ebx
100046ba: 80 7d 10 00 cmp BYTE PTR [ebp+0x10],0x0
100046be: 75 05 jne 0x100046c5
100046c0: 39 5d 0c cmp DWORD PTR [ebp+0xc],ebx
100046c3: 7c 03 jl 0x100046c8
100046c5: 89 5d 0c mov DWORD PTR [ebp+0xc],ebx
100046c8: 8b 7d 0c mov edi,DWORD PTR [ebp+0xc]
100046cb: 8b c6 mov eax,esi
100046cd: e8 28 f9 ff ff call 0x10003ffa
100046d2: 57 push edi
100046d3: 6a 30 push 0x30
100046d5: 56 push esi
100046d6: e8 15 3f 00 00 call 0x100085f0
100046db: 83 c4 0c add esp,0xc
100046de: 80 7d fc 00 cmp BYTE PTR [ebp-0x4],0x0
100046e2: 74 07 je 0x100046eb
100046e4: 8b 45 f8 mov eax,DWORD PTR [ebp-0x8]
100046e7: 83 60 70 fd and DWORD PTR [eax+0x70],0xfffffffd
100046eb: 33 c0 xor eax,eax
100046ed: 5f pop edi
100046ee: 5e pop esi
100046ef: 5b pop ebx
100046f0: c9 leave
100046f1: c3 ret
100046f2: 55 push ebp
100046f3: 8b ec mov ebp,esp
100046f5: 83 ec 2c sub esp,0x2c
100046f8: a1 10 00 01 10 mov eax,ds:0x10010010
100046fd: 33 c5 xor eax,ebp
100046ff: 89 45 fc mov DWORD PTR [ebp-0x4],eax
10004702: 8b 45 08 mov eax,DWORD PTR [ebp+0x8]
10004705: 53 push ebx
10004706: 56 push esi
10004707: 57 push edi
10004708: 8b 7d 0c mov edi,DWORD PTR [ebp+0xc]
1000470b: 6a 16 push 0x16
1000470d: 5e pop esi
1000470e: 56 push esi
1000470f: 8d 4d e4 lea ecx,[ebp-0x1c]
10004712: 51 push ecx
10004713: 8d 4d d4 lea ecx,[ebp-0x2c]
10004716: 51 push ecx
10004717: ff 70 04 push DWORD PTR [eax+0x4]
1000471a: ff 30 push DWORD PTR [eax]
1000471c: e8 57 3d 00 00 call 0x10008478
10004721: 33 db xor ebx,ebx
10004723: 83 c4 14 add esp,0x14
10004726: 3b fb cmp edi,ebx
10004728: 75 18 jne 0x10004742
1000472a: e8 17 03 00 00 call 0x10004a46
1000472f: 53 push ebx
10004730: 53 push ebx
10004731: 53 push ebx
10004732: 53 push ebx
10004733: 53 push ebx
10004734: 89 30 mov DWORD PTR [eax],esi
10004736: e8 3b 34 00 00 call 0x10007b76
1000473b: 83 c4 14 add esp,0x14
1000473e: 8b c6 mov eax,esi
10004740: eb 5a jmp 0x1000479c
10004742: 8b 45 10 mov eax,DWORD PTR [ebp+0x10]
10004745: 3b c3 cmp eax,ebx
10004747: 76 e1 jbe 0x1000472a
10004749: 83 f8 ff cmp eax,0xffffffff
1000474c: 75 04 jne 0x10004752
1000474e: 0b c0 or eax,eax
10004750: eb 0b jmp 0x1000475d
10004752: 33 c9 xor ecx,ecx
10004754: 83 7d d4 2d cmp DWORD PTR [ebp-0x2c],0x2d
10004758: 0f 94 c1 sete cl
1000475b: 2b c1 sub eax,ecx
1000475d: 8b 75 14 mov esi,DWORD PTR [ebp+0x14]
10004760: 8d 4d d4 lea ecx,[ebp-0x2c]
10004763: 51 push ecx
10004764: 8b 4d d8 mov ecx,DWORD PTR [ebp-0x28]
10004767: 03 ce add ecx,esi
10004769: 51 push ecx
1000476a: 50 push eax
1000476b: 33 c0 xor eax,eax
1000476d: 83 7d d4 2d cmp DWORD PTR [ebp-0x2c],0x2d
10004771: 0f 94 c0 sete al
10004774: 03 c7 add eax,edi
10004776: 50 push eax
10004777: e8 84 3b 00 00 call 0x10008300
1000477c: 83 c4 10 add esp,0x10
1000477f: 3b c3 cmp eax,ebx
10004781: 74 04 je 0x10004787
10004783: 88 1f mov BYTE PTR [edi],bl
10004785: eb 15 jmp 0x1000479c
10004787: ff 75 18 push DWORD PTR [ebp+0x18]
1000478a: 8d 45 d4 lea eax,[ebp-0x2c]
1000478d: 53 push ebx
1000478e: 56 push esi
1000478f: ff 75 10 push DWORD PTR [ebp+0x10]
10004792: 8b cf mov ecx,edi
10004794: e8 64 fe ff ff call 0x100045fd
10004799: 83 c4 10 add esp,0x10
1000479c: 8b 4d fc mov ecx,DWORD PTR [ebp-0x4]
1000479f: 5f pop edi
100047a0: 5e pop esi
100047a1: 33 cd xor ecx,ebp
100047a3: 5b pop ebx
100047a4: e8 72 f3 ff ff call 0x10003b1b
100047a9: c9 leave
100047aa: c3 ret
100047ab: 55 push ebp
100047ac: 8b ec mov ebp,esp
100047ae: 83 ec 30 sub esp,0x30
100047b1: a1 10 00 01 10 mov eax,ds:0x10010010
100047b6: 33 c5 xor eax,ebp
100047b8: 89 45 fc mov DWORD PTR [ebp-0x4],eax
100047bb: 8b 45 08 mov eax,DWORD PTR [ebp+0x8]
100047be: 53 push ebx
100047bf: 56 push esi
100047c0: 8b 75 0c mov esi,DWORD PTR [ebp+0xc]
100047c3: 57 push edi
100047c4: 6a 16 push 0x16
100047c6: 5f pop edi
100047c7: 57 push edi
100047c8: 8d 4d e4 lea ecx,[ebp-0x1c]
100047cb: 51 push ecx
100047cc: 8d 4d d0 lea ecx,[ebp-0x30]
100047cf: 51 push ecx
100047d0: ff 70 04 push DWORD PTR [eax+0x4]
100047d3: ff 30 push DWORD PTR [eax]
100047d5: e8 9e 3c 00 00 call 0x10008478
100047da: 33 db xor ebx,ebx
100047dc: 83 c4 14 add esp,0x14
100047df: 3b f3 cmp esi,ebx
100047e1: 75 1b jne 0x100047fe
100047e3: e8 5e 02 00 00 call 0x10004a46
100047e8: 53 push ebx
100047e9: 53 push ebx
100047ea: 53 push ebx
100047eb: 53 push ebx
100047ec: 53 push ebx
100047ed: 89 38 mov DWORD PTR [eax],edi
100047ef: e8 82 33 00 00 call 0x10007b76
100047f4: 83 c4 14 add esp,0x14
100047f7: 8b c7 mov eax,edi
100047f9: e9 96 00 00 00 jmp 0x10004894
100047fe: 8b 4d 10 mov ecx,DWORD PTR [ebp+0x10]
10004801: 3b cb cmp ecx,ebx
10004803: 76 de jbe 0x100047e3
10004805: 8b 45 d4 mov eax,DWORD PTR [ebp-0x2c]
10004808: 48 dec eax
10004809: 89 45 e0 mov DWORD PTR [ebp-0x20],eax
1000480c: 33 c0 xor eax,eax
1000480e: 83 7d d0 2d cmp DWORD PTR [ebp-0x30],0x2d
10004812: 0f 94 c0 sete al
10004815: 83 f9 ff cmp ecx,0xffffffff
10004818: 8d 3c 30 lea edi,[eax+esi*1]
1000481b: 75 04 jne 0x10004821
1000481d: 0b c9 or ecx,ecx
1000481f: eb 02 jmp 0x10004823
10004821: 2b c8 sub ecx,eax
10004823: 8d 45 d0 lea eax,[ebp-0x30]
10004826: 50 push eax
10004827: ff 75 14 push DWORD PTR [ebp+0x14]
1000482a: 51 push ecx
1000482b: 57 push edi
1000482c: e8 cf 3a 00 00 call 0x10008300
10004831: 83 c4 10 add esp,0x10
10004834: 3b c3 cmp eax,ebx
10004836: 74 04 je 0x1000483c
10004838: 88 1e mov BYTE PTR [esi],bl
1000483a: eb 58 jmp 0x10004894
1000483c: 8b 45 d4 mov eax,DWORD PTR [ebp-0x2c]
1000483f: 48 dec eax
10004840: 39 45 e0 cmp DWORD PTR [ebp-0x20],eax
10004843: 0f 9c c1 setl cl
10004846: 83 f8 fc cmp eax,0xfffffffc
10004849: 7c 2d jl 0x10004878
1000484b: 3b 45 14 cmp eax,DWORD PTR [ebp+0x14]
1000484e: 7d 28 jge 0x10004878
10004850: 3a cb cmp cl,bl
10004852: 74 0a je 0x1000485e
10004854: 8a 07 mov al,BYTE PTR [edi]
10004856: 47 inc edi
10004857: 84 c0 test al,al
10004859: 75 f9 jne 0x10004854
1000485b: 88 5f fe mov BYTE PTR [edi-0x2],bl
1000485e: ff 75 1c push DWORD PTR [ebp+0x1c]
10004861: 8d 45 d0 lea eax,[ebp-0x30]
10004864: 6a 01 push 0x1
10004866: ff 75 14 push DWORD PTR [ebp+0x14]
10004869: 8b ce mov ecx,esi
1000486b: ff 75 10 push DWORD PTR [ebp+0x10]
1000486e: e8 8a fd ff ff call 0x100045fd
10004873: 83 c4 10 add esp,0x10
10004876: eb 1c jmp 0x10004894
10004878: ff 75 1c push DWORD PTR [ebp+0x1c]
1000487b: 8d 45 d0 lea eax,[ebp-0x30]
1000487e: 6a 01 push 0x1
10004880: 50 push eax
10004881: ff 75 18 push DWORD PTR [ebp+0x18]
10004884: 8b c6 mov eax,esi
10004886: ff 75 14 push DWORD PTR [ebp+0x14]
10004889: ff 75 10 push DWORD PTR [ebp+0x10]
1000488c: e8 a2 f7 ff ff call 0x10004033
10004891: 83 c4 18 add esp,0x18
10004894: 8b 4d fc mov ecx,DWORD PTR [ebp-0x4]
10004897: 5f pop edi
10004898: 5e pop esi
10004899: 33 cd xor ecx,ebp
1000489b: 5b pop ebx
1000489c: e8 7a f2 ff ff call 0x10003b1b
100048a1: c9 leave
100048a2: c3 ret
100048a3: 55 push ebp
100048a4: 8b ec mov ebp,esp
100048a6: 8b 45 14 mov eax,DWORD PTR [ebp+0x14]
100048a9: 83 f8 65 cmp eax,0x65
100048ac: 74 5f je 0x1000490d
100048ae: 83 f8 45 cmp eax,0x45
100048b1: 74 5a je 0x1000490d
100048b3: 83 f8 66 cmp eax,0x66
100048b6: 75 19 jne 0x100048d1
100048b8: ff 75 20 push DWORD PTR [ebp+0x20]
100048bb: ff 75 18 push DWORD PTR [ebp+0x18]
100048be: ff 75 10 push DWORD PTR [ebp+0x10]
100048c1: ff 75 0c push DWORD PTR [ebp+0xc]
100048c4: ff 75 08 push DWORD PTR [ebp+0x8]
100048c7: e8 26 fe ff ff call 0x100046f2
100048cc: 83 c4 14 add esp,0x14
100048cf: 5d pop ebp
100048d0: c3 ret
100048d1: 83 f8 61 cmp eax,0x61
100048d4: 74 1e je 0x100048f4
100048d6: 83 f8 41 cmp eax,0x41
100048d9: 74 19 je 0x100048f4
100048db: ff 75 20 push DWORD PTR [ebp+0x20]
100048de: ff 75 1c push DWORD PTR [ebp+0x1c]
100048e1: ff 75 18 push DWORD PTR [ebp+0x18]
100048e4: ff 75 10 push DWORD PTR [ebp+0x10]
100048e7: ff 75 0c push DWORD PTR [ebp+0xc]
100048ea: ff 75 08 push DWORD PTR [ebp+0x8]
100048ed: e8 b9 fe ff ff call 0x100047ab
100048f2: eb 30 jmp 0x10004924
100048f4: ff 75 20 push DWORD PTR [ebp+0x20]
100048f7: ff 75 1c push DWORD PTR [ebp+0x1c]
100048fa: ff 75 18 push DWORD PTR [ebp+0x18]
100048fd: ff 75 10 push DWORD PTR [ebp+0x10]
10004900: ff 75 0c push DWORD PTR [ebp+0xc]
10004903: ff 75 08 push DWORD PTR [ebp+0x8]
10004906: e8 81 f9 ff ff call 0x1000428c
1000490b: eb 17 jmp 0x10004924
1000490d: ff 75 20 push DWORD PTR [ebp+0x20]
10004910: ff 75 1c push DWORD PTR [ebp+0x1c]
10004913: ff 75 18 push DWORD PTR [ebp+0x18]
10004916: ff 75 10 push DWORD PTR [ebp+0x10]
10004919: ff 75 0c push DWORD PTR [ebp+0xc]
1000491c: ff 75 08 push DWORD PTR [ebp+0x8]
1000491f: e8 7c f8 ff ff call 0x100041a0
10004924: 83 c4 18 add esp,0x18
10004927: 5d pop ebp
10004928: c3 ret
10004929: 55 push ebp
1000492a: 8b ec mov ebp,esp
1000492c: 6a 00 push 0x0
1000492e: ff 75 1c push DWORD PTR [ebp+0x1c]
10004931: ff 75 18 push DWORD PTR [ebp+0x18]
10004934: ff 75 14 push DWORD PTR [ebp+0x14]
10004937: ff 75 10 push DWORD PTR [ebp+0x10]
1000493a: ff 75 0c push DWORD PTR [ebp+0xc]
1000493d: ff 75 08 push DWORD PTR [ebp+0x8]
10004940: e8 5e ff ff ff call 0x100048a3
10004945: 83 c4 1c add esp,0x1c
10004948: 5d pop ebp
10004949: c3 ret
1000494a: 56 push esi
1000494b: 57 push edi
1000494c: 33 ff xor edi,edi
1000494e: 8d b7 18 00 01 10 lea esi,[edi+0x10010018]
10004954: ff 36 push DWORD PTR [esi]
10004956: e8 3c 17 00 00 call 0x10006097
1000495b: 83 c7 04 add edi,0x4
1000495e: 83 ff 28 cmp edi,0x28
10004961: 59 pop ecx
10004962: 89 06 mov DWORD PTR [esi],eax
10004964: 72 e8 jb 0x1000494e
10004966: 5f pop edi
10004967: 5e pop esi
10004968: c3 ret
10004969: 56 push esi
1000496a: 68 00 00 03 00 push 0x30000
1000496f: 68 00 00 01 00 push 0x10000
10004974: 33 f6 xor esi,esi
10004976: 56 push esi
10004977: e8 1c 3d 00 00 call 0x10008698
1000497c: 83 c4 0c add esp,0xc
1000497f: 85 c0 test eax,eax
10004981: 74 0d je 0x10004990
10004983: 56 push esi
10004984: 56 push esi
10004985: 56 push esi
10004986: 56 push esi
10004987: 56 push esi
10004988: e8 ed 30 00 00 call 0x10007a7a
1000498d: 83 c4 14 add esp,0x14
10004990: 5e pop esi
10004991: c3 ret
10004992: 55 push ebp
10004993: 8b ec mov ebp,esp
10004995: 83 ec 18 sub esp,0x18
10004998: dd 05 10 d2 00 10 fld QWORD PTR ds:0x1000d210
1000499e: dd 5d f0 fstp QWORD PTR [ebp-0x10]
100049a1: dd 05 08 d2 00 10 fld QWORD PTR ds:0x1000d208
100049a7: dd 5d e8 fstp QWORD PTR [ebp-0x18]
100049aa: dd 45 e8 fld QWORD PTR [ebp-0x18]
100049ad: dc 75 f0 fdiv QWORD PTR [ebp-0x10]
100049b0: dc 4d f0 fmul QWORD PTR [ebp-0x10]
100049b3: dc 6d e8 fsubr QWORD PTR [ebp-0x18]
100049b6: dd 5d f8 fstp QWORD PTR [ebp-0x8]
100049b9: d9 e8 fld1
100049bb: dc 5d f8 fcomp QWORD PTR [ebp-0x8]
100049be: df e0 fnstsw ax
100049c0: f6 c4 05 test ah,0x5
100049c3: 7a 05 jp 0x100049ca
100049c5: 33 c0 xor eax,eax
100049c7: 40 inc eax
100049c8: c9 leave
100049c9: c3 ret
100049ca: 33 c0 xor eax,eax
100049cc: c9 leave
100049cd: c3 ret
100049ce: 68 34 d2 00 10 push 0x1000d234
100049d3: ff 15 50 d0 00 10 call DWORD PTR ds:0x1000d050
100049d9: 85 c0 test eax,eax
100049db: 74 15 je 0x100049f2
100049dd: 68 18 d2 00 10 push 0x1000d218
100049e2: 50 push eax
100049e3: ff 15 4c d0 00 10 call DWORD PTR ds:0x1000d04c
100049e9: 85 c0 test eax,eax
100049eb: 74 05 je 0x100049f2
100049ed: 6a 00 push 0x0
100049ef: ff d0 call eax
100049f1: c3 ret
100049f2: e9 9b ff ff ff jmp 0x10004992
100049f7: 83 25 f4 5d 01 10 00 and DWORD PTR ds:0x10015df4,0x0
100049fe: e8 4f 3d 00 00 call 0x10008752
10004a03: a3 f4 5d 01 10 mov ds:0x10015df4,eax
10004a08: 33 c0 xor eax,eax
10004a0a: c3 ret
10004a0b: 8b 44 24 04 mov eax,DWORD PTR [esp+0x4]
10004a0f: 33 c9 xor ecx,ecx
10004a11: 3b 04 cd 40 00 01 10 cmp eax,DWORD PTR [ecx*8+0x10010040]
10004a18: 74 12 je 0x10004a2c
10004a1a: 41 inc ecx
10004a1b: 83 f9 2d cmp ecx,0x2d
10004a1e: 72 f1 jb 0x10004a11
10004a20: 8d 48 ed lea ecx,[eax-0x13]
10004a23: 83 f9 11 cmp ecx,0x11
10004a26: 77 0c ja 0x10004a34
10004a28: 6a 0d push 0xd
10004a2a: 58 pop eax
10004a2b: c3 ret
10004a2c: 8b 04 cd 44 00 01 10 mov eax,DWORD PTR [ecx*8+0x10010044]
10004a33: c3 ret
10004a34: 05 44 ff ff ff add eax,0xffffff44
10004a39: 6a 0e push 0xe
10004a3b: 59 pop ecx
10004a3c: 3b c8 cmp ecx,eax
10004a3e: 1b c0 sbb eax,eax
10004a40: 23 c1 and eax,ecx
10004a42: 83 c0 08 add eax,0x8
10004a45: c3 ret
10004a46: e8 68 18 00 00 call 0x100062b3
10004a4b: 85 c0 test eax,eax
10004a4d: 75 06 jne 0x10004a55
10004a4f: b8 a8 01 01 10 mov eax,0x100101a8
10004a54: c3 ret
10004a55: 83 c0 08 add eax,0x8
10004a58: c3 ret
10004a59: 55 push ebp
10004a5a: 8b ec mov ebp,esp
10004a5c: 51 push ecx
10004a5d: 51 push ecx
10004a5e: 56 push esi
10004a5f: 8d 45 fc lea eax,[ebp-0x4]
10004a62: 33 f6 xor esi,esi
10004a64: 50 push eax
10004a65: 89 75 fc mov DWORD PTR [ebp-0x4],esi
10004a68: 89 75 f8 mov DWORD PTR [ebp-0x8],esi
10004a6b: e8 5f 10 00 00 call 0x10005acf
10004a70: 85 c0 test eax,eax
10004a72: 59 pop ecx
10004a73: 74 0d je 0x10004a82
10004a75: 56 push esi
10004a76: 56 push esi
10004a77: 56 push esi
10004a78: 56 push esi
10004a79: 56 push esi
10004a7a: e8 fb 2f 00 00 call 0x10007a7a
10004a7f: 83 c4 14 add esp,0x14
10004a82: 8d 45 f8 lea eax,[ebp-0x8]
10004a85: 50 push eax
10004a86: e8 7b 10 00 00 call 0x10005b06
10004a8b: 85 c0 test eax,eax
10004a8d: 59 pop ecx
10004a8e: 74 0d je 0x10004a9d
10004a90: 56 push esi
10004a91: 56 push esi
10004a92: 56 push esi
10004a93: 56 push esi
10004a94: 56 push esi
10004a95: e8 e0 2f 00 00 call 0x10007a7a
10004a9a: 83 c4 14 add esp,0x14
10004a9d: 83 7d fc 02 cmp DWORD PTR [ebp-0x4],0x2
10004aa1: 5e pop esi
10004aa2: 75 0b jne 0x10004aaf
10004aa4: 83 7d f8 05 cmp DWORD PTR [ebp-0x8],0x5
10004aa8: 72 05 jb 0x10004aaf
10004aaa: 33 c0 xor eax,eax
10004aac: 40 inc eax
10004aad: c9 leave
10004aae: c3 ret
10004aaf: 6a 03 push 0x3
10004ab1: 58 pop eax
10004ab2: c9 leave
10004ab3: c3 ret
10004ab4: 33 c0 xor eax,eax
10004ab6: 39 44 24 04 cmp DWORD PTR [esp+0x4],eax
10004aba: 6a 00 push 0x0
10004abc: 0f 94 c0 sete al
10004abf: 68 00 10 00 00 push 0x1000
10004ac4: 50 push eax
10004ac5: ff 15 58 d0 00 10 call DWORD PTR ds:0x1000d058
10004acb: 85 c0 test eax,eax
10004acd: a3 4c 52 01 10 mov ds:0x1001524c,eax
10004ad2: 75 03 jne 0x10004ad7
10004ad4: 33 c0 xor eax,eax
10004ad6: c3 ret
10004ad7: e8 7d ff ff ff call 0x10004a59
10004adc: 83 f8 03 cmp eax,0x3
10004adf: a3 f0 5d 01 10 mov ds:0x10015df0,eax
10004ae4: 75 24 jne 0x10004b0a
10004ae6: 68 f8 03 00 00 push 0x3f8
10004aeb: e8 39 02 00 00 call 0x10004d29
10004af0: 85 c0 test eax,eax
10004af2: 59 pop ecx
10004af3: 75 15 jne 0x10004b0a
10004af5: ff 35 4c 52 01 10 push DWORD PTR ds:0x1001524c
10004afb: ff 15 54 d0 00 10 call DWORD PTR ds:0x1000d054
10004b01: 83 25 4c 52 01 10 00 and DWORD PTR ds:0x1001524c,0x0
10004b08: eb ca jmp 0x10004ad4
10004b0a: 33 c0 xor eax,eax
10004b0c: 40 inc eax
10004b0d: c3 ret
10004b0e: 55 push ebp
10004b0f: 33 ed xor ebp,ebp
10004b11: 83 3d f0 5d 01 10 03 cmp DWORD PTR ds:0x10015df0,0x3
10004b18: 75 54 jne 0x10004b6e
10004b1a: 53 push ebx
10004b1b: 8b 1d 34 d0 00 10 mov ebx,DWORD PTR ds:0x1000d034
10004b21: 57 push edi
10004b22: 33 ff xor edi,edi
10004b24: 39 2d d8 5d 01 10 cmp DWORD PTR ds:0x10015dd8,ebp
10004b2a: 7e 31 jle 0x10004b5d
10004b2c: 56 push esi
10004b2d: 8b 35 dc 5d 01 10 mov esi,DWORD PTR ds:0x10015ddc
10004b33: 83 c6 10 add esi,0x10
10004b36: 68 00 80 00 00 push 0x8000
10004b3b: 55 push ebp
10004b3c: ff 76 fc push DWORD PTR [esi-0x4]
10004b3f: ff 15 04 d0 00 10 call DWORD PTR ds:0x1000d004
10004b45: ff 36 push DWORD PTR [esi]
10004b47: 55 push ebp
10004b48: ff 35 4c 52 01 10 push DWORD PTR ds:0x1001524c
10004b4e: ff d3 call ebx
10004b50: 83 c6 14 add esi,0x14
10004b53: 47 inc edi
10004b54: 3b 3d d8 5d 01 10 cmp edi,DWORD PTR ds:0x10015dd8
10004b5a: 7c da jl 0x10004b36
10004b5c: 5e pop esi
10004b5d: ff 35 dc 5d 01 10 push DWORD PTR ds:0x10015ddc
10004b63: 55 push ebp
10004b64: ff 35 4c 52 01 10 push DWORD PTR ds:0x1001524c
10004b6a: ff d3 call ebx
10004b6c: 5f pop edi
10004b6d: 5b pop ebx
10004b6e: ff 35 4c 52 01 10 push DWORD PTR ds:0x1001524c
10004b74: ff 15 54 d0 00 10 call DWORD PTR ds:0x1000d054
10004b7a: 89 2d 4c 52 01 10 mov DWORD PTR ds:0x1001524c,ebp
10004b80: 5d pop ebp
10004b81: c3 ret
10004b82: 56 push esi
10004b83: 57 push edi
10004b84: 33 f6 xor esi,esi
10004b86: bf 50 52 01 10 mov edi,0x10015250
10004b8b: 83 3c f5 bc 01 01 10 cmp DWORD PTR [esi*8+0x100101bc],0x1
10004b92: 01
10004b93: 75 1e jne 0x10004bb3
10004b95: 8d 04 f5 b8 01 01 10 lea eax,[esi*8+0x100101b8]
10004b9c: 89 38 mov DWORD PTR [eax],edi
10004b9e: 68 a0 0f 00 00 push 0xfa0
10004ba3: ff 30 push DWORD PTR [eax]
10004ba5: 83 c7 18 add edi,0x18
10004ba8: e8 2c 3c 00 00 call 0x100087d9
10004bad: 85 c0 test eax,eax
10004baf: 59 pop ecx
10004bb0: 59 pop ecx
10004bb1: 74 0c je 0x10004bbf
10004bb3: 46 inc esi
10004bb4: 83 fe 24 cmp esi,0x24
10004bb7: 7c d2 jl 0x10004b8b
10004bb9: 33 c0 xor eax,eax
10004bbb: 40 inc eax
10004bbc: 5f pop edi
10004bbd: 5e pop esi
10004bbe: c3 ret
10004bbf: 83 24 f5 b8 01 01 10 and DWORD PTR [esi*8+0x100101b8],0x0
10004bc6: 00
10004bc7: 33 c0 xor eax,eax
10004bc9: eb f1 jmp 0x10004bbc
10004bcb: 53 push ebx
10004bcc: 8b 1d 5c d0 00 10 mov ebx,DWORD PTR ds:0x1000d05c
10004bd2: 56 push esi
10004bd3: be b8 01 01 10 mov esi,0x100101b8
10004bd8: 57 push edi
10004bd9: 8b 3e mov edi,DWORD PTR [esi]
10004bdb: 85 ff test edi,edi
10004bdd: 74 13 je 0x10004bf2
10004bdf: 83 7e 04 01 cmp DWORD PTR [esi+0x4],0x1
10004be3: 74 0d je 0x10004bf2
10004be5: 57 push edi
10004be6: ff d3 call ebx
10004be8: 57 push edi
10004be9: e8 8d ed ff ff call 0x1000397b
10004bee: 83 26 00 and DWORD PTR [esi],0x0
10004bf1: 59 pop ecx
10004bf2: 83 c6 08 add esi,0x8
10004bf5: 81 fe d8 02 01 10 cmp esi,0x100102d8
10004bfb: 7c dc jl 0x10004bd9
10004bfd: be b8 01 01 10 mov esi,0x100101b8
10004c02: 5f pop edi
10004c03: 8b 06 mov eax,DWORD PTR [esi]
10004c05: 85 c0 test eax,eax
10004c07: 74 09 je 0x10004c12
10004c09: 83 7e 04 01 cmp DWORD PTR [esi+0x4],0x1
10004c0d: 75 03 jne 0x10004c12
10004c0f: 50 push eax
10004c10: ff d3 call ebx
10004c12: 83 c6 08 add esi,0x8
10004c15: 81 fe d8 02 01 10 cmp esi,0x100102d8
10004c1b: 7c e6 jl 0x10004c03
10004c1d: 5e pop esi
10004c1e: 5b pop ebx
10004c1f: c3 ret
10004c20: 55 push ebp
10004c21: 8b ec mov ebp,esp
10004c23: 8b 45 08 mov eax,DWORD PTR [ebp+0x8]
10004c26: ff 34 c5 b8 01 01 10 push DWORD PTR [eax*8+0x100101b8]
10004c2d: ff 15 60 d0 00 10 call DWORD PTR ds:0x1000d060
10004c33: 5d pop ebp
10004c34: c3 ret
10004c35: 6a 0c push 0xc
10004c37: 68 20 e4 00 10 push 0x1000e420
10004c3c: e8 e7 0b 00 00 call 0x10005828
10004c41: 33 ff xor edi,edi
10004c43: 47 inc edi
10004c44: 89 7d e4 mov DWORD PTR [ebp-0x1c],edi
10004c47: 33 db xor ebx,ebx
10004c49: 39 1d 4c 52 01 10 cmp DWORD PTR ds:0x1001524c,ebx
10004c4f: 75 18 jne 0x10004c69
10004c51: e8 6c 12 00 00 call 0x10005ec2
10004c56: 6a 1e push 0x1e
10004c58: e8 c5 10 00 00 call 0x10005d22
10004c5d: 68 ff 00 00 00 push 0xff
10004c62: e8 09 0e 00 00 call 0x10005a70
10004c67: 59 pop ecx
10004c68: 59 pop ecx
10004c69: 8b 75 08 mov esi,DWORD PTR [ebp+0x8]
10004c6c: 8d 34 f5 b8 01 01 10 lea esi,[esi*8+0x100101b8]
10004c73: 39 1e cmp DWORD PTR [esi],ebx
10004c75: 74 04 je 0x10004c7b
10004c77: 8b c7 mov eax,edi
10004c79: eb 6e jmp 0x10004ce9
10004c7b: 6a 18 push 0x18
10004c7d: e8 ce 19 00 00 call 0x10006650
10004c82: 59 pop ecx
10004c83: 8b f8 mov edi,eax
10004c85: 3b fb cmp edi,ebx
10004c87: 75 0f jne 0x10004c98
10004c89: e8 b8 fd ff ff call 0x10004a46
10004c8e: c7 00 0c 00 00 00 mov DWORD PTR [eax],0xc
10004c94: 33 c0 xor eax,eax
10004c96: eb 51 jmp 0x10004ce9
10004c98: 6a 0a push 0xa
10004c9a: e8 59 00 00 00 call 0x10004cf8
10004c9f: 59 pop ecx
10004ca0: 89 5d fc mov DWORD PTR [ebp-0x4],ebx
10004ca3: 39 1e cmp DWORD PTR [esi],ebx
10004ca5: 75 2c jne 0x10004cd3
10004ca7: 68 a0 0f 00 00 push 0xfa0
10004cac: 57 push edi
10004cad: e8 27 3b 00 00 call 0x100087d9
10004cb2: 59 pop ecx
10004cb3: 59 pop ecx
10004cb4: 85 c0 test eax,eax
10004cb6: 75 17 jne 0x10004ccf
10004cb8: 57 push edi
10004cb9: e8 bd ec ff ff call 0x1000397b
10004cbe: 59 pop ecx
10004cbf: e8 82 fd ff ff call 0x10004a46
10004cc4: c7 00 0c 00 00 00 mov DWORD PTR [eax],0xc
10004cca: 89 5d e4 mov DWORD PTR [ebp-0x1c],ebx
10004ccd: eb 0b jmp 0x10004cda
10004ccf: 89 3e mov DWORD PTR [esi],edi
10004cd1: eb 07 jmp 0x10004cda
10004cd3: 57 push edi
10004cd4: e8 a2 ec ff ff call 0x1000397b
10004cd9: 59 pop ecx
10004cda: c7 45 fc fe ff ff ff mov DWORD PTR [ebp-0x4],0xfffffffe
10004ce1: e8 09 00 00 00 call 0x10004cef
10004ce6: 8b 45 e4 mov eax,DWORD PTR [ebp-0x1c]
10004ce9: e8 7f 0b 00 00 call 0x1000586d
10004cee: c3 ret
10004cef: 6a 0a push 0xa
10004cf1: e8 2a ff ff ff call 0x10004c20
10004cf6: 59 pop ecx
10004cf7: c3 ret
10004cf8: 55 push ebp
10004cf9: 8b ec mov ebp,esp
10004cfb: 8b 45 08 mov eax,DWORD PTR [ebp+0x8]
10004cfe: 56 push esi
10004cff: 8d 34 c5 b8 01 01 10 lea esi,[eax*8+0x100101b8]
10004d06: 83 3e 00 cmp DWORD PTR [esi],0x0
10004d09: 75 13 jne 0x10004d1e
10004d0b: 50 push eax
10004d0c: e8 24 ff ff ff call 0x10004c35
10004d11: 85 c0 test eax,eax
10004d13: 59 pop ecx
10004d14: 75 08 jne 0x10004d1e
10004d16: 6a 11 push 0x11
10004d18: e8 09 0d 00 00 call 0x10005a26
10004d1d: 59 pop ecx
10004d1e: ff 36 push DWORD PTR [esi]
10004d20: ff 15 64 d0 00 10 call DWORD PTR ds:0x1000d064
10004d26: 5e pop esi
10004d27: 5d pop ebp
10004d28: c3 ret
10004d29: 68 40 01 00 00 push 0x140
10004d2e: 6a 00 push 0x0
10004d30: ff 35 4c 52 01 10 push DWORD PTR ds:0x1001524c
10004d36: ff 15 38 d0 00 10 call DWORD PTR ds:0x1000d038
10004d3c: 85 c0 test eax,eax
10004d3e: a3 dc 5d 01 10 mov ds:0x10015ddc,eax
10004d43: 75 01 jne 0x10004d46
10004d45: c3 ret
10004d46: 8b 4c 24 04 mov ecx,DWORD PTR [esp+0x4]
10004d4a: 83 25 a0 53 01 10 00 and DWORD PTR ds:0x100153a0,0x0
10004d51: 83 25 d8 5d 01 10 00 and DWORD PTR ds:0x10015dd8,0x0
10004d58: a3 e4 5d 01 10 mov ds:0x10015de4,eax
10004d5d: 33 c0 xor eax,eax
10004d5f: 89 0d e0 5d 01 10 mov DWORD PTR ds:0x10015de0,ecx
10004d65: c7 05 e8 5d 01 10 10 mov DWORD PTR ds:0x10015de8,0x10
10004d6c: 00 00 00
10004d6f: 40 inc eax
10004d70: c3 ret
10004d71: 8b 0d d8 5d 01 10 mov ecx,DWORD PTR ds:0x10015dd8
10004d77: a1 dc 5d 01 10 mov eax,ds:0x10015ddc
10004d7c: 6b c9 14 imul ecx,ecx,0x14
10004d7f: 03 c8 add ecx,eax
10004d81: eb 12 jmp 0x10004d95
10004d83: 8b 54 24 04 mov edx,DWORD PTR [esp+0x4]
10004d87: 2b 50 0c sub edx,DWORD PTR [eax+0xc]
10004d8a: 81 fa 00 00 10 00 cmp edx,0x100000
10004d90: 72 09 jb 0x10004d9b
10004d92: 83 c0 14 add eax,0x14
10004d95: 3b c1 cmp eax,ecx
10004d97: 72 ea jb 0x10004d83
10004d99: 33 c0 xor eax,eax
10004d9b: c3 ret
10004d9c: 55 push ebp
10004d9d: 8b ec mov ebp,esp
10004d9f: 83 ec 10 sub esp,0x10
10004da2: 8b 4d 08 mov ecx,DWORD PTR [ebp+0x8]
10004da5: 8b 41 10 mov eax,DWORD PTR [ecx+0x10]
10004da8: 56 push esi
10004da9: 8b 75 0c mov esi,DWORD PTR [ebp+0xc]
10004dac: 57 push edi
10004dad: 8b fe mov edi,esi
10004daf: 2b 79 0c sub edi,DWORD PTR [ecx+0xc]
10004db2: 83 c6 fc add esi,0xfffffffc
10004db5: c1 ef 0f shr edi,0xf
10004db8: 8b cf mov ecx,edi
10004dba: 69 c9 04 02 00 00 imul ecx,ecx,0x204
10004dc0: 8d 8c 01 44 01 00 00 lea ecx,[ecx+eax*1+0x144]
10004dc7: 89 4d f0 mov DWORD PTR [ebp-0x10],ecx
10004dca: 8b 0e mov ecx,DWORD PTR [esi]
10004dcc: 49 dec ecx
10004dcd: f6 c1 01 test cl,0x1
10004dd0: 89 4d fc mov DWORD PTR [ebp-0x4],ecx
10004dd3: 0f 85 d3 02 00 00 jne 0x100050ac
10004dd9: 53 push ebx
10004dda: 8d 1c 31 lea ebx,[ecx+esi*1]
10004ddd: 8b 13 mov edx,DWORD PTR [ebx]
10004ddf: 89 55 f4 mov DWORD PTR [ebp-0xc],edx
10004de2: 8b 56 fc mov edx,DWORD PTR [esi-0x4]
10004de5: 89 55 f8 mov DWORD PTR [ebp-0x8],edx
10004de8: 8b 55 f4 mov edx,DWORD PTR [ebp-0xc]
10004deb: f6 c2 01 test dl,0x1
10004dee: 89 5d 0c mov DWORD PTR [ebp+0xc],ebx
10004df1: 75 74 jne 0x10004e67
10004df3: c1 fa 04 sar edx,0x4
10004df6: 4a dec edx
10004df7: 83 fa 3f cmp edx,0x3f
10004dfa: 76 03 jbe 0x10004dff
10004dfc: 6a 3f push 0x3f
10004dfe: 5a pop edx
10004dff: 8b 4b 04 mov ecx,DWORD PTR [ebx+0x4]
10004e02: 3b 4b 08 cmp ecx,DWORD PTR [ebx+0x8]
10004e05: 75 42 jne 0x10004e49
10004e07: 83 fa 20 cmp edx,0x20
10004e0a: bb 00 00 00 80 mov ebx,0x80000000
10004e0f: 73 19 jae 0x10004e2a
10004e11: 8b ca mov ecx,edx
10004e13: d3 eb shr ebx,cl
10004e15: 8d 4c 02 04 lea ecx,[edx+eax*1+0x4]
10004e19: f7 d3 not ebx
10004e1b: 21 5c b8 44 and DWORD PTR [eax+edi*4+0x44],ebx
10004e1f: fe 09 dec BYTE PTR [ecx]
10004e21: 75 23 jne 0x10004e46
10004e23: 8b 4d 08 mov ecx,DWORD PTR [ebp+0x8]
10004e26: 21 19 and DWORD PTR [ecx],ebx
10004e28: eb 1c jmp 0x10004e46
10004e2a: 8d 4a e0 lea ecx,[edx-0x20]
10004e2d: d3 eb shr ebx,cl
10004e2f: 8d 4c 02 04 lea ecx,[edx+eax*1+0x4]
10004e33: f7 d3 not ebx
10004e35: 21 9c b8 c4 00 00 00 and DWORD PTR [eax+edi*4+0xc4],ebx
10004e3c: fe 09 dec BYTE PTR [ecx]
10004e3e: 75 06 jne 0x10004e46
10004e40: 8b 4d 08 mov ecx,DWORD PTR [ebp+0x8]
10004e43: 21 59 04 and DWORD PTR [ecx+0x4],ebx
10004e46: 8b 5d 0c mov ebx,DWORD PTR [ebp+0xc]
10004e49: 8b 53 08 mov edx,DWORD PTR [ebx+0x8]
10004e4c: 8b 5b 04 mov ebx,DWORD PTR [ebx+0x4]
10004e4f: 8b 4d fc mov ecx,DWORD PTR [ebp-0x4]
10004e52: 03 4d f4 add ecx,DWORD PTR [ebp-0xc]
10004e55: 89 5a 04 mov DWORD PTR [edx+0x4],ebx
10004e58: 8b 55 0c mov edx,DWORD PTR [ebp+0xc]
10004e5b: 8b 5a 04 mov ebx,DWORD PTR [edx+0x4]
10004e5e: 8b 52 08 mov edx,DWORD PTR [edx+0x8]
10004e61: 89 53 08 mov DWORD PTR [ebx+0x8],edx
10004e64: 89 4d fc mov DWORD PTR [ebp-0x4],ecx
10004e67: 8b d1 mov edx,ecx
10004e69: c1 fa 04 sar edx,0x4
10004e6c: 4a dec edx
10004e6d: 83 fa 3f cmp edx,0x3f
10004e70: 76 03 jbe 0x10004e75
10004e72: 6a 3f push 0x3f
10004e74: 5a pop edx
10004e75: 8b 5d f8 mov ebx,DWORD PTR [ebp-0x8]
10004e78: 83 e3 01 and ebx,0x1
10004e7b: 89 5d f4 mov DWORD PTR [ebp-0xc],ebx
10004e7e: 0f 85 8f 00 00 00 jne 0x10004f13
10004e84: 2b 75 f8 sub esi,DWORD PTR [ebp-0x8]
10004e87: 8b 5d f8 mov ebx,DWORD PTR [ebp-0x8]
10004e8a: c1 fb 04 sar ebx,0x4
10004e8d: 6a 3f push 0x3f
10004e8f: 89 75 0c mov DWORD PTR [ebp+0xc],esi
10004e92: 4b dec ebx
10004e93: 5e pop esi
10004e94: 3b de cmp ebx,esi
10004e96: 76 02 jbe 0x10004e9a
10004e98: 8b de mov ebx,esi
10004e9a: 03 4d f8 add ecx,DWORD PTR [ebp-0x8]
10004e9d: 8b d1 mov edx,ecx
10004e9f: c1 fa 04 sar edx,0x4
10004ea2: 4a dec edx
10004ea3: 3b d6 cmp edx,esi
10004ea5: 89 4d fc mov DWORD PTR [ebp-0x4],ecx
10004ea8: 76 02 jbe 0x10004eac
10004eaa: 8b d6 mov edx,esi
10004eac: 3b da cmp ebx,edx
10004eae: 74 5e je 0x10004f0e
10004eb0: 8b 4d 0c mov ecx,DWORD PTR [ebp+0xc]
10004eb3: 8b 71 04 mov esi,DWORD PTR [ecx+0x4]
10004eb6: 3b 71 08 cmp esi,DWORD PTR [ecx+0x8]
10004eb9: 75 3b jne 0x10004ef6
10004ebb: 83 fb 20 cmp ebx,0x20
10004ebe: be 00 00 00 80 mov esi,0x80000000
10004ec3: 73 17 jae 0x10004edc
10004ec5: 8b cb mov ecx,ebx
10004ec7: d3 ee shr esi,cl
10004ec9: f7 d6 not esi
10004ecb: 21 74 b8 44 and DWORD PTR [eax+edi*4+0x44],esi
10004ecf: fe 4c 03 04 dec BYTE PTR [ebx+eax*1+0x4]
10004ed3: 75 21 jne 0x10004ef6
10004ed5: 8b 4d 08 mov ecx,DWORD PTR [ebp+0x8]
10004ed8: 21 31 and DWORD PTR [ecx],esi
10004eda: eb 1a jmp 0x10004ef6
10004edc: 8d 4b e0 lea ecx,[ebx-0x20]
10004edf: d3 ee shr esi,cl
10004ee1: f7 d6 not esi
10004ee3: 21 b4 b8 c4 00 00 00 and DWORD PTR [eax+edi*4+0xc4],esi
10004eea: fe 4c 03 04 dec BYTE PTR [ebx+eax*1+0x4]
10004eee: 75 06 jne 0x10004ef6
10004ef0: 8b 4d 08 mov ecx,DWORD PTR [ebp+0x8]
10004ef3: 21 71 04 and DWORD PTR [ecx+0x4],esi
10004ef6: 8b 4d 0c mov ecx,DWORD PTR [ebp+0xc]
10004ef9: 8b 71 08 mov esi,DWORD PTR [ecx+0x8]
10004efc: 8b 49 04 mov ecx,DWORD PTR [ecx+0x4]
10004eff: 89 4e 04 mov DWORD PTR [esi+0x4],ecx
10004f02: 8b 4d 0c mov ecx,DWORD PTR [ebp+0xc]
10004f05: 8b 71 04 mov esi,DWORD PTR [ecx+0x4]
10004f08: 8b 49 08 mov ecx,DWORD PTR [ecx+0x8]
10004f0b: 89 4e 08 mov DWORD PTR [esi+0x8],ecx
10004f0e: 8b 75 0c mov esi,DWORD PTR [ebp+0xc]
10004f11: eb 03 jmp 0x10004f16
10004f13: 8b 5d 08 mov ebx,DWORD PTR [ebp+0x8]
10004f16: 83 7d f4 00 cmp DWORD PTR [ebp-0xc],0x0
10004f1a: 75 08 jne 0x10004f24
10004f1c: 3b da cmp ebx,edx
10004f1e: 0f 84 80 00 00 00 je 0x10004fa4
10004f24: 8b 4d f0 mov ecx,DWORD PTR [ebp-0x10]
10004f27: 8d 0c d1 lea ecx,[ecx+edx*8]
10004f2a: 8b 59 04 mov ebx,DWORD PTR [ecx+0x4]
10004f2d: 89 4e 08 mov DWORD PTR [esi+0x8],ecx
10004f30: 89 5e 04 mov DWORD PTR [esi+0x4],ebx
10004f33: 89 71 04 mov DWORD PTR [ecx+0x4],esi
10004f36: 8b 4e 04 mov ecx,DWORD PTR [esi+0x4]
10004f39: 89 71 08 mov DWORD PTR [ecx+0x8],esi
10004f3c: 8b 4e 04 mov ecx,DWORD PTR [esi+0x4]
10004f3f: 3b 4e 08 cmp ecx,DWORD PTR [esi+0x8]
10004f42: 75 60 jne 0x10004fa4
10004f44: 8a 4c 02 04 mov cl,BYTE PTR [edx+eax*1+0x4]
10004f48: 88 4d 0f mov BYTE PTR [ebp+0xf],cl
10004f4b: fe c1 inc cl
10004f4d: 83 fa 20 cmp edx,0x20
10004f50: 88 4c 02 04 mov BYTE PTR [edx+eax*1+0x4],cl
10004f54: 73 25 jae 0x10004f7b
10004f56: 80 7d 0f 00 cmp BYTE PTR [ebp+0xf],0x0
10004f5a: 75 0e jne 0x10004f6a
10004f5c: 8b ca mov ecx,edx
10004f5e: bb 00 00 00 80 mov ebx,0x80000000
10004f63: d3 eb shr ebx,cl
10004f65: 8b 4d 08 mov ecx,DWORD PTR [ebp+0x8]
10004f68: 09 19 or DWORD PTR [ecx],ebx
10004f6a: bb 00 00 00 80 mov ebx,0x80000000
10004f6f: 8b ca mov ecx,edx
10004f71: d3 eb shr ebx,cl
10004f73: 8d 44 b8 44 lea eax,[eax+edi*4+0x44]
10004f77: 09 18 or DWORD PTR [eax],ebx
10004f79: eb 29 jmp 0x10004fa4
10004f7b: 80 7d 0f 00 cmp BYTE PTR [ebp+0xf],0x0
10004f7f: 75 10 jne 0x10004f91
10004f81: 8d 4a e0 lea ecx,[edx-0x20]
10004f84: bb 00 00 00 80 mov ebx,0x80000000
10004f89: d3 eb shr ebx,cl
10004f8b: 8b 4d 08 mov ecx,DWORD PTR [ebp+0x8]
10004f8e: 09 59 04 or DWORD PTR [ecx+0x4],ebx
10004f91: 8d 4a e0 lea ecx,[edx-0x20]
10004f94: ba 00 00 00 80 mov edx,0x80000000
10004f99: d3 ea shr edx,cl
10004f9b: 8d 84 b8 c4 00 00 00 lea eax,[eax+edi*4+0xc4]
10004fa2: 09 10 or DWORD PTR [eax],edx
10004fa4: 8b 45 fc mov eax,DWORD PTR [ebp-0x4]
10004fa7: 89 06 mov DWORD PTR [esi],eax
10004fa9: 89 44 30 fc mov DWORD PTR [eax+esi*1-0x4],eax
10004fad: 8b 45 f0 mov eax,DWORD PTR [ebp-0x10]
10004fb0: ff 08 dec DWORD PTR [eax]
10004fb2: 0f 85 f3 00 00 00 jne 0x100050ab
10004fb8: a1 a0 53 01 10 mov eax,ds:0x100153a0
10004fbd: 85 c0 test eax,eax
10004fbf: 0f 84 d8 00 00 00 je 0x1000509d
10004fc5: 8b 0d ec 5d 01 10 mov ecx,DWORD PTR ds:0x10015dec
10004fcb: 8b 35 04 d0 00 10 mov esi,DWORD PTR ds:0x1000d004
10004fd1: 68 00 40 00 00 push 0x4000
10004fd6: c1 e1 0f shl ecx,0xf
10004fd9: 03 48 0c add ecx,DWORD PTR [eax+0xc]
10004fdc: bb 00 80 00 00 mov ebx,0x8000
10004fe1: 53 push ebx
10004fe2: 51 push ecx
10004fe3: ff d6 call esi
10004fe5: 8b 0d ec 5d 01 10 mov ecx,DWORD PTR ds:0x10015dec
10004feb: a1 a0 53 01 10 mov eax,ds:0x100153a0
10004ff0: ba 00 00 00 80 mov edx,0x80000000
10004ff5: d3 ea shr edx,cl
10004ff7: 09 50 08 or DWORD PTR [eax+0x8],edx
10004ffa: a1 a0 53 01 10 mov eax,ds:0x100153a0
10004fff: 8b 40 10 mov eax,DWORD PTR [eax+0x10]
10005002: 8b 0d ec 5d 01 10 mov ecx,DWORD PTR ds:0x10015dec
10005008: 83 a4 88 c4 00 00 00 and DWORD PTR [eax+ecx*4+0xc4],0x0
1000500f: 00
10005010: a1 a0 53 01 10 mov eax,ds:0x100153a0
10005015: 8b 40 10 mov eax,DWORD PTR [eax+0x10]
10005018: fe 48 43 dec BYTE PTR [eax+0x43]
1000501b: a1 a0 53 01 10 mov eax,ds:0x100153a0
10005020: 8b 48 10 mov ecx,DWORD PTR [eax+0x10]
10005023: 80 79 43 00 cmp BYTE PTR [ecx+0x43],0x0
10005027: 75 09 jne 0x10005032
10005029: 83 60 04 fe and DWORD PTR [eax+0x4],0xfffffffe
1000502d: a1 a0 53 01 10 mov eax,ds:0x100153a0
10005032: 83 78 08 ff cmp DWORD PTR [eax+0x8],0xffffffff
10005036: 75 65 jne 0x1000509d
10005038: 53 push ebx
10005039: 6a 00 push 0x0
1000503b: ff 70 0c push DWORD PTR [eax+0xc]
1000503e: ff d6 call esi
10005040: a1 a0 53 01 10 mov eax,ds:0x100153a0
10005045: ff 70 10 push DWORD PTR [eax+0x10]
10005048: 6a 00 push 0x0
1000504a: ff 35 4c 52 01 10 push DWORD PTR ds:0x1001524c
10005050: ff 15 34 d0 00 10 call DWORD PTR ds:0x1000d034
10005056: 8b 0d d8 5d 01 10 mov ecx,DWORD PTR ds:0x10015dd8
1000505c: a1 a0 53 01 10 mov eax,ds:0x100153a0
10005061: 6b c9 14 imul ecx,ecx,0x14
10005064: 8b 15 dc 5d 01 10 mov edx,DWORD PTR ds:0x10015ddc
1000506a: 2b c8 sub ecx,eax
1000506c: 8d 4c 11 ec lea ecx,[ecx+edx*1-0x14]
10005070: 51 push ecx
10005071: 8d 48 14 lea ecx,[eax+0x14]
10005074: 51 push ecx
10005075: 50 push eax
10005076: e8 25 2e 00 00 call 0x10007ea0
1000507b: 8b 45 08 mov eax,DWORD PTR [ebp+0x8]
1000507e: 83 c4 0c add esp,0xc
10005081: ff 0d d8 5d 01 10 dec DWORD PTR ds:0x10015dd8
10005087: 3b 05 a0 53 01 10 cmp eax,DWORD PTR ds:0x100153a0
1000508d: 76 04 jbe 0x10005093
1000508f: 83 6d 08 14 sub DWORD PTR [ebp+0x8],0x14
10005093: a1 dc 5d 01 10 mov eax,ds:0x10015ddc
10005098: a3 e4 5d 01 10 mov ds:0x10015de4,eax
1000509d: 8b 45 08 mov eax,DWORD PTR [ebp+0x8]
100050a0: a3 a0 53 01 10 mov ds:0x100153a0,eax
100050a5: 89 3d ec 5d 01 10 mov DWORD PTR ds:0x10015dec,edi
100050ab: 5b pop ebx
100050ac: 5f pop edi
100050ad: 5e pop esi
100050ae: c9 leave
100050af: c3 ret
100050b0: a1 e8 5d 01 10 mov eax,ds:0x10015de8
100050b5: 56 push esi
100050b6: 8b 35 d8 5d 01 10 mov esi,DWORD PTR ds:0x10015dd8
100050bc: 57 push edi
100050bd: 33 ff xor edi,edi
100050bf: 3b f0 cmp esi,eax
100050c1: 75 34 jne 0x100050f7
100050c3: 83 c0 10 add eax,0x10
100050c6: 6b c0 14 imul eax,eax,0x14
100050c9: 50 push eax
100050ca: ff 35 dc 5d 01 10 push DWORD PTR ds:0x10015ddc
100050d0: 57 push edi
100050d1: ff 35 4c 52 01 10 push DWORD PTR ds:0x1001524c
100050d7: ff 15 68 d0 00 10 call DWORD PTR ds:0x1000d068
100050dd: 3b c7 cmp eax,edi
100050df: 75 04 jne 0x100050e5
100050e1: 33 c0 xor eax,eax
100050e3: eb 78 jmp 0x1000515d
100050e5: 83 05 e8 5d 01 10 10 add DWORD PTR ds:0x10015de8,0x10
100050ec: 8b 35 d8 5d 01 10 mov esi,DWORD PTR ds:0x10015dd8
100050f2: a3 dc 5d 01 10 mov ds:0x10015ddc,eax
100050f7: 6b f6 14 imul esi,esi,0x14
100050fa: 03 35 dc 5d 01 10 add esi,DWORD PTR ds:0x10015ddc
10005100: 68 c4 41 00 00 push 0x41c4
10005105: 6a 08 push 0x8
10005107: ff 35 4c 52 01 10 push DWORD PTR ds:0x1001524c
1000510d: ff 15 38 d0 00 10 call DWORD PTR ds:0x1000d038
10005113: 3b c7 cmp eax,edi
10005115: 89 46 10 mov DWORD PTR [esi+0x10],eax
10005118: 74 c7 je 0x100050e1
1000511a: 6a 04 push 0x4
1000511c: 68 00 20 00 00 push 0x2000
10005121: 68 00 00 10 00 push 0x100000
10005126: 57 push edi
10005127: ff 15 08 d0 00 10 call DWORD PTR ds:0x1000d008
1000512d: 3b c7 cmp eax,edi
1000512f: 89 46 0c mov DWORD PTR [esi+0xc],eax
10005132: 75 12 jne 0x10005146
10005134: ff 76 10 push DWORD PTR [esi+0x10]
10005137: 57 push edi
10005138: ff 35 4c 52 01 10 push DWORD PTR ds:0x1001524c
1000513e: ff 15 34 d0 00 10 call DWORD PTR ds:0x1000d034
10005144: eb 9b jmp 0x100050e1
10005146: 83 4e 08 ff or DWORD PTR [esi+0x8],0xffffffff
1000514a: 89 3e mov DWORD PTR [esi],edi
1000514c: 89 7e 04 mov DWORD PTR [esi+0x4],edi
1000514f: ff 05 d8 5d 01 10 inc DWORD PTR ds:0x10015dd8
10005155: 8b 46 10 mov eax,DWORD PTR [esi+0x10]
10005158: 83 08 ff or DWORD PTR [eax],0xffffffff
1000515b: 8b c6 mov eax,esi
1000515d: 5f pop edi
1000515e: 5e pop esi
1000515f: c3 ret
10005160: 55 push ebp
10005161: 8b ec mov ebp,esp
10005163: 51 push ecx
10005164: 51 push ecx
10005165: 8b 4d 08 mov ecx,DWORD PTR [ebp+0x8]
10005168: 8b 41 08 mov eax,DWORD PTR [ecx+0x8]
1000516b: 53 push ebx
1000516c: 56 push esi
1000516d: 8b 71 10 mov esi,DWORD PTR [ecx+0x10]
10005170: 57 push edi
10005171: 33 db xor ebx,ebx
10005173: eb 03 jmp 0x10005178
10005175: 03 c0 add eax,eax
10005177: 43 inc ebx
10005178: 85 c0 test eax,eax
1000517a: 7d f9 jge 0x10005175
1000517c: 8b c3 mov eax,ebx
1000517e: 69 c0 04 02 00 00 imul eax,eax,0x204
10005184: 8d 84 30 44 01 00 00 lea eax,[eax+esi*1+0x144]
1000518b: 6a 3f push 0x3f
1000518d: 89 45 f8 mov DWORD PTR [ebp-0x8],eax
10005190: 5a pop edx
10005191: 89 40 08 mov DWORD PTR [eax+0x8],eax
10005194: 89 40 04 mov DWORD PTR [eax+0x4],eax
10005197: 83 c0 08 add eax,0x8
1000519a: 4a dec edx
1000519b: 75 f4 jne 0x10005191
1000519d: 6a 04 push 0x4
1000519f: 8b fb mov edi,ebx
100051a1: 68 00 10 00 00 push 0x1000
100051a6: c1 e7 0f shl edi,0xf
100051a9: 03 79 0c add edi,DWORD PTR [ecx+0xc]
100051ac: 68 00 80 00 00 push 0x8000
100051b1: 57 push edi
100051b2: ff 15 08 d0 00 10 call DWORD PTR ds:0x1000d008
100051b8: 85 c0 test eax,eax
100051ba: 75 08 jne 0x100051c4
100051bc: 83 c8 ff or eax,0xffffffff
100051bf: e9 9d 00 00 00 jmp 0x10005261
100051c4: 8d 97 00 70 00 00 lea edx,[edi+0x7000]
100051ca: 3b fa cmp edi,edx
100051cc: 89 55 fc mov DWORD PTR [ebp-0x4],edx
100051cf: 77 43 ja 0x10005214
100051d1: 8b ca mov ecx,edx
100051d3: 2b cf sub ecx,edi
100051d5: c1 e9 0c shr ecx,0xc
100051d8: 8d 47 10 lea eax,[edi+0x10]
100051db: 41 inc ecx
100051dc: 83 48 f8 ff or DWORD PTR [eax-0x8],0xffffffff
100051e0: 83 88 ec 0f 00 00 ff or DWORD PTR [eax+0xfec],0xffffffff
100051e7: 8d 90 fc 0f 00 00 lea edx,[eax+0xffc]
100051ed: 89 10 mov DWORD PTR [eax],edx
100051ef: 8d 90 fc ef ff ff lea edx,[eax-0x1004]
100051f5: c7 40 fc f0 0f 00 00 mov DWORD PTR [eax-0x4],0xff0
100051fc: 89 50 04 mov DWORD PTR [eax+0x4],edx
100051ff: c7 80 e8 0f 00 00 f0 mov DWORD PTR [eax+0xfe8],0xff0
10005206: 0f 00 00
10005209: 05 00 10 00 00 add eax,0x1000
1000520e: 49 dec ecx
1000520f: 75 cb jne 0x100051dc
10005211: 8b 55 fc mov edx,DWORD PTR [ebp-0x4]
10005214: 8b 45 f8 mov eax,DWORD PTR [ebp-0x8]
10005217: 05 f8 01 00 00 add eax,0x1f8
1000521c: 8d 4f 0c lea ecx,[edi+0xc]
1000521f: 89 48 04 mov DWORD PTR [eax+0x4],ecx
10005222: 89 41 08 mov DWORD PTR [ecx+0x8],eax
10005225: 8d 4a 0c lea ecx,[edx+0xc]
10005228: 89 48 08 mov DWORD PTR [eax+0x8],ecx
1000522b: 89 41 04 mov DWORD PTR [ecx+0x4],eax
1000522e: 83 64 9e 44 00 and DWORD PTR [esi+ebx*4+0x44],0x0
10005233: 33 ff xor edi,edi
10005235: 47 inc edi
10005236: 89 bc 9e c4 00 00 00 mov DWORD PTR [esi+ebx*4+0xc4],edi
1000523d: 8a 46 43 mov al,BYTE PTR [esi+0x43]
10005240: 8a c8 mov cl,al
10005242: fe c1 inc cl
10005244: 84 c0 test al,al
10005246: 8b 45 08 mov eax,DWORD PTR [ebp+0x8]
10005249: 88 4e 43 mov BYTE PTR [esi+0x43],cl
1000524c: 75 03 jne 0x10005251
1000524e: 09 78 04 or DWORD PTR [eax+0x4],edi
10005251: ba 00 00 00 80 mov edx,0x80000000
10005256: 8b cb mov ecx,ebx
10005258: d3 ea shr edx,cl
1000525a: f7 d2 not edx
1000525c: 21 50 08 and DWORD PTR [eax+0x8],edx
1000525f: 8b c3 mov eax,ebx
10005261: 5f pop edi
10005262: 5e pop esi
10005263: 5b pop ebx
10005264: c9 leave
10005265: c3 ret
10005266: 55 push ebp
10005267: 8b ec mov ebp,esp
10005269: 83 ec 0c sub esp,0xc
1000526c: 8b 4d 08 mov ecx,DWORD PTR [ebp+0x8]
1000526f: 8b 41 10 mov eax,DWORD PTR [ecx+0x10]
10005272: 53 push ebx
10005273: 56 push esi
10005274: 8b 75 10 mov esi,DWORD PTR [ebp+0x10]
10005277: 57 push edi
10005278: 8b 7d 0c mov edi,DWORD PTR [ebp+0xc]
1000527b: 8b d7 mov edx,edi
1000527d: 2b 51 0c sub edx,DWORD PTR [ecx+0xc]
10005280: 83 c6 17 add esi,0x17
10005283: c1 ea 0f shr edx,0xf
10005286: 8b ca mov ecx,edx
10005288: 69 c9 04 02 00 00 imul ecx,ecx,0x204
1000528e: 8d 8c 01 44 01 00 00 lea ecx,[ecx+eax*1+0x144]
10005295: 89 4d f4 mov DWORD PTR [ebp-0xc],ecx
10005298: 8b 4f fc mov ecx,DWORD PTR [edi-0x4]
1000529b: 83 e6 f0 and esi,0xfffffff0
1000529e: 49 dec ecx
1000529f: 3b f1 cmp esi,ecx
100052a1: 8d 7c 39 fc lea edi,[ecx+edi*1-0x4]
100052a5: 8b 1f mov ebx,DWORD PTR [edi]
100052a7: 89 4d 10 mov DWORD PTR [ebp+0x10],ecx
100052aa: 89 5d fc mov DWORD PTR [ebp-0x4],ebx
100052ad: 0f 8e 55 01 00 00 jle 0x10005408
100052b3: f6 c3 01 test bl,0x1
100052b6: 0f 85 45 01 00 00 jne 0x10005401
100052bc: 03 d9 add ebx,ecx
100052be: 3b f3 cmp esi,ebx
100052c0: 0f 8f 3b 01 00 00 jg 0x10005401
100052c6: 8b 4d fc mov ecx,DWORD PTR [ebp-0x4]
100052c9: c1 f9 04 sar ecx,0x4
100052cc: 49 dec ecx
100052cd: 83 f9 3f cmp ecx,0x3f
100052d0: 89 4d f8 mov DWORD PTR [ebp-0x8],ecx
100052d3: 76 06 jbe 0x100052db
100052d5: 6a 3f push 0x3f
100052d7: 59 pop ecx
100052d8: 89 4d f8 mov DWORD PTR [ebp-0x8],ecx
100052db: 8b 5f 04 mov ebx,DWORD PTR [edi+0x4]
100052de: 3b 5f 08 cmp ebx,DWORD PTR [edi+0x8]
100052e1: 75 43 jne 0x10005326
100052e3: 83 f9 20 cmp ecx,0x20
100052e6: bb 00 00 00 80 mov ebx,0x80000000
100052eb: 73 1a jae 0x10005307
100052ed: d3 eb shr ebx,cl
100052ef: 8b 4d f8 mov ecx,DWORD PTR [ebp-0x8]
100052f2: 8d 4c 01 04 lea ecx,[ecx+eax*1+0x4]
100052f6: f7 d3 not ebx
100052f8: 21 5c 90 44 and DWORD PTR [eax+edx*4+0x44],ebx
100052fc: fe 09 dec BYTE PTR [ecx]
100052fe: 75 26 jne 0x10005326
10005300: 8b 4d 08 mov ecx,DWORD PTR [ebp+0x8]
10005303: 21 19 and DWORD PTR [ecx],ebx
10005305: eb 1f jmp 0x10005326
10005307: 83 c1 e0 add ecx,0xffffffe0
1000530a: d3 eb shr ebx,cl
1000530c: 8b 4d f8 mov ecx,DWORD PTR [ebp-0x8]
1000530f: 8d 4c 01 04 lea ecx,[ecx+eax*1+0x4]
10005313: f7 d3 not ebx
10005315: 21 9c 90 c4 00 00 00 and DWORD PTR [eax+edx*4+0xc4],ebx
1000531c: fe 09 dec BYTE PTR [ecx]
1000531e: 75 06 jne 0x10005326
10005320: 8b 4d 08 mov ecx,DWORD PTR [ebp+0x8]
10005323: 21 59 04 and DWORD PTR [ecx+0x4],ebx
10005326: 8b 4f 08 mov ecx,DWORD PTR [edi+0x8]
10005329: 8b 5f 04 mov ebx,DWORD PTR [edi+0x4]
1000532c: 89 59 04 mov DWORD PTR [ecx+0x4],ebx
1000532f: 8b 4f 04 mov ecx,DWORD PTR [edi+0x4]
10005332: 8b 7f 08 mov edi,DWORD PTR [edi+0x8]
10005335: 89 79 08 mov DWORD PTR [ecx+0x8],edi
10005338: 8b 4d 10 mov ecx,DWORD PTR [ebp+0x10]
1000533b: 2b ce sub ecx,esi
1000533d: 01 4d fc add DWORD PTR [ebp-0x4],ecx
10005340: 83 7d fc 00 cmp DWORD PTR [ebp-0x4],0x0
10005344: 0f 8e a5 00 00 00 jle 0x100053ef
1000534a: 8b 7d fc mov edi,DWORD PTR [ebp-0x4]
1000534d: 8b 4d 0c mov ecx,DWORD PTR [ebp+0xc]
10005350: c1 ff 04 sar edi,0x4
10005353: 4f dec edi
10005354: 83 ff 3f cmp edi,0x3f
10005357: 8d 4c 31 fc lea ecx,[ecx+esi*1-0x4]
1000535b: 76 03 jbe 0x10005360
1000535d: 6a 3f push 0x3f
1000535f: 5f pop edi
10005360: 8b 5d f4 mov ebx,DWORD PTR [ebp-0xc]
10005363: 8d 1c fb lea ebx,[ebx+edi*8]
10005366: 89 5d 10 mov DWORD PTR [ebp+0x10],ebx
10005369: 8b 5b 04 mov ebx,DWORD PTR [ebx+0x4]
1000536c: 89 59 04 mov DWORD PTR [ecx+0x4],ebx
1000536f: 8b 5d 10 mov ebx,DWORD PTR [ebp+0x10]
10005372: 89 59 08 mov DWORD PTR [ecx+0x8],ebx
10005375: 89 4b 04 mov DWORD PTR [ebx+0x4],ecx
10005378: 8b 59 04 mov ebx,DWORD PTR [ecx+0x4]
1000537b: 89 4b 08 mov DWORD PTR [ebx+0x8],ecx
1000537e: 8b 59 04 mov ebx,DWORD PTR [ecx+0x4]
10005381: 3b 59 08 cmp ebx,DWORD PTR [ecx+0x8]
10005384: 75 57 jne 0x100053dd
10005386: 8a 4c 07 04 mov cl,BYTE PTR [edi+eax*1+0x4]
1000538a: 88 4d 13 mov BYTE PTR [ebp+0x13],cl
1000538d: fe c1 inc cl
1000538f: 83 ff 20 cmp edi,0x20
10005392: 88 4c 07 04 mov BYTE PTR [edi+eax*1+0x4],cl
10005396: 73 1c jae 0x100053b4
10005398: 80 7d 13 00 cmp BYTE PTR [ebp+0x13],0x0
1000539c: 75 0e jne 0x100053ac
1000539e: 8b cf mov ecx,edi
100053a0: bb 00 00 00 80 mov ebx,0x80000000
100053a5: d3 eb shr ebx,cl
100053a7: 8b 4d 08 mov ecx,DWORD PTR [ebp+0x8]
100053aa: 09 19 or DWORD PTR [ecx],ebx
100053ac: 8d 44 90 44 lea eax,[eax+edx*4+0x44]
100053b0: 8b cf mov ecx,edi
100053b2: eb 20 jmp 0x100053d4
100053b4: 80 7d 13 00 cmp BYTE PTR [ebp+0x13],0x0
100053b8: 75 10 jne 0x100053ca
100053ba: 8d 4f e0 lea ecx,[edi-0x20]
100053bd: bb 00 00 00 80 mov ebx,0x80000000
100053c2: d3 eb shr ebx,cl
100053c4: 8b 4d 08 mov ecx,DWORD PTR [ebp+0x8]
100053c7: 09 59 04 or DWORD PTR [ecx+0x4],ebx
100053ca: 8d 84 90 c4 00 00 00 lea eax,[eax+edx*4+0xc4]
100053d1: 8d 4f e0 lea ecx,[edi-0x20]
100053d4: ba 00 00 00 80 mov edx,0x80000000
100053d9: d3 ea shr edx,cl
100053db: 09 10 or DWORD PTR [eax],edx
100053dd: 8b 55 0c mov edx,DWORD PTR [ebp+0xc]
100053e0: 8b 4d fc mov ecx,DWORD PTR [ebp-0x4]
100053e3: 8d 44 32 fc lea eax,[edx+esi*1-0x4]
100053e7: 89 08 mov DWORD PTR [eax],ecx
100053e9: 89 4c 01 fc mov DWORD PTR [ecx+eax*1-0x4],ecx
100053ed: eb 03 jmp 0x100053f2
100053ef: 8b 55 0c mov edx,DWORD PTR [ebp+0xc]
100053f2: 8d 46 01 lea eax,[esi+0x1]
100053f5: 89 42 fc mov DWORD PTR [edx-0x4],eax
100053f8: 89 44 32 f8 mov DWORD PTR [edx+esi*1-0x8],eax
100053fc: e9 3c 01 00 00 jmp 0x1000553d
10005401: 33 c0 xor eax,eax
10005403: e9 38 01 00 00 jmp 0x10005540
10005408: 0f 8d 2f 01 00 00 jge 0x1000553d
1000540e: 8b 5d 0c mov ebx,DWORD PTR [ebp+0xc]
10005411: 29 75 10 sub DWORD PTR [ebp+0x10],esi
10005414: 8d 4e 01 lea ecx,[esi+0x1]
10005417: 89 4b fc mov DWORD PTR [ebx-0x4],ecx
1000541a: 8d 5c 33 fc lea ebx,[ebx+esi*1-0x4]
1000541e: 8b 75 10 mov esi,DWORD PTR [ebp+0x10]
10005421: c1 fe 04 sar esi,0x4
10005424: 4e dec esi
10005425: 83 fe 3f cmp esi,0x3f
10005428: 89 5d 0c mov DWORD PTR [ebp+0xc],ebx
1000542b: 89 4b fc mov DWORD PTR [ebx-0x4],ecx
1000542e: 76 03 jbe 0x10005433
10005430: 6a 3f push 0x3f
10005432: 5e pop esi
10005433: f6 45 fc 01 test BYTE PTR [ebp-0x4],0x1
10005437: 0f 85 80 00 00 00 jne 0x100054bd
1000543d: 8b 75 fc mov esi,DWORD PTR [ebp-0x4]
10005440: c1 fe 04 sar esi,0x4
10005443: 4e dec esi
10005444: 83 fe 3f cmp esi,0x3f
10005447: 76 03 jbe 0x1000544c
10005449: 6a 3f push 0x3f
1000544b: 5e pop esi
1000544c: 8b 4f 04 mov ecx,DWORD PTR [edi+0x4]
1000544f: 3b 4f 08 cmp ecx,DWORD PTR [edi+0x8]
10005452: 75 42 jne 0x10005496
10005454: 83 fe 20 cmp esi,0x20
10005457: bb 00 00 00 80 mov ebx,0x80000000
1000545c: 73 19 jae 0x10005477
1000545e: 8b ce mov ecx,esi
10005460: d3 eb shr ebx,cl
10005462: 8d 74 06 04 lea esi,[esi+eax*1+0x4]
10005466: f7 d3 not ebx
10005468: 21 5c 90 44 and DWORD PTR [eax+edx*4+0x44],ebx
1000546c: fe 0e dec BYTE PTR [esi]
1000546e: 75 23 jne 0x10005493
10005470: 8b 4d 08 mov ecx,DWORD PTR [ebp+0x8]
10005473: 21 19 and DWORD PTR [ecx],ebx
10005475: eb 1c jmp 0x10005493
10005477: 8d 4e e0 lea ecx,[esi-0x20]
1000547a: d3 eb shr ebx,cl
1000547c: 8d 4c 06 04 lea ecx,[esi+eax*1+0x4]
10005480: f7 d3 not ebx
10005482: 21 9c 90 c4 00 00 00 and DWORD PTR [eax+edx*4+0xc4],ebx
10005489: fe 09 dec BYTE PTR [ecx]
1000548b: 75 06 jne 0x10005493
1000548d: 8b 4d 08 mov ecx,DWORD PTR [ebp+0x8]
10005490: 21 59 04 and DWORD PTR [ecx+0x4],ebx
10005493: 8b 5d 0c mov ebx,DWORD PTR [ebp+0xc]
10005496: 8b 4f 08 mov ecx,DWORD PTR [edi+0x8]
10005499: 8b 77 04 mov esi,DWORD PTR [edi+0x4]
1000549c: 89 71 04 mov DWORD PTR [ecx+0x4],esi
1000549f: 8b 77 08 mov esi,DWORD PTR [edi+0x8]
100054a2: 8b 4f 04 mov ecx,DWORD PTR [edi+0x4]
100054a5: 89 71 08 mov DWORD PTR [ecx+0x8],esi
100054a8: 8b 75 10 mov esi,DWORD PTR [ebp+0x10]
100054ab: 03 75 fc add esi,DWORD PTR [ebp-0x4]
100054ae: 89 75 10 mov DWORD PTR [ebp+0x10],esi
100054b1: c1 fe 04 sar esi,0x4
100054b4: 4e dec esi
100054b5: 83 fe 3f cmp esi,0x3f
100054b8: 76 03 jbe 0x100054bd
100054ba: 6a 3f push 0x3f
100054bc: 5e pop esi
100054bd: 8b 4d f4 mov ecx,DWORD PTR [ebp-0xc]
100054c0: 8d 0c f1 lea ecx,[ecx+esi*8]
100054c3: 8b 79 04 mov edi,DWORD PTR [ecx+0x4]
100054c6: 89 4b 08 mov DWORD PTR [ebx+0x8],ecx
100054c9: 89 7b 04 mov DWORD PTR [ebx+0x4],edi
100054cc: 89 59 04 mov DWORD PTR [ecx+0x4],ebx
100054cf: 8b 4b 04 mov ecx,DWORD PTR [ebx+0x4]
100054d2: 89 59 08 mov DWORD PTR [ecx+0x8],ebx
100054d5: 8b 4b 04 mov ecx,DWORD PTR [ebx+0x4]
100054d8: 3b 4b 08 cmp ecx,DWORD PTR [ebx+0x8]
100054db: 75 57 jne 0x10005534
100054dd: 8a 4c 06 04 mov cl,BYTE PTR [esi+eax*1+0x4]
100054e1: 88 4d 0f mov BYTE PTR [ebp+0xf],cl
100054e4: fe c1 inc cl
100054e6: 83 fe 20 cmp esi,0x20
100054e9: 88 4c 06 04 mov BYTE PTR [esi+eax*1+0x4],cl
100054ed: 73 1c jae 0x1000550b
100054ef: 80 7d 0f 00 cmp BYTE PTR [ebp+0xf],0x0
100054f3: 75 0e jne 0x10005503
100054f5: 8b ce mov ecx,esi
100054f7: bf 00 00 00 80 mov edi,0x80000000
100054fc: d3 ef shr edi,cl
100054fe: 8b 4d 08 mov ecx,DWORD PTR [ebp+0x8]
10005501: 09 39 or DWORD PTR [ecx],edi
10005503: 8d 44 90 44 lea eax,[eax+edx*4+0x44]
10005507: 8b ce mov ecx,esi
10005509: eb 20 jmp 0x1000552b
1000550b: 80 7d 0f 00 cmp BYTE PTR [ebp+0xf],0x0
1000550f: 75 10 jne 0x10005521
10005511: 8d 4e e0 lea ecx,[esi-0x20]
10005514: bf 00 00 00 80 mov edi,0x80000000
10005519: d3 ef shr edi,cl
1000551b: 8b 4d 08 mov ecx,DWORD PTR [ebp+0x8]
1000551e: 09 79 04 or DWORD PTR [ecx+0x4],edi
10005521: 8d 84 90 c4 00 00 00 lea eax,[eax+edx*4+0xc4]
10005528: 8d 4e e0 lea ecx,[esi-0x20]
1000552b: ba 00 00 00 80 mov edx,0x80000000
10005530: d3 ea shr edx,cl
10005532: 09 10 or DWORD PTR [eax],edx
10005534: 8b 45 10 mov eax,DWORD PTR [ebp+0x10]
10005537: 89 03 mov DWORD PTR [ebx],eax
10005539: 89 44 18 fc mov DWORD PTR [eax+ebx*1-0x4],eax
1000553d: 33 c0 xor eax,eax
1000553f: 40 inc eax
10005540: 5f pop edi
10005541: 5e pop esi
10005542: 5b pop ebx
10005543: c9 leave
10005544: c3 ret
10005545: 55 push ebp
10005546: 8b ec mov ebp,esp
10005548: 83 ec 14 sub esp,0x14
1000554b: a1 d8 5d 01 10 mov eax,ds:0x10015dd8
10005550: 8b 4d 08 mov ecx,DWORD PTR [ebp+0x8]
10005553: 6b c0 14 imul eax,eax,0x14
10005556: 03 05 dc 5d 01 10 add eax,DWORD PTR ds:0x10015ddc
1000555c: 83 c1 17 add ecx,0x17
1000555f: 83 e1 f0 and ecx,0xfffffff0
10005562: 89 4d f0 mov DWORD PTR [ebp-0x10],ecx
10005565: c1 f9 04 sar ecx,0x4
10005568: 53 push ebx
10005569: 49 dec ecx
1000556a: 83 f9 20 cmp ecx,0x20
1000556d: 56 push esi
1000556e: 57 push edi
1000556f: 7d 0b jge 0x1000557c
10005571: 83 ce ff or esi,0xffffffff
10005574: d3 ee shr esi,cl
10005576: 83 4d f8 ff or DWORD PTR [ebp-0x8],0xffffffff
1000557a: eb 0d jmp 0x10005589
1000557c: 83 c1 e0 add ecx,0xffffffe0
1000557f: 83 ca ff or edx,0xffffffff
10005582: 33 f6 xor esi,esi
10005584: d3 ea shr edx,cl
10005586: 89 55 f8 mov DWORD PTR [ebp-0x8],edx
10005589: 8b 0d e4 5d 01 10 mov ecx,DWORD PTR ds:0x10015de4
1000558f: 8b d9 mov ebx,ecx
10005591: eb 11 jmp 0x100055a4
10005593: 8b 53 04 mov edx,DWORD PTR [ebx+0x4]
10005596: 8b 3b mov edi,DWORD PTR [ebx]
10005598: 23 55 f8 and edx,DWORD PTR [ebp-0x8]
1000559b: 23 fe and edi,esi
1000559d: 0b d7 or edx,edi
1000559f: 75 0a jne 0x100055ab
100055a1: 83 c3 14 add ebx,0x14
100055a4: 3b d8 cmp ebx,eax
100055a6: 89 5d 08 mov DWORD PTR [ebp+0x8],ebx
100055a9: 72 e8 jb 0x10005593
100055ab: 3b d8 cmp ebx,eax
100055ad: 75 7f jne 0x1000562e
100055af: 8b 1d dc 5d 01 10 mov ebx,DWORD PTR ds:0x10015ddc
100055b5: eb 11 jmp 0x100055c8
100055b7: 8b 53 04 mov edx,DWORD PTR [ebx+0x4]
100055ba: 8b 3b mov edi,DWORD PTR [ebx]
100055bc: 23 55 f8 and edx,DWORD PTR [ebp-0x8]
100055bf: 23 fe and edi,esi
100055c1: 0b d7 or edx,edi
100055c3: 75 0a jne 0x100055cf
100055c5: 83 c3 14 add ebx,0x14
100055c8: 3b d9 cmp ebx,ecx
100055ca: 89 5d 08 mov DWORD PTR [ebp+0x8],ebx
100055cd: 72 e8 jb 0x100055b7
100055cf: 3b d9 cmp ebx,ecx
100055d1: 75 5b jne 0x1000562e
100055d3: eb 0c jmp 0x100055e1
100055d5: 83 7b 08 00 cmp DWORD PTR [ebx+0x8],0x0
100055d9: 75 0a jne 0x100055e5
100055db: 83 c3 14 add ebx,0x14
100055de: 89 5d 08 mov DWORD PTR [ebp+0x8],ebx
100055e1: 3b d8 cmp ebx,eax
100055e3: 72 f0 jb 0x100055d5
100055e5: 3b d8 cmp ebx,eax
100055e7: 75 31 jne 0x1000561a
100055e9: 8b 1d dc 5d 01 10 mov ebx,DWORD PTR ds:0x10015ddc
100055ef: eb 09 jmp 0x100055fa
100055f1: 83 7b 08 00 cmp DWORD PTR [ebx+0x8],0x0
100055f5: 75 0a jne 0x10005601
100055f7: 83 c3 14 add ebx,0x14
100055fa: 3b d9 cmp ebx,ecx
100055fc: 89 5d 08 mov DWORD PTR [ebp+0x8],ebx
100055ff: 72 f0 jb 0x100055f1
10005601: 3b d9 cmp ebx,ecx
10005603: 75 15 jne 0x1000561a
10005605: e8 a6 fa ff ff call 0x100050b0
1000560a: 8b d8 mov ebx,eax
1000560c: 85 db test ebx,ebx
1000560e: 89 5d 08 mov DWORD PTR [ebp+0x8],ebx
10005611: 75 07 jne 0x1000561a
10005613: 33 c0 xor eax,eax
10005615: e9 09 02 00 00 jmp 0x10005823
1000561a: 53 push ebx
1000561b: e8 40 fb ff ff call 0x10005160
10005620: 59 pop ecx
10005621: 8b 4b 10 mov ecx,DWORD PTR [ebx+0x10]
10005624: 89 01 mov DWORD PTR [ecx],eax
10005626: 8b 43 10 mov eax,DWORD PTR [ebx+0x10]
10005629: 83 38 ff cmp DWORD PTR [eax],0xffffffff
1000562c: 74 e5 je 0x10005613
1000562e: 89 1d e4 5d 01 10 mov DWORD PTR ds:0x10015de4,ebx
10005634: 8b 43 10 mov eax,DWORD PTR [ebx+0x10]
10005637: 8b 10 mov edx,DWORD PTR [eax]
10005639: 83 fa ff cmp edx,0xffffffff
1000563c: 89 55 fc mov DWORD PTR [ebp-0x4],edx
1000563f: 74 14 je 0x10005655
10005641: 8b 8c 90 c4 00 00 00 mov ecx,DWORD PTR [eax+edx*4+0xc4]
10005648: 8b 7c 90 44 mov edi,DWORD PTR [eax+edx*4+0x44]
1000564c: 23 4d f8 and ecx,DWORD PTR [ebp-0x8]
1000564f: 23 fe and edi,esi
10005651: 0b cf or ecx,edi
10005653: 75 29 jne 0x1000567e
10005655: 83 65 fc 00 and DWORD PTR [ebp-0x4],0x0
10005659: 8b 90 c4 00 00 00 mov edx,DWORD PTR [eax+0xc4]
1000565f: 8d 48 44 lea ecx,[eax+0x44]
10005662: 8b 39 mov edi,DWORD PTR [ecx]
10005664: 23 55 f8 and edx,DWORD PTR [ebp-0x8]
10005667: 23 fe and edi,esi
10005669: 0b d7 or edx,edi
1000566b: 75 0e jne 0x1000567b
1000566d: ff 45 fc inc DWORD PTR [ebp-0x4]
10005670: 8b 91 84 00 00 00 mov edx,DWORD PTR [ecx+0x84]
10005676: 83 c1 04 add ecx,0x4
10005679: eb e7 jmp 0x10005662
1000567b: 8b 55 fc mov edx,DWORD PTR [ebp-0x4]
1000567e: 8b ca mov ecx,edx
10005680: 69 c9 04 02 00 00 imul ecx,ecx,0x204
10005686: 8d 8c 01 44 01 00 00 lea ecx,[ecx+eax*1+0x144]
1000568d: 89 4d f4 mov DWORD PTR [ebp-0xc],ecx
10005690: 8b 4c 90 44 mov ecx,DWORD PTR [eax+edx*4+0x44]
10005694: 33 ff xor edi,edi
10005696: 23 ce and ecx,esi
10005698: 75 12 jne 0x100056ac
1000569a: 8b 8c 90 c4 00 00 00 mov ecx,DWORD PTR [eax+edx*4+0xc4]
100056a1: 23 4d f8 and ecx,DWORD PTR [ebp-0x8]
100056a4: 6a 20 push 0x20
100056a6: 5f pop edi
100056a7: eb 03 jmp 0x100056ac
100056a9: 03 c9 add ecx,ecx
100056ab: 47 inc edi
100056ac: 85 c9 test ecx,ecx
100056ae: 7d f9 jge 0x100056a9
100056b0: 8b 4d f4 mov ecx,DWORD PTR [ebp-0xc]
100056b3: 8b 54 f9 04 mov edx,DWORD PTR [ecx+edi*8+0x4]
100056b7: 8b 0a mov ecx,DWORD PTR [edx]
100056b9: 2b 4d f0 sub ecx,DWORD PTR [ebp-0x10]
100056bc: 8b f1 mov esi,ecx
100056be: c1 fe 04 sar esi,0x4
100056c1: 4e dec esi
100056c2: 83 fe 3f cmp esi,0x3f
100056c5: 89 4d f8 mov DWORD PTR [ebp-0x8],ecx
100056c8: 7e 03 jle 0x100056cd
100056ca: 6a 3f push 0x3f
100056cc: 5e pop esi
100056cd: 3b f7 cmp esi,edi
100056cf: 0f 84 01 01 00 00 je 0x100057d6
100056d5: 8b 4a 04 mov ecx,DWORD PTR [edx+0x4]
100056d8: 3b 4a 08 cmp ecx,DWORD PTR [edx+0x8]
100056db: 75 5c jne 0x10005739
100056dd: 83 ff 20 cmp edi,0x20
100056e0: bb 00 00 00 80 mov ebx,0x80000000
100056e5: 7d 26 jge 0x1000570d
100056e7: 8b cf mov ecx,edi
100056e9: d3 eb shr ebx,cl
100056eb: 8b 4d fc mov ecx,DWORD PTR [ebp-0x4]
100056ee: 8d 7c 38 04 lea edi,[eax+edi*1+0x4]
100056f2: f7 d3 not ebx
100056f4: 89 5d ec mov DWORD PTR [ebp-0x14],ebx
100056f7: 23 5c 88 44 and ebx,DWORD PTR [eax+ecx*4+0x44]
100056fb: 89 5c 88 44 mov DWORD PTR [eax+ecx*4+0x44],ebx
100056ff: fe 0f dec BYTE PTR [edi]
10005701: 75 33 jne 0x10005736
10005703: 8b 4d ec mov ecx,DWORD PTR [ebp-0x14]
10005706: 8b 5d 08 mov ebx,DWORD PTR [ebp+0x8]
10005709: 21 0b and DWORD PTR [ebx],ecx
1000570b: eb 2c jmp 0x10005739
1000570d: 8d 4f e0 lea ecx,[edi-0x20]
10005710: d3 eb shr ebx,cl
10005712: 8b 4d fc mov ecx,DWORD PTR [ebp-0x4]
10005715: 8d 8c 88 c4 00 00 00 lea ecx,[eax+ecx*4+0xc4]
1000571c: 8d 7c 38 04 lea edi,[eax+edi*1+0x4]
10005720: f7 d3 not ebx
10005722: 21 19 and DWORD PTR [ecx],ebx
10005724: fe 0f dec BYTE PTR [edi]
10005726: 89 5d ec mov DWORD PTR [ebp-0x14],ebx
10005729: 75 0b jne 0x10005736
1000572b: 8b 5d 08 mov ebx,DWORD PTR [ebp+0x8]
1000572e: 8b 4d ec mov ecx,DWORD PTR [ebp-0x14]
10005731: 21 4b 04 and DWORD PTR [ebx+0x4],ecx
10005734: eb 03 jmp 0x10005739
10005736: 8b 5d 08 mov ebx,DWORD PTR [ebp+0x8]
10005739: 83 7d f8 00 cmp DWORD PTR [ebp-0x8],0x0
1000573d: 8b 4a 08 mov ecx,DWORD PTR [edx+0x8]
10005740: 8b 7a 04 mov edi,DWORD PTR [edx+0x4]
10005743: 89 79 04 mov DWORD PTR [ecx+0x4],edi
10005746: 8b 4a 04 mov ecx,DWORD PTR [edx+0x4]
10005749: 8b 7a 08 mov edi,DWORD PTR [edx+0x8]
1000574c: 89 79 08 mov DWORD PTR [ecx+0x8],edi
1000574f: 0f 84 8d 00 00 00 je 0x100057e2
10005755: 8b 4d f4 mov ecx,DWORD PTR [ebp-0xc]
10005758: 8d 0c f1 lea ecx,[ecx+esi*8]
1000575b: 8b 79 04 mov edi,DWORD PTR [ecx+0x4]
1000575e: 89 4a 08 mov DWORD PTR [edx+0x8],ecx
10005761: 89 7a 04 mov DWORD PTR [edx+0x4],edi
10005764: 89 51 04 mov DWORD PTR [ecx+0x4],edx
10005767: 8b 4a 04 mov ecx,DWORD PTR [edx+0x4]
1000576a: 89 51 08 mov DWORD PTR [ecx+0x8],edx
1000576d: 8b 4a 04 mov ecx,DWORD PTR [edx+0x4]
10005770: 3b 4a 08 cmp ecx,DWORD PTR [edx+0x8]
10005773: 75 5e jne 0x100057d3
10005775: 8a 4c 06 04 mov cl,BYTE PTR [esi+eax*1+0x4]
10005779: 88 4d 0b mov BYTE PTR [ebp+0xb],cl
1000577c: fe c1 inc cl
1000577e: 83 fe 20 cmp esi,0x20
10005781: 88 4c 06 04 mov BYTE PTR [esi+eax*1+0x4],cl
10005785: 7d 23 jge 0x100057aa
10005787: 80 7d 0b 00 cmp BYTE PTR [ebp+0xb],0x0
1000578b: 75 0b jne 0x10005798
1000578d: bf 00 00 00 80 mov edi,0x80000000
10005792: 8b ce mov ecx,esi
10005794: d3 ef shr edi,cl
10005796: 09 3b or DWORD PTR [ebx],edi
10005798: 8b ce mov ecx,esi
1000579a: bf 00 00 00 80 mov edi,0x80000000
1000579f: d3 ef shr edi,cl
100057a1: 8b 4d fc mov ecx,DWORD PTR [ebp-0x4]
100057a4: 09 7c 88 44 or DWORD PTR [eax+ecx*4+0x44],edi
100057a8: eb 29 jmp 0x100057d3
100057aa: 80 7d 0b 00 cmp BYTE PTR [ebp+0xb],0x0
100057ae: 75 0d jne 0x100057bd
100057b0: 8d 4e e0 lea ecx,[esi-0x20]
100057b3: bf 00 00 00 80 mov edi,0x80000000
100057b8: d3 ef shr edi,cl
100057ba: 09 7b 04 or DWORD PTR [ebx+0x4],edi
100057bd: 8b 4d fc mov ecx,DWORD PTR [ebp-0x4]
100057c0: 8d bc 88 c4 00 00 00 lea edi,[eax+ecx*4+0xc4]
100057c7: 8d 4e e0 lea ecx,[esi-0x20]
100057ca: be 00 00 00 80 mov esi,0x80000000
100057cf: d3 ee shr esi,cl
100057d1: 09 37 or DWORD PTR [edi],esi
100057d3: 8b 4d f8 mov ecx,DWORD PTR [ebp-0x8]
100057d6: 85 c9 test ecx,ecx
100057d8: 74 0b je 0x100057e5
100057da: 89 0a mov DWORD PTR [edx],ecx
100057dc: 89 4c 11 fc mov DWORD PTR [ecx+edx*1-0x4],ecx
100057e0: eb 03 jmp 0x100057e5
100057e2: 8b 4d f8 mov ecx,DWORD PTR [ebp-0x8]
100057e5: 8b 75 f0 mov esi,DWORD PTR [ebp-0x10]
100057e8: 03 d1 add edx,ecx
100057ea: 8d 4e 01 lea ecx,[esi+0x1]
100057ed: 89 0a mov DWORD PTR [edx],ecx
100057ef: 89 4c 32 fc mov DWORD PTR [edx+esi*1-0x4],ecx
100057f3: 8b 75 f4 mov esi,DWORD PTR [ebp-0xc]
100057f6: 8b 0e mov ecx,DWORD PTR [esi]
100057f8: 85 c9 test ecx,ecx
100057fa: 8d 79 01 lea edi,[ecx+0x1]
100057fd: 89 3e mov DWORD PTR [esi],edi
100057ff: 75 1a jne 0x1000581b
10005801: 3b 1d a0 53 01 10 cmp ebx,DWORD PTR ds:0x100153a0
10005807: 75 12 jne 0x1000581b
10005809: 8b 4d fc mov ecx,DWORD PTR [ebp-0x4]
1000580c: 3b 0d ec 5d 01 10 cmp ecx,DWORD PTR ds:0x10015dec
10005812: 75 07 jne 0x1000581b
10005814: 83 25 a0 53 01 10 00 and DWORD PTR ds:0x100153a0,0x0
1000581b: 8b 4d fc mov ecx,DWORD PTR [ebp-0x4]
1000581e: 89 08 mov DWORD PTR [eax],ecx
10005820: 8d 42 04 lea eax,[edx+0x4]
10005823: 5f pop edi
10005824: 5e pop esi
10005825: 5b pop ebx
10005826: c9 leave
10005827: c3 ret
10005828: 68 90 58 00 10 push 0x10005890
1000582d: 64 ff 35 00 00 00 00 push DWORD PTR fs:0x0
10005834: 8b 44 24 10 mov eax,DWORD PTR [esp+0x10]
10005838: 89 6c 24 10 mov DWORD PTR [esp+0x10],ebp
1000583c: 8d 6c 24 10 lea ebp,[esp+0x10]
10005840: 2b e0 sub esp,eax
10005842: 53 push ebx
10005843: 56 push esi
10005844: 57 push edi
10005845: a1 10 00 01 10 mov eax,ds:0x10010010
1000584a: 31 45 fc xor DWORD PTR [ebp-0x4],eax
1000584d: 33 c5 xor eax,ebp
1000584f: 50 push eax
10005850: 89 65 e8 mov DWORD PTR [ebp-0x18],esp
10005853: ff 75 f8 push DWORD PTR [ebp-0x8]
10005856: 8b 45 fc mov eax,DWORD PTR [ebp-0x4]
10005859: c7 45 fc fe ff ff ff mov DWORD PTR [ebp-0x4],0xfffffffe
10005860: 89 45 f8 mov DWORD PTR [ebp-0x8],eax
10005863: 8d 45 f0 lea eax,[ebp-0x10]
10005866: 64 a3 00 00 00 00 mov fs:0x0,eax
1000586c: c3 ret
1000586d: 8b 4d f0 mov ecx,DWORD PTR [ebp-0x10]
10005870: 64 89 0d 00 00 00 00 mov DWORD PTR fs:0x0,ecx
10005877: 59 pop ecx
10005878: 5f pop edi
10005879: 5f pop edi
1000587a: 5e pop esi
1000587b: 5b pop ebx
1000587c: 8b e5 mov esp,ebp
1000587e: 5d pop ebp
1000587f: 51 push ecx
10005880: c3 ret
10005881: cc int3
10005882: cc int3
10005883: cc int3
10005884: cc int3
10005885: cc int3
10005886: cc int3
10005887: cc int3
10005888: cc int3
10005889: cc int3
1000588a: cc int3
1000588b: cc int3
1000588c: cc int3
1000588d: cc int3
1000588e: cc int3
1000588f: cc int3
|
src/lib/math/fmod.asm
|
germix/sanos
| 57 |
162833
|
;-----------------------------------------------------------------------------
; fmod.asm - floating point remainder of x/y
; Ported from <NAME>'s free C Runtime Library
;-----------------------------------------------------------------------------
SECTION .text
global fmod
global _fmod
global __CIfmod
fmod:
_fmod:
push ebp
mov ebp,esp
fld qword [ebp+16] ; Load real from stack
fld qword [ebp+8] ; Load real from stack
__fmod1: fprem ; Get the partial remainder
fstsw ax ; Get coprocessor status
test ax,0400h ; Complete remainder ?
jnz __fmod1 ; No, go get next remainder
fstp st1 ; Set new top of stack
pop ebp
ret
__CIfmod:
fxch st1 ; Swap arguments
__CIfmod1: fprem ; Get the partial remainder
fstsw ax ; Get coprocessor status
test ax,0400h ; Complete remainder ?
jnz __CIfmod1 ; No, go get next remainder
fstp st1 ; Set new top of stack
ret
|
reo-interpreter/src/main/antlr4/nl/cwi/reo/interpret/Comments.g4
|
kasperdokter/Reo-compiler
| 9 |
2104
|
grammar Comments;
import Tokens;
comment : '/*' .*? '*/' ;
|
arch/ARM/NXP/svd/lpc55s6x/nxp_svd-puf.ads
|
morbos/Ada_Drivers_Library
| 2 |
21380
|
<gh_stars>1-10
-- Copyright 2016-2019 NXP
-- All rights reserved.SPDX-License-Identifier: BSD-3-Clause
-- This spec has been automatically generated from LPC55S6x.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package NXP_SVD.PUF is
pragma Preelaborate;
---------------
-- Registers --
---------------
-- PUF Control register
type CTRL_Register is record
-- Begin Zeroize operation for PUF and go to Error state
zeroize : Boolean := False;
-- Begin Enroll operation
enroll : Boolean := False;
-- Begin Start operation
start : Boolean := False;
-- Begin Set Intrinsic Key operation
GENERATEKEY : Boolean := False;
-- Begin Set User Key operation
SETKEY : Boolean := False;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- Begin Get Key operation
GETKEY : Boolean := False;
-- unspecified
Reserved_7_31 : HAL.UInt25 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CTRL_Register use record
zeroize at 0 range 0 .. 0;
enroll at 0 range 1 .. 1;
start at 0 range 2 .. 2;
GENERATEKEY at 0 range 3 .. 3;
SETKEY at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
GETKEY at 0 range 6 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
subtype KEYINDEX_KEYIDX_Field is HAL.UInt4;
-- PUF Key Index register
type KEYINDEX_Register is record
-- Key index for Set Key operations
KEYIDX : KEYINDEX_KEYIDX_Field := 16#0#;
-- unspecified
Reserved_4_31 : HAL.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for KEYINDEX_Register use record
KEYIDX at 0 range 0 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
subtype KEYSIZE_KEYSIZE_Field is HAL.UInt6;
-- PUF Key Size register
type KEYSIZE_Register is record
-- Key size for Set Key operations
KEYSIZE : KEYSIZE_KEYSIZE_Field := 16#0#;
-- unspecified
Reserved_6_31 : HAL.UInt26 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for KEYSIZE_Register use record
KEYSIZE at 0 range 0 .. 5;
Reserved_6_31 at 0 range 6 .. 31;
end record;
-- PUF Status register
type STAT_Register is record
-- Read-only. Indicates that operation is in progress
busy : Boolean;
-- Read-only. Last operation was successful
SUCCESS : Boolean;
-- Read-only. PUF is in the Error state and no operations can be
-- performed
error : Boolean;
-- unspecified
Reserved_3_3 : HAL.Bit;
-- Read-only. Request for next part of key
KEYINREQ : Boolean;
-- Read-only. Next part of key is available
KEYOUTAVAIL : Boolean;
-- Read-only. Request for next part of AC/KC
CODEINREQ : Boolean;
-- Read-only. Next part of AC/KC is available
CODEOUTAVAIL : Boolean;
-- unspecified
Reserved_8_31 : HAL.UInt24;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for STAT_Register use record
busy at 0 range 0 .. 0;
SUCCESS at 0 range 1 .. 1;
error at 0 range 2 .. 2;
Reserved_3_3 at 0 range 3 .. 3;
KEYINREQ at 0 range 4 .. 4;
KEYOUTAVAIL at 0 range 5 .. 5;
CODEINREQ at 0 range 6 .. 6;
CODEOUTAVAIL at 0 range 7 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-- PUF Allow register
type ALLOW_Register is record
-- Read-only. Enroll operation is allowed
ALLOWENROLL : Boolean;
-- Read-only. Start operation is allowed
ALLOWSTART : Boolean;
-- Read-only. Set Key operations are allowed
ALLOWSETKEY : Boolean;
-- Read-only. Get Key operation is allowed
ALLOWGETKEY : Boolean;
-- unspecified
Reserved_4_31 : HAL.UInt28;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ALLOW_Register use record
ALLOWENROLL at 0 range 0 .. 0;
ALLOWSTART at 0 range 1 .. 1;
ALLOWSETKEY at 0 range 2 .. 2;
ALLOWGETKEY at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
subtype KEYOUTINDEX_KEYOUTIDX_Field is HAL.UInt4;
-- PUF Key Output Index register
type KEYOUTINDEX_Register is record
-- Read-only. Key index for the key that is currently output via the Key
-- Output register
KEYOUTIDX : KEYOUTINDEX_KEYOUTIDX_Field;
-- unspecified
Reserved_4_31 : HAL.UInt28;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for KEYOUTINDEX_Register use record
KEYOUTIDX at 0 range 0 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
-- PUF Interface Status and clear register
type IFSTAT_Register is record
-- Indicates that an APB error has occurred,Writing logic1 clears the
-- if_error bit
ERROR : Boolean := False;
-- unspecified
Reserved_1_31 : HAL.UInt31 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IFSTAT_Register use record
ERROR at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
-- PUF Interrupt Enable
type INTEN_Register is record
-- Enable corresponding interrupt. Note that bit numbers match those
-- assigned in QK_SR (Quiddikey Status Register)
READYEN : Boolean := False;
-- Enable corresponding interrupt. Note that bit numbers match those
-- assigned in QK_SR (Quiddikey Status Register)
SUCCESEN : Boolean := False;
-- Enable corresponding interrupt. Note that bit numbers match those
-- assigned in QK_SR (Quiddikey Status Register)
ERROREN : Boolean := False;
-- unspecified
Reserved_3_3 : HAL.Bit := 16#0#;
-- Enable corresponding interrupt. Note that bit numbers match those
-- assigned in QK_SR (Quiddikey Status Register)
KEYINREQEN : Boolean := False;
-- Enable corresponding interrupt. Note that bit numbers match those
-- assigned in QK_SR (Quiddikey Status Register)
KEYOUTAVAILEN : Boolean := False;
-- Enable corresponding interrupt. Note that bit numbers match those
-- assigned in QK_SR (Quiddikey Status Register)
CODEINREQEN : Boolean := False;
-- Enable corresponding interrupt. Note that bit numbers match those
-- assigned in QK_SR (Quiddikey Status Register)
CODEOUTAVAILEN : Boolean := False;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for INTEN_Register use record
READYEN at 0 range 0 .. 0;
SUCCESEN at 0 range 1 .. 1;
ERROREN at 0 range 2 .. 2;
Reserved_3_3 at 0 range 3 .. 3;
KEYINREQEN at 0 range 4 .. 4;
KEYOUTAVAILEN at 0 range 5 .. 5;
CODEINREQEN at 0 range 6 .. 6;
CODEOUTAVAILEN at 0 range 7 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-- PUF interrupt status
type INTSTAT_Register is record
-- Triggers on falling edge of busy, write 1 to clear
READY : Boolean := False;
-- Level sensitive interrupt, cleared when interrupt source clears
SUCCESS : Boolean := False;
-- Level sensitive interrupt, cleared when interrupt source clears
ERROR : Boolean := False;
-- unspecified
Reserved_3_3 : HAL.Bit := 16#0#;
-- Level sensitive interrupt, cleared when interrupt source clears
KEYINREQ : Boolean := False;
-- Level sensitive interrupt, cleared when interrupt source clears
KEYOUTAVAIL : Boolean := False;
-- Level sensitive interrupt, cleared when interrupt source clears
CODEINREQ : Boolean := False;
-- Level sensitive interrupt, cleared when interrupt source clears
CODEOUTAVAIL : Boolean := False;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for INTSTAT_Register use record
READY at 0 range 0 .. 0;
SUCCESS at 0 range 1 .. 1;
ERROR at 0 range 2 .. 2;
Reserved_3_3 at 0 range 3 .. 3;
KEYINREQ at 0 range 4 .. 4;
KEYOUTAVAIL at 0 range 5 .. 5;
CODEINREQ at 0 range 6 .. 6;
CODEOUTAVAIL at 0 range 7 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-- PUF RAM Power Control
type PWRCTRL_Register is record
-- Power on the PUF RAM.
RAMON : Boolean := False;
-- PUF RAM status.
RAMSTAT : Boolean := False;
-- unspecified
Reserved_2_31 : HAL.UInt30 := 16#3E#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for PWRCTRL_Register use record
RAMON at 0 range 0 .. 0;
RAMSTAT at 0 range 1 .. 1;
Reserved_2_31 at 0 range 2 .. 31;
end record;
-- PUF config register for block bits
type CFG_Register is record
-- Block enroll operation. Write 1 to set, cleared on reset.
BLOCKENROLL_SETKEY : Boolean := False;
-- Block set key operation. Write 1 to set, cleared on reset.
BLOCKKEYOUTPUT : Boolean := False;
-- unspecified
Reserved_2_31 : HAL.UInt30 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CFG_Register use record
BLOCKENROLL_SETKEY at 0 range 0 .. 0;
BLOCKKEYOUTPUT at 0 range 1 .. 1;
Reserved_2_31 at 0 range 2 .. 31;
end record;
-- KEYLOCK_KEY array element
subtype KEYLOCK_KEY_Element is HAL.UInt2;
-- KEYLOCK_KEY array
type KEYLOCK_KEY_Field_Array is array (0 .. 3) of KEYLOCK_KEY_Element
with Component_Size => 2, Size => 8;
-- Type definition for KEYLOCK_KEY
type KEYLOCK_KEY_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- KEY as a value
Val : HAL.UInt8;
when True =>
-- KEY as an array
Arr : KEYLOCK_KEY_Field_Array;
end case;
end record
with Unchecked_Union, Size => 8;
for KEYLOCK_KEY_Field use record
Val at 0 range 0 .. 7;
Arr at 0 range 0 .. 7;
end record;
-- Only reset in case of full IC reset
type KEYLOCK_Register is record
-- "10:Write access to KEY0MASK, KEYENABLE.KEY0 and KEYRESET.KEY0 is
-- allowed. 00, 01, 11:Write access to KEY0MASK, KEYENABLE.KEY0 and
-- KEYRESET.KEY0 is NOT allowed. Important Note : Once this field is
-- written with a value different from '10', its value can no longer be
-- modified until un Power On Reset occurs."
KEY : KEYLOCK_KEY_Field := (As_Array => False, Val => 16#2#);
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for KEYLOCK_Register use record
KEY at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-- KEYENABLE_KEY array element
subtype KEYENABLE_KEY_Element is HAL.UInt2;
-- KEYENABLE_KEY array
type KEYENABLE_KEY_Field_Array is array (0 .. 3) of KEYENABLE_KEY_Element
with Component_Size => 2, Size => 8;
-- Type definition for KEYENABLE_KEY
type KEYENABLE_KEY_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- KEY as a value
Val : HAL.UInt8;
when True =>
-- KEY as an array
Arr : KEYENABLE_KEY_Field_Array;
end case;
end record
with Unchecked_Union, Size => 8;
for KEYENABLE_KEY_Field use record
Val at 0 range 0 .. 7;
Arr at 0 range 0 .. 7;
end record;
-- no description available
type KEYENABLE_Register is record
-- "10: Data coming out from PUF Index 0 interface are shifted in KEY0
-- register. 00, 01, 11 : Data coming out from PUF Index 0 interface are
-- NOT shifted in KEY0 register."
KEY : KEYENABLE_KEY_Field :=
(As_Array => False, Val => 16#1#);
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for KEYENABLE_Register use record
KEY at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-- KEYRESET_KEY array element
subtype KEYRESET_KEY_Element is HAL.UInt2;
-- KEYRESET_KEY array
type KEYRESET_KEY_Field_Array is array (0 .. 3) of KEYRESET_KEY_Element
with Component_Size => 2, Size => 8;
-- Type definition for KEYRESET_KEY
type KEYRESET_KEY_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- KEY as a value
Val : HAL.UInt8;
when True =>
-- KEY as an array
Arr : KEYRESET_KEY_Field_Array;
end case;
end record
with Unchecked_Union, Size => 8;
for KEYRESET_KEY_Field use record
Val at 0 range 0 .. 7;
Arr at 0 range 0 .. 7;
end record;
-- Reinitialize Keys shift registers counters
type KEYRESET_Register is record
-- Write-only. 10: Reset KEY0 shift register. Self clearing. Must be
-- done before loading any new key.
KEY : KEYRESET_KEY_Field := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for KEYRESET_Register use record
KEY at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-- IDXBLK_L_IDX array element
subtype IDXBLK_L_IDX_Element is HAL.UInt2;
-- IDXBLK_L_IDX array
type IDXBLK_L_IDX_Field_Array is array (1 .. 7) of IDXBLK_L_IDX_Element
with Component_Size => 2, Size => 14;
-- Type definition for IDXBLK_L_IDX
type IDXBLK_L_IDX_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- IDX as a value
Val : HAL.UInt14;
when True =>
-- IDX as an array
Arr : IDXBLK_L_IDX_Field_Array;
end case;
end record
with Unchecked_Union, Size => 14;
for IDXBLK_L_IDX_Field use record
Val at 0 range 0 .. 13;
Arr at 0 range 0 .. 13;
end record;
subtype IDXBLK_L_LOCK_IDX_Field is HAL.UInt2;
-- no description available
type IDXBLK_L_Register is record
-- unspecified
Reserved_0_1 : HAL.UInt2 := 16#2#;
-- Use to block PUF index 1
IDX : IDXBLK_L_IDX_Field :=
(As_Array => False, Val => 16#2#);
-- unspecified
Reserved_16_29 : HAL.UInt14 := 16#0#;
-- Write-only. Lock 0 to 7 PUF key indexes
LOCK_IDX : IDXBLK_L_LOCK_IDX_Field := 16#2#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IDXBLK_L_Register use record
Reserved_0_1 at 0 range 0 .. 1;
IDX at 0 range 2 .. 15;
Reserved_16_29 at 0 range 16 .. 29;
LOCK_IDX at 0 range 30 .. 31;
end record;
-- IDXBLK_H_DP_IDX array element
subtype IDXBLK_H_DP_IDX_Element is HAL.UInt2;
-- IDXBLK_H_DP_IDX array
type IDXBLK_H_DP_IDX_Field_Array is array (8 .. 15)
of IDXBLK_H_DP_IDX_Element
with Component_Size => 2, Size => 16;
-- Type definition for IDXBLK_H_DP_IDX
type IDXBLK_H_DP_IDX_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- IDX as a value
Val : HAL.UInt16;
when True =>
-- IDX as an array
Arr : IDXBLK_H_DP_IDX_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for IDXBLK_H_DP_IDX_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- no description available
type IDXBLK_H_DP_Register is record
-- Use to block PUF index 8
IDX : IDXBLK_H_DP_IDX_Field :=
(As_Array => False, Val => 16#2#);
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IDXBLK_H_DP_Register use record
IDX at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- Only reset in case of full IC reset
-- Only reset in case of full IC reset
type KEYMASK_Registers is array (0 .. 3) of HAL.UInt32
with Volatile;
-- IDXBLK_H_IDX array element
subtype IDXBLK_H_IDX_Element is HAL.UInt2;
-- IDXBLK_H_IDX array
type IDXBLK_H_IDX_Field_Array is array (8 .. 15) of IDXBLK_H_IDX_Element
with Component_Size => 2, Size => 16;
-- Type definition for IDXBLK_H_IDX
type IDXBLK_H_IDX_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- IDX as a value
Val : HAL.UInt16;
when True =>
-- IDX as an array
Arr : IDXBLK_H_IDX_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for IDXBLK_H_IDX_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
subtype IDXBLK_H_LOCK_IDX_Field is HAL.UInt2;
-- no description available
type IDXBLK_H_Register is record
-- Use to block PUF index 8
IDX : IDXBLK_H_IDX_Field :=
(As_Array => False, Val => 16#2#);
-- unspecified
Reserved_16_29 : HAL.UInt14 := 16#0#;
-- Write-only. Lock 8 to 15 PUF key indexes
LOCK_IDX : IDXBLK_H_LOCK_IDX_Field := 16#2#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IDXBLK_H_Register use record
IDX at 0 range 0 .. 15;
Reserved_16_29 at 0 range 16 .. 29;
LOCK_IDX at 0 range 30 .. 31;
end record;
-- IDXBLK_L_DP_IDX array element
subtype IDXBLK_L_DP_IDX_Element is HAL.UInt2;
-- IDXBLK_L_DP_IDX array
type IDXBLK_L_DP_IDX_Field_Array is array (1 .. 7)
of IDXBLK_L_DP_IDX_Element
with Component_Size => 2, Size => 14;
-- Type definition for IDXBLK_L_DP_IDX
type IDXBLK_L_DP_IDX_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- IDX as a value
Val : HAL.UInt14;
when True =>
-- IDX as an array
Arr : IDXBLK_L_DP_IDX_Field_Array;
end case;
end record
with Unchecked_Union, Size => 14;
for IDXBLK_L_DP_IDX_Field use record
Val at 0 range 0 .. 13;
Arr at 0 range 0 .. 13;
end record;
-- no description available
type IDXBLK_L_DP_Register is record
-- unspecified
Reserved_0_1 : HAL.UInt2 := 16#2#;
-- Use to block PUF index 1
IDX : IDXBLK_L_DP_IDX_Field :=
(As_Array => False, Val => 16#2#);
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IDXBLK_L_DP_Register use record
Reserved_0_1 at 0 range 0 .. 1;
IDX at 0 range 2 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- SHIFT_STATUS_KEY array element
subtype SHIFT_STATUS_KEY_Element is HAL.UInt4;
-- SHIFT_STATUS_KEY array
type SHIFT_STATUS_KEY_Field_Array is array (0 .. 3)
of SHIFT_STATUS_KEY_Element
with Component_Size => 4, Size => 16;
-- Type definition for SHIFT_STATUS_KEY
type SHIFT_STATUS_KEY_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- KEY as a value
Val : HAL.UInt16;
when True =>
-- KEY as an array
Arr : SHIFT_STATUS_KEY_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for SHIFT_STATUS_KEY_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- no description available
type SHIFT_STATUS_Register is record
-- Read-only. Index counter from key 0 shift register
KEY : SHIFT_STATUS_KEY_Field;
-- unspecified
Reserved_16_31 : HAL.UInt16;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SHIFT_STATUS_Register use record
KEY at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- PUFCTRL
type PUF_Peripheral is record
-- PUF Control register
CTRL : aliased CTRL_Register;
-- PUF Key Index register
KEYINDEX : aliased KEYINDEX_Register;
-- PUF Key Size register
KEYSIZE : aliased KEYSIZE_Register;
-- PUF Status register
STAT : aliased STAT_Register;
-- PUF Allow register
ALLOW : aliased ALLOW_Register;
-- PUF Key Input register
KEYINPUT : aliased HAL.UInt32;
-- PUF Code Input register
CODEINPUT : aliased HAL.UInt32;
-- PUF Code Output register
CODEOUTPUT : aliased HAL.UInt32;
-- PUF Key Output Index register
KEYOUTINDEX : aliased KEYOUTINDEX_Register;
-- PUF Key Output register
KEYOUTPUT : aliased HAL.UInt32;
-- PUF Interface Status and clear register
IFSTAT : aliased IFSTAT_Register;
-- PUF version register.
VERSION : aliased HAL.UInt32;
-- PUF Interrupt Enable
INTEN : aliased INTEN_Register;
-- PUF interrupt status
INTSTAT : aliased INTSTAT_Register;
-- PUF RAM Power Control
PWRCTRL : aliased PWRCTRL_Register;
-- PUF config register for block bits
CFG : aliased CFG_Register;
-- Only reset in case of full IC reset
KEYLOCK : aliased KEYLOCK_Register;
-- no description available
KEYENABLE : aliased KEYENABLE_Register;
-- Reinitialize Keys shift registers counters
KEYRESET : aliased KEYRESET_Register;
-- no description available
IDXBLK_L : aliased IDXBLK_L_Register;
-- no description available
IDXBLK_H_DP : aliased IDXBLK_H_DP_Register;
-- Only reset in case of full IC reset
KEYMASK : aliased KEYMASK_Registers;
-- no description available
IDXBLK_H : aliased IDXBLK_H_Register;
-- no description available
IDXBLK_L_DP : aliased IDXBLK_L_DP_Register;
-- no description available
SHIFT_STATUS : aliased SHIFT_STATUS_Register;
end record
with Volatile;
for PUF_Peripheral use record
CTRL at 16#0# range 0 .. 31;
KEYINDEX at 16#4# range 0 .. 31;
KEYSIZE at 16#8# range 0 .. 31;
STAT at 16#20# range 0 .. 31;
ALLOW at 16#28# range 0 .. 31;
KEYINPUT at 16#40# range 0 .. 31;
CODEINPUT at 16#44# range 0 .. 31;
CODEOUTPUT at 16#48# range 0 .. 31;
KEYOUTINDEX at 16#60# range 0 .. 31;
KEYOUTPUT at 16#64# range 0 .. 31;
IFSTAT at 16#DC# range 0 .. 31;
VERSION at 16#FC# range 0 .. 31;
INTEN at 16#100# range 0 .. 31;
INTSTAT at 16#104# range 0 .. 31;
PWRCTRL at 16#108# range 0 .. 31;
CFG at 16#10C# range 0 .. 31;
KEYLOCK at 16#200# range 0 .. 31;
KEYENABLE at 16#204# range 0 .. 31;
KEYRESET at 16#208# range 0 .. 31;
IDXBLK_L at 16#20C# range 0 .. 31;
IDXBLK_H_DP at 16#210# range 0 .. 31;
KEYMASK at 16#214# range 0 .. 127;
IDXBLK_H at 16#254# range 0 .. 31;
IDXBLK_L_DP at 16#258# range 0 .. 31;
SHIFT_STATUS at 16#25C# range 0 .. 31;
end record;
-- PUFCTRL
PUF_Periph : aliased PUF_Peripheral
with Import, Address => System'To_Address (16#4003B000#);
end NXP_SVD.PUF;
|
8085_programming/8085 Programs/test2.asm
|
SayanGhoshBDA/code-backup
| 16 |
245110
|
<filename>8085_programming/8085 Programs/test2.asm<gh_stars>10-100
;.ORG 0000H
LDA 3001H
LXI H,3002H
MOV B,M
ADD B
LXI H,3003H
MOV B,M
SUB B
STA 8000H
HLT
|
oeis/010/A010792.asm
|
neoneye/loda-programs
| 11 |
2394
|
; A010792: a(n) = n!*(n+3)! / 3!.
; Submitted by <NAME>
; 1,4,40,720,20160,806400,43545600,3048192000,268240896000,28970016768000,3766102179840000,579979735695360000,104396352425164800000,21714441304434278400000,5168037030455358259200000,1395369998222946729984000000,424192479459775805915136000000,144225443016323774011146240000000,54517217460170386576213278720000000,22788196898351221588857150504960000000,10482570573241561930874289232281600000000,5283215568913747213160641773069926400000000,2905768562902560967238352975188459520000000000
mov $1,1
mov $2,3
lpb $0
mul $1,$0
sub $0,1
add $2,1
mul $1,$2
lpe
mov $0,$1
|
programs/oeis/269/A269100.asm
|
neoneye/loda
| 22 |
27237
|
<reponame>neoneye/loda<gh_stars>10-100
; A269100: a(n) = 13*n + 11.
; 11,24,37,50,63,76,89,102,115,128,141,154,167,180,193,206,219,232,245,258,271,284,297,310,323,336,349,362,375,388,401,414,427,440,453,466,479,492,505,518,531,544,557,570,583,596,609,622,635,648,661,674,687,700,713,726,739,752,765,778,791,804,817,830,843,856,869,882,895,908,921,934,947,960,973,986,999,1012,1025,1038,1051,1064,1077,1090,1103,1116,1129,1142,1155,1168,1181,1194,1207,1220,1233,1246,1259,1272,1285,1298
mul $0,13
add $0,11
|
Transynther/x86/_processed/NC/_st_sm_/i7-7700_9_0xca.log_29_475.asm
|
ljhsiun2/medusa
| 9 |
99605
|
.global s_prepare_buffers
s_prepare_buffers:
push %r15
push %rbp
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0x9f15, %rsi
lea addresses_WT_ht+0x1602d, %rdi
clflush (%rdi)
nop
nop
nop
nop
nop
cmp %rbx, %rbx
mov $30, %rcx
rep movsq
nop
nop
nop
nop
nop
xor $43800, %rbx
lea addresses_normal_ht+0xe77d, %rbp
nop
nop
cmp $3086, %rbx
movb $0x61, (%rbp)
nop
nop
nop
nop
xor $60319, %rbp
lea addresses_normal_ht+0x10415, %rdx
nop
nop
xor %r15, %r15
mov (%rdx), %rdi
nop
nop
nop
nop
cmp $54760, %rcx
lea addresses_WT_ht+0x1b7d5, %rcx
add $14723, %r15
mov $0x6162636465666768, %rdx
movq %rdx, %xmm2
movups %xmm2, (%rcx)
nop
nop
nop
nop
nop
sub $63485, %rsi
lea addresses_D_ht+0x915, %rbp
inc %rdi
movb (%rbp), %dl
nop
nop
xor $24705, %rbx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r15
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r14
push %r8
push %r9
push %rbp
push %rbx
push %rsi
// Store
mov $0x4c48b50000000c15, %r9
nop
xor %r11, %r11
movl $0x51525354, (%r9)
nop
nop
nop
inc %rbx
// Load
lea addresses_WT+0x3935, %r11
nop
nop
nop
nop
xor %r8, %r8
mov (%r11), %r9w
dec %r8
// Store
lea addresses_D+0x19355, %r9
clflush (%r9)
nop
nop
nop
and $3385, %r14
mov $0x5152535455565758, %r11
movq %r11, %xmm5
vmovups %ymm5, (%r9)
nop
nop
nop
nop
nop
dec %rsi
// Faulty Load
mov $0x4c48b50000000c15, %rbx
nop
xor %rbp, %rbp
vmovups (%rbx), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $0, %xmm5, %r9
lea oracles, %r14
and $0xff, %r9
shlq $12, %r9
mov (%r14,%r9,1), %r9
pop %rsi
pop %rbx
pop %rbp
pop %r9
pop %r8
pop %r14
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 32, 'NT': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 4, 'NT': False, 'type': 'addresses_NC'}}
{'src': {'congruent': 4, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_D'}}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 32, 'NT': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 7, 'same': True, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 3, 'same': False, 'type': 'addresses_WT_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_normal_ht'}}
{'src': {'congruent': 11, 'AVXalign': True, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_WT_ht'}}
{'src': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'54': 29}
54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54
*/
|
demo/agda/FRP/JS/Demo/Clock.agda
|
agda/agda-frp-js
| 63 |
3922
|
<filename>demo/agda/FRP/JS/Demo/Clock.agda
open import FRP.JS.Behaviour using ( Beh ; map )
open import FRP.JS.DOM using ( DOM ; text ; element )
open import FRP.JS.RSet using ( ⟦_⟧ )
open import FRP.JS.Time using ( toUTCString ; every )
open import FRP.JS.Delay using ( _sec )
module FRP.JS.Demo.Clock where
main : ∀ {w} → ⟦ Beh (DOM w) ⟧
main = text (map toUTCString (every (1 sec)))
|
programs/oeis/048/A048625.asm
|
neoneye/loda
| 22 |
26118
|
; A048625: Pisot sequence P(4,6).
; 4,6,9,13,19,28,41,60,88,129,189,277,406,595,872,1278,1873,2745,4023,5896,8641,12664,18560,27201,39865,58425,85626,125491,183916,269542,395033,578949,848491,1243524,1822473,2670964,3914488,5736961,8407925,12322413,18059374,26467299,38789712,56849086,83316385,122106097,178955183,262271568,384377665,563332848,825604416,1209982081,1773314929,2598919345,3808901426,5582216355,8181135700,11990037126,17572253481,25753389181,37743426307,55315679788,81069068969,118812495276,174128175064,255197244033,374009739309,548137914373,803335158406,1177344897715,1725482812088,2528817970494,3706162868209,5431645680297,7960463650791,11666626519000,17098272199297,25058735850088,36725362369088,53823634568385,78882370418473,115607732787561,169431367355946,248313737774419,363921470561980,533352837917926,781666575692345,1145588046254325,1678940884172251,2460607459864596,3606195506118921,5285136390291172,7745743850155768,11351939356274689,16637075746565861,24382819596721629,35734758952996318,52371834699562179,76754654296283808,112489413249280126
seq $0,48589 ; Pisot sequence L(7,9).
sub $0,3
|
tools-src/gnu/gcc/gcc/ada/sem_ch2.adb
|
enfoTek/tomato.linksys.e2000.nvram-mod
| 80 |
30826
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S E M _ C H 2 --
-- --
-- B o d y --
-- --
-- $Revision$
-- --
-- Copyright (C) 1992-1999, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Atree; use Atree;
with Opt; use Opt;
with Restrict; use Restrict;
with Sem_Ch8; use Sem_Ch8;
with Sinfo; use Sinfo;
with Stand; use Stand;
package body Sem_Ch2 is
-------------------------------
-- Analyze_Character_Literal --
-------------------------------
procedure Analyze_Character_Literal (N : Node_Id) is
begin
-- The type is eventually inherited from the context. If expansion
-- has already established the proper type, do not modify it.
if No (Etype (N)) then
Set_Etype (N, Any_Character);
end if;
Set_Is_Static_Expression (N);
if Comes_From_Source (N)
and then not In_Character_Range (Char_Literal_Value (N))
then
Check_Restriction (No_Wide_Characters, N);
end if;
end Analyze_Character_Literal;
------------------------
-- Analyze_Identifier --
------------------------
procedure Analyze_Identifier (N : Node_Id) is
begin
Find_Direct_Name (N);
end Analyze_Identifier;
-----------------------------
-- Analyze_Integer_Literal --
-----------------------------
procedure Analyze_Integer_Literal (N : Node_Id) is
begin
Set_Etype (N, Universal_Integer);
Set_Is_Static_Expression (N);
end Analyze_Integer_Literal;
--------------------------
-- Analyze_Real_Literal --
--------------------------
procedure Analyze_Real_Literal (N : Node_Id) is
begin
Set_Etype (N, Universal_Real);
Set_Is_Static_Expression (N);
end Analyze_Real_Literal;
----------------------------
-- Analyze_String_Literal --
----------------------------
procedure Analyze_String_Literal (N : Node_Id) is
begin
-- The type is eventually inherited from the context. If expansion
-- has already established the proper type, do not modify it.
if No (Etype (N)) then
Set_Etype (N, Any_String);
end if;
-- String literals are static in Ada 95. Note that if the subtype
-- turns out to be non-static, then the Is_Static_Expression flag
-- will be reset in Eval_String_Literal.
if Ada_95 then
Set_Is_Static_Expression (N);
end if;
if Comes_From_Source (N) and then Has_Wide_Character (N) then
Check_Restriction (No_Wide_Characters, N);
end if;
end Analyze_String_Literal;
end Sem_Ch2;
|
Code/CustomControl/RAResEd/Src/Property.asm
|
CherryDT/FbEditMOD
| 11 |
240474
|
.const
PRP_NUM_ID equ 1
PRP_NUM_POSL equ 2
PRP_NUM_POST equ 3
PRP_NUM_SIZEW equ 4
PRP_NUM_SIZEH equ 5
PRP_NUM_STARTID equ 6
PRP_NUM_TAB equ 7
PRP_NUM_HELPID equ 8
PRP_STR_NAME equ 100
PRP_STR_NAMEBTN equ 101
PRP_STR_NAMESTC equ 102
PRP_STR_CAPTION equ 103
PRP_STR_CAPMULTI equ 104
PRP_STR_FONT equ 1000
PRP_STR_CLASS equ 1001
PRP_STR_MENU equ 1002
PRP_STR_IMAGE equ 1005
PRP_STR_AVI equ 1006
PRP_STR_FILE equ 1008
PRP_FUN_STYLE equ 1003
PRP_FUN_EXSTYLE equ 1004
PRP_FUN_LANG equ 1007
PRP_BOOL_SYSMENU equ 200
PRP_BOOL_MAXBUTTON equ 201
PRP_BOOL_MINBUTTON equ 202
PRP_BOOL_ENABLED equ 203
PRP_BOOL_VISIBLE equ 204
PRP_BOOL_DEFAULT equ 205
PRP_BOOL_AUTO equ 206
PRP_BOOL_MNEMONIC equ 207
PRP_BOOL_WORDWRAP equ 208
PRP_BOOL_MULTI equ 209
PRP_BOOL_LOCK equ 210
PRP_BOOL_CHILD equ 211
PRP_BOOL_SIZE equ 212
PRP_BOOL_TABSTOP equ 213
PRP_BOOL_NOTIFY equ 214
PRP_BOOL_WANTCR equ 215
PRP_BOOL_SORT equ 216
PRP_BOOL_FLAT equ 217
PRP_BOOL_GROUP equ 218
PRP_BOOL_ICON equ 219
PRP_BOOL_USETAB equ 220
PRP_BOOL_SETBUDDY equ 221
PRP_BOOL_HIDE equ 222
PRP_BOOL_TOPMOST equ 223
PRP_BOOL_INTEGRAL equ 224
PRP_BOOL_BUTTON equ 225
PRP_BOOL_POPUP equ 226
PRP_BOOL_OWNERDRAW equ 227
PRP_BOOL_TRANSP equ 228
PRP_BOOL_TIME equ 229
PRP_BOOL_WEEK equ 230
PRP_BOOL_TOOLTIP equ 231
PRP_BOOL_WRAP equ 232
PRP_BOOL_DIVIDER equ 233
PRP_BOOL_DRAGDROP equ 234
PRP_BOOL_SMOOTH equ 235
PRP_BOOL_AUTOSCROLL equ 236
PRP_BOOL_AUTOPLAY equ 237
PRP_BOOL_AUTOSIZE equ 238
PRP_BOOL_HASSTRINGS equ 239
PRP_BOOL_MENUEX equ 240
PRP_BOOL_SAVESEL equ 241
PRP_MULTI_CLIP equ 300
PRP_MULTI_SCROLL equ 301
PRP_MULTI_ALIGN equ 302
PRP_MULTI_AUTOSCROLL equ 303
PRP_MULTI_FORMAT equ 304
PRP_MULTI_STARTPOS equ 305
PRP_MULTI_ORIENT equ 306
PRP_MULTI_SORT equ 307
PRP_MULTI_OWNERDRAW equ 308
PRP_MULTI_ELLIPSIS equ 309
PRP_MULTI_BORDER equ 400
PRP_MULTI_TYPE equ 401
IDD_PROPERTY equ 1600
IDC_EDTSTYLE equ 3301
IDC_BTNLEFT equ 3302
IDC_BTNRIGHT equ 3303
IDC_BTNSET equ 3304
IDC_STCWARN equ 3305
IDC_STCTXT equ 3306
.data
szNameExist db 'Name already exist.',0Dh,0Ah,0Dh,0Ah,0
szFalse db 'False',0
szTrue db 'True',0
;False/True Styles
SysMDlg dd -1 xor WS_SYSMENU,0
dd -1 xor WS_SYSMENU,WS_SYSMENU
MaxBDlg dd -1 xor WS_MAXIMIZEBOX,0
dd -1 xor WS_MAXIMIZEBOX,WS_MAXIMIZEBOX
MinBDlg dd -1 xor WS_MINIMIZEBOX,0
dd -1 xor WS_MINIMIZEBOX,WS_MINIMIZEBOX
EnabAll dd -1 xor WS_DISABLED,WS_DISABLED
dd -1 xor WS_DISABLED,0
VisiAll dd -1 xor WS_VISIBLE,0
dd -1 xor WS_VISIBLE,WS_VISIBLE
DefaBtn dd -1 xor BS_DEFPUSHBUTTON,0
dd -1 xor BS_DEFPUSHBUTTON,BS_DEFPUSHBUTTON
AutoChk dd -1 xor (BS_AUTOCHECKBOX or BS_CHECKBOX),BS_CHECKBOX
dd -1 xor (BS_AUTOCHECKBOX or BS_CHECKBOX),BS_AUTOCHECKBOX
AutoRbt dd -1 xor (BS_AUTORADIOBUTTON or BS_RADIOBUTTON),BS_RADIOBUTTON
dd -1 xor (BS_AUTORADIOBUTTON or BS_RADIOBUTTON),BS_AUTORADIOBUTTON
AutoCbo dd -1 xor CBS_AUTOHSCROLL,0
dd -1 xor CBS_AUTOHSCROLL,CBS_AUTOHSCROLL
AutoSpn dd -1 xor UDS_AUTOBUDDY,0
dd -1 xor UDS_AUTOBUDDY,UDS_AUTOBUDDY
AutoTbr dd -1 xor CCS_NORESIZE,CCS_NORESIZE
dd -1 xor CCS_NORESIZE,0
AutoAni dd -1 xor ACS_AUTOPLAY,0
dd -1 xor ACS_AUTOPLAY,ACS_AUTOPLAY
MnemStc dd -1 xor SS_NOPREFIX,SS_NOPREFIX
dd -1 xor SS_NOPREFIX,0
WordStc dd -1 xor (SS_LEFTNOWORDWRAP or SS_CENTER or SS_RIGHT),SS_LEFTNOWORDWRAP
dd -1 xor (SS_LEFTNOWORDWRAP or SS_CENTER or SS_RIGHT),0
MultEdt dd -1 xor ES_MULTILINE,0
dd -1 xor ES_MULTILINE,ES_MULTILINE
MultBtn dd -1 xor BS_MULTILINE,0
dd -1 xor BS_MULTILINE,BS_MULTILINE
MultTab dd -1 xor TCS_MULTILINE,0
dd -1 xor TCS_MULTILINE,TCS_MULTILINE
MultLst dd -1 xor (LBS_MULTIPLESEL or LBS_EXTENDEDSEL),0
dd -1 xor (LBS_MULTIPLESEL or LBS_EXTENDEDSEL),LBS_MULTIPLESEL or LBS_EXTENDEDSEL
MultMvi dd -1 xor MCS_MULTISELECT,0
dd -1 xor MCS_MULTISELECT,MCS_MULTISELECT
LockEdt dd -1 xor ES_READONLY,0
dd -1 xor ES_READONLY,ES_READONLY
ChilAll dd -1 xor WS_CHILD,0
dd -1 xor WS_CHILD,WS_CHILD
SizeDlg dd -1 xor WS_SIZEBOX,0
dd -1 xor WS_SIZEBOX,WS_SIZEBOX
SizeSbr dd -1 xor SBARS_SIZEGRIP,0
dd -1 xor SBARS_SIZEGRIP,SBARS_SIZEGRIP
TabSAll dd -1 xor WS_TABSTOP,0
dd -1 xor WS_TABSTOP,WS_TABSTOP
NotiStc dd -1 xor SS_NOTIFY,0
dd -1 xor SS_NOTIFY,SS_NOTIFY
NotiBtn dd -1 xor BS_NOTIFY,0
dd -1 xor BS_NOTIFY,BS_NOTIFY
NotiLst dd -1 xor LBS_NOTIFY,0
dd -1 xor LBS_NOTIFY,LBS_NOTIFY
WantEdt dd -1 xor ES_WANTRETURN,0
dd -1 xor ES_WANTRETURN,ES_WANTRETURN
SortCbo dd -1 xor CBS_SORT,0
dd -1 xor CBS_SORT,CBS_SORT
SortLst dd -1 xor LBS_SORT,0
dd -1 xor LBS_SORT,LBS_SORT
FlatTbr dd -1 xor TBSTYLE_FLAT,0
dd -1 xor TBSTYLE_FLAT,TBSTYLE_FLAT
GrouAll dd -1 xor WS_GROUP,0
dd -1 xor WS_GROUP,WS_GROUP
UseTLst dd -1 xor LBS_USETABSTOPS,0
dd -1 xor LBS_USETABSTOPS,LBS_USETABSTOPS
SetBUdn dd -1 xor UDS_SETBUDDYINT,0
dd -1 xor UDS_SETBUDDYINT,UDS_SETBUDDYINT
HideEdt dd -1 xor ES_NOHIDESEL,ES_NOHIDESEL
dd -1 xor ES_NOHIDESEL,0
HideTrv dd -1 xor TVS_SHOWSELALWAYS,TVS_SHOWSELALWAYS
dd -1 xor TVS_SHOWSELALWAYS,0
HideLsv dd -1 xor LVS_SHOWSELALWAYS,LVS_SHOWSELALWAYS
dd -1 xor LVS_SHOWSELALWAYS,0
IntHtCbo dd -1 xor CBS_NOINTEGRALHEIGHT,CBS_NOINTEGRALHEIGHT
dd -1 xor CBS_NOINTEGRALHEIGHT,0
IntHtLst dd -1 xor LBS_NOINTEGRALHEIGHT,LBS_NOINTEGRALHEIGHT
dd -1 xor LBS_NOINTEGRALHEIGHT,0
ButtTab dd -1 xor TCS_BUTTONS,0
dd -1 xor TCS_BUTTONS,TCS_BUTTONS
ButtTrv dd -1 xor TVS_HASBUTTONS,0
dd -1 xor TVS_HASBUTTONS,TVS_HASBUTTONS
ButtHdr dd -1 xor HDS_BUTTONS,0
dd -1 xor HDS_BUTTONS,HDS_BUTTONS
PopUAll dd -1 xor WS_POPUP,0
dd -1 xor WS_POPUP,WS_POPUP
OwneLsv dd -1 xor LVS_OWNERDRAWFIXED,0
dd -1 xor LVS_OWNERDRAWFIXED,LVS_OWNERDRAWFIXED
TranAni dd -1 xor ACS_TRANSPARENT,0
dd -1 xor ACS_TRANSPARENT,ACS_TRANSPARENT
TimeAni dd -1 xor ACS_TIMER,0
dd -1 xor ACS_TIMER,ACS_TIMER
WeekMvi dd -1 xor MCS_WEEKNUMBERS,0
dd -1 xor MCS_WEEKNUMBERS,MCS_WEEKNUMBERS
ToolTbr dd -1 xor TBSTYLE_TOOLTIPS,0
dd -1 xor TBSTYLE_TOOLTIPS,TBSTYLE_TOOLTIPS
ToolSbr dd -1 xor SBARS_TOOLTIPS,0
dd -1 xor SBARS_TOOLTIPS,SBARS_TOOLTIPS
ToolTab dd -1 xor TCS_TOOLTIPS,0
dd -1 xor TCS_TOOLTIPS,TCS_TOOLTIPS
WrapTbr dd -1 xor TBSTYLE_WRAPABLE,0
dd -1 xor TBSTYLE_WRAPABLE,TBSTYLE_WRAPABLE
DiviTbr dd -1 xor CCS_NODIVIDER,CCS_NODIVIDER
dd -1 xor CCS_NODIVIDER,0
DragHdr dd -1 xor HDS_DRAGDROP,0
dd -1 xor HDS_DRAGDROP,HDS_DRAGDROP
SmooPgb dd -1 xor PBS_SMOOTH,0
dd -1 xor PBS_SMOOTH,PBS_SMOOTH
HasStcb dd -1 xor CBS_HASSTRINGS,0
dd -1 xor CBS_HASSTRINGS,CBS_HASSTRINGS
HasStlb dd -1 xor LBS_HASSTRINGS,0
dd -1 xor LBS_HASSTRINGS,LBS_HASSTRINGS
MenuEx dd -1 xor TRUE,0
dd -1 xor TRUE,TRUE
SaveRich dd -1 xor ES_SAVESEL,0
dd -1 xor ES_SAVESEL,ES_SAVESEL
;False/True ExStyles
TopMost dd -1 xor WS_EX_TOPMOST,0
dd -1 xor WS_EX_TOPMOST,WS_EX_TOPMOST
;Multi styles
ClipAll db 'None,Children,Siblings,Both',0
dd -1 xor (WS_CLIPCHILDREN or WS_CLIPSIBLINGS),0
dd -1,0
dd -1 xor (WS_CLIPCHILDREN or WS_CLIPSIBLINGS),WS_CLIPCHILDREN
dd -1,0
dd -1 xor (WS_CLIPCHILDREN or WS_CLIPSIBLINGS),WS_CLIPSIBLINGS
dd -1,0
dd -1 xor (WS_CLIPCHILDREN or WS_CLIPSIBLINGS),WS_CLIPCHILDREN or WS_CLIPSIBLINGS
dd -1,0
ScroAll db 'None,Horizontal,Vertical,Both',0
dd -1 xor (WS_HSCROLL or WS_VSCROLL),0
dd -1,0
dd -1 xor (WS_HSCROLL or WS_VSCROLL),WS_HSCROLL
dd -1,0
dd -1 xor (WS_HSCROLL or WS_VSCROLL),WS_VSCROLL
dd -1,0
dd -1 xor (WS_HSCROLL or WS_VSCROLL),WS_HSCROLL or WS_VSCROLL
dd -1,0
AligStc db 'TopLeft,TopCenter,TopRight,CenterLeft,CenterCenter,CenterRight',0
dd -1 xor (SS_CENTER or SS_RIGHT or SS_CENTERIMAGE),0
dd -1,0
dd -1 xor (SS_LEFTNOWORDWRAP or SS_CENTER or SS_RIGHT or SS_CENTERIMAGE),SS_CENTER
dd -1,0
dd -1 xor (SS_LEFTNOWORDWRAP or SS_CENTER or SS_RIGHT or SS_CENTERIMAGE),SS_RIGHT
dd -1,0
dd -1 xor (SS_CENTER or SS_RIGHT or SS_CENTERIMAGE),SS_CENTERIMAGE
dd -1,0
dd -1 xor (SS_LEFTNOWORDWRAP or SS_CENTER or SS_RIGHT or SS_CENTERIMAGE),SS_CENTER or SS_CENTERIMAGE
dd -1,0
dd -1 xor (SS_LEFTNOWORDWRAP or SS_CENTER or SS_RIGHT or SS_CENTERIMAGE),SS_RIGHT or SS_CENTERIMAGE
dd -1,0
AligEdt db 'Left,Center,Right',0
dd -1 xor (ES_CENTER or ES_RIGHT),0
dd -1,0
dd -1 xor (ES_CENTER or ES_RIGHT),ES_CENTER
dd -1,0
dd -1 xor (ES_CENTER or ES_RIGHT),ES_RIGHT
dd -1,0
AligBtn db 'Default,TopLeft,TopCenter,TopRight,CenterLeft,CenterCenter,CenterRight,BottomLeft,BottomCenter,BottomRight',0
dd -1 xor (BS_CENTER or BS_VCENTER),0
dd -1,0
dd -1 xor (BS_CENTER or BS_VCENTER),BS_TOP or BS_LEFT
dd -1,0
dd -1 xor (BS_CENTER or BS_VCENTER),BS_CENTER or BS_TOP
dd -1,0
dd -1 xor (BS_CENTER or BS_VCENTER),BS_TOP or BS_RIGHT
dd -1,0
dd -1 xor (BS_CENTER or BS_VCENTER),BS_LEFT or BS_VCENTER
dd -1,0
dd -1 xor (BS_CENTER or BS_VCENTER),BS_CENTER or BS_VCENTER
dd -1,0
dd -1 xor (BS_CENTER or BS_VCENTER),BS_RIGHT or BS_VCENTER
dd -1,0
dd -1 xor (BS_CENTER or BS_VCENTER),BS_BOTTOM or BS_LEFT
dd -1,0
dd -1 xor (BS_CENTER or BS_VCENTER),BS_CENTER or BS_BOTTOM
dd -1,0
dd -1 xor (BS_CENTER or BS_VCENTER),BS_BOTTOM or BS_RIGHT
dd -1,0
AligChk db 'Left,Right',0
dd -1 xor (BS_LEFTTEXT),0
dd -1,0
dd -1 xor (BS_LEFTTEXT),BS_LEFTTEXT
dd -1,0
AligTab db 'Left,Top,Right,Bottom',0
dd -1 xor (TCS_BOTTOM or TCS_VERTICAL),TCS_VERTICAL
dd -1,0
dd -1 xor (TCS_BOTTOM or TCS_VERTICAL),0
dd -1,0
dd -1 xor (TCS_BOTTOM or TCS_VERTICAL),TCS_BOTTOM or TCS_VERTICAL
dd -1,0
dd -1 xor (TCS_BOTTOM or TCS_VERTICAL),TCS_BOTTOM
dd -1,0
AligLsv db 'Left,Top',0
dd -1 xor LVS_ALIGNLEFT,LVS_ALIGNLEFT
dd -1,0
dd -1 xor LVS_ALIGNLEFT,0
dd -1,0
AligSpn db 'None,Left,Right',0
dd -1 xor (UDS_ALIGNLEFT or UDS_ALIGNRIGHT),0
dd -1,0
dd -1 xor (UDS_ALIGNLEFT or UDS_ALIGNRIGHT),UDS_ALIGNLEFT
dd -1,0
dd -1 xor (UDS_ALIGNLEFT or UDS_ALIGNRIGHT),UDS_ALIGNRIGHT
dd -1,0
AligIco db 'AutoSize,Center',0
dd -1 xor SS_CENTERIMAGE,0
dd -1,0
dd -1 xor SS_CENTERIMAGE,SS_CENTERIMAGE
dd -1,0
AligTbr db 'Left,Top,Right,Bottom',0
dd -1 xor (CCS_VERT or CCS_BOTTOM or CCS_TOP),CCS_TOP or CCS_VERT
dd -1,0
dd -1 xor (CCS_VERT or CCS_BOTTOM or CCS_TOP),CCS_TOP
dd -1,0
dd -1 xor (CCS_VERT or CCS_BOTTOM or CCS_TOP),CCS_BOTTOM or CCS_VERT
dd -1,0
dd -1 xor (CCS_VERT or CCS_BOTTOM or CCS_TOP),CCS_BOTTOM
dd -1,0
AligAni db 'AutoSize,Center',0
dd -1 xor ACS_CENTER,0
dd -1,0
dd -1 xor ACS_CENTER,ACS_CENTER
dd -1,0
BordDlg db 'Flat,Boarder,Dialog,Tool,ModalFrame',0
dd -1 xor (WS_DLGFRAME or WS_BORDER or DS_MODALFRAME or WS_POPUP),WS_POPUP
dd -1 xor (WS_EX_TOOLWINDOW or WS_EX_DLGMODALFRAME),0
dd -1 xor (WS_DLGFRAME or WS_BORDER or DS_MODALFRAME or WS_POPUP),WS_BORDER or WS_POPUP
dd -1 xor (WS_EX_TOOLWINDOW or WS_EX_DLGMODALFRAME),0
dd -1 xor (WS_DLGFRAME or WS_BORDER or DS_MODALFRAME or WS_POPUP),WS_BORDER or WS_DLGFRAME
dd -1 xor (WS_EX_TOOLWINDOW or WS_EX_DLGMODALFRAME),0
dd -1 xor (WS_DLGFRAME or WS_BORDER or DS_MODALFRAME or WS_POPUP),WS_BORDER or WS_DLGFRAME
dd -1 xor (WS_EX_TOOLWINDOW or WS_EX_DLGMODALFRAME),WS_EX_TOOLWINDOW
dd -1 xor (WS_DLGFRAME or WS_BORDER or DS_MODALFRAME or WS_POPUP),WS_BORDER or WS_DLGFRAME or DS_MODALFRAME
dd -1 xor (WS_EX_TOOLWINDOW or WS_EX_DLGMODALFRAME),WS_EX_DLGMODALFRAME
BordAll db 'Flat,Boarder,Raised,Sunken,3D-Look,Edge',0
dd -1 xor WS_BORDER,0
dd -1 xor (WS_EX_DLGMODALFRAME or WS_EX_CLIENTEDGE or WS_EX_STATICEDGE),0
dd -1 xor WS_BORDER,WS_BORDER
dd -1 xor (WS_EX_DLGMODALFRAME or WS_EX_CLIENTEDGE or WS_EX_STATICEDGE),0
dd -1 xor WS_BORDER,0
dd -1 xor (WS_EX_DLGMODALFRAME or WS_EX_CLIENTEDGE or WS_EX_STATICEDGE),WS_EX_DLGMODALFRAME
dd -1 xor WS_BORDER,0
dd -1 xor (WS_EX_DLGMODALFRAME or WS_EX_CLIENTEDGE or WS_EX_STATICEDGE),WS_EX_STATICEDGE
dd -1 xor WS_BORDER,0
dd -1 xor (WS_EX_DLGMODALFRAME or WS_EX_CLIENTEDGE or WS_EX_STATICEDGE),WS_EX_CLIENTEDGE
dd -1 xor WS_BORDER,0
dd -1 xor (WS_EX_DLGMODALFRAME or WS_EX_CLIENTEDGE or WS_EX_STATICEDGE),WS_EX_CLIENTEDGE or WS_EX_DLGMODALFRAME
BordStc db 'Flat,Boarder,Raised,Sunken,3D-Look,Edge',0
dd -1 xor (WS_BORDER or SS_SUNKEN),0
dd -1 xor (WS_EX_DLGMODALFRAME or WS_EX_CLIENTEDGE),0
dd -1 xor (WS_BORDER or SS_SUNKEN),WS_BORDER
dd -1 xor (WS_EX_DLGMODALFRAME or WS_EX_CLIENTEDGE),0
dd -1 xor (WS_BORDER or SS_SUNKEN),0
dd -1 xor (WS_EX_DLGMODALFRAME or WS_EX_CLIENTEDGE),WS_EX_DLGMODALFRAME
dd -1 xor (WS_BORDER or SS_SUNKEN),SS_SUNKEN
dd -1 xor (WS_EX_DLGMODALFRAME or WS_EX_CLIENTEDGE),0
dd -1 xor (WS_BORDER or SS_SUNKEN),0
dd -1 xor (WS_EX_DLGMODALFRAME or WS_EX_CLIENTEDGE),WS_EX_CLIENTEDGE
dd -1 xor WS_BORDER,0
dd -1 xor (WS_EX_DLGMODALFRAME or WS_EX_CLIENTEDGE),WS_EX_CLIENTEDGE or WS_EX_DLGMODALFRAME
BordBtn db 'Flat,Boarder,Raised,Sunken,3D-Look,Edge',0
dd -1 xor (WS_BORDER or BS_FLAT),BS_FLAT
dd -1 xor (WS_EX_DLGMODALFRAME or WS_EX_CLIENTEDGE or WS_EX_STATICEDGE),0
dd -1 xor (WS_BORDER or BS_FLAT),WS_BORDER or BS_FLAT
dd -1 xor (WS_EX_DLGMODALFRAME or WS_EX_CLIENTEDGE or WS_EX_STATICEDGE),0
dd -1 xor (WS_BORDER or BS_FLAT),0
dd -1 xor (WS_EX_DLGMODALFRAME or WS_EX_CLIENTEDGE or WS_EX_STATICEDGE),WS_EX_DLGMODALFRAME
dd -1 xor (WS_BORDER or BS_FLAT),0
dd -1 xor (WS_EX_DLGMODALFRAME or WS_EX_CLIENTEDGE or WS_EX_STATICEDGE),WS_EX_STATICEDGE
dd -1 xor (WS_BORDER or BS_FLAT),0
dd -1 xor (WS_EX_DLGMODALFRAME or WS_EX_CLIENTEDGE or WS_EX_STATICEDGE),0
dd -1 xor (WS_BORDER or BS_FLAT),0
dd -1 xor (WS_EX_DLGMODALFRAME or WS_EX_CLIENTEDGE or WS_EX_STATICEDGE),WS_EX_DLGMODALFRAME or WS_EX_CLIENTEDGE
TypeEdt db 'Normal,Upper,Lower,Number,Password',0
dd -1 xor (ES_UPPERCASE or ES_LOWERCASE or ES_PASSWORD or ES_NUMBER),0
dd -1,0
dd -1 xor (ES_UPPERCASE or ES_LOWERCASE or ES_PASSWORD or ES_NUMBER),ES_UPPERCASE
dd -1,0
dd -1 xor (ES_UPPERCASE or ES_LOWERCASE or ES_PASSWORD or ES_NUMBER),ES_LOWERCASE
dd -1,0
dd -1 xor (ES_UPPERCASE or ES_LOWERCASE or ES_PASSWORD or ES_NUMBER),ES_NUMBER
dd -1,0
dd -1 xor (ES_UPPERCASE or ES_LOWERCASE or ES_PASSWORD or ES_NUMBER),ES_PASSWORD
dd -1,0
TypeCbo db 'DropDownCombo,DropDownList,SimpleCombo',0
dd -1 xor (CBS_DROPDOWN or CBS_DROPDOWNLIST or CBS_SIMPLE),CBS_DROPDOWN
dd -1,0
dd -1 xor (CBS_DROPDOWN or CBS_DROPDOWNLIST or CBS_SIMPLE),CBS_DROPDOWNLIST
dd -1,0
dd -1 xor (CBS_DROPDOWN or CBS_DROPDOWNLIST or CBS_SIMPLE),CBS_SIMPLE
dd -1,0
TypeBtn db 'Text,Bitmap,Icon',0
dd -1 xor (BS_BITMAP or BS_ICON),0
dd -1,0
dd -1 xor (BS_BITMAP or BS_ICON),BS_BITMAP
dd -1,0
dd -1 xor (BS_BITMAP or BS_ICON),BS_ICON
dd -1,0
TypeTrv db 'NoLines,Lines,LinesAtRoot',0
dd -1 xor (TVS_HASLINES or TVS_LINESATROOT),0
dd -1,0
dd -1 xor (TVS_HASLINES or TVS_LINESATROOT),TVS_HASLINES
dd -1,0
dd -1 xor (TVS_HASLINES or TVS_LINESATROOT),TVS_HASLINES or TVS_LINESATROOT
dd -1,0
TypeLsv db 'Icon,List,Report,SmallIcon',0
dd -1 xor LVS_TYPEMASK,LVS_ICON
dd -1,0
dd -1 xor LVS_TYPEMASK,LVS_LIST
dd -1,0
dd -1 xor LVS_TYPEMASK,LVS_REPORT
dd -1,0
dd -1 xor LVS_TYPEMASK,LVS_SMALLICON
dd -1,0
TypeImg db 'Bitmap,Icon',0
dd -1 xor (SS_BITMAP or SS_ICON),SS_BITMAP
dd -1,0
dd -1 xor (SS_BITMAP or SS_ICON),SS_ICON
dd -1,0
TypeDtp db 'Normal,UpDown,CheckBox,Both',0
dd -1 xor 03h,00h
dd -1,0
dd -1 xor 03h,01h
dd -1,0
dd -1 xor 03h,02h
dd -1,0
dd -1 xor 03h,03h
dd -1,0
TypeStc db 'BlackRect,GrayRect,WhiteRect,HollowRect,BlackFrame,GrayFrame,WhiteFrame,EtchedFrame,H-Line,V-Line',0
dd -1 xor 1Fh,SS_BLACKRECT
dd -1,0
dd -1 xor 1Fh,SS_GRAYRECT
dd -1,0
dd -1 xor 1Fh,SS_WHITERECT
dd -1,0
dd -1 xor 1Fh,SS_OWNERDRAW
dd -1,0
dd -1 xor 1Fh,SS_BLACKFRAME
dd -1,0
dd -1 xor 1Fh,SS_GRAYFRAME
dd -1,0
dd -1 xor 1Fh,SS_WHITEFRAME
dd -1,0
dd -1 xor 1Fh,SS_ETCHEDFRAME
dd -1,0
dd -1 xor 1Fh,SS_ETCHEDHORZ
dd -1,0
dd -1 xor 1Fh,SS_ETCHEDVERT
dd -1,0
AutoEdt db 'None,Horizontal,Vertical,Both',0
dd -1 xor (ES_AUTOHSCROLL or ES_AUTOVSCROLL),0
dd -1,0
dd -1 xor (ES_AUTOHSCROLL or ES_AUTOVSCROLL),ES_AUTOHSCROLL
dd -1,0
dd -1 xor (ES_AUTOHSCROLL or ES_AUTOVSCROLL),ES_AUTOVSCROLL
dd -1,0
dd -1 xor (ES_AUTOHSCROLL or ES_AUTOVSCROLL),ES_AUTOHSCROLL or ES_AUTOVSCROLL
dd -1,0
FormDtp db 'Short,Medium,Long,Time',0
dd -1 xor 0Ch,00h
dd -1,0
dd -1 xor 0Ch,0Ch
dd -1,0
dd -1 xor 0Ch,04h
dd -1,0
dd -1 xor 0Ch,08h
dd -1,0
StarDlg db 'Normal,CenterScreen,CenterMouse',0
dd -1 xor (DS_CENTER or DS_CENTERMOUSE),0
dd -1,0
dd -1 xor (DS_CENTER or DS_CENTERMOUSE),DS_CENTER
dd -1,0
dd -1 xor (DS_CENTER or DS_CENTERMOUSE),DS_CENTERMOUSE
dd -1,0
OriePgb db 'Horizontal,Vertical',0
dd -1 xor PBS_VERTICAL,0
dd -1,0
dd -1 xor PBS_VERTICAL,PBS_VERTICAL
dd -1,0
OrieUdn db 'Vertical,Horizontal',0
dd -1 xor UDS_HORZ,0
dd -1,0
dd -1 xor UDS_HORZ,UDS_HORZ
dd -1,0
SortLsv db 'None,Ascending,Descending',0
dd -1 xor (LVS_SORTASCENDING or LVS_SORTDESCENDING),0
dd -1,0
dd -1 xor (LVS_SORTASCENDING or LVS_SORTDESCENDING),LVS_SORTASCENDING
dd -1,0
dd -1 xor (LVS_SORTASCENDING or LVS_SORTDESCENDING),LVS_SORTDESCENDING
dd -1,0
OwneCbo db 'None,Fixed,Variable',0
dd -1 xor (CBS_OWNERDRAWFIXED or CBS_OWNERDRAWVARIABLE),0
dd -1,0
dd -1 xor (CBS_OWNERDRAWFIXED or CBS_OWNERDRAWVARIABLE),CBS_OWNERDRAWFIXED
dd -1,0
dd -1 xor (CBS_OWNERDRAWFIXED or CBS_OWNERDRAWVARIABLE),CBS_OWNERDRAWVARIABLE
dd -1,0
ElliStc db 'None,EndEllipsis,PathEllipsis,WordEllipsis',0
dd -1 xor SS_ELLIPSISMASK,0
dd -1,0
dd -1 xor SS_ELLIPSISMASK,SS_ENDELLIPSIS
dd -1,0
dd -1 xor SS_ELLIPSISMASK,SS_PATHELLIPSIS
dd -1,0
dd -1 xor SS_ELLIPSISMASK,SS_WORDELLIPSIS
dd -1,0
szPropErr db 'Invalid property value.',0
StyleEx dd 0
szMaxWt db 'QwnerDraw',0
.data?
lbtxtbuffer db 4096 dup(?)
szLbString db 64 dup(?)
OldPrpCboDlgProc dd ?
hPrpLstDlg dd ?
OldPrpLstDlgProc dd ?
hPrpEdtDlgCld dd ?
OldPrpEdtDlgCldProc dd ?
hPrpEdtDlgCldMulti dd ?
OldPrpEdtDlgCldMultiProc dd ?
hPrpLstDlgCld dd ?
OldPrpLstDlgCldProc dd ?
hPrpBtnDlgCld dd ?
tempbuff db 256 dup(?)
lpResType dd ?
lpResName dd ?
lpResID dd ?
lpResStartID dd ?
lpResFile dd ?
lpResLang dd ?
lpResHeight dd ?
lpResWidth dd ?
lpResMenuEx dd ?
.code
UpdateCbo proc uses esi,lpData:DWORD
LOCAL nInx:DWORD
LOCAL buffer[128]:BYTE
LOCAL buffer1[1024]:BYTE
LOCAL buffer2[64]:BYTE
mov nInx,0
invoke SendMessage,hPrpCboDlg,CB_RESETCONTENT,0,0
mov esi,lpData
add esi,sizeof DLGHEAD
@@:
mov eax,[esi].DIALOG.hwnd
.if eax
.if eax!=-1
mov al,[esi].DIALOG.idname
.if al
invoke strcpy,addr buffer,addr [esi].DIALOG.idname
.else
invoke ResEdBinToDec,[esi].DIALOG.id,addr buffer
.endif
invoke strcpy,addr buffer1,addr szCtlText
mov eax,[esi].DIALOG.ntype
inc eax
.while eax
push eax
invoke GetStrItem,addr buffer1,addr buffer2
pop eax
dec eax
.endw
push esi
invoke strlen,addr buffer
lea esi,buffer
add esi,eax
mov al,' '
mov [esi],al
inc esi
invoke strcpy,esi,addr buffer2
pop esi
invoke SendMessage,hPrpCboDlg,CB_ADDSTRING,0,addr buffer
invoke SendMessage,hPrpCboDlg,CB_SETITEMDATA,eax,nInx
.endif
inc nInx
add esi,sizeof DIALOG
jmp @b
.endif
ret
UpdateCbo endp
SetCbo proc nID:DWORD
LOCAL nInx:DWORD
invoke SendMessage,hPrpCboDlg,CB_GETCOUNT,0,0
mov nInx,eax
@@:
.if nInx
dec nInx
invoke SendMessage,hPrpCboDlg,CB_GETITEMDATA,nInx,0
.if eax==nID
invoke SendMessage,hPrpCboDlg,CB_SETCURSEL,nInx,0
.endif
jmp @b
.endif
ret
SetCbo endp
PropListSetTxt proc uses esi,hWin:HWND
LOCAL nInx:DWORD
LOCAL buffer[512]:BYTE
invoke SendMessage,hWin,LB_GETCURSEL,0,0
.if eax!=LB_ERR
mov nInx,eax
invoke SendMessage,hWin,LB_GETTEXT,nInx,addr buffer
lea esi,buffer
@@:
mov al,[esi]
inc esi
cmp al,09h
jne @b
invoke SendMessage,hWin,LB_GETITEMDATA,nInx,0
.if eax==PRP_STR_CAPTION || eax==PRP_STR_CAPMULTI || eax==PRP_STR_IMAGE || eax==PRP_STR_AVI
invoke SendMessage,hPrpEdtDlgCld,EM_LIMITTEXT,MaxCap-1,0
invoke SendMessage,hPrpEdtDlgCldMulti,EM_LIMITTEXT,MaxCap-1,0
.elseif eax==PRP_STR_NAME || eax==PRP_STR_NAMEBTN || eax==PRP_STR_NAMESTC
invoke SendMessage,hPrpEdtDlgCld,EM_LIMITTEXT,MaxName-1,0
.elseif eax==PRP_STR_FILE
invoke SendMessage,hPrpEdtDlgCld,EM_LIMITTEXT,MAX_PATH-1,0
.elseif eax==PRP_FUN_STYLE || eax==PRP_FUN_EXSTYLE
invoke SendMessage,hPrpEdtDlgCld,EM_LIMITTEXT,8,0
.else
invoke SendMessage,hPrpEdtDlgCld,EM_LIMITTEXT,32-1,0
.endif
invoke SetWindowText,hPrpEdtDlgCld,esi
.endif
ret
PropListSetTxt endp
PropListSetPos proc
LOCAL rect:RECT
LOCAL nInx:DWORD
LOCAL lbid:DWORD
invoke ShowWindow,hPrpEdtDlgCld,SW_HIDE
invoke ShowWindow,hPrpEdtDlgCldMulti,SW_HIDE
invoke ShowWindow,hPrpBtnDlgCld,SW_HIDE
invoke SendMessage,hPrpLstDlg,LB_GETCURSEL,0,0
.if eax!=LB_ERR
mov nInx,eax
invoke SendMessage,hPrpLstDlg,LB_GETTEXT,nInx,addr lbtxtbuffer
mov ecx,offset lbtxtbuffer
mov edx,offset szLbString
.while byte ptr [ecx]!=VK_TAB
mov al,[ecx]
mov [edx],al
inc ecx
inc edx
.endw
mov byte ptr [edx],0
invoke SendMessage,hPrpLstDlg,LB_GETITEMRECT,nInx,addr rect
invoke SendMessage,hPrpLstDlg,LB_GETITEMDATA,nInx,0
mov lbid,eax
invoke SetWindowLong,hPrpBtnDlgCld,GWL_USERDATA,eax
mov eax,lbid
.if (eax>=PRP_BOOL_SYSMENU && eax<=499) || eax==PRP_FUN_LANG || eax>65535
mov ecx,nPropHt
sub rect.right,ecx
mov eax,rect.right
sub eax,rect.left
mov edx,nPropWt
add edx,32
sub edx,ecx
.if eax<edx
mov rect.right,edx
.endif
invoke SetWindowPos,hPrpBtnDlgCld,HWND_TOP,rect.right,rect.top,nPropHt,nPropHt,0
invoke ShowWindow,hPrpBtnDlgCld,SW_SHOWNOACTIVATE
.elseif eax==PRP_FUN_STYLE || eax==PRP_FUN_EXSTYLE
invoke PropListSetTxt,hPrpLstDlg
mov ecx,nPropHt
sub rect.right,ecx
mov eax,rect.right
sub eax,rect.left
mov edx,nPropWt
add edx,32
sub edx,ecx
.if eax<edx
mov rect.right,edx
.endif
invoke SetWindowPos,hPrpBtnDlgCld,HWND_TOP,rect.right,rect.top,nPropHt,nPropHt,0
invoke ShowWindow,hPrpBtnDlgCld,SW_SHOWNOACTIVATE
mov edx,nPropWt
add edx,1
mov rect.left,edx
sub rect.right,edx
invoke SetWindowPos,hPrpEdtDlgCld,HWND_TOP,rect.left,rect.top,rect.right,nPropHt,0
invoke ShowWindow,hPrpEdtDlgCld,SW_SHOWNOACTIVATE
mov rect.left,1
mov rect.top,0
mov eax,nPropHt
mov rect.bottom,eax
invoke SendMessage,hPrpEdtDlgCld,EM_SETRECT,0,addr rect
.else
invoke PropListSetTxt,hPrpLstDlg
mov eax,lbid
.if eax==PRP_STR_MENU || eax==PRP_STR_IMAGE || eax==PRP_STR_AVI || eax==PRP_STR_NAMEBTN || eax==PRP_STR_NAMESTC || eax==PRP_STR_FILE || eax==PRP_STR_FONT
mov ecx,nPropHt
dec ecx
sub rect.right,ecx
invoke SetWindowPos,hPrpBtnDlgCld,HWND_TOP,rect.right,rect.top,nPropHt,nPropHt,0
invoke ShowWindow,hPrpBtnDlgCld,SW_SHOWNOACTIVATE
.elseif lbid==PRP_STR_CAPMULTI
mov ecx,nPropHt
dec ecx
sub rect.right,ecx
invoke SetWindowPos,hPrpBtnDlgCld,HWND_TOP,rect.right,rect.top,nPropHt,nPropHt,0
invoke ShowWindow,hPrpBtnDlgCld,SW_SHOWNOACTIVATE
.endif
mov edx,nPropWt
add edx,1
mov rect.left,edx
sub rect.right,edx
invoke SetWindowPos,hPrpEdtDlgCld,HWND_TOP,rect.left,rect.top,rect.right,nPropHt,0
invoke ShowWindow,hPrpEdtDlgCld,SW_SHOWNOACTIVATE
mov rect.left,1
mov rect.top,0
mov eax,nPropHt
mov rect.bottom,eax
invoke SendMessage,hPrpEdtDlgCld,EM_SETRECT,0,addr rect
.endif
xor eax,eax
.endif
ret
PropListSetPos endp
TxtLstFalseTrue proc uses esi,CtlVal:DWORD,lpVal:DWORD
invoke SendMessage,hPrpLstDlgCld,LB_RESETCONTENT,0,0
invoke SendMessage,hPrpLstDlgCld,LB_ADDSTRING,0,addr szFalse
mov eax,lpVal
invoke SendMessage,hPrpLstDlgCld,LB_SETITEMDATA,0,eax
invoke SendMessage,hPrpLstDlgCld,LB_ADDSTRING,0,addr szTrue
mov eax,lpVal
add eax,8
invoke SendMessage,hPrpLstDlgCld,LB_SETITEMDATA,1,eax
mov esi,lpVal
mov eax,[esi]
xor eax,-1
and eax,CtlVal
.if eax==[esi+4]
invoke SendMessage,hPrpLstDlgCld,LB_SETCURSEL,0,0
.else
invoke SendMessage,hPrpLstDlgCld,LB_SETCURSEL,1,0
.endif
ret
TxtLstFalseTrue endp
TxtLstMulti proc uses esi,CtlValSt:DWORD,CtlValExSt:DWORD,lpVal:DWORD
LOCAL buffer[512]:BYTE
LOCAL buffer1[64]:BYTE
LOCAL nInx:DWORD
invoke SendMessage,hPrpLstDlgCld,LB_RESETCONTENT,0,0
invoke strcpy,addr buffer,lpVal
invoke strlen,lpVal
add lpVal,eax
inc lpVal
@@:
invoke GetStrItem,addr buffer,addr buffer1
invoke SendMessage,hPrpLstDlgCld,LB_ADDSTRING,0,addr buffer1
mov nInx,eax
invoke SendMessage,hPrpLstDlgCld,LB_SETITEMDATA,nInx,lpVal
mov esi,lpVal
mov eax,[esi]
xor eax,-1
and eax,CtlValSt
.if eax==[esi+4]
mov eax,[esi+8]
xor eax,-1
and eax,CtlValExSt
.if eax==[esi+12]
invoke SendMessage,hPrpLstDlgCld,LB_SETCURSEL,nInx,0
.endif
.endif
add lpVal,16
mov al,buffer[0]
or al,al
jne @b
ret
TxtLstMulti endp
PropTxtLst proc uses ebx esi edi,hCtl:DWORD,lbid:DWORD
LOCAL nType:DWORD
LOCAL buffer[32]:BYTE
invoke SetWindowLong,hPrpLstDlgCld,GWL_USERDATA,hCtl
; invoke SetWindowLong,hPrpLstDlgCld,GWL_ID,lbid
.if hCtl==-7
.if lbid==PRP_BOOL_MENUEX
mov eax,lpResMenuEx
mov eax,[eax]
invoke TxtLstFalseTrue,eax,addr MenuEx
.endif
.else
invoke GetCtrlMem,hCtl
mov esi,eax
assume esi:ptr DIALOG
push [esi].ntype
pop nType
mov eax,lbid
.if eax==PRP_BOOL_SYSMENU
invoke TxtLstFalseTrue,[esi].style,addr SysMDlg
.elseif eax==PRP_BOOL_MAXBUTTON
invoke TxtLstFalseTrue,[esi].style,addr MaxBDlg
.elseif eax==PRP_BOOL_MINBUTTON
invoke TxtLstFalseTrue,[esi].style,addr MinBDlg
.elseif eax==PRP_BOOL_ENABLED
invoke TxtLstFalseTrue,[esi].style,addr EnabAll
.elseif eax==PRP_BOOL_VISIBLE
invoke TxtLstFalseTrue,[esi].style,addr VisiAll
.elseif eax==PRP_BOOL_DEFAULT
invoke TxtLstFalseTrue,[esi].style,addr DefaBtn
.elseif eax==PRP_BOOL_AUTO
.if nType==5
invoke TxtLstFalseTrue,[esi].style,addr AutoChk
.elseif nType==6
invoke TxtLstFalseTrue,[esi].style,addr AutoRbt
.elseif nType==16
invoke TxtLstFalseTrue,[esi].style,addr AutoSpn
.endif
.elseif eax==PRP_BOOL_AUTOSCROLL
.if nType==7
invoke TxtLstFalseTrue,[esi].style,addr AutoCbo
.endif
.elseif eax==PRP_BOOL_AUTOPLAY
.if nType==27
invoke TxtLstFalseTrue,[esi].style,addr AutoAni
.endif
.elseif eax==PRP_BOOL_AUTOSIZE
.if nType==18 || nType==19
invoke TxtLstFalseTrue,[esi].style,addr AutoTbr
.endif
.elseif eax==PRP_BOOL_MNEMONIC
invoke TxtLstFalseTrue,[esi].style,addr MnemStc
.elseif eax==PRP_BOOL_WORDWRAP
invoke TxtLstFalseTrue,[esi].style,addr WordStc
.elseif eax==PRP_BOOL_MULTI
.if nType==1 || nType==22
invoke TxtLstFalseTrue,[esi].style,addr MultEdt
.elseif nType==4 || nType==5 || nType==6
invoke TxtLstFalseTrue,[esi].style,addr MultBtn
.elseif nType==8
invoke TxtLstFalseTrue,[esi].style,addr MultLst
.elseif nType==11
invoke TxtLstFalseTrue,[esi].style,addr MultTab
.elseif nType==21
invoke TxtLstFalseTrue,[esi].style,addr MultMvi
.endif
.elseif eax==PRP_BOOL_LOCK
invoke TxtLstFalseTrue,[esi].style,addr LockEdt
.elseif eax==PRP_BOOL_CHILD
invoke TxtLstFalseTrue,[esi].style,addr ChilAll
.elseif eax==PRP_BOOL_SIZE
.if nType==0
invoke TxtLstFalseTrue,[esi].style,addr SizeDlg
.elseif nType==19
invoke TxtLstFalseTrue,[esi].style,addr SizeSbr
.endif
.elseif eax==PRP_BOOL_TABSTOP
invoke TxtLstFalseTrue,[esi].style,addr TabSAll
.elseif eax==PRP_BOOL_NOTIFY
.if nType==2 || nType==17 || nType==25
invoke TxtLstFalseTrue,[esi].style,addr NotiStc
.elseif nType==4 || nType==5 || nType==6
invoke TxtLstFalseTrue,[esi].style,addr NotiBtn
.elseif nType==8
invoke TxtLstFalseTrue,[esi].style,addr NotiLst
.endif
.elseif eax==PRP_BOOL_WANTCR
invoke TxtLstFalseTrue,[esi].style,addr WantEdt
.elseif eax==PRP_BOOL_SORT
.if nType==7
invoke TxtLstFalseTrue,[esi].style,addr SortCbo
.elseif nType==8
invoke TxtLstFalseTrue,[esi].style,addr SortLst
.endif
.elseif eax==PRP_BOOL_FLAT
invoke TxtLstFalseTrue,[esi].style,addr FlatTbr
.elseif eax==PRP_BOOL_GROUP
invoke TxtLstFalseTrue,[esi].style,addr GrouAll
.elseif eax==PRP_BOOL_ICON
; invoke TxtLstFalseTrue,[esi].style,addr IconBtn
.elseif eax==PRP_BOOL_USETAB
invoke TxtLstFalseTrue,[esi].style,addr UseTLst
.elseif eax==PRP_BOOL_SETBUDDY
invoke TxtLstFalseTrue,[esi].style,addr SetBUdn
.elseif eax==PRP_BOOL_HIDE
.if nType==1 || nType==22
invoke TxtLstFalseTrue,[esi].style,addr HideEdt
.elseif nType==13
invoke TxtLstFalseTrue,[esi].style,addr HideTrv
.elseif nType==14
invoke TxtLstFalseTrue,[esi].style,addr HideLsv
.endif
.elseif eax==PRP_BOOL_TOPMOST
invoke TxtLstFalseTrue,[esi].exstyle,addr TopMost
.elseif eax==PRP_BOOL_INTEGRAL
.if nType==7
invoke TxtLstFalseTrue,[esi].style,addr IntHtCbo
.elseif nType==8
invoke TxtLstFalseTrue,[esi].style,addr IntHtLst
.endif
.elseif eax==PRP_BOOL_BUTTON
.if nType==11
invoke TxtLstFalseTrue,[esi].style,addr ButtTab
.elseif nType==13
invoke TxtLstFalseTrue,[esi].style,addr ButtTrv
.elseif nType==32
invoke TxtLstFalseTrue,[esi].style,addr ButtHdr
.endif
.elseif eax==PRP_BOOL_POPUP
invoke TxtLstFalseTrue,[esi].style,addr PopUAll
.elseif eax==PRP_BOOL_OWNERDRAW
invoke TxtLstFalseTrue,[esi].style,addr OwneLsv
.elseif eax==PRP_BOOL_TRANSP
invoke TxtLstFalseTrue,[esi].style,addr TranAni
.elseif eax==PRP_BOOL_TIME
invoke TxtLstFalseTrue,[esi].style,addr TimeAni
.elseif eax==PRP_BOOL_WEEK
invoke TxtLstFalseTrue,[esi].style,addr WeekMvi
.elseif eax==PRP_BOOL_TOOLTIP
.if nType==11
invoke TxtLstFalseTrue,[esi].style,addr ToolTab
.elseif nType==18
invoke TxtLstFalseTrue,[esi].style,addr ToolTbr
.else
invoke TxtLstFalseTrue,[esi].style,addr ToolSbr
.endif
.elseif eax==PRP_BOOL_WRAP
invoke TxtLstFalseTrue,[esi].style,addr WrapTbr
.elseif eax==PRP_BOOL_DIVIDER
invoke TxtLstFalseTrue,[esi].style,addr DiviTbr
.elseif eax==PRP_BOOL_DRAGDROP
invoke TxtLstFalseTrue,[esi].style,addr DragHdr
.elseif eax==PRP_BOOL_SMOOTH
invoke TxtLstFalseTrue,[esi].style,addr SmooPgb
.elseif eax==PRP_BOOL_HASSTRINGS
.if nType==7
invoke TxtLstFalseTrue,[esi].style,addr HasStcb
.elseif nType==8
invoke TxtLstFalseTrue,[esi].style,addr HasStlb
.endif
.elseif eax==PRP_BOOL_SAVESEL
invoke TxtLstFalseTrue,[esi].style,addr SaveRich
.elseif eax==PRP_MULTI_CLIP
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr ClipAll
.elseif eax==PRP_MULTI_SCROLL
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr ScroAll
.elseif eax==PRP_MULTI_ALIGN
.if nType==1
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr AligEdt
.elseif nType==2
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr AligStc
.elseif nType==4
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr AligBtn
.elseif nType==5 || nType==6
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr AligChk
.elseif nType==11
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr AligTab
.elseif nType==14
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr AligLsv
.elseif nType==16
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr AligSpn
.elseif nType==17
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr AligIco
.elseif nType==18 || nType==19
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr AligTbr
.elseif nType==27
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr AligAni
.endif
.elseif eax==PRP_MULTI_AUTOSCROLL
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr AutoEdt
.elseif eax==PRP_MULTI_FORMAT
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr FormDtp
.elseif eax==PRP_MULTI_STARTPOS
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr StarDlg
.elseif eax==PRP_MULTI_ORIENT
.if nType==12
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr OriePgb
.elseif nType==16
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr OrieUdn
.endif
.elseif eax==PRP_MULTI_SORT
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr SortLsv
.elseif eax==PRP_MULTI_OWNERDRAW
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr OwneCbo
.elseif eax==PRP_MULTI_ELLIPSIS
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr ElliStc
.elseif eax==PRP_MULTI_BORDER
mov eax,nType
.if eax==0
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr BordDlg
.elseif eax==2 || eax==17 || eax==25
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr BordStc
.elseif eax==3 || eax==4
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr BordBtn
.else
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr BordAll
.endif
.elseif eax==PRP_MULTI_TYPE
mov eax,nType
.if eax==1
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr TypeEdt
.elseif eax==4
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr TypeBtn
.elseif eax==7 || eax==24
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr TypeCbo
.elseif eax==13
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr TypeTrv
.elseif eax==14
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr TypeLsv
.elseif eax==17
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr TypeImg
.elseif eax==20
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr TypeDtp
.elseif eax==25
invoke TxtLstMulti,[esi].style,[esi].exstyle,addr TypeStc
.endif
.elseif eax==PRP_STR_MENU
;Dialog Menu
invoke SendMessage,hPrpLstDlgCld,LB_RESETCONTENT,0,0
invoke GetWindowLong,hPrj,0
mov edi,eax
.while [edi].PROJECT.hmem
.if [edi].PROJECT.ntype==TPE_MENU
mov edx,[edi].PROJECT.hmem
.if [edx].MNUHEAD.menuname
lea edx,[edx].MNUHEAD.menuname
.else
invoke ResEdBinToDec,[edx].MNUHEAD.menuid,addr buffer
lea edx,buffer
.endif
invoke SendMessage,hPrpLstDlgCld,LB_ADDSTRING,0,edx
.endif
lea edi,[edi+sizeof PROJECT]
.endw
.elseif eax==PRP_STR_IMAGE
;Image
invoke SendMessage,hPrpLstDlgCld,LB_RESETCONTENT,0,0
invoke GetWindowLong,hPrj,0
mov edi,eax
.while [edi].PROJECT.hmem
.if [edi].PROJECT.ntype==TPE_RESOURCE
mov edx,[edi].PROJECT.hmem
.while [edx].RESOURCEMEM.szname || [edx].RESOURCEMEM.value
mov eax,[esi].DIALOG.style
and eax,SS_TYPEMASK
.if eax==SS_BITMAP
mov eax,0
.elseif eax==SS_ICON
mov eax,2
.endif
.if eax==[edx].RESOURCEMEM.ntype
push edx
.if [edx].RESOURCEMEM.szname
lea edx,[edx].RESOURCEMEM.szname
.else
mov buffer,'#'
invoke ResEdBinToDec,[edx].RESOURCEMEM.value,addr buffer[1]
lea edx,buffer
.endif
invoke SendMessage,hPrpLstDlgCld,LB_ADDSTRING,0,edx
pop edx
.endif
lea edx,[edx+sizeof RESOURCEMEM]
.endw
.endif
lea edi,[edi+sizeof PROJECT]
.endw
.elseif eax==PRP_STR_AVI
;Avi
invoke SendMessage,hPrpLstDlgCld,LB_RESETCONTENT,0,0
invoke GetWindowLong,hPrj,0
mov edi,eax
.while [edi].PROJECT.hmem
.if [edi].PROJECT.ntype==TPE_RESOURCE
mov edx,[edi].PROJECT.hmem
.while [edx].RESOURCEMEM.szname || [edx].RESOURCEMEM.value
.if [edx].RESOURCEMEM.ntype==3
push edx
.if [edx].RESOURCEMEM.szname
lea edx,[edx].RESOURCEMEM.szname
.else
mov buffer,'#'
invoke ResEdBinToDec,[edx].RESOURCEMEM.value,addr buffer[1]
lea edx,buffer
.endif
invoke SendMessage,hPrpLstDlgCld,LB_ADDSTRING,0,edx
pop edx
.endif
lea edx,[edx+sizeof RESOURCEMEM]
.endw
.endif
lea edi,[edi+sizeof PROJECT]
.endw
.elseif eax==PRP_STR_NAMEBTN
;(Name)
invoke SendMessage,hPrpLstDlgCld,LB_RESETCONTENT,0,0
invoke SendMessage,hPrpLstDlgCld,LB_ADDSTRING,0,addr szIDOK
invoke SendMessage,hPrpLstDlgCld,LB_SETITEMDATA,eax,IDOK
invoke SendMessage,hPrpLstDlgCld,LB_ADDSTRING,0,addr szIDCANCEL
invoke SendMessage,hPrpLstDlgCld,LB_SETITEMDATA,eax,IDCANCEL
invoke SendMessage,hPrpLstDlgCld,LB_ADDSTRING,0,addr szIDABORT
invoke SendMessage,hPrpLstDlgCld,LB_SETITEMDATA,eax,IDABORT
invoke SendMessage,hPrpLstDlgCld,LB_ADDSTRING,0,addr szIDRETRY
invoke SendMessage,hPrpLstDlgCld,LB_SETITEMDATA,eax,IDRETRY
invoke SendMessage,hPrpLstDlgCld,LB_ADDSTRING,0,addr szIDIGNORE
invoke SendMessage,hPrpLstDlgCld,LB_SETITEMDATA,eax,IDIGNORE
invoke SendMessage,hPrpLstDlgCld,LB_ADDSTRING,0,addr szIDYES
invoke SendMessage,hPrpLstDlgCld,LB_SETITEMDATA,eax,IDYES
invoke SendMessage,hPrpLstDlgCld,LB_ADDSTRING,0,addr szIDNO
invoke SendMessage,hPrpLstDlgCld,LB_SETITEMDATA,eax,IDNO
invoke SendMessage,hPrpLstDlgCld,LB_ADDSTRING,0,addr szIDCLOSE
invoke SendMessage,hPrpLstDlgCld,LB_SETITEMDATA,eax,IDCLOSE
invoke SendMessage,hPrpLstDlgCld,LB_ADDSTRING,0,addr szIDHELP
invoke SendMessage,hPrpLstDlgCld,LB_SETITEMDATA,eax,IDHELP
xor ebx,ebx
.while TRUE
invoke SendMessage,hPrpLstDlgCld,LB_GETTEXT,ebx,addr buffer
.break .if eax==LB_ERR
invoke strcmpi,addr [esi].idname,addr buffer
.if !eax
invoke SendMessage,hPrpLstDlgCld,LB_SETCURSEL,ebx,0
.break
.endif
inc ebx
.endw
.elseif eax==PRP_STR_NAMESTC
;(Name)
invoke SendMessage,hPrpLstDlgCld,LB_RESETCONTENT,0,0
invoke SendMessage,hPrpLstDlgCld,LB_ADDSTRING,0,addr szIDC_STATIC
invoke SendMessage,hPrpLstDlgCld,LB_SETITEMDATA,eax,-1;IDC_STATIC
invoke strcmpi,addr [esi].idname,addr szIDC_STATIC
.if !eax
invoke SendMessage,hPrpLstDlgCld,LB_SETCURSEL,0,0
.endif
.elseif eax==PRP_FUN_LANG
;Language
.elseif eax>65535
;Custom control
mov edx,[eax+4]
.if dword ptr [eax]==1
invoke TxtLstFalseTrue,[esi].style,edx
.elseif dword ptr [eax]==2
invoke TxtLstFalseTrue,[esi].exstyle,edx
.elseif dword ptr [eax]==3
invoke TxtLstMulti,[esi].style,[esi].exstyle,edx
.endif
.endif
.endif
assume esi:nothing
ret
PropTxtLst endp
SetTxtLstPos proc lpRect:DWORD
LOCAL rect:RECT
LOCAL lbht:DWORD
LOCAL ht:DWORD
invoke GetClientRect,hPrpLstDlg,addr rect
mov eax,rect.bottom
mov ht,eax
invoke CopyRect,addr rect,lpRect
invoke SendMessage,hPrpLstDlgCld,LB_GETITEMHEIGHT,0,0
push eax
invoke SendMessage,hPrpLstDlgCld,LB_GETCOUNT,0,0
.if eax>8
mov eax,8
.endif
pop edx
mul edx
add eax,2
mov lbht,eax
add eax,rect.top
.if eax>ht
mov eax,lbht
inc eax
add eax,nPropHt
sub rect.top,eax
.endif
invoke SetWindowPos,hPrpLstDlgCld,HWND_TOP,rect.left,rect.top,rect.right,lbht,0
invoke ShowWindow,hPrpLstDlgCld,SW_SHOWNOACTIVATE
invoke SendMessage,hPrpLstDlgCld,LB_GETCURSEL,0,0
.if eax!=LB_ERR
invoke SendMessage,hPrpLstDlgCld,LB_SETCURSEL,eax,0
.endif
ret
SetTxtLstPos endp
PropEditChkVal proc uses esi,lpTxt:DWORD,nTpe:DWORD,lpfErr:DWORD
LOCAL buffer[16]:BYTE
LOCAL val:DWORD
mov eax,lpfErr
mov dword ptr [eax],FALSE
invoke ResEdDecToBin,lpTxt
mov val,eax
invoke ResEdBinToDec,val,addr buffer
invoke strcmp,lpTxt,addr buffer
.if eax
mov eax,lpfErr
mov dword ptr [eax],TRUE
invoke MessageBox,hPrp,addr szPropErr,addr szAppName,MB_OK or MB_ICONERROR
.endif
mov eax,val
ret
PropEditChkVal endp
PropEditUpdList proc uses ebx esi edi,lpPtr:DWORD
LOCAL nInx:DWORD
LOCAL buffer[512]:BYTE
LOCAL buffer1[512]:BYTE
LOCAL hCtl:DWORD
LOCAL lpTxt:DWORD
LOCAL fErr:DWORD
LOCAL lbid:DWORD
LOCAL val:DWORD
LOCAL hMem:DWORD
LOCAL nDefault:DWORD
mov fErr,FALSE
mov nDefault,0
invoke SendMessage,hPrpLstDlg,LB_GETCURSEL,0,0
.if eax!=LB_ERR
mov nInx,eax
;Get type
invoke SendMessage,hPrpLstDlg,LB_GETITEMDATA,nInx,0
mov lbid,eax
invoke SendMessage,hPrpLstDlg,LB_SETCURSEL,-1,0
invoke ShowWindow,hPrpEdtDlgCld,SW_HIDE
invoke ShowWindow,hPrpEdtDlgCldMulti,SW_HIDE
invoke ShowWindow,hPrpBtnDlgCld,SW_HIDE
invoke ShowWindow,hPrpLstDlgCld,SW_HIDE
;Get text
invoke SendMessage,hPrpLstDlg,LB_GETTEXT,nInx,addr buffer
invoke GetWindowText,hPrpEdtDlgCld,addr buffer1,sizeof buffer1
;Find TAB char
lea esi,buffer
@@:
mov al,[esi]
inc esi
cmp al,09h
jne @b
mov lpTxt,esi
;Text changed ?
invoke strcmp,lpTxt,addr buffer1
.if hMultiSel && (lbid==PRP_STR_NAME || lbid==PRP_STR_CAPTION)
mov eax,1
.endif
.if eax
;Get controls hwnd
invoke GetWindowLong,hPrpLstDlg,GWL_USERDATA
mov hCtl,eax
mov eax,lbid
;Pos, Size, ID or HelpID
.if eax>=PRP_NUM_ID && eax<=PRP_NUM_HELPID
;Test valid num
invoke PropEditChkVal,addr buffer1,lbid,addr fErr
mov val,eax
.endif
.if !fErr
.if hMultiSel
push 0
mov eax,hMultiSel
.while eax
push eax
invoke GetParent,eax
mov edx,eax
pop eax
push edx
mov ecx,8
.while ecx
push ecx
invoke GetWindowLong,eax,GWL_USERDATA
pop ecx
dec ecx
.endw
.endw
invoke GlobalAlloc,GMEM_FIXED or GMEM_ZEROINIT,4096
mov ebx,eax
mov hMem,eax
pop eax
.while eax
mov hCtl,eax
call SetCtrlData
pop eax
.endw
invoke GlobalFree,hMem
invoke GetWindowLong,hDEd,DEWM_MEMORY
invoke MakeDialog,eax,-1
invoke PropertyList,-1
invoke SetChanged,TRUE
.else
.if hCtl==-2 || hCtl==-3 || hCtl==-4 || hCtl==-6 || hCtl==-7 || hCtl==-8 || hCtl==-9
mov eax,lbid
.if eax==PRP_STR_NAME
invoke CheckName,addr buffer1
.if !eax
invoke strcpy,lpResName,addr buffer1
.endif
.elseif eax==PRP_NUM_ID
mov eax,lpResID
push val
pop [eax]
.elseif eax==PRP_NUM_SIZEW
mov eax,lpResWidth
push val
pop [eax]
.elseif eax==PRP_NUM_SIZEH
mov eax,lpResHeight
push val
pop [eax]
.elseif eax==PRP_NUM_STARTID
mov eax,lpResStartID
push val
pop [eax]
.elseif eax==PRP_BOOL_MENUEX
mov edi,lpPtr
mov esi,lpResMenuEx
mov eax,[esi]
and eax,[edi]
or eax,[edi+4]
mov [esi],eax
.elseif eax==PRP_STR_FILE
invoke GetFileAttributes,lpResFile
.if eax!=INVALID_HANDLE_VALUE
invoke MoveFile,lpResFile,addr buffer1
.endif
invoke strcpy,lpResFile,addr buffer1
.endif
invoke PropertyList,hCtl
invoke SendMessage,hRes,PRO_SETMODIFY,TRUE,0
.else
call SetCtrlData
.if (lbid==PRP_STR_NAMEBTN || lbid==PRP_STR_NAMESTC) && nDefault
mov eax,nDefault
mov val,eax
mov lbid,PRP_NUM_ID
call SetCtrlData
.endif
invoke GetCtrlMem,hCtl
invoke GetCtrlID,eax
push eax
invoke GetWindowLong,hDEd,DEWM_MEMORY
pop edx
invoke MakeDialog,eax,edx
invoke SetChanged,TRUE
.endif
.endif
.endif
.endif
.endif
ret
SetCtrlData:
;Get ptr data
invoke GetCtrlMem,hCtl
mov esi,eax
assume esi:ptr DIALOG
;What is changed
mov eax,lbid
.if eax==PRP_STR_NAME || eax==PRP_STR_NAMEBTN || eax==PRP_STR_NAMESTC
invoke IsNameDefault,addr buffer1
.if !eax
invoke NameExists,addr buffer1,esi
.else
mov nDefault,eax
xor eax,eax
.endif
.if eax
invoke strcpy,addr buffer,addr szNameExist
invoke strcat,addr buffer,addr buffer1
invoke MessageBox,hDEd,addr buffer,addr szAppName,MB_OK or MB_ICONERROR
.else
invoke CheckName,addr buffer1
.if !eax
invoke strcpy,addr [esi].idname,addr buffer1
.if ![esi].ntype
invoke GetWindowLong,hDEd,DEWM_PROJECT
mov edx,eax
push edx
invoke GetProjectItemName,edx,addr buffer1
pop edx
invoke SetProjectItemName,edx,addr buffer1
.endif
.endif
.endif
.elseif eax==PRP_STR_FONT
invoke ResEdDecToBin,addr buffer1
mov val,eax
mov edx,esi
sub edx,sizeof DLGHEAD
mov [edx].DLGHEAD.fontsize,eax
lea eax,buffer1
.while byte ptr [eax] && byte ptr [eax]!=','
inc eax
.endw
.if byte ptr [eax]==','
inc eax
.else
lea eax,buffer1
.endif
invoke lstrcpy,addr [edx].DLGHEAD.font,eax
mov edx,esi
sub edx,sizeof DLGHEAD
mov eax,[edx].DLGHEAD.fontsize
mov edx,96
imul edx
mov ecx,72
xor edx,edx
idiv ecx
.if edx>=36
inc eax
.endif
neg eax
mov edx,esi
sub edx,sizeof DLGHEAD
sub esi,sizeof DLGHEAD
add esi,sizeof DLGHEAD
.elseif eax==PRP_NUM_ID
push val
pop [esi].id
.if ![esi].ntype
invoke GetWindowLong,hDEd,DEWM_PROJECT
mov edx,eax
push edx
invoke GetProjectItemName,edx,addr buffer1
pop edx
invoke SetProjectItemName,edx,addr buffer1
.endif
.elseif eax==PRP_NUM_POSL
mov eax,val
mov [esi].dux,eax
.elseif eax==PRP_NUM_POST
mov eax,val
mov [esi].duy,eax
.elseif eax==PRP_NUM_SIZEW
mov eax,val
mov [esi].duccx,eax
.elseif eax==PRP_NUM_SIZEH
mov eax,val
mov [esi].duccy,eax
.elseif eax==PRP_NUM_STARTID
sub esi,sizeof DLGHEAD
push val
pop (DLGHEAD ptr [esi]).ctlid
add esi,sizeof DLGHEAD
.elseif eax==PRP_NUM_TAB
invoke SetNewTab,hCtl,val
.elseif eax==PRP_NUM_HELPID
mov eax,val
mov [esi].helpid,eax
.elseif eax==PRP_STR_CAPTION || eax==PRP_STR_CAPMULTI
invoke strcpy,addr [esi].caption,addr buffer1
.elseif eax==PRP_STR_IMAGE
invoke strcpy,addr [esi].caption,addr buffer1
.elseif eax==PRP_STR_AVI
invoke strcpy,addr [esi].caption,addr buffer1
.elseif eax==PRP_STR_CLASS
mov eax,[esi].ntype
.if eax==0
mov edx,esi
sub edx,sizeof DLGHEAD
invoke strcpy,addr (DLGHEAD ptr [edx]).class,addr buffer1
.elseif eax==23
invoke strcpy,addr [esi].class,addr buffer1
.endif
.elseif eax==PRP_STR_MENU
mov edx,esi
sub edx,sizeof DLGHEAD
invoke strcpy,addr (DLGHEAD ptr [edx]).menuid,addr buffer1
.elseif eax==PRP_FUN_STYLE || eax==PRP_FUN_EXSTYLE
.if eax==PRP_FUN_STYLE
invoke HexToBin,addr buffer1
mov [esi].style,eax
.else
invoke HexToBin,addr buffer1
mov [esi].exstyle,eax
.endif
.endif
mov eax,lbid
;Is True/False Style or Multi Style changed
mov edi,lpPtr
.if eax>=PRP_BOOL_SYSMENU && eax<=499
.if eax==223
mov eax,[esi].exstyle
and eax,[edi]
or eax,[edi+4]
mov [esi].exstyle,eax
.else
mov eax,[esi].style
and eax,[edi]
or eax,[edi+4]
mov [esi].style,eax
.endif
;Is Multi Style changed
mov eax,lbid
.if eax>=PRP_MULTI_CLIP
mov eax,[esi].exstyle
and eax,[edi+8]
or eax,[edi+12]
mov [esi].exstyle,eax
.endif
.elseif eax>65535
.if dword ptr [eax]==1
mov eax,[esi].style
and eax,[edi]
or eax,[edi+4]
mov [esi].style,eax
.elseif dword ptr [eax]==2
mov eax,[esi].exstyle
and eax,[edi]
or eax,[edi+4]
mov [esi].exstyle,eax
.elseif dword ptr [eax]==3
mov eax,[esi].style
and eax,[edi]
or eax,[edi+4]
mov [esi].style,eax
mov eax,[esi].exstyle
and eax,[edi+8]
or eax,[edi+12]
mov [esi].exstyle,eax
.endif
.endif
assume esi:nothing
retn
PropEditUpdList endp
ListFalseTrue proc uses esi,CtlVal:DWORD,lpVal:DWORD,lpBuff:DWORD
mov esi,lpVal
mov eax,[esi]
xor eax,-1
and eax,CtlVal
.if eax==[esi+4]
invoke strcpy,lpBuff,addr szFalse
.else
invoke strcpy,lpBuff,addr szTrue
.endif
ret
ListFalseTrue endp
ListMultiStyle proc uses esi,CtlValSt:DWORD,CtlValExSt:DWORD,lpVal:DWORD,lpBuff:DWORD
LOCAL buffer[512]:BYTE
LOCAL buffer1[64]:BYTE
invoke strcpy,addr buffer,lpVal
invoke strlen,lpVal
add lpVal,eax
inc lpVal
@@:
invoke GetStrItem,addr buffer,addr buffer1
mov esi,lpVal
mov eax,[esi]
xor eax,-1
and eax,CtlValSt
.if eax==[esi+4]
mov eax,[esi+8]
xor eax,-1
and eax,CtlValExSt
.if eax==[esi+12]
invoke strcpy,lpBuff,addr buffer1
ret
.endif
.endif
add lpVal,16
mov al,buffer[0]
or al,al
jne @b
ret
ListMultiStyle endp
GetCustProp proc nType:DWORD,nProp:DWORD
invoke GetTypePtr,nType
mov edx,nProp
sub edx,[eax].TYPES.nmethod
mov eax,[eax].TYPES.methods
.if eax
lea eax,[eax+edx*8]
.endif
ret
GetCustProp endp
PropertyList proc uses ebx esi edi,hCtl:DWORD
LOCAL buffer[1024]:BYTE
LOCAL buffer1[512]:BYTE
LOCAL nType:DWORD
LOCAL lbid:DWORD
LOCAL fList1:DWORD
LOCAL fList2:DWORD
LOCAL fList3:DWORD
LOCAL fList4:DWORD
LOCAL nInx:DWORD
LOCAL tInx:DWORD
invoke ShowWindow,hPrpEdtDlgCld,SW_HIDE
invoke ShowWindow,hPrpEdtDlgCldMulti,SW_HIDE
invoke ShowWindow,hPrpBtnDlgCld,SW_HIDE
invoke ShowWindow,hPrpLstDlgCld,SW_HIDE
invoke SendMessage,hPrpCboDlg,CB_RESETCONTENT,0,0
invoke SendMessage,hPrpLstDlg,LB_GETTOPINDEX,0,0
mov tInx,eax
invoke SendMessage,hPrpLstDlg,WM_SETREDRAW,FALSE,0
invoke SendMessage,hPrpLstDlg,LB_RESETCONTENT,0,0
invoke SetWindowLong,hPrpLstDlg,GWL_USERDATA,hCtl
.if hCtl
.if hCtl==-1
mov fList1,11111110100111000000000001000000b
; NILTWHCBCMMEVCSDAAMWMTLCSTFMCNAW
mov fList2,00000000000000000000000000000000b
; SFSTFSGIUSOSMHTxxIIBPOTTAWAATWDD
mov fList3,00001000000000000000000000000000b
; SELHHFM
mov fList4,00000000000000000000000000000000b
;
invoke GetParent,hMultiSel
mov hCtl,eax
invoke GetCtrlMem,hCtl
mov esi,eax
mov eax,[esi].DIALOG.ntype
mov nType,eax
mov eax,hMultiSel
@@:
push eax
invoke GetParent,eax
invoke GetCtrlMem,eax
mov eax,[eax].DIALOG.ntype
.if eax!=nType
mov nType,-1
.endif
mov ecx,8
pop eax
.while ecx
push ecx
invoke GetWindowLong,eax,GWL_USERDATA
pop ecx
dec ecx
.endw
or eax,eax
jne @b
.if nType!=-1
; Enable Style and ExStyle
or fList2,00000000000000011000000000000000b
; SFSTFSGIUSOSMHTxxIIBPOTTAWAATWDD
.endif
invoke SetWindowLong,hPrpLstDlg,GWL_USERDATA,hCtl
mov eax,hMultiSel
@@:
push eax
invoke GetParent,eax
invoke GetCtrlMem,eax
mov edi,eax
mov eax,[edi].DIALOG.ntype
mov nType,eax
invoke GetTypePtr,nType
mov edi,eax
mov eax,(TYPES ptr [edi]).flist
and fList1,eax
mov eax,(TYPES ptr [edi]).flist+4
and fList2,eax
mov eax,(TYPES ptr [edi]).flist+8
and fList3,eax
mov eax,(TYPES ptr [edi]).flist+12
and fList4,eax
mov ecx,8
pop eax
.while ecx
push ecx
invoke GetWindowLong,eax,GWL_USERDATA
pop ecx
dec ecx
.endw
or eax,eax
jne @b
.elseif hCtl==-2
;Version
mov fList1,11000000000000000000000000000000b
; NILTWHCBSMMEVCSDAAMWMTLCSTFMCNAW
mov fList2,00000000000000000000000000000000b
; SFSTFSGIUSOSMHTxxIIBPOTTAWAATWDD
mov fList3,00000000000000000000000000000000b
; SELHHFM
mov fList4,00000000000000000000000000000000b
;
mov nType,-2
.elseif hCtl==-3
;XP Manifest
mov fList1,11000000000000000000000000000000b
; NILTWHCBSMMEVCSDAAMWMTLCSTFMCNAW
mov fList2,00000000000000000000000000000000b
; SFSTFSGIUSOSMHTxxIIBPOTTAWAATWDD
mov fList3,00000100000000000000000000000000b
; SELHHFM
mov fList4,00000000000000000000000000000000b
;
mov nType,-2
.elseif hCtl==-4
;Accelerator
mov fList1,11000000000000000000000000000000b
; NILTWHCBSMMEVCSDAAMWMTLCSTFMCNAW
mov fList2,00000000000000000000000000000000b
; SFSTFSGIUSOSMHTxxIIBPOTTAWAATWDD
mov fList3,00100000000000000000000000000000b
; SELHHFM
mov fList4,00000000000000000000000000000000b
;
mov nType,-2
.elseif hCtl==-5
;Stringtable
mov fList1,00000000000000000000000000000000b
; NILTWHCBSMMEVCSDAAMWMTLCSTFMCNAW
mov fList2,00000000000000000000000000000000b
; SFSTFSGIUSOSMHTxxIIBPOTTAWAATWDD
mov fList3,00100000000000000000000000000000b
; SELHHFM
mov fList4,00000000000000000000000000000000b
;
mov nType,-2
.elseif hCtl==-6
;Toolbar
mov fList1,11001100000000000000000000000000b
; NILTWHCBSMMEVCSDAAMWMTLCSTFMCNAW
mov fList2,00000000000000000000000000000000b
; SFSTFSGIUSOSMHTxxIIBPOTTAWAATWDD
mov fList3,00000000000000000000000000000000b
; SELHHFM
mov fList4,00000000000000000000000000000000b
;
mov nType,-2
.elseif hCtl==-7
;Menu
mov fList1,11000000000000000000000000000000b
; NILTWHCBSMMEVCSDAAMWMTLCSTFMCNAW
mov fList2,00100000000000000000000000000000b
; SFSTFSGIUSOSMHTxxIIBPOTTAWAATWDD
mov fList3,00100010000000000000000000000000b
; SELHHFM
mov fList4,00000000000000000000000000000000b
;
mov nType,-2
.elseif hCtl==-8
;RCDATA
mov fList1,11000000000000000000000000000000b
; NILTWHCBSMMEVCSDAAMWMTLCSTFMCNAW
mov fList2,00000000000000000000000000000000b
; SFSTFSGIUSOSMHTxxIIBPOTTAWAATWDD
mov fList3,00100000000000000000000000000000b
; SELHHFM
mov fList4,00000000000000000000000000000000b
;
mov nType,-2
.elseif hCtl==-9
;USERDATA
mov fList1,11000000000000000000000000000000b
; NILTWHCBSMMEVCSDAAMWMTLCSTFMCNAW
mov fList2,00000000000000000000000000000000b
; SFSTFSGIUSOSMHTxxIIBPOTTAWAATWDD
mov fList3,00000000000000000000000000000000b
; SELHHFM
mov fList4,00000000000000000000000000000000b
;
mov nType,-2
.else
invoke GetCtrlMem,hCtl
mov esi,eax
mov eax,[esi].DIALOG.ntype
mov nType,eax
invoke GetTypePtr,nType
push (TYPES ptr [eax]).flist
pop fList1
push (TYPES ptr [eax]).flist+4
pop fList2
push (TYPES ptr [eax]).flist+8
pop fList3
push (TYPES ptr [eax]).flist+12
pop fList4
.if fSimpleProperty
and fList1,11111110000110000000000001001000b
; NILTWHCBSMMEVCSDAAMWMTLCSTFMCNAW
and fList2,00110000000000011000000000000000b
; SFSTFSGIUSOSMHTxxIIBPOTTAWAATWDD
and fList3,00001000000000000000000000000000b
; SELHHFM
and fList4,00000000000000000000000000000000b
;
.endif
.endif
invoke strcpy,addr buffer,addr PrAll
mov nInx,0
@@:
invoke GetStrItem,addr buffer,addr buffer1
xor eax,eax
mov al,buffer1[0]
or al,al
je @f
shl fList4,1
rcl fList3,1
rcl fList2,1
rcl fList1,1
.if CARRY?
invoke strlen,addr buffer1
lea edi,buffer1[eax]
mov ax,09h
stosw
dec edi
mov eax,nType
mov edx,nInx
mov lbid,0
.if edx==0
;(Name)
mov lbid,PRP_STR_NAME
push eax
.if eax==-2
mov eax,lpResName
.else
lea eax,[esi].DIALOG.idname
.endif
invoke strcpy,edi,eax
pop eax
.if hMultiSel
mov eax,hMultiSel
.while eax
push eax
invoke GetParent,eax
invoke GetCtrlMem,eax
mov ebx,eax
invoke strcmp,addr [esi].DIALOG.idname,addr [ebx].DIALOG.idname
.if eax
mov byte ptr [edi],0
.endif
pop eax
mov ecx,8
.while ecx
push ecx
invoke GetWindowLong,eax,GWL_USERDATA
pop ecx
dec ecx
.endw
.endw
.else
.if eax==4
;Button
mov lbid,PRP_STR_NAMEBTN
.elseif eax==2 || eax==17 || eax==25
;Static, Image and Shape
mov lbid,PRP_STR_NAMESTC
.endif
.endif
.elseif edx==1
;(ID)
mov lbid,PRP_NUM_ID
.if eax==-2
mov eax,lpResID
mov eax,[eax]
.else
mov eax,[esi].DIALOG.id
.endif
invoke ResEdBinToDec,eax,edi
.if hMultiSel
mov eax,hMultiSel
.while eax
push eax
invoke GetParent,eax
invoke GetCtrlMem,eax
mov ebx,eax
mov eax,[esi].DIALOG.id
sub eax,[ebx].DIALOG.id
.if eax
mov byte ptr [edi],0
.endif
pop eax
mov ecx,8
.while ecx
push ecx
invoke GetWindowLong,eax,GWL_USERDATA
pop ecx
dec ecx
.endw
.endw
.endif
.elseif edx==2
;Left
mov lbid,PRP_NUM_POSL
invoke ResEdBinToDec,[esi].DIALOG.dux,edi
.if hMultiSel
mov eax,hMultiSel
.while eax
push eax
invoke GetParent,eax
invoke GetCtrlMem,eax
mov ebx,eax
mov eax,[esi].DIALOG.dux
sub eax,[ebx].DIALOG.dux
.if eax
mov byte ptr [edi],0
.endif
pop eax
mov ecx,8
.while ecx
push ecx
invoke GetWindowLong,eax,GWL_USERDATA
pop ecx
dec ecx
.endw
.endw
.endif
.elseif edx==3
;Top
mov lbid,PRP_NUM_POST
invoke ResEdBinToDec,[esi].DIALOG.duy,edi
.if hMultiSel
mov eax,hMultiSel
.while eax
push eax
invoke GetParent,eax
invoke GetCtrlMem,eax
mov ebx,eax
mov eax,[esi].DIALOG.duy
sub eax,[ebx].DIALOG.duy
.if eax
mov byte ptr [edi],0
.endif
pop eax
mov ecx,8
.while ecx
push ecx
invoke GetWindowLong,eax,GWL_USERDATA
pop ecx
dec ecx
.endw
.endw
.endif
.elseif edx==4
;Width
mov lbid,PRP_NUM_SIZEW
.if hCtl==-6
mov eax,lpResWidth
mov eax,[eax]
invoke ResEdBinToDec,eax,edi
.else
invoke ResEdBinToDec,[esi].DIALOG.duccx,edi
.if hMultiSel
mov eax,hMultiSel
.while eax
push eax
invoke GetParent,eax
invoke GetCtrlMem,eax
mov ebx,eax
mov eax,[esi].DIALOG.duccx
sub eax,[ebx].DIALOG.duccx
.if eax
mov byte ptr [edi],0
.endif
pop eax
mov ecx,8
.while ecx
push ecx
invoke GetWindowLong,eax,GWL_USERDATA
pop ecx
dec ecx
.endw
.endw
.endif
.endif
.elseif edx==5
;Height
mov lbid,PRP_NUM_SIZEH
.if hCtl==-6
mov eax,lpResHeight
mov eax,[eax]
invoke ResEdBinToDec,eax,edi
.else
invoke ResEdBinToDec,[esi].DIALOG.duccy,edi
.if hMultiSel
mov eax,hMultiSel
.while eax
push eax
invoke GetParent,eax
invoke GetCtrlMem,eax
mov ebx,eax
mov eax,[esi].DIALOG.duccy
sub eax,[ebx].DIALOG.duccy
.if eax
mov byte ptr [edi],0
.endif
pop eax
mov ecx,8
.while ecx
push ecx
invoke GetWindowLong,eax,GWL_USERDATA
pop ecx
dec ecx
.endw
.endw
.endif
.endif
.elseif edx==6
;Caption
mov lbid,PRP_STR_CAPTION
push eax
invoke strcpy,edi,addr [esi].DIALOG.caption
pop eax
.if hMultiSel
mov eax,hMultiSel
.while eax
push eax
invoke GetParent,eax
invoke GetCtrlMem,eax
mov ebx,eax
invoke strcmp,addr [esi].DIALOG.caption,addr [ebx].DIALOG.caption
.if eax
mov byte ptr [edi],0
.endif
pop eax
mov ecx,8
.while ecx
push ecx
invoke GetWindowLong,eax,GWL_USERDATA
pop ecx
dec ecx
.endw
.endw
.else
.if eax==1
;Edit
mov eax,[esi].DIALOG.style
test eax,ES_MULTILINE
.if !ZERO?
mov lbid,PRP_STR_CAPMULTI
.endif
.elseif eax==2
;Static
mov lbid,PRP_STR_CAPMULTI
.elseif eax==4
;Button
mov eax,[esi].DIALOG.style
test eax,BS_MULTILINE
.if !ZERO?
mov lbid,PRP_STR_CAPMULTI
.endif
.elseif eax==22
;RichEdit
mov eax,[esi].DIALOG.style
test eax,ES_MULTILINE
.if !ZERO?
mov lbid,PRP_STR_CAPMULTI
.endif
.endif
.endif
.elseif edx==7
;Border
mov lbid,PRP_MULTI_BORDER
.if eax==0
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr BordDlg,edi
.elseif eax==2 || eax==17 || eax==25
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr BordStc,edi
.elseif eax==3 || eax==4
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr BordBtn,edi
.else
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr BordAll,edi
.endif
.elseif edx==8
;SysMenu
mov lbid,PRP_BOOL_SYSMENU
invoke ListFalseTrue,[esi].DIALOG.style,addr SysMDlg,edi
.elseif edx==9
;MaxButton
mov lbid,PRP_BOOL_MAXBUTTON
invoke ListFalseTrue,[esi].DIALOG.style,addr MaxBDlg,edi
.elseif edx==10
;MinButton
mov lbid,PRP_BOOL_MINBUTTON
invoke ListFalseTrue,[esi].DIALOG.style,addr MinBDlg,edi
.elseif edx==11
;Enabled
mov lbid,PRP_BOOL_ENABLED
invoke ListFalseTrue,[esi].DIALOG.style,addr EnabAll,edi
.if hMultiSel
mov eax,hMultiSel
.while eax
push eax
invoke GetParent,eax
invoke GetCtrlMem,eax
mov ebx,eax
mov eax,[esi].DIALOG.style
and eax,WS_DISABLED
mov edx,[ebx].DIALOG.style
and edx,WS_DISABLED
sub eax,edx
.if eax
mov byte ptr [edi],0
.endif
pop eax
mov ecx,8
.while ecx
push ecx
invoke GetWindowLong,eax,GWL_USERDATA
pop ecx
dec ecx
.endw
.endw
.endif
.elseif edx==12
;Visible
mov lbid,PRP_BOOL_VISIBLE
invoke ListFalseTrue,[esi].DIALOG.style,addr VisiAll,edi
.if hMultiSel
mov eax,hMultiSel
.while eax
push eax
invoke GetParent,eax
invoke GetCtrlMem,eax
mov ebx,eax
mov eax,[esi].DIALOG.style
and eax,WS_VISIBLE
mov edx,[ebx].DIALOG.style
and edx,WS_VISIBLE
sub eax,edx
.if eax
mov byte ptr [edi],0
.endif
pop eax
mov ecx,8
.while ecx
push ecx
invoke GetWindowLong,eax,GWL_USERDATA
pop ecx
dec ecx
.endw
.endw
.endif
.elseif edx==13
;Clipping
mov lbid,PRP_MULTI_CLIP
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr ClipAll,edi
.if hMultiSel
mov eax,hMultiSel
.while eax
push eax
invoke GetParent,eax
invoke GetCtrlMem,eax
mov ebx,eax
mov eax,[esi].DIALOG.style
and eax,WS_CLIPCHILDREN or WS_CLIPSIBLINGS
mov edx,[ebx].DIALOG.style
and edx,WS_CLIPCHILDREN or WS_CLIPSIBLINGS
sub eax,edx
.if eax
mov byte ptr [edi],0
.endif
pop eax
mov ecx,8
.while ecx
push ecx
invoke GetWindowLong,eax,GWL_USERDATA
pop ecx
dec ecx
.endw
.endw
.endif
.elseif edx==14
;ScrollBar
mov lbid,PRP_MULTI_SCROLL
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr ScroAll,edi
.elseif edx==15
;Default
mov lbid,PRP_BOOL_DEFAULT
invoke ListFalseTrue,[esi].DIALOG.style,addr DefaBtn,edi
.elseif edx==16
;Auto
mov lbid,PRP_BOOL_AUTO
.if eax==5
invoke ListFalseTrue,[esi].DIALOG.style,addr AutoChk,edi
.elseif eax==6
invoke ListFalseTrue,[esi].DIALOG.style,addr AutoRbt,edi
.elseif eax==16
invoke ListFalseTrue,[esi].DIALOG.style,addr AutoSpn,edi
.endif
.elseif edx==17
;Alignment
mov lbid,PRP_MULTI_ALIGN
.if eax==1
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr AligEdt,edi
.elseif eax==2
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr AligStc,edi
.elseif eax==4
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr AligBtn,edi
.elseif eax==5 || eax==6
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr AligChk,edi
.elseif eax==11
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr AligTab,edi
.elseif eax==14
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr AligLsv,edi
.elseif eax==16
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr AligSpn,edi
.elseif eax==17
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr AligIco,edi
.elseif eax==18 || eax==19
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr AligTbr,edi
.elseif eax==27
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr AligAni,edi
.endif
.elseif edx==18
;Mnemonic
mov lbid,PRP_BOOL_MNEMONIC
invoke ListFalseTrue,[esi].DIALOG.style,addr MnemStc,edi
.elseif edx==19
;WordWrap
mov lbid,PRP_BOOL_WORDWRAP
invoke ListFalseTrue,[esi].DIALOG.style,addr WordStc,edi
.elseif edx==20
;MultiLine
mov lbid,PRP_BOOL_MULTI
.if eax==1 || eax==22
invoke ListFalseTrue,[esi].DIALOG.style,addr MultEdt,edi
.elseif eax==4 || eax==5 || eax==6
invoke ListFalseTrue,[esi].DIALOG.style,addr MultBtn,edi
.elseif eax==11
invoke ListFalseTrue,[esi].DIALOG.style,addr MultTab,edi
.endif
.elseif edx==21
;Type
mov lbid,PRP_MULTI_TYPE
.if eax==1
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr TypeEdt,edi
.elseif eax==4
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr TypeBtn,edi
.elseif eax==7 || eax==24
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr TypeCbo,edi
.elseif eax==13
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr TypeTrv,edi
.elseif eax==14
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr TypeLsv,edi
.elseif eax==17
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr TypeImg,edi
.elseif eax==20
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr TypeDtp,edi
.elseif eax==25
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr TypeStc,edi
.endif
.elseif edx==22
;Locked
mov lbid,PRP_BOOL_LOCK
invoke ListFalseTrue,[esi].DIALOG.style,addr LockEdt,edi
.elseif edx==23
;Child
mov lbid,PRP_BOOL_CHILD
invoke ListFalseTrue,[esi].DIALOG.style,addr ChilAll,edi
.elseif edx==24
;SizeBorder
mov lbid,PRP_BOOL_SIZE
.if eax==0
invoke ListFalseTrue,[esi].DIALOG.style,addr SizeDlg,edi
.endif
.elseif edx==25
;TabStop
mov lbid,PRP_BOOL_TABSTOP
invoke ListFalseTrue,[esi].DIALOG.style,addr TabSAll,edi
.if hMultiSel
mov eax,hMultiSel
.while eax
push eax
invoke GetParent,eax
invoke GetCtrlMem,eax
mov ebx,eax
mov eax,[esi].DIALOG.style
and eax,WS_TABSTOP
mov edx,[ebx].DIALOG.style
and edx,WS_TABSTOP
sub eax,edx
.if eax
mov byte ptr [edi],0
.endif
pop eax
mov ecx,8
.while ecx
push ecx
invoke GetWindowLong,eax,GWL_USERDATA
pop ecx
dec ecx
.endw
.endw
.endif
.elseif edx==26
;Font
mov lbid,PRP_STR_FONT
sub esi,sizeof DLGHEAD
.if byte ptr (DLGHEAD ptr [esi]).font
mov eax,(DLGHEAD ptr [esi]).fontsize
invoke ResEdBinToDec,eax,edi
invoke strlen,edi
lea edi,[edi+eax]
mov ax,' ,'
stosw
.endif
invoke strcpy,edi,addr (DLGHEAD ptr [esi]).font
add esi,sizeof DLGHEAD
.elseif edx==27
;Menu
mov lbid,PRP_STR_MENU
sub esi,sizeof DLGHEAD
invoke strcpy,edi,addr (DLGHEAD ptr [esi]).menuid
add esi,sizeof DLGHEAD
.elseif edx==28
;Class
mov lbid,PRP_STR_CLASS
.if eax==0
sub esi,sizeof DLGHEAD
invoke strcpy,edi,addr (DLGHEAD ptr [esi]).class
add esi,sizeof DLGHEAD
.elseif eax==23
invoke strcpy,edi,addr (DIALOG ptr [esi]).class
.endif
.elseif edx==29
;Notify
mov lbid,PRP_BOOL_NOTIFY
.if eax==2 || eax==17 || eax==25
invoke ListFalseTrue,[esi].DIALOG.style,addr NotiStc,edi
.elseif eax==4 || eax==5 || eax==6
invoke ListFalseTrue,[esi].DIALOG.style,addr NotiBtn,edi
.elseif eax==8
invoke ListFalseTrue,[esi].DIALOG.style,addr NotiLst,edi
.endif
.elseif edx==30
;AutoScroll
.if eax==1 || eax==22
mov lbid,PRP_MULTI_AUTOSCROLL
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr AutoEdt,edi
.elseif eax==7
mov lbid,PRP_BOOL_AUTOSCROLL
invoke ListFalseTrue,[esi].DIALOG.style,addr AutoCbo,edi
.endif
.elseif edx==31
;WantCr
mov lbid,PRP_BOOL_WANTCR
invoke ListFalseTrue,[esi].DIALOG.style,addr WantEdt,edi
;****
.elseif edx==32
;Sort
mov lbid,PRP_BOOL_SORT
.if eax==7
invoke ListFalseTrue,[esi].DIALOG.style,addr SortCbo,edi
.elseif eax==8
invoke ListFalseTrue,[esi].DIALOG.style,addr SortLst,edi
.elseif eax==14
mov lbid,PRP_MULTI_SORT
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr SortLsv,edi
.endif
.elseif edx==33
;Flat
mov lbid,PRP_BOOL_FLAT
invoke ListFalseTrue,[esi].DIALOG.style,addr FlatTbr,edi
.elseif edx==34
;(StartID)
mov lbid,PRP_NUM_STARTID
.if hCtl==-7
mov eax,lpResStartID
mov eax,[eax]
invoke ResEdBinToDec,eax,edi
.else
sub esi,sizeof DLGHEAD
invoke ResEdBinToDec,(DLGHEAD ptr [esi]).ctlid,edi
add esi,sizeof DLGHEAD
.endif
.elseif edx==35
;TabIndex
mov lbid,PRP_NUM_TAB
invoke ResEdBinToDec,[esi].DIALOG.tab,edi
.elseif edx==36
;Format
mov lbid,PRP_MULTI_FORMAT
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr FormDtp,edi
.elseif edx==37
;SizeGrip
mov lbid,PRP_BOOL_SIZE
.if eax==19
invoke ListFalseTrue,[esi].DIALOG.style,addr SizeSbr,edi
.endif
.elseif edx==38
;Group
mov lbid,PRP_BOOL_GROUP
invoke ListFalseTrue,[esi].DIALOG.style,addr GrouAll,edi
.elseif edx==39
;Icon
mov lbid,PRP_BOOL_ICON
.elseif edx==40
;UseTabs
mov lbid,PRP_BOOL_USETAB
invoke ListFalseTrue,[esi].DIALOG.style,addr UseTLst,edi
.elseif edx==41
;StartupPos
mov lbid,PRP_MULTI_STARTPOS
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr StarDlg,edi
.elseif edx==42
;Orientation
mov lbid,PRP_MULTI_ORIENT
.if eax==12
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr OriePgb,edi
.elseif eax==16
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr OrieUdn,edi
.endif
.elseif edx==43
;SetBuddy
mov lbid,PRP_BOOL_SETBUDDY
invoke ListFalseTrue,[esi].DIALOG.style,addr SetBUdn,edi
.elseif edx==44
;MultiSelect
mov lbid,PRP_BOOL_MULTI
.if eax==8
invoke ListFalseTrue,[esi].DIALOG.style,addr MultLst,edi
.elseif eax==21
invoke ListFalseTrue,[esi].DIALOG.style,addr MultMvi,edi
.endif
.elseif edx==45
;HideSel
mov lbid,PRP_BOOL_HIDE
.if eax==1 || eax==22
invoke ListFalseTrue,[esi].DIALOG.style,addr HideEdt,edi
.elseif eax==13
invoke ListFalseTrue,[esi].DIALOG.style,addr HideTrv,edi
.elseif eax==14
invoke ListFalseTrue,[esi].DIALOG.style,addr HideLsv,edi
.endif
.elseif edx==46
;TopMost
mov lbid,PRP_BOOL_TOPMOST
invoke ListFalseTrue,[esi].DIALOG.exstyle,addr TopMost,edi
.elseif edx==47
;xExStyle
mov lbid,PRP_FUN_EXSTYLE
mov eax,[esi].DIALOG.exstyle
invoke hexEax
invoke strcpy,edi,addr strHex
.if hMultiSel
mov eax,hMultiSel
.while eax
push eax
invoke GetParent,eax
invoke GetCtrlMem,eax
mov ebx,eax
mov eax,[esi].DIALOG.exstyle
sub eax,[ebx].DIALOG.exstyle
.if eax
mov byte ptr [edi],0
.endif
pop eax
mov ecx,8
.while ecx
push ecx
invoke GetWindowLong,eax,GWL_USERDATA
pop ecx
dec ecx
.endw
.endw
.endif
.elseif edx==48
;xStyle
mov lbid,PRP_FUN_STYLE
mov eax,[esi].DIALOG.style
invoke hexEax
invoke strcpy,edi,addr strHex
.if hMultiSel
mov eax,hMultiSel
.while eax
push eax
invoke GetParent,eax
invoke GetCtrlMem,eax
mov ebx,eax
mov eax,[esi].DIALOG.style
sub eax,[ebx].DIALOG.style
.if eax
mov byte ptr [edi],0
.endif
pop eax
mov ecx,8
.while ecx
push ecx
invoke GetWindowLong,eax,GWL_USERDATA
pop ecx
dec ecx
.endw
.endw
.endif
.elseif edx==49
;IntegralHgt
mov lbid,PRP_BOOL_INTEGRAL
.if eax==7
invoke ListFalseTrue,[esi].DIALOG.style,addr IntHtCbo,edi
.elseif eax==8
invoke ListFalseTrue,[esi].DIALOG.style,addr IntHtLst,edi
.endif
.elseif edx==50
;Image
mov lbid,PRP_STR_IMAGE
invoke strcpy,edi,addr [esi].DIALOG.caption
.elseif edx==51
;Buttons
mov lbid,PRP_BOOL_BUTTON
.if eax==11
invoke ListFalseTrue,[esi].DIALOG.style,addr ButtTab,edi
.elseif eax==13
invoke ListFalseTrue,[esi].DIALOG.style,addr ButtTrv,edi
.elseif eax==32
invoke ListFalseTrue,[esi].DIALOG.style,addr ButtHdr,edi
.endif
.elseif edx==52
;PopUp
mov lbid,PRP_BOOL_POPUP
invoke ListFalseTrue,[esi].DIALOG.style,addr PopUAll,edi
.elseif edx==53
;OwnerDraw
mov lbid,PRP_BOOL_OWNERDRAW
.if eax==14
invoke ListFalseTrue,[esi].DIALOG.style,addr OwneLsv,edi
.elseif eax==7 || eax==8
mov lbid,PRP_MULTI_OWNERDRAW
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr OwneCbo,edi
.endif
.elseif edx==54
;Transp
mov lbid,PRP_BOOL_TRANSP
invoke ListFalseTrue,[esi].DIALOG.style,addr TranAni,edi
.elseif edx==55
;Timer
mov lbid,PRP_BOOL_TIME
invoke ListFalseTrue,[esi].DIALOG.style,addr TimeAni,edi
.elseif edx==56
;AutoPlay
mov lbid,PRP_BOOL_AUTOPLAY
.if eax==27
invoke ListFalseTrue,[esi].DIALOG.style,addr AutoAni,edi
.endif
.elseif edx==57
;WeekNum
mov lbid,PRP_BOOL_WEEK
invoke ListFalseTrue,[esi].DIALOG.style,addr WeekMvi,edi
.elseif edx==58
;AviClip
mov lbid,PRP_STR_AVI
invoke strcpy,edi,addr [esi].DIALOG.caption
.elseif edx==59
;AutoSize
mov lbid,PRP_BOOL_AUTOSIZE
.if eax==18 || eax==19
invoke ListFalseTrue,[esi].DIALOG.style,addr AutoTbr,edi
.endif
.elseif edx==60
;ToolTip
mov lbid,PRP_BOOL_TOOLTIP
.if eax==11
invoke ListFalseTrue,[esi].DIALOG.style,addr ToolTab,edi
.elseif eax==18
invoke ListFalseTrue,[esi].DIALOG.style,addr ToolTbr,edi
.elseif eax==19
invoke ListFalseTrue,[esi].DIALOG.style,addr ToolSbr,edi
.endif
.elseif edx==61
;Wrap
mov lbid,PRP_BOOL_WRAP
invoke ListFalseTrue,[esi].DIALOG.style,addr WrapTbr,edi
.elseif edx==62
;Divider
mov lbid,PRP_BOOL_DIVIDER
invoke ListFalseTrue,[esi].DIALOG.style,addr DiviTbr,edi
.elseif edx==63
;DragDrop
mov lbid,PRP_BOOL_DRAGDROP
invoke ListFalseTrue,[esi].DIALOG.style,addr DragHdr,edi
.elseif edx==64
;Smooth
mov lbid,PRP_BOOL_SMOOTH
invoke ListFalseTrue,[esi].DIALOG.style,addr SmooPgb,edi
.elseif edx==65
;Ellipsis
mov lbid,PRP_MULTI_ELLIPSIS
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,addr ElliStc,edi
.elseif edx==66
;Language
mov lbid,PRP_FUN_LANG
.if hCtl==-4 || hCtl==-5 || hCtl==-7 || hCtl==-8
mov esi,lpResLang
mov eax,[esi].LANGUAGEMEM.lang
invoke ResEdBinToDec,eax,edi
invoke strlen,edi
lea edi,[edi+eax]
mov byte ptr [edi],','
inc edi
mov eax,[esi].LANGUAGEMEM.sublang
invoke ResEdBinToDec,eax,edi
.else
sub esi,sizeof DLGHEAD
mov eax,(DLGHEAD ptr [esi]).lang
invoke ResEdBinToDec,eax,edi
invoke strlen,edi
lea edi,[edi+eax]
mov byte ptr [edi],','
inc edi
mov eax,(DLGHEAD ptr [esi]).sublang
invoke ResEdBinToDec,eax,edi
add esi,sizeof DLGHEAD
.endif
.elseif edx==67
;HasStrings
mov lbid,PRP_BOOL_HASSTRINGS
.if eax==7
invoke ListFalseTrue,[esi].DIALOG.style,addr HasStcb,edi
.elseif eax==8
invoke ListFalseTrue,[esi].DIALOG.style,addr HasStlb,edi
.endif
.elseif edx==68
;HelpID
mov lbid,PRP_NUM_HELPID
invoke ResEdBinToDec,[esi].DIALOG.helpid,edi
.if hMultiSel
mov eax,hMultiSel
.while eax
push eax
invoke GetParent,eax
invoke GetCtrlMem,eax
mov ebx,eax
mov eax,[esi].DIALOG.helpid
sub eax,[ebx].DIALOG.helpid
.if eax
mov byte ptr [edi],0
.endif
pop eax
mov ecx,8
.while ecx
push ecx
invoke GetWindowLong,eax,GWL_USERDATA
pop ecx
dec ecx
.endw
.endw
.endif
.elseif edx==69
;File
mov lbid,PRP_STR_FILE
.if eax==-2
invoke strcpy,edi,lpResFile
.endif
.elseif edx==70
;MenuEx
mov lbid,PRP_BOOL_MENUEX
.if eax==-2
mov eax,lpResMenuEx
mov eax,[eax]
invoke ListFalseTrue,eax,addr MenuEx,edi
.endif
.elseif edx==71
;SaveSel
mov lbid,PRP_BOOL_SAVESEL
invoke ListFalseTrue,[esi].DIALOG.style,addr SaveRich,edi
.elseif eax>=NoOfButtons
;Custom properties
invoke GetCustProp,eax,edx
mov lbid,eax
.if eax
.if dword ptr [eax]==1
invoke ListFalseTrue,[esi].DIALOG.style,[eax+4],edi
.elseif dword ptr [eax]==2
invoke ListFalseTrue,[esi].DIALOG.exstyle,[eax+4],edi
.elseif dword ptr [eax]==3
invoke ListMultiStyle,[esi].DIALOG.style,[esi].DIALOG.exstyle,[eax+4],edi
.endif
.endif
.endif
invoke SendMessage,hPrpLstDlg,LB_ADDSTRING,0,addr buffer1
invoke SendMessage,hPrpLstDlg,LB_SETITEMDATA,eax,lbid
.endif
Nxt:
inc nInx
jmp @b
@@:
invoke SendMessage,hPrpLstDlg,LB_SETTOPINDEX,tInx,0
.if hCtl==-2 || hCtl==-3 || hCtl==-4 || hCtl==-5 || hCtl==-6 || hCtl==-7 || hCtl==-8 || hCtl==-9
invoke SendMessage,hPrpCboDlg,CB_RESETCONTENT,0,0
invoke SendMessage,hPrpCboDlg,CB_ADDSTRING,0,lpResType
invoke SendMessage,hPrpCboDlg,CB_SETCURSEL,0,0
.else
invoke GetWindowLong,hDEd,DEWM_MEMORY
.if eax
invoke UpdateCbo,eax
invoke GetWindowLong,hCtl,GWL_ID
invoke SetCbo,eax
.endif
.endif
.endif
invoke SetFocus,hDEd
invoke SendMessage,hPrpLstDlg,LB_FINDSTRING,-1,addr szLbString
.if eax==LB_ERR
xor eax,eax
.endif
invoke SendMessage,hPrpLstDlg,LB_SETCURSEL,eax,0
invoke SendMessage,hPrpLstDlg,WM_SETREDRAW,TRUE,0
ret
PropertyList endp
PrpCboDlgProc proc hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
LOCAL nInx:DWORD
mov eax,uMsg
.if eax==WM_COMMAND
mov eax,wParam
shr eax,16
.if eax==CBN_SELCHANGE
invoke SendMessage,hWin,CB_GETCURSEL,0,0
mov nInx,eax
invoke SendMessage,hWin,CB_GETITEMDATA,nInx,0
.if !eax
invoke GetWindowLong,hDEd,DEWM_DIALOG
.else
push eax
invoke GetWindowLong,hDEd,DEWM_DIALOG
pop edx
invoke GetDlgItem,eax,edx
.endif
.if eax
invoke SizeingRect,eax,FALSE
push eax
invoke ShowWindow,hInvisible,SW_HIDE
invoke ShowWindow,hInvisible,SW_SHOWNA
pop eax
.endif
.endif
.endif
invoke CallWindowProc,OldPrpCboDlgProc,hWin,uMsg,wParam,lParam
ret
PrpCboDlgProc endp
PrpLstDlgProc proc hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
LOCAL nInx:DWORD
LOCAL rect:RECT
LOCAL hCtl:DWORD
LOCAL lbid:DWORD
LOCAL lf:LOGFONT
LOCAL hDC:DWORD
LOCAL cf:CHOOSEFONT
LOCAL buffer[MAX_PATH]:BYTE
LOCAL ofn:OPENFILENAME
mov eax,uMsg
.if eax==WM_LBUTTONDBLCLK
invoke SendMessage,hWin,LB_GETCURSEL,0,0
mov nInx,eax
invoke SendMessage,hWin,LB_GETITEMDATA,nInx,0
mov lbid,eax
.if (eax>=PRP_BOOL_SYSMENU && eax<=499) || eax>65535 || eax==PRP_STR_NAMEBTN || eax==PRP_STR_NAMESTC
invoke SendMessage,hWin,WM_SETREDRAW,FALSE,0
invoke SendMessage,hWin,WM_COMMAND,1,0
invoke ShowWindow,hPrpLstDlgCld,SW_HIDE
invoke ShowWindow,hPrpEdtDlgCld,SW_HIDE
invoke SendMessage,hPrpLstDlgCld,LB_GETCURSEL,0,0
inc eax
mov nInx,eax
invoke SendMessage,hPrpLstDlgCld,LB_GETCOUNT,0,0
.if eax==nInx
mov nInx,0
.endif
invoke SendMessage,hPrpLstDlgCld,LB_SETCURSEL,nInx,0
invoke SendMessage,hPrpLstDlgCld,WM_LBUTTONUP,0,0
invoke SendMessage,hWin,WM_SETREDRAW,TRUE,0
invoke SetFocus,hWin
.elseif eax==PRP_STR_FONT || eax==PRP_STR_MENU || eax==1003 || eax==1004 || eax==PRP_STR_IMAGE || eax==PRP_STR_AVI || eax==PRP_FUN_LANG || eax==PRP_STR_CAPMULTI || eax==PRP_STR_FILE
invoke SendMessage,hWin,WM_COMMAND,1,0
.else
invoke PropListSetPos
invoke ShowWindow,hPrpEdtDlgCld,SW_SHOW
invoke SetFocus,hPrpEdtDlgCld
invoke SendMessage,hPrpEdtDlgCld,EM_SETSEL,0,-1
.endif
xor eax,eax
ret
.elseif eax==WM_LBUTTONDOWN
invoke ShowWindow,hPrpLstDlgCld,SW_HIDE
.elseif eax==WM_MOUSEMOVE
.if hStatus
invoke SendMessage,hStatus,SB_SETTEXT,nStatus,offset szNULL
.endif
.elseif eax==WM_COMMAND
mov edx,wParam
movzx eax,dx
shr edx,16
.if edx==BN_CLICKED && eax==1
invoke GetWindowLong,hPrpLstDlgCld,GWL_STYLE
and eax,WS_VISIBLE
.if eax
invoke ShowWindow,hPrpLstDlgCld,SW_HIDE
.else
invoke SendMessage,hWin,LB_GETCURSEL,0,0
.if eax!=LB_ERR
mov nInx,eax
invoke GetWindowLong,hWin,GWL_USERDATA
mov hCtl,eax
invoke SendMessage,hWin,LB_GETITEMDATA,nInx,0
mov lbid,eax
.if eax==PRP_STR_FONT
;Font
invoke RtlZeroMemory,addr lf,sizeof lf
invoke GetCtrlMem,hCtl
mov esi,eax
sub esi,sizeof DLGHEAD
invoke strcpy,addr lf.lfFaceName,addr [esi].DLGHEAD.font
mov eax,[esi].DLGHEAD.fontsize
mov ecx,96
mul ecx
mov ecx,72
xor edx,edx
div ecx
neg eax
mov lf.lfHeight,eax
mov al,[esi].DLGHEAD.charset
mov lf.lfCharSet,al
mov al,[esi].DLGHEAD.italic
mov lf.lfItalic,al
movzx eax,word ptr [esi].DLGHEAD.weight
mov lf.lfWeight,eax
mov cf.lStructSize,sizeof CHOOSEFONT
invoke GetDC,hWin
mov hDC, eax
mov cf.hDC,eax
push hWin
pop cf.hWndOwner
lea eax,lf
mov cf.lpLogFont,eax
mov cf.iPointSize,0
mov cf.Flags,CF_SCREENFONTS or CF_INITTOLOGFONTSTRUCT
mov cf.rgbColors,0
mov cf.lCustData,0
mov cf.lpfnHook,0
mov cf.lpTemplateName,0
mov cf.hInstance,0
mov cf.lpszStyle,0
mov cf.nFontType,0
mov cf.Alignment,0
mov cf.nSizeMin,0
mov cf.nSizeMax,0
invoke ChooseFont,addr cf
push eax
invoke ReleaseDC,hWin,hDC
pop eax
.if eax
.if !fSizeToFont
mov eax,cf.iPointSize
mov ecx,10
xor edx,edx
div ecx
invoke DlgResize,esi,addr [esi].DLGHEAD.font,[esi].DLGHEAD.fontsize,addr lf.lfFaceName,eax
.endif
mov al,lf.lfItalic
mov [esi].DLGHEAD.italic,al
mov al,lf.lfCharSet
mov [esi].DLGHEAD.charset,al
mov eax,lf.lfWeight
mov [esi].DLGHEAD.weight,ax
mov eax,cf.iPointSize
mov ecx,10
xor edx,edx
div ecx
mov [esi].DLGHEAD.fontsize,eax
invoke strcpy,addr [esi].DLGHEAD.font,addr lf.lfFaceName
invoke MakeDialog,esi,0
invoke SetChanged,TRUE
.endif
.elseif eax==PRP_STR_MENU
;Dialog Memu
invoke SendMessage,hWin,LB_GETITEMRECT,nInx,addr rect
mov ecx,nPropHt
add rect.top,ecx
mov edx,nPropWt
add edx,1
add rect.left,edx
mov eax,rect.left
sub rect.right,eax
invoke PropTxtLst,hCtl,lbid
invoke SetTxtLstPos,addr rect
.elseif eax==PRP_FUN_EXSTYLE
;xExStyle
mov StyleEx,TRUE
invoke GetCtrlMem,hCtl
invoke DialogBoxParam,hInstance,IDD_DLGSTYLEMANA,hWin,addr StyleManaDialogProc,eax
.elseif eax==PRP_FUN_STYLE
;xStyle
mov StyleEx,FALSE
invoke GetCtrlMem,hCtl
invoke DialogBoxParam,hInstance,IDD_DLGSTYLEMANA,hWin,addr StyleManaDialogProc,eax
.elseif eax==PRP_STR_IMAGE
;Image
invoke SendMessage,hWin,LB_GETITEMRECT,nInx,addr rect
mov ecx,nPropHt
add rect.top,ecx
mov edx,nPropWt
add edx,1
add rect.left,edx
mov eax,rect.left
sub rect.right,eax
invoke PropTxtLst,hCtl,lbid
invoke SetTxtLstPos,addr rect
.elseif eax==PRP_STR_AVI
;Avi
invoke SendMessage,hWin,LB_GETITEMRECT,nInx,addr rect
mov ecx,nPropHt
add rect.top,ecx
mov edx,nPropWt
add edx,1
add rect.left,edx
mov eax,rect.left
sub rect.right,eax
invoke PropTxtLst,hCtl,lbid
invoke SetTxtLstPos,addr rect
.elseif eax==PRP_STR_CAPMULTI
;Multiline caption
invoke SendMessage,hWin,LB_GETITEMRECT,nInx,addr rect
mov eax,nPropHt
add rect.top,eax
mov eax,nPropWt
inc eax
add rect.left,eax
mov eax,rect.left
sub rect.right,eax
invoke GetCtrlMem,hCtl
mov esi,eax
invoke ConvertCaption,addr lbtxtbuffer,addr (DIALOG ptr [esi]).caption
invoke SetWindowText,hPrpEdtDlgCldMulti,addr lbtxtbuffer
mov eax,nPropHt
shl eax,3
invoke SetWindowPos,hPrpEdtDlgCldMulti,HWND_TOP,rect.left,rect.top,rect.right,eax,0
invoke ShowWindow,hPrpEdtDlgCldMulti,SW_SHOWNA
invoke SetFocus,hPrpEdtDlgCldMulti
;jmp Ex
.elseif eax==PRP_FUN_LANG
;Language
.if hCtl==-4 || hCtl==-5 || hCtl==-7 || hCtl==-8
invoke DialogBoxParam,hInstance,IDD_LANGUAGE,hPrj,offset LanguageEditProc2,lpResLang
.else
invoke GetCtrlMem,hCtl
mov esi,eax
sub esi,sizeof DLGHEAD
invoke DialogBoxParam,hInstance,IDD_LANGUAGE,hPrj,offset LanguageEditProc2,addr [esi].DLGHEAD.lang
.if [esi+DLGHEAD].DIALOG.idname
invoke lstrcpy,addr buffer,addr [esi+DLGHEAD].DIALOG.idname
.else
mov edx,[esi+DLGHEAD].DIALOG.id
invoke ResEdBinToDec,edx,addr buffer
.endif
invoke GetWindowLong,hDEd,DEWM_PROJECT
mov edx,eax
invoke SetProjectItemName,edx,addr buffer
.endif
.if eax
invoke PropertyList,hCtl
.if hCtl==-4 || hCtl==-5 || hCtl==-7 || hCtl==-8
invoke SendMessage,hRes,PRO_SETMODIFY,TRUE,0
.else
invoke SetChanged,TRUE
.endif
.endif
.elseif eax==PRP_STR_FILE
;File
;Setup the ofn struct
invoke RtlZeroMemory,addr ofn,sizeof ofn
mov ofn.lStructSize,sizeof ofn
mov eax,offset szFilterManifest
mov ofn.lpstrFilter,eax
invoke strcpy,addr buffer,lpResFile
push hWin
pop ofn.hwndOwner
push hInstance
pop ofn.hInstance
mov ofn.lpstrInitialDir,offset szProjectPath
lea eax,buffer
mov ofn.lpstrFile,eax
mov ofn.nMaxFile,sizeof buffer
mov ofn.lpstrDefExt,NULL
mov ofn.Flags,OFN_FILEMUSTEXIST or OFN_HIDEREADONLY or OFN_PATHMUSTEXIST
;Show the Open dialog
invoke GetOpenFileName,addr ofn
.if eax
invoke RemovePath,addr buffer,addr szProjectPath
invoke strcpy,lpResFile,eax
invoke PropertyList,hCtl
invoke SendMessage,hRes,PRO_SETMODIFY,TRUE,0
.endif
.else
invoke SendMessage,hWin,LB_GETITEMRECT,nInx,addr rect
mov ecx,nPropHt
add rect.top,ecx
mov edx,nPropWt
add edx,1
add rect.left,edx
mov eax,rect.left
sub rect.right,eax
invoke PropTxtLst,hCtl,lbid
invoke SetTxtLstPos,addr rect
.endif
.endif
.endif
.endif
.elseif eax==WM_CHAR
.if wParam==VK_RETURN
invoke SendMessage,hWin,WM_LBUTTONDBLCLK,0,0
.elseif wParam==VK_TAB
invoke SetFocus,hDEd
invoke SendMessage,hDEd,WM_KEYDOWN,VK_TAB,0
.endif
.elseif eax==WM_DRAWITEM
push esi
mov esi,lParam
invoke GetWindowLong,[esi].DRAWITEMSTRUCT.hwndItem,GWL_USERDATA
.if eax<1000 || eax>65535 || eax==PRP_STR_MENU || eax==PRP_STR_IMAGE || eax==PRP_STR_AVI
mov edx,DFCS_SCROLLDOWN
mov eax,[esi].DRAWITEMSTRUCT.itemState
and eax,ODS_FOCUS or ODS_SELECTED
.if eax==ODS_FOCUS or ODS_SELECTED
mov edx,DFCS_SCROLLDOWN or DFCS_PUSHED
.endif
invoke DrawFrameControl,[esi].DRAWITEMSTRUCT.hdc,addr [esi].DRAWITEMSTRUCT.rcItem,DFC_SCROLL,edx
.else
mov edx,DFCS_BUTTONPUSH
mov eax,[esi].DRAWITEMSTRUCT.itemState
and eax,ODS_FOCUS or ODS_SELECTED
.if eax==ODS_FOCUS or ODS_SELECTED
mov edx,DFCS_BUTTONPUSH or DFCS_PUSHED
.endif
invoke DrawFrameControl,[esi].DRAWITEMSTRUCT.hdc,addr [esi].DRAWITEMSTRUCT.rcItem,DFC_BUTTON,edx
invoke SetBkMode,[esi].DRAWITEMSTRUCT.hdc,TRANSPARENT
invoke DrawText,[esi].DRAWITEMSTRUCT.hdc,addr szDots,3,addr [esi].DRAWITEMSTRUCT.rcItem,DT_CENTER or DT_SINGLELINE
.endif
pop esi
.elseif eax==WM_KEYDOWN
mov edx,wParam
mov eax,lParam
shr eax,16
and eax,3FFh
.if edx==2Eh && (eax==153h || eax==53h)
invoke SendMessage,hWin,LB_GETCURSEL,0,0
.if eax!=LB_ERR
invoke SendMessage,hWin,LB_GETITEMDATA,eax,0
.if eax==PRP_STR_FONT
invoke GetWindowLong,hWin,GWL_USERDATA
mov hCtl,eax
invoke GetCtrlMem,hCtl
sub eax,sizeof DLGHEAD
mov esi,eax
mov [esi].DLGHEAD.font,0
mov [esi].DLGHEAD.fontsize,0
.endif
.endif
.endif
.elseif eax==WM_VSCROLL
invoke ShowWindow,hPrpBtnDlgCld,SW_HIDE
invoke ShowWindow,hPrpLstDlgCld,SW_HIDE
invoke ShowWindow,hPrpEdtDlgCld,SW_HIDE
.elseif eax==WM_CTLCOLORLISTBOX
invoke SetBkColor,wParam,color.back
invoke SetTextColor,wParam,color.text
mov eax,hBrBack
jmp Ex
.elseif eax==WM_CTLCOLOREDIT
invoke SetBkColor,wParam,color.back
invoke SetTextColor,wParam,color.text
mov eax,hBrBack
jmp Ex
.endif
invoke CallWindowProc,OldPrpLstDlgProc,hWin,uMsg,wParam,lParam
Ex:
assume esi:nothing
ret
PrpLstDlgProc endp
PrpEdtDlgCldProc proc hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
LOCAL nInx:DWORD
LOCAL buffer[512]:BYTE
LOCAL hCtl:HWND
mov eax,uMsg
.if eax==WM_KILLFOCUS
invoke PropEditUpdList,0
.elseif eax==WM_CHAR
.if wParam==VK_RETURN || wParam==VK_TAB
invoke SendMessage,hPrpLstDlg,LB_GETCURSEL,0,0
mov nInx,eax
invoke SetFocus,hDEd
invoke SendMessage,hPrpLstDlg,LB_SETCURSEL,nInx,0
invoke PropListSetPos
.if wParam==VK_RETURN
invoke SetFocus,hPrpLstDlg
.else
invoke SendMessage,hDEd,WM_KEYDOWN,VK_TAB,0
.endif
xor eax,eax
ret
.endif
.elseif eax==WM_KEYUP
invoke SendMessage,hPrpLstDlg,LB_GETCURSEL,0,0
mov edx,eax
invoke SendMessage,hPrpLstDlg,LB_GETTEXT,edx,addr buffer
.if dword ptr buffer=='tpaC'
push esi
invoke GetWindowText,hWin,addr buffer,sizeof buffer
invoke ConvertCaption,addr buffer,addr buffer
invoke GetWindowLong,hPrpLstDlg,GWL_USERDATA
mov hCtl,eax
invoke SetWindowText,hCtl,addr buffer
pop esi
.endif
.endif
invoke CallWindowProc,OldPrpEdtDlgCldProc,hWin,uMsg,wParam,lParam
ret
PrpEdtDlgCldProc endp
PrpEdtDlgCldMultiProc proc hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
LOCAL nInx:DWORD
LOCAL buffer[256]:BYTE
LOCAL buffer1[256]:BYTE
LOCAL hCtl:HWND
mov eax,uMsg
.if eax==WM_KILLFOCUS
invoke SendMessage,hPrpLstDlg,LB_GETCURSEL,0,0
push eax
invoke PropEditUpdList,0
pop eax
invoke SendMessage,hPrpLstDlg,LB_SETCURSEL,eax,0
invoke PropListSetPos
invoke SetFocus,hDEd
.elseif eax==WM_CHAR
.if wParam==VK_RETURN
invoke SendMessage,hPrpLstDlg,LB_GETCURSEL,0,0
mov nInx,eax
invoke SetFocus,hRes
invoke SendMessage,hPrpLstDlg,LB_SETCURSEL,nInx,0
invoke PropListSetPos
invoke SetFocus,hPrpLstDlg
xor eax,eax
ret
.endif
.elseif eax==WM_KEYUP
invoke SendMessage,hPrpLstDlg,LB_GETCURSEL,0,0
mov edx,eax
invoke SendMessage,hPrpLstDlg,LB_GETTEXT,edx,addr buffer
.if dword ptr buffer=='tpaC'
push esi
invoke GetWindowText,hWin,addr buffer,sizeof buffer
invoke GetWindowLong,hPrpLstDlg,GWL_USERDATA
mov hCtl,eax
invoke SetWindowText,hCtl,addr buffer
invoke DeConvertCaption,addr buffer1,addr buffer
invoke SetWindowText,hPrpEdtDlgCld,addr buffer1
pop esi
.endif
.endif
invoke CallWindowProc,OldPrpEdtDlgCldMultiProc,hWin,uMsg,wParam,lParam
Ex:
ret
PrpEdtDlgCldMultiProc endp
PrpLstDlgCldProc proc hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
LOCAL nInx:DWORD
LOCAL buffer[512]:BYTE
mov eax,uMsg
.if eax==WM_LBUTTONUP
invoke SendMessage,hWin,LB_GETCURSEL,0,0
.if eax!=LB_ERR
mov nInx,eax
invoke SendMessage,hPrpLstDlg,LB_GETCURSEL,0,0
push eax
invoke SendMessage,hWin,LB_GETTEXT,nInx,addr buffer
invoke SetWindowText,hPrpEdtDlgCld,addr buffer
invoke SendMessage,hWin,LB_GETITEMDATA,nInx,0
invoke PropEditUpdList,eax
pop nInx
invoke SendMessage,hPrpLstDlg,LB_SETCURSEL,nInx,0
invoke PropListSetPos
invoke SetFocus,hDEd
.endif
xor eax,eax
ret
.elseif uMsg==WM_CHAR
.if wParam==13
invoke SendMessage,hWin,WM_LBUTTONUP,0,0
xor eax,eax
ret
.endif
.endif
invoke CallWindowProc,OldPrpLstDlgCldProc,hWin,uMsg,wParam,lParam
ret
PrpLstDlgCldProc endp
Do_Property proc hWin:HWND
invoke CreateWindowEx,0,addr szComboBoxClass,NULL,WS_CHILD or WS_VISIBLE or WS_CLIPCHILDREN or WS_CLIPSIBLINGS or CBS_DROPDOWNLIST or WS_VSCROLL or CBS_SORT,0,0,0,0,hWin,0,hInstance,0
mov hPrpCboDlg,eax
invoke SetWindowLong,hPrpCboDlg,GWL_WNDPROC,addr PrpCboDlgProc
mov OldPrpCboDlgProc,eax
invoke CreateWindowEx,WS_EX_CLIENTEDGE,addr szListBoxClass,NULL,WS_CHILD or WS_VISIBLE or WS_VSCROLL or WS_CLIPCHILDREN or WS_CLIPSIBLINGS or LBS_HASSTRINGS or LBS_NOINTEGRALHEIGHT or LBS_USETABSTOPS or LBS_SORT or LBS_OWNERDRAWFIXED or LBS_NOTIFY,0,0,0,0,hWin,0,hInstance,0
mov hPrpLstDlg,eax
invoke SetWindowLong,hWin,0,eax
invoke SetWindowLong,hPrpLstDlg,GWL_WNDPROC,addr PrpLstDlgProc
mov OldPrpLstDlgProc,eax
invoke CreateWindowEx,0,addr szEditClass,NULL,WS_CHILD or WS_CLIPCHILDREN or WS_CLIPSIBLINGS or ES_AUTOHSCROLL or ES_MULTILINE,0,0,0,0,hPrpLstDlg,0,hInstance,0
mov hPrpEdtDlgCld,eax
invoke SetWindowLong,hPrpEdtDlgCld,GWL_WNDPROC,addr PrpEdtDlgCldProc
mov OldPrpEdtDlgCldProc,eax
invoke CreateWindowEx,0,addr szEditClass,NULL,WS_CHILD or WS_CLIPCHILDREN or WS_CLIPSIBLINGS or WS_BORDER or ES_AUTOHSCROLL or ES_AUTOVSCROLL or ES_MULTILINE or ES_WANTRETURN,0,0,0,0,hPrpLstDlg,0,hInstance,0
mov hPrpEdtDlgCldMulti,eax
invoke SetWindowLong,hPrpEdtDlgCldMulti,GWL_WNDPROC,addr PrpEdtDlgCldMultiProc
mov OldPrpEdtDlgCldMultiProc,eax
invoke CreateWindowEx,0,addr szListBoxClass,NULL,WS_CHILD or WS_VSCROLL or WS_CLIPCHILDREN or WS_CLIPSIBLINGS or WS_BORDER or LBS_HASSTRINGS,0,0,0,0,hPrpLstDlg,0,hInstance,0
mov hPrpLstDlgCld,eax
invoke SetWindowLong,hPrpLstDlgCld,GWL_WNDPROC,addr PrpLstDlgCldProc
mov OldPrpLstDlgCldProc,eax
invoke CreateWindowEx,0,addr szButtonClass,NULL,WS_CHILD or WS_CLIPCHILDREN or WS_CLIPSIBLINGS or BS_OWNERDRAW,0,0,0,0,hPrpLstDlg,1,hInstance,0
mov hPrpBtnDlgCld,eax
ret
Do_Property endp
|
alloy4fun_models/trainstlt/models/1/gFzSzb9ibfdW94Bfz.als
|
Kaixi26/org.alloytools.alloy
| 0 |
3452
|
open main
pred idgFzSzb9ibfdW94Bfz_prop2 {
always(eventually Signal = Green)
}
pred __repair { idgFzSzb9ibfdW94Bfz_prop2 }
check __repair { idgFzSzb9ibfdW94Bfz_prop2 <=> prop2o }
|
llvm-gcc-4.2-2.9/gcc/ada/a-excpol-abort.adb
|
vidkidz/crossbridge
| 1 |
6113
|
<reponame>vidkidz/crossbridge<gh_stars>1-10
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- A D A . E X C E P T I O N S . P O L L --
-- (version supporting asynchronous abort test) --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNARL; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
------------------------------------------------------------------------------
-- This version is for targets that do not support per-thread asynchronous
-- signals. On such targets, we require compilation with the -gnatP switch
-- that activates periodic polling. Then in the body of the polling routine
-- we test for asynchronous abort.
-- NT, OS/2, HPUX/DCE and SCO currently use this file
pragma Warnings (Off);
-- Allow withing of non-Preelaborated units in Ada 2005 mode where this
-- package will be categorized as Preelaborate. See AI-362 for details.
-- It is safe in the context of the run-time to violate the rules!
with System.Soft_Links;
-- used for Check_Abort_Status
pragma Warnings (On);
separate (Ada.Exceptions)
----------
-- Poll --
----------
procedure Poll is
begin
-- Test for asynchronous abort on each poll
if System.Soft_Links.Check_Abort_Status.all /= 0 then
raise Standard'Abort_Signal;
end if;
end Poll;
|
libsrc/graphics/msx/gen_clg.asm
|
grancier/z180
| 0 |
26454
|
;
; z88dk library: Generic VDP support code
;
;
; $Id: gen_clg.asm,v 1.4 2016/06/21 20:16:35 dom Exp $
;
SECTION code_clib
PUBLIC clg
PUBLIC _clg
EXTERN msx_set_mode
EXTERN msx_color
EXTERN FILVRM
.clg
._clg
ld hl,2 ; set graphics mode
call msx_set_mode
ld hl,15
push hl ; border
push hl ; paper
ld hl,0 ; ink
push hl
call msx_color
pop hl
pop hl
pop hl
ld bc,6144 ; set VRAM attribute area
ld a,$1F
ld hl,8192
push bc
call FILVRM
pop bc ; clear VRAM picture area
xor a
ld h,a
ld l,a
jp FILVRM
|
Cubical/Reflection/StrictEquiv.agda
|
Edlyr/cubical
| 0 |
14654
|
<reponame>Edlyr/cubical
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Reflection.StrictEquiv where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.Equiv.Base
open import Cubical.Foundations.Isomorphism
open import Cubical.Data.List.Base
open import Cubical.Data.Unit.Base
import Agda.Builtin.Reflection as R
open import Cubical.Reflection.Base
strictEquivClauses : R.Term → R.Term → List R.Clause
strictEquivClauses f g =
R.clause []
(R.proj (quote fst) v∷ [])
f
∷ R.clause []
(R.proj (quote snd) v∷ R.proj (quote equiv-proof) v∷ [])
(R.def (quote strictContrFibers) (g v∷ []))
∷ []
strictEquivTerm : R.Term → R.Term → R.Term
strictEquivTerm f g = R.pat-lam (strictEquivClauses f g) []
strictEquivMacro : ∀ {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'}
→ (A → B) → (B → A) → R.Term → R.TC Unit
strictEquivMacro {A = A} {B} f g hole =
R.quoteTC (A ≃ B) >>= λ equivTy →
R.checkType hole equivTy >>
R.quoteTC f >>= λ `f` →
R.quoteTC g >>= λ `g` →
R.unify (strictEquivTerm `f` `g`) hole
strictIsoToEquivMacro : ∀ {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'}
→ Iso A B → R.Term → R.TC Unit
strictIsoToEquivMacro isom =
strictEquivMacro (Iso.fun isom) (Iso.inv isom)
-- For use with unquoteDef
defStrictEquiv : ∀ {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'}
→ R.Name → (A → B) → (B → A) → R.TC Unit
defStrictEquiv idName f g =
R.quoteTC f >>= λ `f` →
R.quoteTC g >>= λ `g` →
R.defineFun idName (strictEquivClauses `f` `g`)
defStrictIsoToEquiv : ∀ {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'}
→ R.Name → Iso A B → R.TC Unit
defStrictIsoToEquiv idName isom =
defStrictEquiv idName (Iso.fun isom) (Iso.inv isom)
-- For use with unquoteDef
declStrictEquiv : ∀ {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'}
→ R.Name → (A → B) → (B → A) → R.TC Unit
declStrictEquiv {A = A} {B = B} idName f g =
R.quoteTC (A ≃ B) >>= λ ty →
R.declareDef (varg idName) ty >>
defStrictEquiv idName f g
declStrictIsoToEquiv : ∀ {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'}
→ R.Name → Iso A B → R.TC Unit
declStrictIsoToEquiv idName isom =
declStrictEquiv idName (Iso.fun isom) (Iso.inv isom)
macro
-- (f : A → B) → (g : B → A) → (A ≃ B)
-- Assumes that `f` and `g` are inverse up to definitional equality
strictEquiv : ∀ {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'}
→ (A → B) → (B → A) → R.Term → R.TC Unit
strictEquiv = strictEquivMacro
-- (isom : Iso A B) → (A ≃ B)
-- Assumes that the functions defining `isom` are inverse up to definitional equality
strictIsoToEquiv : ∀ {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'}
→ Iso A B → R.Term → R.TC Unit
strictIsoToEquiv = strictIsoToEquivMacro
|
source/league/matreshka-json_parser.adb
|
svn2github/matreshka
| 24 |
3693
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2013, <NAME> <<EMAIL>> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision: 3824 $ $Date: 2013-03-28 20:15:46 +0200 (Чт., 28 марта 2013) $
------------------------------------------------------------------------------
with League.Characters;
with League.Holders;
with League.JSON.Arrays;
with League.JSON.Objects;
with League.JSON.Values;
with Matreshka.Internals.Utf16;
with Matreshka.Internals.Unicode;
package body Matreshka.JSON_Parser is
-----------
-- Parse --
-----------
procedure Parse
(Text : League.Strings.Universal_String;
Value : out League.JSON.Documents.JSON_Document;
Success : out Boolean)
is
Index : Natural;
Char : Wide_Wide_Character;
EOF : constant Wide_Wide_Character := Wide_Wide_Character'Last;
function Next_Character return Boolean;
function Match_Character (Result : Wide_Wide_Character) return Boolean;
function Parse_JSON_Text
(Result : out League.JSON.Documents.JSON_Document) return Boolean;
function WS return Boolean;
function Parse_Value
(Result : out League.JSON.Values.JSON_Value) return Boolean;
function Parse_False_Value return Boolean;
function Parse_Null_Value return Boolean;
function Parse_True_Value return Boolean;
function Parse_Object_Value
(Result : out League.JSON.Objects.JSON_Object) return Boolean;
function Parse_Member
(Key : out League.Strings.Universal_String;
Value : out League.JSON.Values.JSON_Value) return Boolean;
function Parse_Array_Value
(Result : out League.JSON.Arrays.JSON_Array) return Boolean;
function Parse_Number_Value
(Result : out League.JSON.Values.JSON_Value) return Boolean;
function Parse_String_Value
(Result : out League.Strings.Universal_String) return Boolean;
function Parse_Escaped (Result : out Wide_Wide_Character) return Boolean;
function Parse_Utf16_Code_Unit
(Result : out Matreshka.Internals.Utf16.Utf16_Code_Unit) return Boolean;
function Parse_Hex_Digit
(Result : out Matreshka.Internals.Utf16.Utf16_Code_Unit) return Boolean;
---------------------
-- Match_Character --
---------------------
function Match_Character (Result : Wide_Wide_Character) return Boolean is
begin
return Char = Result and then Next_Character;
end Match_Character;
--------------------
-- Next_Character --
--------------------
function Next_Character return Boolean is
begin
if Index < Text.Length then
Index := Index + 1;
Char := Text.Element (Index).To_Wide_Wide_Character;
return True;
elsif Index = Text.Length then
-- Return artificial EOF character at end of text
Index := Index + 1;
Char := EOF;
return True;
else
return False;
end if;
end Next_Character;
-----------------------
-- Parse_Array_Value --
-----------------------
function Parse_Array_Value
(Result : out League.JSON.Arrays.JSON_Array) return Boolean
is
Next_Value : League.JSON.Values.JSON_Value;
begin
if Match_Character ('[') and then WS then
Result := League.JSON.Arrays.Empty_JSON_Array;
if Char /= ']' then
if Parse_Value (Next_Value) then
Result.Append (Next_Value);
loop
if not WS then
-- Unexpected EOF after value in array
return False;
end if;
exit when not Match_Character (',');
if WS and then Parse_Value (Next_Value) then
Result.Append (Next_Value);
else
-- Value expected after ','
return False;
end if;
end loop;
else
-- Value expected after '['
return False;
end if;
end if;
if Match_Character (']') and then WS then
return True;
else
-- ']' expected
return False;
end if;
else
-- Unexpected EOF after '['
return False;
end if;
end Parse_Array_Value;
function Parse_Utf16_Code_Unit
(Result : out Matreshka.Internals.Utf16.Utf16_Code_Unit) return Boolean
is
use Matreshka.Internals.Utf16;
use type Utf16_Code_Unit;
Hex_1 : Utf16_Code_Unit;
Hex_2 : Utf16_Code_Unit;
Hex_3 : Utf16_Code_Unit;
Hex_4 : Utf16_Code_Unit;
begin
if not Next_Character then
-- Unexpected EOF after \u
return False;
end if;
if Parse_Hex_Digit (Hex_1)
and then Parse_Hex_Digit (Hex_2)
and then Parse_Hex_Digit (Hex_3)
and then Parse_Hex_Digit (Hex_4)
then
Result := 16 * (16 * (16 * Hex_1 + Hex_2) + Hex_3) + Hex_4;
return True;
else
-- Wrong \uXXXX
return False;
end if;
end Parse_Utf16_Code_Unit;
-------------------
-- Parse_Escaped --
-------------------
function Parse_Escaped (Result : out Wide_Wide_Character) return Boolean is
begin
case Char is
when '"' | '/' | '\' =>
Result := Char;
when 'b' =>
Result := Wide_Wide_Character'Val (8);
when 'f' =>
Result := Wide_Wide_Character'Val (12);
when 'n' =>
Result := Wide_Wide_Character'Val (10);
when 'r' =>
Result := Wide_Wide_Character'Val (13);
when 't' =>
Result := Wide_Wide_Character'Val (9);
when 'u' =>
declare
use Matreshka.Internals.Utf16;
High : Utf16_Code_Unit;
Low : Utf16_Code_Unit;
Point : Matreshka.Internals.Unicode.Code_Point;
Value : League.Characters.Universal_Character;
begin
if not Parse_Utf16_Code_Unit (High) then
-- Wrong \uXXXX
return False;
elsif High in High_Surrogate_Utf16_Code_Unit then
if not Match_Character ('\') then
-- \uDXXX expected after first surrogate char
return False;
elsif not Parse_Utf16_Code_Unit (Low)
or else Low not in Low_Surrogate_Utf16_Code_Unit
then
-- Wrong \uDXXX after first surrogate char
return False;
end if;
Point := Unchecked_Surrogate_Pair_To_Code_Point
(High => High, Low => Low);
else
Point := Matreshka.Internals.Unicode.Code_Point (High);
end if;
Result := Wide_Wide_Character'Val (Point);
Value := League.Characters.To_Universal_Character (Result);
if Value.Is_Valid then
return True;
else
-- Invalid \uXXXX character
return False;
end if;
end;
when others =>
-- Unknown escaped
return False;
end case;
if Next_Character then
return True;
else
-- Unexpected EOF after hex
return False;
end if;
end Parse_Escaped;
-----------------------
-- Parse_False_Value --
-----------------------
function Parse_False_Value return Boolean is
begin
return Match_Character ('f')
and then Match_Character ('a')
and then Match_Character ('l')
and then Match_Character ('s')
and then Match_Character ('e');
end Parse_False_Value;
---------------------
-- Parse_Hex_Digit --
---------------------
function Parse_Hex_Digit
(Result : out Matreshka.Internals.Utf16.Utf16_Code_Unit)
return Boolean
is
use type Matreshka.Internals.Utf16.Utf16_Code_Unit;
begin
case Char is
when '0' .. '9' =>
Result :=
Wide_Wide_Character'Pos (Char)
- Wide_Wide_Character'Pos ('0');
when 'a' .. 'f' =>
Result :=
Wide_Wide_Character'Pos (Char)
- Wide_Wide_Character'Pos ('a') + 10;
when 'A' .. 'F' =>
Result :=
Wide_Wide_Character'Pos (Char)
- Wide_Wide_Character'Pos ('A') + 10;
when others =>
-- Unexpected hex digit
return False;
end case;
if not Next_Character then
-- Unexpected EOF after hex
return False;
end if;
return True;
end Parse_Hex_Digit;
---------------------
-- Parse_JSON_Text --
---------------------
function Parse_JSON_Text
(Result : out League.JSON.Documents.JSON_Document) return Boolean
is
Array_Value : League.JSON.Arrays.JSON_Array;
Object_Value : League.JSON.Objects.JSON_Object;
begin
if WS then
if Char = '[' then
if Parse_Array_Value (Array_Value) then
Result.Set_Array (Array_Value);
return True;
else
return False;
end if;
elsif Char = '{' then
if Parse_Object_Value (Object_Value) then
Result.Set_Object (Object_Value);
return True;
else
return False;
end if;
end if;
end if;
return False;
end Parse_JSON_Text;
------------------
-- Parse_Member --
------------------
function Parse_Member
(Key : out League.Strings.Universal_String;
Value : out League.JSON.Values.JSON_Value) return Boolean is
begin
if Parse_String_Value (Key) then
if not WS then
-- Unexpected EOF after name
return False;
end if;
if Char /= ':' then
-- Expected ':'
return False;
end if;
if not Next_Character or else not WS then
-- Unexpected EOF after ':'
return False;
end if;
return Parse_Value (Value);
else
-- String expected
return False;
end if;
end Parse_Member;
----------------------
-- Parse_Null_Value --
----------------------
function Parse_Null_Value return Boolean is
begin
if Match_Character ('n')
and then Match_Character ('u')
and then Match_Character ('l')
and then Match_Character ('l')
then
return True;
else
return False;
end if;
end Parse_Null_Value;
------------------------
-- Parse_Number_Value --
------------------------
function Parse_Number_Value
(Result : out League.JSON.Values.JSON_Value) return Boolean
is
Old_Index : constant Positive := Index;
Is_Integer : Boolean := True;
begin
-- [minus]
if Char = '-' then
if not Next_Character then
-- unexpected EOF after '-'
return False;
end if;
end if;
-- int
case Char is
when '0' =>
if not Next_Character then
-- unexpected EOF after '0'
return False;
end if;
when '1' .. '9' =>
loop
if not Next_Character then
-- unexpected EOF after digit
return False;
end if;
exit when Char not in '0' .. '9';
end loop;
when others =>
-- Non digit character in int
return False;
end case;
-- [frac]
if Char = '.' then
Is_Integer := False;
if not Next_Character then
-- unexpected EOF after '.'
return False;
end if;
if Char not in '0' .. '9' then
-- Expected digit after '.'
return False;
end if;
loop
if not Next_Character then
-- unexpected EOF after digit
return False;
end if;
exit when Char not in '0' .. '9';
end loop;
end if;
-- [exp]
if Char in 'e' | 'E' then
Is_Integer := False;
if not Next_Character then
-- unexpected EOF after 'e'
return False;
end if;
-- [minus/plus]
if Char in '+' | '-' then
if not Next_Character then
-- unexpected EOF after [minus/plus]
return False;
end if;
end if;
if Char not in '0' .. '9' then
-- Expected digit after 'e'
return False;
end if;
loop
if not Next_Character then
-- unexpected EOF after digit in exp
return False;
end if;
exit when Char not in '0' .. '9';
end loop;
end if;
if Is_Integer then
declare
Integer : League.Holders.Universal_Integer;
begin
Integer :=
League.Holders.Universal_Integer'Wide_Wide_Value
(Text.Slice (Old_Index, Index - 1).To_Wide_Wide_String);
Result := League.JSON.Values.To_JSON_Value (Integer);
end;
else
declare
Float : League.Holders.Universal_Float;
begin
Float :=
League.Holders.Universal_Float'Wide_Wide_Value
(Text.Slice (Old_Index, Index - 1).To_Wide_Wide_String);
Result := League.JSON.Values.To_JSON_Value (Float);
end;
end if;
return True;
end Parse_Number_Value;
------------------------
-- Parse_Object_Value --
------------------------
function Parse_Object_Value
(Result : out League.JSON.Objects.JSON_Object) return Boolean
is
Key : League.Strings.Universal_String;
Next_Value : League.JSON.Values.JSON_Value;
begin
if Next_Character -- Skip '{'
and then WS
then
Result := League.JSON.Objects.Empty_JSON_Object;
if Char /= '}' then
if Parse_Member (Key, Next_Value) then
Result.Insert (Key, Next_Value);
loop
if not WS then
-- Unexpected EOF after member in object
return False;
end if;
exit when not Match_Character (',');
if WS and then Parse_Member (Key, Next_Value) then
Result.Insert (Key, Next_Value);
else
-- Member expected after ','
return False;
end if;
end loop;
else
-- Member expected after '{'
return False;
end if;
end if;
if Match_Character ('}') and then WS then
return True;
else
-- '}' expected
return False;
end if;
else
-- Unexpected EOF after '{'
return False;
end if;
end Parse_Object_Value;
------------------------
-- Parse_String_Value --
------------------------
function Parse_String_Value
(Result : out League.Strings.Universal_String) return Boolean
is
O10_FFFF : constant Wide_Wide_Character
:= Wide_Wide_Character'Val (16#10_FFFF#);
Old_Index : Positive := Index + 1;
Escape : Wide_Wide_Character;
begin
if Match_Character ('"') then
Result.Clear;
loop
case Char is
when '"' =>
if Old_Index < Index then
Result.Append (Text.Slice (Old_Index, Index - 1));
end if;
exit;
when '\' =>
if Old_Index < Index then
Result.Append (Text.Slice (Old_Index, Index - 1));
end if;
if not Next_Character then
-- Unexpected EOF after slash
return False;
end if;
if not Parse_Escaped (Escape) then
-- Unknown escaped character
return False;
end if;
Result.Append (Escape);
Old_Index := Index;
when -- %x20-21 / %x23-5B / %x5D-10FFFF
' ' | '!' | '#' .. '[' | ']' .. O10_FFFF
=>
if not Next_Character then
-- Unexpected EOF in string
return False;
end if;
when others =>
-- Unexpected character in string
return False;
end case;
end loop;
if not Next_Character then
-- Unexpected EOF after string
return False;
end if;
return True;
else
-- quotation mark expected
return False;
end if;
end Parse_String_Value;
----------------------
-- Parse_True_Value --
----------------------
function Parse_True_Value return Boolean is
begin
if Match_Character ('t')
and then Match_Character ('r')
and then Match_Character ('u')
and then Match_Character ('e')
then
return True;
else
return False;
end if;
end Parse_True_Value;
-----------------
-- Parse_Value --
-----------------
function Parse_Value
(Result : out League.JSON.Values.JSON_Value) return Boolean
is
Aux_Array : League.JSON.Arrays.JSON_Array;
Aux_Object : League.JSON.Objects.JSON_Object;
Aux_String : League.Strings.Universal_String;
begin
case Char is
when 'f' =>
if Parse_False_Value then
Result := League.JSON.Values.To_JSON_Value (False);
return True;
else
return False;
end if;
when 'n' =>
if Parse_Null_Value then
Result := League.JSON.Values.Null_JSON_Value;
return True;
else
return False;
end if;
when 't' =>
if Parse_True_Value then
Result := League.JSON.Values.To_JSON_Value (True);
return True;
else
return False;
end if;
when '{' =>
if Parse_Object_Value (Aux_Object) then
Result := Aux_Object.To_JSON_Value;
return True;
else
return False;
end if;
when '[' =>
if Parse_Array_Value (Aux_Array) then
Result := Aux_Array.To_JSON_Value;
return True;
else
return False;
end if;
when '"' =>
if Parse_String_Value (Aux_String) then
Result := League.JSON.Values.To_JSON_Value (Aux_String);
return True;
else
return False;
end if;
when others =>
return Parse_Number_Value (Result);
end case;
end Parse_Value;
--------
-- WS --
--------
function WS return Boolean is
O9 : constant Wide_Wide_Character := Wide_Wide_Character'Val (9);
OA : constant Wide_Wide_Character := Wide_Wide_Character'Val (10);
OD : constant Wide_Wide_Character := Wide_Wide_Character'Val (13);
begin
while Char in O9 | OA | OD | ' ' loop
if not Next_Character then
return False;
end if;
end loop;
return True;
end WS;
begin
Index := 0;
Success := Next_Character
and then Parse_JSON_Text (Value)
and then Char = EOF;
end Parse;
end Matreshka.JSON_Parser;
|
tests/linkedlist/src/wrap.ads
|
TUM-EI-RCS/StratoX
| 12 |
7186
|
with Ada.Containers.Formal_Doubly_Linked_Lists;
package wrap with SPARK_Mode is
type Element_Type is (ONE, TWO);
function My_Eq (Left : Element_Type; Right : Element_Type) return Boolean is (Left = Right);
package My_Lists is new Ada.Containers.Formal_Doubly_Linked_Lists (Element_Type, My_Eq);
use My_Lists;
li : My_Lists.List (10);
procedure foo;
end wrap;
|
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/sizetype4.adb
|
best08618/asylo
| 7 |
21908
|
<gh_stars>1-10
-- { dg-do run }
procedure Sizetype4 is
type Float_Array is array (Integer range <>) of Float;
NoFloats : Float_Array (1 .. 0);
procedure Q (Results : Float_Array := NoFloats) is
type Reply_Msg is
record
Request_Id : Integer;
Status : Integer;
Data : Float_Array (Results'Range);
end record;
begin
if Reply_Msg'Size /= 64 then
raise Program_Error;
end if;
end;
begin
Q;
end;
|
arch/ARM/STM32/svd/stm32l4x3/stm32_svd-firewall.ads
|
morbos/Ada_Drivers_Library
| 2 |
26310
|
<gh_stars>1-10
-- This spec has been automatically generated from STM32L4x3.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.Firewall is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype CSSA_ADD_Field is HAL.UInt16;
-- Code segment start address
type CSSA_Register is record
-- unspecified
Reserved_0_7 : HAL.UInt8 := 16#0#;
-- code segment start address
ADD : CSSA_ADD_Field := 16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CSSA_Register use record
Reserved_0_7 at 0 range 0 .. 7;
ADD at 0 range 8 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype CSL_LENG_Field is HAL.UInt14;
-- Code segment length
type CSL_Register is record
-- unspecified
Reserved_0_7 : HAL.UInt8 := 16#0#;
-- code segment length
LENG : CSL_LENG_Field := 16#0#;
-- unspecified
Reserved_22_31 : HAL.UInt10 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CSL_Register use record
Reserved_0_7 at 0 range 0 .. 7;
LENG at 0 range 8 .. 21;
Reserved_22_31 at 0 range 22 .. 31;
end record;
subtype NVDSSA_ADD_Field is HAL.UInt16;
-- Non-volatile data segment start address
type NVDSSA_Register is record
-- unspecified
Reserved_0_7 : HAL.UInt8 := 16#0#;
-- Non-volatile data segment start address
ADD : NVDSSA_ADD_Field := 16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for NVDSSA_Register use record
Reserved_0_7 at 0 range 0 .. 7;
ADD at 0 range 8 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype NVDSL_LENG_Field is HAL.UInt14;
-- Non-volatile data segment length
type NVDSL_Register is record
-- unspecified
Reserved_0_7 : HAL.UInt8 := 16#0#;
-- Non-volatile data segment length
LENG : NVDSL_LENG_Field := 16#0#;
-- unspecified
Reserved_22_31 : HAL.UInt10 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for NVDSL_Register use record
Reserved_0_7 at 0 range 0 .. 7;
LENG at 0 range 8 .. 21;
Reserved_22_31 at 0 range 22 .. 31;
end record;
subtype VDSSA_ADD_Field is HAL.UInt10;
-- Volatile data segment start address
type VDSSA_Register is record
-- unspecified
Reserved_0_5 : HAL.UInt6 := 16#0#;
-- Volatile data segment start address
ADD : VDSSA_ADD_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for VDSSA_Register use record
Reserved_0_5 at 0 range 0 .. 5;
ADD at 0 range 6 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype VDSL_LENG_Field is HAL.UInt10;
-- Volatile data segment length
type VDSL_Register is record
-- unspecified
Reserved_0_5 : HAL.UInt6 := 16#0#;
-- Non-volatile data segment length
LENG : VDSL_LENG_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for VDSL_Register use record
Reserved_0_5 at 0 range 0 .. 5;
LENG at 0 range 6 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- Configuration register
type CR_Register is record
-- Firewall pre alarm
FPA : Boolean := False;
-- Volatile data shared
VDS : Boolean := False;
-- Volatile data execution
VDE : Boolean := False;
-- unspecified
Reserved_3_31 : HAL.UInt29 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CR_Register use record
FPA at 0 range 0 .. 0;
VDS at 0 range 1 .. 1;
VDE at 0 range 2 .. 2;
Reserved_3_31 at 0 range 3 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Firewall
type FIREWALL_Peripheral is record
-- Code segment start address
CSSA : aliased CSSA_Register;
-- Code segment length
CSL : aliased CSL_Register;
-- Non-volatile data segment start address
NVDSSA : aliased NVDSSA_Register;
-- Non-volatile data segment length
NVDSL : aliased NVDSL_Register;
-- Volatile data segment start address
VDSSA : aliased VDSSA_Register;
-- Volatile data segment length
VDSL : aliased VDSL_Register;
-- Configuration register
CR : aliased CR_Register;
end record
with Volatile;
for FIREWALL_Peripheral use record
CSSA at 16#0# range 0 .. 31;
CSL at 16#4# range 0 .. 31;
NVDSSA at 16#8# range 0 .. 31;
NVDSL at 16#C# range 0 .. 31;
VDSSA at 16#10# range 0 .. 31;
VDSL at 16#14# range 0 .. 31;
CR at 16#20# range 0 .. 31;
end record;
-- Firewall
FIREWALL_Periph : aliased FIREWALL_Peripheral
with Import, Address => FIREWALL_Base;
end STM32_SVD.Firewall;
|
programs/oeis/000/A000165.asm
|
neoneye/loda
| 22 |
161281
|
<reponame>neoneye/loda<gh_stars>10-100
; A000165: Double factorial of even numbers: (2n)!! = 2^n*n!.
; 1,2,8,48,384,3840,46080,645120,10321920,185794560,3715891200,81749606400,1961990553600,51011754393600,1428329123020800,42849873690624000,1371195958099968000,46620662575398912000,1678343852714360832000,63777066403145711616000,2551082656125828464640000,107145471557284795514880000,4714400748520531002654720000,216862434431944426122117120000,10409396852733332453861621760000,520469842636666622693081088000000,27064431817106664380040216576000000
mul $0,2
mov $1,1
lpb $0
div $0,2
mul $0,2
mov $2,$0
sub $0,1
mul $1,$2
lpe
mov $0,$1
|
oeis/173/A173126.asm
|
neoneye/loda-programs
| 11 |
26667
|
; A173126: sum_{k=floor[(n+5)/2] mod 5} C(n,k)
; Submitted by <NAME>(s3)
; 0,0,0,0,1,2,7,14,36,72,165,330,715,1430,3004,6008,12393,24786,50559,101118,204820,409640,826045,1652090,3321891,6643782,13333932,26667864,53457121,106914242,214146295,428292590,857417220,1714834440,3431847189
mov $2,$0
mov $5,$0
lpb $2
mov $0,$5
sub $2,1
sub $0,$2
mov $4,0
mov $6,1
mov $7,0
lpb $6
div $0,2
sub $6,1
lpb $0
sub $0,1
add $7,$4
add $4,$7
add $4,1
lpe
add $7,$3
lpe
add $3,$7
lpe
mov $0,$7
|
1-base/math/source/generic/pure/geometry/trigonometry/cached_rotation.adb
|
charlie5/lace
| 20 |
1187
|
package body cached_Rotation
is
use ada.Numerics,
float_elementary_Functions;
the_Cache : array (0 .. slot_Count - 1) of aliased Matrix_2x2_type;
Pi_x_2 : constant := Pi * 2.0;
last_slot_Index : constant Float_type := Float_type (slot_Count - 1);
index_Factor : constant Float_type := last_slot_Index / Pi_x_2;
function to_Rotation (Angle : in Float_type) return access constant Matrix_2x2_type
is
the_Index : standard.Integer := standard.Integer (Angle * index_Factor) mod slot_Count;
begin
if the_Index < 0
then
the_index := the_Index + slot_Count;
end if;
return the_Cache (the_Index)'Access;
end to_Rotation;
begin
for Each in the_Cache'Range
loop
declare
Angle : constant Float_type := ( Float_type (Each) / Float_type (slot_Count - 1)
* Pi_x_2);
C : constant Float_type := Cos (Angle);
S : constant Float_type := Sin (Angle);
begin
the_Cache (Each) := to_Matrix_2x2 (C, -S,
S, C);
end;
end loop;
end cached_Rotation;
|
EjerciciosClase/switchchara.asm
|
adeandak/OPC
| 0 |
174481
|
TITLE Ejercicio switchchara
; Descripcion:
; Ejemplo de implementacion de la Estructura Algoritmica Switch.
;
INCLUDE \masm32\Irvine\Irvine32.inc
INCLUDELIB \masm32\Irvine\Irvine32.lib
INCLUDELIB \masm32\Irvine\User32.lib
INCLUDELIB \masm32\Irvine\Kernel32.lib
.DATA
; Textos para la Consola
mcr=0Dh
mlf=0Ah
mnul=0h
titulo BYTE mcr, mlf, "Ejemplo de Switch.", mcr, mlf, "Tecle el dato char: ", mnul
impri01 BYTE "Caracter: ", mnul
impri02 BYTE "Caracter default: ", mnul
Adios BYTE mcr, mlf, "ADIOS.", mcr, mlf, mnul
; Variables
char BYTE ?
.CODE
; Procedimiento principal
main PROC
mov edx,OFFSET titulo
call WriteString
; char = scan (+++)
; SWITCH(char)
; ADIOS
mov edx,OFFSET Adios
call WriteString
exit
main ENDP
; Termina el procedimiento principal
; Termina el area de Ensamble
END main
|
oeis/245/A245788.asm
|
neoneye/loda-programs
| 11 |
168953
|
<reponame>neoneye/loda-programs
; A245788: n times the number of 1's in the binary expansion of n.
; 0,1,2,6,4,10,12,21,8,18,20,33,24,39,42,60,16,34,36,57,40,63,66,92,48,75,78,108,84,116,120,155,32,66,68,105,72,111,114,156,80,123,126,172,132,180,184,235,96,147,150,204,156,212,216,275,168,228,232,295,240,305,310,378,64,130,132,201,136,207,210,284,144,219,222,300,228,308,312,395,160,243,246,332,252,340,344,435,264,356,360,455,368,465,470,570,192,291,294,396
mov $2,$0
mov $3,$0
seq $3,120 ; 1's-counting sequence: number of 1's in binary expansion of n (or the binary weight of n).
mul $2,$3
mov $0,$2
|
src/static/antlr4/grammars/BindingIdentifier.g4
|
jlenoble/ecmascript-parser
| 0 |
1319
|
/* Source: ECMAScript® 2018 Language Specification - Annex A-2 */
grammar BindingIdentifier;
// IdentifierReference[Yield, Await]:
// Identifier
// [~Yield] yield
// [~Await] await *
identifierReference
: identifier
| {!this.canYield()}? Yield
// | Await Multiply
;
// BindingIdentifier[Yield, Await]:
// Identifier
// [~Yield] yield
// [~Await] await
// See ECMAScript® 2018 Language Specification - Section 12.1:
// NOTE yield and await are permitted as BindingIdentifier in the grammar, and
// prohibited with static semantics below, to prohibit automatic semicolon
// insertion in cases such as
// let
// await 0;
bindingIdentifier
: identifier
| {!this.canYield()}? Yield
// | Await
;
// Identifier:
// IdentifierName but not ReservedWord
identifier
: IdentifierName
| miscIdentifier
;
|
Lab15/lab15.asm
|
richardhyy/AssemblyLab
| 3 |
93304
|
assume cs:code
stack segment
db 128 dup (0)
stack ends
code segment
start: mov ax,stack
mov ss,ax
mov sp,128
push cs
pop ds
mov ax,0
mov es,ax
mov si,offset int9
mov di,204h
mov cx,offset int9end-offset int9
cld
rep movsb
push es:[9*4]
pop es:[200h]
push es:[9*4+2]
pop es:[202h]
cli
mov word ptr es:[9*4],204h
mov word ptr es:[9*4+2],0
sti
mov ax,4c00h
int 21h
int9: push ax
push bx
push cx
push es
in al,60h
pushf
call dword ptr cs:[200h]
cmp al,9Eh ; A released (1E+80)
jne int9ret
mov ax,0b800h
mov es,ax
mov bx,0
mov cx,2000
s: mov byte ptr es:[bx],'A'
add bx,2
loop s
int9ret:pop es
pop cx
pop bx
pop ax
iret
int9end:nop
code ends
end start
|
programs/oeis/063/A063214.asm
|
neoneye/loda
| 22 |
87396
|
<reponame>neoneye/loda
; A063214: Dimension of the space of weight 2n cuspidal newforms for Gamma_0( 46 ).
; 1,6,10,12,16,22,22,28,32,34,38,44,44,50,54,56,60,66,66,72,76,78,82,88,88,94,98,100,104,110,110,116,120,122,126,132,132,138,142,144,148,154,154,160,164,166,170,176,176,182
mov $1,$0
mul $0,2
add $0,1
seq $1,63202 ; Dimension of the space of weight 2n cuspidal newforms for Gamma_0( 22 ).
add $0,$1
|
regtests/util-processes-tests.adb
|
My-Colaborations/ada-util
| 0 |
9873
|
<filename>regtests/util-processes-tests.adb
-----------------------------------------------------------------------
-- util-processes-tests - Test for processes
-- Copyright (C) 2011, 2012, 2016, 2018, 2019 <NAME>
-- Written by <NAME> (<EMAIL>)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Util.Log.Loggers;
with Util.Test_Caller;
with Util.Files;
with Util.Strings.Vectors;
with Util.Streams.Pipes;
with Util.Streams.Buffered;
with Util.Streams.Texts;
with Util.Processes.Tools;
package body Util.Processes.Tests is
-- The logger
Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("Util.Processes.Tests");
package Caller is new Util.Test_Caller (Test, "Processes");
procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is
begin
Caller.Add_Test (Suite, "Test Util.Processes.Is_Running",
Test_No_Process'Access);
Caller.Add_Test (Suite, "Test Util.Processes.Spawn/Wait/Get_Exit_Status",
Test_Spawn'Access);
Caller.Add_Test (Suite, "Test Util.Processes.Spawn(READ pipe)",
Test_Output_Pipe'Access);
Caller.Add_Test (Suite, "Test Util.Processes.Spawn(WRITE pipe)",
Test_Input_Pipe'Access);
Caller.Add_Test (Suite, "Test Util.Processes.Spawn/Shell(WRITE pipe)",
Test_Shell_Splitting_Pipe'Access);
Caller.Add_Test (Suite, "Test Util.Processes.Spawn(OUTPUT redirect)",
Test_Output_Redirect'Access);
Caller.Add_Test (Suite, "Test Util.Processes.Spawn(INPUT redirect)",
Test_Input_Redirect'Access);
Caller.Add_Test (Suite, "Test Util.Streams.Pipes.Open/Read/Close (Multi spawn)",
Test_Multi_Spawn'Access);
Caller.Add_Test (Suite, "Test Util.Processes.Tools.Execute",
Test_Tools_Execute'Access);
end Add_Tests;
-- ------------------------------
-- Tests when the process is not launched
-- ------------------------------
procedure Test_No_Process (T : in out Test) is
P : Process;
begin
T.Assert (not P.Is_Running, "Process should not be running");
T.Assert (P.Get_Pid < 0, "Invalid process id");
end Test_No_Process;
-- ------------------------------
-- Test executing a process
-- ------------------------------
procedure Test_Spawn (T : in out Test) is
P : Process;
begin
-- Launch the test process => exit code 2
P.Spawn ("bin/util_test_process");
T.Assert (P.Is_Running, "Process is running");
P.Wait;
T.Assert (not P.Is_Running, "Process has stopped");
T.Assert (P.Get_Pid > 0, "Invalid process id");
Util.Tests.Assert_Equals (T, 2, P.Get_Exit_Status, "Invalid exit status");
-- Launch the test process => exit code 0
P.Spawn ("bin/util_test_process 0 write b c d e f");
T.Assert (P.Is_Running, "Process is running");
P.Wait;
T.Assert (not P.Is_Running, "Process has stopped");
T.Assert (P.Get_Pid > 0, "Invalid process id");
Util.Tests.Assert_Equals (T, 0, P.Get_Exit_Status, "Invalid exit status");
end Test_Spawn;
-- ------------------------------
-- Test output pipe redirection: read the process standard output
-- ------------------------------
procedure Test_Output_Pipe (T : in out Test) is
P : aliased Util.Streams.Pipes.Pipe_Stream;
begin
P.Open ("bin/util_test_process 0 write b c d e f test_marker");
declare
Buffer : Util.Streams.Buffered.Input_Buffer_Stream;
Content : Ada.Strings.Unbounded.Unbounded_String;
begin
Buffer.Initialize (P'Unchecked_Access, 19);
Buffer.Read (Content);
P.Close;
Util.Tests.Assert_Matches (T, "b\s+c\s+d\s+e\s+f\s+test_marker\s+", Content,
"Invalid content");
end;
T.Assert (not P.Is_Running, "Process has stopped");
Util.Tests.Assert_Equals (T, 0, P.Get_Exit_Status, "Invalid exit status");
end Test_Output_Pipe;
-- ------------------------------
-- Test shell splitting.
-- ------------------------------
procedure Test_Shell_Splitting_Pipe (T : in out Test) is
P : aliased Util.Streams.Pipes.Pipe_Stream;
begin
P.Open ("bin/util_test_process 0 write ""b c d e f"" test_marker");
declare
Buffer : Util.Streams.Buffered.Input_Buffer_Stream;
Content : Ada.Strings.Unbounded.Unbounded_String;
begin
Buffer.Initialize (P'Unchecked_Access, 19);
Buffer.Read (Content);
P.Close;
Util.Tests.Assert_Matches (T, "b c d e f\s+test_marker\s+", Content,
"Invalid content");
end;
T.Assert (not P.Is_Running, "Process has stopped");
Util.Tests.Assert_Equals (T, 0, P.Get_Exit_Status, "Invalid exit status");
end Test_Shell_Splitting_Pipe;
-- ------------------------------
-- Test input pipe redirection: write the process standard input
-- At the same time, read the process standard output.
-- ------------------------------
procedure Test_Input_Pipe (T : in out Test) is
P : aliased Util.Streams.Pipes.Pipe_Stream;
begin
P.Open ("bin/util_test_process 0 read -", READ_WRITE);
declare
Buffer : Util.Streams.Buffered.Input_Buffer_Stream;
Content : Ada.Strings.Unbounded.Unbounded_String;
Print : Util.Streams.Texts.Print_Stream;
begin
-- Write on the process input stream.
Print.Initialize (P'Unchecked_Access);
Print.Write ("Write test on the input pipe");
Print.Close;
-- Read the output.
Buffer.Initialize (P'Unchecked_Access, 19);
Buffer.Read (Content);
-- Wait for the process to finish.
P.Close;
Util.Tests.Assert_Matches (T, "Write test on the input pipe-\s", Content,
"Invalid content");
end;
T.Assert (not P.Is_Running, "Process has stopped");
Util.Tests.Assert_Equals (T, 0, P.Get_Exit_Status, "Invalid exit status");
end Test_Input_Pipe;
-- ------------------------------
-- Test launching several processes through pipes in several threads.
-- ------------------------------
procedure Test_Multi_Spawn (T : in out Test) is
Task_Count : constant Natural := 8;
Count_By_Task : constant Natural := 10;
type State_Array is array (1 .. Task_Count) of Boolean;
States : State_Array;
begin
declare
task type Worker is
entry Start (Count : in Natural);
entry Result (Status : out Boolean);
end Worker;
task body Worker is
Cnt : Natural;
State : Boolean := True;
begin
accept Start (Count : in Natural) do
Cnt := Count;
end Start;
declare
type Pipe_Array is array (1 .. Cnt) of aliased Util.Streams.Pipes.Pipe_Stream;
Pipes : Pipe_Array;
begin
-- Launch the processes.
-- They will print their arguments on stdout, one by one on each line.
-- The expected exit status is the first argument.
for I in 1 .. Cnt loop
Pipes (I).Open ("bin/util_test_process 0 write b c d e f test_marker");
end loop;
-- Read their output
for I in 1 .. Cnt loop
declare
Buffer : Util.Streams.Buffered.Input_Buffer_Stream;
Content : Ada.Strings.Unbounded.Unbounded_String;
begin
Buffer.Initialize (Pipes (I)'Unchecked_Access, 19);
Buffer.Read (Content);
Pipes (I).Close;
-- Check status and output.
State := State and Pipes (I).Get_Exit_Status = 0;
State := State and Ada.Strings.Unbounded.Index (Content, "test_marker") > 0;
end;
end loop;
exception
when E : others =>
Log.Error ("Exception raised", E);
State := False;
end;
accept Result (Status : out Boolean) do
Status := State;
end Result;
end Worker;
type Worker_Array is array (1 .. Task_Count) of Worker;
Tasks : Worker_Array;
begin
for I in Tasks'Range loop
Tasks (I).Start (Count_By_Task);
end loop;
-- Get the results (do not raise any assertion here because we have to call
-- 'Result' to ensure the thread terminates.
for I in Tasks'Range loop
Tasks (I).Result (States (I));
end loop;
-- Leaving the Worker task scope means we are waiting for our tasks to finish.
end;
for I in States'Range loop
T.Assert (States (I), "Task " & Natural'Image (I) & " failed");
end loop;
end Test_Multi_Spawn;
-- ------------------------------
-- Test output file redirection.
-- ------------------------------
procedure Test_Output_Redirect (T : in out Test) is
P : Process;
Path : constant String := Util.Tests.Get_Test_Path ("regtests/result/proc-output.txt");
Content : Ada.Strings.Unbounded.Unbounded_String;
begin
Util.Processes.Set_Output_Stream (P, Path);
Util.Processes.Spawn (P, "bin/util_test_process 0 write b c d e f test_marker");
Util.Processes.Wait (P);
T.Assert (not P.Is_Running, "Process has stopped");
Util.Tests.Assert_Equals (T, 0, P.Get_Exit_Status, "Process failed");
Util.Files.Read_File (Path, Content);
Util.Tests.Assert_Matches (T, ".*test_marker", Content,
"Invalid content");
Util.Processes.Set_Output_Stream (P, Path, True);
Util.Processes.Spawn (P, "bin/util_test_process 0 write appended_text");
Util.Processes.Wait (P);
Content := Ada.Strings.Unbounded.Null_Unbounded_String;
Util.Files.Read_File (Path, Content);
Util.Tests.Assert_Matches (T, ".*appended_text", Content,
"Invalid content");
Util.Tests.Assert_Matches (T, ".*test_marker.*", Content,
"Invalid content");
end Test_Output_Redirect;
-- ------------------------------
-- Test input file redirection.
-- ------------------------------
procedure Test_Input_Redirect (T : in out Test) is
P : Process;
In_Path : constant String := Util.Tests.Get_Test_Path ("regtests/files/proc-input.txt");
Out_Path : constant String := Util.Tests.Get_Test_Path ("regtests/result/proc-inres.txt");
Exp_Path : constant String := Util.Tests.Get_Test_Path ("regtests/expect/proc-inres.txt");
begin
Util.Processes.Set_Input_Stream (P, In_Path);
Util.Processes.Set_Output_Stream (P, Out_Path);
Util.Processes.Spawn (P, "bin/util_test_process 0 read -");
Util.Processes.Wait (P);
T.Assert (not P.Is_Running, "Process has stopped");
Util.Tests.Assert_Equals (T, 0, P.Get_Exit_Status, "Process failed");
Util.Tests.Assert_Equal_Files (T => T,
Expect => Exp_Path,
Test => Out_Path,
Message => "Process input/output redirection");
end Test_Input_Redirect;
-- ------------------------------
-- Test the Tools.Execute operation.
-- ------------------------------
procedure Test_Tools_Execute (T : in out Test) is
List : Util.Strings.Vectors.Vector;
Status : Integer;
begin
Tools.Execute (Command => "bin/util_test_process 23 write ""b c d e f"" test_marker",
Output => List,
Status => Status);
Util.Tests.Assert_Equals (T, 23, Status, "Invalid exit status");
Util.Tests.Assert_Equals (T, 2, Integer (List.Length),
"Invalid output collected by Execute");
Util.Tests.Assert_Equals (T, "b c d e f", List.Element (1), "");
Util.Tests.Assert_Equals (T, "test_marker", List.Element (2), "");
end Test_Tools_Execute;
end Util.Processes.Tests;
|
src/unison/test/fast/Mips/speed/sphinx3.profile.ptmr_init.asm
|
Patstrom/disUnison
| 88 |
172888
|
.text
.abicalls
.section .mdebug.abi32,"",@progbits
.nan legacy
.file "sphinx3.profile.ptmr_init.ll"
.text
.globl ptmr_init
.align 2
.type ptmr_init,@function
.set nomicromips
.set nomips16
.ent ptmr_init
ptmr_init: # @ptmr_init
.frame $sp,0,$ra
.mask 0x00000000,0
.fmask 0x00000000,0
.set noreorder
.set nomacro
.set noat
# BB#0:
sw $zero, 36($4)
sw $zero, 32($4)
sw $zero, 28($4)
sw $zero, 24($4)
sw $zero, 20($4)
sw $zero, 16($4)
sw $zero, 12($4)
jr $ra
sw $zero, 8($4)
.set at
.set macro
.set reorder
.end ptmr_init
$func_end0:
.size ptmr_init, ($func_end0)-ptmr_init
.ident "clang version 3.8.0 (http://llvm.org/git/clang.git 2d49f0a0ae8366964a93e3b7b26e29679bee7160) (http://llvm.org/git/llvm.git 60bc66b44837125843b58ed3e0fd2e6bb948d839)"
.section ".note.GNU-stack","",@progbits
.text
|
oeis/073/A073225.asm
|
neoneye/loda-programs
| 11 |
6702
|
<filename>oeis/073/A073225.asm
; A073225: a(n) = ceiling(n^n/n!).
; 1,1,2,5,11,27,65,164,417,1068,2756,7148,18614,48639,127464,334865,881658,2325751,6145597,16263867,43099805,114356612,303761261,807692035,2149632062,5726042116,15264691108,40722913455,108713644517,290404350963,776207020880,2075825009902,5554277310718,14868745536620,39821588060721,106696188125886,285992654335446,766879127067901,2057103777254335,5519943051629867,14816805671322668,39784069108519959,106854294545998850,287076021647661435,771468890917894741,2073725455492907880,5575586585767318715
mov $2,1
mov $3,$0
mul $3,5
lpb $3
mul $1,$0
mul $2,$3
trn $1,$2
add $1,$2
mov $4,$0
max $4,1
div $1,$4
div $2,$4
add $2,3
sub $3,1
max $3,1
lpe
mul $1,$0
div $1,$2
add $1,1
mov $0,$1
|
oeis/017/A017058.asm
|
neoneye/loda-programs
| 11 |
13511
|
; A017058: a(n) = (7*n + 6)^6.
; 46656,4826809,64000000,387420489,1544804416,4750104241,12230590464,27680640625,56800235584,107918163081,192699928576,326940373369,531441000000,832972004929,1265319018496,1870414552161,2699554153024,3814697265625,5289852801024,7212549413161,9685390482496,12827693806929,16777216000000,21691961596369,27752076864576,35161828327081,44151665987584,54980371265625,67937289638464,83344647990241,101559956668416,122978496247489,148035889000000,177210755074809,211027453382656,250058907189001
mul $0,7
add $0,6
pow $0,6
|
programs/oeis/137/A137584.asm
|
karttu/loda
| 0 |
16520
|
; A137584: a(n) = 3*a(n-1) - 2*a(n-2) + a(n-3), n > 3.
; 0,3,6,13,30,70,163,379,881,2048,4761,11068,25730,59815,139053,323259,751486,1746993,4061266,9441298,21948355,51023735,118615793,275748264,641036941,1490230088,3464364646,8053670703,18722512905,43524561955,101182330758,235220381269
mov $42,$0
mov $44,$0
lpb $44,1
clr $0,42
mov $0,$42
sub $44,1
sub $0,$44
mov $39,$0
mov $41,$0
lpb $41,1
mov $0,$39
sub $41,1
sub $0,$41
mov $35,$0
mov $37,2
lpb $37,1
mov $0,$35
sub $37,1
add $0,$37
sub $0,1
mov $31,$0
mov $33,2
lpb $33,1
mov $0,$31
sub $33,1
add $0,$33
sub $0,1
mov $27,$0
mov $29,2
lpb $29,1
clr $0,27
mov $0,$27
sub $29,1
add $0,$29
sub $0,1
add $2,$0
mov $4,1
mul $4,$2
cal $4,137531 ; a(n) = 3*a(n-1) - 2*a(n-2) + a(n-3).
cmp $26,0
add $3,$26
sub $4,$3
mul $4,2
mov $1,$4
mov $30,$29
lpb $30,1
mov $28,$1
sub $30,1
lpe
lpe
lpb $27,1
mov $27,0
sub $28,$1
lpe
mov $1,$28
mov $34,$33
lpb $34,1
mov $32,$1
sub $34,1
lpe
lpe
lpb $31,1
mov $31,0
sub $32,$1
lpe
mov $1,$32
mov $38,$37
lpb $38,1
mov $36,$1
sub $38,1
lpe
lpe
lpb $35,1
mov $35,0
sub $36,$1
lpe
mov $1,$36
div $1,2
add $40,$1
lpe
add $43,$40
lpe
mov $1,$43
|
libsrc/_DEVELOPMENT/math/float/math48/lm/z80/asm_fmod.asm
|
meesokim/z88dk
| 0 |
1069
|
<filename>libsrc/_DEVELOPMENT/math/float/math48/lm/z80/asm_fmod.asm
SECTION code_fp_math48
PUBLIC asm_fmod
EXTERN am48_fmod
defc asm_fmod = am48_fmod
|
C64Studio/scroll2.asm
|
nharrer/10Print-Smooth-Scroll
| 1 |
98313
|
;startup address
* = $0801
;create BASIC startup (SYS line)
!basic
;debuglines = 1
;userasterirq = 1
screen1 = $0400
;screen1 = $2000
; set start of screen memory
; see https://www.c64-wiki.de/wiki/Bildschirmspeicher
lda $d018
and #%00001111
ora #(screen1 / 1024) << 4
sta $d018
; init sid max freq
lda #$ff
sta $d40e
sta $d40f
lda #$80
sta $d412 ; noise waveform
lda #$be
jsr clearcolorram
!ifdef userasterirq {
jsr init_irq
jmp * ; endless loop
} else {
jmp busywait
}
!ifndef userasterirq {
busywait:
sei
-- lda #$fc ; wait for raster line $fc.
- cmp $d012
bne -
jsr scroll
lda $dc01 ; spacebar pressed?
cmp #$ff
beq --
lda $d011 ; restore scroll offset
and #%11111000
ora #%00000011
sta $d011
!if screen1 != $0400 {
lda $d018 ; restore original screen mem if other was used
and #%00001111
ora #($0400 / 1024) << 4
sta $d018
}
cli
rts
}
; --------------------------------------------------------------------------------------
; Init raster interrupt
; --------------------------------------------------------------------------------------
!ifdef userasterirq {
init_irq:
sei ; set interrupt bit, make the CPU ignore interrupt requests
lda #$40 ; wait for raster line $40.
- cmp $d012 ; don't know why I need this. Otherwise rastr_irq is only called once if
bne - ; the current raster line < $35 or > $fe
lda #%01111111
sta $dc0d ; disable timer interrupts which can be generated by the two CIA chips
sta $dd0d ; the kernal uses such an interrupt to flash the cursor and scan the keyboard, so we better
; stop it.
lda $dc0d ; by reading this two registers we negate any pending CIA irqs.
lda $dd0d ; if we don't do this, a pending CIA irq might occur after we finish setting up our irq.
; we don't want that to happen.
lda #%00000001 ; raster line triggers interrupt
sta $d01a
lda #$fc ; set rasterline where interrupt shall occur
sta $d012
lda $d011 ; clear high bit
and #%01111111
sta $d011
lda #$35 ; we turn off the BASIC and KERNAL rom here
sta $01 ; the cpu now sees RAM everywhere except at $d000-$e000, where still the registers of
; SID/VICII/etc are visible
lda #<rastr_irq ; this is how we set up
sta $fffe ; the address of our interrupt code
lda #>rastr_irq
sta $ffff
cli ; clear interrupt flag, allowing the CPU to respond to interrupt requests
rts
}
; --------------------------------------------------------------------------------------
; Raster interrupt
; --------------------------------------------------------------------------------------
!ifdef userasterirq {
rastr_irq:
pha ; store register A in stack
txa
pha ; store register X in stack
tya
pha ; store register Y in stack
asl $d019 ; IRQ bestätigen
jsr scroll
pla
tay ; restore register Y from stack (remember stack is FIFO: First In First Out)
pla
tax ; restore register X from stack
pla ; restore register A from stack
rti ; Return From Interrupt, this will load into the Program Counter register the address
; where the CPU was when the interrupt condition arised which will make the CPU continue
; the code it was interrupted at also restores the status register of the CPU
}
; --------------------------------------------------------------------------------------
; Smooth scrolling
; --------------------------------------------------------------------------------------
scroll:
!ifdef debuglines {
lda #$7
sta $d020 ; change border colour to yellow
}
lda $d011
and #%111
tax
dex
bmi +
dec $d011
jmp ++
+ lda $d011
ora #%111
sta $d011
jsr shiftup
jsr newline
++
!ifdef debuglines {
lda #$0
sta $d020 ; change border colour to black
}
rts
newline:
; fill last line with random chars
ldx #39
- lda $d41b
ror
lda #77
adc #0
sta screen1+40*24,x
dex
bpl -
rts
shiftup:
; Shift the screen memory one row up.
; We do this in blocks of 10*25 bytes.
clc
lda #0
- tax
lda screen1+40+000,x
sta screen1+00+000,x
lda screen1+41+000,x
sta screen1+01+000,x
lda screen1+42+000,x
sta screen1+02+000,x
lda screen1+43+000,x
sta screen1+03+000,x
lda screen1+44+000,x
sta screen1+04+000,x
lda screen1+45+000,x
sta screen1+05+000,x
lda screen1+46+000,x
sta screen1+06+000,x
lda screen1+47+000,x
sta screen1+07+000,x
lda screen1+48+000,x
sta screen1+08+000,x
lda screen1+49+000,x
sta screen1+09+000,x
txa
adc #10
cmp #250
bne -
clc
lda #0
- tax
lda screen1+40+250,x
sta screen1+00+250,x
lda screen1+41+250,x
sta screen1+01+250,x
lda screen1+42+250,x
sta screen1+02+250,x
lda screen1+43+250,x
sta screen1+03+250,x
lda screen1+44+250,x
sta screen1+04+250,x
lda screen1+45+250,x
sta screen1+05+250,x
lda screen1+46+250,x
sta screen1+06+250,x
lda screen1+47+250,x
sta screen1+07+250,x
lda screen1+48+250,x
sta screen1+08+250,x
lda screen1+49+250,x
sta screen1+09+250,x
txa
adc #10
cmp #250
bne -
clc
lda #0
- tax
lda screen1+40+500,x
sta screen1+00+500,x
lda screen1+41+500,x
sta screen1+01+500,x
lda screen1+42+500,x
sta screen1+02+500,x
lda screen1+43+500,x
sta screen1+03+500,x
lda screen1+44+500,x
sta screen1+04+500,x
lda screen1+45+500,x
sta screen1+05+500,x
lda screen1+46+500,x
sta screen1+06+500,x
lda screen1+47+500,x
sta screen1+07+500,x
lda screen1+48+500,x
sta screen1+08+500,x
lda screen1+49+500,x
sta screen1+09+500,x
txa
adc #10
cmp #250
bne -
clc
lda #0
- tax
lda screen1+40+750,x
sta screen1+00+750,x
lda screen1+41+750,x
sta screen1+01+750,x
lda screen1+42+750,x
sta screen1+02+750,x
lda screen1+43+750,x
sta screen1+03+750,x
lda screen1+44+750,x
sta screen1+04+750,x
lda screen1+45+750,x
sta screen1+05+750,x
lda screen1+46+750,x
sta screen1+06+750,x
lda screen1+47+750,x
sta screen1+07+750,x
lda screen1+48+750,x
sta screen1+08+750,x
lda screen1+49+750,x
sta screen1+09+750,x
txa
adc #10
cmp #210
bne -
rts
; --------------------------------------------------------------------------------------
; Misc routines
; --------------------------------------------------------------------------------------
clearcolorram:
ldx #250
- dex ; this sets Z flags if last round
sta $d800+000,x
sta $d800+250,x
sta $d800+500,x
sta $d800+750,x
bne -
rts
!if 0 {
fillscreen:
lda #$be
jsr clearcolorram
lda #0
sta .f
lda #<screen1
sta .faddr+1
lda #>screen1
sta .faddr+2
ldy #25-1
.lp inc .f
lda .f
ldx #40-1
.faddr sta screen1,x
dex
bpl .faddr
lda .faddr+1
clc
adc #40
sta .faddr+1
bcc +
inc .faddr+2
+ dey
bpl .lp
rts
.f !byte 0
}
|
test/Succeed/Issue4291.agda
|
cruhland/agda
| 1,989 |
8474
|
<filename>test/Succeed/Issue4291.agda
open import Agda.Builtin.Equality
open import Agda.Builtin.Reflection renaming (bindTC to _>>=_)
open import Agda.Builtin.String
open import Agda.Builtin.List
open import Agda.Builtin.Unit
impNames : Term → List String
impNames (pi (arg (arg-info hidden _) _) (abs x b)) = x ∷ impNames b
impNames _ = []
macro
implicits : Name → Term → TC ⊤
implicits x hole = do
t ← getType x
i ← quoteTC (impNames t)
unify hole i
variable
A : Set₁
x : A
postulate
f : (B : Set) → B ≡ B → Set
g : f _ x ≡ f _ x
g = refl
_ : implicits g ≡ "x.A.1" ∷ "x" ∷ []
_ = refl
postulate
F : Set → Set₁
P : {x : Set} → F x → Set
Q : {x : Set₁} → x → Set
p : P x
q : Q x
_ : implicits p ≡ "x.A.1" ∷ "x" ∷ []
_ = refl
_ : implicits q ≡ "x.A" ∷ "x" ∷ []
_ = refl
fails : (A : Set) (f : F A) → P f
fails A f = p {x = f}
|
alloy4fun_models/trashltl/models/5/vYzkBfmqPkMNhtjdY.als
|
Kaixi26/org.alloytools.alloy
| 0 |
347
|
<reponame>Kaixi26/org.alloytools.alloy
open main
pred idvYzkBfmqPkMNhtjdY_prop6 {
always all t : File | t in Trash since t in Trash
}
pred __repair { idvYzkBfmqPkMNhtjdY_prop6 }
check __repair { idvYzkBfmqPkMNhtjdY_prop6 <=> prop6o }
|
test/Fail/Issue5201.agda
|
cruhland/agda
| 1,989 |
16189
|
apply :
∀ {a b} {A : Set a} {B : A → Set b} →
((x : A) → B x) → (x : A) → B x
apply f x = f x
syntax apply f x = f x
|
RecursiveTypes/Subtyping/Axiomatic/Coinductive.agda
|
nad/codata
| 1 |
17159
|
<filename>RecursiveTypes/Subtyping/Axiomatic/Coinductive.agda
------------------------------------------------------------------------
-- Coinductive axiomatisation of subtyping
------------------------------------------------------------------------
module RecursiveTypes.Subtyping.Axiomatic.Coinductive where
import Data.Empty as E
open import Data.Fin using (Fin; zero; suc)
open import Data.Nat using (ℕ; zero; suc)
open import Codata.Musical.Notation
open import Relation.Nullary
open import RecursiveTypes.Syntax
open import RecursiveTypes.Substitution
open import RecursiveTypes.Semantics
open import RecursiveTypes.Subtyping.Semantic.Coinductive as Sem
using (_≤∞P_; _≤Coind_; ⟦_⟧P; ⌜_⌝; ⊥; ⊤; var; _⟶_; _≤⟨_⟩_)
------------------------------------------------------------------------
-- Definition
-- This definition uses mixed induction and coinduction. Induction is
-- used for rules like transitivity, whereas coinduction is used for
-- structural rules. <NAME> observed in Types and Programming
-- Languages that coinductive inference systems cannot be
-- "declarative" (including rules like transitivity); they can be
-- "algorithmic" (syntax-directed), though. However, by mixing
-- induction and coinduction one can combine the benefits of
-- coinduction and declarative inference systems.
infixr 10 _⟶_
infix 4 _≤_
infix 3 _∎
infixr 2 _≤⟨_⟩_
data _≤_ {n} : Ty n → Ty n → Set where
-- Structural rules. Note that the rule for _⟶_ is coinductive.
⊥ : ∀ {τ} → ⊥ ≤ τ
⊤ : ∀ {σ} → σ ≤ ⊤
_⟶_ : ∀ {σ₁ σ₂ τ₁ τ₂} (τ₁≤σ₁ : ∞ (τ₁ ≤ σ₁)) (σ₂≤τ₂ : ∞ (σ₂ ≤ τ₂)) →
σ₁ ⟶ σ₂ ≤ τ₁ ⟶ τ₂
-- Rules for folding and unfolding μ.
unfold : ∀ {τ₁ τ₂} → μ τ₁ ⟶ τ₂ ≤ unfold[μ τ₁ ⟶ τ₂ ]
fold : ∀ {τ₁ τ₂} → unfold[μ τ₁ ⟶ τ₂ ] ≤ μ τ₁ ⟶ τ₂
-- Reflexivity.
_∎ : ∀ τ → τ ≤ τ
-- Transitivity.
_≤⟨_⟩_ : ∀ τ₁ {τ₂ τ₃} (τ₁≤τ₂ : τ₁ ≤ τ₂) (τ₂≤τ₃ : τ₂ ≤ τ₃) → τ₁ ≤ τ₃
------------------------------------------------------------------------
-- Equivalence
-- The axiomatisation is equivalent to the semantic definitions of
-- subtyping.
soundP : ∀ {n} {σ τ : Ty n} → σ ≤ τ → ⟦ σ ⟧ ≤∞P ⟦ τ ⟧
soundP ⊥ = ⊥
soundP ⊤ = ⊤
soundP (τ₁≤σ₁ ⟶ σ₂≤τ₂) = ♯ soundP (♭ τ₁≤σ₁) ⟶ ♯ soundP (♭ σ₂≤τ₂)
soundP unfold = ⌜ Sem.unfold ⌝
soundP fold = ⌜ Sem.fold ⌝
soundP (τ ∎) = ⌜ Sem.refl∞ _ ⌝
soundP (τ₁ ≤⟨ τ₁≤τ₂ ⟩ τ₂≤τ₃) = _ ≤⟨ soundP τ₁≤τ₂ ⟩ soundP τ₂≤τ₃
sound : ∀ {n} {σ τ : Ty n} → σ ≤ τ → σ ≤Coind τ
sound σ≤τ = ⟦ soundP σ≤τ ⟧P
complete : ∀ {n} (σ τ : Ty n) → σ ≤Coind τ → σ ≤ τ
complete ⊥ _ _ = ⊥
complete _ ⊤ _ = ⊤
complete ⊤ ⊥ ()
complete ⊤ (var x) ()
complete ⊤ (σ ⟶ τ) ()
complete ⊤ (μ σ ⟶ τ) ()
complete (var x) ⊥ ()
complete (var x) (var .x) var = var x ∎
complete (var x) (σ ⟶ τ) ()
complete (var x) (μ σ ⟶ τ) ()
complete (σ₁ ⟶ σ₂) ⊥ ()
complete (σ₁ ⟶ σ₂) (var x) ()
complete (σ₁ ⟶ σ₂) (τ₁ ⟶ τ₂) (τ₁≤σ₁ ⟶ σ₂≤τ₂) =
♯ complete τ₁ σ₁ (♭ τ₁≤σ₁) ⟶ ♯ complete σ₂ τ₂ (♭ σ₂≤τ₂)
complete (σ₁ ⟶ σ₂) (μ τ₁ ⟶ τ₂) (τ₁≤σ₁ ⟶ σ₂≤τ₂) =
σ₁ ⟶ σ₂ ≤⟨ ♯ complete _ _ (♭ τ₁≤σ₁) ⟶
♯ complete _ _ (♭ σ₂≤τ₂) ⟩
unfold[μ τ₁ ⟶ τ₂ ] ≤⟨ fold ⟩
μ τ₁ ⟶ τ₂ ∎
complete (μ σ₁ ⟶ σ₂) ⊥ ()
complete (μ σ₁ ⟶ σ₂) (var x) ()
complete (μ σ₁ ⟶ σ₂) (τ₁ ⟶ τ₂) (τ₁≤σ₁ ⟶ σ₂≤τ₂) =
μ σ₁ ⟶ σ₂ ≤⟨ unfold ⟩
unfold[μ σ₁ ⟶ σ₂ ] ≤⟨ ♯ complete _ _ (♭ τ₁≤σ₁) ⟶
♯ complete _ _ (♭ σ₂≤τ₂) ⟩
(τ₁ ⟶ τ₂) ∎
complete (μ σ₁ ⟶ σ₂) (μ τ₁ ⟶ τ₂) (τ₁≤σ₁ ⟶ σ₂≤τ₂) =
μ σ₁ ⟶ σ₂ ≤⟨ unfold ⟩
unfold[μ σ₁ ⟶ σ₂ ] ≤⟨ ♯ complete _ _ (♭ τ₁≤σ₁) ⟶
♯ complete _ _ (♭ σ₂≤τ₂) ⟩
unfold[μ τ₁ ⟶ τ₂ ] ≤⟨ fold ⟩
μ τ₁ ⟶ τ₂ ∎
------------------------------------------------------------------------
-- The reflexivity constructor is essential
-- Minor point: the constructor _∎ cannot be omitted. In
-- RecursiveTypes.Subtyping.Axiomatic.Incorrect it is shown that
-- _≤⟨_⟩_ is also essential.
module ∎-Is-Essential where
infixr 10 _⟶_
infix 4 _≤′_
infixr 2 _≤⟨_⟩_
data _≤′_ {n} : Ty n → Ty n → Set where
⊥ : ∀ {τ} → ⊥ ≤′ τ
⊤ : ∀ {σ} → σ ≤′ ⊤
_⟶_ : ∀ {σ₁ σ₂ τ₁ τ₂}
(τ₁≤σ₁ : ∞ (τ₁ ≤′ σ₁)) (σ₂≤τ₂ : ∞ (σ₂ ≤′ τ₂)) →
σ₁ ⟶ σ₂ ≤′ τ₁ ⟶ τ₂
unfold : ∀ {τ₁ τ₂} → μ τ₁ ⟶ τ₂ ≤′ unfold[μ τ₁ ⟶ τ₂ ]
fold : ∀ {τ₁ τ₂} → unfold[μ τ₁ ⟶ τ₂ ] ≤′ μ τ₁ ⟶ τ₂
_≤⟨_⟩_ : ∀ τ₁ {τ₂ τ₃}
(τ₁≤τ₂ : τ₁ ≤′ τ₂) (τ₂≤τ₃ : τ₂ ≤′ τ₃) → τ₁ ≤′ τ₃
sound′ : ∀ {n} {σ τ : Ty n} → σ ≤′ τ → σ ≤ τ
sound′ ⊥ = ⊥
sound′ ⊤ = ⊤
sound′ (τ₁≤σ₁ ⟶ σ₂≤τ₂) = ♯ sound′ (♭ τ₁≤σ₁) ⟶ ♯ sound′ (♭ σ₂≤τ₂)
sound′ unfold = unfold
sound′ fold = fold
sound′ (_ ≤⟨ τ₁≤τ₂ ⟩ τ₂≤τ₃) = _ ≤⟨ sound′ τ₁≤τ₂ ⟩ sound′ τ₂≤τ₃
x : Ty 1
x = var zero
x≰′x : ¬ x ≤′ x
x≰′x (.x ≤⟨ x≤′σ ⟩ σ≤x) = helper x≤′σ σ≤x
where
helper : ∀ {σ} → x ≤′ σ → σ ≤′ x → E.⊥
helper (.x ≤⟨ x≤σ₁ ⟩ σ₁≤σ₂) σ₂≤′x = helper x≤σ₁ (_ ≤⟨ σ₁≤σ₂ ⟩ σ₂≤′x)
helper ⊤ ⊤≤′x with sound (sound′ ⊤≤′x)
... | ()
incomplete : ¬ (∀ {n} {σ τ : Ty n} → σ ≤ τ → σ ≤′ τ)
incomplete hyp with x≰′x (hyp (x ∎))
... | ()
|
bin/zoom-mute-status.scpt
|
jbarr21/dotfiles
| 2 |
4159
|
property btnTitle : "Mute audio"
if application "zoom.us" is running then
tell application "System Events"
tell application process "zoom.us"
if exists (menu item btnTitle of menu 1 of menu bar item "Meeting" of menu bar 1) then
set returnValue to "unmuted"
else
set returnValue to "muted"
end if
end tell
end tell
else
set returnValue to "closed"
end if
return returnValue
|
sh.asm
|
romulomrossi/StrideSchedulerForXV6
| 0 |
15043
|
<reponame>romulomrossi/StrideSchedulerForXV6
_sh: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
return 0;
}
int
main(void)
{
0: 8d 4c 24 04 lea 0x4(%esp),%ecx
4: 83 e4 f0 and $0xfffffff0,%esp
7: ff 71 fc pushl -0x4(%ecx)
a: 55 push %ebp
b: 89 e5 mov %esp,%ebp
d: 51 push %ecx
e: 83 ec 04 sub $0x4,%esp
static char buf[100];
int fd;
// Ensure that three file descriptors are open.
while((fd = open("console", O_RDWR)) >= 0){
11: eb 0e jmp 21 <main+0x21>
13: 90 nop
14: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(fd >= 3){
18: 83 f8 02 cmp $0x2,%eax
1b: 0f 8f c9 00 00 00 jg ea <main+0xea>
{
static char buf[100];
int fd;
// Ensure that three file descriptors are open.
while((fd = open("console", O_RDWR)) >= 0){
21: 83 ec 08 sub $0x8,%esp
24: 6a 02 push $0x2
26: 68 11 12 00 00 push $0x1211
2b: e8 02 0d 00 00 call d32 <open>
30: 83 c4 10 add $0x10,%esp
33: 85 c0 test %eax,%eax
35: 79 e1 jns 18 <main+0x18>
37: eb 25 jmp 5e <main+0x5e>
39: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
}
}
// Read and run input commands.
while(getcmd(buf, sizeof(buf)) >= 0){
if(buf[0] == 'c' && buf[1] == 'd' && buf[2] == ' '){
40: 80 3d 22 18 00 00 20 cmpb $0x20,0x1822
47: 74 60 je a9 <main+0xa9>
49: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
buf[strlen(buf)-1] = 0; // chop \n
if(chdir(buf+3) < 0)
printf(2, "cannot cd %s\n", buf+3);
continue;
}
if(fork1() == 0)
50: e8 1b 01 00 00 call 170 <fork1>
55: 85 c0 test %eax,%eax
57: 74 36 je 8f <main+0x8f>
runcmd(parsecmd(buf));
wait();
59: e8 9c 0c 00 00 call cfa <wait>
break;
}
}
// Read and run input commands.
while(getcmd(buf, sizeof(buf)) >= 0){
5e: 83 ec 08 sub $0x8,%esp
61: 6a 64 push $0x64
63: 68 20 18 00 00 push $0x1820
68: e8 93 00 00 00 call 100 <getcmd>
6d: 83 c4 10 add $0x10,%esp
70: 85 c0 test %eax,%eax
72: 78 30 js a4 <main+0xa4>
if(buf[0] == 'c' && buf[1] == 'd' && buf[2] == ' '){
74: 80 3d 20 18 00 00 63 cmpb $0x63,0x1820
7b: 75 d3 jne 50 <main+0x50>
7d: 80 3d 21 18 00 00 64 cmpb $0x64,0x1821
84: 74 ba je 40 <main+0x40>
buf[strlen(buf)-1] = 0; // chop \n
if(chdir(buf+3) < 0)
printf(2, "cannot cd %s\n", buf+3);
continue;
}
if(fork1() == 0)
86: e8 e5 00 00 00 call 170 <fork1>
8b: 85 c0 test %eax,%eax
8d: 75 ca jne 59 <main+0x59>
runcmd(parsecmd(buf));
8f: 83 ec 0c sub $0xc,%esp
92: 68 20 18 00 00 push $0x1820
97: e8 a4 09 00 00 call a40 <parsecmd>
9c: 89 04 24 mov %eax,(%esp)
9f: e8 fc 00 00 00 call 1a0 <runcmd>
wait();
}
exit();
a4: e8 49 0c 00 00 call cf2 <exit>
// Read and run input commands.
while(getcmd(buf, sizeof(buf)) >= 0){
if(buf[0] == 'c' && buf[1] == 'd' && buf[2] == ' '){
// Chdir must be called by the parent, not the child.
buf[strlen(buf)-1] = 0; // chop \n
a9: 83 ec 0c sub $0xc,%esp
ac: 68 20 18 00 00 push $0x1820
b1: e8 7a 0a 00 00 call b30 <strlen>
if(chdir(buf+3) < 0)
b6: c7 04 24 23 18 00 00 movl $0x1823,(%esp)
// Read and run input commands.
while(getcmd(buf, sizeof(buf)) >= 0){
if(buf[0] == 'c' && buf[1] == 'd' && buf[2] == ' '){
// Chdir must be called by the parent, not the child.
buf[strlen(buf)-1] = 0; // chop \n
bd: c6 80 1f 18 00 00 00 movb $0x0,0x181f(%eax)
if(chdir(buf+3) < 0)
c4: e8 99 0c 00 00 call d62 <chdir>
c9: 83 c4 10 add $0x10,%esp
cc: 85 c0 test %eax,%eax
ce: 79 8e jns 5e <main+0x5e>
printf(2, "cannot cd %s\n", buf+3);
d0: 50 push %eax
d1: 68 23 18 00 00 push $0x1823
d6: 68 19 12 00 00 push $0x1219
db: 6a 02 push $0x2
dd: e8 6e 0d 00 00 call e50 <printf>
e2: 83 c4 10 add $0x10,%esp
e5: e9 74 ff ff ff jmp 5e <main+0x5e>
int fd;
// Ensure that three file descriptors are open.
while((fd = open("console", O_RDWR)) >= 0){
if(fd >= 3){
close(fd);
ea: 83 ec 0c sub $0xc,%esp
ed: 50 push %eax
ee: e8 27 0c 00 00 call d1a <close>
break;
f3: 83 c4 10 add $0x10,%esp
f6: e9 63 ff ff ff jmp 5e <main+0x5e>
fb: 66 90 xchg %ax,%ax
fd: 66 90 xchg %ax,%ax
ff: 90 nop
00000100 <getcmd>:
exit();
}
int
getcmd(char *buf, int nbuf)
{
100: 55 push %ebp
101: 89 e5 mov %esp,%ebp
103: 56 push %esi
104: 53 push %ebx
105: 8b 75 0c mov 0xc(%ebp),%esi
108: 8b 5d 08 mov 0x8(%ebp),%ebx
printf(2, "$ ");
10b: 83 ec 08 sub $0x8,%esp
10e: 68 70 11 00 00 push $0x1170
113: 6a 02 push $0x2
115: e8 36 0d 00 00 call e50 <printf>
memset(buf, 0, nbuf);
11a: 83 c4 0c add $0xc,%esp
11d: 56 push %esi
11e: 6a 00 push $0x0
120: 53 push %ebx
121: e8 3a 0a 00 00 call b60 <memset>
gets(buf, nbuf);
126: 58 pop %eax
127: 5a pop %edx
128: 56 push %esi
129: 53 push %ebx
12a: e8 91 0a 00 00 call bc0 <gets>
12f: 83 c4 10 add $0x10,%esp
132: 31 c0 xor %eax,%eax
134: 80 3b 00 cmpb $0x0,(%ebx)
137: 0f 94 c0 sete %al
if(buf[0] == 0) // EOF
return -1;
return 0;
}
13a: 8d 65 f8 lea -0x8(%ebp),%esp
13d: f7 d8 neg %eax
13f: 5b pop %ebx
140: 5e pop %esi
141: 5d pop %ebp
142: c3 ret
143: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
149: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000150 <panic>:
exit();
}
void
panic(char *s)
{
150: 55 push %ebp
151: 89 e5 mov %esp,%ebp
153: 83 ec 0c sub $0xc,%esp
printf(2, "%s\n", s);
156: ff 75 08 pushl 0x8(%ebp)
159: 68 0d 12 00 00 push $0x120d
15e: 6a 02 push $0x2
160: e8 eb 0c 00 00 call e50 <printf>
exit();
165: e8 88 0b 00 00 call cf2 <exit>
16a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
00000170 <fork1>:
}
int
fork1(void)
{
170: 55 push %ebp
171: 89 e5 mov %esp,%ebp
173: 83 ec 14 sub $0x14,%esp
int pid;
pid = fork(DEFAULT_PROC_TICKETS);
176: 6a 14 push $0x14
178: e8 6d 0b 00 00 call cea <fork>
if(pid == -1)
17d: 83 c4 10 add $0x10,%esp
180: 83 f8 ff cmp $0xffffffff,%eax
183: 74 02 je 187 <fork1+0x17>
panic("fork");
return pid;
}
185: c9 leave
186: c3 ret
{
int pid;
pid = fork(DEFAULT_PROC_TICKETS);
if(pid == -1)
panic("fork");
187: 83 ec 0c sub $0xc,%esp
18a: 68 73 11 00 00 push $0x1173
18f: e8 bc ff ff ff call 150 <panic>
194: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
19a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
000001a0 <runcmd>:
struct cmd *parsecmd(char*);
// Execute cmd. Never returns.
void
runcmd(struct cmd *cmd)
{
1a0: 55 push %ebp
1a1: 89 e5 mov %esp,%ebp
1a3: 53 push %ebx
1a4: 83 ec 14 sub $0x14,%esp
1a7: 8b 5d 08 mov 0x8(%ebp),%ebx
struct execcmd *ecmd;
struct listcmd *lcmd;
struct pipecmd *pcmd;
struct redircmd *rcmd;
if(cmd == 0)
1aa: 85 db test %ebx,%ebx
1ac: 74 64 je 212 <runcmd+0x72>
exit();
switch(cmd->type){
1ae: 83 3b 05 cmpl $0x5,(%ebx)
1b1: 0f 87 d8 00 00 00 ja 28f <runcmd+0xef>
1b7: 8b 03 mov (%ebx),%eax
1b9: ff 24 85 28 12 00 00 jmp *0x1228(,%eax,4)
runcmd(lcmd->right);
break;
case PIPE:
pcmd = (struct pipecmd*)cmd;
if(pipe(p) < 0)
1c0: 8d 45 f0 lea -0x10(%ebp),%eax
1c3: 83 ec 0c sub $0xc,%esp
1c6: 50 push %eax
1c7: e8 36 0b 00 00 call d02 <pipe>
1cc: 83 c4 10 add $0x10,%esp
1cf: 85 c0 test %eax,%eax
1d1: 0f 88 c5 00 00 00 js 29c <runcmd+0xfc>
panic("pipe");
if(fork1() == 0){
1d7: e8 94 ff ff ff call 170 <fork1>
1dc: 85 c0 test %eax,%eax
1de: 0f 84 08 01 00 00 je 2ec <runcmd+0x14c>
dup(p[1]);
close(p[0]);
close(p[1]);
runcmd(pcmd->left);
}
if(fork1() == 0){
1e4: e8 87 ff ff ff call 170 <fork1>
1e9: 85 c0 test %eax,%eax
1eb: 0f 84 cd 00 00 00 je 2be <runcmd+0x11e>
dup(p[0]);
close(p[0]);
close(p[1]);
runcmd(pcmd->right);
}
close(p[0]);
1f1: 83 ec 0c sub $0xc,%esp
1f4: ff 75 f0 pushl -0x10(%ebp)
1f7: e8 1e 0b 00 00 call d1a <close>
close(p[1]);
1fc: 58 pop %eax
1fd: ff 75 f4 pushl -0xc(%ebp)
200: e8 15 0b 00 00 call d1a <close>
wait();
205: e8 f0 0a 00 00 call cfa <wait>
wait();
20a: e8 eb 0a 00 00 call cfa <wait>
break;
20f: 83 c4 10 add $0x10,%esp
struct listcmd *lcmd;
struct pipecmd *pcmd;
struct redircmd *rcmd;
if(cmd == 0)
exit();
212: e8 db 0a 00 00 call cf2 <exit>
wait();
break;
case BACK:
bcmd = (struct backcmd*)cmd;
if(fork1() == 0)
217: e8 54 ff ff ff call 170 <fork1>
21c: 85 c0 test %eax,%eax
21e: 75 f2 jne 212 <runcmd+0x72>
220: eb 62 jmp 284 <runcmd+0xe4>
default:
panic("runcmd");
case EXEC:
ecmd = (struct execcmd*)cmd;
if(ecmd->argv[0] == 0)
222: 8b 43 04 mov 0x4(%ebx),%eax
225: 85 c0 test %eax,%eax
227: 74 e9 je 212 <runcmd+0x72>
exit();
exec(ecmd->argv[0], ecmd->argv);
229: 52 push %edx
22a: 52 push %edx
22b: 8d 53 04 lea 0x4(%ebx),%edx
22e: 52 push %edx
22f: 50 push %eax
230: e8 f5 0a 00 00 call d2a <exec>
printf(2, "exec %s failed\n", ecmd->argv[0]);
235: 83 c4 0c add $0xc,%esp
238: ff 73 04 pushl 0x4(%ebx)
23b: 68 7f 11 00 00 push $0x117f
240: 6a 02 push $0x2
242: e8 09 0c 00 00 call e50 <printf>
break;
247: 83 c4 10 add $0x10,%esp
24a: eb c6 jmp 212 <runcmd+0x72>
runcmd(rcmd->cmd);
break;
case LIST:
lcmd = (struct listcmd*)cmd;
if(fork1() == 0)
24c: e8 1f ff ff ff call 170 <fork1>
251: 85 c0 test %eax,%eax
253: 74 2f je 284 <runcmd+0xe4>
runcmd(lcmd->left);
wait();
255: e8 a0 0a 00 00 call cfa <wait>
runcmd(lcmd->right);
25a: 83 ec 0c sub $0xc,%esp
25d: ff 73 08 pushl 0x8(%ebx)
260: e8 3b ff ff ff call 1a0 <runcmd>
printf(2, "exec %s failed\n", ecmd->argv[0]);
break;
case REDIR:
rcmd = (struct redircmd*)cmd;
close(rcmd->fd);
265: 83 ec 0c sub $0xc,%esp
268: ff 73 14 pushl 0x14(%ebx)
26b: e8 aa 0a 00 00 call d1a <close>
if(open(rcmd->file, rcmd->mode) < 0){
270: 59 pop %ecx
271: 58 pop %eax
272: ff 73 10 pushl 0x10(%ebx)
275: ff 73 08 pushl 0x8(%ebx)
278: e8 b5 0a 00 00 call d32 <open>
27d: 83 c4 10 add $0x10,%esp
280: 85 c0 test %eax,%eax
282: 78 25 js 2a9 <runcmd+0x109>
break;
case BACK:
bcmd = (struct backcmd*)cmd;
if(fork1() == 0)
runcmd(bcmd->cmd);
284: 83 ec 0c sub $0xc,%esp
287: ff 73 04 pushl 0x4(%ebx)
28a: e8 11 ff ff ff call 1a0 <runcmd>
if(cmd == 0)
exit();
switch(cmd->type){
default:
panic("runcmd");
28f: 83 ec 0c sub $0xc,%esp
292: 68 78 11 00 00 push $0x1178
297: e8 b4 fe ff ff call 150 <panic>
break;
case PIPE:
pcmd = (struct pipecmd*)cmd;
if(pipe(p) < 0)
panic("pipe");
29c: 83 ec 0c sub $0xc,%esp
29f: 68 9f 11 00 00 push $0x119f
2a4: e8 a7 fe ff ff call 150 <panic>
case REDIR:
rcmd = (struct redircmd*)cmd;
close(rcmd->fd);
if(open(rcmd->file, rcmd->mode) < 0){
printf(2, "open %s failed\n", rcmd->file);
2a9: 52 push %edx
2aa: ff 73 08 pushl 0x8(%ebx)
2ad: 68 8f 11 00 00 push $0x118f
2b2: 6a 02 push $0x2
2b4: e8 97 0b 00 00 call e50 <printf>
exit();
2b9: e8 34 0a 00 00 call cf2 <exit>
close(p[0]);
close(p[1]);
runcmd(pcmd->left);
}
if(fork1() == 0){
close(0);
2be: 83 ec 0c sub $0xc,%esp
2c1: 6a 00 push $0x0
2c3: e8 52 0a 00 00 call d1a <close>
dup(p[0]);
2c8: 5a pop %edx
2c9: ff 75 f0 pushl -0x10(%ebp)
2cc: e8 99 0a 00 00 call d6a <dup>
close(p[0]);
2d1: 59 pop %ecx
2d2: ff 75 f0 pushl -0x10(%ebp)
2d5: e8 40 0a 00 00 call d1a <close>
close(p[1]);
2da: 58 pop %eax
2db: ff 75 f4 pushl -0xc(%ebp)
2de: e8 37 0a 00 00 call d1a <close>
runcmd(pcmd->right);
2e3: 58 pop %eax
2e4: ff 73 08 pushl 0x8(%ebx)
2e7: e8 b4 fe ff ff call 1a0 <runcmd>
case PIPE:
pcmd = (struct pipecmd*)cmd;
if(pipe(p) < 0)
panic("pipe");
if(fork1() == 0){
close(1);
2ec: 83 ec 0c sub $0xc,%esp
2ef: 6a 01 push $0x1
2f1: e8 24 0a 00 00 call d1a <close>
dup(p[1]);
2f6: 58 pop %eax
2f7: ff 75 f4 pushl -0xc(%ebp)
2fa: e8 6b 0a 00 00 call d6a <dup>
close(p[0]);
2ff: 58 pop %eax
300: ff 75 f0 pushl -0x10(%ebp)
303: e8 12 0a 00 00 call d1a <close>
close(p[1]);
308: 58 pop %eax
309: ff 75 f4 pushl -0xc(%ebp)
30c: e8 09 0a 00 00 call d1a <close>
runcmd(pcmd->left);
311: 58 pop %eax
312: ff 73 04 pushl 0x4(%ebx)
315: e8 86 fe ff ff call 1a0 <runcmd>
31a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
00000320 <execcmd>:
//PAGEBREAK!
// Constructors
struct cmd*
execcmd(void)
{
320: 55 push %ebp
321: 89 e5 mov %esp,%ebp
323: 53 push %ebx
324: 83 ec 10 sub $0x10,%esp
struct execcmd *cmd;
cmd = malloc(sizeof(*cmd));
327: 6a 54 push $0x54
329: e8 52 0d 00 00 call 1080 <malloc>
memset(cmd, 0, sizeof(*cmd));
32e: 83 c4 0c add $0xc,%esp
struct cmd*
execcmd(void)
{
struct execcmd *cmd;
cmd = malloc(sizeof(*cmd));
331: 89 c3 mov %eax,%ebx
memset(cmd, 0, sizeof(*cmd));
333: 6a 54 push $0x54
335: 6a 00 push $0x0
337: 50 push %eax
338: e8 23 08 00 00 call b60 <memset>
cmd->type = EXEC;
33d: c7 03 01 00 00 00 movl $0x1,(%ebx)
return (struct cmd*)cmd;
}
343: 89 d8 mov %ebx,%eax
345: 8b 5d fc mov -0x4(%ebp),%ebx
348: c9 leave
349: c3 ret
34a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
00000350 <redircmd>:
struct cmd*
redircmd(struct cmd *subcmd, char *file, char *efile, int mode, int fd)
{
350: 55 push %ebp
351: 89 e5 mov %esp,%ebp
353: 53 push %ebx
354: 83 ec 10 sub $0x10,%esp
struct redircmd *cmd;
cmd = malloc(sizeof(*cmd));
357: 6a 18 push $0x18
359: e8 22 0d 00 00 call 1080 <malloc>
memset(cmd, 0, sizeof(*cmd));
35e: 83 c4 0c add $0xc,%esp
struct cmd*
redircmd(struct cmd *subcmd, char *file, char *efile, int mode, int fd)
{
struct redircmd *cmd;
cmd = malloc(sizeof(*cmd));
361: 89 c3 mov %eax,%ebx
memset(cmd, 0, sizeof(*cmd));
363: 6a 18 push $0x18
365: 6a 00 push $0x0
367: 50 push %eax
368: e8 f3 07 00 00 call b60 <memset>
cmd->type = REDIR;
cmd->cmd = subcmd;
36d: 8b 45 08 mov 0x8(%ebp),%eax
{
struct redircmd *cmd;
cmd = malloc(sizeof(*cmd));
memset(cmd, 0, sizeof(*cmd));
cmd->type = REDIR;
370: c7 03 02 00 00 00 movl $0x2,(%ebx)
cmd->cmd = subcmd;
376: 89 43 04 mov %eax,0x4(%ebx)
cmd->file = file;
379: 8b 45 0c mov 0xc(%ebp),%eax
37c: 89 43 08 mov %eax,0x8(%ebx)
cmd->efile = efile;
37f: 8b 45 10 mov 0x10(%ebp),%eax
382: 89 43 0c mov %eax,0xc(%ebx)
cmd->mode = mode;
385: 8b 45 14 mov 0x14(%ebp),%eax
388: 89 43 10 mov %eax,0x10(%ebx)
cmd->fd = fd;
38b: 8b 45 18 mov 0x18(%ebp),%eax
38e: 89 43 14 mov %eax,0x14(%ebx)
return (struct cmd*)cmd;
}
391: 89 d8 mov %ebx,%eax
393: 8b 5d fc mov -0x4(%ebp),%ebx
396: c9 leave
397: c3 ret
398: 90 nop
399: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
000003a0 <pipecmd>:
struct cmd*
pipecmd(struct cmd *left, struct cmd *right)
{
3a0: 55 push %ebp
3a1: 89 e5 mov %esp,%ebp
3a3: 53 push %ebx
3a4: 83 ec 10 sub $0x10,%esp
struct pipecmd *cmd;
cmd = malloc(sizeof(*cmd));
3a7: 6a 0c push $0xc
3a9: e8 d2 0c 00 00 call 1080 <malloc>
memset(cmd, 0, sizeof(*cmd));
3ae: 83 c4 0c add $0xc,%esp
struct cmd*
pipecmd(struct cmd *left, struct cmd *right)
{
struct pipecmd *cmd;
cmd = malloc(sizeof(*cmd));
3b1: 89 c3 mov %eax,%ebx
memset(cmd, 0, sizeof(*cmd));
3b3: 6a 0c push $0xc
3b5: 6a 00 push $0x0
3b7: 50 push %eax
3b8: e8 a3 07 00 00 call b60 <memset>
cmd->type = PIPE;
cmd->left = left;
3bd: 8b 45 08 mov 0x8(%ebp),%eax
{
struct pipecmd *cmd;
cmd = malloc(sizeof(*cmd));
memset(cmd, 0, sizeof(*cmd));
cmd->type = PIPE;
3c0: c7 03 03 00 00 00 movl $0x3,(%ebx)
cmd->left = left;
3c6: 89 43 04 mov %eax,0x4(%ebx)
cmd->right = right;
3c9: 8b 45 0c mov 0xc(%ebp),%eax
3cc: 89 43 08 mov %eax,0x8(%ebx)
return (struct cmd*)cmd;
}
3cf: 89 d8 mov %ebx,%eax
3d1: 8b 5d fc mov -0x4(%ebp),%ebx
3d4: c9 leave
3d5: c3 ret
3d6: 8d 76 00 lea 0x0(%esi),%esi
3d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000003e0 <listcmd>:
struct cmd*
listcmd(struct cmd *left, struct cmd *right)
{
3e0: 55 push %ebp
3e1: 89 e5 mov %esp,%ebp
3e3: 53 push %ebx
3e4: 83 ec 10 sub $0x10,%esp
struct listcmd *cmd;
cmd = malloc(sizeof(*cmd));
3e7: 6a 0c push $0xc
3e9: e8 92 0c 00 00 call 1080 <malloc>
memset(cmd, 0, sizeof(*cmd));
3ee: 83 c4 0c add $0xc,%esp
struct cmd*
listcmd(struct cmd *left, struct cmd *right)
{
struct listcmd *cmd;
cmd = malloc(sizeof(*cmd));
3f1: 89 c3 mov %eax,%ebx
memset(cmd, 0, sizeof(*cmd));
3f3: 6a 0c push $0xc
3f5: 6a 00 push $0x0
3f7: 50 push %eax
3f8: e8 63 07 00 00 call b60 <memset>
cmd->type = LIST;
cmd->left = left;
3fd: 8b 45 08 mov 0x8(%ebp),%eax
{
struct listcmd *cmd;
cmd = malloc(sizeof(*cmd));
memset(cmd, 0, sizeof(*cmd));
cmd->type = LIST;
400: c7 03 04 00 00 00 movl $0x4,(%ebx)
cmd->left = left;
406: 89 43 04 mov %eax,0x4(%ebx)
cmd->right = right;
409: 8b 45 0c mov 0xc(%ebp),%eax
40c: 89 43 08 mov %eax,0x8(%ebx)
return (struct cmd*)cmd;
}
40f: 89 d8 mov %ebx,%eax
411: 8b 5d fc mov -0x4(%ebp),%ebx
414: c9 leave
415: c3 ret
416: 8d 76 00 lea 0x0(%esi),%esi
419: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000420 <backcmd>:
struct cmd*
backcmd(struct cmd *subcmd)
{
420: 55 push %ebp
421: 89 e5 mov %esp,%ebp
423: 53 push %ebx
424: 83 ec 10 sub $0x10,%esp
struct backcmd *cmd;
cmd = malloc(sizeof(*cmd));
427: 6a 08 push $0x8
429: e8 52 0c 00 00 call 1080 <malloc>
memset(cmd, 0, sizeof(*cmd));
42e: 83 c4 0c add $0xc,%esp
struct cmd*
backcmd(struct cmd *subcmd)
{
struct backcmd *cmd;
cmd = malloc(sizeof(*cmd));
431: 89 c3 mov %eax,%ebx
memset(cmd, 0, sizeof(*cmd));
433: 6a 08 push $0x8
435: 6a 00 push $0x0
437: 50 push %eax
438: e8 23 07 00 00 call b60 <memset>
cmd->type = BACK;
cmd->cmd = subcmd;
43d: 8b 45 08 mov 0x8(%ebp),%eax
{
struct backcmd *cmd;
cmd = malloc(sizeof(*cmd));
memset(cmd, 0, sizeof(*cmd));
cmd->type = BACK;
440: c7 03 05 00 00 00 movl $0x5,(%ebx)
cmd->cmd = subcmd;
446: 89 43 04 mov %eax,0x4(%ebx)
return (struct cmd*)cmd;
}
449: 89 d8 mov %ebx,%eax
44b: 8b 5d fc mov -0x4(%ebp),%ebx
44e: c9 leave
44f: c3 ret
00000450 <gettoken>:
char whitespace[] = " \t\r\n\v";
char symbols[] = "<|>&;()";
int
gettoken(char **ps, char *es, char **q, char **eq)
{
450: 55 push %ebp
451: 89 e5 mov %esp,%ebp
453: 57 push %edi
454: 56 push %esi
455: 53 push %ebx
456: 83 ec 0c sub $0xc,%esp
char *s;
int ret;
s = *ps;
459: 8b 45 08 mov 0x8(%ebp),%eax
char whitespace[] = " \t\r\n\v";
char symbols[] = "<|>&;()";
int
gettoken(char **ps, char *es, char **q, char **eq)
{
45c: 8b 5d 0c mov 0xc(%ebp),%ebx
45f: 8b 75 10 mov 0x10(%ebp),%esi
char *s;
int ret;
s = *ps;
462: 8b 38 mov (%eax),%edi
while(s < es && strchr(whitespace, *s))
464: 39 df cmp %ebx,%edi
466: 72 13 jb 47b <gettoken+0x2b>
468: eb 29 jmp 493 <gettoken+0x43>
46a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
s++;
470: 83 c7 01 add $0x1,%edi
{
char *s;
int ret;
s = *ps;
while(s < es && strchr(whitespace, *s))
473: 39 fb cmp %edi,%ebx
475: 0f 84 ed 00 00 00 je 568 <gettoken+0x118>
47b: 0f be 07 movsbl (%edi),%eax
47e: 83 ec 08 sub $0x8,%esp
481: 50 push %eax
482: 68 18 18 00 00 push $0x1818
487: e8 f4 06 00 00 call b80 <strchr>
48c: 83 c4 10 add $0x10,%esp
48f: 85 c0 test %eax,%eax
491: 75 dd jne 470 <gettoken+0x20>
s++;
if(q)
493: 85 f6 test %esi,%esi
495: 74 02 je 499 <gettoken+0x49>
*q = s;
497: 89 3e mov %edi,(%esi)
ret = *s;
499: 0f be 37 movsbl (%edi),%esi
49c: 89 f1 mov %esi,%ecx
49e: 89 f0 mov %esi,%eax
switch(*s){
4a0: 80 f9 29 cmp $0x29,%cl
4a3: 7f 5b jg 500 <gettoken+0xb0>
4a5: 80 f9 28 cmp $0x28,%cl
4a8: 7d 61 jge 50b <gettoken+0xbb>
4aa: 84 c9 test %cl,%cl
4ac: 0f 85 de 00 00 00 jne 590 <gettoken+0x140>
ret = 'a';
while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s))
s++;
break;
}
if(eq)
4b2: 8b 55 14 mov 0x14(%ebp),%edx
4b5: 85 d2 test %edx,%edx
4b7: 74 05 je 4be <gettoken+0x6e>
*eq = s;
4b9: 8b 45 14 mov 0x14(%ebp),%eax
4bc: 89 38 mov %edi,(%eax)
while(s < es && strchr(whitespace, *s))
4be: 39 fb cmp %edi,%ebx
4c0: 77 0d ja 4cf <gettoken+0x7f>
4c2: eb 23 jmp 4e7 <gettoken+0x97>
4c4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
s++;
4c8: 83 c7 01 add $0x1,%edi
break;
}
if(eq)
*eq = s;
while(s < es && strchr(whitespace, *s))
4cb: 39 fb cmp %edi,%ebx
4cd: 74 18 je 4e7 <gettoken+0x97>
4cf: 0f be 07 movsbl (%edi),%eax
4d2: 83 ec 08 sub $0x8,%esp
4d5: 50 push %eax
4d6: 68 18 18 00 00 push $0x1818
4db: e8 a0 06 00 00 call b80 <strchr>
4e0: 83 c4 10 add $0x10,%esp
4e3: 85 c0 test %eax,%eax
4e5: 75 e1 jne 4c8 <gettoken+0x78>
s++;
*ps = s;
4e7: 8b 45 08 mov 0x8(%ebp),%eax
4ea: 89 38 mov %edi,(%eax)
return ret;
}
4ec: 8d 65 f4 lea -0xc(%ebp),%esp
4ef: 89 f0 mov %esi,%eax
4f1: 5b pop %ebx
4f2: 5e pop %esi
4f3: 5f pop %edi
4f4: 5d pop %ebp
4f5: c3 ret
4f6: 8d 76 00 lea 0x0(%esi),%esi
4f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
while(s < es && strchr(whitespace, *s))
s++;
if(q)
*q = s;
ret = *s;
switch(*s){
500: 80 f9 3e cmp $0x3e,%cl
503: 75 0b jne 510 <gettoken+0xc0>
case '<':
s++;
break;
case '>':
s++;
if(*s == '>'){
505: 80 7f 01 3e cmpb $0x3e,0x1(%edi)
509: 74 75 je 580 <gettoken+0x130>
case '&':
case '<':
s++;
break;
case '>':
s++;
50b: 83 c7 01 add $0x1,%edi
50e: eb a2 jmp 4b2 <gettoken+0x62>
while(s < es && strchr(whitespace, *s))
s++;
if(q)
*q = s;
ret = *s;
switch(*s){
510: 7f 5e jg 570 <gettoken+0x120>
512: 83 e9 3b sub $0x3b,%ecx
515: 80 f9 01 cmp $0x1,%cl
518: 76 f1 jbe 50b <gettoken+0xbb>
s++;
}
break;
default:
ret = 'a';
while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s))
51a: 39 fb cmp %edi,%ebx
51c: 77 24 ja 542 <gettoken+0xf2>
51e: eb 7c jmp 59c <gettoken+0x14c>
520: 0f be 07 movsbl (%edi),%eax
523: 83 ec 08 sub $0x8,%esp
526: 50 push %eax
527: 68 10 18 00 00 push $0x1810
52c: e8 4f 06 00 00 call b80 <strchr>
531: 83 c4 10 add $0x10,%esp
534: 85 c0 test %eax,%eax
536: 75 1f jne 557 <gettoken+0x107>
s++;
538: 83 c7 01 add $0x1,%edi
s++;
}
break;
default:
ret = 'a';
while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s))
53b: 39 fb cmp %edi,%ebx
53d: 74 5b je 59a <gettoken+0x14a>
53f: 0f be 07 movsbl (%edi),%eax
542: 83 ec 08 sub $0x8,%esp
545: 50 push %eax
546: 68 18 18 00 00 push $0x1818
54b: e8 30 06 00 00 call b80 <strchr>
550: 83 c4 10 add $0x10,%esp
553: 85 c0 test %eax,%eax
555: 74 c9 je 520 <gettoken+0xd0>
ret = '+';
s++;
}
break;
default:
ret = 'a';
557: be 61 00 00 00 mov $0x61,%esi
55c: e9 51 ff ff ff jmp 4b2 <gettoken+0x62>
561: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
568: 89 df mov %ebx,%edi
56a: e9 24 ff ff ff jmp 493 <gettoken+0x43>
56f: 90 nop
while(s < es && strchr(whitespace, *s))
s++;
if(q)
*q = s;
ret = *s;
switch(*s){
570: 80 f9 7c cmp $0x7c,%cl
573: 74 96 je 50b <gettoken+0xbb>
575: eb a3 jmp 51a <gettoken+0xca>
577: 89 f6 mov %esi,%esi
579: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
break;
case '>':
s++;
if(*s == '>'){
ret = '+';
s++;
580: 83 c7 02 add $0x2,%edi
s++;
break;
case '>':
s++;
if(*s == '>'){
ret = '+';
583: be 2b 00 00 00 mov $0x2b,%esi
588: e9 25 ff ff ff jmp 4b2 <gettoken+0x62>
58d: 8d 76 00 lea 0x0(%esi),%esi
while(s < es && strchr(whitespace, *s))
s++;
if(q)
*q = s;
ret = *s;
switch(*s){
590: 80 f9 26 cmp $0x26,%cl
593: 75 85 jne 51a <gettoken+0xca>
595: e9 71 ff ff ff jmp 50b <gettoken+0xbb>
59a: 89 df mov %ebx,%edi
ret = 'a';
while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s))
s++;
break;
}
if(eq)
59c: 8b 45 14 mov 0x14(%ebp),%eax
59f: be 61 00 00 00 mov $0x61,%esi
5a4: 85 c0 test %eax,%eax
5a6: 0f 85 0d ff ff ff jne 4b9 <gettoken+0x69>
5ac: e9 36 ff ff ff jmp 4e7 <gettoken+0x97>
5b1: eb 0d jmp 5c0 <peek>
5b3: 90 nop
5b4: 90 nop
5b5: 90 nop
5b6: 90 nop
5b7: 90 nop
5b8: 90 nop
5b9: 90 nop
5ba: 90 nop
5bb: 90 nop
5bc: 90 nop
5bd: 90 nop
5be: 90 nop
5bf: 90 nop
000005c0 <peek>:
return ret;
}
int
peek(char **ps, char *es, char *toks)
{
5c0: 55 push %ebp
5c1: 89 e5 mov %esp,%ebp
5c3: 57 push %edi
5c4: 56 push %esi
5c5: 53 push %ebx
5c6: 83 ec 0c sub $0xc,%esp
5c9: 8b 7d 08 mov 0x8(%ebp),%edi
5cc: 8b 75 0c mov 0xc(%ebp),%esi
char *s;
s = *ps;
5cf: 8b 1f mov (%edi),%ebx
while(s < es && strchr(whitespace, *s))
5d1: 39 f3 cmp %esi,%ebx
5d3: 72 12 jb 5e7 <peek+0x27>
5d5: eb 28 jmp 5ff <peek+0x3f>
5d7: 89 f6 mov %esi,%esi
5d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
s++;
5e0: 83 c3 01 add $0x1,%ebx
peek(char **ps, char *es, char *toks)
{
char *s;
s = *ps;
while(s < es && strchr(whitespace, *s))
5e3: 39 de cmp %ebx,%esi
5e5: 74 18 je 5ff <peek+0x3f>
5e7: 0f be 03 movsbl (%ebx),%eax
5ea: 83 ec 08 sub $0x8,%esp
5ed: 50 push %eax
5ee: 68 18 18 00 00 push $0x1818
5f3: e8 88 05 00 00 call b80 <strchr>
5f8: 83 c4 10 add $0x10,%esp
5fb: 85 c0 test %eax,%eax
5fd: 75 e1 jne 5e0 <peek+0x20>
s++;
*ps = s;
5ff: 89 1f mov %ebx,(%edi)
return *s && strchr(toks, *s);
601: 0f be 13 movsbl (%ebx),%edx
604: 31 c0 xor %eax,%eax
606: 84 d2 test %dl,%dl
608: 74 17 je 621 <peek+0x61>
60a: 83 ec 08 sub $0x8,%esp
60d: 52 push %edx
60e: ff 75 10 pushl 0x10(%ebp)
611: e8 6a 05 00 00 call b80 <strchr>
616: 83 c4 10 add $0x10,%esp
619: 85 c0 test %eax,%eax
61b: 0f 95 c0 setne %al
61e: 0f b6 c0 movzbl %al,%eax
}
621: 8d 65 f4 lea -0xc(%ebp),%esp
624: 5b pop %ebx
625: 5e pop %esi
626: 5f pop %edi
627: 5d pop %ebp
628: c3 ret
629: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000630 <parseredirs>:
return cmd;
}
struct cmd*
parseredirs(struct cmd *cmd, char **ps, char *es)
{
630: 55 push %ebp
631: 89 e5 mov %esp,%ebp
633: 57 push %edi
634: 56 push %esi
635: 53 push %ebx
636: 83 ec 1c sub $0x1c,%esp
639: 8b 75 0c mov 0xc(%ebp),%esi
63c: 8b 5d 10 mov 0x10(%ebp),%ebx
63f: 90 nop
int tok;
char *q, *eq;
while(peek(ps, es, "<>")){
640: 83 ec 04 sub $0x4,%esp
643: 68 c1 11 00 00 push $0x11c1
648: 53 push %ebx
649: 56 push %esi
64a: e8 71 ff ff ff call 5c0 <peek>
64f: 83 c4 10 add $0x10,%esp
652: 85 c0 test %eax,%eax
654: 74 6a je 6c0 <parseredirs+0x90>
tok = gettoken(ps, es, 0, 0);
656: 6a 00 push $0x0
658: 6a 00 push $0x0
65a: 53 push %ebx
65b: 56 push %esi
65c: e8 ef fd ff ff call 450 <gettoken>
661: 89 c7 mov %eax,%edi
if(gettoken(ps, es, &q, &eq) != 'a')
663: 8d 45 e4 lea -0x1c(%ebp),%eax
666: 50 push %eax
667: 8d 45 e0 lea -0x20(%ebp),%eax
66a: 50 push %eax
66b: 53 push %ebx
66c: 56 push %esi
66d: e8 de fd ff ff call 450 <gettoken>
672: 83 c4 20 add $0x20,%esp
675: 83 f8 61 cmp $0x61,%eax
678: 75 51 jne 6cb <parseredirs+0x9b>
panic("missing file for redirection");
switch(tok){
67a: 83 ff 3c cmp $0x3c,%edi
67d: 74 31 je 6b0 <parseredirs+0x80>
67f: 83 ff 3e cmp $0x3e,%edi
682: 74 05 je 689 <parseredirs+0x59>
684: 83 ff 2b cmp $0x2b,%edi
687: 75 b7 jne 640 <parseredirs+0x10>
break;
case '>':
cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1);
break;
case '+': // >>
cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1);
689: 83 ec 0c sub $0xc,%esp
68c: 6a 01 push $0x1
68e: 68 01 02 00 00 push $0x201
693: ff 75 e4 pushl -0x1c(%ebp)
696: ff 75 e0 pushl -0x20(%ebp)
699: ff 75 08 pushl 0x8(%ebp)
69c: e8 af fc ff ff call 350 <redircmd>
break;
6a1: 83 c4 20 add $0x20,%esp
break;
case '>':
cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1);
break;
case '+': // >>
cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1);
6a4: 89 45 08 mov %eax,0x8(%ebp)
break;
6a7: eb 97 jmp 640 <parseredirs+0x10>
6a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
tok = gettoken(ps, es, 0, 0);
if(gettoken(ps, es, &q, &eq) != 'a')
panic("missing file for redirection");
switch(tok){
case '<':
cmd = redircmd(cmd, q, eq, O_RDONLY, 0);
6b0: 83 ec 0c sub $0xc,%esp
6b3: 6a 00 push $0x0
6b5: 6a 00 push $0x0
6b7: eb da jmp 693 <parseredirs+0x63>
6b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1);
break;
}
}
return cmd;
}
6c0: 8b 45 08 mov 0x8(%ebp),%eax
6c3: 8d 65 f4 lea -0xc(%ebp),%esp
6c6: 5b pop %ebx
6c7: 5e pop %esi
6c8: 5f pop %edi
6c9: 5d pop %ebp
6ca: c3 ret
char *q, *eq;
while(peek(ps, es, "<>")){
tok = gettoken(ps, es, 0, 0);
if(gettoken(ps, es, &q, &eq) != 'a')
panic("missing file for redirection");
6cb: 83 ec 0c sub $0xc,%esp
6ce: 68 a4 11 00 00 push $0x11a4
6d3: e8 78 fa ff ff call 150 <panic>
6d8: 90 nop
6d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
000006e0 <parseexec>:
return cmd;
}
struct cmd*
parseexec(char **ps, char *es)
{
6e0: 55 push %ebp
6e1: 89 e5 mov %esp,%ebp
6e3: 57 push %edi
6e4: 56 push %esi
6e5: 53 push %ebx
6e6: 83 ec 30 sub $0x30,%esp
6e9: 8b 75 08 mov 0x8(%ebp),%esi
6ec: 8b 7d 0c mov 0xc(%ebp),%edi
char *q, *eq;
int tok, argc;
struct execcmd *cmd;
struct cmd *ret;
if(peek(ps, es, "("))
6ef: 68 c4 11 00 00 push $0x11c4
6f4: 57 push %edi
6f5: 56 push %esi
6f6: e8 c5 fe ff ff call 5c0 <peek>
6fb: 83 c4 10 add $0x10,%esp
6fe: 85 c0 test %eax,%eax
700: 0f 85 9a 00 00 00 jne 7a0 <parseexec+0xc0>
return parseblock(ps, es);
ret = execcmd();
706: e8 15 fc ff ff call 320 <execcmd>
cmd = (struct execcmd*)ret;
argc = 0;
ret = parseredirs(ret, ps, es);
70b: 83 ec 04 sub $0x4,%esp
struct cmd *ret;
if(peek(ps, es, "("))
return parseblock(ps, es);
ret = execcmd();
70e: 89 c3 mov %eax,%ebx
710: 89 45 cc mov %eax,-0x34(%ebp)
cmd = (struct execcmd*)ret;
argc = 0;
ret = parseredirs(ret, ps, es);
713: 57 push %edi
714: 56 push %esi
715: 8d 5b 04 lea 0x4(%ebx),%ebx
718: 50 push %eax
719: e8 12 ff ff ff call 630 <parseredirs>
71e: 83 c4 10 add $0x10,%esp
721: 89 45 d0 mov %eax,-0x30(%ebp)
return parseblock(ps, es);
ret = execcmd();
cmd = (struct execcmd*)ret;
argc = 0;
724: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
72b: eb 16 jmp 743 <parseexec+0x63>
72d: 8d 76 00 lea 0x0(%esi),%esi
cmd->argv[argc] = q;
cmd->eargv[argc] = eq;
argc++;
if(argc >= MAXARGS)
panic("too many args");
ret = parseredirs(ret, ps, es);
730: 83 ec 04 sub $0x4,%esp
733: 57 push %edi
734: 56 push %esi
735: ff 75 d0 pushl -0x30(%ebp)
738: e8 f3 fe ff ff call 630 <parseredirs>
73d: 83 c4 10 add $0x10,%esp
740: 89 45 d0 mov %eax,-0x30(%ebp)
ret = execcmd();
cmd = (struct execcmd*)ret;
argc = 0;
ret = parseredirs(ret, ps, es);
while(!peek(ps, es, "|)&;")){
743: 83 ec 04 sub $0x4,%esp
746: 68 db 11 00 00 push $0x11db
74b: 57 push %edi
74c: 56 push %esi
74d: e8 6e fe ff ff call 5c0 <peek>
752: 83 c4 10 add $0x10,%esp
755: 85 c0 test %eax,%eax
757: 75 5f jne 7b8 <parseexec+0xd8>
if((tok=gettoken(ps, es, &q, &eq)) == 0)
759: 8d 45 e4 lea -0x1c(%ebp),%eax
75c: 50 push %eax
75d: 8d 45 e0 lea -0x20(%ebp),%eax
760: 50 push %eax
761: 57 push %edi
762: 56 push %esi
763: e8 e8 fc ff ff call 450 <gettoken>
768: 83 c4 10 add $0x10,%esp
76b: 85 c0 test %eax,%eax
76d: 74 49 je 7b8 <parseexec+0xd8>
break;
if(tok != 'a')
76f: 83 f8 61 cmp $0x61,%eax
772: 75 66 jne 7da <parseexec+0xfa>
panic("syntax");
cmd->argv[argc] = q;
774: 8b 45 e0 mov -0x20(%ebp),%eax
cmd->eargv[argc] = eq;
argc++;
777: 83 45 d4 01 addl $0x1,-0x2c(%ebp)
77b: 83 c3 04 add $0x4,%ebx
while(!peek(ps, es, "|)&;")){
if((tok=gettoken(ps, es, &q, &eq)) == 0)
break;
if(tok != 'a')
panic("syntax");
cmd->argv[argc] = q;
77e: 89 43 fc mov %eax,-0x4(%ebx)
cmd->eargv[argc] = eq;
781: 8b 45 e4 mov -0x1c(%ebp),%eax
784: 89 43 24 mov %eax,0x24(%ebx)
argc++;
787: 8b 45 d4 mov -0x2c(%ebp),%eax
if(argc >= MAXARGS)
78a: 83 f8 0a cmp $0xa,%eax
78d: 75 a1 jne 730 <parseexec+0x50>
panic("too many args");
78f: 83 ec 0c sub $0xc,%esp
792: 68 cd 11 00 00 push $0x11cd
797: e8 b4 f9 ff ff call 150 <panic>
79c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
int tok, argc;
struct execcmd *cmd;
struct cmd *ret;
if(peek(ps, es, "("))
return parseblock(ps, es);
7a0: 83 ec 08 sub $0x8,%esp
7a3: 57 push %edi
7a4: 56 push %esi
7a5: e8 56 01 00 00 call 900 <parseblock>
7aa: 83 c4 10 add $0x10,%esp
ret = parseredirs(ret, ps, es);
}
cmd->argv[argc] = 0;
cmd->eargv[argc] = 0;
return ret;
}
7ad: 8d 65 f4 lea -0xc(%ebp),%esp
7b0: 5b pop %ebx
7b1: 5e pop %esi
7b2: 5f pop %edi
7b3: 5d pop %ebp
7b4: c3 ret
7b5: 8d 76 00 lea 0x0(%esi),%esi
7b8: 8b 45 cc mov -0x34(%ebp),%eax
7bb: 8b 55 d4 mov -0x2c(%ebp),%edx
7be: 8d 04 90 lea (%eax,%edx,4),%eax
argc++;
if(argc >= MAXARGS)
panic("too many args");
ret = parseredirs(ret, ps, es);
}
cmd->argv[argc] = 0;
7c1: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
cmd->eargv[argc] = 0;
7c8: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax)
7cf: 8b 45 d0 mov -0x30(%ebp),%eax
return ret;
}
7d2: 8d 65 f4 lea -0xc(%ebp),%esp
7d5: 5b pop %ebx
7d6: 5e pop %esi
7d7: 5f pop %edi
7d8: 5d pop %ebp
7d9: c3 ret
ret = parseredirs(ret, ps, es);
while(!peek(ps, es, "|)&;")){
if((tok=gettoken(ps, es, &q, &eq)) == 0)
break;
if(tok != 'a')
panic("syntax");
7da: 83 ec 0c sub $0xc,%esp
7dd: 68 c6 11 00 00 push $0x11c6
7e2: e8 69 f9 ff ff call 150 <panic>
7e7: 89 f6 mov %esi,%esi
7e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000007f0 <parsepipe>:
return cmd;
}
struct cmd*
parsepipe(char **ps, char *es)
{
7f0: 55 push %ebp
7f1: 89 e5 mov %esp,%ebp
7f3: 57 push %edi
7f4: 56 push %esi
7f5: 53 push %ebx
7f6: 83 ec 14 sub $0x14,%esp
7f9: 8b 5d 08 mov 0x8(%ebp),%ebx
7fc: 8b 75 0c mov 0xc(%ebp),%esi
struct cmd *cmd;
cmd = parseexec(ps, es);
7ff: 56 push %esi
800: 53 push %ebx
801: e8 da fe ff ff call 6e0 <parseexec>
if(peek(ps, es, "|")){
806: 83 c4 0c add $0xc,%esp
struct cmd*
parsepipe(char **ps, char *es)
{
struct cmd *cmd;
cmd = parseexec(ps, es);
809: 89 c7 mov %eax,%edi
if(peek(ps, es, "|")){
80b: 68 e0 11 00 00 push $0x11e0
810: 56 push %esi
811: 53 push %ebx
812: e8 a9 fd ff ff call 5c0 <peek>
817: 83 c4 10 add $0x10,%esp
81a: 85 c0 test %eax,%eax
81c: 75 12 jne 830 <parsepipe+0x40>
gettoken(ps, es, 0, 0);
cmd = pipecmd(cmd, parsepipe(ps, es));
}
return cmd;
}
81e: 8d 65 f4 lea -0xc(%ebp),%esp
821: 89 f8 mov %edi,%eax
823: 5b pop %ebx
824: 5e pop %esi
825: 5f pop %edi
826: 5d pop %ebp
827: c3 ret
828: 90 nop
829: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
{
struct cmd *cmd;
cmd = parseexec(ps, es);
if(peek(ps, es, "|")){
gettoken(ps, es, 0, 0);
830: 6a 00 push $0x0
832: 6a 00 push $0x0
834: 56 push %esi
835: 53 push %ebx
836: e8 15 fc ff ff call 450 <gettoken>
cmd = pipecmd(cmd, parsepipe(ps, es));
83b: 58 pop %eax
83c: 5a pop %edx
83d: 56 push %esi
83e: 53 push %ebx
83f: e8 ac ff ff ff call 7f0 <parsepipe>
844: 89 7d 08 mov %edi,0x8(%ebp)
847: 89 45 0c mov %eax,0xc(%ebp)
84a: 83 c4 10 add $0x10,%esp
}
return cmd;
}
84d: 8d 65 f4 lea -0xc(%ebp),%esp
850: 5b pop %ebx
851: 5e pop %esi
852: 5f pop %edi
853: 5d pop %ebp
struct cmd *cmd;
cmd = parseexec(ps, es);
if(peek(ps, es, "|")){
gettoken(ps, es, 0, 0);
cmd = pipecmd(cmd, parsepipe(ps, es));
854: e9 47 fb ff ff jmp 3a0 <pipecmd>
859: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000860 <parseline>:
return cmd;
}
struct cmd*
parseline(char **ps, char *es)
{
860: 55 push %ebp
861: 89 e5 mov %esp,%ebp
863: 57 push %edi
864: 56 push %esi
865: 53 push %ebx
866: 83 ec 14 sub $0x14,%esp
869: 8b 5d 08 mov 0x8(%ebp),%ebx
86c: 8b 75 0c mov 0xc(%ebp),%esi
struct cmd *cmd;
cmd = parsepipe(ps, es);
86f: 56 push %esi
870: 53 push %ebx
871: e8 7a ff ff ff call 7f0 <parsepipe>
while(peek(ps, es, "&")){
876: 83 c4 10 add $0x10,%esp
struct cmd*
parseline(char **ps, char *es)
{
struct cmd *cmd;
cmd = parsepipe(ps, es);
879: 89 c7 mov %eax,%edi
while(peek(ps, es, "&")){
87b: eb 1b jmp 898 <parseline+0x38>
87d: 8d 76 00 lea 0x0(%esi),%esi
gettoken(ps, es, 0, 0);
880: 6a 00 push $0x0
882: 6a 00 push $0x0
884: 56 push %esi
885: 53 push %ebx
886: e8 c5 fb ff ff call 450 <gettoken>
cmd = backcmd(cmd);
88b: 89 3c 24 mov %edi,(%esp)
88e: e8 8d fb ff ff call 420 <backcmd>
893: 83 c4 10 add $0x10,%esp
896: 89 c7 mov %eax,%edi
parseline(char **ps, char *es)
{
struct cmd *cmd;
cmd = parsepipe(ps, es);
while(peek(ps, es, "&")){
898: 83 ec 04 sub $0x4,%esp
89b: 68 e2 11 00 00 push $0x11e2
8a0: 56 push %esi
8a1: 53 push %ebx
8a2: e8 19 fd ff ff call 5c0 <peek>
8a7: 83 c4 10 add $0x10,%esp
8aa: 85 c0 test %eax,%eax
8ac: 75 d2 jne 880 <parseline+0x20>
gettoken(ps, es, 0, 0);
cmd = backcmd(cmd);
}
if(peek(ps, es, ";")){
8ae: 83 ec 04 sub $0x4,%esp
8b1: 68 de 11 00 00 push $0x11de
8b6: 56 push %esi
8b7: 53 push %ebx
8b8: e8 03 fd ff ff call 5c0 <peek>
8bd: 83 c4 10 add $0x10,%esp
8c0: 85 c0 test %eax,%eax
8c2: 75 0c jne 8d0 <parseline+0x70>
gettoken(ps, es, 0, 0);
cmd = listcmd(cmd, parseline(ps, es));
}
return cmd;
}
8c4: 8d 65 f4 lea -0xc(%ebp),%esp
8c7: 89 f8 mov %edi,%eax
8c9: 5b pop %ebx
8ca: 5e pop %esi
8cb: 5f pop %edi
8cc: 5d pop %ebp
8cd: c3 ret
8ce: 66 90 xchg %ax,%ax
while(peek(ps, es, "&")){
gettoken(ps, es, 0, 0);
cmd = backcmd(cmd);
}
if(peek(ps, es, ";")){
gettoken(ps, es, 0, 0);
8d0: 6a 00 push $0x0
8d2: 6a 00 push $0x0
8d4: 56 push %esi
8d5: 53 push %ebx
8d6: e8 75 fb ff ff call 450 <gettoken>
cmd = listcmd(cmd, parseline(ps, es));
8db: 58 pop %eax
8dc: 5a pop %edx
8dd: 56 push %esi
8de: 53 push %ebx
8df: e8 7c ff ff ff call 860 <parseline>
8e4: 89 7d 08 mov %edi,0x8(%ebp)
8e7: 89 45 0c mov %eax,0xc(%ebp)
8ea: 83 c4 10 add $0x10,%esp
}
return cmd;
}
8ed: 8d 65 f4 lea -0xc(%ebp),%esp
8f0: 5b pop %ebx
8f1: 5e pop %esi
8f2: 5f pop %edi
8f3: 5d pop %ebp
gettoken(ps, es, 0, 0);
cmd = backcmd(cmd);
}
if(peek(ps, es, ";")){
gettoken(ps, es, 0, 0);
cmd = listcmd(cmd, parseline(ps, es));
8f4: e9 e7 fa ff ff jmp 3e0 <listcmd>
8f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000900 <parseblock>:
return cmd;
}
struct cmd*
parseblock(char **ps, char *es)
{
900: 55 push %ebp
901: 89 e5 mov %esp,%ebp
903: 57 push %edi
904: 56 push %esi
905: 53 push %ebx
906: 83 ec 10 sub $0x10,%esp
909: 8b 5d 08 mov 0x8(%ebp),%ebx
90c: 8b 75 0c mov 0xc(%ebp),%esi
struct cmd *cmd;
if(!peek(ps, es, "("))
90f: 68 c4 11 00 00 push $0x11c4
914: 56 push %esi
915: 53 push %ebx
916: e8 a5 fc ff ff call 5c0 <peek>
91b: 83 c4 10 add $0x10,%esp
91e: 85 c0 test %eax,%eax
920: 74 4a je 96c <parseblock+0x6c>
panic("parseblock");
gettoken(ps, es, 0, 0);
922: 6a 00 push $0x0
924: 6a 00 push $0x0
926: 56 push %esi
927: 53 push %ebx
928: e8 23 fb ff ff call 450 <gettoken>
cmd = parseline(ps, es);
92d: 58 pop %eax
92e: 5a pop %edx
92f: 56 push %esi
930: 53 push %ebx
931: e8 2a ff ff ff call 860 <parseline>
if(!peek(ps, es, ")"))
936: 83 c4 0c add $0xc,%esp
struct cmd *cmd;
if(!peek(ps, es, "("))
panic("parseblock");
gettoken(ps, es, 0, 0);
cmd = parseline(ps, es);
939: 89 c7 mov %eax,%edi
if(!peek(ps, es, ")"))
93b: 68 00 12 00 00 push $0x1200
940: 56 push %esi
941: 53 push %ebx
942: e8 79 fc ff ff call 5c0 <peek>
947: 83 c4 10 add $0x10,%esp
94a: 85 c0 test %eax,%eax
94c: 74 2b je 979 <parseblock+0x79>
panic("syntax - missing )");
gettoken(ps, es, 0, 0);
94e: 6a 00 push $0x0
950: 6a 00 push $0x0
952: 56 push %esi
953: 53 push %ebx
954: e8 f7 fa ff ff call 450 <gettoken>
cmd = parseredirs(cmd, ps, es);
959: 83 c4 0c add $0xc,%esp
95c: 56 push %esi
95d: 53 push %ebx
95e: 57 push %edi
95f: e8 cc fc ff ff call 630 <parseredirs>
return cmd;
}
964: 8d 65 f4 lea -0xc(%ebp),%esp
967: 5b pop %ebx
968: 5e pop %esi
969: 5f pop %edi
96a: 5d pop %ebp
96b: c3 ret
parseblock(char **ps, char *es)
{
struct cmd *cmd;
if(!peek(ps, es, "("))
panic("parseblock");
96c: 83 ec 0c sub $0xc,%esp
96f: 68 e4 11 00 00 push $0x11e4
974: e8 d7 f7 ff ff call 150 <panic>
gettoken(ps, es, 0, 0);
cmd = parseline(ps, es);
if(!peek(ps, es, ")"))
panic("syntax - missing )");
979: 83 ec 0c sub $0xc,%esp
97c: 68 ef 11 00 00 push $0x11ef
981: e8 ca f7 ff ff call 150 <panic>
986: 8d 76 00 lea 0x0(%esi),%esi
989: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000990 <nulterminate>:
}
// NUL-terminate all the counted strings.
struct cmd*
nulterminate(struct cmd *cmd)
{
990: 55 push %ebp
991: 89 e5 mov %esp,%ebp
993: 53 push %ebx
994: 83 ec 04 sub $0x4,%esp
997: 8b 5d 08 mov 0x8(%ebp),%ebx
struct execcmd *ecmd;
struct listcmd *lcmd;
struct pipecmd *pcmd;
struct redircmd *rcmd;
if(cmd == 0)
99a: 85 db test %ebx,%ebx
99c: 0f 84 96 00 00 00 je a38 <nulterminate+0xa8>
return 0;
switch(cmd->type){
9a2: 83 3b 05 cmpl $0x5,(%ebx)
9a5: 77 48 ja 9ef <nulterminate+0x5f>
9a7: 8b 03 mov (%ebx),%eax
9a9: ff 24 85 40 12 00 00 jmp *0x1240(,%eax,4)
nulterminate(pcmd->right);
break;
case LIST:
lcmd = (struct listcmd*)cmd;
nulterminate(lcmd->left);
9b0: 83 ec 0c sub $0xc,%esp
9b3: ff 73 04 pushl 0x4(%ebx)
9b6: e8 d5 ff ff ff call 990 <nulterminate>
nulterminate(lcmd->right);
9bb: 58 pop %eax
9bc: ff 73 08 pushl 0x8(%ebx)
9bf: e8 cc ff ff ff call 990 <nulterminate>
break;
9c4: 83 c4 10 add $0x10,%esp
9c7: 89 d8 mov %ebx,%eax
bcmd = (struct backcmd*)cmd;
nulterminate(bcmd->cmd);
break;
}
return cmd;
}
9c9: 8b 5d fc mov -0x4(%ebp),%ebx
9cc: c9 leave
9cd: c3 ret
9ce: 66 90 xchg %ax,%ax
return 0;
switch(cmd->type){
case EXEC:
ecmd = (struct execcmd*)cmd;
for(i=0; ecmd->argv[i]; i++)
9d0: 8b 4b 04 mov 0x4(%ebx),%ecx
9d3: 8d 43 2c lea 0x2c(%ebx),%eax
9d6: 85 c9 test %ecx,%ecx
9d8: 74 15 je 9ef <nulterminate+0x5f>
9da: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
*ecmd->eargv[i] = 0;
9e0: 8b 10 mov (%eax),%edx
9e2: 83 c0 04 add $0x4,%eax
9e5: c6 02 00 movb $0x0,(%edx)
return 0;
switch(cmd->type){
case EXEC:
ecmd = (struct execcmd*)cmd;
for(i=0; ecmd->argv[i]; i++)
9e8: 8b 50 d8 mov -0x28(%eax),%edx
9eb: 85 d2 test %edx,%edx
9ed: 75 f1 jne 9e0 <nulterminate+0x50>
struct redircmd *rcmd;
if(cmd == 0)
return 0;
switch(cmd->type){
9ef: 89 d8 mov %ebx,%eax
bcmd = (struct backcmd*)cmd;
nulterminate(bcmd->cmd);
break;
}
return cmd;
}
9f1: 8b 5d fc mov -0x4(%ebp),%ebx
9f4: c9 leave
9f5: c3 ret
9f6: 8d 76 00 lea 0x0(%esi),%esi
9f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
nulterminate(lcmd->right);
break;
case BACK:
bcmd = (struct backcmd*)cmd;
nulterminate(bcmd->cmd);
a00: 83 ec 0c sub $0xc,%esp
a03: ff 73 04 pushl 0x4(%ebx)
a06: e8 85 ff ff ff call 990 <nulterminate>
break;
a0b: 89 d8 mov %ebx,%eax
a0d: 83 c4 10 add $0x10,%esp
}
return cmd;
}
a10: 8b 5d fc mov -0x4(%ebp),%ebx
a13: c9 leave
a14: c3 ret
a15: 8d 76 00 lea 0x0(%esi),%esi
*ecmd->eargv[i] = 0;
break;
case REDIR:
rcmd = (struct redircmd*)cmd;
nulterminate(rcmd->cmd);
a18: 83 ec 0c sub $0xc,%esp
a1b: ff 73 04 pushl 0x4(%ebx)
a1e: e8 6d ff ff ff call 990 <nulterminate>
*rcmd->efile = 0;
a23: 8b 43 0c mov 0xc(%ebx),%eax
break;
a26: 83 c4 10 add $0x10,%esp
break;
case REDIR:
rcmd = (struct redircmd*)cmd;
nulterminate(rcmd->cmd);
*rcmd->efile = 0;
a29: c6 00 00 movb $0x0,(%eax)
break;
a2c: 89 d8 mov %ebx,%eax
bcmd = (struct backcmd*)cmd;
nulterminate(bcmd->cmd);
break;
}
return cmd;
}
a2e: 8b 5d fc mov -0x4(%ebp),%ebx
a31: c9 leave
a32: c3 ret
a33: 90 nop
a34: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
struct listcmd *lcmd;
struct pipecmd *pcmd;
struct redircmd *rcmd;
if(cmd == 0)
return 0;
a38: 31 c0 xor %eax,%eax
a3a: eb 8d jmp 9c9 <nulterminate+0x39>
a3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
00000a40 <parsecmd>:
struct cmd *parseexec(char**, char*);
struct cmd *nulterminate(struct cmd*);
struct cmd*
parsecmd(char *s)
{
a40: 55 push %ebp
a41: 89 e5 mov %esp,%ebp
a43: 56 push %esi
a44: 53 push %ebx
char *es;
struct cmd *cmd;
es = s + strlen(s);
a45: 8b 5d 08 mov 0x8(%ebp),%ebx
a48: 83 ec 0c sub $0xc,%esp
a4b: 53 push %ebx
a4c: e8 df 00 00 00 call b30 <strlen>
cmd = parseline(&s, es);
a51: 59 pop %ecx
parsecmd(char *s)
{
char *es;
struct cmd *cmd;
es = s + strlen(s);
a52: 01 c3 add %eax,%ebx
cmd = parseline(&s, es);
a54: 8d 45 08 lea 0x8(%ebp),%eax
a57: 5e pop %esi
a58: 53 push %ebx
a59: 50 push %eax
a5a: e8 01 fe ff ff call 860 <parseline>
a5f: 89 c6 mov %eax,%esi
peek(&s, es, "");
a61: 8d 45 08 lea 0x8(%ebp),%eax
a64: 83 c4 0c add $0xc,%esp
a67: 68 8e 11 00 00 push $0x118e
a6c: 53 push %ebx
a6d: 50 push %eax
a6e: e8 4d fb ff ff call 5c0 <peek>
if(s != es){
a73: 8b 45 08 mov 0x8(%ebp),%eax
a76: 83 c4 10 add $0x10,%esp
a79: 39 c3 cmp %eax,%ebx
a7b: 75 12 jne a8f <parsecmd+0x4f>
printf(2, "leftovers: %s\n", s);
panic("syntax");
}
nulterminate(cmd);
a7d: 83 ec 0c sub $0xc,%esp
a80: 56 push %esi
a81: e8 0a ff ff ff call 990 <nulterminate>
return cmd;
}
a86: 8d 65 f8 lea -0x8(%ebp),%esp
a89: 89 f0 mov %esi,%eax
a8b: 5b pop %ebx
a8c: 5e pop %esi
a8d: 5d pop %ebp
a8e: c3 ret
es = s + strlen(s);
cmd = parseline(&s, es);
peek(&s, es, "");
if(s != es){
printf(2, "leftovers: %s\n", s);
a8f: 52 push %edx
a90: 50 push %eax
a91: 68 02 12 00 00 push $0x1202
a96: 6a 02 push $0x2
a98: e8 b3 03 00 00 call e50 <printf>
panic("syntax");
a9d: c7 04 24 c6 11 00 00 movl $0x11c6,(%esp)
aa4: e8 a7 f6 ff ff call 150 <panic>
aa9: 66 90 xchg %ax,%ax
aab: 66 90 xchg %ax,%ax
aad: 66 90 xchg %ax,%ax
aaf: 90 nop
00000ab0 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
ab0: 55 push %ebp
ab1: 89 e5 mov %esp,%ebp
ab3: 53 push %ebx
ab4: 8b 45 08 mov 0x8(%ebp),%eax
ab7: 8b 4d 0c mov 0xc(%ebp),%ecx
char *os;
os = s;
while((*s++ = *t++) != 0)
aba: 89 c2 mov %eax,%edx
abc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
ac0: 83 c1 01 add $0x1,%ecx
ac3: 0f b6 59 ff movzbl -0x1(%ecx),%ebx
ac7: 83 c2 01 add $0x1,%edx
aca: 84 db test %bl,%bl
acc: 88 5a ff mov %bl,-0x1(%edx)
acf: 75 ef jne ac0 <strcpy+0x10>
;
return os;
}
ad1: 5b pop %ebx
ad2: 5d pop %ebp
ad3: c3 ret
ad4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
ada: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00000ae0 <strcmp>:
int
strcmp(const char *p, const char *q)
{
ae0: 55 push %ebp
ae1: 89 e5 mov %esp,%ebp
ae3: 56 push %esi
ae4: 53 push %ebx
ae5: 8b 55 08 mov 0x8(%ebp),%edx
ae8: 8b 4d 0c mov 0xc(%ebp),%ecx
while(*p && *p == *q)
aeb: 0f b6 02 movzbl (%edx),%eax
aee: 0f b6 19 movzbl (%ecx),%ebx
af1: 84 c0 test %al,%al
af3: 75 1e jne b13 <strcmp+0x33>
af5: eb 29 jmp b20 <strcmp+0x40>
af7: 89 f6 mov %esi,%esi
af9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
p++, q++;
b00: 83 c2 01 add $0x1,%edx
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
b03: 0f b6 02 movzbl (%edx),%eax
p++, q++;
b06: 8d 71 01 lea 0x1(%ecx),%esi
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
b09: 0f b6 59 01 movzbl 0x1(%ecx),%ebx
b0d: 84 c0 test %al,%al
b0f: 74 0f je b20 <strcmp+0x40>
b11: 89 f1 mov %esi,%ecx
b13: 38 d8 cmp %bl,%al
b15: 74 e9 je b00 <strcmp+0x20>
p++, q++;
return (uchar)*p - (uchar)*q;
b17: 29 d8 sub %ebx,%eax
}
b19: 5b pop %ebx
b1a: 5e pop %esi
b1b: 5d pop %ebp
b1c: c3 ret
b1d: 8d 76 00 lea 0x0(%esi),%esi
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
b20: 31 c0 xor %eax,%eax
p++, q++;
return (uchar)*p - (uchar)*q;
b22: 29 d8 sub %ebx,%eax
}
b24: 5b pop %ebx
b25: 5e pop %esi
b26: 5d pop %ebp
b27: c3 ret
b28: 90 nop
b29: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000b30 <strlen>:
uint
strlen(char *s)
{
b30: 55 push %ebp
b31: 89 e5 mov %esp,%ebp
b33: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
for(n = 0; s[n]; n++)
b36: 80 39 00 cmpb $0x0,(%ecx)
b39: 74 12 je b4d <strlen+0x1d>
b3b: 31 d2 xor %edx,%edx
b3d: 8d 76 00 lea 0x0(%esi),%esi
b40: 83 c2 01 add $0x1,%edx
b43: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)
b47: 89 d0 mov %edx,%eax
b49: 75 f5 jne b40 <strlen+0x10>
;
return n;
}
b4b: 5d pop %ebp
b4c: c3 ret
uint
strlen(char *s)
{
int n;
for(n = 0; s[n]; n++)
b4d: 31 c0 xor %eax,%eax
;
return n;
}
b4f: 5d pop %ebp
b50: c3 ret
b51: eb 0d jmp b60 <memset>
b53: 90 nop
b54: 90 nop
b55: 90 nop
b56: 90 nop
b57: 90 nop
b58: 90 nop
b59: 90 nop
b5a: 90 nop
b5b: 90 nop
b5c: 90 nop
b5d: 90 nop
b5e: 90 nop
b5f: 90 nop
00000b60 <memset>:
void*
memset(void *dst, int c, uint n)
{
b60: 55 push %ebp
b61: 89 e5 mov %esp,%ebp
b63: 57 push %edi
b64: 8b 55 08 mov 0x8(%ebp),%edx
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
b67: 8b 4d 10 mov 0x10(%ebp),%ecx
b6a: 8b 45 0c mov 0xc(%ebp),%eax
b6d: 89 d7 mov %edx,%edi
b6f: fc cld
b70: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
b72: 89 d0 mov %edx,%eax
b74: 5f pop %edi
b75: 5d pop %ebp
b76: c3 ret
b77: 89 f6 mov %esi,%esi
b79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000b80 <strchr>:
char*
strchr(const char *s, char c)
{
b80: 55 push %ebp
b81: 89 e5 mov %esp,%ebp
b83: 53 push %ebx
b84: 8b 45 08 mov 0x8(%ebp),%eax
b87: 8b 5d 0c mov 0xc(%ebp),%ebx
for(; *s; s++)
b8a: 0f b6 10 movzbl (%eax),%edx
b8d: 84 d2 test %dl,%dl
b8f: 74 1d je bae <strchr+0x2e>
if(*s == c)
b91: 38 d3 cmp %dl,%bl
b93: 89 d9 mov %ebx,%ecx
b95: 75 0d jne ba4 <strchr+0x24>
b97: eb 17 jmp bb0 <strchr+0x30>
b99: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
ba0: 38 ca cmp %cl,%dl
ba2: 74 0c je bb0 <strchr+0x30>
}
char*
strchr(const char *s, char c)
{
for(; *s; s++)
ba4: 83 c0 01 add $0x1,%eax
ba7: 0f b6 10 movzbl (%eax),%edx
baa: 84 d2 test %dl,%dl
bac: 75 f2 jne ba0 <strchr+0x20>
if(*s == c)
return (char*)s;
return 0;
bae: 31 c0 xor %eax,%eax
}
bb0: 5b pop %ebx
bb1: 5d pop %ebp
bb2: c3 ret
bb3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
bb9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000bc0 <gets>:
char*
gets(char *buf, int max)
{
bc0: 55 push %ebp
bc1: 89 e5 mov %esp,%ebp
bc3: 57 push %edi
bc4: 56 push %esi
bc5: 53 push %ebx
int i, cc;
char c;
for(i=0; i+1 < max; ){
bc6: 31 f6 xor %esi,%esi
cc = read(0, &c, 1);
bc8: 8d 7d e7 lea -0x19(%ebp),%edi
return 0;
}
char*
gets(char *buf, int max)
{
bcb: 83 ec 1c sub $0x1c,%esp
int i, cc;
char c;
for(i=0; i+1 < max; ){
bce: eb 29 jmp bf9 <gets+0x39>
cc = read(0, &c, 1);
bd0: 83 ec 04 sub $0x4,%esp
bd3: 6a 01 push $0x1
bd5: 57 push %edi
bd6: 6a 00 push $0x0
bd8: e8 2d 01 00 00 call d0a <read>
if(cc < 1)
bdd: 83 c4 10 add $0x10,%esp
be0: 85 c0 test %eax,%eax
be2: 7e 1d jle c01 <gets+0x41>
break;
buf[i++] = c;
be4: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
be8: 8b 55 08 mov 0x8(%ebp),%edx
beb: 89 de mov %ebx,%esi
if(c == '\n' || c == '\r')
bed: 3c 0a cmp $0xa,%al
for(i=0; i+1 < max; ){
cc = read(0, &c, 1);
if(cc < 1)
break;
buf[i++] = c;
bef: 88 44 1a ff mov %al,-0x1(%edx,%ebx,1)
if(c == '\n' || c == '\r')
bf3: 74 1b je c10 <gets+0x50>
bf5: 3c 0d cmp $0xd,%al
bf7: 74 17 je c10 <gets+0x50>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
bf9: 8d 5e 01 lea 0x1(%esi),%ebx
bfc: 3b 5d 0c cmp 0xc(%ebp),%ebx
bff: 7c cf jl bd0 <gets+0x10>
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
c01: 8b 45 08 mov 0x8(%ebp),%eax
c04: c6 04 30 00 movb $0x0,(%eax,%esi,1)
return buf;
}
c08: 8d 65 f4 lea -0xc(%ebp),%esp
c0b: 5b pop %ebx
c0c: 5e pop %esi
c0d: 5f pop %edi
c0e: 5d pop %ebp
c0f: c3 ret
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
c10: 8b 45 08 mov 0x8(%ebp),%eax
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
c13: 89 de mov %ebx,%esi
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
c15: c6 04 30 00 movb $0x0,(%eax,%esi,1)
return buf;
}
c19: 8d 65 f4 lea -0xc(%ebp),%esp
c1c: 5b pop %ebx
c1d: 5e pop %esi
c1e: 5f pop %edi
c1f: 5d pop %ebp
c20: c3 ret
c21: eb 0d jmp c30 <stat>
c23: 90 nop
c24: 90 nop
c25: 90 nop
c26: 90 nop
c27: 90 nop
c28: 90 nop
c29: 90 nop
c2a: 90 nop
c2b: 90 nop
c2c: 90 nop
c2d: 90 nop
c2e: 90 nop
c2f: 90 nop
00000c30 <stat>:
int
stat(char *n, struct stat *st)
{
c30: 55 push %ebp
c31: 89 e5 mov %esp,%ebp
c33: 56 push %esi
c34: 53 push %ebx
int fd;
int r;
fd = open(n, O_RDONLY);
c35: 83 ec 08 sub $0x8,%esp
c38: 6a 00 push $0x0
c3a: ff 75 08 pushl 0x8(%ebp)
c3d: e8 f0 00 00 00 call d32 <open>
if(fd < 0)
c42: 83 c4 10 add $0x10,%esp
c45: 85 c0 test %eax,%eax
c47: 78 27 js c70 <stat+0x40>
return -1;
r = fstat(fd, st);
c49: 83 ec 08 sub $0x8,%esp
c4c: ff 75 0c pushl 0xc(%ebp)
c4f: 89 c3 mov %eax,%ebx
c51: 50 push %eax
c52: e8 f3 00 00 00 call d4a <fstat>
c57: 89 c6 mov %eax,%esi
close(fd);
c59: 89 1c 24 mov %ebx,(%esp)
c5c: e8 b9 00 00 00 call d1a <close>
return r;
c61: 83 c4 10 add $0x10,%esp
c64: 89 f0 mov %esi,%eax
}
c66: 8d 65 f8 lea -0x8(%ebp),%esp
c69: 5b pop %ebx
c6a: 5e pop %esi
c6b: 5d pop %ebp
c6c: c3 ret
c6d: 8d 76 00 lea 0x0(%esi),%esi
int fd;
int r;
fd = open(n, O_RDONLY);
if(fd < 0)
return -1;
c70: b8 ff ff ff ff mov $0xffffffff,%eax
c75: eb ef jmp c66 <stat+0x36>
c77: 89 f6 mov %esi,%esi
c79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000c80 <atoi>:
return r;
}
int
atoi(const char *s)
{
c80: 55 push %ebp
c81: 89 e5 mov %esp,%ebp
c83: 53 push %ebx
c84: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
n = 0;
while('0' <= *s && *s <= '9')
c87: 0f be 11 movsbl (%ecx),%edx
c8a: 8d 42 d0 lea -0x30(%edx),%eax
c8d: 3c 09 cmp $0x9,%al
c8f: b8 00 00 00 00 mov $0x0,%eax
c94: 77 1f ja cb5 <atoi+0x35>
c96: 8d 76 00 lea 0x0(%esi),%esi
c99: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
n = n*10 + *s++ - '0';
ca0: 8d 04 80 lea (%eax,%eax,4),%eax
ca3: 83 c1 01 add $0x1,%ecx
ca6: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
caa: 0f be 11 movsbl (%ecx),%edx
cad: 8d 5a d0 lea -0x30(%edx),%ebx
cb0: 80 fb 09 cmp $0x9,%bl
cb3: 76 eb jbe ca0 <atoi+0x20>
n = n*10 + *s++ - '0';
return n;
}
cb5: 5b pop %ebx
cb6: 5d pop %ebp
cb7: c3 ret
cb8: 90 nop
cb9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000cc0 <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
cc0: 55 push %ebp
cc1: 89 e5 mov %esp,%ebp
cc3: 56 push %esi
cc4: 53 push %ebx
cc5: 8b 5d 10 mov 0x10(%ebp),%ebx
cc8: 8b 45 08 mov 0x8(%ebp),%eax
ccb: 8b 75 0c mov 0xc(%ebp),%esi
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
cce: 85 db test %ebx,%ebx
cd0: 7e 14 jle ce6 <memmove+0x26>
cd2: 31 d2 xor %edx,%edx
cd4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
*dst++ = *src++;
cd8: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
cdc: 88 0c 10 mov %cl,(%eax,%edx,1)
cdf: 83 c2 01 add $0x1,%edx
{
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
ce2: 39 da cmp %ebx,%edx
ce4: 75 f2 jne cd8 <memmove+0x18>
*dst++ = *src++;
return vdst;
}
ce6: 5b pop %ebx
ce7: 5e pop %esi
ce8: 5d pop %ebp
ce9: c3 ret
00000cea <fork>:
cea: b8 01 00 00 00 mov $0x1,%eax
cef: cd 40 int $0x40
cf1: c3 ret
00000cf2 <exit>:
cf2: b8 02 00 00 00 mov $0x2,%eax
cf7: cd 40 int $0x40
cf9: c3 ret
00000cfa <wait>:
cfa: b8 03 00 00 00 mov $0x3,%eax
cff: cd 40 int $0x40
d01: c3 ret
00000d02 <pipe>:
d02: b8 04 00 00 00 mov $0x4,%eax
d07: cd 40 int $0x40
d09: c3 ret
00000d0a <read>:
d0a: b8 05 00 00 00 mov $0x5,%eax
d0f: cd 40 int $0x40
d11: c3 ret
00000d12 <write>:
d12: b8 10 00 00 00 mov $0x10,%eax
d17: cd 40 int $0x40
d19: c3 ret
00000d1a <close>:
d1a: b8 15 00 00 00 mov $0x15,%eax
d1f: cd 40 int $0x40
d21: c3 ret
00000d22 <kill>:
d22: b8 06 00 00 00 mov $0x6,%eax
d27: cd 40 int $0x40
d29: c3 ret
00000d2a <exec>:
d2a: b8 07 00 00 00 mov $0x7,%eax
d2f: cd 40 int $0x40
d31: c3 ret
00000d32 <open>:
d32: b8 0f 00 00 00 mov $0xf,%eax
d37: cd 40 int $0x40
d39: c3 ret
00000d3a <mknod>:
d3a: b8 11 00 00 00 mov $0x11,%eax
d3f: cd 40 int $0x40
d41: c3 ret
00000d42 <unlink>:
d42: b8 12 00 00 00 mov $0x12,%eax
d47: cd 40 int $0x40
d49: c3 ret
00000d4a <fstat>:
d4a: b8 08 00 00 00 mov $0x8,%eax
d4f: cd 40 int $0x40
d51: c3 ret
00000d52 <link>:
d52: b8 13 00 00 00 mov $0x13,%eax
d57: cd 40 int $0x40
d59: c3 ret
00000d5a <mkdir>:
d5a: b8 14 00 00 00 mov $0x14,%eax
d5f: cd 40 int $0x40
d61: c3 ret
00000d62 <chdir>:
d62: b8 09 00 00 00 mov $0x9,%eax
d67: cd 40 int $0x40
d69: c3 ret
00000d6a <dup>:
d6a: b8 0a 00 00 00 mov $0xa,%eax
d6f: cd 40 int $0x40
d71: c3 ret
00000d72 <getpid>:
d72: b8 0b 00 00 00 mov $0xb,%eax
d77: cd 40 int $0x40
d79: c3 ret
00000d7a <sbrk>:
d7a: b8 0c 00 00 00 mov $0xc,%eax
d7f: cd 40 int $0x40
d81: c3 ret
00000d82 <sleep>:
d82: b8 0d 00 00 00 mov $0xd,%eax
d87: cd 40 int $0x40
d89: c3 ret
00000d8a <uptime>:
d8a: b8 0e 00 00 00 mov $0xe,%eax
d8f: cd 40 int $0x40
d91: c3 ret
00000d92 <cps>:
d92: b8 16 00 00 00 mov $0x16,%eax
d97: cd 40 int $0x40
d99: c3 ret
00000d9a <cht>:
d9a: b8 17 00 00 00 mov $0x17,%eax
d9f: cd 40 int $0x40
da1: c3 ret
da2: 66 90 xchg %ax,%ax
da4: 66 90 xchg %ax,%ax
da6: 66 90 xchg %ax,%ax
da8: 66 90 xchg %ax,%ax
daa: 66 90 xchg %ax,%ax
dac: 66 90 xchg %ax,%ax
dae: 66 90 xchg %ax,%ax
00000db0 <printint>:
write(fd, &c, 1);
}
static void
printint(int fd, int xx, int base, int sgn)
{
db0: 55 push %ebp
db1: 89 e5 mov %esp,%ebp
db3: 57 push %edi
db4: 56 push %esi
db5: 53 push %ebx
db6: 89 c6 mov %eax,%esi
db8: 83 ec 3c sub $0x3c,%esp
char buf[16];
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
dbb: 8b 5d 08 mov 0x8(%ebp),%ebx
dbe: 85 db test %ebx,%ebx
dc0: 74 7e je e40 <printint+0x90>
dc2: 89 d0 mov %edx,%eax
dc4: c1 e8 1f shr $0x1f,%eax
dc7: 84 c0 test %al,%al
dc9: 74 75 je e40 <printint+0x90>
neg = 1;
x = -xx;
dcb: 89 d0 mov %edx,%eax
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
neg = 1;
dcd: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp)
x = -xx;
dd4: f7 d8 neg %eax
dd6: 89 75 c0 mov %esi,-0x40(%ebp)
} else {
x = xx;
}
i = 0;
dd9: 31 ff xor %edi,%edi
ddb: 8d 5d d7 lea -0x29(%ebp),%ebx
dde: 89 ce mov %ecx,%esi
de0: eb 08 jmp dea <printint+0x3a>
de2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
do{
buf[i++] = digits[x % base];
de8: 89 cf mov %ecx,%edi
dea: 31 d2 xor %edx,%edx
dec: 8d 4f 01 lea 0x1(%edi),%ecx
def: f7 f6 div %esi
df1: 0f b6 92 60 12 00 00 movzbl 0x1260(%edx),%edx
}while((x /= base) != 0);
df8: 85 c0 test %eax,%eax
x = xx;
}
i = 0;
do{
buf[i++] = digits[x % base];
dfa: 88 14 0b mov %dl,(%ebx,%ecx,1)
}while((x /= base) != 0);
dfd: 75 e9 jne de8 <printint+0x38>
if(neg)
dff: 8b 45 c4 mov -0x3c(%ebp),%eax
e02: 8b 75 c0 mov -0x40(%ebp),%esi
e05: 85 c0 test %eax,%eax
e07: 74 08 je e11 <printint+0x61>
buf[i++] = '-';
e09: c6 44 0d d8 2d movb $0x2d,-0x28(%ebp,%ecx,1)
e0e: 8d 4f 02 lea 0x2(%edi),%ecx
e11: 8d 7c 0d d7 lea -0x29(%ebp,%ecx,1),%edi
e15: 8d 76 00 lea 0x0(%esi),%esi
e18: 0f b6 07 movzbl (%edi),%eax
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
e1b: 83 ec 04 sub $0x4,%esp
e1e: 83 ef 01 sub $0x1,%edi
e21: 6a 01 push $0x1
e23: 53 push %ebx
e24: 56 push %esi
e25: 88 45 d7 mov %al,-0x29(%ebp)
e28: e8 e5 fe ff ff call d12 <write>
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
e2d: 83 c4 10 add $0x10,%esp
e30: 39 df cmp %ebx,%edi
e32: 75 e4 jne e18 <printint+0x68>
putc(fd, buf[i]);
}
e34: 8d 65 f4 lea -0xc(%ebp),%esp
e37: 5b pop %ebx
e38: 5e pop %esi
e39: 5f pop %edi
e3a: 5d pop %ebp
e3b: c3 ret
e3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
neg = 0;
if(sgn && xx < 0){
neg = 1;
x = -xx;
} else {
x = xx;
e40: 89 d0 mov %edx,%eax
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
e42: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
e49: eb 8b jmp dd6 <printint+0x26>
e4b: 90 nop
e4c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
00000e50 <printf>:
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
e50: 55 push %ebp
e51: 89 e5 mov %esp,%ebp
e53: 57 push %edi
e54: 56 push %esi
e55: 53 push %ebx
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
e56: 8d 45 10 lea 0x10(%ebp),%eax
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
e59: 83 ec 2c sub $0x2c,%esp
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
e5c: 8b 75 0c mov 0xc(%ebp),%esi
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
e5f: 8b 7d 08 mov 0x8(%ebp),%edi
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
e62: 89 45 d0 mov %eax,-0x30(%ebp)
e65: 0f b6 1e movzbl (%esi),%ebx
e68: 83 c6 01 add $0x1,%esi
e6b: 84 db test %bl,%bl
e6d: 0f 84 b0 00 00 00 je f23 <printf+0xd3>
e73: 31 d2 xor %edx,%edx
e75: eb 39 jmp eb0 <printf+0x60>
e77: 89 f6 mov %esi,%esi
e79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
e80: 83 f8 25 cmp $0x25,%eax
e83: 89 55 d4 mov %edx,-0x2c(%ebp)
state = '%';
e86: ba 25 00 00 00 mov $0x25,%edx
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
e8b: 74 18 je ea5 <printf+0x55>
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
e8d: 8d 45 e2 lea -0x1e(%ebp),%eax
e90: 83 ec 04 sub $0x4,%esp
e93: 88 5d e2 mov %bl,-0x1e(%ebp)
e96: 6a 01 push $0x1
e98: 50 push %eax
e99: 57 push %edi
e9a: e8 73 fe ff ff call d12 <write>
e9f: 8b 55 d4 mov -0x2c(%ebp),%edx
ea2: 83 c4 10 add $0x10,%esp
ea5: 83 c6 01 add $0x1,%esi
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
ea8: 0f b6 5e ff movzbl -0x1(%esi),%ebx
eac: 84 db test %bl,%bl
eae: 74 73 je f23 <printf+0xd3>
c = fmt[i] & 0xff;
if(state == 0){
eb0: 85 d2 test %edx,%edx
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
c = fmt[i] & 0xff;
eb2: 0f be cb movsbl %bl,%ecx
eb5: 0f b6 c3 movzbl %bl,%eax
if(state == 0){
eb8: 74 c6 je e80 <printf+0x30>
if(c == '%'){
state = '%';
} else {
putc(fd, c);
}
} else if(state == '%'){
eba: 83 fa 25 cmp $0x25,%edx
ebd: 75 e6 jne ea5 <printf+0x55>
if(c == 'd'){
ebf: 83 f8 64 cmp $0x64,%eax
ec2: 0f 84 f8 00 00 00 je fc0 <printf+0x170>
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
ec8: 81 e1 f7 00 00 00 and $0xf7,%ecx
ece: 83 f9 70 cmp $0x70,%ecx
ed1: 74 5d je f30 <printf+0xe0>
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
ed3: 83 f8 73 cmp $0x73,%eax
ed6: 0f 84 84 00 00 00 je f60 <printf+0x110>
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
edc: 83 f8 63 cmp $0x63,%eax
edf: 0f 84 ea 00 00 00 je fcf <printf+0x17f>
putc(fd, *ap);
ap++;
} else if(c == '%'){
ee5: 83 f8 25 cmp $0x25,%eax
ee8: 0f 84 c2 00 00 00 je fb0 <printf+0x160>
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
eee: 8d 45 e7 lea -0x19(%ebp),%eax
ef1: 83 ec 04 sub $0x4,%esp
ef4: c6 45 e7 25 movb $0x25,-0x19(%ebp)
ef8: 6a 01 push $0x1
efa: 50 push %eax
efb: 57 push %edi
efc: e8 11 fe ff ff call d12 <write>
f01: 83 c4 0c add $0xc,%esp
f04: 8d 45 e6 lea -0x1a(%ebp),%eax
f07: 88 5d e6 mov %bl,-0x1a(%ebp)
f0a: 6a 01 push $0x1
f0c: 50 push %eax
f0d: 57 push %edi
f0e: 83 c6 01 add $0x1,%esi
f11: e8 fc fd ff ff call d12 <write>
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
f16: 0f b6 5e ff movzbl -0x1(%esi),%ebx
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
f1a: 83 c4 10 add $0x10,%esp
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
f1d: 31 d2 xor %edx,%edx
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
f1f: 84 db test %bl,%bl
f21: 75 8d jne eb0 <printf+0x60>
putc(fd, c);
}
state = 0;
}
}
}
f23: 8d 65 f4 lea -0xc(%ebp),%esp
f26: 5b pop %ebx
f27: 5e pop %esi
f28: 5f pop %edi
f29: 5d pop %ebp
f2a: c3 ret
f2b: 90 nop
f2c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
printint(fd, *ap, 16, 0);
f30: 83 ec 0c sub $0xc,%esp
f33: b9 10 00 00 00 mov $0x10,%ecx
f38: 6a 00 push $0x0
f3a: 8b 5d d0 mov -0x30(%ebp),%ebx
f3d: 89 f8 mov %edi,%eax
f3f: 8b 13 mov (%ebx),%edx
f41: e8 6a fe ff ff call db0 <printint>
ap++;
f46: 89 d8 mov %ebx,%eax
f48: 83 c4 10 add $0x10,%esp
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
f4b: 31 d2 xor %edx,%edx
if(c == 'd'){
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
printint(fd, *ap, 16, 0);
ap++;
f4d: 83 c0 04 add $0x4,%eax
f50: 89 45 d0 mov %eax,-0x30(%ebp)
f53: e9 4d ff ff ff jmp ea5 <printf+0x55>
f58: 90 nop
f59: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
} else if(c == 's'){
s = (char*)*ap;
f60: 8b 45 d0 mov -0x30(%ebp),%eax
f63: 8b 18 mov (%eax),%ebx
ap++;
f65: 83 c0 04 add $0x4,%eax
f68: 89 45 d0 mov %eax,-0x30(%ebp)
if(s == 0)
s = "(null)";
f6b: b8 58 12 00 00 mov $0x1258,%eax
f70: 85 db test %ebx,%ebx
f72: 0f 44 d8 cmove %eax,%ebx
while(*s != 0){
f75: 0f b6 03 movzbl (%ebx),%eax
f78: 84 c0 test %al,%al
f7a: 74 23 je f9f <printf+0x14f>
f7c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
f80: 88 45 e3 mov %al,-0x1d(%ebp)
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
f83: 8d 45 e3 lea -0x1d(%ebp),%eax
f86: 83 ec 04 sub $0x4,%esp
f89: 6a 01 push $0x1
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
f8b: 83 c3 01 add $0x1,%ebx
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
f8e: 50 push %eax
f8f: 57 push %edi
f90: e8 7d fd ff ff call d12 <write>
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
f95: 0f b6 03 movzbl (%ebx),%eax
f98: 83 c4 10 add $0x10,%esp
f9b: 84 c0 test %al,%al
f9d: 75 e1 jne f80 <printf+0x130>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
f9f: 31 d2 xor %edx,%edx
fa1: e9 ff fe ff ff jmp ea5 <printf+0x55>
fa6: 8d 76 00 lea 0x0(%esi),%esi
fa9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
fb0: 83 ec 04 sub $0x4,%esp
fb3: 88 5d e5 mov %bl,-0x1b(%ebp)
fb6: 8d 45 e5 lea -0x1b(%ebp),%eax
fb9: 6a 01 push $0x1
fbb: e9 4c ff ff ff jmp f0c <printf+0xbc>
} else {
putc(fd, c);
}
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
fc0: 83 ec 0c sub $0xc,%esp
fc3: b9 0a 00 00 00 mov $0xa,%ecx
fc8: 6a 01 push $0x1
fca: e9 6b ff ff ff jmp f3a <printf+0xea>
fcf: 8b 5d d0 mov -0x30(%ebp),%ebx
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
fd2: 83 ec 04 sub $0x4,%esp
fd5: 8b 03 mov (%ebx),%eax
fd7: 6a 01 push $0x1
fd9: 88 45 e4 mov %al,-0x1c(%ebp)
fdc: 8d 45 e4 lea -0x1c(%ebp),%eax
fdf: 50 push %eax
fe0: 57 push %edi
fe1: e8 2c fd ff ff call d12 <write>
fe6: e9 5b ff ff ff jmp f46 <printf+0xf6>
feb: 66 90 xchg %ax,%ax
fed: 66 90 xchg %ax,%ax
fef: 90 nop
00000ff0 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
ff0: 55 push %ebp
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
ff1: a1 84 18 00 00 mov 0x1884,%eax
static Header base;
static Header *freep;
void
free(void *ap)
{
ff6: 89 e5 mov %esp,%ebp
ff8: 57 push %edi
ff9: 56 push %esi
ffa: 53 push %ebx
ffb: 8b 5d 08 mov 0x8(%ebp),%ebx
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
ffe: 8b 10 mov (%eax),%edx
void
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
1000: 8d 4b f8 lea -0x8(%ebx),%ecx
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
1003: 39 c8 cmp %ecx,%eax
1005: 73 19 jae 1020 <free+0x30>
1007: 89 f6 mov %esi,%esi
1009: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
1010: 39 d1 cmp %edx,%ecx
1012: 72 1c jb 1030 <free+0x40>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
1014: 39 d0 cmp %edx,%eax
1016: 73 18 jae 1030 <free+0x40>
static Header base;
static Header *freep;
void
free(void *ap)
{
1018: 89 d0 mov %edx,%eax
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
101a: 39 c8 cmp %ecx,%eax
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
101c: 8b 10 mov (%eax),%edx
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
101e: 72 f0 jb 1010 <free+0x20>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
1020: 39 d0 cmp %edx,%eax
1022: 72 f4 jb 1018 <free+0x28>
1024: 39 d1 cmp %edx,%ecx
1026: 73 f0 jae 1018 <free+0x28>
1028: 90 nop
1029: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
break;
if(bp + bp->s.size == p->s.ptr){
1030: 8b 73 fc mov -0x4(%ebx),%esi
1033: 8d 3c f1 lea (%ecx,%esi,8),%edi
1036: 39 d7 cmp %edx,%edi
1038: 74 19 je 1053 <free+0x63>
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
103a: 89 53 f8 mov %edx,-0x8(%ebx)
if(p + p->s.size == bp){
103d: 8b 50 04 mov 0x4(%eax),%edx
1040: 8d 34 d0 lea (%eax,%edx,8),%esi
1043: 39 f1 cmp %esi,%ecx
1045: 74 23 je 106a <free+0x7a>
p->s.size += bp->s.size;
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
1047: 89 08 mov %ecx,(%eax)
freep = p;
1049: a3 84 18 00 00 mov %eax,0x1884
}
104e: 5b pop %ebx
104f: 5e pop %esi
1050: 5f pop %edi
1051: 5d pop %ebp
1052: c3 ret
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
bp->s.size += p->s.ptr->s.size;
1053: 03 72 04 add 0x4(%edx),%esi
1056: 89 73 fc mov %esi,-0x4(%ebx)
bp->s.ptr = p->s.ptr->s.ptr;
1059: 8b 10 mov (%eax),%edx
105b: 8b 12 mov (%edx),%edx
105d: 89 53 f8 mov %edx,-0x8(%ebx)
} else
bp->s.ptr = p->s.ptr;
if(p + p->s.size == bp){
1060: 8b 50 04 mov 0x4(%eax),%edx
1063: 8d 34 d0 lea (%eax,%edx,8),%esi
1066: 39 f1 cmp %esi,%ecx
1068: 75 dd jne 1047 <free+0x57>
p->s.size += bp->s.size;
106a: 03 53 fc add -0x4(%ebx),%edx
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
freep = p;
106d: a3 84 18 00 00 mov %eax,0x1884
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
if(p + p->s.size == bp){
p->s.size += bp->s.size;
1072: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
1075: 8b 53 f8 mov -0x8(%ebx),%edx
1078: 89 10 mov %edx,(%eax)
} else
p->s.ptr = bp;
freep = p;
}
107a: 5b pop %ebx
107b: 5e pop %esi
107c: 5f pop %edi
107d: 5d pop %ebp
107e: c3 ret
107f: 90 nop
00001080 <malloc>:
return freep;
}
void*
malloc(uint nbytes)
{
1080: 55 push %ebp
1081: 89 e5 mov %esp,%ebp
1083: 57 push %edi
1084: 56 push %esi
1085: 53 push %ebx
1086: 83 ec 0c sub $0xc,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
1089: 8b 45 08 mov 0x8(%ebp),%eax
if((prevp = freep) == 0){
108c: 8b 15 84 18 00 00 mov 0x1884,%edx
malloc(uint nbytes)
{
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
1092: 8d 78 07 lea 0x7(%eax),%edi
1095: c1 ef 03 shr $0x3,%edi
1098: 83 c7 01 add $0x1,%edi
if((prevp = freep) == 0){
109b: 85 d2 test %edx,%edx
109d: 0f 84 a3 00 00 00 je 1146 <malloc+0xc6>
10a3: 8b 02 mov (%edx),%eax
10a5: 8b 48 04 mov 0x4(%eax),%ecx
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
10a8: 39 cf cmp %ecx,%edi
10aa: 76 74 jbe 1120 <malloc+0xa0>
10ac: 81 ff 00 10 00 00 cmp $0x1000,%edi
10b2: be 00 10 00 00 mov $0x1000,%esi
10b7: 8d 1c fd 00 00 00 00 lea 0x0(,%edi,8),%ebx
10be: 0f 43 f7 cmovae %edi,%esi
10c1: ba 00 80 00 00 mov $0x8000,%edx
10c6: 81 ff ff 0f 00 00 cmp $0xfff,%edi
10cc: 0f 46 da cmovbe %edx,%ebx
10cf: eb 10 jmp 10e1 <malloc+0x61>
10d1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
10d8: 8b 02 mov (%edx),%eax
if(p->s.size >= nunits){
10da: 8b 48 04 mov 0x4(%eax),%ecx
10dd: 39 cf cmp %ecx,%edi
10df: 76 3f jbe 1120 <malloc+0xa0>
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
10e1: 39 05 84 18 00 00 cmp %eax,0x1884
10e7: 89 c2 mov %eax,%edx
10e9: 75 ed jne 10d8 <malloc+0x58>
char *p;
Header *hp;
if(nu < 4096)
nu = 4096;
p = sbrk(nu * sizeof(Header));
10eb: 83 ec 0c sub $0xc,%esp
10ee: 53 push %ebx
10ef: e8 86 fc ff ff call d7a <sbrk>
if(p == (char*)-1)
10f4: 83 c4 10 add $0x10,%esp
10f7: 83 f8 ff cmp $0xffffffff,%eax
10fa: 74 1c je 1118 <malloc+0x98>
return 0;
hp = (Header*)p;
hp->s.size = nu;
10fc: 89 70 04 mov %esi,0x4(%eax)
free((void*)(hp + 1));
10ff: 83 ec 0c sub $0xc,%esp
1102: 83 c0 08 add $0x8,%eax
1105: 50 push %eax
1106: e8 e5 fe ff ff call ff0 <free>
return freep;
110b: 8b 15 84 18 00 00 mov 0x1884,%edx
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
1111: 83 c4 10 add $0x10,%esp
1114: 85 d2 test %edx,%edx
1116: 75 c0 jne 10d8 <malloc+0x58>
return 0;
1118: 31 c0 xor %eax,%eax
111a: eb 1c jmp 1138 <malloc+0xb8>
111c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
if(p->s.size == nunits)
1120: 39 cf cmp %ecx,%edi
1122: 74 1c je 1140 <malloc+0xc0>
prevp->s.ptr = p->s.ptr;
else {
p->s.size -= nunits;
1124: 29 f9 sub %edi,%ecx
1126: 89 48 04 mov %ecx,0x4(%eax)
p += p->s.size;
1129: 8d 04 c8 lea (%eax,%ecx,8),%eax
p->s.size = nunits;
112c: 89 78 04 mov %edi,0x4(%eax)
}
freep = prevp;
112f: 89 15 84 18 00 00 mov %edx,0x1884
return (void*)(p + 1);
1135: 83 c0 08 add $0x8,%eax
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
}
1138: 8d 65 f4 lea -0xc(%ebp),%esp
113b: 5b pop %ebx
113c: 5e pop %esi
113d: 5f pop %edi
113e: 5d pop %ebp
113f: c3 ret
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
if(p->s.size == nunits)
prevp->s.ptr = p->s.ptr;
1140: 8b 08 mov (%eax),%ecx
1142: 89 0a mov %ecx,(%edx)
1144: eb e9 jmp 112f <malloc+0xaf>
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
1146: c7 05 84 18 00 00 88 movl $0x1888,0x1884
114d: 18 00 00
1150: c7 05 88 18 00 00 88 movl $0x1888,0x1888
1157: 18 00 00
base.s.size = 0;
115a: b8 88 18 00 00 mov $0x1888,%eax
115f: c7 05 8c 18 00 00 00 movl $0x0,0x188c
1166: 00 00 00
1169: e9 3e ff ff ff jmp 10ac <malloc+0x2c>
|
programs/oeis/107/A107253.asm
|
karttu/loda
| 0 |
103969
|
; A107253: a(n) = n^4 - 15*n + 15.
; 1,1,51,211,565,1221,2311,3991,6441,9865,14491,20571,28381,38221,50415,65311,83281,104721,130051,159715,194181,233941,279511,331431,390265,456601,531051,614251,706861,809565,923071,1048111,1185441,1335841,1500115,1679091,1873621,2084581,2312871,2559415,2825161,3111081,3418171,3747451,4099965,4476781,4878991,5307711,5764081,6249265,6764451,7310851,7889701,8502261,9149815,9833671,10555161,11315641,12116491,12959115,13844941,14775421,15752031,16776271,17849665,18973761,20150131,21380371,22666101,24008965,25410631,26872791,28397161,29985481,31639515,33361051,35151901,37013901,38948911,40958815,43045521,45210961,47457091,49785891,52199365,54699541,57288471,59968231,62740921,65608665,68573611,71637931,74803821,78073501,81449215,84933231,88527841,92235361,96058131,99998515,104058901,108241701,112549351,116984311,121549065,126246121,131078011,136047291,141156541,146408365,151805391,157350271,163045681,168894321,174898915,181062211,187386981,193876021,200532151,207358215,214357081,221531641,228884811,236419531,244138765,252045501,260142751,268433551,276920961,285608065,294497971,303593811,312898741,322415941,332148615,342099991,352273321,362671881,373298971,384157915,395252061,406584781,418159471,429979551,442048465,454369681,466946691,479783011,492882181,506247765,519883351,533792551,547979001,562446361,577198315,592238571,607570861,623198941,639126591,655357615,671895841,688745121,705909331,723392371,741198165,759330661,777793831,796591671,815728201,835207465,855033531,875210491,895742461,916633581,937888015,959509951,981503601,1003873201,1026623011,1049757315,1073280421,1097196661,1121510391,1146225991,1171347865,1196880441,1222828171,1249195531,1275987021,1303207165,1330860511,1358951631,1387485121,1416465601,1445897715,1475786131,1506135541,1536950661,1568236231,1599997015,1632237801,1664963401,1698178651,1731888411,1766097565,1800811021,1836033711,1871770591,1908026641,1944806865,1982116291,2019959971,2058342981,2097270421,2136747415,2176779111,2217370681,2258527321,2300254251,2342556715,2385439981,2428909341,2472970111,2517627631,2562887265,2608754401,2655234451,2702332851,2750055061,2798406565,2847392871,2897019511,2947292041,2998216041,3049797115,3102040891,3154953021,3208539181,3262805071,3317756415,3373398961,3429738481,3486780771,3544531651,3602996965,3662182581,3722094391,3782738311,3844120281,3906246265
mov $3,$0
mov $7,$0
add $7,1
lpb $7,1
mov $0,$3
sub $7,1
sub $0,$7
mov $9,$0
mov $11,2
lpb $11,1
sub $11,1
add $0,$11
sub $0,1
mov $2,$0
mov $5,$0
cmp $5,$0
add $2,$5
mov $4,$2
pow $4,4
mov $6,$11
mov $8,$4
add $8,15
lpb $6,1
sub $6,1
mov $10,$8
lpe
lpe
lpb $9,1
mov $9,0
sub $10,$8
lpe
mov $8,$10
sub $8,15
add $1,$8
lpe
|
8086/7strop/searchstr.asm
|
iamvk1437k/mpmc
| 1 |
23691
|
<filename>8086/7strop/searchstr.asm
.model small
.stack 100h
.data
text db 'Hello world'
count dw 13
search db 'x'
found db 'String Found$'
notfound db 'String NOT Found$'
.code
begin: mov ax,@data
mov ds,ax
mov es,ax
mov cx,count
mov di,offset text
mov al,search
repne scasb
jz yes
mov dx,offset notfound
mov ah,09
int 21h
jmp over
yes: mov dx,offset found
mov ah,09
int 21h
over: mov ah,4ch
int 21h
end begin
|
3_1.asm
|
EduardaSRBastos/Assembly-2020
| 0 |
28113
|
n_linha EQU 10
MOV CX, n_linha ;0=repete 2^16
R1:
MOV AH,1
INT 21H
LOOP R1
|
src/glfw/v2/glfw-events-mouse.ads
|
Roldak/OpenGLAda
| 0 |
17744
|
<gh_stars>0
-- part of OpenGLAda, (c) 2017 <NAME>
-- released under the terms of the MIT license, see the file "COPYING"
package Glfw.Events.Mouse is
type Button is new Interfaces.C.int range 0 .. 7;
Left_Button : constant := 0;
Right_Button : constant := 1;
Middle_Button : constant := 2;
subtype Coordinate is Interfaces.C.int;
subtype Wheel_Position is Interfaces.C.int;
type Button_Callback is access procedure (Subject : Button; Action : Button_State);
type Position_Callback is access procedure (X, Y : Coordinate);
type Wheel_Callback is access procedure (Pos : Wheel_Position);
function Pressed (Query : Button) return Boolean;
procedure Get_Position (X, Y : out Coordinate);
procedure Set_Position (X, Y : Coordinate);
function Wheel return Wheel_Position;
procedure Set_Wheel (Value : Wheel_Position);
procedure Set_Button_Callback (Callback : Button_Callback);
procedure Set_Position_Callback (Callback : Position_Callback);
procedure Set_Wheel_Callback (Callback : Wheel_Callback);
procedure Toggle_Mouse_Cursor (Visible : Boolean);
procedure Toggle_Sticky_Mouse_Buttons (Enable : Boolean);
private
for Button'Size use Interfaces.C.int'Size;
end Glfw.Events.Mouse;
|
src/unison/test/fast/Hexagon/speed/gcc.xexit.xexit.asm
|
Patstrom/disUnison
| 88 |
245492
|
<gh_stars>10-100
.text
.file "gcc.xexit.xexit.ll"
.globl xexit
.align 16
.type xexit,@function
xexit: // @xexit
// BB#0:
{
r16 = r0
memd(r29 + #-16) = r17:16
allocframe(#8)
}
{
r1 = memw(##_xexit_cleanup)
if (cmp.eq(r1.new, #0)) jump:t .LBB0_2
}
{
jump .LBB0_1
}
.LBB0_1:
{
callr r1
}
.LBB0_2:
{
call exit
r0 = r16
}
{
r17:16 = memd(r29 + #0)
deallocframe
}
.Lfunc_end0:
.size xexit, .Lfunc_end0-xexit
.ident "clang version 3.8.0 (http://llvm.org/git/clang.git 2d49f0a0ae8366964a93e3b7b26e29679bee7160) (http://llvm.org/git/llvm.git 60bc66b44837125843b58ed3e0fd2e6bb948d839)"
.section ".note.GNU-stack","",@progbits
|
Kush.g4
|
itssamuelrowe/kushjs
| 1 |
1663
|
grammar Kush;
compilationUnit
: importDeclaration*
componentDeclarations*
EOF
;
componentDeclarations
: functionDeclaration
| structureDeclaration
;
importDeclaration
: 'import' qualifiedName ';'
;
qualifiedName
: IDENTIFIER ('.' IDENTIFIER)*
;
functionDeclaration
: returnType IDENTIFIER functionParameters functionBody
;
functionParameters
: '(' functionParameterList? ')'
;
functionParameterList
: functionParameter (',' functionParameter)* (',' variableFunctionParameter)?
| variableFunctionParameter
;
functionParameter
: type IDENTIFIER
;
variableFunctionParameter
: type '...' IDENTIFIER
;
functionBody
: blockStatement
;
blockStatement
: '{' statement* '}'
;
statement
: simpleStatement
| compoundStatement
;
simpleStatement
: unterminatedSimpleStatement ';'
;
unterminatedSimpleStatement
: expressionStatement
| emptyStatement
| storageDeclaration
| breakStatement
| returnStatement
| throwStatement
;
expressionStatement
: expression
;
emptyStatement
: ';'
;
storageDeclaration
: ('var' | 'let' | type) storageDeclarator (',' storageDeclarator)*
;
storageDeclarator
: IDENTIFIER ('=' expression)?
;
breakStatement
: 'break' IDENTIFIER?
;
returnStatement
: 'return' expression
;
throwStatement
: 'throw' expression
;
compoundStatement
: ifStatement
| iterativeStatement
;
ifStatement
: ifClause elseIfClause* elseClause?
;
ifClause
: 'if' expression blockStatement
;
elseIfClause
: 'else' 'if' expression blockStatement
;
elseClause
: 'else' blockStatement
;
iterativeStatement
: labelClause? (whileStatement | forStatement)
;
labelClause
: '#' IDENTIFIER
;
whileStatement
: 'while' expression blockStatement
;
forStatement
: 'for' 'var' IDENTIFIER ':' expression blockStatement
;
structureDeclaration
: 'struct' IDENTIFIER structureBody
;
structureBody
: '{' structureMembers? '}'
;
structureMembers
: structureMember+
;
structureMember
: type IDENTIFIER ';'
;
type
: componentType ('[' ']')*
;
componentType
: IDENTIFIER
| 'boolean'
| 'i8'
| 'i16'
| 'i32'
| 'i64'
| 'f32'
| 'f64'
;
returnType
: 'void'
| type
;
expressions
: expression (',' expression)*
;
expression
: assignmentExpression
;
assignmentExpression
: conditionalExpression ('=' assignmentExpression)?
;
conditionalExpression
: condition ('?' expression ':' conditionalExpression)?
;
condition
: logicalAndExpression ('||' logicalAndExpression)*
;
logicalAndExpression
: inclusiveOrExpression ('&&' logicalAndExpression)?
;
inclusiveOrExpression
: exclusiveOrExpression ('|' exclusiveOrExpression)*
;
exclusiveOrExpression
: andExpression ('^' andExpression)*
;
andExpression
: equalityExpression ('&' equalityExpression)*
;
equalityExpression
: relationalExpression (equalityOperator relationalExpression)*
;
equalityOperator
: '=='
| '!='
;
relationalExpression
: shiftExpression (relationalOperator shiftExpression)*
;
relationalOperator
: '<'
| '>'
| '<='
| '>='
;
shiftExpression
: additiveExpression (shiftOperator additiveExpression)*
;
shiftOperator
: '<<'
| '>>'
;
additiveExpression
: multiplicativeExpression (multiplicativeOperator multiplicativeExpression)*
;
additiveOperator
: '+'
| '-'
;
multiplicativeExpression
: unaryExpression (multiplicativeOperator unaryExpression)*
;
multiplicativeOperator
: '*'
| '/'
| '%'
;
unaryExpression
: unaryOperator unaryExpression
| postfixExpression
;
unaryOperator
: '+'
| '-'
| '~'
| '!'
;
postfixExpression
: primaryExpression postfixPart*
;
postfixPart
: subscript
| functionArguments
| memberAccess
;
subscript
: '[' expression ']'
;
functionArguments
: '(' expressions? ')'
;
memberAccess
: '.' IDENTIFIER
;
primaryExpression
: IDENTIFIER
| literal
| '(' expression ')'
| listExpression
| constructorExpression
| closureExpression
| newExpression
;
constructorExpression
: '{' memberAssignments? '}'
;
memberAssignments
: memberAssignment (',' memberAssignment)*
;
memberAssignment
: IDENTIFIER ':' expression
;
literal
: INTEGER_LITERAL
| FLOATING_POINT_LITERAL
| 'true'
| 'false'
| STRING_LITERAL
| 'null'
| 'this'
;
listExpression
: '[' expressions ']'
;
newExpression
: 'new' IDENTIFIER functionArguments
;
closureExpression
: '@' closureParameters? closureBody
;
closureParameters
: '(' IDENTIFIER (',' IDENTIFIER)+ ')'
| IDENTIFIER
;
closureBody
: '->' expression
| blockStatement
;
/*
The various forms of a closure are given below.
```
@ -> expression
@argument -> expression
@(argument1, argument2) -> expression
@{
statement1
...
statementN
}
@argument {
statement1
...
statementN
}
@(argument1, argument2) {
statement1
...
statementN
}
```
*/
WS : [ \t\r\n\u000C]+ -> skip
;
COMMENT
: '/*' .*? '*/' -> skip
;
LINE_COMMENT
: '//' ~[\r\n]* -> skip
;
IDENTIFIER
: [a-zA-Z_][a-zA-Z_0-9]+
;
STRING_LITERAL
: '\'' StringCharacter+? '\''
;
fragment StringCharacter
: ~["\\]
| EscapeSequence
;
fragment EscapeSequence
: '\\' [btnfr"'\\]
;
INTEGER_LITERAL
: DecimalIntegerLiteral
| HexIntegerLiteral
| OctalIntegerLiteral
| BinaryIntegerLiteral
;
fragment
DecimalIntegerLiteral
: DecimalNumeral IntegerTypeSuffix?
;
fragment
HexIntegerLiteral
: HexNumeral IntegerTypeSuffix?
;
fragment
OctalIntegerLiteral
: OctalNumeral IntegerTypeSuffix?
;
fragment
BinaryIntegerLiteral
: BinaryNumeral IntegerTypeSuffix?
;
fragment
IntegerTypeSuffix
: [lL]
;
fragment
DecimalNumeral
: '0'
| NonZeroDigit (Digits? | Underscores Digits)
;
fragment
Digits
: Digit (DigitsAndUnderscores? Digit)?
;
fragment
Digit
: '0'
| NonZeroDigit
;
fragment
NonZeroDigit
: [1-9]
;
fragment
DigitsAndUnderscores
: DigitOrUnderscore+
;
fragment
DigitOrUnderscore
: Digit
| '_'
;
fragment
Underscores
: '_'+
;
fragment
HexNumeral
: '0' [xX] HexDigits
;
fragment
HexDigits
: HexDigit (HexDigitsAndUnderscores? HexDigit)?
;
fragment
HexDigit
: [0-9a-fA-F]
;
fragment
HexDigitsAndUnderscores
: HexDigitOrUnderscore+
;
fragment
HexDigitOrUnderscore
: HexDigit
| '_'
;
fragment
OctalNumeral
: '0' Underscores? OctalDigits
;
fragment
OctalDigits
: OctalDigit (OctalDigitsAndUnderscores? OctalDigit)?
;
fragment
OctalDigit
: [0-7]
;
fragment
OctalDigitsAndUnderscores
: OctalDigitOrUnderscore+
;
fragment
OctalDigitOrUnderscore
: OctalDigit
| '_'
;
fragment
BinaryNumeral
: '0' [bB] BinaryDigits
;
fragment
BinaryDigits
: BinaryDigit (BinaryDigitsAndUnderscores? BinaryDigit)?
;
fragment
BinaryDigit
: [01]
;
fragment
BinaryDigitsAndUnderscores
: BinaryDigitOrUnderscore+
;
fragment
BinaryDigitOrUnderscore
: BinaryDigit
| '_'
;
// §3.10.2 Floating-Point Literals
FLOATING_POINT_LITERAL
: DecimalFloatingPointLiteral
| HexadecimalFloatingPointLiteral
;
fragment
DecimalFloatingPointLiteral
: Digits '.' Digits? ExponentPart? FloatTypeSuffix?
| '.' Digits ExponentPart? FloatTypeSuffix?
| Digits ExponentPart FloatTypeSuffix?
| Digits FloatTypeSuffix
;
fragment
ExponentPart
: ExponentIndicator SignedInteger
;
fragment
ExponentIndicator
: [eE]
;
fragment
SignedInteger
: Sign? Digits
;
fragment
Sign
: [+\-]
;
fragment
FloatTypeSuffix
: [fFdD]
;
fragment
HexadecimalFloatingPointLiteral
: HexSignificand BinaryExponent FloatTypeSuffix?
;
fragment
HexSignificand
: HexNumeral '.'?
| '0' [xX] HexDigits? '.' HexDigits
;
fragment
BinaryExponent
: BinaryExponentIndicator SignedInteger
;
fragment
BinaryExponentIndicator
: [pP]
;
|
alloy4fun_models/trashltl/models/11/AMk9Gi8HbJuifA9Hk.als
|
Kaixi26/org.alloytools.alloy
| 0 |
1188
|
open main
pred idAMk9Gi8HbJuifA9Hk_prop12 {
eventually some Trash
}
pred __repair { idAMk9Gi8HbJuifA9Hk_prop12 }
check __repair { idAMk9Gi8HbJuifA9Hk_prop12 <=> prop12o }
|
src/STLC/Kovacs/NormalForm.agda
|
mietek/coquand-kovacs
| 0 |
13177
|
module STLC.Kovacs.NormalForm where
open import STLC.Kovacs.Embedding public
open import Category
--------------------------------------------------------------------------------
mutual
-- (Nfₑ)
renⁿᶠ : ∀ {Γ Γ′ A} → Γ′ ⊇ Γ → Γ ⊢ⁿᶠ A → Γ′ ⊢ⁿᶠ A
renⁿᶠ η (ƛ M) = ƛ (renⁿᶠ (liftₑ η) M)
renⁿᶠ η (ne M) = ne (renⁿᵉ η M)
-- (Neₑ)
renⁿᵉ : ∀ {Γ Γ′ A} → Γ′ ⊇ Γ → Γ ⊢ⁿᵉ A → Γ′ ⊢ⁿᵉ A
renⁿᵉ η (𝓋 i) = 𝓋 (getₑ η i)
renⁿᵉ η (M ∙ N) = renⁿᵉ η M ∙ renⁿᶠ η N
mutual
-- (Nf-idₑ)
idrenⁿᶠ : ∀ {Γ A} → (M : Γ ⊢ⁿᶠ A)
→ renⁿᶠ idₑ M ≡ M
idrenⁿᶠ (ƛ M) = ƛ & idrenⁿᶠ M
idrenⁿᶠ (ne M) = ne & idrenⁿᵉ M
-- (Ne-idₑ)
idrenⁿᵉ : ∀ {Γ A} → (M : Γ ⊢ⁿᵉ A)
→ renⁿᵉ idₑ M ≡ M
idrenⁿᵉ (𝓋 i) = 𝓋 & idgetₑ i
idrenⁿᵉ (M ∙ N) = _∙_ & idrenⁿᵉ M
⊗ idrenⁿᶠ N
mutual
-- (Nf-∘ₑ)
renⁿᶠ○ : ∀ {Γ Γ′ Γ″ A} → (η₁ : Γ″ ⊇ Γ′) (η₂ : Γ′ ⊇ Γ) (M : Γ ⊢ⁿᶠ A)
→ renⁿᶠ (η₂ ○ η₁) M ≡ (renⁿᶠ η₁ ∘ renⁿᶠ η₂) M
renⁿᶠ○ η₁ η₂ (ƛ M) = ƛ & renⁿᶠ○ (liftₑ η₁) (liftₑ η₂) M
renⁿᶠ○ η₁ η₂ (ne M) = ne & renⁿᵉ○ η₁ η₂ M
-- (Ne-∘ₑ)
renⁿᵉ○ : ∀ {Γ Γ′ Γ″ A} → (η₁ : Γ″ ⊇ Γ′) (η₂ : Γ′ ⊇ Γ) (M : Γ ⊢ⁿᵉ A)
→ renⁿᵉ (η₂ ○ η₁) M ≡ (renⁿᵉ η₁ ∘ renⁿᵉ η₂) M
renⁿᵉ○ η₁ η₂ (𝓋 i) = 𝓋 & get○ η₁ η₂ i
renⁿᵉ○ η₁ η₂ (M ∙ N) = _∙_ & renⁿᵉ○ η₁ η₂ M
⊗ renⁿᶠ○ η₁ η₂ N
--------------------------------------------------------------------------------
mutual
-- (⌜_⌝Nf)
embⁿᶠ : ∀ {Γ A} → Γ ⊢ⁿᶠ A → Γ ⊢ A
embⁿᶠ (ƛ M) = ƛ (embⁿᶠ M)
embⁿᶠ (ne M) = embⁿᵉ M
-- (⌜_⌝Ne)
embⁿᵉ : ∀ {Γ A} → Γ ⊢ⁿᵉ A → Γ ⊢ A
embⁿᵉ (𝓋 i) = 𝓋 i
embⁿᵉ (M ∙ N) = embⁿᵉ M ∙ embⁿᶠ N
mutual
-- (⌜⌝Nf-nat)
natembⁿᶠ : ∀ {A Γ Γ′} → (η : Γ′ ⊇ Γ) (M : Γ ⊢ⁿᶠ A)
→ (embⁿᶠ ∘ renⁿᶠ η) M ≡ (ren η ∘ embⁿᶠ) M
natembⁿᶠ η (ƛ M) = ƛ & natembⁿᶠ (liftₑ η) M
natembⁿᶠ η (ne M) = natembⁿᵉ η M
-- (⌜⌝Ne-nat)
natembⁿᵉ : ∀ {A Γ Γ′} → (η : Γ′ ⊇ Γ) (M : Γ ⊢ⁿᵉ A)
→ (embⁿᵉ ∘ renⁿᵉ η) M ≡ (ren η ∘ embⁿᵉ) M
natembⁿᵉ η (𝓋 i) = refl
natembⁿᵉ η (M ∙ N) = _∙_ & natembⁿᵉ η M
⊗ natembⁿᶠ η N
--------------------------------------------------------------------------------
renⁿᶠPsh : 𝒯 → Presheaf₀ 𝗢𝗣𝗘
renⁿᶠPsh A =
record
{ Fₓ = _⊢ⁿᶠ A
; F = renⁿᶠ
; idF = fext! idrenⁿᶠ
; F⋄ = λ η₁ η₂ → fext! (renⁿᶠ○ η₂ η₁)
}
renⁿᵉPsh : 𝒯 → Presheaf₀ 𝗢𝗣𝗘
renⁿᵉPsh A =
record
{ Fₓ = _⊢ⁿᵉ A
; F = renⁿᵉ
; idF = fext! idrenⁿᵉ
; F⋄ = λ η₁ η₂ → fext! (renⁿᵉ○ η₂ η₁)
}
embⁿᶠNT : ∀ {A} → NaturalTransformation (renⁿᶠPsh A) (renPsh A)
embⁿᶠNT =
record
{ N = embⁿᶠ
; natN = λ η → fext! (λ M → natembⁿᶠ η M)
}
embⁿᵉNT : ∀ {A} → NaturalTransformation (renⁿᵉPsh A) (renPsh A)
embⁿᵉNT =
record
{ N = embⁿᵉ
; natN = λ η → fext! (λ M → natembⁿᵉ η M)
}
--------------------------------------------------------------------------------
|
test/shld.asm
|
killvxk/AssemblyLine
| 147 |
11108
|
<reponame>killvxk/AssemblyLine
SECTION .text
GLOBAL test
test:
shld rax, rax, 0x5
shld rax, rbx, 0x5
shld rax, rcx, 0x5
shld rax, rdx, 0x5
shld rax, rdi, 0x5
shld rax, r8, 0x5
shld rax, r9, 0x5
shld rax, r10, 0x5
shld rax, r11, 0x5
shld rax, r12, 0x5
shld rax, r13, 0x5
shld rax, r14, 0x5
shld rax, r15, 0x5
shld rax, rsp, 0x5
shld rax, rsi, 0x5
shld rax, rbp, 0x5
shld rbx, rax, 0x5
shld rbx, rbx, 0x5
shld rbx, rcx, 0x5
shld rbx, rdx, 0x5
shld rbx, rdi, 0x5
shld rbx, r8, 0x5
shld rbx, r9, 0x5
shld rbx, r10, 0x5
shld rbx, r11, 0x5
shld rbx, r12, 0x5
shld rbx, r13, 0x5
shld rbx, r14, 0x5
shld rbx, r15, 0x5
shld rbx, rsp, 0x5
shld rbx, rsi, 0x5
shld rbx, rbp, 0x5
shld rcx, rax, 0x5
shld rcx, rbx, 0x5
shld rcx, rcx, 0x5
shld rcx, rdx, 0x5
shld rcx, rdi, 0x5
shld rcx, r8, 0x5
shld rcx, r9, 0x5
shld rcx, r10, 0x5
shld rcx, r11, 0x5
shld rcx, r12, 0x5
shld rcx, r13, 0x5
shld rcx, r14, 0x5
shld rcx, r15, 0x5
shld rcx, rsp, 0x5
shld rcx, rsi, 0x5
shld rcx, rbp, 0x5
shld rdx, rax, 0x5
shld rdx, rbx, 0x5
shld rdx, rcx, 0x5
shld rdx, rdx, 0x5
shld rdx, rdi, 0x5
shld rdx, r8, 0x5
shld rdx, r9, 0x5
shld rdx, r10, 0x5
shld rdx, r11, 0x5
shld rdx, r12, 0x5
shld rdx, r13, 0x5
shld rdx, r14, 0x5
shld rdx, r15, 0x5
shld rdx, rsp, 0x5
shld rdx, rsi, 0x5
shld rdx, rbp, 0x5
shld rdi, rax, 0x5
shld rdi, rbx, 0x5
shld rdi, rcx, 0x5
shld rdi, rdx, 0x5
shld rdi, rdi, 0x5
shld rdi, r8, 0x5
shld rdi, r9, 0x5
shld rdi, r10, 0x5
shld rdi, r11, 0x5
shld rdi, r12, 0x5
shld rdi, r13, 0x5
shld rdi, r14, 0x5
shld rdi, r15, 0x5
shld rdi, rsp, 0x5
shld rdi, rsi, 0x5
shld rdi, rbp, 0x5
shld r8, rax, 0x5
shld r8, rbx, 0x5
shld r8, rcx, 0x5
shld r8, rdx, 0x5
shld r8, rdi, 0x5
shld r8, r8, 0x5
shld r8, r9, 0x5
shld r8, r10, 0x5
shld r8, r11, 0x5
shld r8, r12, 0x5
shld r8, r13, 0x5
shld r8, r14, 0x5
shld r8, r15, 0x5
shld r8, rsp, 0x5
shld r8, rsi, 0x5
shld r8, rbp, 0x5
shld r9, rax, 0x5
shld r9, rbx, 0x5
shld r9, rcx, 0x5
shld r9, rdx, 0x5
shld r9, rdi, 0x5
shld r9, r8, 0x5
shld r9, r9, 0x5
shld r9, r10, 0x5
shld r9, r11, 0x5
shld r9, r12, 0x5
shld r9, r13, 0x5
shld r9, r14, 0x5
shld r9, r15, 0x5
shld r9, rsp, 0x5
shld r9, rsi, 0x5
shld r9, rbp, 0x5
shld r10, rax, 0x5
shld r10, rbx, 0x5
shld r10, rcx, 0x5
shld r10, rdx, 0x5
shld r10, rdi, 0x5
shld r10, r8, 0x5
shld r10, r9, 0x5
shld r10, r10, 0x5
shld r10, r11, 0x5
shld r10, r12, 0x5
shld r10, r13, 0x5
shld r10, r14, 0x5
shld r10, r15, 0x5
shld r10, rsp, 0x5
shld r10, rsi, 0x5
shld r10, rbp, 0x5
shld r11, rax, 0x5
shld r11, rbx, 0x5
shld r11, rcx, 0x5
shld r11, rdx, 0x5
shld r11, rdi, 0x5
shld r11, r8, 0x5
shld r11, r9, 0x7f
shld r11, r10, 0x7f
shld r11, r11, 0x7f
shld r11, r12, 0x7f
shld r11, r13, 0x7f
shld r11, r14, 0x7f
shld r11, r15, 0x7f
shld r11, rsp, 0x7f
shld r11, rsi, 0x7f
shld r11, rbp, 0x7f
shld r12, rax, 0x7f
shld r12, rbx, 0x7f
shld r12, rcx, 0x7f
shld r12, rdx, 0x7f
shld r12, rdi, 0x7f
shld r12, r8, 0x7f
shld r12, r9, 0x7f
shld r12, r10, 0x7f
shld r12, r11, 0x7f
shld r12, r12, 0x7f
shld r12, r13, 0x7f
shld r12, r14, 0x7f
shld r12, r15, 0x7f
shld r12, rsp, 0x7f
shld r12, rsi, 0x7f
shld r12, rbp, 0x7f
shld r13, rax, 0x7f
shld r13, rbx, 0x7f
shld r13, rcx, 0x7f
shld r13, rdx, 0x7f
shld r13, rdi, 0x7f
shld r13, r8, 0x7f
shld r13, r9, 0x7f
shld r13, r10, 0x7f
shld r13, r11, 0x7f
shld r13, r12, 0x7f
shld r13, r13, 0x7f
shld r13, r14, 0x7f
shld r13, r15, 0x7f
shld r13, rsp, 0x7f
shld r13, rsi, 0x7f
shld r13, rbp, 0x7f
shld r14, rax, 0x7f
shld r14, rbx, 0x7f
shld r14, rcx, 0x7f
shld r14, rdx, 0x7f
shld r14, rdi, 0x7f
shld r14, r8, 0x7f
shld r14, r9, 0x7f
shld r14, r10, 0x7f
shld r14, r11, 0x7f
shld r14, r12, 0x7f
shld r14, r13, 0x7f
shld r14, r14, 0x7f
shld r14, r15, 0x7f
shld r14, rsp, 0x7f
shld r14, rsi, 0x7f
shld r14, rbp, 0x7f
shld r15, rax, 0x7f
shld r15, rbx, 0x7f
shld r15, rcx, 0x7f
shld r15, rdx, 0x7f
shld r15, rdi, 0x7f
shld r15, r8, 0x7f
shld r15, r9, 0x7f
shld r15, r10, 0x7f
shld r15, r11, 0x7f
shld r15, r12, 0x7f
shld r15, r13, 0x7f
shld r15, r14, 0x7f
shld r15, r15, 0x7f
shld r15, rsp, 0x7f
shld r15, rsi, 0x7f
shld r15, rbp, 0x7f
shld rsp, rax, 0x7f
shld rsp, rbx, 0x7f
shld rsp, rcx, 0x7f
shld rsp, rdx, 0x7f
shld rsp, rdi, 0x7f
shld rsp, r8, 0xff
shld rsp, r9, 0xff
shld rsp, r10, 0xff
shld rsp, r11, 0xff
shld rsp, r12, 0xff
shld rsp, r13, 0xff
shld rsp, r14, 0xff
shld rsp, r15, 0xff
shld rsp, rsp, 0xff
shld rsp, rsi, 0xff
shld rsp, rbp, 0xff
shld rsi, rax, 0xff
shld rsi, rbx, 0xff
shld rsi, rcx, 0xff
shld rsi, rdx, 0xff
shld rsi, rdi, 0xff
shld rsi, r8, 0xff
shld rsi, r9, 0xff
shld rsi, r10, 0xff
shld rsi, r11, 0xff
shld rsi, r12, 0xff
shld rsi, r13, 0xff
shld rsi, r14, 0xff
shld rsi, r15, 0xff
shld rsi, rsp, 0xff
shld rsi, rsi, 0xff
shld rsi, rbp, 0xff
shld rbp, rax, 0xff
shld rbp, rbx, 0xff
shld rbp, rcx, 0xff
shld rbp, rdx, 0xff
shld rbp, rdi, 0xff
shld rbp, r8, 0xff
shld rbp, r9, 0xff
shld rbp, r10, 0xff
shld rbp, r11, 0xff
shld rbp, r12, 0xff
shld rbp, r13, 0xff
shld rbp, r14, 0xff
shld rbp, r15, 0xff
shld rbp, rsp, 0xff
shld rbp, rsi, 0xff
shld rbp, rbp, 0xff
shld ax, ax, 0xff
shld ax, bx, 0xff
shld ax, cx, 0xff
shld ax, dx, 0xff
shld ax, di, 0xff
shld ax, r8w, 0xff
shld ax, r9w, 0xff
shld ax, r10w, 0xff
shld ax, r11w, 0xff
shld ax, r12w, 0xff
shld ax, r13w, 0xff
shld ax, r14w, 0xff
shld ax, r15w, 0xff
shld ax, sp, 0xff
shld ax, si, 0xff
shld ax, bp, 0xff
shld bx, ax, 0xff
shld bx, bx, 0xff
shld bx, cx, 0xff
shld bx, dx, 0xff
shld bx, di, 0xff
shld bx, r8w, 0xff
shld bx, r9w, 0xff
shld bx, r10w, 0xff
shld bx, r11w, 0xff
shld bx, r12w, 0xff
shld bx, r13w, 0xff
shld bx, r14w, 0xff
shld bx, r15w, 0xff
shld bx, sp, 0xff
shld bx, si, 0xff
shld bx, bp, 0xff
shld cx, ax, 0xff
shld cx, bx, 0xff
shld cx, cx, 0xff
shld cx, dx, 0xff
shld cx, di, 0xff
shld cx, r8w, 0xff
shld cx, r9w, 0xff
shld cx, r10w, 0xff
shld cx, r11w, 0xff
shld cx, r12w, 0xff
shld cx, r13w, 0xff
shld cx, r14w, 0xff
shld cx, r15w, 0xff
shld cx, sp, 0xff
shld cx, si, 0xff
shld cx, bp, 0xff
shld dx, ax, 0xff
shld dx, bx, 0xff
shld dx, cx, 0xff
shld dx, dx, 0xff
shld dx, di, 0xff
shld dx, r8w, 0xff
shld dx, r9w, 0xff
shld dx, r10w, 0xff
shld dx, r11w, 0xff
shld dx, r12w, 0xff
shld dx, r13w, 0xff
shld dx, r14w, 0xff
shld dx, r15w, 0xff
shld dx, sp, 0xff
shld dx, si, 0xff
shld dx, bp, 0xff
shld di, ax, 0xff
shld di, bx, 0xff
shld di, cx, 0xff
shld di, dx, 0xff
shld di, di, 0xff
shld di, r8w, 0xff
shld di, r9w, 0xff
shld di, r10w, 0xff
shld di, r11w, 0xff
shld di, r12w, 0xff
shld di, r13w, 0xff
shld di, r14w, 0xff
shld di, r15w, 0xff
shld di, sp, 0xff
shld di, si, 0xff
shld di, bp, 0xff
shld r8w, ax, 0xff
shld r8w, bx, 0xff
shld r8w, cx, 0xff
shld r8w, dx, 0xff
shld r8w, di, 0xff
shld r8w, r8w, 0xff
shld r8w, r9w, 0xff
shld r8w, r10w, 0xff
shld r8w, r11w, 0xff
shld r8w, r12w, 0xff
shld r8w, r13w, 0xff
shld r8w, r14w, 0xff
shld r8w, r15w, 0xff
shld r8w, sp, 0xff
shld r8w, si, 0xff
shld r8w, bp, 0xff
shld r9w, ax, 0xff
shld r9w, bx, 0xff
shld r9w, cx, 0xff
shld r9w, dx, 0xff
shld r9w, di, 0xff
shld r9w, r8w, 0xff
shld r9w, r9w, 0xff
shld r9w, r10w, 0xff
shld r9w, r11w, 0xff
shld r9w, r12w, 0xff
shld r9w, r13w, 0xff
shld r9w, r14w, 0xff
shld r9w, r15w, 0xff
shld r9w, sp, 0xff
shld r9w, si, 0xff
shld r9w, bp, 0xff
shld r10w, ax, 0xff
shld r10w, bx, 0xff
shld r10w, cx, 0xff
shld r10w, dx, 0xff
shld r10w, di, 0xff
shld r10w, r8w, 0xff
shld r10w, r9w, 0xff
shld r10w, r10w, 0xff
shld r10w, r11w, 0xff
shld r10w, r12w, 0xff
shld r10w, r13w, 0xff
shld r10w, r14w, 0xff
shld r10w, r15w, 0xff
shld r10w, sp, 0xff
shld r10w, si, 0xff
shld r10w, bp, 0xff
shld r11w, ax, 0xff
shld r11w, bx, 0xff
shld r11w, cx, 0xff
shld r11w, dx, 0xff
shld r11w, di, 0xff
shld r11w, r8w, 0xff
shld r11w, r9w, 0xff
shld r11w, r10w, 0xff
shld r11w, r11w, 0xff
shld r11w, r12w, 0xff
shld r11w, r13w, 0xff
shld r11w, r14w, 0xff
shld r11w, r15w, 0xff
shld r11w, sp, 0xff
shld r11w, si, 0xff
shld r11w, bp, 0xff
shld r12w, ax, 0xff
shld r12w, bx, 0xff
shld r12w, cx, 0xff
shld r12w, dx, 0xff
shld r12w, di, 0xff
shld r12w, r8w, 0xff
shld r12w, r9w, 0xff
shld r12w, r10w, 0xff
shld r12w, r11w, 0xff
shld r12w, r12w, 0xff
shld r12w, r13w, 0xff
shld r12w, r14w, 0xff
shld r12w, r15w, 0xff
shld r12w, sp, 0xff
shld r12w, si, 0xff
shld r12w, bp, 0xff
shld r13w, ax, 0xff
shld r13w, bx, 0xff
shld r13w, cx, 0xff
shld r13w, dx, 0xff
shld r13w, di, 0xff
shld r13w, r8w, 0xff
shld r13w, r9w, 0xff
shld r13w, r10w, 0xff
shld r13w, r11w, 0xff
shld r13w, r12w, 0xff
shld r13w, r13w, 0xff
shld r13w, r14w, 0x80
shld r13w, r15w, 0x80
shld r13w, sp, 0x80
shld r13w, si, 0x80
shld r13w, bp, 0x80
shld r14w, ax, 0x80
shld r14w, bx, 0x80
shld r14w, cx, 0x80
shld r14w, dx, 0x80
shld r14w, di, 0x80
shld r14w, r8w, 0x80
shld r14w, r9w, 0x80
shld r14w, r10w, 0x80
shld r14w, r11w, 0x80
shld r14w, r12w, 0x80
shld r14w, r13w, 0x80
shld r14w, r14w, 0x80
shld r14w, r15w, 0x80
shld r14w, sp, 0x80
shld r14w, si, 0x80
shld r14w, bp, 0x80
shld r15w, ax, 0x80
shld r15w, bx, 0x80
shld r15w, cx, 0x80
shld r15w, dx, 0x80
shld r15w, di, 0x80
shld r15w, r8w, 0x80
shld r15w, r9w, 0x80
shld r15w, r10w, 0x80
shld r15w, r11w, 0x80
shld r15w, r12w, 0x80
shld r15w, r13w, 0x80
shld r15w, r14w, 0x80
shld r15w, r15w, 0x80
shld r15w, sp, 0x80
shld r15w, si, 0x80
shld r15w, bp, 0x80
shld sp, ax, 0x80
shld sp, bx, 0x80
shld sp, cx, 0x80
shld sp, dx, 0x80
shld sp, di, 0x80
shld sp, r8w, 0x80
shld sp, r9w, 0x80
shld sp, r10w, 0x80
shld sp, r11w, 0x80
shld sp, r12w, 0x80
shld sp, r13w, 0x80
shld sp, r14w, 0x80
shld sp, r15w, 0x80
shld sp, sp, 0x80
shld sp, si, 0x80
shld sp, bp, 0x80
shld si, ax, 0x80
shld si, bx, 0x80
shld si, cx, 0x80
shld si, dx, 0x80
shld si, di, 0x80
shld si, r8w, 0x80
shld si, r9w, 0x80
shld si, r10w, 0x80
shld si, r11w, 0x80
shld si, r12w, 0x80
shld si, r13w, 0x80
shld si, r14w, 0x80
shld si, r15w, 0x80
shld si, sp, 0x80
shld si, si, 0x80
shld si, bp, 0x80
shld bp, ax, 0x80
shld bp, bx, 0x80
shld bp, cx, 0x80
shld bp, dx, 0x80
shld bp, di, 0x80
shld bp, r8w, 0x80
shld bp, r9w, 0x80
shld bp, r10w, 0x80
shld bp, r11w, 0x80
shld bp, r12w, 0x80
shld bp, r13w, 0x80
shld bp, r14w, 0x80
shld bp, r15w, 0x80
shld bp, sp, 0x80
shld bp, si, 0x80
shld bp, bp, 0x80
shld [rax], rax, cl
shld [rax], rbx, cl
shld [rax], rcx, cl
shld [rax], rdx, cl
shld [rax], rdi, cl
shld [rax], r8, cl
shld [rax], r9, cl
shld [rax], r10, cl
shld [rax], r11, cl
shld [rax], r12, cl
shld [rax], r13, cl
shld [rax], r14, cl
shld [rax], r15, cl
shld [rax], rsp, cl
shld [rax], rsi, cl
shld [rax], rbp, cl
shld [rbx], rax, cl
shld [rbx], rbx, cl
shld [rbx], rcx, cl
shld [rbx], rdx, cl
shld [rbx], rdi, cl
shld [rbx], r8, cl
shld [rbx], r9, cl
shld [rbx], r10, cl
shld [rbx], r11, cl
shld [rbx], r12, cl
shld [rbx], r13, cl
shld [rbx], r14, cl
shld [rbx], r15, cl
shld [rbx], rsp, cl
shld [rbx], rsi, cl
shld [rbx], rbp, cl
shld [rcx], rax, cl
shld [rcx], rbx, cl
shld [rcx], rcx, cl
shld [rcx], rdx, cl
shld [rcx], rdi, cl
shld [rcx], r8, cl
shld [rcx], r9, cl
shld [rcx], r10, cl
shld [rcx], r11, cl
shld [rcx], r12, cl
shld [rcx], r13, cl
shld [rcx], r14, cl
shld [rcx], r15, cl
shld [rcx], rsp, cl
shld [rcx], rsi, cl
shld [rcx], rbp, cl
shld [rdx], rax, cl
shld [rdx], rbx, cl
shld [rdx], rcx, cl
shld [rdx], rdx, cl
shld [rdx], rdi, cl
shld [rdx], r8, cl
shld [rdx], r9, cl
shld [rdx], r10, cl
shld [rdx], r11, cl
shld [rdx], r12, cl
shld [rdx], r13, cl
shld [rdx], r14, cl
shld [rdx], r15, cl
shld [rdx], rsp, cl
shld [rdx], rsi, cl
shld [rdx], rbp, cl
shld [rdi], rax, cl
shld [rdi], rbx, cl
shld [rdi], rcx, cl
shld [rdi], rdx, cl
shld [rdi], rdi, cl
shld [rdi], r8, cl
shld [rdi], r9, cl
shld [rdi], r10, cl
shld [rdi], r11, cl
shld [rdi], r12, cl
shld [rdi], r13, cl
shld [rdi], r14, cl
shld [rdi], r15, cl
shld [rdi], rsp, cl
shld [rdi], rsi, cl
shld [rdi], rbp, cl
shld [r8], rax, cl
shld [r8], rbx, cl
shld [r8], rcx, cl
shld [r8], rdx, cl
shld [r8], rdi, cl
shld [r8], r8, cl
shld [r8], r9, cl
shld [r8], r10, cl
shld [r8], r11, cl
shld [r8], r12, cl
shld [r8], r13, cl
shld [r8], r14, cl
shld [r8], r15, cl
shld [r8], rsp, cl
shld [r8], rsi, cl
shld [r8], rbp, cl
shld [r9], rax, cl
shld [r9], rbx, cl
shld [r9], rcx, cl
shld [r9], rdx, cl
shld [r9], rdi, cl
shld [r9], r8, cl
shld [r9], r9, cl
shld [r9], r10, cl
shld [r9], r11, cl
shld [r9], r12, cl
shld [r9], r13, cl
shld [r9], r14, cl
shld [r9], r15, cl
shld [r9], rsp, cl
shld [r9], rsi, cl
shld [r9], rbp, cl
shld [r10], rax, cl
shld [r10], rbx, cl
shld [r10], rcx, cl
shld [r10], rdx, cl
shld [r10], rdi, cl
shld [r10], r8, cl
shld [r10], r9, cl
shld [r10], r10, cl
shld [r10], r11, cl
shld [r10], r12, cl
shld [r10], r13, cl
shld [r10], r14, cl
shld [r10], r15, cl
shld [r10], rsp, cl
shld [r10], rsi, cl
shld [r10], rbp, cl
shld [r11], rax, cl
shld [r11], rbx, cl
shld [r11], rcx, cl
shld [r11], rdx, cl
shld [r11], rdi, cl
shld [r11], r8, cl
shld [r11], r9, cl
shld [r11], r10, cl
shld [r11], r11, cl
shld [r11], r12, cl
shld [r11], r13, cl
shld [r11], r14, cl
shld [r11], r15, cl
shld [r11], rsp, cl
shld [r11], rsi, cl
shld [r11], rbp, cl
shld [r12], rax, cl
shld [r12], rbx, cl
shld [r12], rcx, cl
shld [r12], rdx, cl
shld [r12], rdi, cl
shld [r12], r8, cl
shld [r12], r9, cl
shld [r12], r10, cl
shld [r12], r11, cl
shld [r12], r12, cl
shld [r12], r13, cl
shld [r12], r14, cl
shld [r12], r15, cl
shld [r12], rsp, cl
shld [r12], rsi, cl
shld [r12], rbp, cl
shld [r13], rax, cl
shld [r13], rbx, cl
shld [r13], rcx, cl
shld [r13], rdx, cl
shld [r13], rdi, cl
shld [r13], r8, cl
shld [r13], r9, cl
shld [r13], r10, cl
shld [r13], r11, cl
shld [r13], r12, cl
shld [r13], r13, cl
shld [r13], r14, cl
shld [r13], r15, cl
shld [r13], rsp, cl
shld [r13], rsi, cl
shld [r13], rbp, cl
shld [r14], rax, cl
shld [r14], rbx, cl
shld [r14], rcx, cl
shld [r14], rdx, cl
shld [r14], rdi, cl
shld [r14], r8, cl
shld [r14], r9, cl
shld [r14], r10, cl
shld [r14], r11, cl
shld [r14], r12, cl
shld [r14], r13, cl
shld [r14], r14, cl
shld [r14], r15, cl
shld [r14], rsp, cl
shld [r14], rsi, cl
shld [r14], rbp, cl
shld [r15], rax, cl
shld [r15], rbx, cl
shld [r15], rcx, cl
shld [r15], rdx, cl
shld [r15], rdi, cl
shld [r15], r8, cl
shld [r15], r9, cl
shld [r15], r10, cl
shld [r15], r11, cl
shld [r15], r12, cl
shld [r15], r13, cl
shld [r15], r14, cl
shld [r15], r15, cl
shld [r15], rsp, cl
shld [r15], rsi, cl
shld [r15], rbp, cl
shld [rsp], rax, cl
shld [rsp], rbx, cl
shld [rsp], rcx, cl
shld [rsp], rdx, cl
shld [rsp], rdi, cl
shld [rsp], r8, cl
shld [rsp], r9, cl
shld [rsp], r10, cl
shld [rsp], r11, cl
shld [rsp], r12, cl
shld [rsp], r13, cl
shld [rsp], r14, cl
shld [rsp], r15, cl
shld [rsp], rsp, cl
shld [rsp], rsi, cl
shld [rsp], rbp, cl
shld [rsi], rax, cl
shld [rsi], rbx, cl
shld [rsi], rcx, cl
shld [rsi], rdx, cl
shld [rsi], rdi, cl
shld [rsi], r8, cl
shld [rsi], r9, cl
shld [rsi], r10, cl
shld [rsi], r11, cl
shld [rsi], r12, cl
shld [rsi], r13, cl
shld [rsi], r14, cl
shld [rsi], r15, cl
shld [rsi], rsp, cl
shld [rsi], rsi, cl
shld [rsi], rbp, cl
shld [rbp], rax, cl
shld [rbp], rbx, cl
shld [rbp], rcx, cl
shld [rbp], rdx, cl
shld [rbp], rdi, cl
shld [rbp], r8, cl
shld [rbp], r9, cl
shld [rbp], r10, cl
shld [rbp], r11, cl
shld [rbp], r12, cl
shld [rbp], r13, cl
shld [rbp], r14, cl
shld [rbp], r15, cl
shld [rbp], rsp, cl
shld [rbp], rsi, cl
shld [rbp], rbp, cl
shld ax, ax, cl
shld ax, bx, cl
shld ax, cx, cl
shld ax, dx, cl
shld ax, di, cl
shld ax, r8w, cl
shld ax, r9w, cl
shld ax, r10w, cl
shld ax, r11w, cl
shld ax, r12w, cl
shld ax, r13w, cl
shld ax, r14w, cl
shld ax, r15w, cl
shld ax, sp, cl
shld ax, si, cl
shld ax, bp, cl
shld bx, ax, cl
shld bx, bx, cl
shld bx, cx, cl
shld bx, dx, cl
shld bx, di, cl
shld bx, r8w, cl
shld bx, r9w, cl
shld bx, r10w, cl
shld bx, r11w, cl
shld bx, r12w, cl
shld bx, r13w, cl
shld bx, r14w, cl
shld bx, r15w, cl
shld bx, sp, cl
shld bx, si, cl
shld bx, bp, cl
shld cx, ax, cl
shld cx, bx, cl
shld cx, cx, cl
shld cx, dx, cl
shld cx, di, cl
shld cx, r8w, cl
shld cx, r9w, cl
shld cx, r10w, cl
shld cx, r11w, cl
shld cx, r12w, cl
shld cx, r13w, cl
shld cx, r14w, cl
shld cx, r15w, cl
shld cx, sp, cl
shld cx, si, cl
shld cx, bp, cl
shld dx, ax, cl
shld dx, bx, cl
shld dx, cx, cl
shld dx, dx, cl
shld dx, di, cl
shld dx, r8w, cl
shld dx, r9w, cl
shld dx, r10w, cl
shld dx, r11w, cl
shld dx, r12w, cl
shld dx, r13w, cl
shld dx, r14w, cl
shld dx, r15w, cl
shld dx, sp, cl
shld dx, si, cl
shld dx, bp, cl
shld di, ax, cl
shld di, bx, cl
shld di, cx, cl
shld di, dx, cl
shld di, di, cl
shld di, r8w, cl
shld di, r9w, cl
shld di, r10w, cl
shld di, r11w, cl
shld di, r12w, cl
shld di, r13w, cl
shld di, r14w, cl
shld di, r15w, cl
shld di, sp, cl
shld di, si, cl
shld di, bp, cl
shld r8w, ax, cl
shld r8w, bx, cl
shld r8w, cx, cl
shld r8w, dx, cl
shld r8w, di, cl
shld r8w, r8w, cl
shld r8w, r9w, cl
shld r8w, r10w, cl
shld r8w, r11w, cl
shld r8w, r12w, cl
shld r8w, r13w, cl
shld r8w, r14w, cl
shld r8w, r15w, cl
shld r8w, sp, cl
shld r8w, si, cl
shld r8w, bp, cl
shld r9w, ax, cl
shld r9w, bx, cl
shld r9w, cx, cl
shld r9w, dx, cl
shld r9w, di, cl
shld r9w, r8w, cl
shld r9w, r9w, cl
shld r9w, r10w, cl
shld r9w, r11w, cl
shld r9w, r12w, cl
shld r9w, r13w, cl
shld r9w, r14w, cl
shld r9w, r15w, cl
shld r9w, sp, cl
shld r9w, si, cl
shld r9w, bp, cl
shld r10w, ax, cl
shld r10w, bx, cl
shld r10w, cx, cl
shld r10w, dx, cl
shld r10w, di, cl
shld r10w, r8w, cl
shld r10w, r9w, cl
shld r10w, r10w, cl
shld r10w, r11w, cl
shld r10w, r12w, cl
shld r10w, r13w, cl
shld r10w, r14w, cl
shld r10w, r15w, cl
shld r10w, sp, cl
shld r10w, si, cl
shld r10w, bp, cl
shld r11w, ax, cl
shld r11w, bx, cl
shld r11w, cx, cl
shld r11w, dx, cl
shld r11w, di, cl
shld r11w, r8w, cl
shld r11w, r9w, cl
shld r11w, r10w, cl
shld r11w, r11w, cl
shld r11w, r12w, cl
shld r11w, r13w, cl
shld r11w, r14w, cl
shld r11w, r15w, cl
shld r11w, sp, cl
shld r11w, si, cl
shld r11w, bp, cl
shld r12w, ax, cl
shld r12w, bx, cl
shld r12w, cx, cl
shld r12w, dx, cl
shld r12w, di, cl
shld r12w, r8w, cl
shld r12w, r9w, cl
shld r12w, r10w, cl
shld r12w, r11w, cl
shld r12w, r12w, cl
shld r12w, r13w, cl
shld r12w, r14w, cl
shld r12w, r15w, cl
shld r12w, sp, cl
shld r12w, si, cl
shld r12w, bp, cl
shld r13w, ax, cl
shld r13w, bx, cl
shld r13w, cx, cl
shld r13w, dx, cl
shld r13w, di, cl
shld r13w, r8w, cl
shld r13w, r9w, cl
shld r13w, r10w, cl
shld r13w, r11w, cl
shld r13w, r12w, cl
shld r13w, r13w, cl
shld r13w, r14w, cl
shld r13w, r15w, cl
shld r13w, sp, cl
shld r13w, si, cl
shld r13w, bp, cl
shld r14w, ax, cl
shld r14w, bx, cl
shld r14w, cx, cl
shld r14w, dx, cl
shld r14w, di, cl
shld r14w, r8w, cl
shld r14w, r9w, cl
shld r14w, r10w, cl
shld r14w, r11w, cl
shld r14w, r12w, cl
shld r14w, r13w, cl
shld r14w, r14w, cl
shld r14w, r15w, cl
shld r14w, sp, cl
shld r14w, si, cl
shld r14w, bp, cl
shld r15w, ax, cl
shld r15w, bx, cl
shld r15w, cx, cl
shld r15w, dx, cl
shld r15w, di, cl
shld r15w, r8w, cl
shld r15w, r9w, cl
shld r15w, r10w, cl
shld r15w, r11w, cl
shld r15w, r12w, cl
shld r15w, r13w, cl
shld r15w, r14w, cl
shld r15w, r15w, cl
shld r15w, sp, cl
shld r15w, si, cl
shld r15w, bp, cl
shld sp, ax, cl
shld sp, bx, cl
shld sp, cx, cl
shld sp, dx, cl
shld sp, di, cl
shld sp, r8w, cl
shld sp, r9w, cl
shld sp, r10w, cl
shld sp, r11w, cl
shld sp, r12w, cl
shld sp, r13w, cl
shld sp, r14w, cl
shld sp, r15w, cl
shld sp, sp, cl
shld sp, si, cl
shld sp, bp, cl
shld si, ax, cl
shld si, bx, cl
shld si, cx, cl
shld si, dx, cl
shld si, di, cl
shld si, r8w, cl
shld si, r9w, cl
shld si, r10w, cl
shld si, r11w, cl
shld si, r12w, cl
shld si, r13w, cl
shld si, r14w, cl
shld si, r15w, cl
shld si, sp, cl
shld si, si, cl
shld si, bp, cl
shld bp, ax, cl
shld bp, bx, cl
shld bp, cx, cl
shld bp, dx, cl
shld bp, di, cl
shld bp, r8w, cl
shld bp, r9w, cl
shld bp, r10w, cl
shld bp, r11w, cl
shld bp, r12w, cl
shld bp, r13w, cl
shld bp, r14w, cl
shld bp, r15w, cl
shld bp, sp, cl
shld bp, si, cl
shld bp, bp, cl
|
antlr_getting_started/projects/decision_structure/DecisionGrammar.g4
|
lfvilella/simple-compiler
| 1 |
7737
|
grammar DecisionGrammar;
prog: IF OEX NUM CEX OBK NUM CBK prog | p_elseif;
p_elseif: ELSEIF OEX NUM CEX OBK NUM CBK p_elseif | p_else;
p_else: ELSE OBK NUM CBK;
IF: 'if';
ELSEIF: 'else if';
ELSE: 'else';
OBK: '{';
CBK: '}';
OEX: '(';
CEX: ')';
ADD: '+';
SUB: '-';
MUL: '*';
DIV: '/';
MOD: '%';
NUM: [0-9]+;
VAR: [a-zA-Z]+;
WS: [ \t\r\n]+ -> skip;
|
arch/lib/string/strlen.asm
|
Mosseridan/Compiler-Principles
| 0 |
1240
|
<filename>arch/lib/string/strlen.asm
/* strlen.asm
* Takes a pointer to a null-terminated string,
* and returns its length.
*
* Programmer: <NAME>, 2010
*/
STRLEN:
MOV(R1, STARG(0));
MOV(R0, IMM(0));
L_STRLEN_LOOP:
CMP(IND(R1), IMM('\0'));
JUMP_EQ(L_STRLEN_END);
INCR(R1);
INCR(R0);
JUMP(L_STRLEN_LOOP);
L_STRLEN_END:
RETURN;
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_143_1347.asm
|
ljhsiun2/medusa
| 9 |
245271
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r9
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x1a222, %r12
add %rbp, %rbp
movb $0x61, (%r12)
nop
nop
nop
cmp $47961, %rsi
lea addresses_UC_ht+0x18aba, %r10
nop
nop
nop
add %rax, %rax
mov (%r10), %r9w
and $22394, %r9
lea addresses_D_ht+0x59ba, %r10
nop
and %rbp, %rbp
vmovups (%r10), %ymm0
vextracti128 $0, %ymm0, %xmm0
vpextrq $1, %xmm0, %rax
nop
nop
nop
and $1782, %rbp
lea addresses_A_ht+0x815a, %rsi
lea addresses_WT_ht+0x74ba, %rdi
clflush (%rsi)
clflush (%rdi)
nop
nop
add %rbp, %rbp
mov $65, %rcx
rep movsb
and $15503, %r9
lea addresses_UC_ht+0x16cba, %rsi
lea addresses_UC_ht+0x5eda, %rdi
nop
nop
nop
nop
and %r12, %r12
mov $53, %rcx
rep movsw
cmp $52695, %rbp
lea addresses_WT_ht+0x1ae0e, %rsi
lea addresses_WC_ht+0x3dfa, %rdi
nop
nop
nop
nop
xor $61407, %rbp
mov $0, %rcx
rep movsb
nop
add $42013, %rax
lea addresses_A_ht+0x1e1ba, %rsi
lea addresses_normal_ht+0x1acba, %rdi
clflush (%rsi)
nop
nop
nop
xor $61300, %rax
mov $109, %rcx
rep movsq
add $18553, %rcx
lea addresses_UC_ht+0x18cf2, %rdi
nop
inc %r10
movb (%rdi), %cl
nop
nop
nop
nop
sub %rsi, %rsi
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r13
push %r8
push %rax
push %rbp
push %rsi
// Load
mov $0xedb80000000e9c, %rbp
clflush (%rbp)
nop
nop
nop
nop
cmp %rsi, %rsi
vmovaps (%rbp), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $1, %xmm3, %r10
nop
nop
add %rsi, %rsi
// Store
lea addresses_WT+0xd8ca, %r11
nop
nop
nop
and %r8, %r8
mov $0x5152535455565758, %rsi
movq %rsi, (%r11)
nop
xor %rsi, %rsi
// Load
lea addresses_A+0x156ba, %r11
nop
nop
nop
and %rax, %rax
mov (%r11), %r10d
nop
and $27236, %r11
// Store
lea addresses_normal+0x7653, %r8
nop
nop
nop
nop
xor %rbp, %rbp
mov $0x5152535455565758, %r11
movq %r11, %xmm1
vmovups %ymm1, (%r8)
nop
xor %rax, %rax
// Store
lea addresses_WT+0x174ba, %rsi
nop
nop
and %rbp, %rbp
mov $0x5152535455565758, %rax
movq %rax, %xmm6
vmovups %ymm6, (%rsi)
nop
nop
nop
cmp $60160, %rax
// Store
lea addresses_WC+0x580a, %r10
nop
nop
nop
add %rbp, %rbp
mov $0x5152535455565758, %r13
movq %r13, %xmm3
vmovntdq %ymm3, (%r10)
nop
nop
nop
nop
inc %rbp
// Faulty Load
lea addresses_PSE+0x1cba, %r10
nop
nop
nop
and $37443, %rax
movb (%r10), %r8b
lea oracles, %r10
and $0xff, %r8
shlq $12, %r8
mov (%r10,%r8,1), %r8
pop %rsi
pop %rbp
pop %rax
pop %r8
pop %r13
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_PSE'}, 'OP': 'LOAD'}
{'src': {'congruent': 0, 'AVXalign': True, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 4, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_WT'}}
{'src': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_A'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_normal'}}
{'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_WT'}}
{'OP': 'STOR', 'dst': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 32, 'NT': True, 'type': 'addresses_WC'}}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 1, 'NT': False, 'type': 'addresses_PSE'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_WT_ht'}}
{'src': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 5, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_WT_ht'}}
{'src': {'congruent': 11, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 3, 'same': False, 'type': 'addresses_UC_ht'}}
{'src': {'congruent': 1, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_WC_ht'}}
{'src': {'congruent': 8, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_normal_ht'}}
{'src': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'33': 143}
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
*/
|
data/baseStats_original/phanpy.asm
|
adhi-thirumala/EvoYellow
| 16 |
95035
|
db DEX_PHANPY ; pokedex id
db 90 ; base hp
db 60 ; base attack
db 60 ; base defense
db 45 ; base speed
db 40 ; base special
db GROUND ; species type 1
db GROUND ; species type 2
db 52 ; catch rate
db 87 ; base exp yield
INCBIN "pic/ymon/phanpy.pic",0,1 ; 55, sprite dimensions
dw PhanpyPicFront
dw PhanpyPicBack
; attacks known at lvl 0
db GROWL
db TACKLE
db 0
db 0
db 0 ; growth rate
; learnset
tmlearn 1,5,6,8
tmlearn 9,10,11,12,13,14
tmlearn 17,18,19,20
tmlearn 26,27,28,31,32
tmlearn 34,38,40
tmlearn 44
tmlearn 50,54
db BANK(PhanpyPicFront)
|
src/wrapper.adb
|
Kurinkitos/Twizy-Security
| 1 |
6153
|
with speedModule; use speedModule;
with perception;
package body Wrapper
with SPARK_Mode
is
procedure Init is
begin
if not (Safe) then
-- Running init in a non fresh state is wrong
Initialized := False;
return;
end if;
CurrentSpeed := 4.5;
Initialized := True;
-- Busy-wait until we have recived data from all sensors
end Init;
procedure WaitForData is
begin
null;
end WaitForData;
function Is_Initialized return Boolean
is
begin
return Initialized;
end Is_Initialized;
procedure Update_Perception
(perception_data : in perception_obstacle_ada)
is
begin
if (CurrentSpeed < 0.0) then
-- Our sensors and logic does not work if we are reversing
-- Therefore it should not be done in autonomus mode
Safe := False;
else
pragma Assume (CurrentSpeed >= 0.0);
if not perception.PerceptionCheck(perception_data, CurrentPosition, CurrentSpeed) then
-- PerceptionCheck reports not safe, set safe to false
Safe := False;
end if;
LastPerceptionTimestamp := perception_data.timestamp;
end if;
end Update_Perception;
procedure Update_GPS
(localization_estimate : in localization_estimate_ada)
is
begin
if Convert_C_Bool(localization_estimate.valid_pose)
-- TODO: These checks are wrong, fix after talking to perception
--and ( localization_estimate.pose.position.x < 180.0 and localization_estimate.pose.position.x > -180.0)
--and ( localization_estimate.pose.position.y < 90.0 and localization_estimate.pose.position.y > -90.0)
then
--Safe := gpsModule.gpstest(localization_estimate.pose.position.x, localization_estimate.pose.position.y);
CurrentPosition := localization_estimate.pose;
LastPositionTimestamp := localization_estimate.measurement_time;
return;
end if;
-- Gps values are compleately wrong meaning we can't trust it.
-- The car cannot function without the gps so we brake.
Safe := False;
end Update_GPS;
procedure Update_Speed(speed : in speed_ada) is
begin
CurrentSpeed := 4.5;
if not Convert_C_Bool(speed.valid_speed) then
return;
end if;
pragma Assert(Convert_C_Bool(speed.valid_speed));
if not (speed.speed > -80.0 and speed.speed < 80.0) then
-- Data is way out of range, so we assume something is wrong
Safe := False;
return;
end if;
if not (speedModule.speedtest(speed_ada_to_speed(speed))) then
-- Speed check fails
-- Set safe to false to brake
Safe := False;
end if;
-- Update the cached value of the current speed
CurrentSpeed := speed_ada_to_speed(speed);
if not Convert_C_Bool(speed.valid_timestamp) then
return;
end if;
if(speed.timestamp <= LastSpeedTimestamp) then
-- Something is very wrong if we recive mesages out of order
Safe := False;
return;
end if;
pragma Assert(speed.timestamp > LastSpeedTimestamp);
LastSpeedTimestamp := speed.timestamp;
end Update_Speed;
procedure Check_Brake_Pedal(pedal_status : Extensions.bool) is
begin
-- Compare against 1 instead of true beacuse of how the bool Extensions work
if Convert_C_Bool(pedal_status) then
Safe := False;
end if;
end Check_Brake_Pedal;
procedure CheckTimestamps(currentTime : in Interfaces.C.double) is
begin
pragma Assume (currentTime > 0.0);
pragma Assume (LastSpeedTimestamp > 0.0);
pragma Assume (LastPositionTimestamp > 0.0);
pragma Assume (LastPerceptionTimestamp > 0.0);
if (currentTime - LastSpeedTimestamp > MaxSpeedDelay) or
(currentTime - LastPositionTimestamp > MaxPositionDelay) or
(currentTime - LastPerceptionTimestamp > MaxPerceptionDelay)
then
Safe := False;
return;
end if;
end CheckTimestamps;
function Is_Safe return Boolean
is
begin
return Safe;
end Is_Safe;
begin
null;
end Wrapper;
|
Module 2/2. Exit/ExitWithNullChar.asm
|
hoangcuongflp/SLAE
| 47 |
160916
|
<reponame>hoangcuongflp/SLAE
; ExitWithNullChar.asm
; By Abatchy
;
; nasm -felf32 ExitWithNullChar.asm && ld -o ExitWithNullChar ExitWithNullChar.o
; Generated shellcode: "\xb8\x01\x00\x00\x00\xbb\x10\x00\x00\x00\xcd\x80"
global _start
section .text
_start:
mov eax, 0x1
mov ebx, 0x10
int 0x80
|
programs/oeis/118/A118649.asm
|
jmorken/loda
| 1 |
9180
|
<reponame>jmorken/loda
; A118649: Row sums for A106597.
; 1,2,5,12,30,74,184,456,1132,2808,6968,17288,42896,106432,264080,655232,1625760,4033824,10008704,24833536,61616832,152883328,379333248,941199488,2335298816,5794330112,14376858880,35671780352,88508618240
mov $30,$0
mov $32,$0
lpb $32
clr $0,30
mov $0,$30
sub $32,1
sub $0,$32
mov $27,$0
mov $29,$0
add $29,1
lpb $29
mov $0,$27
sub $29,1
sub $0,$29
mov $1,$0
cal $1,52528 ; Expansion of (1 - x)/(1 - 2*x - 2*x^2 + 2*x^3).
add $28,$1
lpe
add $31,$28
lpe
mov $1,$31
div $1,2
add $1,1
|
src/fsmaker-target-littlefs.ads
|
Fabien-Chouteau/fsmaker
| 0 |
23880
|
with GNAT.OS_Lib;
private with Littlefs;
package FSmaker.Target.LittleFS is
subtype Parent is Filesystem;
type Instance
is new Parent
with private;
overriding
procedure Format (This : in out Instance;
FD : GNAT.OS_Lib.File_Descriptor;
Size : Natural);
overriding
procedure Mount (This : in out Instance;
FD : GNAT.OS_Lib.File_Descriptor);
overriding
procedure Make_Dir (This : in out Instance;
Path : Target_Path);
overriding
function Tree (This : in out Instance;
Path : Target_Path)
return Directory_Tree;
overriding
procedure Import (This : in out Instance;
Path : Target_Path;
Src : in out Source.Instance);
overriding
procedure Cat (This : in out Instance;
Path : Target_Path;
Dst : in out FSmaker.Sink.Class);
private
type LFS_Config_Access is access all Standard.Littlefs.LFS_Config;
type Instance
is new Parent
with record
FD : aliased GNAT.OS_Lib.File_Descriptor;
LFS : aliased Standard.Littlefs.LFS_T;
Config : LFS_Config_Access;
end record;
end FSmaker.Target.LittleFS;
|
asm/ppc64le/core.asm
|
ELENA-LANG/elena-lang
| 193 |
175810
|
<reponame>ELENA-LANG/elena-lang<filename>asm/ppc64le/core.asm
// r1 - stack frame pointer
// r2 - TOC??
// r4 - acc
// r31 - base frame pointer
compare - 79
// --- Predefined References --
define GC_ALLOC 10001h
define HOOK 10010h
define INVOKER 10011h
define INIT_RND 10012h
define CALC_SIZE 1001Fh
define GET_COUNT 10020h
define THREAD_WAIT 10021h
define GC_ALLOCPERM 10031h
//define CORE_GC_TABLE 20002h
//define CORE_STATICROOT 20005h
//define CORE_TLS_INDEX 20007h
//define THREAD_TABLE 20008h
//define CORE_MESSAGE_TABLE 2000Ah
//define CORE_ET_TABLE 2000Bh
//define SYSTEM_ENV 2000Ch
//define VOID 2000Dh
//define VOIDPTR 2000Eh
// lis Rx,addr -> addis Rx,0,addr
// mr Rx,Ry -> or Rx, Ry, Ry
// li Rx,val
// --- GC_ALLOC (r3 - size) ---
procedure %GC_ALLOC
// ; r17 - gc_yg_current, r19 - gc_yg_end
// ; mov rax, [data : %CORE_GC_TABLE + gc_yg_current]
lis r16, data : %CORE_GC_TABLE @ha
li r15, gc_yg_current
ld r12, data : %CORE_GC_TABLE @l (r16)
add r17, r12, r15
// mov rdx, [data : %CORE_GC_TABLE + gc_yg_end]
li r18, gc_yg_current
add r19, r12, r15
// add rcx, rax
add r20,r17,r3
// cmp rcx, rdx
cmp r20, r19
// jae short labYGCollect
bgt labYGCollect
// mov [data : %CORE_GC_TABLE + gc_yg_current], rcx
add r19, r12, r15
ld r19, r20
// lea rbx, [rax + elObjectOffset]
addi r4, r17, elObjectOffset
// ret
blr
labYGCollect:
end
|
dav1d/tests/checkasm/x86/checkasm.asm
|
suman/ogv-for-virtualclass
| 0 |
97783
|
; Copyright © 2018, VideoLAN and dav1d authors
; Copyright © 2018, Two Orioles, LLC
; All rights reserved.
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions are met:
;
; 1. Redistributions of source code must retain the above copyright notice, this
; list of conditions and the following disclaimer.
;
; 2. Redistributions in binary form must reproduce the above copyright notice,
; this list of conditions and the following disclaimer in the documentation
; and/or other materials provided with the distribution.
;
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
; ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
%define private_prefix checkasm
%include "config.asm"
%include "ext/x86/x86inc.asm"
SECTION_RODATA
error_message: db "failed to preserve register", 0
%if ARCH_X86_64
; just random numbers to reduce the chance of incidental match
ALIGN 16
x6: dq 0x1a1b2550a612b48c,0x79445c159ce79064
x7: dq 0x2eed899d5a28ddcd,0x86b2536fcd8cf636
x8: dq 0xb0856806085e7943,0x3f2bf84fc0fcca4e
x9: dq 0xacbd382dcf5b8de2,0xd229e1f5b281303f
x10: dq 0x71aeaff20b095fd9,0xab63e2e11fa38ed9
x11: dq 0x89b0c0765892729a,0x77d410d5c42c882d
x12: dq 0xc45ea11a955d8dd5,0x24b3c1d2a024048b
x13: dq 0x2e8ec680de14b47c,0xdd7b8919edd42786
x14: dq 0x135ce6888fa02cbf,0x11e53e2b2ac655ef
x15: dq 0x011ff554472a7a10,0x6de8f4c914c334d5
n7: dq 0x21f86d66c8ca00ce
n8: dq 0x75b6ba21077c48ad
n9: dq 0xed56bb2dcb3c7736
n10: dq 0x8bda43d3fd1a7e06
n11: dq 0xb64a9c9e5d318408
n12: dq 0xdf9a54b303f1d3a3
n13: dq 0x4a75479abd64e097
n14: dq 0x249214109d5d1c88
%endif
SECTION .text
cextern fail_func
; max number of args used by any asm function.
; (max_args % 4) must equal 3 for stack alignment
%define max_args 15
%if ARCH_X86_64
;-----------------------------------------------------------------------------
; int checkasm_stack_clobber(uint64_t clobber, ...)
;-----------------------------------------------------------------------------
cglobal stack_clobber, 1,2
; Clobber the stack with junk below the stack pointer
%define argsize (max_args+6)*8
SUB rsp, argsize
mov r1, argsize-8
.loop:
mov [rsp+r1], r0
sub r1, 8
jge .loop
ADD rsp, argsize
RET
%if WIN64
%assign free_regs 7
DECLARE_REG_TMP 4
%else
%assign free_regs 9
DECLARE_REG_TMP 7
%endif
;-----------------------------------------------------------------------------
; void checkasm_checked_call(void *func, ...)
;-----------------------------------------------------------------------------
INIT_XMM
cglobal checked_call, 2,15,16,max_args*8+8
mov t0, r0
; All arguments have been pushed on the stack instead of registers in
; order to test for incorrect assumptions that 32-bit ints are
; zero-extended to 64-bit.
mov r0, r6mp
mov r1, r7mp
mov r2, r8mp
mov r3, r9mp
%if UNIX64
mov r4, r10mp
mov r5, r11mp
%assign i 6
%rep max_args-6
mov r9, [rsp+stack_offset+(i+1)*8]
mov [rsp+(i-6)*8], r9
%assign i i+1
%endrep
%else ; WIN64
%assign i 4
%rep max_args-4
mov r9, [rsp+stack_offset+(i+7)*8]
mov [rsp+i*8], r9
%assign i i+1
%endrep
; Move possible floating-point arguments to the correct registers
movq m0, r0
movq m1, r1
movq m2, r2
movq m3, r3
%assign i 6
%rep 16-6
mova m %+ i, [x %+ i]
%assign i i+1
%endrep
%endif
%assign i 14
%rep 15-free_regs
mov r %+ i, [n %+ i]
%assign i i-1
%endrep
call t0
%assign i 14
%rep 15-free_regs
xor r %+ i, [n %+ i]
or r14, r %+ i
%assign i i-1
%endrep
%if WIN64
%assign i 6
%rep 16-6
pxor m %+ i, [x %+ i]
por m6, m %+ i
%assign i i+1
%endrep
packsswb m6, m6
movq r5, m6
or r14, r5
%endif
; Call fail_func() with a descriptive message to mark it as a failure
; if the called function didn't preserve all callee-saved registers.
; Save the return value located in rdx:rax first to prevent clobbering.
jz .ok
mov r9, rax
mov r10, rdx
lea r0, [error_message]
xor eax, eax
call fail_func
mov rdx, r10
mov rax, r9
.ok:
RET
; trigger a warmup of vector units
%macro WARMUP 0
cglobal warmup, 0, 0
xorps m0, m0
mulps m0, m0
RET
%endmacro
INIT_YMM avx2
WARMUP
INIT_ZMM avx512
WARMUP
%else
; just random numbers to reduce the chance of incidental match
%define n3 dword 0x6549315c
%define n4 dword 0xe02f3e23
%define n5 dword 0xb78d0d1d
%define n6 dword 0x33627ba7
;-----------------------------------------------------------------------------
; void checkasm_checked_call(void *func, ...)
;-----------------------------------------------------------------------------
cglobal checked_call, 1,7
mov r3, n3
mov r4, n4
mov r5, n5
mov r6, n6
%rep max_args
PUSH dword [esp+20+max_args*4]
%endrep
call r0
xor r3, n3
xor r4, n4
xor r5, n5
xor r6, n6
or r3, r4
or r5, r6
or r3, r5
jz .ok
mov r3, eax
mov r4, edx
LEA r0, error_message
mov [esp], r0
call fail_func
mov edx, r4
mov eax, r3
.ok:
add esp, max_args*4
RET
%endif ; ARCH_X86_64
|
Applications/Finder/folders/test.applescript
|
looking-for-a-job/applescript-examples
| 1 |
1900
|
<filename>Applications/Finder/folders/test.applescript
#!/usr/bin/osascript
set home to POSIX path of (path to home folder)
set smart to home & "/git/Smart Folders.gist/python.savedSearch"
tell application "Finder"
set l to every folder in (POSIX file smart as alias)
repeat with f in l
name of f as text
displayed name of f
properties of f
POSIX path of (f as alias)
end repeat
end tell
|
ada/examples/regression/regression_library.adb
|
carter-e-veldhuizen/RACK
| 4 |
265
|
<filename>ada/examples/regression/regression_library.adb
package body Regression_Library is
function LibraryFun (Input : Boolean) return Boolean is
begin
return False;
end;
end Regression_Library;
|
programs/oeis/219/A219393.asm
|
karttu/loda
| 0 |
6028
|
; A219393: Numbers k such that 23*k+1 is a square.
; 0,21,25,88,96,201,213,360,376,565,585,816,840,1113,1141,1456,1488,1845,1881,2280,2320,2761,2805,3288,3336,3861,3913,4480,4536,5145,5205,5856,5920,6613,6681,7416,7488,8265,8341,9160,9240,10101,10185,11088,11176,12121,12213,13200,13296,14325,14425,15496,15600,16713,16821,17976,18088,19285,19401,20640,20760,22041,22165,23488,23616,24981,25113,26520,26656,28105,28245,29736,29880,31413,31561,33136,33288,34905,35061,36720,36880,38581,38745,40488,40656,42441,42613,44440,44616,46485,46665,48576,48760,50713,50901,52896,53088,55125,55321,57400,57600,59721,59925,62088,62296,64501,64713,66960,67176,69465,69685,72016,72240,74613,74841,77256,77488,79945,80181,82680,82920,85461,85705,88288,88536,91161,91413,94080,94336,97045,97305,100056,100320,103113,103381,106216,106488,109365,109641,112560,112840,115801,116085,119088,119376,122421,122713,125800,126096,129225,129525,132696,133000,136213,136521,139776,140088,143385,143701,147040,147360,150741,151065,154488,154816,158281,158613,162120,162456,166005,166345,169936,170280,173913,174261,177936,178288,182005,182361,186120,186480,190281,190645,194488,194856,198741,199113,203040,203416,207385,207765,211776,212160,216213,216601,220696,221088,225225,225621,229800,230200,234421,234825,239088,239496,243801,244213,248560,248976,253365,253785,258216,258640,263113,263541,268056,268488,273045,273481,278080,278520,283161,283605,288288,288736,293461,293913,298680,299136,303945,304405,309256,309720,314613,315081,320016,320488,325465,325941,330960,331440,336501,336985,342088,342576,347721,348213,353400,353896,359125
mov $2,$0
mov $3,$0
lpb $0,1
mov $0,0
mov $1,19
add $2,1
div $2,2
mul $1,$2
mul $2,$1
lpe
mov $1,$2
add $1,$3
mov $4,$3
mul $4,$3
add $1,$4
|
misc/Lib/file_exists.applescript
|
kinshuk4/evernote-automation
| 4 |
2184
|
on run {file_path}
# General Implement
tell application "System Events"
return exists file file_path
end tell
(* # Implemented by Shell
## Example
try # will error if not exist
do shell script "[ -f \"/Users/IceHe/Documents/" & report_path & "\" ]"
on error
return false
end try
## Reverse
try # will error if exists
do shell script "[ ! -f \"/Users/IceHe/Documents/" & next_report_path & "\" ]"
on error
return false
end try
return true
*)
end run
|
source/amf/uml/amf-uml-invocation_actions.ads
|
svn2github/matreshka
| 24 |
20071
|
<gh_stars>10-100
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, <NAME> <<EMAIL>> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
-- In addition to targeting an object, invocation actions can also invoke
-- behavioral features on ports from where the invocation requests are routed
-- onwards on links deriving from attached connectors. Invocation actions may
-- also be sent to a target via a given port, either on the sending object or
-- on another object.
--
-- InvocationAction is an abstract class for the various actions that invoke
-- behavior.
------------------------------------------------------------------------------
with AMF.UML.Actions;
limited with AMF.UML.Input_Pins.Collections;
limited with AMF.UML.Ports;
package AMF.UML.Invocation_Actions is
pragma Preelaborate;
type UML_Invocation_Action is limited interface
and AMF.UML.Actions.UML_Action;
type UML_Invocation_Action_Access is
access all UML_Invocation_Action'Class;
for UML_Invocation_Action_Access'Storage_Size use 0;
not overriding function Get_Argument
(Self : not null access constant UML_Invocation_Action)
return AMF.UML.Input_Pins.Collections.Ordered_Set_Of_UML_Input_Pin is abstract;
-- Getter of InvocationAction::argument.
--
-- Specification of the ordered set of argument values that appears during
-- execution.
not overriding function Get_On_Port
(Self : not null access constant UML_Invocation_Action)
return AMF.UML.Ports.UML_Port_Access is abstract;
-- Getter of InvocationAction::onPort.
--
-- A optional port of the receiver object on which the behavioral feature
-- is invoked.
not overriding procedure Set_On_Port
(Self : not null access UML_Invocation_Action;
To : AMF.UML.Ports.UML_Port_Access) is abstract;
-- Setter of InvocationAction::onPort.
--
-- A optional port of the receiver object on which the behavioral feature
-- is invoked.
end AMF.UML.Invocation_Actions;
|
demos/tile_ed.asm
|
mfkiwl/QNICE-FPGA-hyperRAM
| 53 |
97638
|
; TileEd is a simple "text mode sprite" (aka "tile") editor
; it was originally developed as a tool to develop "qtris.asm"
;
; Uses VGA to display all 256 characters of the font (based on font.asm) on
; the left side of the screen. On the right side of the screen, there is a
; box of the size TILE_DX_INIT and TILE_DY_INIT (size can be changed during
; runtime using F2 on the PS2/USB keyboard).
;
; Using F1 on the USB keyboard, you can jump between the character palette
; and the tile and using SPACE on the USB keyboard, you can "paint" characters
; into the tile box. As soon as you press F12, the program outputs .DW
; statements via UART that can be copy/pasted into QNICE assmebler code.
;
; TileEd ignores STDIN and STDOUT settings of the monitor: the .DW statements
; always go to the UART and the other input/ouput is done via keyboard/VGA.
;
; done by sy2002 in January 2016
#include "../dist_kit/sysdef.asm"
#include "../dist_kit/monitor.def"
; "external" interface, i.e. change TILE_DX and TILE_DY to
; your needs, recompile and run: TileEd
TILE_DX_INIT .EQU 10
TILE_DY_INIT .EQU 10
; "internal" .EQUs, i.e. these are not meant to be changed
START_X .EQU 2
START_Y .EQU 5
TILE_CENTER_X .EQU 57
TILE_CENTER_Y .EQU 20
TILE_DX_MAX .EQU 44 ; if this is changed, then ...
TILE_DY_MAX .EQU 36 ; change STR_CHG_SIZE_*, too
SELECTED_X .EQU 10
SELECTED_Y .EQU 37
.ORG 0x8000
; check external interface "variables" TILE_DX_INIT and
; TILE_DY_INIT to fit into the boundaries
MOVE TILE_DX_MAX, R0
CMP TILE_DX_INIT, R0
RBRA TILE_ED_HALT, N
MOVE TILE_DY_MAX, R0
CMP TILE_DY_INIT, R0
RBRA TILE_ED_HALT, N
RBRA TILE_ED_START, 1
TILE_ED_HALT MOVE STR_NOSTART, R8
SYSCALL(puts, 1)
SYSCALL(exit, 1)
; move initial tile size to the global variables storing them
TILE_ED_START MOVE TILE_DX, R0
MOVE TILE_DX_INIT, @R0
MOVE TILE_DY, R0
MOVE TILE_DY_INIT, @R0
; set up the screen and calculate the *_WS_* variables
TILE_ED_RESET RSUB CLRSCR, 1 ; clear screen
RSUB DRAW_PALETTE, 1 ; character palette
RSUB DRAW_WORKSPACE, 1 ; the rest of the workspace
; global registers
TILE_ED_KEEP MOVE VGA$CR_X, R0 ; R0: hw cursor X
MOVE VGA$CR_Y, R1 ; R1: hw cursor Y
MOVE VGA$CHAR, R2 ; R2: print at hw cursor pos
XOR R3, R3 ; R3: mode: 0=palette 1=tile
MOVE PAL_WS_X, R8
MOVE @R8, R4 ; R4: palette x pos
MOVE PAL_WS_Y, R8
MOVE @R8, R5 ; R5: palette y pos
MOVE TILE_WS_X, R8
MOVE @R8, R6 ; R6: tile x pos
MOVE TILE_WS_Y, R8
MOVE @R8, R7 ; R7: tile y pos
; print currently selected char
MAIN_LOOP MOVE R4, @R0
MOVE R5, @R1
MOVE @R2, R8
MOVE SELECTED_X, @R0
MOVE SELECTED_Y, @R1
MOVE R8, @R2
; set cursor depending on mode
CMP 0, R3
RBRA CRS_MODE_0, Z
MOVE R6, @R0
MOVE R7, @R1
RBRA WAIT_FOR_KEY, 1
CRS_MODE_0 MOVE R4, @R0
MOVE R5, @R1
; keyboard handler
WAIT_FOR_KEY RSUB KBD_GETCHAR, 1
CMP KBD$F1, R8 ; F1 = switch mode
RBRA SWITCH_MODE, Z
CMP KBD$F2, R8 ; F2 = change size (and clear)
RBRA CHANGE_SIZE, Z
CMP KBD$F3, R8 ; F3 = clear
RBRA CLEAR, Z
CMP KBD$F12, R8 ; F12 = quit
RBRA SAVE_DATA, Z
CMP KBD$SPACE, R8 ; SPACE = draw character
RBRA DRAW_CHAR, Z
CMP 0, R3 ; mode = palette?
RBRA NAV_PAL, Z ; yes: navigate palette
CMP KBD$CUR_UP, R8 ; no: tile: up
RBRA NAV_TILE_U, Z
CMP KBD$CUR_DOWN, R8 ; tile: cursor down
RBRA NAV_TILE_D, Z
CMP KBD$CUR_LEFT, R8 ; tile: cursor left
RBRA NAV_TILE_L, Z
CMP KBD$CUR_RIGHT, R8 ; tile: cursor right
RBRA NAV_TILE_R, Z
CMP KBD$HOME, R8 ; tile: home = top left
RBRA NAV_TILE_H, Z
CMP KBD$END, R8 ; tile: end = bottom right
RBRA NAV_TILE_E, Z
RBRA WAIT_FOR_KEY, 1
NAV_PAL CMP KBD$CUR_UP, R8 ; palette: cursor up
RBRA NAV_PAL_U, Z
CMP KBD$CUR_DOWN, R8 ; palette: cursor down
RBRA NAV_PAL_D, Z
CMP KBD$CUR_LEFT, R8 ; palette: cursor left
RBRA NAV_PAL_L, Z
CMP KBD$CUR_RIGHT, R8 ; palette: cursor right
RBRA NAV_PAL_R, Z
CMP KBD$HOME, R8 ; palette: home = top left
RBRA NAV_PAL_H, Z
CMP KBD$END, R8 ; palette: end = bottom right
RBRA NAV_PAL_E, Z
RBRA WAIT_FOR_KEY, 1
; palette navigation: up
NAV_PAL_U MOVE PAL_WS_Y, R8
CMP R5, @R8 ; y-pos already at minimum?
RBRA WAIT_FOR_KEY, Z ; yes: ignore keypress
SUB 2, R5 ; no: one step up
RBRA MAIN_LOOP, 1
; palette navigation: down
NAV_PAL_D MOVE PAL_WS_Y_MAX, R8
CMP R5, @R8 ; y-pos already at maximum?
RBRA WAIT_FOR_KEY, Z ; yes: ignore keypress
ADD 2, R5 ; no: one step down
RBRA MAIN_LOOP, 1
; palette navigation: left
NAV_PAL_L MOVE PAL_WS_X, R8
CMP R4, @R8 ; x-pos already at minimum?
RBRA WAIT_FOR_KEY, Z ; yes: ignore keypress
SUB 2, R4 ; no: one step to the left
RBRA MAIN_LOOP, 1
; palette navigation: right
NAV_PAL_R MOVE PAL_WS_X_MAX, R8
CMP R4, @R8 ; x-pos already at maximum?
RBRA WAIT_FOR_KEY, Z ; yes: ignore keypress
ADD 2, R4 ; no: one step to the right
RBRA MAIN_LOOP, 1
; palette navigation: home
NAV_PAL_H MOVE PAL_WS_X, R8 ; top left position
MOVE @R8, R4
MOVE PAL_WS_Y, R8
MOVE @R8, R5
RBRA MAIN_LOOP, 1
; palette navigation: end
NAV_PAL_E MOVE PAL_WS_X_MAX, R8 ; bottom right position
MOVE @R8, R4
MOVE PAL_WS_Y_MAX, R8
MOVE @R8, R5
RBRA MAIN_LOOP, 1
; tile navigation: up
NAV_TILE_U MOVE TILE_WS_Y, R8
CMP @R8, R7 ; y-pos already at minimum?
RBRA WAIT_FOR_KEY, Z ; yes: ignore keypress
SUB 1, R7 ; no: one line up
RBRA MAIN_LOOP, 1
; tile navigation: down
NAV_TILE_D MOVE TILE_WS_Y_MAX, R8
CMP @R8, R7 ; y-pos already at maximum?
RBRA WAIT_FOR_KEY, Z ; yes: ignore the keypress
ADD 1, R7 ; no: one line down
RBRA MAIN_LOOP, 1
; tile navigation: left
NAV_TILE_L MOVE TILE_WS_X, R8
CMP @R8, R6 ; x-pos already at minimum?
RBRA WAIT_FOR_KEY, Z ; yes: ignore the keypress
SUB 1, R6 ; no: one column left
RBRA MAIN_LOOP, 1
; tile navigation: right
NAV_TILE_R MOVE TILE_WS_X_MAX, R8
CMP @R8, R6 ; x-pos already at maximum?
RBRA WAIT_FOR_KEY, Z ; yes: ignore the keypress
ADD 1, R6 ; no: one column right
RBRA MAIN_LOOP, 1
; tile navigation: home
NAV_TILE_H MOVE TILE_WS_X, R8 ; top left position
MOVE @R8, R6
MOVE TILE_WS_Y, R8
MOVE @R8, R7
RBRA MAIN_LOOP, 1
; tile navigation: end
NAV_TILE_E MOVE TILE_WS_X_MAX, R8 ; bottom right position
MOVE @R8, R6
MOVE TILE_WS_Y_MAX, R8
MOVE @R8, R7
RBRA MAIN_LOOP, 1
; switch mode between palette and tile
SWITCH_MODE XOR 1, R3
RBRA MAIN_LOOP, 1
; draw the currently active character of the palette
; (aka "SELECTED") to the current cursor position within
; the tile window
DRAW_CHAR MOVE R4, @R0
MOVE R5, @R1
MOVE @R2, R8 ; retrieve the character
MOVE R6, @R0
MOVE R7, @R1
MOVE R8, @R2 ; print the character
RSUB WAIT_FOR_VGA, 1
RBRA MAIN_LOOP, 1
; clear tile
CLEAR MOVE TILE_WS_X_MAX, R9
MOVE TILE_WS_Y_MAX, R10
MOVE TILE_WS_Y, R8
MOVE @R8, @R1
_CLEAR_NEXT_Y MOVE TILE_WS_X, R8
MOVE @R8, @R0
_CLEAR_NEXT_X MOVE KBD$SPACE, @R2
ADD 1, @R0
CMP @R0, @R9
RBRA _CLEAR_NEXT_X, !N
ADD 1, @R1
CMP @R1, @R10
RBRA _CLEAR_NEXT_Y, !N
RBRA MAIN_LOOP, 1
; output .dw XX, YY, ZZ, ... statements containing the
; data painted in the tile window to the UART
SAVE_DATA MOVE TILE_WS_X_MAX, R9
MOVE TILE_WS_Y_MAX, R10
MOVE TILE_WS_Y, R8
MOVE @R8, @R1
_SAVE_NEXT_Y MOVE 0x000D, R8 ; print CR
RSUB UART_PUTCHAR, 1
MOVE 0x000A, R8 ; print LF
RSUB UART_PUTCHAR, 1
MOVE 0x002E, R8 ; print "."
RSUB UART_PUTCHAR, 1
MOVE 0x0044, R8 ; print "D"
RSUB UART_PUTCHAR, 1
MOVE 0x0057, R8 ; print "W"
RSUB UART_PUTCHAR, 1
MOVE 0x0020, R8 ; print " "
RSUB UART_PUTCHAR, 1
MOVE TILE_WS_X, R8 ; reset column (hw x cursor)
MOVE @R8, @R0
_SAVE_NEXT_X MOVE 0x30, R8 ; print "0"
RSUB UART_PUTCHAR, 1
MOVE 0x78, R8 ; print "x"
RSUB UART_PUTCHAR, 1
MOVE @R2, R8 ; read tile data from VRAM
AND 0x00F0, R8 ; extract high nibble ...
SHR 4, R8
MOVE HEX_DIGITS, R11 ; ... convert it to hex ...
ADD R8, R11
MOVE @R11, R8
RSUB UART_PUTCHAR, 1 ; ... and output it to UART
MOVE @R2, R8
AND 0x000F, R8 ; extract low nibble and ditto
MOVE HEX_DIGITS, R11
ADD R8, R11
MOVE @R11, R8
RSUB UART_PUTCHAR, 1
ADD 1, @R0
CMP @R0, @R9 ; reached maximum x position?
RBRA _SAVE_NEXT_XC, !N ; no: print a ", " and go on
ADD 1, @R1 ; yes: increase y position
CMP @R1, @R10 ; reached maximum y position?
RBRA _SAVE_NEXT_Y, !N ; no: next line
RBRA END, 1 ; yes: end TileEd
_SAVE_NEXT_XC MOVE 0x002C, R8 ; print ","
RSUB UART_PUTCHAR, 1
MOVE 0x0020, R8 ; print " "
RSUB UART_PUTCHAR, 1
RBRA _SAVE_NEXT_X, 1
; change the size of the tile editor
; the user can enter two new values or press ESC to stick
; to the old values (in the latter case: no reset is
; performed and the work is preserved)
CHANGE_SIZE MOVE 39, R10 ; y-pos = last line of screen
MOVE 0, R9 ; x-pos = first column
MOVE STR_CLR_LINE, R8 ; clear last line
RSUB PRINT_STR_AT, 1
MOVE STR_CHG_SIZE_X, R8 ; print change dx message
RSUB PRINT_STR_AT, 1
MOVE R11, R9 ; x-pos = behind the message
MOVE TILE_DX, R12 ; default val. for ESC...
MOVE @R12, R8 ; ...is set to to TILE_DX
RSUB KBD_GET2DGN, 1 ; 2-digit number from keyboard
MOVE TILE_DX_MAX, R0
CMP R8, R0 ; R8 <= TILE_DX_MAX?
RBRA _CS_CHECK_DX, !N ; yes: continue checking
RBRA CHANGE_SIZE, 1 ; no: enter a new number
_CS_CHECK_DX CMP 1, R8 ; R8 >= 1
RBRA CHANGE_SIZE, N ; no: enter a new number
MOVE R8, R1 ; R1: remember new TILE_DX
_CS_ENTER_DY MOVE 39, R10 ; mult did destroy R10
MOVE 0, R9
MOVE STR_CLR_LINE, R8 ; clear last screen line
RSUB PRINT_STR_AT, 1
MOVE STR_CHG_SIZE_Y, R8 ; print change dy message
RSUB PRINT_STR_AT, 1
MOVE R11, R9
MOVE TILE_DY, R12 ; default val. for ESC...
MOVE @R12, R8 ; ...is set to TILE_DY
RSUB KBD_GET2DGN, 1 ; 2-digit number from keyboard
MOVE TILE_DY_MAX, R0
CMP R8, R0 ; R8 <= TILE_DY_MAX?
RBRA _CS_CHECK_DY, !N ; yes: continue checking
RBRA _CS_ENTER_DY, 1 ; no: enter a new number
_CS_CHECK_DY CMP 1, R8 ; R8 >= 1
RBRA _CS_ENTER_DY, N ; no: enter a new number
MOVE R8, R2 ; R2: remember new TILE_DY
MOVE TILE_DX, R12
CMP @R12, R1 ; old TILE_DX = new TILE_DX?
RBRA _CS_ODX_NDX, Z ; yes: continue checking
RBRA _CS_STORE_NEW, 1 ; no: store new values&reset
_CS_ODX_NDX MOVE TILE_DY, R12
CMP @R12, R2 ; old TILE_DY = new TILE_DY?
RBRA _CS_STORE_NEW, !Z ; no: store new values&reset
MOVE 0, R9 ; yes: show help line...
MOVE 39, R10
MOVE STR_CLR_LINE, R8
RSUB PRINT_STR_AT, 1
MOVE STR_HELP, R8
RSUB PRINT_STR_AT, 1
RBRA TILE_ED_KEEP, 1 ; ...and preserve the work
_CS_STORE_NEW MOVE TILE_DX, R12
MOVE R1, @R12
MOVE TILE_DY, R12
MOVE R2, @R12
RBRA TILE_ED_RESET, 1 ; reset TileEd with new DX, DY
; return to the system by clearing the screen and resetting
END SYSCALL(vga_init, 1)
SYSCALL(vga_cls, 1)
SYSCALL(exit, 1)
; ****************************************************************************
; Various string constants
; ****************************************************************************
HEX_DIGITS .ASCII_P "0123456789ABCDEF"
STR_HELLO .ASCII_W "TileEd - Textmode Sprite Editor V1.0 by sy2002 in January 2016"
STR_HELP .ASCII_W "F1: Toggle F2: Size F3: Clear F12: Output & Quit SPACE: Paint CURSOR: Navigate"
STR_CLR_LINE .ASCII_W " "
STR_CHG_SIZE_X .ASCII_W "Enter new width (1..44): "
STR_CHG_SIZE_Y .ASCII_W "Enter new height (1..36): "
STR_CURCHAR .ASCII_W "SELECTED:"
STR_NOSTART .ASCII_W "Either TILE_DX or TILE_DY is larger than the allowed maximum. TileEd halted.\n"
; ****************************************************************************
; KBD_GETCHAR
; Read a key from the PS2/USB keyboard, no matter where STDIN points to.
; R8: character read (lower 8 bits) or special key (higher 8 bits)
; ****************************************************************************
KBD_GETCHAR INCRB
MOVE IO$KBD_STATE, R0 ; R0: addr of status register
MOVE IO$KBD_DATA, R1 ; R1: addr of receiver reg.
_KBD_GETC_LOOP MOVE @R0, R2 ; Read status register
AND KBD$NEW_ANY, R2 ; Bit 1: special, Bit 0: ASCII
RBRA _KBD_GETC_LOOP, Z ; Loop until character recvd
MOVE @R1, R8 ; Get the character
DECRB
RET
; ****************************************************************************
; KBD_GET2DGN
; Read a two digit number from the PS2/USB keyboard
; R8: (write) default in case ESC is pressed; (read): number entered
; R9: start x for cursor and output
; R10: start y for cursor and output
; (currently hardcoded to 2 digits, but can be easily extended to up to
; 4 digits by adjusting the "CMP 2, R3" command and the BASE10 constants)
; ****************************************************************************
BASE10 .DW 10, 1
KBD_GET2DGN INCRB
MOVE R8, R6 ; R6: remember default
MOVE VGA$CR_X, R0 ; R0: hw cursor X
MOVE VGA$CR_Y, R1 ; R1: hw cursor Y
MOVE VGA$CHAR, R2 ; R2: print at hw cursor pos
MOVE R9, @R0
MOVE R10, @R1
XOR R3, R3 ; R3: loop and base10 counter
XOR R4, R4 ; R4: number that is entered
_KG2DGN_NEXT RSUB KBD_GETCHAR, 1
CMP KBD$ENTER, R8 ; enter pressed?
RBRA _KG2DGN_CHECK1, !Z ; no: continue processing
MOVE R7, R4 ; yes: use preserved digit
RBRA _KG2DGN_END, 1
_KG2DGN_CHECK1 CMP KBD$ESC, R8 ; ESC pressed?
RBRA _KG2DGN_CHECK2, !Z ; no: continue processing
MOVE R6, R4 ; return default value
RBRA _KG2DGN_END, 1
_KG2DGN_CHECK2 CMP 47, R8 ; ASCII value > 47?
RBRA _KG2DGN_NEXT, N ; no: ignore key
CMP 47, R8 ; ASCII value = 47?
RBRA _KG2DGN_NEXT, Z ; yes: ignore key
CMP 58, R8 ; ASCII value < 58?
RBRA _KG2DGN_NEXT, !N ; no: ignore key
; print digit and move cursor to the right
MOVE R8, @R2
ADD 1, @R0
; calculate decimal number
MOVE BASE10, R5 ; base10 multipliers
ADD R3, R5 ; address right base
SUB 48, R8 ; convert ASCII to number
MOVE R8, R7 ; preserve R8 in case of ENTER
MOVE @R5, R9 ; retrieve base
SYSCALL(mulu, 1) ; R11|R10 = R8 x R9
ADD R10, R4 ; R10 enough, 2 digits < 100
ADD 1, R3 ; next digit
CMP 2, R3 ; two digits entered
RBRA _KG2DGN_NEXT, !Z
_KG2DGN_END MOVE R4, R8
DECRB
RET
; ****************************************************************************
; UART_PUTCHAR
; Write a character to the UART, no matter where STDOUT points to.
; R8: character to be sent
; ****************************************************************************
UART_PUTCHAR INCRB ; Get a new register page
MOVE IO$UART_SRA, R0 ; R0: address of status register
MOVE IO$UART_THRA, R1 ; R1: address of transmit register
_UART_PUTC_WAIT MOVE @R0, R2 ; read status register
AND 0x0002, R2 ; ready to transmit?
RBRA _UART_PUTC_WAIT, Z ; loop until ready
MOVE R8, @R1 ; Print character
DECRB ; Restore the old page
RET
; ****************************************************************************
; DRAW_WORKSPACE
; * Prints the whole workspace (palette, strings, editing window)
; * Sets up the following variables:
; TILE_WS_X, TILE_WS_Y, TILE_WS_X_MAX, TILE_WS_Y_MAX
; ****************************************************************************
; print workspace strings
DRAW_WORKSPACE MOVE STR_HELLO, R8 ; welcome string: Top line
XOR R9, R9
XOR R10, R10
RSUB PRINT_STR_AT, 1
MOVE STR_CURCHAR, R8 ; selected character string
MOVE SELECTED_Y, R10
RSUB PRINT_STR_AT, 1
MOVE STR_HELP, R8 ; help string: Bottom line
MOVE 39, R10
RSUB PRINT_STR_AT, 1
; VGA registers
MOVE VGA$CR_X, R0
MOVE VGA$CR_Y, R1
MOVE VGA$CHAR, R2
; center tile editing box on the right side of workspace
; by setting the hardware cursor to the correct coordinate
MOVE TILE_DX, R12
MOVE @R12, R3
SHR 1, R3 ; divide TILE_DX by 2 ...
MOVE TILE_CENTER_X, R4
SUB R3, R4 ; ... and subtract from center
MOVE R4, @R0 ; store to hw cursor
MOVE TILE_WS_X, R5 ; remember this as TILE_WS_X
MOVE R4, @R5
MOVE TILE_DX, R12
ADD @R12, R4 ; calculate TILE_WS_X_MAX
SUB 1, R4
MOVE TILE_WS_X_MAX, R5
MOVE R4, @R5
SUB 1, @R0 ; -1 because of border line
MOVE TILE_DY, R12
MOVE @R12, R3 ; TILE_DY ditto
SHR 1, R3
MOVE TILE_CENTER_Y, R4
SUB R3, R4
MOVE R4, @R1
MOVE TILE_WS_Y, R5
MOVE R4, @R5
MOVE TILE_DY, R12
ADD @R12, R4
SUB 1, R4
MOVE TILE_WS_Y_MAX, R5
MOVE R4, @R5
SUB 1, @R1
MOVE TILE_DY, R12
MOVE @R12, R3 ; distance top to bottom
ADD 1, R3
; draw upper and lower left corners
MOVE 0x0086, @R2 ; draw upper-left corner
RSUB WAIT_FOR_VGA, 1
ADD R3, @R1
MOVE 0x0083, @R2 ; draw lower-left corner
RSUB WAIT_FOR_VGA, 1
; draw upper and lower lines
MOVE TILE_DX, R12
MOVE @R12, R5 ; x-width of box
_DRAW_WS_NX_TB ADD 1, @R0
SUB R3, @R1
MOVE 0x008A, @R2 ; draw upper "-"
RSUB WAIT_FOR_VGA, 1
ADD R3, @R1
MOVE 0x008A, @R2
RSUB WAIT_FOR_VGA, 1 ; draw lower "-"
SUB 1, R5
RBRA _DRAW_WS_NX_TB, !Z
; draw upper and lower right corners
ADD 1, @R0
MOVE 0x0089, @R2 ; lower-right corner
SUB R3, @R1
MOVE 0x008C, @R2 ; upper-right corner
RSUB WAIT_FOR_VGA, 1
; draw left and right lines
MOVE TILE_DX, R12
SUB @R12, @R0
SUB 1, @R0
ADD 1, @R1
MOVE TILE_DY, R12
MOVE @R12, R5
_DRAW_WS_NX_LR MOVE 0x0085, @R2 ; draw left "|"
RSUB WAIT_FOR_VGA, 1
MOVE TILE_DX, R12
ADD @R12, @R0
ADD 1, @R0
MOVE 0x0085, @R2 ; draw right "|"
RSUB WAIT_FOR_VGA, 1
MOVE TILE_DX, R12
SUB @R12, @R0
SUB 1, @R0
ADD 1, @R1
SUB 1, R5
RBRA _DRAW_WS_NX_LR, !Z
; ****************************************************************************
; PRINT_STR_AT
; print a zero terminated string at x/y pos
; only one-liners are allowed
; R8: pointer to string
; R9/R10: x/y pos
; R11 (output): x-pos of last printed character plus one
; ****************************************************************************
PRINT_STR_AT INCRB
MOVE VGA$CR_Y, R0 ; set hw cursor to y-pos
MOVE R10, @R0
MOVE VGA$CR_X, R0
MOVE VGA$CHAR, R1
MOVE R8, R3
MOVE R9, R4
_PRINT_STR_LOOP MOVE R4, @R0 ; set x-pos
MOVE @R3, @R1 ; print character
RSUB WAIT_FOR_VGA, 1 ; VGA is slower than CPU
ADD 1, R4 ; increase x-pos
ADD 1, R3 ; increase character pointer
CMP 0, @R3 ; string end?
RBRA _PRINT_STR_LOOP, !Z ; no: continue printing
MOVE R4, R11
DECRB
RET
; ****************************************************************************
; DRAW_PALETTE
; draw the whole character palette
; ****************************************************************************
; draw y axis legend
DRAW_PALETTE MOVE VGA$CR_Y, R0
MOVE VGA$CR_X, R1
MOVE VGA$CHAR, R2
MOVE START_Y, R3
MOVE START_X, R4 ; one x col. distance between
SUB 2, R4 ; legend and content
RSUB DRAW_LEGEND, 1
; draw x axis legend
MOVE VGA$CR_X, R0
MOVE VGA$CR_Y, R1
MOVE VGA$CHAR, R2
MOVE START_X, R3
MOVE START_Y, R4 ; one y line distance between
SUB 2, R4 ; legend and content
RSUB DRAW_LEGEND, 1
; draw the 256 characters
XOR R8, R8 ; current character: 0..255
MOVE START_Y, R4 ; initial y-position on screen
_DRAW_P_LY MOVE START_X, R3 ; x-starting pos. of each row
XOR R9, R9 ; current x-counter: 0..15
_DRAW_P_LX MOVE R3, @R0 ; cursor x-pos to hardware
MOVE R4, @R1 ; dito cursor y-pos
MOVE R8, @R2 ; print character on VGA
RSUB WAIT_FOR_VGA, 1 ; wait for print being done
ADD 2, R3 ; skip one column
ADD 1, R8 ; next character
ADD 1, R9 ; x-counter: 0..15
CMP 16, R9 ; already more than 15?
RBRA _DRAW_P_LX, !Z ; no: next column
ADD 2, R4 ; yes: next line
CMP 256, R8 ; already more than 255 chars?
RBRA _DRAW_P_LY, !Z ; no: go on printing
; calculate PAL_WS_* variables
MOVE PAL_WS_X, R0
MOVE START_X, @R0
MOVE PAL_WS_X_MAX, R0
MOVE 30, R1
ADD START_X, R1
MOVE R1, @R0
MOVE PAL_WS_Y, R0
MOVE START_Y, @R0
MOVE PAL_WS_Y_MAX, R0
MOVE 30, R1
ADD START_Y, R1
MOVE R1, @R0
RET
; draw one legend axis
; input registers:
; R0: variable dimension hardware register
; R1: constant dimension hardware register
; R2: VGA character print register
; R3: variable axis start position
; R4: constant axis start position
DRAW_LEGEND XOR R8, R8
_DRAW_LEG_LOOP RSUB MAKE_ASCII, 1
MOVE R3, @R0 ; hardware cursor variable
MOVE R4, @R1 ; hardware cursor constant
MOVE R9, @R2 ; draw char
RSUB WAIT_FOR_VGA, 1 ; CPU is too fast for VGA
ADD 1, R8 ; increase character
ADD 2, R3 ; increase variable dimension
CMP 16, R8 ; 0 .. F printed?
RBRA _DRAW_LEG_LOOP, !Z ; no: loop
RET ; yes: return
; convert a number between 0 and 15 into the ascii value
; of the corresponding hex nibble
; IN: R8 number 0..15
; OUT: R9 ascii of corresponding hex nibble
MAKE_ASCII CMP 10, R8 ; R8 < 10?
RBRA _MASCII_LESS10, N ; yes
MOVE 55, R9
ADD R8, R9 ; no: >= 10: A = ASCII 65
RET
_MASCII_LESS10 MOVE 48, R9 ; 0 = ASCII 48
ADD R8, R9
RET
; ****************************************************************************
; WAIT_FOR_VGA
; VGA is much slower than CPU, so for example between
; drawing multiple characters, CPU needs to wait until
; the drawing of the old character finished
; ****************************************************************************
WAIT_FOR_VGA INCRB
MOVE VGA$STATE, R0
_WAIT_FOR_VGAL MOVE @R0, R1
AND VGA$BUSY, R1
RBRA _WAIT_FOR_VGAL, !Z
DECRB
RET
; ****************************************************************************
; CLRSCR
; Clear the screen
; ****************************************************************************
CLRSCR INCRB
MOVE VGA$STATE, R0
OR VGA$CLR_SCRN, @R0
RSUB WAIT_FOR_VGA, 1
DECRB
RET
; ****************************************************************************
; VARIABLES
; ****************************************************************************
TILE_DX .BLOCK 1
TILE_DY .BLOCK 1
; workspace boundaries in absolute screen coordinates: palette and tile
PAL_WS_X .BLOCK 1
PAL_WS_Y .BLOCK 1
PAL_WS_X_MAX .BLOCK 1
PAL_WS_Y_MAX .BLOCK 1
TILE_WS_X .BLOCK 1
TILE_WS_Y .BLOCK 1
TILE_WS_X_MAX .BLOCK 1
TILE_WS_Y_MAX .BLOCK 1
|
P6/data_P6_2/MDTest100.asm
|
alxzzhou/BUAA_CO_2020
| 1 |
88768
|
ori $ra,$ra,0xf
mthi $1
div $1,$ra
div $2,$ra
sll $4,$3,21
lb $1,11($0)
ori $4,$4,65109
div $4,$ra
divu $4,$ra
mtlo $4
mthi $0
srav $6,$5,$6
addiu $4,$4,-10722
sb $5,13($0)
ori $4,$3,27308
multu $1,$5
mflo $3
divu $2,$ra
mfhi $0
div $5,$ra
addu $1,$4,$6
sll $1,$5,1
mthi $5
mtlo $1
addiu $2,$2,28392
ori $6,$1,41611
mtlo $6
mthi $4
sll $2,$0,26
addu $6,$6,$6
div $0,$ra
addiu $6,$2,-22316
lb $0,16($0)
mflo $6
addu $5,$4,$3
addu $5,$2,$2
multu $4,$2
sll $1,$1,14
ori $3,$2,15165
mthi $5
lb $5,16($0)
addu $4,$2,$4
mtlo $4
mthi $5
div $5,$ra
lb $4,4($0)
mfhi $4
lui $4,39939
mthi $1
addiu $1,$3,29061
mult $4,$6
addiu $6,$2,4386
mfhi $2
sb $1,9($0)
mult $1,$5
ori $3,$5,8851
srav $5,$0,$5
mfhi $5
addiu $5,$0,-22332
divu $0,$ra
divu $2,$ra
ori $4,$1,15103
ori $1,$5,47315
srav $2,$0,$2
srav $0,$1,$2
lb $1,16($0)
addu $3,$3,$3
mtlo $1
divu $4,$ra
mfhi $5
div $4,$ra
ori $4,$5,55504
mtlo $1
mflo $6
mtlo $5
div $4,$ra
srav $5,$4,$6
srav $1,$4,$4
addu $1,$1,$5
lb $0,1($0)
addiu $0,$5,10967
mflo $4
multu $5,$1
addu $4,$1,$3
mult $4,$2
sb $0,12($0)
addiu $2,$5,22765
lui $4,9211
multu $0,$4
addiu $1,$5,1206
sll $5,$2,31
div $1,$ra
multu $6,$6
divu $5,$ra
srav $4,$4,$2
multu $5,$5
addu $5,$2,$2
addiu $4,$2,-20167
divu $5,$ra
addiu $5,$5,-25922
multu $6,$0
mtlo $5
ori $4,$4,57481
lui $4,48918
ori $4,$3,26418
mflo $4
mfhi $3
addiu $1,$1,15278
sll $1,$5,0
sb $4,8($0)
multu $3,$6
mfhi $6
addiu $2,$5,-25648
lui $5,16300
div $6,$ra
mfhi $4
div $2,$ra
mthi $0
addu $6,$6,$4
mflo $1
ori $0,$1,26067
addu $1,$5,$5
mtlo $4
divu $1,$ra
ori $0,$0,4024
mult $5,$5
lb $4,2($0)
srav $3,$3,$3
ori $6,$1,38542
sll $3,$3,11
mflo $5
sb $1,8($0)
div $0,$ra
divu $2,$ra
addu $5,$2,$2
mthi $5
mflo $4
multu $6,$5
mthi $6
mthi $3
multu $0,$3
lui $0,15210
mthi $5
mthi $0
multu $2,$2
mtlo $4
div $1,$ra
mtlo $6
div $4,$ra
addu $5,$0,$5
divu $4,$ra
lui $5,691
addiu $4,$5,-26101
mfhi $0
lui $4,42972
addu $5,$6,$1
addiu $1,$1,19783
divu $1,$ra
multu $5,$5
lui $4,48455
mthi $4
mflo $0
mult $6,$6
mflo $0
multu $4,$0
addu $6,$6,$3
mflo $4
mult $4,$4
ori $1,$4,30049
mfhi $5
lb $0,16($0)
divu $6,$ra
div $2,$ra
ori $4,$4,62229
addu $1,$3,$3
mflo $3
ori $4,$4,43281
mflo $5
multu $5,$2
addiu $4,$4,-29222
mthi $5
mfhi $1
ori $5,$5,51105
lui $1,64454
mflo $6
srav $0,$4,$3
div $4,$ra
div $1,$ra
divu $1,$ra
lb $5,7($0)
ori $4,$2,13888
div $2,$ra
mthi $6
addu $4,$2,$2
mflo $5
addiu $4,$2,-5198
div $2,$ra
ori $5,$4,5382
divu $4,$ra
lui $6,37405
mult $4,$4
lui $5,28254
mfhi $4
mthi $5
addu $1,$0,$6
srav $4,$0,$5
mthi $6
srav $1,$4,$4
lb $3,16($0)
ori $6,$6,38895
divu $4,$ra
div $0,$ra
div $2,$ra
ori $1,$1,4308
srav $6,$2,$3
div $5,$ra
mult $4,$4
mtlo $4
mtlo $3
div $2,$ra
srav $5,$1,$5
multu $5,$4
addu $4,$4,$4
mult $4,$0
srav $0,$5,$2
sll $5,$5,18
addu $4,$4,$0
mthi $5
sll $6,$0,18
sll $2,$2,28
mult $4,$6
sb $4,7($0)
lb $2,10($0)
mflo $2
mfhi $6
mflo $5
sll $3,$5,18
ori $1,$1,58657
mflo $3
mult $4,$4
mthi $1
divu $5,$ra
mflo $4
lb $4,15($0)
mfhi $4
mtlo $4
div $5,$ra
lui $2,20434
mthi $6
lui $4,49276
div $4,$ra
mtlo $1
sb $4,3($0)
addiu $3,$4,-11267
mfhi $4
sb $5,3($0)
addiu $5,$4,3620
mfhi $5
addu $1,$2,$3
addiu $6,$5,-20075
ori $2,$2,17202
mthi $4
divu $0,$ra
multu $2,$2
addiu $3,$1,-24484
sll $3,$1,0
mtlo $4
sb $1,11($0)
mfhi $4
ori $5,$0,28171
mthi $1
sb $6,13($0)
multu $4,$1
mflo $6
ori $4,$4,38489
sb $5,7($0)
addu $2,$2,$2
mtlo $2
sb $5,8($0)
srav $5,$5,$4
mult $6,$6
addu $6,$4,$6
sb $4,7($0)
divu $5,$ra
srav $2,$2,$2
addu $1,$1,$5
div $4,$ra
lb $4,5($0)
mult $2,$2
sll $5,$5,28
lb $4,9($0)
mthi $6
sb $4,15($0)
mthi $5
mult $6,$6
mfhi $2
mthi $1
sb $2,3($0)
ori $6,$2,19315
mult $3,$3
div $6,$ra
ori $4,$2,1489
multu $0,$4
mtlo $4
mflo $5
mthi $3
addu $5,$4,$2
mult $0,$2
mult $5,$4
lb $4,11($0)
mult $4,$1
mfhi $4
sb $5,11($0)
addu $5,$5,$1
mfhi $5
lb $5,14($0)
multu $3,$4
mult $2,$2
multu $1,$4
ori $4,$0,43037
sb $5,11($0)
addu $4,$4,$2
addu $1,$5,$5
ori $3,$2,34764
mfhi $2
addiu $1,$2,28873
divu $5,$ra
mthi $3
addu $1,$4,$1
mflo $6
mult $2,$2
addu $1,$2,$0
div $1,$ra
mthi $4
srav $5,$1,$4
mfhi $2
srav $5,$2,$5
lui $4,56059
divu $5,$ra
addu $5,$2,$3
mflo $2
div $1,$ra
mflo $0
lui $4,23386
srav $4,$1,$1
div $0,$ra
div $1,$ra
divu $5,$ra
mthi $2
sll $5,$6,23
addiu $0,$2,-28454
mfhi $1
divu $4,$ra
ori $4,$2,2758
div $4,$ra
mthi $0
mfhi $4
mult $4,$1
sb $2,13($0)
mthi $4
sll $4,$5,10
addu $3,$1,$3
lb $1,8($0)
sb $5,5($0)
lui $5,63331
lb $5,3($0)
mtlo $1
ori $4,$5,58617
addu $5,$4,$4
lui $1,32715
mfhi $0
multu $1,$1
lb $1,13($0)
mfhi $5
addu $1,$5,$1
mflo $0
srav $1,$4,$4
addu $4,$5,$6
lui $5,24079
sll $5,$6,29
lb $1,10($0)
mthi $4
addu $5,$4,$4
lui $2,9105
mult $3,$3
div $4,$ra
lui $4,46537
div $5,$ra
div $4,$ra
lb $4,11($0)
srav $4,$2,$5
divu $5,$ra
lui $6,23110
lui $4,16398
div $4,$ra
ori $3,$3,40318
div $5,$ra
sll $1,$2,0
addu $0,$0,$3
addiu $2,$2,906
mflo $5
div $4,$ra
mfhi $1
addiu $4,$4,-1230
mflo $0
mult $3,$4
ori $4,$2,14935
lb $4,10($0)
mult $1,$4
addiu $1,$5,12383
addu $5,$1,$1
div $5,$ra
mfhi $4
addiu $4,$4,7146
mflo $4
ori $5,$2,50177
mtlo $5
ori $4,$4,51401
sb $4,16($0)
srav $5,$5,$2
ori $1,$6,36878
srav $4,$1,$4
lb $5,2($0)
divu $4,$ra
sll $1,$6,24
addu $6,$2,$2
multu $5,$5
lb $0,6($0)
divu $5,$ra
lui $1,33456
sll $5,$6,29
addu $4,$1,$2
srav $5,$0,$4
addu $1,$5,$5
sb $2,10($0)
mthi $6
lui $1,39392
multu $4,$2
multu $0,$2
multu $4,$5
divu $3,$ra
multu $0,$4
mult $5,$0
sb $4,5($0)
ori $4,$2,43398
div $4,$ra
mthi $5
mfhi $1
ori $5,$5,3194
lb $5,12($0)
lui $1,32623
mthi $4
lb $6,6($0)
mult $0,$2
mthi $1
div $0,$ra
lb $2,5($0)
lui $4,25801
srav $5,$4,$5
multu $5,$5
ori $2,$2,7047
mflo $4
mult $5,$5
multu $1,$6
div $3,$ra
multu $1,$2
srav $4,$2,$0
lb $4,0($0)
addiu $0,$3,27408
ori $4,$4,40305
mfhi $4
mflo $6
mult $4,$5
div $5,$ra
mfhi $4
mthi $4
addiu $0,$3,-29241
multu $6,$6
srav $5,$1,$5
addiu $4,$4,-22132
mtlo $4
mflo $1
multu $1,$4
mthi $6
mfhi $4
srav $1,$5,$0
mult $4,$1
mult $5,$4
sb $6,10($0)
sb $6,3($0)
mthi $3
lb $6,16($0)
mthi $6
multu $4,$4
div $3,$ra
sll $0,$4,0
addu $5,$2,$5
mfhi $2
mflo $4
lui $4,17881
lb $0,6($0)
mthi $1
srav $5,$5,$5
mflo $6
sb $4,6($0)
mfhi $4
multu $2,$5
addiu $1,$3,31404
sll $2,$2,16
srav $4,$4,$4
mult $1,$1
mthi $0
addu $4,$5,$3
addiu $1,$5,26760
srav $0,$4,$4
lb $0,10($0)
mflo $1
lui $2,45829
mfhi $1
mfhi $4
addiu $5,$3,-28385
lui $5,21579
mtlo $4
mtlo $4
sb $5,5($0)
mfhi $2
multu $5,$4
sb $4,2($0)
multu $1,$1
multu $1,$1
mfhi $3
mthi $4
mfhi $5
ori $0,$0,45585
lui $1,38642
mult $4,$2
lui $1,56687
srav $1,$1,$1
addu $2,$6,$2
sll $2,$2,11
mfhi $1
addu $1,$4,$2
multu $4,$2
mflo $6
sb $2,7($0)
mfhi $4
mthi $5
addu $2,$2,$2
div $1,$ra
multu $0,$1
divu $4,$ra
mthi $1
mfhi $1
mflo $3
mthi $1
divu $0,$ra
div $4,$ra
divu $5,$ra
addiu $4,$3,13317
sll $5,$0,8
lui $3,15687
mthi $4
ori $1,$5,26449
sb $4,8($0)
mtlo $4
addu $4,$4,$4
addu $4,$2,$2
lui $6,63724
sb $2,14($0)
mfhi $1
mtlo $0
sb $3,0($0)
multu $4,$5
sll $4,$5,17
multu $3,$3
divu $5,$ra
srav $0,$1,$5
div $3,$ra
addu $5,$2,$2
lb $5,14($0)
mthi $4
divu $4,$ra
mthi $3
mthi $3
lui $4,27765
lb $3,8($0)
sb $4,7($0)
mflo $5
divu $1,$ra
mtlo $5
lui $3,14043
ori $6,$4,59621
mult $4,$4
lb $1,5($0)
ori $1,$1,2644
multu $3,$0
mflo $5
addiu $5,$4,6519
sb $5,12($0)
div $2,$ra
lb $6,8($0)
mthi $4
sll $4,$2,13
sll $2,$2,26
sll $2,$2,6
div $4,$ra
addu $3,$3,$3
addu $5,$0,$4
srav $4,$1,$4
lb $4,14($0)
addiu $6,$4,18912
sb $2,9($0)
lui $4,32194
addu $5,$4,$4
mult $6,$6
srav $5,$2,$6
div $4,$ra
sll $4,$4,7
sb $4,3($0)
mfhi $4
mfhi $4
srav $4,$4,$2
mult $2,$2
mfhi $4
mult $1,$2
div $6,$ra
mthi $4
lb $5,3($0)
divu $5,$ra
multu $1,$1
srav $6,$4,$6
ori $5,$4,28911
mflo $3
addu $6,$6,$5
divu $4,$ra
mfhi $5
lb $4,0($0)
sll $2,$2,6
srav $6,$6,$4
div $4,$ra
sll $3,$4,21
divu $4,$ra
lb $5,1($0)
lb $6,9($0)
addu $0,$2,$2
lb $4,13($0)
lui $5,21845
srav $0,$5,$0
addiu $4,$4,29882
srav $3,$4,$3
divu $5,$ra
addiu $1,$5,-25849
mflo $6
mthi $2
sll $5,$5,30
srav $6,$0,$4
lb $3,1($0)
srav $3,$3,$3
srav $4,$1,$4
srav $1,$4,$3
mflo $4
sb $4,7($0)
mflo $6
srav $0,$2,$4
ori $3,$2,63296
addiu $6,$3,12978
mflo $4
mult $5,$5
mflo $2
srav $2,$2,$3
ori $1,$4,14318
mult $3,$2
sll $2,$5,27
multu $5,$4
mflo $0
mthi $2
ori $1,$6,54644
addiu $4,$1,5906
sb $2,5($0)
div $3,$ra
lui $2,56042
multu $3,$6
sb $2,3($0)
ori $4,$5,45744
lui $0,21685
mult $3,$3
multu $4,$4
div $4,$ra
mfhi $3
mflo $6
multu $5,$5
sb $1,15($0)
lui $4,17132
multu $0,$0
mtlo $5
sb $1,12($0)
mflo $1
mfhi $4
srav $4,$5,$0
lb $2,3($0)
addu $4,$2,$2
divu $5,$ra
lb $4,10($0)
sb $6,13($0)
sb $6,13($0)
lb $0,1($0)
mthi $0
addu $4,$4,$4
lui $4,31649
sb $5,11($0)
mult $0,$5
mfhi $4
lb $2,6($0)
mthi $2
mfhi $2
mtlo $5
addiu $0,$2,2033
srav $5,$5,$3
mflo $1
mult $5,$2
mthi $5
srav $5,$0,$3
mult $4,$5
addiu $1,$4,-20536
div $5,$ra
mult $4,$2
lui $2,22779
addiu $5,$4,4724
lui $5,47935
divu $5,$ra
multu $0,$0
sb $4,15($0)
div $1,$ra
sb $4,0($0)
mtlo $4
divu $5,$ra
sb $5,5($0)
mthi $6
div $4,$ra
lui $6,13437
addu $1,$1,$1
sll $4,$3,30
div $4,$ra
srav $4,$1,$4
lb $4,10($0)
mtlo $4
mult $1,$1
sb $3,3($0)
addu $5,$4,$4
divu $6,$ra
lb $5,1($0)
addu $4,$6,$6
div $2,$ra
lb $5,1($0)
mult $2,$2
lb $1,8($0)
ori $1,$3,19615
mult $4,$2
ori $5,$3,40889
div $5,$ra
mtlo $4
mfhi $5
mflo $5
mtlo $1
addu $6,$1,$5
sb $4,2($0)
ori $2,$2,22594
mthi $0
sll $1,$3,27
addu $6,$1,$5
div $5,$ra
mflo $5
mfhi $6
sll $5,$3,25
mfhi $5
mult $4,$2
mult $4,$0
mfhi $0
sb $1,9($0)
div $1,$ra
lb $4,11($0)
divu $3,$ra
divu $1,$ra
divu $5,$ra
sb $4,6($0)
mfhi $5
lui $3,21440
addiu $1,$1,-15123
addiu $1,$4,6105
lui $6,15854
multu $4,$1
mthi $4
mthi $3
sb $4,16($0)
srav $2,$2,$2
lui $0,52180
div $2,$ra
addiu $5,$5,17073
sb $1,6($0)
addu $4,$0,$0
addu $4,$4,$4
sll $5,$5,11
mflo $1
mtlo $0
ori $5,$2,13746
mthi $6
lb $4,15($0)
mflo $4
mtlo $6
mfhi $5
mflo $3
mult $4,$0
lb $1,15($0)
div $1,$ra
multu $4,$4
srav $1,$5,$5
mfhi $5
mfhi $0
sll $1,$2,6
mtlo $1
mfhi $1
mult $5,$4
sll $4,$2,25
srav $3,$6,$3
ori $0,$1,32428
mult $4,$5
mfhi $4
mtlo $1
mthi $1
addu $4,$1,$3
ori $4,$3,23685
divu $4,$ra
mult $4,$1
addu $4,$3,$3
ori $5,$5,59506
srav $4,$0,$4
addu $1,$1,$2
addu $4,$5,$6
addu $4,$2,$4
lb $5,7($0)
divu $5,$ra
lui $1,4898
sb $0,9($0)
lb $4,7($0)
mthi $1
sll $4,$2,22
ori $3,$5,63431
mfhi $5
divu $4,$ra
div $4,$ra
ori $4,$4,53674
mult $5,$5
addu $1,$2,$1
div $4,$ra
mult $3,$3
lui $6,16177
mtlo $1
mult $1,$5
lui $6,12743
srav $4,$4,$5
divu $4,$ra
mfhi $0
addu $4,$4,$5
addiu $2,$6,-28690
mtlo $6
addu $5,$5,$5
mult $2,$2
multu $5,$4
srav $3,$4,$3
addu $5,$1,$1
lb $6,4($0)
mtlo $0
mfhi $1
sll $5,$4,9
divu $2,$ra
mfhi $1
sll $5,$2,1
div $5,$ra
addiu $3,$3,-21688
multu $0,$2
mult $3,$3
srav $5,$2,$3
sll $5,$2,16
lui $2,25414
sb $5,13($0)
ori $0,$5,21057
mtlo $0
mtlo $4
mthi $2
|
programs/oeis/008/A008486.asm
|
neoneye/loda
| 22 |
240870
|
; A008486: Expansion of (1 + x + x^2)/(1 - x)^2.
; 1,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,99,102,105,108,111,114,117,120,123,126,129,132,135,138,141,144,147,150,153,156,159,162,165,168,171,174,177,180,183,186,189,192,195,198,201,204,207,210,213,216,219,222,225,228,231,234,237,240,243,246,249,252,255,258,261,264,267,270,273,276,279,282,285,288,291,294,297
pow $1,$0
mul $0,3
add $1,$0
mov $0,$1
|
programs/oeis/007/A007606.asm
|
neoneye/loda
| 22 |
164623
|
; A007606: Take 1, skip 2, take 3, etc.
; 1,4,5,6,11,12,13,14,15,22,23,24,25,26,27,28,37,38,39,40,41,42,43,44,45,56,57,58,59,60,61,62,63,64,65,66,79,80,81,82,83,84,85,86,87,88,89,90,91,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190
mov $1,1
add $1,$0
lpb $0
sub $0,$2
trn $0,3
add $2,2
add $1,$2
lpe
mov $0,$1
|
programs/oeis/169/A169720.asm
|
neoneye/loda
| 22 |
16264
|
<gh_stars>10-100
; A169720: a(n) = (3*2^(n-1)-1)*(3*2^n-1).
; 1,10,55,253,1081,4465,18145,73153,293761,1177345,4713985,18865153,75479041,301953025,1207885825,4831690753,19327057921,77308821505,309236465665,1236948221953,4947797606401,19791199862785,79164818325505,316659311050753,1266637319700481,5066549429796865,20266198021177345,81064792688689153,324259171962716161,1297036690266783745,5188146765898973185,20752587073259569153,83010348312365629441,332041393288117223425,1328165573229778305025,5312662293073732042753,21250649172604165816321,85002596691035138555905,340010386765377504804865,1360041547063983920381953,5440166188260883483852801,21760664753053429540061185,87042659012233509369544705,348170636048973619896778753,1392682544195973644424314881,5570730176784052907371659265,22282920707136528288835436545,89131682828546746474039345153,356526731314188252533552578561,1426106925256755543409000710145,5704427701027027240185583632385,22817710804108119093841496113153,91270843216432496641564307619841,365083372865730027098653876813825,1460333491462920189459408799924225,5841333965851680919967221785034753,23365335863406724004128060310814721,93461343453626896665030587584610305,373845373814507587957159043021144065
mov $1,2
pow $1,$0
bin $1,2
mul $1,9
add $1,1
mov $0,$1
|
test/test3.asm
|
opengd/pdp8-midi
| 0 |
26155
|
<reponame>opengd/pdp8-midi
/PDP-8 test3.asm just some midi data as ascii to pars
*200
START, CLA CLL
TLS
TAD MDATA
DCA AIX1
TAD M6
DCA COUNT
NEXT, TAD I AIX1
JMS TYPE
ISZ COUNT
JMP NEXT
JMP I [7600
TYPE, 0
TSF
JMP .-1
TLS
CLA CLL
JMP I TYPE
MDATA, .
274 /<
271 /x90 cmd
260 /
241 /!
262 /x24 pitch
264 /
241 /!
266 /x64 velocity
264 /
276 />
274 /<
270 /x80 cmd
260 /
241 /!
262 /x24 pitch
264 /
241 /!
260 /x00 velocity
260 /
276 />
000
M6, -25
COUNT, 0
AIX1=10
|
programs/oeis/029/A029925.asm
|
karttu/loda
| 1 |
95882
|
<gh_stars>1-10
; A029925: Convert n from degrees Celsius to Fahrenheit.
; 32,34,36,37,39,41,43,45,46,48,50,52,54,55,57,59,61,63,64,66,68,70,72,73,75,77,79,81,82,84,86,88,90,91,93,95,97,99,100,102,104,106,108,109,111,113,115,117,118,120,122,124,126,127,129,131,133,135,136,138,140,142,144,145,147,149,151,153,154,156,158,160,162,163,165,167,169,171,172,174,176,178,180,181,183,185,187,189,190,192,194,196,198,199,201,203,205,207,208,210,212,214,216,217,219,221,223,225,226,228,230,232,234,235,237,239,241,243,244,246,248,250,252,253,255,257,259,261,262,264,266,268,270,271,273,275,277,279,280,282,284,286,288,289,291,293,295,297,298,300,302,304,306,307,309,311,313,315,316,318,320,322,324,325,327,329,331,333,334,336,338,340,342,343,345,347,349,351,352,354,356,358,360,361,363,365,367,369,370,372,374,376,378,379,381,383,385,387,388,390,392,394,396,397,399,401,403,405,406,408,410,412,414,415,417,419,421,423,424,426,428,430,432,433,435,437,439,441,442,444,446,448,450,451,453,455,457,459,460,462,464,466,468,469,471,473,475,477,478,480
add $0,18
mov $1,27
mul $1,$0
div $1,15
|
oeis/152/A152055.asm
|
neoneye/loda-programs
| 11 |
95831
|
; A152055: a(n) = ((8+sqrt3)^n + (8-sqrt3)^n/2.
; Submitted by <NAME>
; 1,8,67,584,5257,48488,455131,4324328,41426257,399036104,3857575987,37380013448,362768079961,3524108459048,34256882467147,333139503472424,3240562225062817,31527485889187208,306765478498163491,2985071016730196168,29048442079295165737,282685741248180685544,2751016893133885858747,26772440074003151921768,260547010702883393364721,2535633326731942026607688,24676765574835185430475027,240154616266714503264531464,2337191160202485740973526777,22745626970970187156440009128,221361370763171364303655012651
mov $1,1
lpb $0
sub $0,1
mov $2,$3
mul $2,3
mul $3,8
add $3,$1
mul $1,8
add $1,$2
lpe
mov $0,$1
|
constants/pokemon_constants.asm
|
etdv-thevoid/pokemon-rgb-enhanced
| 1 |
2956
|
const_value = 1
const BULBASAUR ; 1
const IVYSAUR ; 2
const VENUSAUR ; 3
const CHARMANDER ; 4
const CHARMELEON ; 5
const CHARIZARD ; 6
const SQUIRTLE ; 7
const WARTORTLE ; 8
const BLASTOISE ; 9
const CATERPIE ; 10
const METAPOD ; 11
const BUTTERFREE ; 12
const WEEDLE ; 13
const KAKUNA ; 14
const BEEDRILL ; 15
const PIDGEY ; 16
const PIDGEOTTO ; 17
const PIDGEOT ; 18
const RATTATA ; 19
const RATICATE ; 20
const SPEAROW ; 21
const FEAROW ; 22
const EKANS ; 23
const ARBOK ; 24
const PIKACHU ; 25
const RAICHU ; 26
const SANDSHREW ; 27
const SANDSLASH ; 28
const NIDORAN_F ; 29
const NIDORINA ; 30
const NIDOQUEEN ; 31
const NIDORAN_M ; 32
const NIDORINO ; 33
const NIDOKING ; 34
const CLEFAIRY ; 35
const CLEFABLE ; 36
const VULPIX ; 37
const NINETALES ; 38
const JIGGLYPUFF ; 39
const WIGGLYTUFF ; 40
const ZUBAT ; 41
const GOLBAT ; 42
const ODDISH ; 43
const GLOOM ; 44
const VILEPLUME ; 45
const PARAS ; 46
const PARASECT ; 47
const VENONAT ; 48
const VENOMOTH ; 49
const DIGLETT ; 50
const DUGTRIO ; 51
const MEOWTH ; 52
const PERSIAN ; 53
const PSYDUCK ; 54
const GOLDUCK ; 55
const MANKEY ; 56
const PRIMEAPE ; 57
const GROWLITHE ; 58
const ARCANINE ; 59
const POLIWAG ; 60
const POLIWHIRL ; 61
const POLIWRATH ; 62
const ABRA ; 63
const KADABRA ; 64
const ALAKAZAM ; 65
const MACHOP ; 66
const MACHOKE ; 67
const MACHAMP ; 68
const BELLSPROUT ; 69
const WEEPINBELL ; 70
const VICTREEBEL ; 71
const TENTACOOL ; 72
const TENTACRUEL ; 73
const GEODUDE ; 74
const GRAVELER ; 75
const GOLEM ; 76
const PONYTA ; 77
const RAPIDASH ; 78
const SLOWPOKE ; 79
const SLOWBRO ; 80
const MAGNEMITE ; 81
const MAGNETON ; 82
const FARFETCHD ; 83
const DODUO ; 84
const DODRIO ; 85
const SEEL ; 86
const DEWGONG ; 87
const GRIMER ; 88
const MUK ; 89
const SHELLDER ; 90
const CLOYSTER ; 91
const GASTLY ; 92
const HAUNTER ; 93
const GENGAR ; 94
const ONIX ; 95
const DROWZEE ; 96
const HYPNO ; 97
const KRABBY ; 98
const KINGLER ; 99
const VOLTORB ; 100
const ELECTRODE ; 101
const EXEGGCUTE ; 102
const EXEGGUTOR ; 103
const CUBONE ; 104
const MAROWAK ; 105
const HITMONLEE ; 106
const HITMONCHAN ; 107
const LICKITUNG ; 108
const KOFFING ; 109
const WEEZING ; 110
const RHYHORN ; 111
const RHYDON ; 112
const CHANSEY ; 113
const TANGELA ; 114
const KANGASKHAN ; 115
const HORSEA ; 116
const SEADRA ; 117
const GOLDEEN ; 118
const SEAKING ; 119
const STARYU ; 120
const STARMIE ; 121
const MR_MIME ; 122
const SCYTHER ; 123
const JYNX ; 124
const ELECTABUZZ ; 125
const MAGMAR ; 126
const PINSIR ; 127
const TAUROS ; 128
const MAGIKARP ; 129
const GYARADOS ; 130
const LAPRAS ; 131
const DITTO ; 132
const EEVEE ; 133
const VAPOREON ; 134
const JOLTEON ; 135
const FLAREON ; 136
const LEAFEON ; 137
const PORYGON ; 138
const OMANYTE ; 139
const OMASTAR ; 140
const KABUTO ; 141
const KABUTOPS ; 142
const AERODACTYL ; 143
const SNORLAX ; 144
const ARTICUNO ; 145
const ZAPDOS ; 146
const MOLTRES ; 147
const DRATINI ; 148
const DRAGONAIR ; 149
const DRAGONITE ; 150
const MEWTWO ; 151
const MEW ; 152
const FOSSIL_KABUTOPS ; 153
const FOSSIL_AERODACTYL ; 154
const MON_GHOST ; 155
NUM_POKEMON EQU 152
|
asm/shift.asm
|
YikeZhou/lipsi
| 0 |
242344
|
<reponame>YikeZhou/lipsi
#
# shift test program
#
ldi 0x7f
sll
srl
sll
sra
subi 0xff
exit
|
communication/jnosql-query-antlr/src/main/java/org/jnosql/aphrodite/antlr/Query.g4
|
Minitour/jnosql
| 0 |
2764
|
<filename>communication/jnosql-query-antlr/src/main/java/org/jnosql/aphrodite/antlr/Query.g4<gh_stars>0
grammar Query;
select: 'select' fields 'from' entity where? skip? limit? order? EOF;
delete: 'delete' deleteFields? 'from' entity where? EOF;
insert: 'insert' entity (conditions | json) ttl? EOF;
update: 'update' entity (conditions | json) EOF;
get: 'get' keys EOF;
remove: 'remove' keys EOF;
put: 'put' '{' key ',' value (',' ttl)? '}' EOF;
fields: star | name (',' name)*;
deleteFields: name (',' name)*;
conditions: '(' changes ')';
star: '*';
skip: 'skip' INT;
limit: 'limit' INT;
order: 'order' 'by' orderName (orderName)*;
orderName: name | name asc | name desc;
where: 'where' condition (and condition| or condition)* ;
condition: eq | gt | gte | lt | lte | between | in | like;
eq: not? name '=' value;
gt: not? name '>' value;
gte: not? name '>=' value;
lt: not? name '<' value;
lte: not? name '<=' value;
between: not? name 'between' value 'and' value;
in: name not? 'in' '('value (',' value)* ')';
like: name not? 'like' string;
not: 'not';
asc: 'asc';
desc: 'desc';
and: 'and';
or: 'or';
ttl: INT unit;
unit: 'day' | 'hour' | 'minute' | 'second' | 'millisecond' | 'nanosecond';
changes: change (',' change)*;
change: name '=' value;
key: value;
keys: value (','value)*;
value: ( number | string | array | function | parameter | json);
name: ANY_NAME;
entity: ANY_NAME;
array: '{' element (',' element)* '}';
function: convert;
convert: 'convert(' element ',' name')';
element: number | string;
number: '-'? (NUMBER | INT);
string: STRING;
json: object_json | array_json;
object_json: '{' pair_json (',' pair_json)* '}' | '{' '}';
pair_json: STRING ':' value_json ;
value_json: STRING | number | object_json | array_json | 'true' | 'false'| 'null';
array_json: '[' value_json (',' value_json)* ']'| '[' ']';
parameter: PARAMETER;
STRING : '"' (ESC | ~["\\])* '"' | '\'' (ESC | ~["\\])* '\'' ;
INT: [0-9]+;
NUMBER: INT [.]? INT?;
ANY_NAME: [a-zA-Z_.] [a-zA-Z._0-9]*;
PARAMETER:'@'[a-zA-Z._0-9]*;
WS: [ \t\r\n]+ -> skip ;
SL_COMMENT: '//' .*? '\n' -> skip;
fragment ESC : '\\' (["\\/bfnrt] | UNICODE) ;
fragment UNICODE : 'u' HEX HEX HEX HEX ;
fragment HEX : [0-9a-fA-F] ;
|
oeis/193/A193508.asm
|
neoneye/loda-programs
| 11 |
89537
|
; A193508: a(n) = n if n is not a power of 2 and a(2^n) = a(n).
; Submitted by <NAME>
; 0,0,0,3,0,5,6,7,3,9,10,11,12,13,14,15,0,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,5,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,6,65,66,67,68
lpb $0
mov $2,$0
seq $2,198192 ; Replace 2^k in the binary representation of n with n-k (i.e. if n = 2^a + 2^b + 2^c + ... then a(n) = (n-a) + (n-b) + (n-c) + ...).
sub $0,$2
lpe
|
oeis/003/A003955.asm
|
neoneye/loda-programs
| 11 |
95321
|
<filename>oeis/003/A003955.asm
; A003955: a(n) = (2*n + 4) * (1*3*5*...*(2*n+1))^2.
; Submitted by <NAME>(s2)
; 4,54,1800,110250,10716300,1512784350,292183491600,73958946311250,23749039426612500,9430743556307823750,4537044990907363935000,2600104866872495148416250,1750070583471871734510937500,1366930130733208386919792968750,1226227455943070136959515612500000,1252054871733871051719225410088281250,1443692917395725903282368028738264062500,1866775147354751133272061992715727558593750,2690121238661741369946792492660874766015625000,4296258124204734054873524950404050045065253906250
add $0,1
mov $1,$0
mul $0,2
add $1,1
lpb $0
mov $2,$0
sub $0,1
mod $2,2
add $2,$0
mul $1,$2
lpe
mov $0,$1
mul $0,2
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.