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
libtool/src/gmp-6.1.2/mpn/powerpc32/mul_1.asm
kroggen/aergo
1,602
80591
<filename>libtool/src/gmp-6.1.2/mpn/powerpc32/mul_1.asm dnl PowerPC-32 mpn_mul_1 -- Multiply a limb vector with a limb and store the dnl result in a second limb vector. dnl Copyright 1995, 1997, 2000, 2002, 2003, 2005 Free Software Foundation, dnl Inc. dnl This file is part of the GNU MP Library. dnl dnl The GNU MP Library is free software; you can redistribute it and/or modify dnl it under the terms of either: dnl dnl * the GNU Lesser General Public License as published by the Free dnl Software Foundation; either version 3 of the License, or (at your dnl option) any later version. dnl dnl or dnl dnl * the GNU General Public License as published by the Free Software dnl Foundation; either version 2 of the License, or (at your option) any dnl later version. dnl dnl or both in parallel, as here. dnl dnl The GNU MP Library is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License dnl for more details. dnl dnl You should have received copies of the GNU General Public License and the dnl GNU Lesser General Public License along with the GNU MP Library. If not, dnl see https://www.gnu.org/licenses/. include(`../config.m4') C cycles/limb C 603e: ? C 604e: 4.0 C 75x (G3): 4.5-11 C 7400,7410 (G4): 4.5-11 C 744x,745x (G4+): 6.0 C power4/ppc970: 6.0 C power5: 5.63 C INPUT PARAMETERS C rp r3 C up r4 C n r5 C vl r6 ASM_START() PROLOGUE(mpn_mul_1) mtctr r5 addi r3,r3,-4 C adjust res_ptr, it's offset before it's used li r12,0 C clear upper product reg addic r0,r0,0 C clear cy C Start software pipeline lwz r8,0(r4) bdz L(end3) lwzu r9,4(r4) mullw r11,r8,r6 mulhwu r0,r8,r6 bdz L(end1) C Software pipelined main loop L(loop): lwz r8,4(r4) mullw r10,r9,r6 adde r5,r11,r12 mulhwu r12,r9,r6 stw r5,4(r3) bdz L(end2) lwzu r9,8(r4) mullw r11,r8,r6 adde r7,r10,r0 mulhwu r0,r8,r6 stwu r7,8(r3) bdnz L(loop) C Finish software pipeline L(end1): mullw r10,r9,r6 adde r5,r11,r12 mulhwu r12,r9,r6 stw r5,4(r3) adde r7,r10,r0 stwu r7,8(r3) addze r3,r12 blr L(end2): mullw r11,r8,r6 adde r7,r10,r0 mulhwu r0,r8,r6 stwu r7,8(r3) adde r5,r11,r12 stw r5,4(r3) addze r3,r0 blr L(end3): mullw r11,r8,r6 stw r11,4(r3) mulhwu r3,r8,r6 blr EPILOGUE(mpn_mul_1)
libsrc/_DEVELOPMENT/arch/sms/vram/c/sdcc/sms_memcpy_mem_to_vram_unsafe_callee.asm
jpoikela/z88dk
640
84110
; void *sms_memcpy_mem_to_vram_unsafe(void *dst, void *src, unsigned int n) SECTION code_clib SECTION code_arch PUBLIC _sms_memcpy_mem_to_vram_unsafe_callee EXTERN asm_sms_memcpy_mem_to_vram_unsafe _sms_memcpy_mem_to_vram_unsafe_callee: pop af pop de pop hl pop bc push af jp asm_sms_memcpy_mem_to_vram_unsafe
vendor/stdlib/src/Data/List/All.agda
isabella232/Lemmachine
56
4358
------------------------------------------------------------------------ -- Lists where all elements satisfy a given property ------------------------------------------------------------------------ module Data.List.All where open import Data.Function open import Data.List as List hiding (map; all) open import Data.List.Any as Any using (here; there) open Any.Membership-≡ using (_∈_; _⊆_) open import Data.Product as Prod using (_,_) open import Relation.Nullary import Relation.Nullary.Decidable as Dec open import Relation.Unary using (Pred) renaming (_⊆_ to _⋐_) open import Relation.Binary.PropositionalEquality -- All P xs means that all elements in xs satisfy P. infixr 5 _∷_ data All {A} (P : A → Set) : List A → Set where [] : All P [] _∷_ : ∀ {x xs} (px : P x) (pxs : All P xs) → All P (x ∷ xs) head : ∀ {A} {P : A → Set} {x xs} → All P (x ∷ xs) → P x head (px ∷ pxs) = px tail : ∀ {A} {P : A → Set} {x xs} → All P (x ∷ xs) → All P xs tail (px ∷ pxs) = pxs lookup : ∀ {A} {P : A → Set} {xs} → All P xs → (∀ {x} → x ∈ xs → P x) lookup [] () lookup (px ∷ pxs) (here refl) = px lookup (px ∷ pxs) (there x∈xs) = lookup pxs x∈xs tabulate : ∀ {A} {P : A → Set} {xs} → (∀ {x} → x ∈ xs → P x) → All P xs tabulate {xs = []} hyp = [] tabulate {xs = x ∷ xs} hyp = hyp (here refl) ∷ tabulate (hyp ∘ there) map : ∀ {A} {P Q : Pred A} → P ⋐ Q → All P ⋐ All Q map g [] = [] map g (px ∷ pxs) = g px ∷ map g pxs all : ∀ {A} {P : A → Set} → (∀ x → Dec (P x)) → (xs : List A) → Dec (All P xs) all p [] = yes [] all p (x ∷ xs) with p x all p (x ∷ xs) | yes px = Dec.map (_∷_ px , tail) (all p xs) all p (x ∷ xs) | no ¬px = no (¬px ∘ head)
benchmark/Syntacticosmos/Eta.agda
asr/agda-kanso
1
4847
<gh_stars>1-10 module Eta (Gnd : Set)(U : Set)(El : U -> Set) where open import Basics open import Pr open import Nom import Kind open Kind Gnd U El import Cxt open Cxt Kind import Loc open Loc Kind import Term open Term Gnd U El import Shift open Shift Gnd U El data Sawn (G : Cxt)(C : Kind)(L : Loc)(R : Kind) : Kind -> Set where snil : Sawn G C L R R scons : {S T : Kind} -> Sawn G C L R (S |> T) -> G [ L / Term C ]- S -> Sawn G C L R T sarg : {A : U}{K : El A -> Kind} -> Sawn G C L R (Pi A K) -> (a : El A) -> Sawn G C L R (K a) stitch : {G : Cxt}{C : Kind}{Z : Gnd}{L : Loc}{R S : Kind} -> Sawn G C L R S -> G [ L / Args C Z ]- S -> G [ L / Args C Z ]- R stitch snil s = s stitch (scons r s) t = stitch r (s G& t) stitch (sarg r a) t = stitch r (a G^ t) sawsh : {G : Cxt}{C : Kind}{L M : Loc} -> ({T : Kind} -> G [ L / Head ]- T -> G [ M / Head ]- T) -> {R S : Kind} -> Sawn G C L R S -> Sawn G C M R S sawsh rho snil = snil sawsh rho (scons r s) = scons (sawsh rho r) (shift rho s) sawsh rho (sarg r a) = sarg (sawsh rho r) a long : {G : Cxt}{C : Kind}{L : Loc}(S : Kind){T : Kind} -> G [ L / Head ]- T -> Sawn G C L T S -> G [ L / Term C ]- S long (Ty Z) h s = h G$ (stitch s Gnil) long (Pi A K) h s = Gfn A \ a -> long (K a) h (sarg s a) long (S |> T) h s = G\\ (long T (popH h) (scons (sawsh popH s) (long S (# top -! _) snil))) var : {G : Cxt}{C : Kind}(x : Nom){Gx : [| G Has x |]} -> G [ EL / Term C ]- (wit ((G ?- x) {Gx})) var {G} x {Gx} with (G ?- x) {Gx} ... | [ T / g ] = long T (` x -! g) snil
Transynther/x86/_processed/P/_un_/i9-9900K_12_0xa0.log_1_1204.asm
ljhsiun2/medusa
9
166995
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r13 push %r8 push %rax push %rbx push %rcx push %rdi push %rsi lea addresses_UC_ht+0x1b873, %r8 nop and %rsi, %rsi movb $0x61, (%r8) nop nop nop nop cmp $27144, %r13 lea addresses_D_ht+0xffc7, %rsi lea addresses_normal_ht+0x1a63, %rdi add $25031, %rax mov $43, %rcx rep movsw nop nop nop and $54756, %rbx lea addresses_UC_ht+0x4f67, %r13 dec %rbx movl $0x61626364, (%r13) nop xor %r13, %r13 lea addresses_A_ht+0x62a7, %rdi nop nop nop nop nop inc %r13 movups (%rdi), %xmm5 vpextrq $0, %xmm5, %rsi nop nop nop nop add $22195, %rcx lea addresses_D_ht+0x19fa7, %rcx nop nop nop cmp $9972, %rbx mov (%rcx), %si nop add $24079, %r8 lea addresses_normal_ht+0x16a77, %r8 nop nop nop nop cmp %rdi, %rdi vmovups (%r8), %ymm3 vextracti128 $0, %ymm3, %xmm3 vpextrq $1, %xmm3, %rcx nop nop and $991, %rax lea addresses_WT_ht+0xcf37, %rdi nop cmp $35625, %rsi movups (%rdi), %xmm0 vpextrq $0, %xmm0, %rax nop nop nop nop cmp %rbx, %rbx lea addresses_A_ht+0x11227, %rbx nop nop nop nop add %rcx, %rcx and $0xffffffffffffffc0, %rbx movntdqa (%rbx), %xmm0 vpextrq $1, %xmm0, %rdi nop nop nop nop cmp %rcx, %rcx lea addresses_D_ht+0x185a3, %rcx nop nop nop nop and $51, %r13 mov (%rcx), %ax dec %rdi lea addresses_D_ht+0x12da7, %r8 nop nop nop nop dec %rbx and $0xffffffffffffffc0, %r8 movntdqa (%r8), %xmm5 vpextrq $0, %xmm5, %rdi nop nop nop nop dec %r8 lea addresses_WC_ht+0xf8f7, %rax nop nop nop add %r8, %r8 mov $0x6162636465666768, %r13 movq %r13, (%rax) nop nop nop dec %rdi lea addresses_UC_ht+0x9a7, %rsi lea addresses_WT_ht+0xae87, %rdi nop nop add %r10, %r10 mov $77, %rcx rep movsl nop nop nop nop xor %rsi, %rsi pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r8 pop %r13 pop %r10 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r8 push %r9 push %rcx push %rdi push %rsi // REPMOV mov $0xac1, %rsi lea addresses_US+0x179a2, %rdi nop nop nop nop nop and $30668, %r9 mov $26, %rcx rep movsb inc %rdi // Store mov $0xda7, %r12 nop nop sub $45043, %r9 mov $0x5152535455565758, %rcx movq %rcx, %xmm3 vmovups %ymm3, (%r12) nop nop nop nop and $50691, %rdi // REPMOV mov $0xda7, %rsi mov $0xda7, %rdi cmp %r9, %r9 mov $20, %rcx rep movsl nop nop add $33864, %r9 // Store lea addresses_A+0xfa66, %rsi nop nop nop nop cmp %r9, %r9 mov $0x5152535455565758, %rcx movq %rcx, (%rsi) nop nop nop nop nop xor %rcx, %rcx // Store lea addresses_PSE+0x6488, %r8 nop nop cmp $4740, %rcx mov $0x5152535455565758, %rdi movq %rdi, (%r8) nop nop nop nop nop cmp $26125, %r9 // Load lea addresses_D+0x16a47, %r8 nop nop nop add %rsi, %rsi vmovups (%r8), %ymm3 vextracti128 $1, %ymm3, %xmm3 vpextrq $1, %xmm3, %rcx nop nop nop sub $61083, %rcx // Store lea addresses_WT+0x1caf7, %rcx nop nop nop cmp $5171, %r8 movl $0x51525354, (%rcx) nop nop nop sub $20049, %r13 // Store lea addresses_UC+0x35a7, %r9 nop xor %r8, %r8 mov $0x5152535455565758, %r13 movq %r13, (%r9) nop nop nop add %r8, %r8 // Store mov $0xb75, %r12 nop nop nop nop dec %rcx movw $0x5152, (%r12) nop sub %r9, %r9 // Store lea addresses_WC+0x86a7, %rsi nop nop nop cmp $6088, %r12 movw $0x5152, (%rsi) nop nop nop nop and $47920, %r13 // Faulty Load mov $0xda7, %r9 clflush (%r9) nop nop nop dec %r12 mov (%r9), %r13d lea oracles, %r9 and $0xff, %r13 shlq $12, %r13 mov (%r9,%r13,1), %r13 pop %rsi pop %rdi pop %rcx pop %r9 pop %r8 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_P', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 1, 'type': 'addresses_P'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_US'}} {'OP': 'STOR', 'dst': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_P', 'AVXalign': False, 'size': 32}} {'src': {'same': True, 'congruent': 0, 'type': 'addresses_P'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 0, 'type': 'addresses_P'}} {'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 0, 'type': 'addresses_A', 'AVXalign': True, 'size': 8}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_PSE', 'AVXalign': False, 'size': 8}} {'src': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_D', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_WT', 'AVXalign': False, 'size': 4}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_UC', 'AVXalign': False, 'size': 8}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_P', 'AVXalign': False, 'size': 2}} {'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 7, 'type': 'addresses_WC', 'AVXalign': False, 'size': 2}} [Faulty Load] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_P', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_UC_ht', 'AVXalign': True, 'size': 1}} {'src': {'same': False, 'congruent': 5, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_normal_ht'}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 4}} {'src': {'NT': False, 'same': True, 'congruent': 3, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': True, 'congruent': 4, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} {'src': {'NT': True, 'same': False, 'congruent': 6, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'} {'src': {'NT': True, 'same': False, 'congruent': 11, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 8}} {'src': {'same': False, 'congruent': 10, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 5, 'type': 'addresses_WT_ht'}} {'5c': 1} 5c */
tests/isobmff/valid-box.asm
y-guyon/ComplianceWarden
3
164191
%define BE(a) ( ((((a)>>24)&0xFF) << 0) + ((((a)>>16)&0xFF) << 8) + ((((a)>>8)&0xFF) << 16) + ((((a)>>0)&0xFF) << 24) ) ftyp_start: dd BE(ftyp_end - ftyp_start) dd "ftyp" db 0x68, 0x65, 0x69, 0x63 ; "major_brand" db 0x0, 0x0, 0x0, 0x0 ; "minor_version" db 0x6D, 0x69, 0x66, 0x31 ; "compatible_brand" ftyp_end: aaaa_start: dd BE(aaaa_end - aaaa_start) db "aaaa" aaaa_end:
programs/oeis/287/A287451.asm
jmorken/loda
1
101788
<filename>programs/oeis/287/A287451.asm ; A287451: Start with 0 and repeatedly substitute 0->012, 1->201, 2->120. ; 0,1,2,2,0,1,1,2,0,1,2,0,0,1,2,2,0,1,2,0,1,1,2,0,0,1,2,2,0,1,1,2,0,0,1,2,0,1,2,2,0,1,1,2,0,1,2,0,0,1,2,2,0,1,1,2,0,0,1,2,2,0,1,2,0,1,1,2,0,0,1,2,0,1,2,2,0,1,1,2,0,1,2,0,0,1,2,2,0,1,2,0,1,1,2,0,0,1,2,0,1,2,2,0,1,1,2,0,0,1,2,2,0,1,1,2,0,1,2,0,0,1,2,2,0,1,2,0,1,1,2,0,0,1,2,2,0,1,1,2,0,0,1,2,0,1,2,2,0,1,1,2,0,1,2,0,0,1,2,2,0,1,2,0,1,1,2,0,0,1,2,0,1,2,2,0,1,1,2,0,1,2,0,0,1,2,2,0,1,1,2,0,0,1,2,2,0,1,2,0,1,1,2,0,0,1,2,0,1,2,2,0,1,1,2,0,0,1,2,2,0,1,1,2,0,1,2,0,0,1,2,2,0,1,2,0,1,1,2,0,0,1,2,2,0,1,1,2,0,0 mov $2,-3 lpb $0 add $3,$0 div $0,$2 lpe mov $1,1 mod $3,$2 mul $3,2 add $3,4 mul $1,$3 sub $1,3 div $1,2
programs/oeis/017/A017254.asm
neoneye/loda
22
240198
; A017254: a(n) = (9*n + 7)^10. ; 282475249,1099511627776,95367431640625,2064377754059776,21611482313284249,144555105949057024,713342911662882601,2824752490000000000,9468276082626847201,27850097600940212224,73742412689492826049,179084769654285362176,404555773570791015625,859442550649180389376,1731874467807835667449,3333369396234118349824,6162677950336718514001,10995116277760000000000,19004963774880799438801,31930081208285372007424,52289689788971837545849,83668255425284801560576,131080657325707041015625,201436298986451489022976,304122555034158459939649,451730952053751361306624,660952768068482275874401,953674316406250000000000,1358306067936240628319401,1911383973745667813146624,2659485890900719634874649,3661510899651594831102976,4991374543951576181640625,6741178641117286368280576,9024920303514444856660849,11982811207963436516967424,15786284949774657045043801,20643777540597760000000000,26807373765254438673009001,34580420215074076278989824,44326214376618333352652449,56477888187717354967269376,71549613990099615712890625,90149270822232320504882176,112992719519952587477991049,140919846138714198689972224,174912544792453358346502201,216114823132842490000000000,265855226381706476903427601,325671789091273746650497024,397339737654378065640319249,482902181032368684001739776,584704042224979400634765625,705429498686404044207947776,848143216207979632525690249,1016335677752841922882561024,1213972926354344043087129601,1445551059490570240000000000,1716155831334586342923895201,2031527738966799156242228224,2398132989034601512560915049,2823240762468010977500594176,3315007216720921043447265625,3882566687618526925232997376,4536130576265116619119118449,5287094430615384550826573824,6148153756249382761936206001,7133429116628826010000000000,8258601109663365229397131801,9541055834792291360570343424,11000041493002581448023079849,12656836791270903975580312576,14534931852847813494150390625,16660222365609538545805950976,19061217732399154541663235649,21769264019877187453015450624,24818782535914467768701411401,28247524900000000000000000000,32096845506516383920668257401,36411992317067572557320602624,41242416955341131537413053649,46642105116262327601883774976,52669928340462973740244140625,59390018245356647350847128576,66872164345396328911416601849,75192236636403334707936231424,84432634162210291056904825801,94682760826268472010000000000,106039529756343750594588792001,118607897576978348061516365824,132501429992040159226426676449,147842900128430337645756261376,164764921141885694906728515625,183410614636807956575395250176,203934316504189676181259377049,226502321834999290864501556224,251293670620848060815558929201,278500976009402122240000000000,308331296938836253127540655601,341007057033664855435886593024 mul $0,9 add $0,7 pow $0,10
scripts/music/en/pause.applescript
dnedry2/vscode-itunes
16
272
<gh_stars>10-100 tell application "Music" pause end tell
libsrc/graphics/vz200/bksave.asm
meesokim/z88dk
0
171131
<reponame>meesokim/z88dk<filename>libsrc/graphics/vz200/bksave.asm ; ; Fast background save ; ; VZ200/300 version ; ; ; $Id: bksave.asm,v 1.5 2015/01/19 01:32:52 pauloscustodio Exp $ ; PUBLIC bksave EXTERN pixeladdress .bksave ld hl,2 add hl,sp ld e,(hl) inc hl ld d,(hl) ;sprite address push de pop ix inc hl ld e,(hl) inc hl inc hl ld d,(hl) ; x and y coords ld h,d ld l,e call pixeladdress xor 7 ld h,d ld l,e ld (ix+2),h ; we save the current sprite position ld (ix+3),l ld a,(ix+0) ld b,(ix+1) cp 9 jr nc,bksavew ._sloop push bc push hl ld a,(hl) and @10101010 ld (ix+4),a inc hl ld a,(hl) rra and @01010101 or (ix+4) ld (ix+4),a inc hl ld a,(hl) and @10101010 ld (ix+5),a inc hl ld a,(hl) rra and @01010101 or (ix+5) ld (ix+5),a inc hl inc ix inc ix pop hl ld bc,32 ;Go to next line add hl,bc pop bc djnz _sloop ret .bksavew push bc push hl ld a,(hl) and @10101010 ld (ix+4),a inc hl ld a,(hl) rra and @01010101 or (ix+4) ld (ix+4),a inc hl ld a,(hl) and @10101010 ld (ix+5),a inc hl ld a,(hl) rra and @01010101 or (ix+5) ld (ix+5),a inc hl ld a,(hl) and @10101010 ld (ix+6),a inc hl ld a,(hl) rra and @01010101 or (ix+6) ld (ix+6),a inc ix inc ix inc ix pop hl ld bc,32 ;Go to next line add hl,bc pop bc djnz bksavew ret
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca.log_21829_1154.asm
ljhsiun2/medusa
9
13959
<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r14 push %r8 push %rax push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_A_ht+0x1d6b1, %rcx nop nop nop sub %rbp, %rbp vmovups (%rcx), %ymm4 vextracti128 $1, %ymm4, %xmm4 vpextrq $1, %xmm4, %r14 nop nop nop nop nop add %rbx, %rbx lea addresses_A_ht+0x96b1, %rsi lea addresses_WT_ht+0x11e71, %rdi xor %rbx, %rbx mov $46, %rcx rep movsw nop nop nop nop xor $16454, %r14 lea addresses_WT_ht+0x64b1, %rsi lea addresses_WC_ht+0x11e91, %rdi nop nop nop nop nop cmp %r8, %r8 mov $82, %rcx rep movsq nop nop inc %rbx lea addresses_WC_ht+0x1eb1, %r14 clflush (%r14) nop xor %rcx, %rcx movb $0x61, (%r14) xor $27069, %rcx lea addresses_UC_ht+0x1aeb1, %rsi lea addresses_A_ht+0x4ab1, %rdi nop nop nop nop nop xor %rbp, %rbp mov $14, %rcx rep movsl nop nop cmp $22928, %rdi lea addresses_WC_ht+0x7eb1, %rbp sub $64437, %rdi mov (%rbp), %r14d nop nop sub $13174, %r14 lea addresses_UC_ht+0x16151, %r8 clflush (%r8) nop nop nop inc %rsi movl $0x61626364, (%r8) and $4798, %r14 lea addresses_A_ht+0x1afb1, %rsi lea addresses_D_ht+0xd371, %rdi clflush (%rsi) nop nop nop nop xor %r8, %r8 mov $11, %rcx rep movsw nop add %rcx, %rcx lea addresses_D_ht+0x1a74f, %rsi lea addresses_WC_ht+0x4eb1, %rdi and $27424, %rax mov $16, %rcx rep movsb sub $46305, %r14 lea addresses_D_ht+0x14851, %rdi nop nop xor $27272, %r8 mov (%rdi), %esi nop nop nop inc %rdi lea addresses_D_ht+0x17eb1, %rcx clflush (%rcx) nop nop nop dec %rbx movb (%rcx), %r8b nop nop nop sub $25451, %rcx pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %rax pop %r8 pop %r14 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r8 push %r9 push %rax push %rcx // Faulty Load lea addresses_PSE+0x126b1, %r9 add %r12, %r12 movb (%r9), %r8b lea oracles, %r9 and $0xff, %r8 shlq $12, %r8 mov (%r9,%r8,1), %r8 pop %rcx pop %rax pop %r9 pop %r8 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_PSE', 'same': False, 'AVXalign': False, 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_PSE', 'same': True, 'AVXalign': False, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 9}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_A_ht', 'congruent': 11}, 'dst': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 6}} {'OP': 'REPM', 'src': {'same': True, 'type': 'addresses_WT_ht', 'congruent': 7}, 'dst': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 4}} {'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 11}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 11}, 'dst': {'same': True, 'type': 'addresses_A_ht', 'congruent': 10}} {'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': True, 'congruent': 10}} {'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 2}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_A_ht', 'congruent': 7}, 'dst': {'same': False, 'type': 'addresses_D_ht', 'congruent': 4}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_D_ht', 'congruent': 1}, 'dst': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 11}} {'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 5}} {'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 11}} {'33': 21829} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
Driver/Modem/modemManager.asm
steakknife/pcgeos
504
168066
<filename>Driver/Modem/modemManager.asm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) Geoworks 1995 -- All Rights Reserved GEOWORKS CONFIDENTIAL PROJECT: Socket MODULE: Modem Driver FILE: modemManager.asm AUTHOR: <NAME>, Mar 14, 1995 ROUTINES: Name Description ---- ----------- REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 3/14/95 Initial revision DESCRIPTION: Include files for modem driver $Id: modemManager.asm,v 1.1 97/04/18 11:47:55 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ;--------------------------------------------------------------------------- ; Include Files ;--------------------------------------------------------------------------- include geos.def include geode.def include resource.def include timer.def include heap.def include localize.def include system.def include sem.def include char.def include file.def include initfile.def include driver.def include thread.def ifdef HANGUP_LOG include timedate.def endif include ec.def include assert.def include Internal/heapInt.def include Internal/im.def include Objects/processC.def DefDriver Internal/modemDr.def include modem.def ;--------------------------------------------------------------------------- ; Source files for driver ;--------------------------------------------------------------------------- include modemStrategy.asm include modemAdmin.asm include modemSend.asm include modemParse.asm if ERROR_CHECK include modemEC.asm endif
vmidle.asm
groktrev/vmidle
0
245353
;***************************************************************************** ;Copyright (c) 2007, <NAME> ;All rights reserved. ; ;Redistribution and use in source and binary forms, with or without ;modification, are permitted provided that the following conditions are met: ; ;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 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. ;***************************************************************************** begin_resident: dd 0x0000ffff dw 0x8000 int28_prev: dw strategy dw interrupt db "VMIDLE$ " int28: pushf sti hlt popf jmp far [cs:int28_prev] align 16,int3 end_resident: ;***************************************************************************** begin_transient: request: dd 0 strategy: mov [cs:request],bx mov [cs:request+0x02],es retf interrupt: pusha lds bx,[cs:request] cmp byte [bx+0x02],0 jz short init or word [bx+0x03],0x8101 exit: popa retf init: or word [bx+0x03],0x0100 mov word [bx+0x0e],end_resident mov word [bx+0x10],cs push cs pop ds mov dx,banner mov ah,0x09 int 0x21 mov ax,0x3528 int 0x21 mov [cs:int28_prev],bx mov [cs:int28_prev+0x02],es mov dx,int28 mov ax,0x2528 int 0x21 jmp short exit banner: db "VMIDLE Device Version 1.0",13,10 db "Copyright (c) 2007, <NAME>",13,10 db "All rights reserved.",13,10 db "$" end_transient: ;*****************************************************************************
buildSrc/src/main/antlr/org/aya/parser/AyaLexer.g4
refparo/aya-dev
0
7363
<reponame>refparo/aya-dev<gh_stars>0 lexer grammar AyaLexer; // Do not change the line like `---- AyaLexer xxx: XXX` // They are used to generate `GeneratedLexerTokens` class. // ---- AyaLexer begin: Keywords // associativities INFIX : 'infix'; INFIXL : 'infixl'; INFIXR : 'infixr'; // operator precedence TIGHTER : 'tighter'; LOOSER : 'looser'; // samples EXAMPLE : 'example'; COUNTEREXAMPLE : 'counterexample'; // universe ULIFT : 'ulift' | '\u2191'; TYPE : 'Type'; // other keywords // principal: add `_KW` suffix to avoid conflict with a potential rule name. // if it seems impossible, then forget about it. AS : 'as'; OPEN : 'open'; IMPORT : 'import'; PUBLIC : 'public'; PRIVATE : 'private'; USING : 'using'; HIDING : 'hiding'; COERCE : 'coerce'; OPAQUE : 'opaque'; INLINE : 'inline'; OVERLAP : 'overlap'; MODULE_KW : 'module'; BIND_KW : 'bind'; MATCH : 'match'; // ABSURD : 'impossible'; VARIABLE : 'variable'; DEF : 'def'; STRUCT : 'struct'; DATA : 'data'; PRIM : 'prim'; EXTENDS : 'extends'; NEW_KW : 'new'; PATTERN_KW : 'pattern'; // Unimplemented but reserved DO_KW : 'do'; CODATA_KW : 'codata'; LET_KW : 'let'; IN_KW : 'in'; COMPLETED : 'completed'; // symbols SIGMA : 'Sig' | '\u03A3'; LAMBDA : '\\' | '\u03BB'; PI : 'Pi' | '\u03A0'; FORALL : 'forall' | '\u2200'; // ---- AyaLexer end: Keywords TO : '->' | '\u2192'; IMPLIES : '=>' | '\u21D2'; SUCHTHAT : '**'; DOT : '.'; BAR : '|'; COMMA : ','; COLON : ':'; COLON2 : '::'; // markers LBRACE : '{'; RBRACE : '}'; LPAREN : '('; RPAREN : ')'; LGOAL : '{?'; RGOAL : '?}'; // literals NUMBER : [0-9]+; CALM_FACE : '_'; STRING : INCOMPLETE_STRING '"'; INCOMPLETE_STRING : '"' (~["\\\r\n] | ESCAPE_SEQ)*; fragment ESCAPE_SEQ : '\\' [btnfr"'\\] | OCT_ESCAPE | UNICODE_ESCAPE; fragment OCT_ESCAPE : '\\' OCT_DIGIT OCT_DIGIT? | '\\' [0-3] OCT_DIGIT OCT_DIGIT; fragment UNICODE_ESCAPE : '\\' 'u'+ HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT; fragment HEX_DIGIT : [0-9a-fA-F]; fragment OCT_DIGIT : [0-8]; // identifier fragment AYA_SIMPLE_LETTER : [~!@#$%^&*+=<>?/|[\u005Da-zA-Z_\u2200-\u22FF]; fragment AYA_UNICODE : [\u0080-\uFEFE] | [\uFF00-\u{10FFFF}]; // exclude U+FEFF which is a truly invisible char fragment AYA_LETTER : AYA_SIMPLE_LETTER | AYA_UNICODE; fragment AYA_LETTER_FOLLOW : AYA_LETTER | [0-9'-]; REPL_COMMAND : ':' AYA_LETTER_FOLLOW+; ID : AYA_LETTER AYA_LETTER_FOLLOW* | '-' AYA_LETTER AYA_LETTER_FOLLOW*; // whitespaces WS : [ \t\r\n]+ -> channel(HIDDEN); fragment COMMENT_CONTENT : ~[\r\n]*; DOC_COMMENT : '--|' COMMENT_CONTENT; LINE_COMMENT : '--' COMMENT_CONTENT -> channel(HIDDEN); COMMENT : '{-' (COMMENT|.)*? '-}' -> channel(HIDDEN); // avoid token recognition error in REPL ERROR_CHAR : .;
Borland/CBuilder5/Source/RTL/source/math/stat87.asm
TrevorDArcyEvans/DivingMagpieSoftware
1
98290
;[]-----------------------------------------------------------------[] ;| STAT87.ASM -- access floating-point status word | ;[]-----------------------------------------------------------------[] ; ; C/C++ Run Time Library - Version 10.0 ; ; Copyright (c) 1991, 2000 by Inprise Corporation ; All Rights Reserved. ; ; $Revision: 9.0 $ include RULES.ASI ; Segments Definitions Header@ ;-------------------------------------------------------------------------- ; ;Name _status87 - gets floating-point status ; ;Usage unsigned int _status87(void); ; ;Prototype in float.h ; ;Description _status87 gets the floating-point status word, which is a ; combination of the 80x87 status word and other ; conditions detected by the 80x87 exception handler. ; ;Return value The bits in the return value give the floating-point ; status. See <float.h> for a complete definition of the bits ; returned by _status87. ; ;-------------------------------------------------------------------------- Code_seg@ Func@ _status87, _EXPFUNC, _RTLENTRY Locals@ <int Status> ; volatile unsigned int Status; Link@ fstsw Status.w0 fwait movzx eax, Status.w0 Unlink@ Return@ EndFunc@ _status87 Code_EndS@ end
tests/syntax_examples/src/generic_subprogram_calls.ads
TNO/Dependency_Graph_Extractor-Ada
1
13947
<reponame>TNO/Dependency_Graph_Extractor-Ada package Generic_Subprogram_Calls is generic type TP is private; procedure G1(T : TP); generic with procedure PP; procedure G2; generic type TP is private; package G3 is procedure P(T : TP); end G3; generic with procedure PP; package G4 is procedure P; end G4; generic type TP is private; function G5(T : TP) return TP; generic type TP is private; T : TP; function G6 return TP; procedure Test; generic type T is private; with function "="(L, R : T) return Boolean is <>; function Equal_Generic(L, R : T) return Boolean; generic type T is private; with function Foo(L, R : T) return Boolean is <>; function Foo_Generic(L, R : T) return Boolean; generic type T is private; with function "="(L, R : T) return Boolean is <>; package Equal_Generic_Package is end Equal_Generic_Package; generic type T is private; with function Foo(L, R : T) return Boolean is <>; package Foo_Generic_Package is end Foo_Generic_Package; end Generic_Subprogram_Calls;
oeis/097/A097735.asm
neoneye/loda-programs
11
105369
; A097735: Pell equation solutions (8*a(n))^2 - 65*b(n)^2 = -1 with b(n):=A097736(n), n >= 0. ; Submitted by <NAME>(s3) ; 1,259,66821,17239559,4447739401,1147499525899,296050429942541,76379863425649679,19705708713387674641,5083996468190594407699,1311651383084459969511701,338400972839322481539611159,87306139341162115777250167321,22524645549046986548049003557659,5811271245514781367280865667708701,1499285456697264545771915293265287199,386809836556648738027786864796776388641,99795438546158677146623239202275042982179,25746836335072382055090767927322164313013541,6642583979010128411536271502009916117714511399 lpb $0 sub $0,1 add $3,1 mov $1,$3 mul $1,256 add $2,$1 add $3,$2 add $3,1 lpe mov $0,$3 add $0,1
Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0x84_notsx.log_11990_2715.asm
ljhsiun2/medusa
9
84789
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r13 push %r14 push %r15 push %r9 push %rax push %rbp lea addresses_WC_ht+0xe0e2, %r9 cmp $61527, %r13 vmovups (%r9), %ymm3 vextracti128 $0, %ymm3, %xmm3 vpextrq $1, %xmm3, %r14 nop nop nop add %r14, %r14 lea addresses_A_ht+0x1b86a, %rax nop nop nop cmp $42705, %rbp mov (%rax), %r14 nop nop nop and %r9, %r9 lea addresses_A_ht+0xebe2, %r15 nop nop nop nop nop cmp $27395, %r9 vmovups (%r15), %ymm4 vextracti128 $0, %ymm4, %xmm4 vpextrq $0, %xmm4, %r14 nop add %r13, %r13 lea addresses_D_ht+0x1cae2, %r9 nop nop and %r10, %r10 movl $0x61626364, (%r9) nop sub $29664, %r9 pop %rbp pop %rax pop %r9 pop %r15 pop %r14 pop %r13 pop %r10 ret .global s_faulty_load s_faulty_load: push %r14 push %r8 push %r9 push %rcx push %rdi push %rdx push %rsi // REPMOV lea addresses_PSE+0xcce2, %rsi mov $0x2e2, %rdi nop nop nop nop nop sub %r9, %r9 mov $61, %rcx rep movsw nop nop nop and %r14, %r14 // Faulty Load lea addresses_PSE+0x18ce2, %rdi clflush (%rdi) nop nop nop and %rdx, %rdx mov (%rdi), %r8 lea oracles, %r9 and $0xff, %r8 shlq $12, %r8 mov (%r9,%r8,1), %r8 pop %rsi pop %rdx pop %rdi pop %rcx pop %r9 pop %r8 pop %r14 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_PSE', 'same': False, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'} {'src': {'type': 'addresses_PSE', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_P', 'congruent': 4, 'same': False}, 'OP': 'REPM'} [Faulty Load] {'src': {'type': 'addresses_PSE', 'same': True, 'size': 8, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 32, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'same': False, 'size': 8, 'congruent': 2, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'same': False, 'size': 32, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 4, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'33': 11990} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
programs/oeis/307/A307808.asm
jmorken/loda
1
174014
<reponame>jmorken/loda ; A307808: Number of palindromic nonagonal numbers of length n whose index is also palindromic. ; 3,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 add $0,8 lpb $0 div $0,3 pow $0,2 add $1,1 lpe
Transynther/x86/_processed/NONE/_ht_/i9-9900K_12_0xa0.log_21829_1901.asm
ljhsiun2/medusa
9
164117
<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r13 push %r14 push %r8 push %rbp push %rcx push %rdi push %rsi lea addresses_normal_ht+0x3466, %rsi lea addresses_D_ht+0x1eca, %rdi nop sub $46992, %r14 mov $3, %rcx rep movsq nop and $45516, %r13 lea addresses_WC_ht+0x15251, %r8 nop xor %r14, %r14 mov $0x6162636465666768, %rdi movq %rdi, %xmm5 vmovups %ymm5, (%r8) nop and %rdi, %rdi lea addresses_A_ht+0x14991, %r13 cmp $56463, %rbp mov $0x6162636465666768, %rcx movq %rcx, %xmm6 and $0xffffffffffffffc0, %r13 movntdq %xmm6, (%r13) nop and $23756, %rbp lea addresses_UC_ht+0xca51, %rdi nop add $11602, %r13 movb (%rdi), %cl nop nop nop nop cmp %rdi, %rdi lea addresses_UC_ht+0x72e3, %rbp nop nop nop nop nop sub $53093, %rsi mov $0x6162636465666768, %rcx movq %rcx, (%rbp) nop nop nop nop nop cmp %r14, %r14 pop %rsi pop %rdi pop %rcx pop %rbp pop %r8 pop %r14 pop %r13 ret .global s_faulty_load s_faulty_load: push %r10 push %r13 push %r8 push %rbp push %rcx // Store lea addresses_UC+0x19f67, %rbp nop xor $8738, %r8 mov $0x5152535455565758, %rcx movq %rcx, %xmm6 vmovups %ymm6, (%rbp) nop xor $63242, %rbp // Faulty Load lea addresses_UC+0x1e251, %r13 nop nop nop nop nop xor %rbp, %rbp vmovups (%r13), %ymm4 vextracti128 $0, %ymm4, %xmm4 vpextrq $1, %xmm4, %r10 lea oracles, %rcx and $0xff, %r10 shlq $12, %r10 mov (%rcx,%r10,1), %r10 pop %rcx pop %rbp pop %r8 pop %r13 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_UC', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_UC', 'AVXalign': False, 'size': 32}} [Faulty Load] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_UC', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'same': False, 'congruent': 0, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_D_ht'}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32}} {'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 4, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 16}} {'src': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': True, 'congruent': 1, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 8}} {'44': 21829} 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 */
programs/oeis/022/A022108.asm
karttu/loda
0
246996
; A022108: Fibonacci sequence beginning 1, 18. ; 1,18,19,37,56,93,149,242,391,633,1024,1657,2681,4338,7019,11357,18376,29733,48109,77842,125951,203793,329744,533537,863281,1396818,2260099,3656917,5917016,9573933,15490949 mov $1,1 mov $2,11 lpb $0,1 sub $0,1 mov $3,$1 mov $1,1 add $1,$2 add $1,6 add $2,$3 lpe
libsrc/_DEVELOPMENT/math/float/math16/c/sccz80/cm16_sccz80_exp.asm
ahjelm/z88dk
640
166261
SECTION code_fp_math16 PUBLIC cm16_sccz80_exp EXTERN cm16_sccz80_read1, expf16 cm16_sccz80_exp: call cm16_sccz80_read1 jp expf16
testsuite/xml/sax_events_writers.adb
svn2github/matreshka
24
531
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- XML Processor -- -- -- -- Testsuite Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2010-2013, <NAME> <<EMAIL>> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Ada.Characters.Wide_Wide_Latin_1; with Ada.Containers.Ordered_Maps; with League.Characters; with Matreshka.Internals.URI_Utilities; with XML.SAX.Input_Sources.Streams.Files; package body SAX_Events_Writers is use Ada.Characters.Wide_Wide_Latin_1; use League.Strings; package Universal_String_Integer_Maps is new Ada.Containers.Ordered_Maps (League.Strings.Universal_String, Positive); function Escape_Character (Item : League.Characters.Universal_Character) return League.Strings.Universal_String; -- Escapes control and special characters. function Escape_String (Item : League.Strings.Universal_String) return League.Strings.Universal_String; -- Escapes control and special character. -------------- -- Add_Line -- -------------- not overriding procedure Add_Line (Self : in out SAX_Events_Writer; Item : League.Strings.Universal_String) is begin Self.Result.Append (Item & Ada.Characters.Wide_Wide_Latin_1.LF); end Add_Line; ---------------- -- Characters -- ---------------- overriding procedure Characters (Self : in out SAX_Events_Writer; Text : League.Strings.Universal_String; Success : in out Boolean) is begin for J in 1 .. Text.Length loop Self.Add_Line (" <characters>" & Escape_Character (Text.Element (J)) & "</characters>"); end loop; end Characters; ---------- -- Done -- ---------- procedure Done (Self : in out SAX_Events_Writer) is begin Self.Add_Line (To_Universal_String ("</SAXEvents>")); end Done; --------------- -- End_CDATA -- --------------- overriding procedure End_CDATA (Self : in out SAX_Events_Writer; Success : in out Boolean) is begin Self.Add_Line (To_Universal_String (" <endCDATA/>")); end End_CDATA; ------------------ -- End_Document -- ------------------ overriding procedure End_Document (Self : in out SAX_Events_Writer; Success : in out Boolean) is begin Self.Add_Line (To_Universal_String (" <endDocument/>")); end End_Document; ----------------- -- End_Element -- ----------------- overriding procedure End_Element (Self : in out SAX_Events_Writer; Namespace_URI : League.Strings.Universal_String; Local_Name : League.Strings.Universal_String; Qualified_Name : League.Strings.Universal_String; Success : in out Boolean) is begin Self.Add_Line (To_Universal_String (" <endElement>")); if Namespace_URI.Is_Empty then Self.Add_Line (To_Universal_String (" <namespaceURI/>")); else Self.Add_Line (" <namespaceURI>" & Namespace_URI & "</namespaceURI>"); end if; if Local_Name.Is_Empty then Self.Add_Line (To_Universal_String (" <localName/>")); else Self.Add_Line (" <localName>" & Local_Name & "</localName>"); end if; if Qualified_Name.Is_Empty then Self.Add_Line (To_Universal_String (" <qualifiedName/>")); else Self.Add_Line (" <qualifiedName>" & Qualified_Name & "</qualifiedName>"); end if; Self.Add_Line (To_Universal_String (" </endElement>")); end End_Element; ------------------------ -- End_Prefix_Mapping -- ------------------------ overriding procedure End_Prefix_Mapping (Self : in out SAX_Events_Writer; Prefix : League.Strings.Universal_String; Success : in out Boolean) is begin Self.Add_Line (To_Universal_String (" <endPrefixMapping>")); if Prefix.Is_Empty then Self.Add_Line (To_Universal_String (" <prefix/>")); else Self.Add_Line (" <prefix>" & Prefix & "</prefix>"); end if; Self.Add_Line (To_Universal_String (" </endPrefixMapping>")); end End_Prefix_Mapping; ----------- -- Error -- ----------- overriding procedure Error (Self : in out SAX_Events_Writer; Occurrence : XML.SAX.Parse_Exceptions.SAX_Parse_Exception; Success : in out Boolean) is begin Self.Errors := True; Self.Add_Line (" <error>" & Escape_String (Occurrence.Message) & "</error>"); end Error; ------------------ -- Error_String -- ------------------ overriding function Error_String (Self : SAX_Events_Writer) return League.Strings.Universal_String is begin return Empty_Universal_String; end Error_String; ---------------------- -- Escape_Character -- ---------------------- function Escape_Character (Item : League.Characters.Universal_Character) return League.Strings.Universal_String is function Image (Item : Wide_Wide_Character) return League.Strings.Universal_String; ----------- -- Image -- ----------- function Image (Item : Wide_Wide_Character) return League.Strings.Universal_String is To_Hex : constant array (0 .. 15) of Wide_Wide_Character := "0123456789ABCDEF"; Result : Wide_Wide_String (1 .. 6); First : Integer := Result'Last + 1; Aux : Integer := Wide_Wide_Character'Pos (Item); begin while Aux /= 0 loop First := First - 1; Result (First) := To_Hex (Aux mod 16); Aux := Aux / 16; end loop; return League.Strings.To_Universal_String ("&#x" & Result (First .. Result'Last) & ";"); end Image; begin case Item.To_Wide_Wide_Character is when NUL .. ' ' | DEL .. APC => return Image (Item.To_Wide_Wide_Character); when '&' => return To_Universal_String ("&amp;"); when '<' => return To_Universal_String ("&lt;"); when '>' => return To_Universal_String ("&gt;"); when others => return To_Universal_String (Wide_Wide_String'(1 => Item.To_Wide_Wide_Character)); end case; end Escape_Character; ------------------- -- Escape_String -- ------------------- function Escape_String (Item : League.Strings.Universal_String) return League.Strings.Universal_String is Result : League.Strings.Universal_String := Item; begin for J in reverse 1 .. Item.Length loop case Result.Element (J).To_Wide_Wide_Character is when HT => Result.Replace (J, J, "&#x9;"); when LF => Result.Replace (J, J, "&#xA;"); when CR => Result.Replace (J, J, "&#xD;"); when ' ' => Result.Replace (J, J, "&#x20;"); when '&' => Result.Replace (J, J, "&amp;"); when '<' => Result.Replace (J, J, "&lt;"); when '>' => Result.Replace (J, J, "&gt;"); when ''' => Result.Replace (J, J, "&apos;"); when '"' => Result.Replace (J, J, "&quot;"); when others => null; end case; end loop; return Result; end Escape_String; ---------------- -- Has_Errors -- ---------------- not overriding function Has_Errors (Self : SAX_Events_Writer) return Boolean is begin return Self.Errors; end Has_Errors; ----------------- -- Fatal_Error -- ----------------- overriding procedure Fatal_Error (Self : in out SAX_Events_Writer; Occurrence : XML.SAX.Parse_Exceptions.SAX_Parse_Exception) is pragma Unrefernced (Self); begin Self.Fatal_Errors := True; Self.Add_Line (" <fatalError>" & Escape_String (Occurrence.Message) & "</fatalError>"); end Fatal_Error; ---------------------- -- Has_Fatal_Errors -- ---------------------- not overriding function Has_Fatal_Errors (Self : SAX_Events_Writer) return Boolean is begin return Self.Fatal_Errors; end Has_Fatal_Errors; -------------------------- -- Ignorable_Whitespace -- -------------------------- overriding procedure Ignorable_Whitespace (Self : in out SAX_Events_Writer; Text : League.Strings.Universal_String; Success : in out Boolean) is begin for J in 1 .. Text.Length loop Self.Add_Line (" <ignorableWhitespace>" & Escape_Character (Text.Element (J)) & "</ignorableWhitespace>"); end loop; end Ignorable_Whitespace; ---------------- -- Initialize -- ---------------- overriding procedure Initialize (Self : in out SAX_Events_Writer) is begin Self.Add_Line (To_Universal_String ("<?xml version=""1.0"" encoding=""UTF-8""?>")); Self.Add_Line (To_Universal_String ("<SAXEvents>")); end Initialize; -------------------------- -- Notation_Declaration -- -------------------------- overriding procedure Notation_Declaration (Self : in out SAX_Events_Writer; Name : League.Strings.Universal_String; Public_Id : League.Strings.Universal_String; System_Id : League.Strings.Universal_String; Success : in out Boolean) is begin Self.Add_Line (To_Universal_String (" <notation>")); Self.Add_Line (" <name>" & Name & "</name>"); if not Public_Id.Is_Empty then Self.Add_Line (" <publicID>" & Escape_String (Public_Id) & "</publicID>"); end if; if not System_Id.Is_Empty then Self.Add_Line (" <systemID>" & System_Id & "</systemID>"); end if; Self.Add_Line (To_Universal_String (" </notation>")); end Notation_Declaration; ---------------------------- -- Processing_Instruction -- ---------------------------- overriding procedure Processing_Instruction (Self : in out SAX_Events_Writer; Target : League.Strings.Universal_String; Data : League.Strings.Universal_String; Success : in out Boolean) is begin Self.Add_Line (To_Universal_String (" <processingInstruction>")); Self.Add_Line (" <target>" & Target & "</target>"); if Data.Is_Empty then Self.Add_Line (To_Universal_String (" <data/>")); else Self.Add_Line (" <data>" & Escape_String (Data) & "</data>"); end if; Self.Add_Line (To_Universal_String (" </processingInstruction>")); end Processing_Instruction; -------------------- -- Resolve_Entity -- -------------------- overriding procedure Resolve_Entity (Self : in out SAX_Events_Writer; Name : League.Strings.Universal_String; Public_Id : League.Strings.Universal_String; Base_URI : League.Strings.Universal_String; System_Id : League.Strings.Universal_String; Source : out XML.SAX.Input_Sources.SAX_Input_Source_Access; Success : in out Boolean) is use XML.SAX.Input_Sources.Streams.Files; Actual_System_Id : constant League.Strings.Universal_String := Matreshka.Internals.URI_Utilities.Construct_System_Id (Base_URI, System_Id); Stripped_Base_URI : League.Strings.Universal_String := Base_URI; begin if Base_URI.Starts_With (Self.URI) then Stripped_Base_URI := Base_URI.Slice (Self.URI.Length + 1, Base_URI.Length); end if; Self.Add_Line (To_Universal_String (" <resolveEntity>")); Self.Add_Line (" <name>" & Escape_String (Name) & "</name>"); if not Public_Id.Is_Empty then Self.Add_Line (" <publicID>" & Escape_String (Public_Id) & "</publicID>"); end if; if not Stripped_Base_URI.Is_Empty then Self.Add_Line (" <baseURI>" & Escape_String (Stripped_Base_URI) & "</baseURI>"); end if; if not System_Id.Is_Empty then Self.Add_Line (" <systemID>" & System_Id & "</systemID>"); end if; Self.Add_Line (To_Universal_String (" </resolveEntity>")); Source := new File_Input_Source; File_Input_Source'Class (Source.all).Open_By_URI (Actual_System_Id); end Resolve_Entity; -------------------------- -- Set_Document_Locator -- -------------------------- overriding procedure Set_Document_Locator (Self : in out SAX_Events_Writer; Locator : XML.SAX.Locators.SAX_Locator) is begin null; end Set_Document_Locator; ----------------------- -- Set_Testsuite_URI -- ----------------------- not overriding procedure Set_Testsuite_URI (Self : in out SAX_Events_Writer; URI : League.Strings.Universal_String) is begin Self.URI := URI & '/'; end Set_Testsuite_URI; -------------------- -- Skipped_Entity -- -------------------- overriding procedure Skipped_Entity (Self : in out SAX_Events_Writer; Name : League.Strings.Universal_String; Success : in out Boolean) is begin raise Constraint_Error; end Skipped_Entity; -------------------- -- Start_Document -- -------------------- overriding procedure Start_CDATA (Self : in out SAX_Events_Writer; Success : in out Boolean) is begin Self.Add_Line (To_Universal_String (" <startCDATA/>")); end Start_CDATA; -------------------- -- Start_Document -- -------------------- overriding procedure Start_Document (Self : in out SAX_Events_Writer; Success : in out Boolean) is begin Self.Add_Line (To_Universal_String (" <startDocument/>")); end Start_Document; ------------------- -- Start_Element -- ------------------- overriding procedure Start_Element (Self : in out SAX_Events_Writer; Namespace_URI : League.Strings.Universal_String; Local_Name : League.Strings.Universal_String; Qualified_Name : League.Strings.Universal_String; Attributes : XML.SAX.Attributes.SAX_Attributes; Success : in out Boolean) is use Universal_String_Integer_Maps; Map : Universal_String_Integer_Maps.Map; Position : Universal_String_Integer_Maps.Cursor; Index : Positive; begin Self.Add_Line (To_Universal_String (" <startElement>")); if Namespace_URI.Is_Empty then Self.Add_Line (To_Universal_String (" <namespaceURI/>")); else Self.Add_Line (" <namespaceURI>" & Namespace_URI & "</namespaceURI>"); end if; if Local_Name.Is_Empty then Self.Add_Line (To_Universal_String (" <localName/>")); else Self.Add_Line (" <localName>" & Local_Name & "</localName>"); end if; if Qualified_Name.Is_Empty then Self.Add_Line (To_Universal_String (" <qualifiedName/>")); else Self.Add_Line (" <qualifiedName>" & Qualified_Name & "</qualifiedName>"); end if; if Attributes.Is_Empty then Self.Add_Line (To_Universal_String (" <attributes/>")); else Self.Add_Line (To_Universal_String (" <attributes>")); for J in 1 .. Attributes.Length loop Map.Insert (Attributes.Qualified_Name (J), J); end loop; Position := Map.First; while Has_Element (Position) loop Index := Element (Position); Self.Add_Line (To_Universal_String (" <attribute>")); if Attributes.Namespace_URI (Index).Is_Empty then Self.Add_Line (To_Universal_String (" <namespaceURI/>")); else Self.Add_Line (" <namespaceURI>" & Attributes.Namespace_URI (Index) & "</namespaceURI>"); end if; if Attributes.Local_Name (Index).Is_Empty then Self.Add_Line (To_Universal_String (" <localName/>")); else Self.Add_Line (" <localName>" & Attributes.Local_Name (Index) & "</localName>"); end if; if Attributes.Qualified_Name (Index).Is_Empty then Self.Add_Line (To_Universal_String (" <qualifiedName/>")); else Self.Add_Line (" <qualifiedName>" & Attributes.Qualified_Name (Index) & "</qualifiedName>"); end if; if Attributes.Value (Index).Is_Empty then Self.Add_Line (To_Universal_String (" <value/>")); else Self.Add_Line (" <value>" & Escape_String (Attributes.Value (Index)) & "</value>"); end if; Self.Add_Line (" <type>" & Attributes.Value_Type (Index) & "</type>"); if Attributes.Is_Declared (Index) then Self.Add_Line (To_Universal_String (" <isDeclared>true</isDeclared>")); else Self.Add_Line (To_Universal_String (" <isDeclared>false</isDeclared>")); end if; if Attributes.Is_Specified (Index) then Self.Add_Line (To_Universal_String (" <isSpecified>true</isSpecified>")); else Self.Add_Line (To_Universal_String (" <isSpecified>false</isSpecified>")); end if; Self.Add_Line (To_Universal_String (" </attribute>")); Next (Position); end loop; Self.Add_Line (To_Universal_String (" </attributes>")); end if; Self.Add_Line (To_Universal_String (" </startElement>")); end Start_Element; -------------------------- -- Start_Prefix_Mapping -- -------------------------- overriding procedure Start_Prefix_Mapping (Self : in out SAX_Events_Writer; Prefix : League.Strings.Universal_String; URI : League.Strings.Universal_String; Success : in out Boolean) is begin Self.Add_Line (To_Universal_String (" <startPrefixMapping>")); if Prefix.Is_Empty then Self.Add_Line (To_Universal_String (" <prefix/>")); else Self.Add_Line (" <prefix>" & Prefix & "</prefix>"); end if; if URI.Is_Empty then Self.Add_Line (To_Universal_String (" <data/>")); else Self.Add_Line (" <data>" & URI & "</data>"); end if; Self.Add_Line (To_Universal_String (" </startPrefixMapping>")); end Start_Prefix_Mapping; ---------- -- Text -- ---------- not overriding function Text (Self : SAX_Events_Writer) return League.Strings.Universal_String is begin return Self.Result; end Text; --------------------------------- -- Unparsed_Entity_Declaration -- --------------------------------- overriding procedure Unparsed_Entity_Declaration (Self : in out SAX_Events_Writer; Name : League.Strings.Universal_String; Public_Id : League.Strings.Universal_String; System_Id : League.Strings.Universal_String; Notation_Name : League.Strings.Universal_String; Success : in out Boolean) is begin Self.Add_Line (To_Universal_String (" <unparsedEntity>")); Self.Add_Line (" <name>" & Name & "</name>"); if not Public_Id.Is_Empty then Self.Add_Line (" <publicID>" & Escape_String (Public_Id) & "</publicID>"); end if; if not System_Id.Is_Empty then Self.Add_Line (" <systemID>" & System_Id & "</systemID>"); end if; Self.Add_Line (" <notation>" & Notation_Name & "</notation>"); Self.Add_Line (To_Universal_String (" </unparsedEntity>")); end Unparsed_Entity_Declaration; ------------- -- Warning -- ------------- overriding procedure Warning (Self : in out SAX_Events_Writer; Occurrence : XML.SAX.Parse_Exceptions.SAX_Parse_Exception; Success : in out Boolean) is begin Self.Add_Line (To_Universal_String (" <warning/>")); end Warning; end SAX_Events_Writers;
test/Succeed/Issue2325.agda
cruhland/agda
1,989
7710
postulate X A : Set module Foo {{x : X}} where postulate B C : Set foo : A → B → C → Set module Bar {{x : X}} where open Foo postulate -- The following fails to infer the instance argument if we do not either: -- * apply {{x}} explicitly to foo -- * apply {{x}} explicitly when opening module Foo -- * define fail1 in module Foo fail1 : ∀ {a b b' c c'} → foo a b c → foo a b' c' -- However, the following works work1 : ∀ {a b c} → foo a b c → foo a b c work2 : ∀ {a a' b c} → foo a b c → foo a' b c work3 : ∀ {a b b' c} → foo a b c → foo a b' c work4 : ∀ {a a' b b' c} → foo a b c → foo a' b' c work5 : ∀ {a b c c'} → foo a b c → foo a b c' work6 : ∀ {a a' b c c'} → foo a b c → foo a' b c' work7 : ∀ {a a' b b' c c'} → foo a b c → foo a' b' c' data Nat : Set where suc : Nat → Nat instance zero : Nat instance one = suc zero data IsSuc : Nat → Set where isSuc : ∀{n} → IsSuc (suc n) postulate F : {{x : Nat}} (p : IsSuc x) → Set test = F isSuc -- yellow, but should not be
out/CommRing/Syntax.agda
JoeyEremondi/agda-soas
39
14035
{- This second-order term syntax was created from the following second-order syntax description: syntax CommRing | CR type * : 0-ary term zero : * | 𝟘 add : * * -> * | _⊕_ l20 one : * | 𝟙 mult : * * -> * | _⊗_ l30 neg : * -> * | ⊖_ r50 theory (𝟘U⊕ᴸ) a |> add (zero, a) = a (𝟘U⊕ᴿ) a |> add (a, zero) = a (⊕A) a b c |> add (add(a, b), c) = add (a, add(b, c)) (⊕C) a b |> add(a, b) = add(b, a) (𝟙U⊗ᴸ) a |> mult (one, a) = a (𝟙U⊗ᴿ) a |> mult (a, one) = a (⊗A) a b c |> mult (mult(a, b), c) = mult (a, mult(b, c)) (⊗D⊕ᴸ) a b c |> mult (a, add (b, c)) = add (mult(a, b), mult(a, c)) (⊗D⊕ᴿ) a b c |> mult (add (a, b), c) = add (mult(a, c), mult(b, c)) (𝟘X⊗ᴸ) a |> mult (zero, a) = zero (𝟘X⊗ᴿ) a |> mult (a, zero) = zero (⊖N⊕ᴸ) a |> add (neg (a), a) = zero (⊖N⊕ᴿ) a |> add (a, neg (a)) = zero (⊗C) a b |> mult(a, b) = mult(b, a) -} module CommRing.Syntax where open import SOAS.Common open import SOAS.Context open import SOAS.Variable open import SOAS.Families.Core open import SOAS.Construction.Structure open import SOAS.ContextMaps.Inductive open import SOAS.Metatheory.Syntax open import CommRing.Signature private variable Γ Δ Π : Ctx α : *T 𝔛 : Familyₛ -- Inductive term declaration module CR:Terms (𝔛 : Familyₛ) where data CR : Familyₛ where var : ℐ ⇾̣ CR mvar : 𝔛 α Π → Sub CR Π Γ → CR α Γ 𝟘 : CR * Γ _⊕_ : CR * Γ → CR * Γ → CR * Γ 𝟙 : CR * Γ _⊗_ : CR * Γ → CR * Γ → CR * Γ ⊖_ : CR * Γ → CR * Γ infixl 20 _⊕_ infixl 30 _⊗_ infixr 50 ⊖_ open import SOAS.Metatheory.MetaAlgebra ⅀F 𝔛 CRᵃ : MetaAlg CR CRᵃ = record { 𝑎𝑙𝑔 = λ where (zeroₒ ⋮ _) → 𝟘 (addₒ ⋮ a , b) → _⊕_ a b (oneₒ ⋮ _) → 𝟙 (multₒ ⋮ a , b) → _⊗_ a b (negₒ ⋮ a) → ⊖_ a ; 𝑣𝑎𝑟 = var ; 𝑚𝑣𝑎𝑟 = λ 𝔪 mε → mvar 𝔪 (tabulate mε) } module CRᵃ = MetaAlg CRᵃ module _ {𝒜 : Familyₛ}(𝒜ᵃ : MetaAlg 𝒜) where open MetaAlg 𝒜ᵃ 𝕤𝕖𝕞 : CR ⇾̣ 𝒜 𝕊 : Sub CR Π Γ → Π ~[ 𝒜 ]↝ Γ 𝕊 (t ◂ σ) new = 𝕤𝕖𝕞 t 𝕊 (t ◂ σ) (old v) = 𝕊 σ v 𝕤𝕖𝕞 (mvar 𝔪 mε) = 𝑚𝑣𝑎𝑟 𝔪 (𝕊 mε) 𝕤𝕖𝕞 (var v) = 𝑣𝑎𝑟 v 𝕤𝕖𝕞 𝟘 = 𝑎𝑙𝑔 (zeroₒ ⋮ tt) 𝕤𝕖𝕞 (_⊕_ a b) = 𝑎𝑙𝑔 (addₒ ⋮ 𝕤𝕖𝕞 a , 𝕤𝕖𝕞 b) 𝕤𝕖𝕞 𝟙 = 𝑎𝑙𝑔 (oneₒ ⋮ tt) 𝕤𝕖𝕞 (_⊗_ a b) = 𝑎𝑙𝑔 (multₒ ⋮ 𝕤𝕖𝕞 a , 𝕤𝕖𝕞 b) 𝕤𝕖𝕞 (⊖_ a) = 𝑎𝑙𝑔 (negₒ ⋮ 𝕤𝕖𝕞 a) 𝕤𝕖𝕞ᵃ⇒ : MetaAlg⇒ CRᵃ 𝒜ᵃ 𝕤𝕖𝕞 𝕤𝕖𝕞ᵃ⇒ = record { ⟨𝑎𝑙𝑔⟩ = λ{ {t = t} → ⟨𝑎𝑙𝑔⟩ t } ; ⟨𝑣𝑎𝑟⟩ = refl ; ⟨𝑚𝑣𝑎𝑟⟩ = λ{ {𝔪 = 𝔪}{mε} → cong (𝑚𝑣𝑎𝑟 𝔪) (dext (𝕊-tab mε)) } } where open ≡-Reasoning ⟨𝑎𝑙𝑔⟩ : (t : ⅀ CR α Γ) → 𝕤𝕖𝕞 (CRᵃ.𝑎𝑙𝑔 t) ≡ 𝑎𝑙𝑔 (⅀₁ 𝕤𝕖𝕞 t) ⟨𝑎𝑙𝑔⟩ (zeroₒ ⋮ _) = refl ⟨𝑎𝑙𝑔⟩ (addₒ ⋮ _) = refl ⟨𝑎𝑙𝑔⟩ (oneₒ ⋮ _) = refl ⟨𝑎𝑙𝑔⟩ (multₒ ⋮ _) = refl ⟨𝑎𝑙𝑔⟩ (negₒ ⋮ _) = refl 𝕊-tab : (mε : Π ~[ CR ]↝ Γ)(v : ℐ α Π) → 𝕊 (tabulate mε) v ≡ 𝕤𝕖𝕞 (mε v) 𝕊-tab mε new = refl 𝕊-tab mε (old v) = 𝕊-tab (mε ∘ old) v module _ (g : CR ⇾̣ 𝒜)(gᵃ⇒ : MetaAlg⇒ CRᵃ 𝒜ᵃ g) where open MetaAlg⇒ gᵃ⇒ 𝕤𝕖𝕞! : (t : CR α Γ) → 𝕤𝕖𝕞 t ≡ g t 𝕊-ix : (mε : Sub CR Π Γ)(v : ℐ α Π) → 𝕊 mε v ≡ g (index mε v) 𝕊-ix (x ◂ mε) new = 𝕤𝕖𝕞! x 𝕊-ix (x ◂ mε) (old v) = 𝕊-ix mε v 𝕤𝕖𝕞! (mvar 𝔪 mε) rewrite cong (𝑚𝑣𝑎𝑟 𝔪) (dext (𝕊-ix mε)) = trans (sym ⟨𝑚𝑣𝑎𝑟⟩) (cong (g ∘ mvar 𝔪) (tab∘ix≈id mε)) 𝕤𝕖𝕞! (var v) = sym ⟨𝑣𝑎𝑟⟩ 𝕤𝕖𝕞! 𝟘 = sym ⟨𝑎𝑙𝑔⟩ 𝕤𝕖𝕞! (_⊕_ a b) rewrite 𝕤𝕖𝕞! a | 𝕤𝕖𝕞! b = sym ⟨𝑎𝑙𝑔⟩ 𝕤𝕖𝕞! 𝟙 = sym ⟨𝑎𝑙𝑔⟩ 𝕤𝕖𝕞! (_⊗_ a b) rewrite 𝕤𝕖𝕞! a | 𝕤𝕖𝕞! b = sym ⟨𝑎𝑙𝑔⟩ 𝕤𝕖𝕞! (⊖_ a) rewrite 𝕤𝕖𝕞! a = sym ⟨𝑎𝑙𝑔⟩ -- Syntax instance for the signature CR:Syn : Syntax CR:Syn = record { ⅀F = ⅀F ; ⅀:CS = ⅀:CompatStr ; mvarᵢ = CR:Terms.mvar ; 𝕋:Init = λ 𝔛 → let open CR:Terms 𝔛 in record { ⊥ = CR ⋉ CRᵃ ; ⊥-is-initial = record { ! = λ{ {𝒜 ⋉ 𝒜ᵃ} → 𝕤𝕖𝕞 𝒜ᵃ ⋉ 𝕤𝕖𝕞ᵃ⇒ 𝒜ᵃ } ; !-unique = λ{ {𝒜 ⋉ 𝒜ᵃ} (f ⋉ fᵃ⇒) {x = t} → 𝕤𝕖𝕞! 𝒜ᵃ f fᵃ⇒ t } } } } -- Instantiation of the syntax and metatheory open Syntax CR:Syn public open CR:Terms public open import SOAS.Families.Build public open import SOAS.Syntax.Shorthands CRᵃ public open import SOAS.Metatheory CR:Syn public
oeis/113/A113536.asm
neoneye/loda-programs
11
166547
; A113536: Numbers k such that k^2 + 13 is prime. ; Submitted by <NAME> ; 0,2,4,10,12,16,18,28,40,42,44,46,60,68,72,82,84,88,94,108,110,114,116,122,126,142,144,152,158,180,192,194,198,200,220,222,264,266,268,282,284,296,298,332,336,340,354,378,380,418,420,430,434,446,464,466,486,488,490,500,502,506,516,530,544,548,550,560,562,574,588,604,612,618,626,684,686,704,724,742,744,752,760,766,786,788,796,798,802,810,824,826,838,840,854,856,864,868,878,896 mov $2,332203 mov $5,12 mov $6,2 lpb $2 mov $3,$6 seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0. sub $0,$3 add $5,$1 add $1,4 mov $4,$0 max $4,0 cmp $4,$0 mul $2,$4 sub $2,18 add $5,$1 mov $6,$5 lpe mov $0,$1 div $0,2
libsrc/target/gb/gbdk/font.asm
Frodevan/z88dk
38
19111
<gh_stars>10-100 ; font.ms ; ; <NAME>, 1999 ; <EMAIL> ; Distrubuted under the Artistic License - see www.opensource.org ; INCLUDE "target/gb/def/gb_globals.def" PUBLIC tmode_out PUBLIC tmode PUBLIC asm_setchar PUBLIC asm_font_load PUBLIC asm_font_set PUBLIC asm_load_z88dk_font PUBLIC asm_load_z88dk_udg GLOBAL display_off GLOBAL __console_y, __console_x EXTERN asm_cls EXTERN asm_adv_curs EXTERN __mode EXTERN generic_console_font32 ; Structure offsets defc sfont_handle_sizeof = 3 defc sfont_handle_font = 1 defc sfont_handle_first_tile = 0 ; Other bits defc FONT_BCOMPRESSED = 2 defc CR = 0x0A ; Unix defc SPACE = 0x00 ; Maximum number of fonts defc MAX_FONTS = 6 ; Globals from drawing.s ; FIXME: Hmmm... check the linkage of these GLOBAL __fgcolour GLOBAL __bgcolour SECTION bss_driver ; The current font font_current: defs sfont_handle_sizeof ; +0 = ; +1 = font address low ; +2 = font address high ; Cached copy of the first free tile font_first_free_tile: defs 1 ; Table containing descriptors for all of the fonts font_table: defs sfont_handle_sizeof*MAX_FONTS SECTION code_driver ; Copy uncompressed 16 byte tiles from (BC) to (HL), length = DE*2 ; Note: HL must be aligned on a UWORD boundry font_copy_uncompressed: ld a,d or e ret z ld a,h cp 0x98 jr c,fc_4 sub 0x98-0x88 ld h,a fc_4: xor a cp e ; Special for when e=0 you will get another loop jr nz,fc_1 dec d fc_1: ldh a,(STAT) bit 1,a jr nz,fc_1 ld a,(bc) ld (hl+),a inc bc stat_1: ldh a,(STAT) bit 1,a jr nz,stat_1 ld a,(bc) ld (hl),a inc bc inc l jr nz,fc_2 inc h ld a,h ; Special wrap-around cp 0x98 jr nz,fc_2 ld h,0x88 fc_2: dec e jr nz,fc_1 dec d bit 7,d ; -1? jr z,fc_1 ret ; Copy a set of compressed (8 bytes/cell) tiles to VRAM ; Sets the foreground and background colours based on the current ; font colours ; Entry: ; From (BC) to (HL), length (DE) where DE = #cells * 8 ; Uses the current __fgcolour and __bgcolour fiedefs font_copy_compressed: ld a,d or e ret z ; Do nothing ld a,h cp 0x98 ; Take care of the 97FF -> 8800 wrap around jr c,font_copy_compressed_loop sub 0x98-0x88 ld h,a font_copy_compressed_loop: push de ld a,(bc) ld e,a inc bc push bc ld bc,0 ; Do the background colour first ld a,(__bgcolour) bit 0,a jr z,font_copy_compressed_bg_grey1 ld b,0xFF font_copy_compressed_bg_grey1: bit 1,a jr z,font_copy_compressed_bg_grey2 ld c,0xFF font_copy_compressed_bg_grey2: ; BC contains the background colour ; Compute what xoring we need to do to get the correct fg colour ld d,a ld a,(__fgcolour) xor d ld d,a bit 0,d jr z,font_copy_compressed_grey1 ld a,e xor b ld b,a font_copy_compressed_grey1: bit 1,d jr z,font_copy_compressed_grey2 ld a,e xor c ld c,a font_copy_compressed_grey2: ldh a,(STAT) bit 1,a jr nz,font_copy_compressed_grey2 ld (hl),b inc hl stat_2: ldh a,(STAT) bit 1,a jr nz,stat_2 ld (hl),c inc hl ld a,h ; Take care of the 97FFF -> 8800 wrap around cp 0x98 jr nz,fcc_1 ld h,0x88 fcc_1: pop bc pop de dec de ld a,d or e jr nz,font_copy_compressed_loop ret ; Load the font HL asm_font_load: call display_off push hl ; Find the first free font entry ld hl,font_table+sfont_handle_font ld b,MAX_FONTS font_load_find_slot: ld a,(hl) ; Check to see if this entry is free inc hl ; Free is 0000 for the font pointer or (hl) jr z,font_load_found inc hl inc hl dec b jr nz,font_load_find_slot pop hl ld hl,0 jr font_load_exit ; Couldn't find a free space font_load_found: ; HL points to the end of the free font table entry pop de ld (hl),d ; Copy across the font struct pointer dec hl ld (hl),e ld a,(font_first_free_tile) dec hl ld (hl),a push hl call asm_font_set ; Set this new font to be the default ; Only copy the tiles in if were in text mode ld a,(__mode) and T_MODE call nz,font_copy_current ; Increase the 'first free tile' counter ld hl,font_current+sfont_handle_font ld a,(hl+) ld h,(hl) ld l,a inc hl ; Number of tiles used ld a,(font_first_free_tile) add a,(hl) ld (font_first_free_tile),a pop hl ; Return font setup in HL font_load_exit: ;; Turn the screen on LDH A,(LCDC) OR @10000001 ; LCD = On ; BG = On AND @11100111 ; BG Chr = 0x8800 ; BG Bank = 0x9800 LDH (LCDC),A RET ; Copy the tiles from the current font into VRAM font_copy_current: ; Find the current font data ld hl,font_current+sfont_handle_font ld a,(hl+) ld h,(hl) ld l,a ;hl = font address inc hl ; Points to the 'tiles required' entry ld e,(hl) ld d,0 rl e ; Multiple DE by 8 rl d rl e rl d rl e rl d ; DE has the length of the tile data dec hl ld a,(hl) ; Get the flags push af and 3 ; Only lower 2 bits set encoding table size ld bc,128 cp FONT_128ENCODING ; 0 for 256 char encoding table, 1 for 128 char jr z,font_copy_current_copy ld bc,0 cp FONT_NOENCODING jr z,font_copy_current_copy ld bc,256 ; Must be 256 element encoding font_copy_current_copy: inc hl inc hl ; Points to the start of the encoding table add hl,bc ld c,l ld b,h ; BC points to the start of the tile data ; Find the offset in VRAM for this font ld a,(font_current+sfont_handle_first_tile) ; First tile used for this font ld l,a ld h,0 add hl,hl add hl,hl add hl,hl add hl,hl ld a,0x90 ; Tile 0 is at 9000h add a,h ld h,a ; Is this font compressed? pop af ; Recover flags bit FONT_BCOMPRESSED,a ; Do the jump in a mildly different way jp z,font_copy_uncompressed jp font_copy_compressed ; Set the current font to HL asm_font_set: ld a,(hl+) ld (font_current),a ld a,(hl+) ld (font_current+1),a ld a,(hl+) ld (font_current+2),a ret ;; Print a character without interpretation out_char: call asm_setchar call asm_adv_curs ret ;; Print the character in A ; C =x, B=y asm_setchar: push af ld a,(font_current+2) ; Must be non-zero if the font system is setup (cant have a font in page zero) or a jr nz,asm_setchar_3 push bc ; Font system is not yet setup - init it and copy in the default font ; Kind of a compatibility mode call _font_init ; Need all of the tiles xor a ld (font_first_free_tile),a ld hl,generic_console_font32 ld a,(hl+) ld h,(hl) ld l,a call asm_font_load pop bc asm_setchar_3: pop af push de push hl push bc ;Save coordinates ; Compute which tile maps to this character ld e,a ld hl,font_current+sfont_handle_font ld a,(hl+) ld h,(hl) ld l,a ;hl = address of font ld a,(hl+) ;font encoding and 3 cp FONT_NOENCODING jr z,asm_setchar_no_encoding inc hl ; Now at the base of the encoding table ; E is set above ld d,0 add hl,de ld e,(hl) ; That's the tile! asm_setchar_no_encoding: ld a,(font_current+0) ;first tile add a,e ld e,a ;e = tile to use pop bc ;c = x, b = y push bc LD L,B LD H,0x00 ADD HL,HL ADD HL,HL ADD HL,HL ADD HL,HL ADD HL,HL LD B,0x00 ;Add on x coordinate now ADD HL,BC LD BC,0x9800 ADD HL,BC stat_4: ldh a,(STAT) bit 1,a jr nz,stat_4 LD (HL),E POP BC POP HL POP DE RET _font_init: push bc call tmode xor a ; We use the first tile as a space _always_ ld (font_first_free_tile),a ; Clear the font table ld hl,font_table ld b,sfont_handle_sizeof*MAX_FONTS init_1: ld (hl+),a dec b jr nz,init_1 ld (__bgcolour),a ;a = 0 ld a,3 ld (__fgcolour),a call asm_cls pop bc ret SECTION code_driver GLOBAL vbl GLOBAL lcd GLOBAL int_0x40 GLOBAL int_0x48 GLOBAL remove_int ;; Enter text mode tmode: DI ; Disable interrupts ;; Turn the screen off LDH A,(LCDC) BIT 7,A JR Z,tmode_1 ;; Turn the screen off CALL display_off ;; Remove any interrupts setup by the drawing routine ; LD BC,vbl ; LD HL,int_0x40 ; CALL remove_int ; LD BC,lcd ; LD HL,int_0x48 ; CALL remove_int tmode_1: CALL tmode_out ;; Turn the screen on LDH A,(LCDC) OR @10000001 ; LCD = On ; BG = On AND @11100111 ; BG Chr = 0x8800 ; BG Bank = 0x9800 LDH (LCDC),A EI ; Enable interrupts RET ;; Text mode (out only) tmode_out: XOR A LD (__console_x),A LD (__console_y),A ;; Clear screen CALL asm_cls LD A,T_MODE LD (__mode),A RET ; Entry: bc = address of font (with gb header) asm_load_z88dk_font: push bc ld a,(font_current+2) ; Must be non-zero if the font system is setup (cant have a font in page zero) and a call z,_font_init xor a ld (font_first_free_tile),a ld c,l ld b,h call asm_font_load pop bc ret ; Entry: bc = address of UDG bitmaps asm_load_z88dk_udg: ld a,(font_current+2) ; Must be non-zero if the font system is setup (cant have a font in page zero) and a jr z,set_udgs push bc ld hl,generic_console_font32 ld c,(hl) inc hl ld h,(hl) call asm_load_z88dk_font pop bc set_udgs: call z,_font_init ld hl,$8800 ;Tile 128 is the first UDG ld de,128 * 8 call font_copy_compressed ret
programs/oeis/123/A123720.asm
neoneye/loda
22
15023
<filename>programs/oeis/123/A123720.asm ; A123720: a(n) = 2^n + 2^(n-1) - n. ; 2,4,9,20,43,90,185,376,759,1526,3061,6132,12275,24562,49137,98288,196591,393198,786413,1572844,3145707,6291434,12582889,25165800,50331623,100663270,201326565,402653156,805306339,1610612706,3221225441,6442450912,12884901855,25769803742,51539607517,103079215068,206158430171,412316860378,824633720793,1649267441624,3298534883287,6597069766614,13194139533269,26388279066580,52776558133203,105553116266450,211106232532945,422212465065936,844424930131919,1688849860263886,3377699720527821,6755399441055692,13510798882111435,27021597764222922,54043195528445897,108086391056891848,216172782113783751,432345564227567558,864691128455135173,1729382256910270404,3458764513820540867,6917529027641081794,13835058055282163649,27670116110564327360,55340232221128654783,110680464442257309630,221360928884514619325,442721857769029238716,885443715538058477499,1770887431076116955066,3541774862152233910201,7083549724304467820472,14167099448608935641015,28334198897217871282102,56668397794435742564277,113336795588871485128628,226673591177742970257331,453347182355485940514738,906694364710971881029553,1813388729421943762059184,3626777458843887524118447,7253554917687775048236974,14507109835375550096474029,29014219670751100192948140,58028439341502200385896363,116056878683004400771792810,232113757366008801543585705,464227514732017603087171496,928455029464035206174343079,1856910058928070412348686246,3713820117856140824697372581,7427640235712281649394745252,14855280471424563298789490595,29710560942849126597578981282,59421121885698253195157962657,118842243771396506390315925408,237684487542793012780631850911,475368975085586025561263701918,950737950171172051122527403933,1901475900342344102245054807964 mov $1,2 pow $1,$0 mul $1,3 sub $1,$0 sub $1,1 mov $0,$1
src/model/babel-base-models.adb
stcarrez/babel
1
15493
----------------------------------------------------------------------- -- Babel.Base.Models -- Babel.Base.Models ----------------------------------------------------------------------- -- File generated by ada-gen DO NOT MODIFY -- Template used: templates/model/package-body.xhtml -- Ada Generator: https://ada-gen.googlecode.com/svn/trunk Revision 1095 ----------------------------------------------------------------------- -- Copyright (C) 2014 <NAME> -- Written by <NAME> (<EMAIL>) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Unchecked_Deallocation; with Util.Beans.Objects.Time; package body Babel.Base.Models is use type ADO.Objects.Object_Record_Access; use type ADO.Objects.Object_Ref; use type ADO.Objects.Object_Record; function Store_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key is Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER, Of_Class => STORE_DEF'Access); begin ADO.Objects.Set_Value (Result, Id); return Result; end Store_Key; function Store_Key (Id : in String) return ADO.Objects.Object_Key is Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER, Of_Class => STORE_DEF'Access); begin ADO.Objects.Set_Value (Result, Id); return Result; end Store_Key; function "=" (Left, Right : Store_Ref'Class) return Boolean is begin return ADO.Objects.Object_Ref'Class (Left) = ADO.Objects.Object_Ref'Class (Right); end "="; procedure Set_Field (Object : in out Store_Ref'Class; Impl : out Store_Access) is Result : ADO.Objects.Object_Record_Access; begin Object.Prepare_Modify (Result); Impl := Store_Impl (Result.all)'Access; end Set_Field; -- Internal method to allocate the Object_Record instance procedure Allocate (Object : in out Store_Ref) is Impl : Store_Access; begin Impl := new Store_Impl; ADO.Objects.Set_Object (Object, Impl.all'Access); end Allocate; -- ---------------------------------------- -- Data object: Store -- ---------------------------------------- procedure Set_Id (Object : in out Store_Ref; Value : in ADO.Identifier) is Impl : Store_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Key_Value (Impl.all, 1, Value); end Set_Id; function Get_Id (Object : in Store_Ref) return ADO.Identifier is Impl : constant Store_Access := Store_Impl (Object.Get_Object.all)'Access; begin return Impl.Get_Key_Value; end Get_Id; procedure Set_Name (Object : in out Store_Ref; Value : in String) is Impl : Store_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_String (Impl.all, 2, Impl.Name, Value); end Set_Name; procedure Set_Name (Object : in out Store_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String) is Impl : Store_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Unbounded_String (Impl.all, 2, Impl.Name, Value); end Set_Name; function Get_Name (Object : in Store_Ref) return String is begin return Ada.Strings.Unbounded.To_String (Object.Get_Name); end Get_Name; function Get_Name (Object : in Store_Ref) return Ada.Strings.Unbounded.Unbounded_String is Impl : constant Store_Access := Store_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Name; end Get_Name; procedure Set_Parameter (Object : in out Store_Ref; Value : in String) is Impl : Store_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_String (Impl.all, 3, Impl.Parameter, Value); end Set_Parameter; procedure Set_Parameter (Object : in out Store_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String) is Impl : Store_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Unbounded_String (Impl.all, 3, Impl.Parameter, Value); end Set_Parameter; function Get_Parameter (Object : in Store_Ref) return String is begin return Ada.Strings.Unbounded.To_String (Object.Get_Parameter); end Get_Parameter; function Get_Parameter (Object : in Store_Ref) return Ada.Strings.Unbounded.Unbounded_String is Impl : constant Store_Access := Store_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Parameter; end Get_Parameter; procedure Set_Server (Object : in out Store_Ref; Value : in String) is Impl : Store_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_String (Impl.all, 4, Impl.Server, Value); end Set_Server; procedure Set_Server (Object : in out Store_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String) is Impl : Store_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Unbounded_String (Impl.all, 4, Impl.Server, Value); end Set_Server; function Get_Server (Object : in Store_Ref) return String is begin return Ada.Strings.Unbounded.To_String (Object.Get_Server); end Get_Server; function Get_Server (Object : in Store_Ref) return Ada.Strings.Unbounded.Unbounded_String is Impl : constant Store_Access := Store_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Server; end Get_Server; -- Copy of the object. procedure Copy (Object : in Store_Ref; Into : in out Store_Ref) is Result : Store_Ref; begin if not Object.Is_Null then declare Impl : constant Store_Access := Store_Impl (Object.Get_Load_Object.all)'Access; Copy : constant Store_Access := new Store_Impl; begin ADO.Objects.Set_Object (Result, Copy.all'Access); Copy.Copy (Impl.all); Copy.Name := Impl.Name; Copy.Parameter := Impl.Parameter; Copy.Server := Impl.Server; end; end if; Into := Result; end Copy; procedure Find (Object : in out Store_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean) is Impl : constant Store_Access := new Store_Impl; begin Impl.Find (Session, Query, Found); if Found then ADO.Objects.Set_Object (Object, Impl.all'Access); else ADO.Objects.Set_Object (Object, null); Destroy (Impl); end if; end Find; procedure Load (Object : in out Store_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier) is Impl : constant Store_Access := new Store_Impl; Found : Boolean; Query : ADO.SQL.Query; begin Query.Bind_Param (Position => 1, Value => Id); Query.Set_Filter ("id = ?"); Impl.Find (Session, Query, Found); if not Found then Destroy (Impl); raise ADO.Objects.NOT_FOUND; end if; ADO.Objects.Set_Object (Object, Impl.all'Access); end Load; procedure Load (Object : in out Store_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean) is Impl : constant Store_Access := new Store_Impl; Query : ADO.SQL.Query; begin Query.Bind_Param (Position => 1, Value => Id); Query.Set_Filter ("id = ?"); Impl.Find (Session, Query, Found); if not Found then Destroy (Impl); else ADO.Objects.Set_Object (Object, Impl.all'Access); end if; end Load; procedure Save (Object : in out Store_Ref; Session : in out ADO.Sessions.Master_Session'Class) is Impl : ADO.Objects.Object_Record_Access := Object.Get_Object; begin if Impl = null then Impl := new Store_Impl; ADO.Objects.Set_Object (Object, Impl); end if; if not ADO.Objects.Is_Created (Impl.all) then Impl.Create (Session); else Impl.Save (Session); end if; end Save; procedure Delete (Object : in out Store_Ref; Session : in out ADO.Sessions.Master_Session'Class) is Impl : constant ADO.Objects.Object_Record_Access := Object.Get_Object; begin if Impl /= null then Impl.Delete (Session); end if; end Delete; -- -------------------- -- Free the object -- -------------------- procedure Destroy (Object : access Store_Impl) is type Store_Impl_Ptr is access all Store_Impl; procedure Unchecked_Free is new Ada.Unchecked_Deallocation (Store_Impl, Store_Impl_Ptr); pragma Warnings (Off, "*redundant conversion*"); Ptr : Store_Impl_Ptr := Store_Impl (Object.all)'Access; pragma Warnings (On, "*redundant conversion*"); begin Unchecked_Free (Ptr); end Destroy; procedure Find (Object : in out Store_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean) is Stmt : ADO.Statements.Query_Statement := Session.Create_Statement (Query, STORE_DEF'Access); begin Stmt.Execute; if Stmt.Has_Elements then Object.Load (Stmt, Session); Stmt.Next; Found := not Stmt.Has_Elements; else Found := False; end if; end Find; overriding procedure Load (Object : in out Store_Impl; Session : in out ADO.Sessions.Session'Class) is Found : Boolean; Query : ADO.SQL.Query; Id : constant ADO.Identifier := Object.Get_Key_Value; begin Query.Bind_Param (Position => 1, Value => Id); Query.Set_Filter ("id = ?"); Object.Find (Session, Query, Found); if not Found then raise ADO.Objects.NOT_FOUND; end if; end Load; procedure Save (Object : in out Store_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Stmt : ADO.Statements.Update_Statement := Session.Create_Statement (STORE_DEF'Access); begin if Object.Is_Modified (1) then Stmt.Save_Field (Name => COL_0_1_NAME, -- id Value => Object.Get_Key); Object.Clear_Modified (1); end if; if Object.Is_Modified (2) then Stmt.Save_Field (Name => COL_1_1_NAME, -- name Value => Object.Name); Object.Clear_Modified (2); end if; if Object.Is_Modified (3) then Stmt.Save_Field (Name => COL_2_1_NAME, -- parameter Value => Object.Parameter); Object.Clear_Modified (3); end if; if Object.Is_Modified (4) then Stmt.Save_Field (Name => COL_3_1_NAME, -- server Value => Object.Server); Object.Clear_Modified (4); end if; if Stmt.Has_Save_Fields then Stmt.Set_Filter (Filter => "id = ?"); Stmt.Add_Param (Value => Object.Get_Key); declare Result : Integer; begin Stmt.Execute (Result); if Result /= 1 then if Result /= 0 then raise ADO.Objects.UPDATE_ERROR; end if; end if; end; end if; end Save; procedure Create (Object : in out Store_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Query : ADO.Statements.Insert_Statement := Session.Create_Statement (STORE_DEF'Access); Result : Integer; begin Session.Allocate (Id => Object); Query.Save_Field (Name => COL_0_1_NAME, -- id Value => Object.Get_Key); Query.Save_Field (Name => COL_1_1_NAME, -- name Value => Object.Name); Query.Save_Field (Name => COL_2_1_NAME, -- parameter Value => Object.Parameter); Query.Save_Field (Name => COL_3_1_NAME, -- server Value => Object.Server); Query.Execute (Result); if Result /= 1 then raise ADO.Objects.INSERT_ERROR; end if; ADO.Objects.Set_Created (Object); end Create; procedure Delete (Object : in out Store_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Stmt : ADO.Statements.Delete_Statement := Session.Create_Statement (STORE_DEF'Access); begin Stmt.Set_Filter (Filter => "id = ?"); Stmt.Add_Param (Value => Object.Get_Key); Stmt.Execute; end Delete; function Get_Value (From : in Store_Ref; Name : in String) return Util.Beans.Objects.Object is Obj : constant ADO.Objects.Object_Record_Access := From.Get_Load_Object; Impl : access Store_Impl; begin if Obj = null then return Util.Beans.Objects.Null_Object; end if; Impl := Store_Impl (Obj.all)'Access; if Name = "id" then return ADO.Objects.To_Object (Impl.Get_Key); elsif Name = "name" then return Util.Beans.Objects.To_Object (Impl.Name); elsif Name = "parameter" then return Util.Beans.Objects.To_Object (Impl.Parameter); elsif Name = "server" then return Util.Beans.Objects.To_Object (Impl.Server); end if; return Util.Beans.Objects.Null_Object; end Get_Value; -- ------------------------------ -- Load the object from current iterator position -- ------------------------------ procedure Load (Object : in out Store_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class) is pragma Unreferenced (Session); begin Object.Set_Key_Value (Stmt.Get_Identifier (0)); Object.Name := Stmt.Get_Unbounded_String (1); Object.Parameter := Stmt.Get_Unbounded_String (2); Object.Server := Stmt.Get_Unbounded_String (3); ADO.Objects.Set_Created (Object); end Load; function Backup_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key is Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER, Of_Class => BACKUP_DEF'Access); begin ADO.Objects.Set_Value (Result, Id); return Result; end Backup_Key; function Backup_Key (Id : in String) return ADO.Objects.Object_Key is Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER, Of_Class => BACKUP_DEF'Access); begin ADO.Objects.Set_Value (Result, Id); return Result; end Backup_Key; function "=" (Left, Right : Backup_Ref'Class) return Boolean is begin return ADO.Objects.Object_Ref'Class (Left) = ADO.Objects.Object_Ref'Class (Right); end "="; procedure Set_Field (Object : in out Backup_Ref'Class; Impl : out Backup_Access) is Result : ADO.Objects.Object_Record_Access; begin Object.Prepare_Modify (Result); Impl := Backup_Impl (Result.all)'Access; end Set_Field; -- Internal method to allocate the Object_Record instance procedure Allocate (Object : in out Backup_Ref) is Impl : Backup_Access; begin Impl := new Backup_Impl; Impl.Create_Date := ADO.DEFAULT_TIME; ADO.Objects.Set_Object (Object, Impl.all'Access); end Allocate; -- ---------------------------------------- -- Data object: Backup -- ---------------------------------------- procedure Set_Id (Object : in out Backup_Ref; Value : in ADO.Identifier) is Impl : Backup_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Key_Value (Impl.all, 1, Value); end Set_Id; function Get_Id (Object : in Backup_Ref) return ADO.Identifier is Impl : constant Backup_Access := Backup_Impl (Object.Get_Object.all)'Access; begin return Impl.Get_Key_Value; end Get_Id; procedure Set_Create_Date (Object : in out Backup_Ref; Value : in Ada.Calendar.Time) is Impl : Backup_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Time (Impl.all, 2, Impl.Create_Date, Value); end Set_Create_Date; function Get_Create_Date (Object : in Backup_Ref) return Ada.Calendar.Time is Impl : constant Backup_Access := Backup_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Create_Date; end Get_Create_Date; procedure Set_Store (Object : in out Backup_Ref; Value : in Babel.Base.Models.Store_Ref'Class) is Impl : Backup_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Object (Impl.all, 3, Impl.Store, Value); end Set_Store; function Get_Store (Object : in Backup_Ref) return Babel.Base.Models.Store_Ref'Class is Impl : constant Backup_Access := Backup_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Store; end Get_Store; -- Copy of the object. procedure Copy (Object : in Backup_Ref; Into : in out Backup_Ref) is Result : Backup_Ref; begin if not Object.Is_Null then declare Impl : constant Backup_Access := Backup_Impl (Object.Get_Load_Object.all)'Access; Copy : constant Backup_Access := new Backup_Impl; begin ADO.Objects.Set_Object (Result, Copy.all'Access); Copy.Copy (Impl.all); Copy.Create_Date := Impl.Create_Date; Copy.Store := Impl.Store; end; end if; Into := Result; end Copy; procedure Find (Object : in out Backup_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean) is Impl : constant Backup_Access := new Backup_Impl; begin Impl.Find (Session, Query, Found); if Found then ADO.Objects.Set_Object (Object, Impl.all'Access); else ADO.Objects.Set_Object (Object, null); Destroy (Impl); end if; end Find; procedure Load (Object : in out Backup_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier) is Impl : constant Backup_Access := new Backup_Impl; Found : Boolean; Query : ADO.SQL.Query; begin Query.Bind_Param (Position => 1, Value => Id); Query.Set_Filter ("id = ?"); Impl.Find (Session, Query, Found); if not Found then Destroy (Impl); raise ADO.Objects.NOT_FOUND; end if; ADO.Objects.Set_Object (Object, Impl.all'Access); end Load; procedure Load (Object : in out Backup_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean) is Impl : constant Backup_Access := new Backup_Impl; Query : ADO.SQL.Query; begin Query.Bind_Param (Position => 1, Value => Id); Query.Set_Filter ("id = ?"); Impl.Find (Session, Query, Found); if not Found then Destroy (Impl); else ADO.Objects.Set_Object (Object, Impl.all'Access); end if; end Load; procedure Save (Object : in out Backup_Ref; Session : in out ADO.Sessions.Master_Session'Class) is Impl : ADO.Objects.Object_Record_Access := Object.Get_Object; begin if Impl = null then Impl := new Backup_Impl; ADO.Objects.Set_Object (Object, Impl); end if; if not ADO.Objects.Is_Created (Impl.all) then Impl.Create (Session); else Impl.Save (Session); end if; end Save; procedure Delete (Object : in out Backup_Ref; Session : in out ADO.Sessions.Master_Session'Class) is Impl : constant ADO.Objects.Object_Record_Access := Object.Get_Object; begin if Impl /= null then Impl.Delete (Session); end if; end Delete; -- -------------------- -- Free the object -- -------------------- procedure Destroy (Object : access Backup_Impl) is type Backup_Impl_Ptr is access all Backup_Impl; procedure Unchecked_Free is new Ada.Unchecked_Deallocation (Backup_Impl, Backup_Impl_Ptr); pragma Warnings (Off, "*redundant conversion*"); Ptr : Backup_Impl_Ptr := Backup_Impl (Object.all)'Access; pragma Warnings (On, "*redundant conversion*"); begin Unchecked_Free (Ptr); end Destroy; procedure Find (Object : in out Backup_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean) is Stmt : ADO.Statements.Query_Statement := Session.Create_Statement (Query, BACKUP_DEF'Access); begin Stmt.Execute; if Stmt.Has_Elements then Object.Load (Stmt, Session); Stmt.Next; Found := not Stmt.Has_Elements; else Found := False; end if; end Find; overriding procedure Load (Object : in out Backup_Impl; Session : in out ADO.Sessions.Session'Class) is Found : Boolean; Query : ADO.SQL.Query; Id : constant ADO.Identifier := Object.Get_Key_Value; begin Query.Bind_Param (Position => 1, Value => Id); Query.Set_Filter ("id = ?"); Object.Find (Session, Query, Found); if not Found then raise ADO.Objects.NOT_FOUND; end if; end Load; procedure Save (Object : in out Backup_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Stmt : ADO.Statements.Update_Statement := Session.Create_Statement (BACKUP_DEF'Access); begin if Object.Is_Modified (1) then Stmt.Save_Field (Name => COL_0_2_NAME, -- id Value => Object.Get_Key); Object.Clear_Modified (1); end if; if Object.Is_Modified (2) then Stmt.Save_Field (Name => COL_1_2_NAME, -- create_date Value => Object.Create_Date); Object.Clear_Modified (2); end if; if Object.Is_Modified (3) then Stmt.Save_Field (Name => COL_2_2_NAME, -- store_id Value => Object.Store); Object.Clear_Modified (3); end if; if Stmt.Has_Save_Fields then Stmt.Set_Filter (Filter => "id = ?"); Stmt.Add_Param (Value => Object.Get_Key); declare Result : Integer; begin Stmt.Execute (Result); if Result /= 1 then if Result /= 0 then raise ADO.Objects.UPDATE_ERROR; end if; end if; end; end if; end Save; procedure Create (Object : in out Backup_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Query : ADO.Statements.Insert_Statement := Session.Create_Statement (BACKUP_DEF'Access); Result : Integer; begin Session.Allocate (Id => Object); Query.Save_Field (Name => COL_0_2_NAME, -- id Value => Object.Get_Key); Query.Save_Field (Name => COL_1_2_NAME, -- create_date Value => Object.Create_Date); Query.Save_Field (Name => COL_2_2_NAME, -- store_id Value => Object.Store); Query.Execute (Result); if Result /= 1 then raise ADO.Objects.INSERT_ERROR; end if; ADO.Objects.Set_Created (Object); end Create; procedure Delete (Object : in out Backup_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Stmt : ADO.Statements.Delete_Statement := Session.Create_Statement (BACKUP_DEF'Access); begin Stmt.Set_Filter (Filter => "id = ?"); Stmt.Add_Param (Value => Object.Get_Key); Stmt.Execute; end Delete; function Get_Value (From : in Backup_Ref; Name : in String) return Util.Beans.Objects.Object is Obj : constant ADO.Objects.Object_Record_Access := From.Get_Load_Object; Impl : access Backup_Impl; begin if Obj = null then return Util.Beans.Objects.Null_Object; end if; Impl := Backup_Impl (Obj.all)'Access; if Name = "id" then return ADO.Objects.To_Object (Impl.Get_Key); elsif Name = "create_date" then return Util.Beans.Objects.Time.To_Object (Impl.Create_Date); end if; return Util.Beans.Objects.Null_Object; end Get_Value; -- ------------------------------ -- Load the object from current iterator position -- ------------------------------ procedure Load (Object : in out Backup_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class) is begin Object.Set_Key_Value (Stmt.Get_Identifier (0)); Object.Create_Date := Stmt.Get_Time (1); if not Stmt.Is_Null (2) then Object.Store.Set_Key_Value (Stmt.Get_Identifier (2), Session); end if; ADO.Objects.Set_Created (Object); end Load; function FileSet_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key is Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER, Of_Class => FILESET_DEF'Access); begin ADO.Objects.Set_Value (Result, Id); return Result; end FileSet_Key; function FileSet_Key (Id : in String) return ADO.Objects.Object_Key is Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER, Of_Class => FILESET_DEF'Access); begin ADO.Objects.Set_Value (Result, Id); return Result; end FileSet_Key; function "=" (Left, Right : FileSet_Ref'Class) return Boolean is begin return ADO.Objects.Object_Ref'Class (Left) = ADO.Objects.Object_Ref'Class (Right); end "="; procedure Set_Field (Object : in out Fileset_Ref'Class; Impl : out Fileset_Access) is Result : ADO.Objects.Object_Record_Access; begin Object.Prepare_Modify (Result); Impl := Fileset_Impl (Result.all)'Access; end Set_Field; -- Internal method to allocate the Object_Record instance procedure Allocate (Object : in out Fileset_Ref) is Impl : Fileset_Access; begin Impl := new Fileset_Impl; Impl.First_Id := ADO.NO_IDENTIFIER; Impl.Last_Id := ADO.NO_IDENTIFIER; ADO.Objects.Set_Object (Object, Impl.all'Access); end Allocate; -- ---------------------------------------- -- Data object: Fileset -- ---------------------------------------- procedure Set_Id (Object : in out Fileset_Ref; Value : in ADO.Identifier) is Impl : Fileset_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Key_Value (Impl.all, 1, Value); end Set_Id; function Get_Id (Object : in Fileset_Ref) return ADO.Identifier is Impl : constant Fileset_Access := Fileset_Impl (Object.Get_Object.all)'Access; begin return Impl.Get_Key_Value; end Get_Id; procedure Set_First_Id (Object : in out Fileset_Ref; Value : in ADO.Identifier) is Impl : Fileset_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Identifier (Impl.all, 2, Impl.First_Id, Value); end Set_First_Id; function Get_First_Id (Object : in Fileset_Ref) return ADO.Identifier is Impl : constant Fileset_Access := Fileset_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.First_Id; end Get_First_Id; procedure Set_Last_Id (Object : in out Fileset_Ref; Value : in ADO.Identifier) is Impl : Fileset_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Identifier (Impl.all, 3, Impl.Last_Id, Value); end Set_Last_Id; function Get_Last_Id (Object : in Fileset_Ref) return ADO.Identifier is Impl : constant Fileset_Access := Fileset_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Last_Id; end Get_Last_Id; procedure Set_Backup (Object : in out Fileset_Ref; Value : in Babel.Base.Models.Backup_Ref'Class) is Impl : Fileset_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Object (Impl.all, 4, Impl.Backup, Value); end Set_Backup; function Get_Backup (Object : in Fileset_Ref) return Babel.Base.Models.Backup_Ref'Class is Impl : constant Fileset_Access := Fileset_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Backup; end Get_Backup; -- Copy of the object. procedure Copy (Object : in Fileset_Ref; Into : in out Fileset_Ref) is Result : Fileset_Ref; begin if not Object.Is_Null then declare Impl : constant Fileset_Access := Fileset_Impl (Object.Get_Load_Object.all)'Access; Copy : constant Fileset_Access := new Fileset_Impl; begin ADO.Objects.Set_Object (Result, Copy.all'Access); Copy.Copy (Impl.all); Copy.First_Id := Impl.First_Id; Copy.Last_Id := Impl.Last_Id; Copy.Backup := Impl.Backup; end; end if; Into := Result; end Copy; procedure Find (Object : in out Fileset_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean) is Impl : constant Fileset_Access := new Fileset_Impl; begin Impl.Find (Session, Query, Found); if Found then ADO.Objects.Set_Object (Object, Impl.all'Access); else ADO.Objects.Set_Object (Object, null); Destroy (Impl); end if; end Find; procedure Load (Object : in out Fileset_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier) is Impl : constant Fileset_Access := new Fileset_Impl; Found : Boolean; Query : ADO.SQL.Query; begin Query.Bind_Param (Position => 1, Value => Id); Query.Set_Filter ("id = ?"); Impl.Find (Session, Query, Found); if not Found then Destroy (Impl); raise ADO.Objects.NOT_FOUND; end if; ADO.Objects.Set_Object (Object, Impl.all'Access); end Load; procedure Load (Object : in out Fileset_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean) is Impl : constant Fileset_Access := new Fileset_Impl; Query : ADO.SQL.Query; begin Query.Bind_Param (Position => 1, Value => Id); Query.Set_Filter ("id = ?"); Impl.Find (Session, Query, Found); if not Found then Destroy (Impl); else ADO.Objects.Set_Object (Object, Impl.all'Access); end if; end Load; procedure Save (Object : in out Fileset_Ref; Session : in out ADO.Sessions.Master_Session'Class) is Impl : ADO.Objects.Object_Record_Access := Object.Get_Object; begin if Impl = null then Impl := new Fileset_Impl; ADO.Objects.Set_Object (Object, Impl); end if; if not ADO.Objects.Is_Created (Impl.all) then Impl.Create (Session); else Impl.Save (Session); end if; end Save; procedure Delete (Object : in out Fileset_Ref; Session : in out ADO.Sessions.Master_Session'Class) is Impl : constant ADO.Objects.Object_Record_Access := Object.Get_Object; begin if Impl /= null then Impl.Delete (Session); end if; end Delete; -- -------------------- -- Free the object -- -------------------- procedure Destroy (Object : access Fileset_Impl) is type Fileset_Impl_Ptr is access all Fileset_Impl; procedure Unchecked_Free is new Ada.Unchecked_Deallocation (Fileset_Impl, Fileset_Impl_Ptr); pragma Warnings (Off, "*redundant conversion*"); Ptr : Fileset_Impl_Ptr := Fileset_Impl (Object.all)'Access; pragma Warnings (On, "*redundant conversion*"); begin Unchecked_Free (Ptr); end Destroy; procedure Find (Object : in out Fileset_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean) is Stmt : ADO.Statements.Query_Statement := Session.Create_Statement (Query, FILESET_DEF'Access); begin Stmt.Execute; if Stmt.Has_Elements then Object.Load (Stmt, Session); Stmt.Next; Found := not Stmt.Has_Elements; else Found := False; end if; end Find; overriding procedure Load (Object : in out Fileset_Impl; Session : in out ADO.Sessions.Session'Class) is Found : Boolean; Query : ADO.SQL.Query; Id : constant ADO.Identifier := Object.Get_Key_Value; begin Query.Bind_Param (Position => 1, Value => Id); Query.Set_Filter ("id = ?"); Object.Find (Session, Query, Found); if not Found then raise ADO.Objects.NOT_FOUND; end if; end Load; procedure Save (Object : in out Fileset_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Stmt : ADO.Statements.Update_Statement := Session.Create_Statement (FILESET_DEF'Access); begin if Object.Is_Modified (1) then Stmt.Save_Field (Name => COL_0_3_NAME, -- id Value => Object.Get_Key); Object.Clear_Modified (1); end if; if Object.Is_Modified (2) then Stmt.Save_Field (Name => COL_1_3_NAME, -- first_id Value => Object.First_Id); Object.Clear_Modified (2); end if; if Object.Is_Modified (3) then Stmt.Save_Field (Name => COL_2_3_NAME, -- last_id Value => Object.Last_Id); Object.Clear_Modified (3); end if; if Object.Is_Modified (4) then Stmt.Save_Field (Name => COL_3_3_NAME, -- backup_id Value => Object.Backup); Object.Clear_Modified (4); end if; if Stmt.Has_Save_Fields then Stmt.Set_Filter (Filter => "id = ?"); Stmt.Add_Param (Value => Object.Get_Key); declare Result : Integer; begin Stmt.Execute (Result); if Result /= 1 then if Result /= 0 then raise ADO.Objects.UPDATE_ERROR; end if; end if; end; end if; end Save; procedure Create (Object : in out Fileset_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Query : ADO.Statements.Insert_Statement := Session.Create_Statement (FILESET_DEF'Access); Result : Integer; begin Session.Allocate (Id => Object); Query.Save_Field (Name => COL_0_3_NAME, -- id Value => Object.Get_Key); Query.Save_Field (Name => COL_1_3_NAME, -- first_id Value => Object.First_Id); Query.Save_Field (Name => COL_2_3_NAME, -- last_id Value => Object.Last_Id); Query.Save_Field (Name => COL_3_3_NAME, -- backup_id Value => Object.Backup); Query.Execute (Result); if Result /= 1 then raise ADO.Objects.INSERT_ERROR; end if; ADO.Objects.Set_Created (Object); end Create; procedure Delete (Object : in out Fileset_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Stmt : ADO.Statements.Delete_Statement := Session.Create_Statement (FILESET_DEF'Access); begin Stmt.Set_Filter (Filter => "id = ?"); Stmt.Add_Param (Value => Object.Get_Key); Stmt.Execute; end Delete; function Get_Value (From : in Fileset_Ref; Name : in String) return Util.Beans.Objects.Object is Obj : constant ADO.Objects.Object_Record_Access := From.Get_Load_Object; Impl : access Fileset_Impl; begin if Obj = null then return Util.Beans.Objects.Null_Object; end if; Impl := Fileset_Impl (Obj.all)'Access; if Name = "id" then return ADO.Objects.To_Object (Impl.Get_Key); elsif Name = "first_id" then return Util.Beans.Objects.To_Object (Long_Long_Integer (Impl.First_Id)); elsif Name = "last_id" then return Util.Beans.Objects.To_Object (Long_Long_Integer (Impl.Last_Id)); end if; return Util.Beans.Objects.Null_Object; end Get_Value; -- ------------------------------ -- Load the object from current iterator position -- ------------------------------ procedure Load (Object : in out Fileset_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class) is begin Object.Set_Key_Value (Stmt.Get_Identifier (0)); Object.First_Id := Stmt.Get_Identifier (1); Object.Last_Id := Stmt.Get_Identifier (2); if not Stmt.Is_Null (3) then Object.Backup.Set_Key_Value (Stmt.Get_Identifier (3), Session); end if; ADO.Objects.Set_Created (Object); end Load; function Path_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key is Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER, Of_Class => PATH_DEF'Access); begin ADO.Objects.Set_Value (Result, Id); return Result; end Path_Key; function Path_Key (Id : in String) return ADO.Objects.Object_Key is Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER, Of_Class => PATH_DEF'Access); begin ADO.Objects.Set_Value (Result, Id); return Result; end Path_Key; function "=" (Left, Right : Path_Ref'Class) return Boolean is begin return ADO.Objects.Object_Ref'Class (Left) = ADO.Objects.Object_Ref'Class (Right); end "="; procedure Set_Field (Object : in out Path_Ref'Class; Impl : out Path_Access) is Result : ADO.Objects.Object_Record_Access; begin Object.Prepare_Modify (Result); Impl := Path_Impl (Result.all)'Access; end Set_Field; -- Internal method to allocate the Object_Record instance procedure Allocate (Object : in out Path_Ref) is Impl : Path_Access; begin Impl := new Path_Impl; ADO.Objects.Set_Object (Object, Impl.all'Access); end Allocate; -- ---------------------------------------- -- Data object: Path -- ---------------------------------------- procedure Set_Id (Object : in out Path_Ref; Value : in ADO.Identifier) is Impl : Path_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Key_Value (Impl.all, 1, Value); end Set_Id; function Get_Id (Object : in Path_Ref) return ADO.Identifier is Impl : constant Path_Access := Path_Impl (Object.Get_Object.all)'Access; begin return Impl.Get_Key_Value; end Get_Id; procedure Set_Name (Object : in out Path_Ref; Value : in String) is Impl : Path_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_String (Impl.all, 2, Impl.Name, Value); end Set_Name; procedure Set_Name (Object : in out Path_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String) is Impl : Path_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Unbounded_String (Impl.all, 2, Impl.Name, Value); end Set_Name; function Get_Name (Object : in Path_Ref) return String is begin return Ada.Strings.Unbounded.To_String (Object.Get_Name); end Get_Name; function Get_Name (Object : in Path_Ref) return Ada.Strings.Unbounded.Unbounded_String is Impl : constant Path_Access := Path_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Name; end Get_Name; procedure Set_Store (Object : in out Path_Ref; Value : in Babel.Base.Models.Store_Ref'Class) is Impl : Path_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Object (Impl.all, 3, Impl.Store, Value); end Set_Store; function Get_Store (Object : in Path_Ref) return Babel.Base.Models.Store_Ref'Class is Impl : constant Path_Access := Path_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Store; end Get_Store; -- Copy of the object. procedure Copy (Object : in Path_Ref; Into : in out Path_Ref) is Result : Path_Ref; begin if not Object.Is_Null then declare Impl : constant Path_Access := Path_Impl (Object.Get_Load_Object.all)'Access; Copy : constant Path_Access := new Path_Impl; begin ADO.Objects.Set_Object (Result, Copy.all'Access); Copy.Copy (Impl.all); Copy.Name := Impl.Name; Copy.Store := Impl.Store; end; end if; Into := Result; end Copy; procedure Find (Object : in out Path_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean) is Impl : constant Path_Access := new Path_Impl; begin Impl.Find (Session, Query, Found); if Found then ADO.Objects.Set_Object (Object, Impl.all'Access); else ADO.Objects.Set_Object (Object, null); Destroy (Impl); end if; end Find; procedure Load (Object : in out Path_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier) is Impl : constant Path_Access := new Path_Impl; Found : Boolean; Query : ADO.SQL.Query; begin Query.Bind_Param (Position => 1, Value => Id); Query.Set_Filter ("id = ?"); Impl.Find (Session, Query, Found); if not Found then Destroy (Impl); raise ADO.Objects.NOT_FOUND; end if; ADO.Objects.Set_Object (Object, Impl.all'Access); end Load; procedure Load (Object : in out Path_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean) is Impl : constant Path_Access := new Path_Impl; Query : ADO.SQL.Query; begin Query.Bind_Param (Position => 1, Value => Id); Query.Set_Filter ("id = ?"); Impl.Find (Session, Query, Found); if not Found then Destroy (Impl); else ADO.Objects.Set_Object (Object, Impl.all'Access); end if; end Load; procedure Save (Object : in out Path_Ref; Session : in out ADO.Sessions.Master_Session'Class) is Impl : ADO.Objects.Object_Record_Access := Object.Get_Object; begin if Impl = null then Impl := new Path_Impl; ADO.Objects.Set_Object (Object, Impl); end if; if not ADO.Objects.Is_Created (Impl.all) then Impl.Create (Session); else Impl.Save (Session); end if; end Save; procedure Delete (Object : in out Path_Ref; Session : in out ADO.Sessions.Master_Session'Class) is Impl : constant ADO.Objects.Object_Record_Access := Object.Get_Object; begin if Impl /= null then Impl.Delete (Session); end if; end Delete; -- -------------------- -- Free the object -- -------------------- procedure Destroy (Object : access Path_Impl) is type Path_Impl_Ptr is access all Path_Impl; procedure Unchecked_Free is new Ada.Unchecked_Deallocation (Path_Impl, Path_Impl_Ptr); pragma Warnings (Off, "*redundant conversion*"); Ptr : Path_Impl_Ptr := Path_Impl (Object.all)'Access; pragma Warnings (On, "*redundant conversion*"); begin Unchecked_Free (Ptr); end Destroy; procedure Find (Object : in out Path_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean) is Stmt : ADO.Statements.Query_Statement := Session.Create_Statement (Query, PATH_DEF'Access); begin Stmt.Execute; if Stmt.Has_Elements then Object.Load (Stmt, Session); Stmt.Next; Found := not Stmt.Has_Elements; else Found := False; end if; end Find; overriding procedure Load (Object : in out Path_Impl; Session : in out ADO.Sessions.Session'Class) is Found : Boolean; Query : ADO.SQL.Query; Id : constant ADO.Identifier := Object.Get_Key_Value; begin Query.Bind_Param (Position => 1, Value => Id); Query.Set_Filter ("id = ?"); Object.Find (Session, Query, Found); if not Found then raise ADO.Objects.NOT_FOUND; end if; end Load; procedure Save (Object : in out Path_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Stmt : ADO.Statements.Update_Statement := Session.Create_Statement (PATH_DEF'Access); begin if Object.Is_Modified (1) then Stmt.Save_Field (Name => COL_0_4_NAME, -- id Value => Object.Get_Key); Object.Clear_Modified (1); end if; if Object.Is_Modified (2) then Stmt.Save_Field (Name => COL_1_4_NAME, -- name Value => Object.Name); Object.Clear_Modified (2); end if; if Object.Is_Modified (3) then Stmt.Save_Field (Name => COL_2_4_NAME, -- store_id Value => Object.Store); Object.Clear_Modified (3); end if; if Stmt.Has_Save_Fields then Stmt.Set_Filter (Filter => "id = ?"); Stmt.Add_Param (Value => Object.Get_Key); declare Result : Integer; begin Stmt.Execute (Result); if Result /= 1 then if Result /= 0 then raise ADO.Objects.UPDATE_ERROR; end if; end if; end; end if; end Save; procedure Create (Object : in out Path_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Query : ADO.Statements.Insert_Statement := Session.Create_Statement (PATH_DEF'Access); Result : Integer; begin Session.Allocate (Id => Object); Query.Save_Field (Name => COL_0_4_NAME, -- id Value => Object.Get_Key); Query.Save_Field (Name => COL_1_4_NAME, -- name Value => Object.Name); Query.Save_Field (Name => COL_2_4_NAME, -- store_id Value => Object.Store); Query.Execute (Result); if Result /= 1 then raise ADO.Objects.INSERT_ERROR; end if; ADO.Objects.Set_Created (Object); end Create; procedure Delete (Object : in out Path_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Stmt : ADO.Statements.Delete_Statement := Session.Create_Statement (PATH_DEF'Access); begin Stmt.Set_Filter (Filter => "id = ?"); Stmt.Add_Param (Value => Object.Get_Key); Stmt.Execute; end Delete; function Get_Value (From : in Path_Ref; Name : in String) return Util.Beans.Objects.Object is Obj : constant ADO.Objects.Object_Record_Access := From.Get_Load_Object; Impl : access Path_Impl; begin if Obj = null then return Util.Beans.Objects.Null_Object; end if; Impl := Path_Impl (Obj.all)'Access; if Name = "id" then return ADO.Objects.To_Object (Impl.Get_Key); elsif Name = "name" then return Util.Beans.Objects.To_Object (Impl.Name); end if; return Util.Beans.Objects.Null_Object; end Get_Value; -- ------------------------------ -- Load the object from current iterator position -- ------------------------------ procedure Load (Object : in out Path_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class) is begin Object.Set_Key_Value (Stmt.Get_Identifier (0)); Object.Name := Stmt.Get_Unbounded_String (1); if not Stmt.Is_Null (2) then Object.Store.Set_Key_Value (Stmt.Get_Identifier (2), Session); end if; ADO.Objects.Set_Created (Object); end Load; function File_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key is Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER, Of_Class => FILE_DEF'Access); begin ADO.Objects.Set_Value (Result, Id); return Result; end File_Key; function File_Key (Id : in String) return ADO.Objects.Object_Key is Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER, Of_Class => FILE_DEF'Access); begin ADO.Objects.Set_Value (Result, Id); return Result; end File_Key; function "=" (Left, Right : File_Ref'Class) return Boolean is begin return ADO.Objects.Object_Ref'Class (Left) = ADO.Objects.Object_Ref'Class (Right); end "="; procedure Set_Field (Object : in out File_Ref'Class; Impl : out File_Access) is Result : ADO.Objects.Object_Record_Access; begin Object.Prepare_Modify (Result); Impl := File_Impl (Result.all)'Access; end Set_Field; -- Internal method to allocate the Object_Record instance procedure Allocate (Object : in out File_Ref) is Impl : File_Access; begin Impl := new File_Impl; Impl.Size := 0; Impl.Date := ADO.DEFAULT_TIME; ADO.Objects.Set_Object (Object, Impl.all'Access); end Allocate; -- ---------------------------------------- -- Data object: File -- ---------------------------------------- procedure Set_Id (Object : in out File_Ref; Value : in ADO.Identifier) is Impl : File_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Key_Value (Impl.all, 1, Value); end Set_Id; function Get_Id (Object : in File_Ref) return ADO.Identifier is Impl : constant File_Access := File_Impl (Object.Get_Object.all)'Access; begin return Impl.Get_Key_Value; end Get_Id; procedure Set_Size (Object : in out File_Ref; Value : in Integer) is Impl : File_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Integer (Impl.all, 2, Impl.Size, Value); end Set_Size; function Get_Size (Object : in File_Ref) return Integer is Impl : constant File_Access := File_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Size; end Get_Size; procedure Set_Date (Object : in out File_Ref; Value : in Ada.Calendar.Time) is Impl : File_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Time (Impl.all, 3, Impl.Date, Value); end Set_Date; function Get_Date (Object : in File_Ref) return Ada.Calendar.Time is Impl : constant File_Access := File_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Date; end Get_Date; procedure Set_Sha1 (Object : in out File_Ref; Value : in ADO.Blob_Ref) is Impl : File_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Blob (Impl.all, 4, Impl.Sha1, Value); end Set_Sha1; function Get_Sha1 (Object : in File_Ref) return ADO.Blob_Ref is Impl : constant File_Access := File_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Sha1; end Get_Sha1; procedure Set_Directory (Object : in out File_Ref; Value : in Babel.Base.Models.Path_Ref'Class) is Impl : File_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Object (Impl.all, 5, Impl.Directory, Value); end Set_Directory; function Get_Directory (Object : in File_Ref) return Babel.Base.Models.Path_Ref'Class is Impl : constant File_Access := File_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Directory; end Get_Directory; procedure Set_Name (Object : in out File_Ref; Value : in Babel.Base.Models.Path_Ref'Class) is Impl : File_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Object (Impl.all, 6, Impl.Name, Value); end Set_Name; function Get_Name (Object : in File_Ref) return Babel.Base.Models.Path_Ref'Class is Impl : constant File_Access := File_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Name; end Get_Name; -- Copy of the object. procedure Copy (Object : in File_Ref; Into : in out File_Ref) is Result : File_Ref; begin if not Object.Is_Null then declare Impl : constant File_Access := File_Impl (Object.Get_Load_Object.all)'Access; Copy : constant File_Access := new File_Impl; begin ADO.Objects.Set_Object (Result, Copy.all'Access); Copy.Copy (Impl.all); Copy.Size := Impl.Size; Copy.Date := Impl.Date; Copy.Sha1 := Impl.Sha1; Copy.Directory := Impl.Directory; Copy.Name := Impl.Name; end; end if; Into := Result; end Copy; procedure Find (Object : in out File_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean) is Impl : constant File_Access := new File_Impl; begin Impl.Find (Session, Query, Found); if Found then ADO.Objects.Set_Object (Object, Impl.all'Access); else ADO.Objects.Set_Object (Object, null); Destroy (Impl); end if; end Find; procedure Load (Object : in out File_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier) is Impl : constant File_Access := new File_Impl; Found : Boolean; Query : ADO.SQL.Query; begin Query.Bind_Param (Position => 1, Value => Id); Query.Set_Filter ("id = ?"); Impl.Find (Session, Query, Found); if not Found then Destroy (Impl); raise ADO.Objects.NOT_FOUND; end if; ADO.Objects.Set_Object (Object, Impl.all'Access); end Load; procedure Load (Object : in out File_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean) is Impl : constant File_Access := new File_Impl; Query : ADO.SQL.Query; begin Query.Bind_Param (Position => 1, Value => Id); Query.Set_Filter ("id = ?"); Impl.Find (Session, Query, Found); if not Found then Destroy (Impl); else ADO.Objects.Set_Object (Object, Impl.all'Access); end if; end Load; procedure Save (Object : in out File_Ref; Session : in out ADO.Sessions.Master_Session'Class) is Impl : ADO.Objects.Object_Record_Access := Object.Get_Object; begin if Impl = null then Impl := new File_Impl; ADO.Objects.Set_Object (Object, Impl); end if; if not ADO.Objects.Is_Created (Impl.all) then Impl.Create (Session); else Impl.Save (Session); end if; end Save; procedure Delete (Object : in out File_Ref; Session : in out ADO.Sessions.Master_Session'Class) is Impl : constant ADO.Objects.Object_Record_Access := Object.Get_Object; begin if Impl /= null then Impl.Delete (Session); end if; end Delete; -- -------------------- -- Free the object -- -------------------- procedure Destroy (Object : access File_Impl) is type File_Impl_Ptr is access all File_Impl; procedure Unchecked_Free is new Ada.Unchecked_Deallocation (File_Impl, File_Impl_Ptr); pragma Warnings (Off, "*redundant conversion*"); Ptr : File_Impl_Ptr := File_Impl (Object.all)'Access; pragma Warnings (On, "*redundant conversion*"); begin Unchecked_Free (Ptr); end Destroy; procedure Find (Object : in out File_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean) is Stmt : ADO.Statements.Query_Statement := Session.Create_Statement (Query, FILE_DEF'Access); begin Stmt.Execute; if Stmt.Has_Elements then Object.Load (Stmt, Session); Stmt.Next; Found := not Stmt.Has_Elements; else Found := False; end if; end Find; overriding procedure Load (Object : in out File_Impl; Session : in out ADO.Sessions.Session'Class) is Found : Boolean; Query : ADO.SQL.Query; Id : constant ADO.Identifier := Object.Get_Key_Value; begin Query.Bind_Param (Position => 1, Value => Id); Query.Set_Filter ("id = ?"); Object.Find (Session, Query, Found); if not Found then raise ADO.Objects.NOT_FOUND; end if; end Load; procedure Save (Object : in out File_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Stmt : ADO.Statements.Update_Statement := Session.Create_Statement (FILE_DEF'Access); begin if Object.Is_Modified (1) then Stmt.Save_Field (Name => COL_0_5_NAME, -- id Value => Object.Get_Key); Object.Clear_Modified (1); end if; if Object.Is_Modified (2) then Stmt.Save_Field (Name => COL_1_5_NAME, -- size Value => Object.Size); Object.Clear_Modified (2); end if; if Object.Is_Modified (3) then Stmt.Save_Field (Name => COL_2_5_NAME, -- date Value => Object.Date); Object.Clear_Modified (3); end if; if Object.Is_Modified (4) then Stmt.Save_Field (Name => COL_3_5_NAME, -- sha1 Value => Object.Sha1); Object.Clear_Modified (4); end if; if Object.Is_Modified (5) then Stmt.Save_Field (Name => COL_4_5_NAME, -- directory_id Value => Object.Directory); Object.Clear_Modified (5); end if; if Object.Is_Modified (6) then Stmt.Save_Field (Name => COL_5_5_NAME, -- name_id Value => Object.Name); Object.Clear_Modified (6); end if; if Stmt.Has_Save_Fields then Stmt.Set_Filter (Filter => "id = ?"); Stmt.Add_Param (Value => Object.Get_Key); declare Result : Integer; begin Stmt.Execute (Result); if Result /= 1 then if Result /= 0 then raise ADO.Objects.UPDATE_ERROR; end if; end if; end; end if; end Save; procedure Create (Object : in out File_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Query : ADO.Statements.Insert_Statement := Session.Create_Statement (FILE_DEF'Access); Result : Integer; begin Session.Allocate (Id => Object); Query.Save_Field (Name => COL_0_5_NAME, -- id Value => Object.Get_Key); Query.Save_Field (Name => COL_1_5_NAME, -- size Value => Object.Size); Query.Save_Field (Name => COL_2_5_NAME, -- date Value => Object.Date); Query.Save_Field (Name => COL_3_5_NAME, -- sha1 Value => Object.Sha1); Query.Save_Field (Name => COL_4_5_NAME, -- directory_id Value => Object.Directory); Query.Save_Field (Name => COL_5_5_NAME, -- name_id Value => Object.Name); Query.Execute (Result); if Result /= 1 then raise ADO.Objects.INSERT_ERROR; end if; ADO.Objects.Set_Created (Object); end Create; procedure Delete (Object : in out File_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Stmt : ADO.Statements.Delete_Statement := Session.Create_Statement (FILE_DEF'Access); begin Stmt.Set_Filter (Filter => "id = ?"); Stmt.Add_Param (Value => Object.Get_Key); Stmt.Execute; end Delete; function Get_Value (From : in File_Ref; Name : in String) return Util.Beans.Objects.Object is Obj : constant ADO.Objects.Object_Record_Access := From.Get_Load_Object; Impl : access File_Impl; begin if Obj = null then return Util.Beans.Objects.Null_Object; end if; Impl := File_Impl (Obj.all)'Access; if Name = "id" then return ADO.Objects.To_Object (Impl.Get_Key); elsif Name = "size" then return Util.Beans.Objects.To_Object (Long_Long_Integer (Impl.Size)); elsif Name = "date" then return Util.Beans.Objects.Time.To_Object (Impl.Date); end if; return Util.Beans.Objects.Null_Object; end Get_Value; -- ------------------------------ -- Load the object from current iterator position -- ------------------------------ procedure Load (Object : in out File_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class) is begin Object.Set_Key_Value (Stmt.Get_Identifier (0)); Object.Size := Stmt.Get_Integer (1); Object.Date := Stmt.Get_Time (2); Object.Sha1 := Stmt.Get_Blob (3); if not Stmt.Is_Null (4) then Object.Directory.Set_Key_Value (Stmt.Get_Identifier (4), Session); end if; if not Stmt.Is_Null (5) then Object.Name.Set_Key_Value (Stmt.Get_Identifier (5), Session); end if; ADO.Objects.Set_Created (Object); end Load; end Babel.Base.Models;
ee/wman/chwin.asm
olifink/smsqe
0
27199
* Process change window event V1.01  1986 <NAME> QJUMP * 2003-05-27 v1.02 call upon new move routine (WL) section wman * xdef wm_chwin * xref sp_wmove xref sp_wsize xref wm_clrci xref wm_wpos xref changewin * include dev8_keys_qdos_io include dev8_keys_qdos_pt include dev8_keys_sys include dev8_keys_chn include dev8_keys_k include dev8_keys_wwork include dev8_keys_wstatus include dev8_keys_con * * d0 r error return * d1 r pointer move * d4 r 0 or pt..sizw * a0 r channel ID of window * a1 sp window status area * a4 c p pointer to working definition * * all other registers preserved * reglist reg d1-d7/a1/a4 stk_d1 equ $0 stk_ev equ $0c stk_stat equ $1c * * wm_chwin moveq #0,d4 preset return movem.l reglist,-(sp) save registers move.l ww_chid(a4),a0 get channel ID move.l ww_wstat(a4),a1 window status area bsr.l wm_clrci clear current item moveq #0,d0 move.l ws_ptpos(a1),d5 set old pointer position * bclr #pt..wmov,wsp_weve(a1) is it? bne.s wcw_move ... yes btst #pt..wsiz,wsp_weve(a1) try size beq.s wcw_exit ... no * moveq #$ffffff00+pt.wsize,d2 bsr.s wcw_rptr read new pointer position sub.w d5,d1 and set difference swap d5 swap d1 sub.w d5,d1 swap d1 move.l d1,stk_d1(sp) return the answer move.b #pt..wsiz,stk_ev+3(sp) set wsiz event to be done tst.l d0 bra.s wcw_exit * wcw_move jsr changewin try new move routines beq.s wcw_exit ... were OK moveq #$ffffff00+pt.wmove,d2 window move sprite bsr.s wcw_rptr read new position bne.s wcw_exit * move.l ww_xorg(a4),d7 save old origin sub.l ww_xorg(a4),d5 make old position relative to the window moveq #1,d6 outline move bsr.l wm_wpos position window beq.s wcw_exit ... ok move.l d7,ww_xorg(a4) restore window origin * wcw_exit movem.l (sp)+,reglist restore registers rts page * * read pointer move * secreg reg a0/a2 secfram equ sw_psprt+16 wcw_rptr tst.b ww_pulld(a4) pulled-down window? beq.s wcw_dord no, just do read * movem.l secreg,-(sp) sub.w #secfram,sp make space for a sub-window definition move.l a1,-(sp) keep workspace pointer lea 8+4(sp),a1 point to it clr.l (a1) no list clr.l sw_xorg+4(a1) origin at top left clr.l sw_attr+4(a1) disable cursor clr.l sw_attr+8(a1) lea sp_wmove(pc),a2 move sprite cmp.b #pt.wmove,d2 is it move? beq.s wcw_sspr yes lea sp_wsize(pc),a2 no, set size sprite wcw_sspr move.l a2,sw_psprt+4(a1) set sprite lea wcw_exsw(pc),a2 set primary's sub-window definition moveq #-1,d3 moveq #iow.xtop,d0 trap #3 move.l d1,a0 get primary's channel ID move.l (sp)+,a1 restore workspace addq.l #ws_point,a1 ...smashed version wcw_rrdp subq.l #ws_point,a1 unsmash A1 from DORD moveq #pt.kystk,d2 do an ordinary read bsr.s wcw_dord move.l d0,d2 keep any error bne.s wcw_exms there was one, exit whatever cmp.b #k.maxch,pp_kstrk(a1) cursor key? bhi.s wcw_rrdp yes, ignore it wcw_exms lea 8(sp),a1 point to bits to restore lea wcw_exrs(pc),a2 moveq #iow.xtop,d0 trap #3 reset primary's sub and secondary lists add.w #secfram,a7 movem.l (sp)+,secreg move.l d2,d0 restore any error rts * wcw_dord moveq #iop.rptr,d0 read pointer addq.l #ws_point,a1 read pointer record moveq #-1,d3 trap #3 tst.l d0 rts * * EXTOP to set primary's sub-window definition, and return its * channel ID. * * Registers: * Entry Exit * D1 primary's channel ID * A1 new SWDEF old swdef * extreg reg a0/a2 wcw_exsw movem.l extreg,-(sp) move.l sd_pprwn(a0),a0 point to primary window move.w chn_tag(a0),d1 get its tag swap d1 move.l sys_chtb(a6),a2 scan channel table move.w #0,d1 starting with channel number 0 wcx_loop cmp.l (a2),a0 our primary? beq.s wcx_cfnd yes addq.w #1,d1 no, next channel... addq.l #4,a2 ...is here bra.s wcx_loop try that wcx_cfnd add.w #sd.extnl,a0 point to normal cdb move.l sd_wwdef(a0),-4(a1) save old sub-window definition move.l sd_sewll(a0),-8(a1) and secondary list move.l a1,sd_wwdef(a0) set new sub-window definition clr.l sd_sewll(a0) and pretend there's no secondaries move.l sd_xsize(a0),sw_xsize+4(a1) set sub-window size movem.l (sp)+,extreg moveq #0,d0 rts * wcw_exrs move.l -4(a1),sd_wwdef(a0) restore old secondary move.l -8(a1),sd_sewll(a0) and secondary list moveq #0,d0 rts * end
unix-macos/02-unix-macos/unix_files/unix_files/Exercise Files/Chapter_09/09_08_files/unix_files/control_itunes.scpt
MaksimZinovev/courses
0
3044
<gh_stars>0 tell application "iTunes" activate set sound volume to 50 play delay 10 next track delay 5 quit end tell
arch/ARM/RP/svd/rp2040/rp_svd-spi1.ads
morbos/Ada_Drivers_Library
2
27433
-- Copyright (c) 2020 Raspberry Pi (Trading) Ltd. -- -- SPDX-License-Identifier: BSD-3-Clause -- This spec has been automatically generated from rp2040.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package RP_SVD.SPI1 is pragma Preelaborate; --------------- -- Registers -- --------------- subtype SSPCR0_DSS_Field is HAL.UInt4; subtype SSPCR0_FRF_Field is HAL.UInt2; subtype SSPCR0_SCR_Field is HAL.UInt8; -- Control register 0, SSPCR0 on page 3-4 type SSPCR0_Register is record -- Data Size Select: 0000 Reserved, undefined operation. 0001 Reserved, -- undefined operation. 0010 Reserved, undefined operation. 0011 4-bit -- data. 0100 5-bit data. 0101 6-bit data. 0110 7-bit data. 0111 8-bit -- data. 1000 9-bit data. 1001 10-bit data. 1010 11-bit data. 1011 -- 12-bit data. 1100 13-bit data. 1101 14-bit data. 1110 15-bit data. -- 1111 16-bit data. DSS : SSPCR0_DSS_Field := 16#0#; -- Frame format: 00 Motorola SPI frame format. 01 TI synchronous serial -- frame format. 10 National Microwire frame format. 11 Reserved, -- undefined operation. FRF : SSPCR0_FRF_Field := 16#0#; -- SSPCLKOUT polarity, applicable to Motorola SPI frame format only. See -- Motorola SPI frame format on page 2-10. SPO : Boolean := False; -- SSPCLKOUT phase, applicable to Motorola SPI frame format only. See -- Motorola SPI frame format on page 2-10. SPH : Boolean := False; -- Serial clock rate. The value SCR is used to generate the transmit and -- receive bit rate of the PrimeCell SSP. The bit rate is: F SSPCLK -- CPSDVSR x (1+SCR) where CPSDVSR is an even value from 2-254, -- programmed through the SSPCPSR register and SCR is a value from -- 0-255. SCR : SSPCR0_SCR_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 SSPCR0_Register use record DSS at 0 range 0 .. 3; FRF at 0 range 4 .. 5; SPO at 0 range 6 .. 6; SPH at 0 range 7 .. 7; SCR at 0 range 8 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; -- Control register 1, SSPCR1 on page 3-5 type SSPCR1_Register is record -- Loop back mode: 0 Normal serial port operation enabled. 1 Output of -- transmit serial shifter is connected to input of receive serial -- shifter internally. LBM : Boolean := False; -- Synchronous serial port enable: 0 SSP operation disabled. 1 SSP -- operation enabled. SSE : Boolean := False; -- Master or slave mode select. This bit can be modified only when the -- PrimeCell SSP is disabled, SSE=0: 0 Device configured as master, -- default. 1 Device configured as slave. MS : Boolean := False; -- Slave-mode output disable. This bit is relevant only in the slave -- mode, MS=1. In multiple-slave systems, it is possible for an -- PrimeCell SSP master to broadcast a message to all slaves in the -- system while ensuring that only one slave drives data onto its serial -- output line. In such systems the RXD lines from multiple slaves could -- be tied together. To operate in such systems, the SOD bit can be set -- if the PrimeCell SSP slave is not supposed to drive the SSPTXD line: -- 0 SSP can drive the SSPTXD output in slave mode. 1 SSP must not drive -- the SSPTXD output in slave mode. SOD : Boolean := False; -- unspecified Reserved_4_31 : HAL.UInt28 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SSPCR1_Register use record LBM at 0 range 0 .. 0; SSE at 0 range 1 .. 1; MS at 0 range 2 .. 2; SOD at 0 range 3 .. 3; Reserved_4_31 at 0 range 4 .. 31; end record; subtype SSPDR_DATA_Field is HAL.UInt16; -- Data register, SSPDR on page 3-6 type SSPDR_Register is record -- Transmit/Receive FIFO: Read Receive FIFO. Write Transmit FIFO. You -- must right-justify data when the PrimeCell SSP is programmed for a -- data size that is less than 16 bits. Unused bits at the top are -- ignored by transmit logic. The receive logic automatically -- right-justifies. DATA : SSPDR_DATA_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 SSPDR_Register use record DATA at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; -- Status register, SSPSR on page 3-7 type SSPSR_Register is record -- Read-only. Transmit FIFO empty, RO: 0 Transmit FIFO is not empty. 1 -- Transmit FIFO is empty. TFE : Boolean; -- Read-only. Transmit FIFO not full, RO: 0 Transmit FIFO is full. 1 -- Transmit FIFO is not full. TNF : Boolean; -- Read-only. Receive FIFO not empty, RO: 0 Receive FIFO is empty. 1 -- Receive FIFO is not empty. RNE : Boolean; -- Read-only. Receive FIFO full, RO: 0 Receive FIFO is not full. 1 -- Receive FIFO is full. RFF : Boolean; -- Read-only. PrimeCell SSP busy flag, RO: 0 SSP is idle. 1 SSP is -- currently transmitting and/or receiving a frame or the transmit FIFO -- is not empty. BSY : Boolean; -- unspecified Reserved_5_31 : HAL.UInt27; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SSPSR_Register use record TFE at 0 range 0 .. 0; TNF at 0 range 1 .. 1; RNE at 0 range 2 .. 2; RFF at 0 range 3 .. 3; BSY at 0 range 4 .. 4; Reserved_5_31 at 0 range 5 .. 31; end record; subtype SSPCPSR_CPSDVSR_Field is HAL.UInt8; -- Clock prescale register, SSPCPSR on page 3-8 type SSPCPSR_Register is record -- Clock prescale divisor. Must be an even number from 2-254, depending -- on the frequency of SSPCLK. The least significant bit always returns -- zero on reads. CPSDVSR : SSPCPSR_CPSDVSR_Field := 16#0#; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SSPCPSR_Register use record CPSDVSR at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; -- Interrupt mask set or clear register, SSPIMSC on page 3-9 type SSPIMSC_Register is record -- Receive overrun interrupt mask: 0 Receive FIFO written to while full -- condition interrupt is masked. 1 Receive FIFO written to while full -- condition interrupt is not masked. RORIM : Boolean := False; -- Receive timeout interrupt mask: 0 Receive FIFO not empty and no read -- prior to timeout period interrupt is masked. 1 Receive FIFO not empty -- and no read prior to timeout period interrupt is not masked. RTIM : Boolean := False; -- Receive FIFO interrupt mask: 0 Receive FIFO half full or less -- condition interrupt is masked. 1 Receive FIFO half full or less -- condition interrupt is not masked. RXIM : Boolean := False; -- Transmit FIFO interrupt mask: 0 Transmit FIFO half empty or less -- condition interrupt is masked. 1 Transmit FIFO half empty or less -- condition interrupt is not masked. TXIM : Boolean := False; -- unspecified Reserved_4_31 : HAL.UInt28 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SSPIMSC_Register use record RORIM at 0 range 0 .. 0; RTIM at 0 range 1 .. 1; RXIM at 0 range 2 .. 2; TXIM at 0 range 3 .. 3; Reserved_4_31 at 0 range 4 .. 31; end record; -- Raw interrupt status register, SSPRIS on page 3-10 type SSPRIS_Register is record -- Read-only. Gives the raw interrupt state, prior to masking, of the -- SSPRORINTR interrupt RORRIS : Boolean; -- Read-only. Gives the raw interrupt state, prior to masking, of the -- SSPRTINTR interrupt RTRIS : Boolean; -- Read-only. Gives the raw interrupt state, prior to masking, of the -- SSPRXINTR interrupt RXRIS : Boolean; -- Read-only. Gives the raw interrupt state, prior to masking, of the -- SSPTXINTR interrupt TXRIS : Boolean; -- unspecified Reserved_4_31 : HAL.UInt28; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SSPRIS_Register use record RORRIS at 0 range 0 .. 0; RTRIS at 0 range 1 .. 1; RXRIS at 0 range 2 .. 2; TXRIS at 0 range 3 .. 3; Reserved_4_31 at 0 range 4 .. 31; end record; -- Masked interrupt status register, SSPMIS on page 3-11 type SSPMIS_Register is record -- Read-only. Gives the receive over run masked interrupt status, after -- masking, of the SSPRORINTR interrupt RORMIS : Boolean; -- Read-only. Gives the receive timeout masked interrupt state, after -- masking, of the SSPRTINTR interrupt RTMIS : Boolean; -- Read-only. Gives the receive FIFO masked interrupt state, after -- masking, of the SSPRXINTR interrupt RXMIS : Boolean; -- Read-only. Gives the transmit FIFO masked interrupt state, after -- masking, of the SSPTXINTR interrupt TXMIS : Boolean; -- unspecified Reserved_4_31 : HAL.UInt28; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SSPMIS_Register use record RORMIS at 0 range 0 .. 0; RTMIS at 0 range 1 .. 1; RXMIS at 0 range 2 .. 2; TXMIS at 0 range 3 .. 3; Reserved_4_31 at 0 range 4 .. 31; end record; -- Interrupt clear register, SSPICR on page 3-11 type SSPICR_Register is record -- Write data bit of one shall clear (set to zero) the corresponding bit -- in the field. Clears the SSPRORINTR interrupt RORIC : Boolean := False; -- Write data bit of one shall clear (set to zero) the corresponding bit -- in the field. Clears the SSPRTINTR interrupt RTIC : Boolean := False; -- unspecified Reserved_2_31 : HAL.UInt30 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SSPICR_Register use record RORIC at 0 range 0 .. 0; RTIC at 0 range 1 .. 1; Reserved_2_31 at 0 range 2 .. 31; end record; -- DMA control register, SSPDMACR on page 3-12 type SSPDMACR_Register is record -- Receive DMA Enable. If this bit is set to 1, DMA for the receive FIFO -- is enabled. RXDMAE : Boolean := False; -- Transmit DMA Enable. If this bit is set to 1, DMA for the transmit -- FIFO is enabled. TXDMAE : Boolean := False; -- unspecified Reserved_2_31 : HAL.UInt30 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SSPDMACR_Register use record RXDMAE at 0 range 0 .. 0; TXDMAE at 0 range 1 .. 1; Reserved_2_31 at 0 range 2 .. 31; end record; subtype SSPPERIPHID0_PARTNUMBER0_Field is HAL.UInt8; -- Peripheral identification registers, SSPPeriphID0-3 on page 3-13 type SSPPERIPHID0_Register is record -- Read-only. These bits read back as 0x22 PARTNUMBER0 : SSPPERIPHID0_PARTNUMBER0_Field; -- unspecified Reserved_8_31 : HAL.UInt24; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SSPPERIPHID0_Register use record PARTNUMBER0 at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype SSPPERIPHID1_PARTNUMBER1_Field is HAL.UInt4; subtype SSPPERIPHID1_DESIGNER0_Field is HAL.UInt4; -- Peripheral identification registers, SSPPeriphID0-3 on page 3-13 type SSPPERIPHID1_Register is record -- Read-only. These bits read back as 0x0 PARTNUMBER1 : SSPPERIPHID1_PARTNUMBER1_Field; -- Read-only. These bits read back as 0x1 DESIGNER0 : SSPPERIPHID1_DESIGNER0_Field; -- unspecified Reserved_8_31 : HAL.UInt24; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SSPPERIPHID1_Register use record PARTNUMBER1 at 0 range 0 .. 3; DESIGNER0 at 0 range 4 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype SSPPERIPHID2_DESIGNER1_Field is HAL.UInt4; subtype SSPPERIPHID2_REVISION_Field is HAL.UInt4; -- Peripheral identification registers, SSPPeriphID0-3 on page 3-13 type SSPPERIPHID2_Register is record -- Read-only. These bits read back as 0x4 DESIGNER1 : SSPPERIPHID2_DESIGNER1_Field; -- Read-only. These bits return the peripheral revision REVISION : SSPPERIPHID2_REVISION_Field; -- unspecified Reserved_8_31 : HAL.UInt24; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SSPPERIPHID2_Register use record DESIGNER1 at 0 range 0 .. 3; REVISION at 0 range 4 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype SSPPERIPHID3_CONFIGURATION_Field is HAL.UInt8; -- Peripheral identification registers, SSPPeriphID0-3 on page 3-13 type SSPPERIPHID3_Register is record -- Read-only. These bits read back as 0x00 CONFIGURATION : SSPPERIPHID3_CONFIGURATION_Field; -- unspecified Reserved_8_31 : HAL.UInt24; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SSPPERIPHID3_Register use record CONFIGURATION at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype SSPPCELLID0_SSPPCELLID0_Field is HAL.UInt8; -- PrimeCell identification registers, SSPPCellID0-3 on page 3-16 type SSPPCELLID0_Register is record -- Read-only. These bits read back as 0x0D SSPPCELLID0 : SSPPCELLID0_SSPPCELLID0_Field; -- unspecified Reserved_8_31 : HAL.UInt24; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SSPPCELLID0_Register use record SSPPCELLID0 at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype SSPPCELLID1_SSPPCELLID1_Field is HAL.UInt8; -- PrimeCell identification registers, SSPPCellID0-3 on page 3-16 type SSPPCELLID1_Register is record -- Read-only. These bits read back as 0xF0 SSPPCELLID1 : SSPPCELLID1_SSPPCELLID1_Field; -- unspecified Reserved_8_31 : HAL.UInt24; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SSPPCELLID1_Register use record SSPPCELLID1 at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype SSPPCELLID2_SSPPCELLID2_Field is HAL.UInt8; -- PrimeCell identification registers, SSPPCellID0-3 on page 3-16 type SSPPCELLID2_Register is record -- Read-only. These bits read back as 0x05 SSPPCELLID2 : SSPPCELLID2_SSPPCELLID2_Field; -- unspecified Reserved_8_31 : HAL.UInt24; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SSPPCELLID2_Register use record SSPPCELLID2 at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype SSPPCELLID3_SSPPCELLID3_Field is HAL.UInt8; -- PrimeCell identification registers, SSPPCellID0-3 on page 3-16 type SSPPCELLID3_Register is record -- Read-only. These bits read back as 0xB1 SSPPCELLID3 : SSPPCELLID3_SSPPCELLID3_Field; -- unspecified Reserved_8_31 : HAL.UInt24; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SSPPCELLID3_Register use record SSPPCELLID3 at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; ----------------- -- Peripherals -- ----------------- type SPI1_Peripheral is record -- Control register 0, SSPCR0 on page 3-4 SSPCR0 : aliased SSPCR0_Register; -- Control register 1, SSPCR1 on page 3-5 SSPCR1 : aliased SSPCR1_Register; -- Data register, SSPDR on page 3-6 SSPDR : aliased SSPDR_Register; -- Status register, SSPSR on page 3-7 SSPSR : aliased SSPSR_Register; -- Clock prescale register, SSPCPSR on page 3-8 SSPCPSR : aliased SSPCPSR_Register; -- Interrupt mask set or clear register, SSPIMSC on page 3-9 SSPIMSC : aliased SSPIMSC_Register; -- Raw interrupt status register, SSPRIS on page 3-10 SSPRIS : aliased SSPRIS_Register; -- Masked interrupt status register, SSPMIS on page 3-11 SSPMIS : aliased SSPMIS_Register; -- Interrupt clear register, SSPICR on page 3-11 SSPICR : aliased SSPICR_Register; -- DMA control register, SSPDMACR on page 3-12 SSPDMACR : aliased SSPDMACR_Register; -- Peripheral identification registers, SSPPeriphID0-3 on page 3-13 SSPPERIPHID0 : aliased SSPPERIPHID0_Register; -- Peripheral identification registers, SSPPeriphID0-3 on page 3-13 SSPPERIPHID1 : aliased SSPPERIPHID1_Register; -- Peripheral identification registers, SSPPeriphID0-3 on page 3-13 SSPPERIPHID2 : aliased SSPPERIPHID2_Register; -- Peripheral identification registers, SSPPeriphID0-3 on page 3-13 SSPPERIPHID3 : aliased SSPPERIPHID3_Register; -- PrimeCell identification registers, SSPPCellID0-3 on page 3-16 SSPPCELLID0 : aliased SSPPCELLID0_Register; -- PrimeCell identification registers, SSPPCellID0-3 on page 3-16 SSPPCELLID1 : aliased SSPPCELLID1_Register; -- PrimeCell identification registers, SSPPCellID0-3 on page 3-16 SSPPCELLID2 : aliased SSPPCELLID2_Register; -- PrimeCell identification registers, SSPPCellID0-3 on page 3-16 SSPPCELLID3 : aliased SSPPCELLID3_Register; end record with Volatile; for SPI1_Peripheral use record SSPCR0 at 16#0# range 0 .. 31; SSPCR1 at 16#4# range 0 .. 31; SSPDR at 16#8# range 0 .. 31; SSPSR at 16#C# range 0 .. 31; SSPCPSR at 16#10# range 0 .. 31; SSPIMSC at 16#14# range 0 .. 31; SSPRIS at 16#18# range 0 .. 31; SSPMIS at 16#1C# range 0 .. 31; SSPICR at 16#20# range 0 .. 31; SSPDMACR at 16#24# range 0 .. 31; SSPPERIPHID0 at 16#FE0# range 0 .. 31; SSPPERIPHID1 at 16#FE4# range 0 .. 31; SSPPERIPHID2 at 16#FE8# range 0 .. 31; SSPPERIPHID3 at 16#FEC# range 0 .. 31; SSPPCELLID0 at 16#FF0# range 0 .. 31; SSPPCELLID1 at 16#FF4# range 0 .. 31; SSPPCELLID2 at 16#FF8# range 0 .. 31; SSPPCELLID3 at 16#FFC# range 0 .. 31; end record; SPI1_Periph : aliased SPI1_Peripheral with Import, Address => SPI1_Base; end RP_SVD.SPI1;
dasm/src/test/define_echo.asm
zeh/dasmjs
16
1401
; $Id: define_echo.asm 284 2008-11-07 01:05:04Z phf $ ; ; Test case for -D and -M options and echo pseudo-op. SOURCE_SYMBOL equ 255 IMPROPER_SYMBOL equ 127 processor 6502 echo "Defined in source file:" echo SOURCE_SYMBOL echo "Defined improperly in source file:" echo IMPROPER_SYMBOL echo "Defined externally with -D and default:" echo EXTERNAL_D_DEFAULT echo "Defined externally with -D and 127:" echo EXTERNAL_D_VALUE echo "Defined externally with -M and default:" echo EXTERNAL_M_DEFAULT echo "Defined externally with -M and 127:" echo EXTERNAL_M_VALUE end
Cubical/Data/Int/MoreInts/DiffInt.agda
marcinjangrzybowski/cubical
301
15297
<gh_stars>100-1000 {-# OPTIONS --safe #-} module Cubical.Data.Int.MoreInts.DiffInt where open import Cubical.Data.Int.MoreInts.DiffInt.Base public open import Cubical.Data.Int.MoreInts.DiffInt.Properties public
benchmark/Syntacticosmos/Cxt.agda
masondesu/agda
1
6780
<reponame>masondesu/agda module Cxt (K : Set) where open import Basics open import Pr open import Nom mutual data Cxt : Set where EC : Cxt _[_-_] : (G : Cxt)(x : Nom) -> K -> {p : [| G Hasn't x |]} -> Cxt HAS : Cxt -> Nom -> Bool HAS EC x = false HAS (G [ y - S ]) x with nomEq y x HAS (G [ y - S ]) .y | yes refl = true ... | no n = HAS G x _Has_ : Cxt -> Nom -> Pr G Has x = So (HAS G x) _Hasn't_ : Cxt -> Nom -> Pr G Hasn't x = So (not (HAS G x)) GooN : (G : Cxt)(T : K) -> Nom -> Pr GooN EC T y = ff GooN (G [ x - S ]) T y with nomEq x y GooN (G [ x - S ]) T .x | yes refl = S eq T GooN (G [ x - S ]) T y | no n = GooN G T y _?-_ : (G : Cxt)(x : Nom){p : [| G Has x |]} -> K :- \ T -> GooN G T x (EC ?- y) {} ((G [ x - S ]) ?- y) {_} with nomEq x y ((G [ x - S ]) ?- .x) {_} | yes refl = [ S / refl ] ((G [ x - S ]) ?- y) {p} | no n = (G ?- y) {p} topGooN : (G : Cxt)(x : Nom){p : [| G Hasn't x |]}(S : K) -> [| GooN ((G [ x - S ]) {p}) S x |] topGooN G x S with nomEq x x topGooN G x S | yes refl = refl topGooN G x S | no n = magic (n refl)
test/Fail/BrokenInferenceDueToNonvariantPolarity.agda
cruhland/agda
1,989
11460
-- Andreas, 2012-09-15 {-# OPTIONS --show-implicit #-} -- {-# OPTIONS -v tc.meta:50 #-} -- {-# OPTIONS -v tc.conv:50 #-} -- {-# OPTIONS -v tc.polarity:10 #-} -- {-# OPTIONS -v tc.constr.findInScope:50 #-} module BrokenInferenceDueToNonvariantPolarity where import Common.Level data ⊥ : Set where record ⊤ : Set where data Nat : Set where zero : Nat suc : Nat → Nat False : Nat → Set False zero = ⊥ False (suc n) = False n module Invariant where record Bla (n : Nat)(p : False n) : Set where -- phantom arguments to Bla get polarity 'Invariant' module Nonvariant where Bla : (n : Nat) → False n → Set Bla n p = ⊤ -- polarity checker infers arguments to be 'Nonvariant' -- open Invariant -- succeeds open Nonvariant -- fails module Works where drop-suc : {n : Nat}{{p : False n}} → Bla (suc n) p → Bla n p drop-suc _ = _ works : (n : Nat) → {{p : False n}} → Bla n p → ⊥ works zero {{()}} b works (suc n) b = works n (drop-suc {n} b) module Fails where drop-suc : {n : Nat}{{p : False n}} → Bla (suc n) p → Bla n p drop-suc _ = _ bla : (n : Nat) → {p : False n} → Bla n p → ⊥ bla zero {()} b bla (suc n) b = bla n (drop-suc b) -- Since Bla is analysed as constant function, the constraint -- Bla n p = Bla X Y does not provide unique solutions for X and Y. -- And since the positivity checker runs after constraint solving, -- Agda does not recognize that bla is Nonvariant in argument p -- and that it hence could search for any solution.
nasm assembly/assgnments/question3.asm
AI-Factor-y/NASM-library
0
101280
<filename>nasm assembly/assgnments/question3.asm<gh_stars>0 section .data msg1 : db 'Enter first number :' l1 : equ $-msg1 msg2 : db 'Enter second number :' l2 : equ $-msg2 msg3 : db 'first number is multiple of second number' l3 : equ $-msg3 msg4 : db 'first number is not a multiple of second number' l4 : equ $-msg4 section .bss num1 : resb 1 num2 : resb 1 junk : resb 1 section .text global _start: _start: mov eax, 4 mov ebx, 1 mov ecx, msg1 mov edx, l1 int 80h mov eax, 3 mov ebx, 0 mov ecx, num1 mov edx, 1 int 80h mov eax, 3 mov ebx, 0 mov ecx, junk mov edx, 1 int 80h mov eax, 4 mov ebx, 1 mov ecx, msg2 mov edx, l2 int 80h mov eax, 3 mov ebx, 0 mov ecx, num2 mov edx, 1 int 80h ; check if second number divides first number mov ax, word[num1] mov bl, byte[num2] sub ax ,30h sub bl ,30h mov ah, 0 div bl cmp ah,0 je if jmp else if: mov eax, 4 mov ebx, 1 mov ecx, msg3 mov edx, l3 int 80h jmp exit else: mov eax, 4 mov ebx, 1 mov ecx, msg4 mov edx, l4 int 80h exit: mov eax, 1 mov ebx, 0 int 80h mov eax, 1 mov ebx, 0 int 80h
programs/oeis/167/A167821.asm
jmorken/loda
1
18259
<gh_stars>1-10 ; A167821: a(n) is the number of n-tosses having a run of 3 or more heads or a run of 3 or more tails for a fair coin (i.e., probability is a(n)/2^n). ; 0,0,2,6,16,38,86,188,402,846,1760,3630,7438,15164,30794,62342,125904,253782,510758,1026684,2061730,4136990,8295872,16627166,33311646,66716028,133582106,267406998,535206832,1071049286,2143127030,4287918140,8578528818,17161414254,34329877664,68671161102,137360777134,274751414972,549551145578,1099180467494,2198487426960,4397179522230,8794690204742,17589916238076,35180699465026,70362801747518,140727873301376,281459419226558,562924780883262,1125859176820476,2251733911125050,4503492994788150,9007026719598448 lpb $0 sub $0,1 add $1,$3 mul $1,2 add $2,1 add $4,$3 mov $3,$2 mov $2,$4 lpe
Categories/Functor/Coalgebras.agda
copumpkin/categories
98
10724
<reponame>copumpkin/categories<gh_stars>10-100 module Categories.Functor.Coalgebras where
libsrc/_DEVELOPMENT/arch/zxn/globals/z80/_GLOBAL_ZXN_PORT_FE.asm
jpoikela/z88dk
640
102041
SECTION data_arch PUBLIC _GLOBAL_ZXN_PORT_FE PUBLIC _GLOBAL_TS_PORT_FE PUBLIC _GLOBAL_ZX_PORT_FE _GLOBAL_ZXN_PORT_FE: _GLOBAL_TS_PORT_FE: _GLOBAL_ZX_PORT_FE: defb 7
src/regex-regular_expressions.adb
skordal/ada-regex
2
16090
-- Ada regular expression library -- (c) <NAME> 2020 <<EMAIL>> -- Report bugs and issues on <https://github.com/skordal/ada-regex> with Ada.Characters.Latin_1; with Ada.Unchecked_Deallocation; with Regex.Utilities.Sorted_Sets; with Regex.Utilities.String_Buffers; package body Regex.Regular_Expressions is function Create (Input : in String) return Regular_Expression is begin return Retval : Regular_Expression do Parse (Input, Retval); Compile (Retval); end return; end Create; function Create (Input : in Regex.Syntax_Trees.Syntax_Tree_Node_Access) return Regular_Expression is begin return Retval : Regular_Expression do Retval.Syntax_Tree := Regex.Syntax_Trees.Clone_Tree (Input, Retval.Syntax_Tree_Node_Count); Compile (Retval); end return; end Create; function Get_Syntax_Tree (This : in Regular_Expression) return Regex.Syntax_Trees.Syntax_Tree_Node_Access is begin return This.Syntax_Tree; end Get_Syntax_Tree; function Get_State_Machine (This : in Regular_Expression) return Regex.State_Machines.State_Machine_State_Vectors.Vector is begin return This.State_Machine_States; end Get_State_Machine; function Get_Start_State (This : in Regular_Expression) return Regex.State_Machines.State_Machine_State_Access is begin return This.Start_State; end Get_Start_State; procedure Finalize (This : in out Regular_Expression) is procedure Free_State is new Ada.Unchecked_Deallocation (State_Machine_State, State_Machine_State_Access); begin if This.Syntax_Tree /= null then Free_Recursively (This.Syntax_Tree); end if; for State of This.State_Machine_States loop Free_State (State); end loop; end Finalize; function Get_Next_Node_Id (This : in out Regular_Expression) return Natural is Retval : constant Natural := This.Syntax_Tree_Node_Count; begin This.Syntax_Tree_Node_Count := This.Syntax_Tree_Node_Count + 1; return Retval; end Get_Next_Node_Id; -- Separate units: procedure Parse (Input : in String; Output : in out Regular_Expression) is separate; procedure Compile (Output : in out Regular_Expression) is separate; end Regex.Regular_Expressions;
gcc-gcc-7_3_0-release/gcc/ada/scn.ads
best08618/asylo
7
6086
<reponame>best08618/asylo ------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S C N -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2016, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING3. If not, go to -- -- http://www.gnu.org/licenses for a complete copy of the license. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package contains the lexical analyzer routines. This is used by the -- compiler for scanning Ada source files. with Casing; use Casing; with Errout; use Errout; with Scng; with Style; use Style; with Types; use Types; package Scn is procedure Initialize_Scanner (Unit : Unit_Number_Type; Index : Source_File_Index); -- Initialize lexical scanner for scanning a new file. The caller has -- completed the construction of the Units.Table entry for the specified -- Unit and Index references the corresponding source file. A special -- case is when Unit = No_Unit_Number, and Index corresponds to the -- source index for reading the configuration pragma file. function Determine_Token_Casing return Casing_Type; -- Determines the casing style of the current token, which is either a -- keyword or an identifier. See also package Casing. procedure Post_Scan; -- Create nodes for tokens: Char_Literal, Identifier, Real_Literal, -- Integer_Literal, String_Literal and Operator_Symbol. procedure Scan_Reserved_Identifier (Force_Msg : Boolean); -- This procedure is called to convert the current token, which the caller -- has checked is for a reserved word, to an equivalent identifier. This is -- of course only used in error situations where the parser can detect that -- a reserved word is being used as an identifier. An appropriate error -- message, pointing to the token, is also issued if either this is the -- first occurrence of misuse of this identifier, or if Force_Msg is True. ------------- -- Scanner -- ------------- -- The scanner used by the compiler is an instantiation of the -- generic package Scng with routines appropriate to the compiler package Scanner is new Scng (Post_Scan => Post_Scan, Error_Msg => Error_Msg, Error_Msg_S => Error_Msg_S, Error_Msg_SC => Error_Msg_SC, Error_Msg_SP => Error_Msg_SP, Style => Style.Style_Inst); procedure Scan renames Scanner.Scan; -- Scan scans out the next token, and advances the scan state accordingly -- (see package Scans for details). If the scan encounters an illegal -- token, then an error message is issued pointing to the bad character, -- and Scan returns a reasonable substitute token of some kind. end Scn;
source/cpm/eZ80-CPM.asm
cfarrar/z20x-cpm-00
5
96787
<filename>source/cpm/eZ80-CPM.asm ; CP/M v2.2 Copyright 1979 (c) by Digital Research ; Ported to the EZ80F92 platform by ; <NAME> ; <NAME> CPU = EZ80F92 .ASSUME ADL=0 INCLUDE "eZ80-CPM-MDEF.inc" ; CP/M memory defines. ORG ccp ; start addr of cpm binary blob ; Start of CP/M code. INCLUDE "eZ80-CPM-CCP.inc" ; CP/M Console Command Processor code. INCLUDE "eZ80-CPM-BDOS.inc" ; CP/M Basic Disk Operating System code. INCLUDE "eZ80-CPM-BIOS.inc" ; CP/M Basic Input/Output System code. ; End of CP/M code. END 
oeis/252/A252932.asm
neoneye/loda-programs
11
87987
<gh_stars>10-100 ; A252932: Number of n X 2 nonnegative integer arrays with upper left 0 and every value within 3 of its king move distance from the upper left and every value increasing by 0 or 1 with every step right, diagonally se or down. ; 2,5,13,34,83,176,329,558,879,1308,1861,2554,3403,4424,5633,7046,8679,10548,12669,15058,17731,20704,23993,27614,31583,35916,40629,45738,51259,57208,63601,70454,77783,85604,93933,102786,112179,122128,132649,143758,155471,167804,180773,194394,208683,223656,239329,255718,272839,290708,309341,328754,348963,369984,391833,414526,438079,462508,487829,514058,541211,569304,598353,628374,659383,691396,724429,758498,793619,829808,867081,905454,944943,985564,1027333,1070266,1114379,1159688,1206209,1253958 mov $2,3 mov $3,$0 sub $0,1 add $2,$0 mul $0,2 lpb $0 sub $0,1 sub $2,1 add $1,$2 add $2,$0 lpe trn $1,1 lpb $3 add $1,3 sub $3,1 lpe add $1,2 mov $0,$1
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/bug_elaboration_code.adb
best08618/asylo
7
21055
<gh_stars>1-10 package body Bug_Elaboration_Code is procedure Increment_I is begin I := I + 1; end Increment_I; begin I := 5; Increment_I; J := I; end Bug_Elaboration_Code;
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/boolean_subtype2.adb
best08618/asylo
7
23033
<filename>gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/boolean_subtype2.adb -- { dg-do compile } -- { dg-options "-O3 -gnata" } package body Boolean_Subtype2 is function Component_Type (Id : Entity_Id) return Entity_Id is begin pragma Assert (Is_String_Type (Id)); return Node20 (Id); end; function First_Index (Id : Entity_Id) return Node_Id is begin pragma Assert (Is_String_Type (Id)); return Node20 (Id); end ; function Is_Character_Type (Id : Entity_Id) return B is begin return Flag63 (Id); end; function Number_Dimensions (Id : Entity_Id) return Positive is N : Integer := 0; T : Node_Id := First_Index (Id); begin if Present (T) then N := N + 1; end if; return N; end; function Is_String_Type (Id : Entity_Id) return B is begin return (Id /= 0 and then Number_Dimensions (Id) = 1 and then Is_Character_Type (Component_Type (Id))); end; end Boolean_Subtype2;
oeis/189/A189742.asm
neoneye/loda-programs
11
20482
; A189742: a(1)=4, a(2)=3, a(n)=4*a(n-1) + 3*a(n-2) ; Submitted by <NAME> ; 4,3,24,105,492,2283,10608,49281,228948,1063635,4941384,22956441,106649916,495468987,2301825696,10693709745,49680316068,230802393507,1072250522232,4981409269449,23142388644492,107513782386315,499482295478736,2320470529073889,10780329002731764,50082727598148723,232671897400790184,1080935772397606905,5021758781792798172,23329842444364013403,108384646122834448128,503528111824429832721,2339266385666222675268,10867649878138180199235,50488398669551388822744,234556544312620095888681 mov $1,1 mov $3,4 lpb $0 sub $0,1 mov $2,$3 add $2,$1 mul $1,3 mov $3,$1 add $1,$2 lpe mov $0,$3
libsrc/_DEVELOPMENT/string/c/sdcc_iy/memmem_callee.asm
meesokim/z88dk
0
103896
; void *memmem_callee(const void *big, size_t big_len, const void *little, size_t little_len) SECTION code_string PUBLIC _memmem_callee EXTERN asm_memmem _memmem_callee: pop af pop ix pop hl pop de pop bc push af jp asm_memmem
programs/oeis/158/A158463.asm
karttu/loda
1
8654
; A158463: a(n) = 12*n^2 - 1. ; -1,11,47,107,191,299,431,587,767,971,1199,1451,1727,2027,2351,2699,3071,3467,3887,4331,4799,5291,5807,6347,6911,7499,8111,8747,9407,10091,10799,11531,12287,13067,13871,14699,15551,16427,17327,18251,19199,20171,21167,22187,23231,24299,25391,26507,27647,28811,29999,31211,32447,33707,34991,36299,37631,38987,40367,41771,43199,44651,46127,47627,49151,50699,52271,53867,55487,57131,58799,60491,62207,63947,65711,67499,69311,71147,73007,74891,76799,78731,80687,82667,84671,86699,88751,90827,92927,95051,97199,99371,101567,103787,106031,108299,110591,112907,115247,117611,119999,122411,124847,127307,129791,132299,134831,137387,139967,142571,145199,147851,150527,153227,155951,158699,161471,164267,167087,169931,172799,175691,178607,181547,184511,187499,190511,193547,196607,199691,202799,205931,209087,212267,215471,218699,221951,225227,228527,231851,235199,238571,241967,245387,248831,252299,255791,259307,262847,266411,269999,273611,277247,280907,284591,288299,292031,295787,299567,303371,307199,311051,314927,318827,322751,326699,330671,334667,338687,342731,346799,350891,355007,359147,363311,367499,371711,375947,380207,384491,388799,393131,397487,401867,406271,410699,415151,419627,424127,428651,433199,437771,442367,446987,451631,456299,460991,465707,470447,475211,479999,484811,489647,494507,499391,504299,509231,514187,519167,524171,529199,534251,539327,544427,549551,554699,559871,565067,570287,575531,580799,586091,591407,596747,602111,607499,612911,618347,623807,629291,634799,640331,645887,651467,657071,662699,668351,674027,679727,685451,691199,696971,702767,708587,714431,720299,726191,732107,738047,744011 pow $0,2 mul $0,12 sub $0,1 mov $1,$0
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c4/c43208b.ada
best08618/asylo
7
25255
<reponame>best08618/asylo -- C43208B.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 AN AGGREGATE OF THE FORM: -- (B..C => (D..E => (F..G => (H..I => J)))) -- WHOSE TYPE IS A TWO-DIMENSIONAL ARRAY TYPE THAT HAS A TWO- -- DIMENSIONAL ARRAY COMPONENT TYPE, CHECK THAT: -- A) IF B..C OR D..E IS A NULL RANGE, THEN F, G, H, I, AND J -- ARE NOT EVALUATED. -- B) IF B..C AND D..E ARE NON-NULL RANGES, THEN F, G, H AND I -- ARE EVALUATED (C-B+1)*(E-D+1) TIMES, AND J IS EVALUATED -- (C-B+1)*(E-D+1)*(G-F+1)*(I-H+1) TIMES IF F..G AND H..I -- ARE NON-NULL. -- EG 01/19/84 WITH REPORT; PROCEDURE C43208B IS USE REPORT; BEGIN TEST("C43208B", "CHECK THAT THE EVALUATION OF A MULTI" & "DIMENSIONAL ARRAY TYPE THAT HAS AN " & "ARRAY COMPONENT TYPE IS PERFORMED " & "CORRECTLY"); DECLARE TYPE CHOICE_INDEX IS (B, C, D, E, F, G, H, I, J); TYPE CHOICE_CNTR IS ARRAY(CHOICE_INDEX) OF INTEGER; CNTR : CHOICE_CNTR := (CHOICE_INDEX => 0); TYPE T1 IS ARRAY(INTEGER RANGE <>, INTEGER RANGE <>) OF INTEGER; FUNCTION CALC (A : CHOICE_INDEX; B : INTEGER) RETURN INTEGER IS BEGIN CNTR(A) := CNTR(A) + 1; RETURN IDENT_INT(B); END CALC; BEGIN CASE_A : BEGIN CASE_A1 : DECLARE A1 : ARRAY(4 .. 3, 3 .. 4) OF T1(2 .. 3, 1 .. 2); BEGIN CNTR := (CHOICE_INDEX => 0); A1 := (4 .. 3 => (3 .. 4 => (CALC(F,2) .. CALC(G,3) => (CALC(H,1) .. CALC(I,2) => CALC(J,2))))); IF CNTR(F) /= 0 THEN FAILED("CASE A1 : F WAS EVALUATED"); END IF; IF CNTR(G) /= 0 THEN FAILED("CASE A1 : G WAS EVALUATED"); END IF; IF CNTR(H) /= 0 THEN FAILED("CASE A1 : H WAS EVALUATED"); END IF; IF CNTR(I) /= 0 THEN FAILED("CASE A1 : I WAS EVALUATED"); END IF; IF CNTR(J) /= 0 THEN FAILED("CASE A1 : J WAS EVALUATED"); END IF; EXCEPTION WHEN OTHERS => FAILED("CASE A1 : EXCEPTION RAISED"); END CASE_A1; CASE_A2 : DECLARE A2 : ARRAY(3 .. 4, 4 .. 3) OF T1(2 .. 3, 1 .. 2); BEGIN CNTR := (CHOICE_INDEX => 0); A2 := (CALC(B,3) .. CALC(C,4) => (CALC(D,4) .. CALC(E,3) => (CALC(F,2) .. CALC(G,3) => (CALC(H,1) .. CALC(I,2) => CALC(J,2))))); IF CNTR(F) /= 0 THEN FAILED("CASE A2 : F WAS EVALUATED"); END IF; IF CNTR(G) /= 0 THEN FAILED("CASE A2 : G WAS EVALUATED"); END IF; IF CNTR(H) /= 0 THEN FAILED("CASE A2 : H WAS EVALUATED"); END IF; IF CNTR(I) /= 0 THEN FAILED("CASE A2 : I WAS EVALUATED"); END IF; IF CNTR(J) /= 0 THEN FAILED("CASE A2 : J WAS EVALUATED"); END IF; EXCEPTION WHEN OTHERS => FAILED("CASE A2 : EXCEPTION RAISED"); END CASE_A2; END CASE_A; CASE_B : BEGIN CASE_B1 : DECLARE B1 : ARRAY(2 .. 3, 1 .. 2) OF T1(1 .. 2, 9 .. 10); BEGIN CNTR := (CHOICE_INDEX => 0); B1 := (2 .. 3 => (1 .. 2 => (CALC(F,1) .. CALC(G,2) => (CALC(H,9) .. CALC(I,10) => CALC(J,2))))); IF CNTR(F) /= 4 THEN FAILED("CASE B1 : F NOT EVALUATED (C-B+1)*" & "(E-D+1) TIMES"); END IF; IF CNTR(G) /= 4 THEN FAILED("CASE B1 : G NOT EVALUATED (C-B+1)*" & "(E-D+1) TIMES"); END IF; IF CNTR(H) /= 4 THEN FAILED("CASE B1 : H NOT EVALUATED (C-B+1)*" & "(E-D+1) TIMES"); END IF; IF CNTR(I) /= 4 THEN FAILED("CASE B1 : I NOT EVALUATED (C-B+1)*" & "(E-D+1) TIMES"); END IF; IF CNTR(J) /= 16 THEN FAILED("CASE B1 : J NOT EVALUATED (C-B+1)*" & "(E-D+1)*(G-F+1)*(I-H+1) TIMES"); END IF; EXCEPTION WHEN OTHERS => FAILED("CASE B1 : EXECEPTION RAISED"); END CASE_B1; CASE_B2 : DECLARE B2 : ARRAY(2 .. 3, 1 .. 2) OF T1(1 .. 2, 9 .. 10); BEGIN CNTR := (CHOICE_INDEX => 0); B2 := (CALC(B,2) .. CALC(C,3) => (CALC(D,1) .. CALC(E,2) => (CALC(F,1) .. CALC(G,2) => (CALC(H,9) .. CALC(I,10) => CALC(J,2))))); IF CNTR(F) /= 4 THEN FAILED("CASE B2 : F NOT EVALUATED (C-B+1)*" & "(E-D+1) TIMES"); END IF; IF CNTR(G) /= 4 THEN FAILED("CASE B2 : G NOT EVALUATED (C-B+1)*" & "(E-D+1) TIMES"); END IF; IF CNTR(H) /= 4 THEN FAILED("CASE B2 : H NOT EVALUATED (C-B+1)*" & "(E-D+1) TIMES"); END IF; IF CNTR(I) /= 4 THEN FAILED("CASE B2 : I NOT EVALUATED (C-B+1)*" & "(E-D+1) TIMES"); END IF; IF CNTR(J) /= 16 THEN FAILED("CASE B2 : J NOT EVALUATED (C-B+1)*" & "(E-D+1)*(G-F+1)*(I-H+1) TIMES"); END IF; EXCEPTION WHEN OTHERS => FAILED("CASE B2 : EXECEPTION RAISED"); END CASE_B2; CASE_B3 : DECLARE B3 : ARRAY(2 .. 3, 1 .. 2) OF T1(1 .. 2, 2 .. 1); BEGIN CNTR := (CHOICE_INDEX => 0); B3 := (2 .. 3 => (1 .. 2 => (CALC(F,1) .. CALC(G,2) => (CALC(H,2) .. CALC(I,1) => CALC(J,2))))); IF CNTR(F) /= 4 THEN FAILED("CASE B3 : F NOT EVALUATED (C-B+1)*" & "(E-D+1) TIMES"); END IF; IF CNTR(G) /= 4 THEN FAILED("CASE B3 : G NOT EVALUATED (C-B+1)*" & "(E-D+1) TIMES"); END IF; IF CNTR(H) /= 4 THEN FAILED("CASE B3 : H NOT EVALUATED (C-B+1)*" & "(E-D+1) TIMES"); END IF; IF CNTR(I) /= 4 THEN FAILED("CASE B3 : I NOT EVALUATED (C-B+1)*" & "(E-D+1) TIMES"); END IF; IF CNTR(J) /= 0 THEN FAILED("CASE B3 : J NOT EVALUATED ZERO TIMES"); END IF; EXCEPTION WHEN OTHERS => FAILED("CASE B3 : EXECEPTION RAISED"); END CASE_B3; CASE_B4 : DECLARE B4 : ARRAY(2 .. 3, 1 .. 2) OF T1(2 .. 1, 1 .. 2); BEGIN CNTR := (CHOICE_INDEX => 0); B4 := (CALC(B,2) .. CALC(C,3) => (CALC(D,1) .. CALC(E,2) => (CALC(F,2) .. CALC(G,1) => (CALC(H,1) .. CALC(I,2) => CALC(J,2))))); IF CNTR(F) /= 4 THEN FAILED("CASE B4 : F NOT EVALUATED (C-B+1)*" & "(E-D+1) TIMES"); END IF; IF CNTR(G) /= 4 THEN FAILED("CASE B4 : G NOT EVALUATED (C-B+1)*" & "(E-D+1) TIMES"); END IF; IF CNTR(H) /= 4 THEN FAILED("CASE B4 : H NOT EVALUATED (C-B+1)*" & "(E-D+1) TIMES"); END IF; IF CNTR(I) /= 4 THEN FAILED("CASE B4 : I NOT EVALUATED (C-B+1)*" & "(E-D+1) TIMES"); END IF; IF CNTR(J) /= 0 THEN FAILED("CASE B4 : J NOT EVALUATED ZERO TIMES"); END IF; EXCEPTION WHEN OTHERS => FAILED("CASE B4 : EXECEPTION RAISED"); END CASE_B4; END CASE_B; END; RESULT; END C43208B;
src/Model/Quantification.agda
JLimperg/msc-thesis-code
5
7762
<filename>src/Model/Quantification.agda<gh_stars>1-10 {-# OPTIONS --without-K #-} module Model.Quantification where open import Model.RGraph as RG using (RGraph) open import Model.Size as MS using (_<_ ; ⟦_⟧Δ ; ⟦_⟧n ; ⟦_⟧σ) open import Model.Type.Core open import Source.Size.Substitution.Theory open import Source.Size.Substitution.Universe as SS using (Sub⊢ᵤ) open import Util.HoTT.Equiv open import Util.HoTT.FunctionalExtensionality open import Util.HoTT.HLevel open import Util.Prelude hiding (_∘_) open import Util.Relation.Binary.PropositionalEquality using ( Σ-≡⁺ ; subst-sym-subst ; subst-subst-sym ) import Source.Size as SS import Source.Type as ST open RGraph open RG._⇒_ open SS.Ctx open SS.Sub⊢ᵤ record ⟦∀⟧′ {Δ} n (T : ⟦Type⟧ ⟦ Δ ∙ n ⟧Δ) (δ : Obj ⟦ Δ ⟧Δ) : Set where no-eta-equality field arr : ∀ m (m<n : m < ⟦ n ⟧n .fobj δ) → Obj T (δ , m , m<n) param : ∀ m m<n m′ m′<n → eq T _ (arr m m<n) (arr m′ m′<n) open ⟦∀⟧′ public ⟦∀⟧′Canon : ∀ {Δ} n (T : ⟦Type⟧ ⟦ Δ ∙ n ⟧Δ) (δ : Obj ⟦ Δ ⟧Δ) → Set ⟦∀⟧′Canon n T δ = Σ[ f ∈ (∀ m (m<n : m < ⟦ n ⟧n .fobj δ) → Obj T (δ , m , m<n)) ] (∀ m m<n m′ m′<n → eq T _ (f m m<n) (f m′ m′<n)) ⟦∀⟧′≅⟦∀⟧′Canon : ∀ {Δ n T δ} → ⟦∀⟧′ {Δ} n T δ ≅ ⟦∀⟧′Canon n T δ ⟦∀⟧′≅⟦∀⟧′Canon = record { forth = λ { record { arr = x ; param = y } → x , y } ; isIso = record { back = λ x → record { arr = proj₁ x ; param = proj₂ x } ; back∘forth = λ { record {} → refl } ; forth∘back = λ _ → refl } } abstract ⟦∀⟧′Canon-IsSet : ∀ {Δ n T δ} → IsSet (⟦∀⟧′Canon {Δ} n T δ) ⟦∀⟧′Canon-IsSet {T = T} = Σ-IsSet (∀-IsSet λ m → ∀-IsSet λ m<n → λ _ _ → T .Obj-IsSet _ _) (λ f → IsOfHLevel-suc 1 (∀-IsProp λ m → ∀-IsProp λ m<n → ∀-IsProp λ m′ → ∀-IsProp λ m′<n → T .eq-IsProp)) ⟦∀⟧′-IsSet : ∀ {Δ n T δ} → IsSet (⟦∀⟧′ {Δ} n T δ) ⟦∀⟧′-IsSet {Δ} {n} {T} {δ} = ≅-pres-IsOfHLevel 2 (≅-sym ⟦∀⟧′≅⟦∀⟧′Canon) (⟦∀⟧′Canon-IsSet {Δ} {n} {T} {δ}) ⟦∀⟧′-≡⁺ : ∀ {Δ n T δ} (f g : ⟦∀⟧′ {Δ} n T δ) → (∀ m m<n → f .arr m m<n ≡ g .arr m m<n) → f ≡ g ⟦∀⟧′-≡⁺ {T = T} record{} record{} f≈g = ≅-Injective ⟦∀⟧′≅⟦∀⟧′Canon (Σ-≡⁺ ( (funext λ m → funext λ m<n → f≈g m m<n) , funext λ m → funext λ m<n → funext λ m′ → funext λ m<n′ → T .eq-IsProp _ _)) ⟦∀⟧′-resp-≈⟦Type⟧ : ∀ {Δ n T U} → T ≈⟦Type⟧ U → ∀ {δ} → ⟦∀⟧′ {Δ} n T δ ≅ ⟦∀⟧′ n U δ ⟦∀⟧′-resp-≈⟦Type⟧ T≈U = record { forth = λ f → record { arr = λ m m<n → T≈U .forth .fobj (f .arr m m<n) ; param = λ m m<n m′ m′<n → T≈U .forth .feq _ (f .param m m<n m′ m′<n) } ; isIso = record { back = λ f → record { arr = λ m m<n → T≈U .back .fobj (f .arr m m<n) ; param = λ m m<n m′ m′<n → T≈U .back .feq _ (f .param m m<n m′ m′<n) } ; back∘forth = λ x → ⟦∀⟧′-≡⁺ _ _ λ m m<n → T≈U .back-forth .≈⁻ _ _ ; forth∘back = λ x → ⟦∀⟧′-≡⁺ _ _ λ m m<n → T≈U .forth-back .≈⁻ _ _ } } ⟦∀⟧ : ∀ {Δ} n (T : ⟦Type⟧ ⟦ Δ ∙ n ⟧Δ) → ⟦Type⟧ ⟦ Δ ⟧Δ ⟦∀⟧ n T = record { ObjHSet = λ δ → HLevel⁺ (⟦∀⟧′ n T δ) ⟦∀⟧′-IsSet ; eqHProp = λ _ f g → ∀-HProp _ λ m → ∀-HProp _ λ m<n → ∀-HProp _ λ m′ → ∀-HProp _ λ m′<n → T .eqHProp _ (f .arr m m<n) (g .arr m′ m′<n) ; eq-refl = λ f → f .param } ⟦∀⟧-resp-≈⟦Type⟧ : ∀ {Δ} n {T U : ⟦Type⟧ ⟦ Δ ∙ n ⟧Δ} → T ≈⟦Type⟧ U → ⟦∀⟧ n T ≈⟦Type⟧ ⟦∀⟧ n U ⟦∀⟧-resp-≈⟦Type⟧ n T≈U = record { forth = record { fobj = ⟦∀⟧′-resp-≈⟦Type⟧ T≈U .forth ; feq = λ δ≈δ′ x≈y a a₁ a₂ a₃ → T≈U .forth .feq _ (x≈y a a₁ a₂ a₃) } ; back = record { fobj = ⟦∀⟧′-resp-≈⟦Type⟧ T≈U .back ; feq = λ δ≈δ′ x≈y a a₁ a₂ a₃ → T≈U .back .feq _ (x≈y a a₁ a₂ a₃) } ; back-forth = ≈⁺ λ δ x → ⟦∀⟧′-resp-≈⟦Type⟧ T≈U .back∘forth _ ; forth-back = ≈⁺ λ δ x → ⟦∀⟧′-resp-≈⟦Type⟧ T≈U .forth∘back _ } absₛ : ∀ {Δ n} {Γ : ⟦Type⟧ ⟦ Δ ⟧Δ} {T : ⟦Type⟧ ⟦ Δ ∙ n ⟧Δ} → subT ⟦ SS.Wk ⟧σ Γ ⇒ T → Γ ⇒ ⟦∀⟧ n T absₛ {Δ} {n} {Γ} {T} f = record { fobj = λ {δ} x → record { arr = λ m m<n → f .fobj x ; param = λ m m<n m′ m′<n → f .feq _ (Γ .eq-refl x) } ; feq = λ _ x≈y m m′ m<nγ m′<nγ′ → f .feq _ x≈y } appₛ : ∀ {Δ n m} {Γ : ⟦Type⟧ ⟦ Δ ⟧Δ} {T : ⟦Type⟧ ⟦ Δ ∙ n ⟧Δ} → (m<n : m SS.< n) → Γ ⇒ ⟦∀⟧ n T → Γ ⇒ subT ⟦ SS.Sing m<n ⟧σ T appₛ {m = m} {T = T} m<n f = record { fobj = λ {δ} x → f .fobj x .arr (⟦ m ⟧n .fobj δ) (MS.⟦<⟧ m<n) ; feq = λ δ≈δ′ {x y} x≈y → f .feq _ x≈y _ _ _ _ } subT-⟦∀⟧ : ∀ {Δ Ω n σ} (⊢σ : σ ∶ Δ ⇒ᵤ Ω) (T : ⟦Type⟧ ⟦ Ω ∙ n ⟧Δ) → ⟦∀⟧ (n [ σ ]ᵤ) (subT (⟦_⟧σ {Ω = Ω ∙ n} (Lift ⊢σ refl)) T) ≈⟦Type⟧ subT ⟦ ⊢σ ⟧σ (⟦∀⟧ n T) subT-⟦∀⟧ {Δ} {Ω} {n} {σ} ⊢σ T = record { forth = record { fobj = λ {γ} f → record { arr = λ m m<n → transportObj T (MS.⟦Δ∙n⟧-≡⁺ Ω n _ _ refl refl) (f .arr m (subst (m <_) (sym (MS.⟦sub⟧ ⊢σ n)) m<n)) ; param = λ m m<n m′ m′<n → transportObj-resp-eq T _ _ (f .param _ _ _ _) } ; feq = λ γ≈γ′ f≈g a a₁ a₂ a₃ → transportObj-resp-eq T _ _ (f≈g _ _ _ _) } ; back = record { fobj = λ {γ} f → record { arr = λ m m<n → transportObj T (MS.⟦Δ∙n⟧-≡⁺ Ω n _ _ refl refl) (f .arr m (subst (m <_) (MS.⟦sub⟧ ⊢σ n) m<n)) ; param = λ m m<n m′ m′<n → transportObj-resp-eq T _ _ (f .param _ _ _ _) } ; feq = λ γ≈γ′ f≈g a a₁ a₂ a₃ → transportObj-resp-eq T _ _ (f≈g _ _ _ _) } ; back-forth = ≈⁺ λ γ f → ⟦∀⟧′-≡⁺ _ _ λ m m<n → trans (transportObj∘transportObj T (MS.⟦Δ∙n⟧-≡⁺ Ω n _ _ refl refl) (MS.⟦Δ∙n⟧-≡⁺ Ω n _ _ refl refl)) (trans (cong (λ p → transportObj T (trans (MS.⟦Δ∙n⟧-≡⁺ Ω n (subst (m <_) (MS.⟦sub⟧ ⊢σ n) p) (subst (m <_) (MS.⟦sub⟧ ⊢σ n) m<n) refl refl) (MS.⟦Δ∙n⟧-≡⁺ Ω n (subst (m <_) (MS.⟦sub⟧ ⊢σ n) m<n) (subst (m <_) (MS.⟦sub⟧ ⊢σ n) m<n) refl refl)) (f .arr m p)) (subst-sym-subst (MS.⟦sub⟧ ⊢σ n))) (transportObj-refl T _)) ; forth-back = ≈⁺ λ γ f → ⟦∀⟧′-≡⁺ _ _ λ m m<n → trans (transportObj∘transportObj T (MS.⟦Δ∙n⟧-≡⁺ Ω n _ _ refl refl) (MS.⟦Δ∙n⟧-≡⁺ Ω n _ _ refl refl)) (trans (cong (λ p → transportObj T (trans (MS.⟦Δ∙n⟧-≡⁺ Ω n p p refl refl) (MS.⟦Δ∙n⟧-≡⁺ Ω n p m<n refl refl)) (f .arr m p)) (subst-subst-sym (MS.⟦sub⟧ ⊢σ n))) (transportObj-refl T _)) }
courses/fundamentals_of_ada/labs/prompts/040_statements/main.adb
AdaCore/training_material
15
29969
<filename>courses/fundamentals_of_ada/labs/prompts/040_statements/main.adb with Ada.Text_IO; use Ada.Text_IO; procedure Main is type Days_Of_Week_T is (Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday); type Hours_Worked is digits 6; Total_Worked : Hours_Worked := 0.0; Hours_Today : Hours_Worked; Overtime : Hours_Worked; begin -- For each day in the Days_Of_Week_T loop -- Print prompt indicating which day we're asking for -- Loop "forever" Hours_Today := Hours_Worked'value (Get_Line); -- exit the main loop if hours worked < 0 if Hours_Today > 24.0 then Put_Line ("I don't believe you"); else -- exit the input loop if a reasonable number is reached null; end if; -- if hours worked > 8 then Overtime := Hours_Today - 8.0; Hours_Today := Hours_Today + 1.5 * Overtime; -- Calculate actual hours paid for based on day of the week -- Monday - Friday, just add hours worked -- Saturday - hours worked * 1.5 -- Sunday - hours worked * 2 Put_Line (Hours_Worked'image (Total_Worked)); end Main;
TurtleTools/Examples/data_ram_test.asm
foxostro/TurtleTTL
1
20892
<reponame>foxostro/TurtleTTL LI A, 0 LI U, 0 LI V, 1 LI M, 255 MOV A, M HLT
libsrc/strings/rindex.asm
grancier/z180
8
0
<gh_stars>1-10 ; CALLER linkage for function pointers SECTION code_clib PUBLIC rindex PUBLIC _rindex EXTERN strrchr_callee EXTERN ASMDISP_STRRCHR_CALLEE .rindex ._rindex pop hl pop bc pop de push de push bc push hl jp strrchr_callee + ASMDISP_STRRCHR_CALLEE
alloy4fun_models/trashltl/models/19/Bj6c38YrZLQqhCLw3.als
Kaixi26/org.alloytools.alloy
0
1828
open main pred idBj6c38YrZLQqhCLw3_prop20 { always (all f:File | f in Trash since (f not in Protected) ) } pred __repair { idBj6c38YrZLQqhCLw3_prop20 } check __repair { idBj6c38YrZLQqhCLw3_prop20 <=> prop20o }
engine/graphics-text.asm
richard42/dynosprite
10
17429
<filename>engine/graphics-text.asm ********************************************************************************* * DynoSprite - graphics-text.asm * Copyright (c) 2013, <NAME> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * 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. ********************************************************************************* *********************************************************** * Gfx_DrawTextLine: * * - IN: A=Y coordinate in rows (0-199) * B=X coordinate in bytes (pixel pairs, 0-159) * X=pointer to NULL-terminated string * U=color (4 bits) * - OUT: N/A * - Trashed: A,B,X,Y,U *********************************************************** * Gfx_DrawTextLine_Back pshs x jsr Gfx_GetPixelAddress_Back * start by getting starting memory location bra MapScreenWindow@ Gfx_DrawTextLine pshs x jsr Gfx_GetPixelAddress_Front * start by getting starting memory location MapScreenWindow@ tfr a,b incb std $FFA3 * map screen buffer to $6000-$9FFF leay $6000,y * Y now points to starting destination byte tfr u,d * color is in 4 low bits of B stb ColorMaskVal@+3 lslb lslb lslb lslb stb ColorMaskVal@+5 orb ColorMaskVal@+3 stb ColorMaskVal@+7 LetterLoop@ puls u ldb ,u+ * get next character bne > * if non-0 character, continue forward rts * otherwise we're done * * Locals ColorMaskVal@ fcb $ff,$00,$f0,$00,$0f,$00,$00,$00 RowCounter@ rmb 1 * ! pshs u subb #$20 * first printable character map is 32 ldx #Gfx_FontData ldu #ColorMaskVal@ lda #13 mul ADD_D_TO_X * X is pointer to 8x13 bitmap for current character lda #13 sta RowCounter@ RowLoop@ lda ,x anda #$c0 beq SkipByte0@ * skip this byte lsla rola rola rola ldb ,y andb a,u inca orb a,u stb ,y SkipByte0@ lda ,x anda #$30 beq SkipByte1@ * skip this byte lsra lsra lsra ldb 1,y andb a,u inca orb a,u stb 1,y SkipByte1@ lda ,x anda #$0c beq SkipByte2@ * skip this byte lsra ldb 2,y andb a,u inca orb a,u stb 2,y SkipByte2@ lda ,x anda #$03 beq SkipByte3@ * skip this byte lsla ldb 3,y andb a,u inca orb a,u ! stb 3,y SkipByte3@ leax 1,x * advance bitmap pointer to next row leay 256,y * advance destination pixel pointer to next line dec RowCounter@ bne RowLoop@ leay -3324,y * move pixel pointer up 13 rows and right 8 pixels (4 bytes) bra LetterLoop@ * do next character in line * font data were generated with: hexdump -e '" fcb " 16/1 "$%02X," "\n"' ~/Desktop/pgcfont.bin > ../font.asm Gfx_FontData fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 fcb $00,$00,$18,$3C,$3C,$3C,$18,$18,$00,$18,$18,$00,$00 fcb $00,$66,$66,$66,$24,$00,$00,$00,$00,$00,$00,$00,$00 fcb $00,$00,$6C,$6C,$FE,$6C,$6C,$6C,$FE,$6C,$6C,$00,$00 fcb $18,$18,$7C,$C6,$C2,$C0,$7C,$06,$86,$C6,$7C,$18,$18 fcb $00,$00,$00,$00,$C2,$C6,$0C,$18,$30,$66,$C6,$00,$00 fcb $00,$00,$38,$6C,$6C,$38,$76,$DC,$CC,$CC,$76,$00,$00 fcb $00,$30,$30,$30,$60,$00,$00,$00,$00,$00,$00,$00,$00 fcb $00,$00,$0C,$18,$30,$30,$30,$30,$30,$18,$0C,$00,$00 fcb $00,$00,$30,$18,$0C,$0C,$0C,$0C,$0C,$18,$30,$00,$00 fcb $00,$00,$00,$00,$66,$3C,$FF,$3C,$66,$00,$00,$00,$00 fcb $00,$00,$00,$00,$18,$18,$7E,$18,$18,$00,$00,$00,$00 fcb $00,$00,$00,$00,$00,$00,$00,$00,$18,$18,$18,$30,$00 fcb $00,$00,$00,$00,$00,$00,$FE,$00,$00,$00,$00,$00,$00 fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$18,$18,$00,$00 fcb $00,$00,$02,$06,$0C,$18,$30,$60,$C0,$80,$00,$00,$00 fcb $00,$00,$7C,$C6,$CE,$DE,$F6,$E6,$C6,$C6,$7C,$00,$00 fcb $00,$00,$18,$38,$78,$18,$18,$18,$18,$18,$7E,$00,$00 fcb $00,$00,$7C,$C6,$06,$0C,$18,$30,$60,$C6,$FE,$00,$00 fcb $00,$00,$7C,$C6,$06,$06,$3C,$06,$06,$C6,$7C,$00,$00 fcb $00,$00,$0C,$1C,$3C,$6C,$CC,$FE,$0C,$0C,$1E,$00,$00 fcb $00,$00,$FE,$C0,$C0,$C0,$FC,$06,$06,$C6,$7C,$00,$00 fcb $00,$00,$38,$60,$C0,$C0,$FC,$C6,$C6,$C6,$7C,$00,$00 fcb $00,$00,$FE,$C6,$06,$0C,$18,$30,$30,$30,$30,$00,$00 fcb $00,$00,$7C,$C6,$C6,$C6,$7C,$C6,$C6,$C6,$7C,$00,$00 fcb $00,$00,$7C,$C6,$C6,$C6,$7E,$06,$06,$0C,$78,$00,$00 fcb $00,$00,$00,$18,$18,$00,$00,$00,$18,$18,$00,$00,$00 fcb $00,$00,$00,$18,$18,$00,$00,$00,$18,$18,$30,$00,$00 fcb $00,$00,$06,$0C,$18,$30,$60,$30,$18,$0C,$06,$00,$00 fcb $00,$00,$00,$00,$00,$7E,$00,$00,$7E,$00,$00,$00,$00 fcb $00,$00,$60,$30,$18,$0C,$06,$0C,$18,$30,$60,$00,$00 fcb $00,$00,$7C,$C6,$C6,$0C,$18,$18,$00,$18,$18,$00,$00 fcb $00,$00,$7C,$C6,$C6,$DE,$DE,$DE,$DC,$C0,$7C,$00,$00 fcb $00,$00,$10,$38,$6C,$C6,$C6,$FE,$C6,$C6,$C6,$00,$00 fcb $00,$00,$FC,$66,$66,$66,$7C,$66,$66,$66,$FC,$00,$00 fcb $00,$00,$3C,$66,$C2,$C0,$C0,$C0,$C2,$66,$3C,$00,$00 fcb $00,$00,$F8,$6C,$66,$66,$66,$66,$66,$6C,$F8,$00,$00 fcb $00,$00,$FE,$66,$62,$68,$78,$68,$62,$66,$FE,$00,$00 fcb $00,$00,$FE,$66,$62,$68,$78,$68,$60,$60,$F0,$00,$00 fcb $00,$00,$3C,$66,$C2,$C0,$C0,$DE,$C6,$66,$3A,$00,$00 fcb $00,$00,$C6,$C6,$C6,$C6,$FE,$C6,$C6,$C6,$C6,$00,$00 fcb $00,$00,$3C,$18,$18,$18,$18,$18,$18,$18,$3C,$00,$00 fcb $00,$00,$1E,$0C,$0C,$0C,$0C,$0C,$CC,$CC,$78,$00,$00 fcb $00,$00,$E6,$66,$6C,$6C,$78,$6C,$6C,$66,$E6,$00,$00 fcb $00,$00,$F0,$60,$60,$60,$60,$60,$62,$66,$FE,$00,$00 fcb $00,$00,$C6,$EE,$FE,$FE,$D6,$C6,$C6,$C6,$C6,$00,$00 fcb $00,$00,$C6,$E6,$F6,$FE,$DE,$CE,$C6,$C6,$C6,$00,$00 fcb $00,$00,$38,$6C,$C6,$C6,$C6,$C6,$C6,$6C,$38,$00,$00 fcb $00,$00,$FC,$66,$66,$66,$7C,$60,$60,$60,$F0,$00,$00 fcb $00,$00,$7C,$C6,$C6,$C6,$C6,$D6,$DE,$7C,$0C,$0E,$00 fcb $00,$00,$FC,$66,$66,$66,$7C,$6C,$66,$66,$E6,$00,$00 fcb $00,$00,$7C,$C6,$C6,$60,$38,$0C,$C6,$C6,$7C,$00,$00 fcb $00,$00,$7E,$7E,$5A,$18,$18,$18,$18,$18,$3C,$00,$00 fcb $00,$00,$C6,$C6,$C6,$C6,$C6,$C6,$C6,$C6,$7C,$00,$00 fcb $00,$00,$C6,$C6,$C6,$C6,$C6,$C6,$6C,$38,$10,$00,$00 fcb $00,$00,$C6,$C6,$C6,$C6,$D6,$D6,$FE,$7C,$6C,$00,$00 fcb $00,$00,$C6,$C6,$6C,$38,$38,$38,$6C,$C6,$C6,$00,$00 fcb $00,$00,$66,$66,$66,$66,$3C,$18,$18,$18,$3C,$00,$00 fcb $00,$00,$FE,$C6,$8C,$18,$30,$60,$C2,$C6,$FE,$00,$00 fcb $00,$00,$3C,$30,$30,$30,$30,$30,$30,$30,$3C,$00,$00 fcb $00,$00,$80,$C0,$E0,$70,$38,$1C,$0E,$06,$02,$00,$00 fcb $00,$00,$3C,$0C,$0C,$0C,$0C,$0C,$0C,$0C,$3C,$00,$00 fcb $10,$38,$6C,$C6,$00,$00,$00,$00,$00,$00,$00,$00,$00 fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$FF fcb $30,$30,$18,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 fcb $00,$00,$00,$00,$00,$78,$0C,$7C,$CC,$CC,$76,$00,$00 fcb $00,$00,$E0,$60,$60,$78,$6C,$66,$66,$66,$7C,$00,$00 fcb $00,$00,$00,$00,$00,$7C,$C6,$C0,$C0,$C6,$7C,$00,$00 fcb $00,$00,$1C,$0C,$0C,$3C,$6C,$CC,$CC,$CC,$76,$00,$00 fcb $00,$00,$00,$00,$00,$7C,$C6,$FE,$C0,$C6,$7C,$00,$00 fcb $00,$00,$38,$6C,$64,$60,$F0,$60,$60,$60,$F0,$00,$00 fcb $00,$00,$00,$00,$00,$76,$CC,$CC,$CC,$7C,$0C,$CC,$78 fcb $00,$00,$E0,$60,$60,$6C,$76,$66,$66,$66,$E6,$00,$00 fcb $00,$00,$18,$18,$00,$38,$18,$18,$18,$18,$3C,$00,$00 fcb $00,$00,$06,$06,$00,$0E,$06,$06,$06,$06,$66,$66,$3C fcb $00,$00,$E0,$60,$60,$66,$6C,$78,$6C,$66,$E6,$00,$00 fcb $00,$00,$38,$18,$18,$18,$18,$18,$18,$18,$3C,$00,$00 fcb $00,$00,$00,$00,$00,$EC,$FE,$D6,$D6,$D6,$C6,$00,$00 fcb $00,$00,$00,$00,$00,$DC,$66,$66,$66,$66,$66,$00,$00 fcb $00,$00,$00,$00,$00,$7C,$C6,$C6,$C6,$C6,$7C,$00,$00 fcb $00,$00,$00,$00,$00,$DC,$66,$66,$66,$7C,$60,$60,$F0 fcb $00,$00,$00,$00,$00,$76,$CC,$CC,$CC,$7C,$0C,$0C,$1E fcb $00,$00,$00,$00,$00,$DC,$76,$66,$60,$60,$F0,$00,$00 fcb $00,$00,$00,$00,$00,$7C,$C6,$70,$1C,$C6,$7C,$00,$00 fcb $00,$00,$10,$30,$30,$FC,$30,$30,$30,$36,$1C,$00,$00 fcb $00,$00,$00,$00,$00,$CC,$CC,$CC,$CC,$CC,$76,$00,$00 fcb $00,$00,$00,$00,$00,$66,$66,$66,$66,$3C,$18,$00,$00 fcb $00,$00,$00,$00,$00,$C6,$C6,$D6,$D6,$FE,$6C,$00,$00 fcb $00,$00,$00,$00,$00,$C6,$6C,$38,$38,$6C,$C6,$00,$00 fcb $00,$00,$00,$00,$00,$C6,$C6,$C6,$C6,$7E,$06,$0C,$F8 fcb $00,$00,$00,$00,$00,$FE,$CC,$18,$30,$66,$FE,$00,$00 fcb $00,$00,$0E,$18,$18,$18,$70,$18,$18,$18,$0E,$00,$00 fcb $00,$00,$18,$18,$18,$18,$00,$18,$18,$18,$18,$00,$00 fcb $00,$00,$70,$18,$18,$18,$0E,$18,$18,$18,$70,$00,$00 fcb $00,$00,$76,$DC,$00,$00,$00,$00,$00,$00,$00,$00,$00 fcb $00,$00,$00,$00,$10,$38,$6C,$C6,$C6,$FE,$00,$00,$00
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_435.asm
ljhsiun2/medusa
9
84952
<reponame>ljhsiun2/medusa .global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r13 push %r14 push %r8 push %r9 push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0x8ab1, %r14 nop nop nop nop nop inc %r12 movb (%r14), %r8b cmp %rdx, %rdx lea addresses_WC_ht+0x14a61, %r11 nop nop nop nop nop inc %r13 movw $0x6162, (%r11) nop nop nop nop nop cmp $62224, %r9 lea addresses_WC_ht+0x1ab81, %r9 nop nop dec %rdx movups (%r9), %xmm6 vpextrq $1, %xmm6, %r12 add $26576, %r12 lea addresses_A_ht+0x5d31, %rsi lea addresses_D_ht+0xeecd, %rdi xor %r14, %r14 mov $56, %rcx rep movsw nop nop nop nop nop and %r11, %r11 lea addresses_A_ht+0x45a1, %rsi lea addresses_D_ht+0xe21, %rdi clflush (%rsi) nop nop add $57720, %r12 mov $86, %rcx rep movsb nop nop nop nop nop sub $61623, %r14 pop %rsi pop %rdx pop %rdi pop %rcx pop %r9 pop %r8 pop %r14 pop %r13 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r14 push %rax push %rbx push %rdi push %rdx // Store lea addresses_normal+0x18d21, %r13 nop nop nop nop nop dec %r12 movb $0x51, (%r13) and %rax, %rax // Store lea addresses_WT+0x1f4e1, %rbx nop cmp $22753, %rdx movw $0x5152, (%rbx) nop nop nop nop nop xor $17958, %rdi // Store lea addresses_RW+0x1f369, %rdx nop nop nop nop xor $16822, %r13 movb $0x51, (%rdx) nop nop add %r14, %r14 // Store lea addresses_D+0x1a666, %rdi nop nop nop nop nop and %rax, %rax mov $0x5152535455565758, %r14 movq %r14, %xmm0 vmovups %ymm0, (%rdi) nop cmp $28850, %r12 // Load lea addresses_normal+0x16941, %r12 nop nop nop nop sub %rbx, %rbx movups (%r12), %xmm0 vpextrq $0, %xmm0, %rdi nop nop nop nop nop and $357, %rbx // Store lea addresses_WT+0x15561, %r13 dec %r12 movb $0x51, (%r13) nop nop nop nop nop and %r13, %r13 // Faulty Load lea addresses_D+0x17e61, %r13 nop add %rax, %rax mov (%r13), %r14 lea oracles, %r12 and $0xff, %r14 shlq $12, %r14 mov (%r12,%r14,1), %r14 pop %rdx pop %rdi pop %rbx pop %rax pop %r14 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_D', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_normal', 'size': 1, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_WT', 'size': 2, 'AVXalign': True}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_RW', 'size': 1, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_D', 'size': 32, 'AVXalign': False}} {'src': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_normal', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_WT', 'size': 1, 'AVXalign': False}} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_D', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 10, 'NT': False, 'type': 'addresses_WC_ht', 'size': 2, 'AVXalign': False}} {'src': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_WC_ht', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 2, 'same': False}} {'src': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 6, 'same': True}} {'36': 21829} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
src/BreathOfTheWild/Workarounds/ReshadeCompatibility/patch_ReshadeCompatibility.asm
lilystudent2016/cemu_graphic_packs
1,002
170155
<gh_stars>1000+ [BotW_ReshadeCompatibility_v208] moduleMatches = 0x6267BFD0 ; Prevents the depth buffer being swapped at certain camera angles with one that's only near-field which breaks Reshade effects 0x038A48BC = li r0, 0
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/cd/cd2b11d.ada
best08618/asylo
7
6955
<filename>gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/cd/cd2b11d.ada -- CD2B11D.ADA -- Grant of Unlimited Rights -- -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained -- unlimited rights in the software and documentation contained herein. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- OBJECTIVE: -- CHECK THAT THE EXPRESSION IN A COLLECTION SIZE CLAUSE -- FOR AN ACCESS TYPE NEED NOT BE STATIC. -- HISTORY: -- BCB 09/23/87 CREATED ORIGINAL TEST. -- PWB 05/11/89 CHANGED EXTENSION FROM '.DEP' TO '.ADA'. WITH REPORT; USE REPORT; PROCEDURE CD2B11D IS TYPE CHECK_TYPE IS ACCESS INTEGER; FOR CHECK_TYPE'STORAGE_SIZE USE 256; TYPE ACC_TYPE IS ACCESS INTEGER; FOR ACC_TYPE'STORAGE_SIZE USE IDENT_INT (256); BEGIN TEST ("CD2B11D", "CHECK THAT THE EXPRESSION IN A COLLECTION " & "SIZE SPECIFICATION FOR AN ACCESS TYPE "& "NEED NOT BE STATIC"); IF ACC_TYPE'STORAGE_SIZE < IDENT_INT (256) THEN FAILED ("INCORRECT VALUE FOR STORAGE_SIZE"); END IF; RESULT; END CD2B11D;
scripts/osetup_3.applescript
teake/shimmering-obsidian
0
2228
<reponame>teake/shimmering-obsidian<filename>scripts/osetup_3.applescript #!/usr/bin/env osascript # restart Obsidian tell application "Obsidian" to if it is running then quit delay 1 repeat until application "Obsidian" is not running delay 0.5 end repeat delay 4 # dump metadata set vaultName to (system attribute "vault_name_ENC") set prefix to "obsidian://advanced-uri?vault=" & vaultName & "&commandid=metadata-extractor%253A" tell application "Obsidian" activate delay 1 open location (prefix & "write-metadata-json") delay 0.5 open location (prefix & "write-tags-json") delay 0.5 open location (prefix & "write-allExceptMd-json") end tell
EngineHacks/Gambit/GambitEffectMap/FillAOEMapFucs/Func4_FireArrows.asm
MokhaLeee/Gambit-ThreeHouses-Style-AOE-Attack
5
7790
<reponame>MokhaLeee/Gambit-ThreeHouses-Style-AOE-Attack @ 1 @ 1 @ 1 @ 1 .thumb .include "../../../../_FuncLib/_Definitions.h.s" .include "../../../../_FuncLib/MokhaRAMSpace.s" .include "_definations_ADDMAP.h.s" @(x,y,Direction) Func4_FireArrows: push {r4-r7,lr} mov r4, r0 @Target.x mov r5, r1 @Target.y cmp r2, #4 blt Normal mov r2, #0 Normal: mov r6, r2 @Direction @r0=Direction lsl r0, r6, #2 ldr r1, =jpt_UnitDirection add r0, r1 ldr r0,[r0] bx r0 .ltorg .align jpt_UnitDirection: .word Moveleft+0x8000001 .word Moveright+0x8000001 .word MoveDown+0x8000001 .word Moveup+0x8000001 Moveleft: ldr r0, =gMapMovement ldr r0,[r0] mov r1, #0x1 neg r1, r1 _blh2 ClearMapWith|1 AddMapINLINE 0,0 AddMapINLINE -1,0 AddMapINLINE -2,0 AddMapINLINE -3,0 b TestEnd Moveright: ldr r0, =gMapMovement ldr r0,[r0] mov r1, #0x1 neg r1, r1 _blh2 ClearMapWith|1 AddMapINLINE 0,0 AddMapINLINE 1,0 AddMapINLINE 2,0 AddMapINLINE 3,0 b TestEnd MoveDown: ldr r0, =gMapMovement ldr r0,[r0] mov r1, #0x1 neg r1, r1 _blh2 ClearMapWith|1 AddMapINLINE 0,0 AddMapINLINE 0,1 AddMapINLINE 0,2 AddMapINLINE 0,3 b TestEnd Moveup: ldr r0, =gMapMovement ldr r0,[r0] mov r1, #0x1 neg r1, r1 _blh2 ClearMapWith|1 AddMapINLINE 0,0 AddMapINLINE 0,-1 AddMapINLINE 0,-2 AddMapINLINE 0,-3 b TestEnd TestEnd: pop {r4-r7} pop {r0} bx r0
Module 1/5. LogicalOperators/LogicalOperators.asm
hoangcuongflp/SLAE
47
104803
; LogicalOperators.asm ; By Abatchy ; ; nasm -felf32 LogicalOperators.asm && ld -o LogicalOperators LogicalOperators.o && gdb ./LogicalOperators ; --------------------------------------------------------------------------------------- global _start section .text _start: ; AND mov al, 0x01 and al, 0x02 ; AL = 0, ZF = 1 ; OR mov al, 0x01 or al, 0x02 ; AL = 0x03 ; NOT mov al, 0x01 not al ; AL = 0xfe ; XOR mov al, 0xa ; AL = 1010 xor al, 0x5 ; AL = 0xf ; exit(0) mov eax, 1 mov ebx, 0 int 0x80
mcc_structure_access/main.asm
YaMike/lnx
0
2509
<reponame>YaMike/lnx<filename>mcc_structure_access/main.asm main: file format elf32-littlearc Disassembly of section .init: 00010264 <_init-0x4>: 10264: 00 00 00 00 00010268 <_init>: 10268: f1 c0 push_s blink 1026a: e0 78 nop_s 1026c: d2 08 00 00 bl 1033c <frame_dummy> 10270: 4a 0a 00 00 bl 104b8 <__do_global_ctors_aux> 10274: d1 c0 pop_s blink 10276: e0 7e j_s [blink] Disassembly of section .plt: 00010278 <.plt>: 10278: 00 16 0b 70 01 00 24 26 ld r11,[0x00012624] 10280: 00 16 0a 70 01 00 28 26 ld r10,[0x00012628] 10288: 20 20 80 02 j [r10] 1028c: 20 26 01 00 j [r0] 10290: 30 27 8c 7f 00 00 9c 23 ld r12,[pcl,0x239c] 10298: 20 7c j_s.d [r12] 1029a: ef 74 mov_s r12,pcl 1029c: 30 27 8c 7f 00 00 94 23 ld r12,[pcl,0x2394] 102a4: 20 7c j_s.d [r12] 102a6: ef 74 mov_s r12,pcl Disassembly of section .text: 000102a8 <__start>: 102a8: 4a 23 00 30 mov fp,0 102ac: 00 c1 ld_s r1,[sp,0] 102ae: b8 70 mov_s r5,r0 102b0: 81 c2 add_s r2,sp,4 102b2: cf 70 01 00 78 03 mov_s r0,0x00010378 102b8: cf 73 01 00 68 02 mov_s r3,0x00010268 102be: 0a 24 80 0f 01 00 00 05 mov r4,0x00010500 102c6: 84 24 3f 3e and sp,sp,-8 102ca: 0a 26 00 07 mov r6,sp 102ce: d2 0f cf ff bl 1029c <_init+0x34> 102d2: 07 00 00 00 b 102d6 <_exit_halt> 000102d6 <_exit_halt>: 102d6: 69 20 40 00 flag 1 102da: 4a 26 00 70 nop 102de: 4a 26 00 70 nop 102e2: 4a 26 00 70 nop 102e6: f3 07 cf ff b 102d6 <_exit_halt> 102ea: 4a 26 00 70 nop ... 000102f0 <__do_global_dtors_aux>: 102f0: f1 c0 push_s blink 102f2: fc 1c c8 b6 st.a fp,[sp,-4] 102f6: 0a 23 00 37 mov fp,sp 102fa: 00 16 82 70 01 00 34 26 ldb r2,[0x00012634] 10302: 0b ea breq_s r2,0,10316 <__do_global_dtors_aux+0x26> 10304: 29 00 00 00 b 1032c <__do_global_dtors_aux+0x3c> 10308: 44 6a add_s r2,r2,4 1030a: 00 1e 80 70 01 00 70 25 st r2,[0x00012570] 10312: 22 20 c0 00 jl [r3] 10316: 00 16 02 70 01 00 70 25 ld r2,[0x00012570] 1031e: 60 82 ld_s r3,[r2,0] 10320: f4 eb brne_s r3,0,10308 <__do_global_dtors_aux+0x18> 10322: 01 da mov_s r2,1 10324: 00 1e 82 70 01 00 34 26 stb r2,[0x00012634] 1032c: 04 14 1b 34 ld.ab fp,[sp,4] 10330: 00 14 1f 32 ld.a blink,[sp,0] 10334: e0 7f j_s.d [blink] 10336: 40 24 1c 31 add sp,sp,4 1033a: e0 78 nop_s 0001033c <frame_dummy>: 1033c: f8 1c c8 b6 st.a fp,[sp,-8] 10340: 0a 23 00 37 mov fp,sp 10344: 00 16 02 70 01 00 1c 26 ld r2,[0x0001261c] 1034c: 4b 7a tst_s r2,r2 1034e: 20 00 01 00 bz 1036c <frame_dummy+0x30> 10352: cf 72 00 00 00 00 mov_s r2,0 10358: 4b 7a tst_s r2,r2 1035a: 14 00 01 00 bz 1036c <frame_dummy+0x30> 1035e: cf 70 01 00 1c 26 mov_s r0,0x0001261c 10364: 04 14 1b 34 ld.ab fp,[sp,4] 10368: a1 c0 add_s sp,sp,4 1036a: 00 7a j_s [r2] 1036c: 04 14 1b 34 ld.ab fp,[sp,4] 10370: e0 7f j_s.d [blink] 10372: 40 24 1c 31 add sp,sp,4 10376: e0 78 nop_s 00010378 <main>: 10378: f1 c0 push_s blink 1037a: fc 1c c8 b6 st.a fp,[sp,-4] 1037e: 0a 23 00 37 mov fp,sp 10382: a6 c1 sub_s sp,sp,24 10384: f0 1b 00 b0 st r0,[fp,-16] 10388: ec 1b 40 b0 st r1,[fp,-20] 1038c: cf 72 01 00 38 26 mov_s r2,0x00012638 10392: f4 1b 80 b0 st r2,[fp,-12] 10396: f4 13 02 b0 ld r2,[fp,-12] 1039a: 40 82 ld_s r2,[r2,0] 1039c: cf 70 01 00 18 05 mov_s r0,0x00010518 103a2: 48 71 mov_s r1,r2 103a4: ee 0e cf ff bl 10290 <_init+0x28> 103a8: f4 13 03 b0 ld r3,[fp,-12] 103ac: 01 da mov_s r2,1 103ae: 40 a3 st_s r2,[r3,0] 103b0: f4 13 03 b0 ld r3,[fp,-12] 103b4: 00 da mov_s r2,0 103b6: 41 a3 st_s r2,[r3,4] 103b8: f4 13 03 b0 ld r3,[fp,-12] 103bc: 01 da mov_s r2,1 103be: 42 a3 st_s r2,[r3,8] 103c0: f4 13 03 b0 ld r3,[fp,-12] 103c4: 02 da mov_s r2,2 103c6: 43 a3 st_s r2,[r3,12] 103c8: f4 13 03 b0 ld r3,[fp,-12] 103cc: 03 da mov_s r2,3 103ce: 44 a3 st_s r2,[r3,16] 103d0: f4 13 03 b0 ld r3,[fp,-12] 103d4: 04 da mov_s r2,4 103d6: 45 a3 st_s r2,[r3,20] 103d8: f4 13 03 b0 ld r3,[fp,-12] 103dc: 05 da mov_s r2,5 103de: 46 a3 st_s r2,[r3,24] 103e0: f4 13 03 b0 ld r3,[fp,-12] 103e4: 06 da mov_s r2,6 103e6: 47 a3 st_s r2,[r3,28] 103e8: f4 13 03 b0 ld r3,[fp,-12] 103ec: 07 da mov_s r2,7 103ee: 48 a3 st_s r2,[r3,32] 103f0: f4 13 03 b0 ld r3,[fp,-12] 103f4: 08 da mov_s r2,8 103f6: 49 a3 st_s r2,[r3,36] 103f8: f4 13 03 b0 ld r3,[fp,-12] 103fc: 09 da mov_s r2,9 103fe: 4a a3 st_s r2,[r3,40] 10400: f4 13 02 b0 ld r2,[fp,-12] 10404: 40 82 ld_s r2,[r2,0] 10406: cf 70 01 00 18 05 mov_s r0,0x00010518 1040c: 48 71 mov_s r1,r2 1040e: 86 0e cf ff bl 10290 <_init+0x28> 10412: 00 da mov_s r2,0 10414: f8 1b 80 b0 st r2,[fp,-8] 10418: 2b 00 00 00 b 10442 <main+0xca> 1041c: f8 13 02 b0 ld r2,[fp,-8] 10420: f4 13 03 b0 ld r3,[fp,-12] 10424: 41 6a add_s r2,r2,1 10426: f0 23 82 00 ld.as r2,[r3,r2] 1042a: cf 70 01 00 24 05 mov_s r0,0x00010524 10430: f8 13 01 b0 ld r1,[fp,-8] 10434: 5e 0e cf ff bl 10290 <_init+0x28> 10438: f8 13 02 b0 ld r2,[fp,-8] 1043c: 41 6a add_s r2,r2,1 1043e: f8 1b 80 b0 st r2,[fp,-8] 10442: f8 13 02 b0 ld r2,[fp,-8] 10446: 89 e2 cmp_s r2,9 10448: d4 07 cc ff ble 1041c <main+0xa4> 1044c: 00 da mov_s r2,0 1044e: fc 1b 80 b0 st r2,[fp,-4] 10452: f4 13 02 b0 ld r2,[fp,-12] 10456: 40 82 ld_s r2,[r2,0] 10458: cf 70 01 00 30 05 mov_s r0,0x00010530 1045e: 48 71 mov_s r1,r2 10460: 32 0e cf ff bl 10290 <_init+0x28> 10464: cf 70 01 00 38 26 mov_s r0,0x00012638 1046a: 42 08 00 00 bl 104a8 <set_bit_test> 1046e: fc 1b 00 b0 st r0,[fp,-4] 10472: cf 70 01 00 44 05 mov_s r0,0x00010544 10478: fc 13 01 b0 ld r1,[fp,-4] 1047c: 16 0e cf ff bl 10290 <_init+0x28> 10480: f4 13 02 b0 ld r2,[fp,-12] 10484: 40 82 ld_s r2,[r2,0] 10486: cf 70 01 00 58 05 mov_s r0,0x00010558 1048c: 48 71 mov_s r1,r2 1048e: 06 0e cf ff bl 10290 <_init+0x28> 10492: 00 da mov_s r2,0 10494: 48 70 mov_s r0,r2 10496: a6 c0 add_s sp,sp,24 10498: 04 14 1b 34 ld.ab fp,[sp,4] 1049c: 00 14 1f 32 ld.a blink,[sp,0] 104a0: e0 7f j_s.d [blink] 104a2: 40 24 1c 31 add sp,sp,4 104a6: e0 78 nop_s 000104a8 <set_bit_test>: 104a8: e1 c1 push_s r1 104aa: 20 80 ld_s r1,[r0,0] 104ac: 0a d9 mov_s r1,10 104ae: 20 a0 st_s r1,[r0,0] 104b0: 28 70 mov_s r0,r1 104b2: c1 c1 pop_s r1 104b4: 20 20 c0 07 j [blink] 000104b8 <__do_global_ctors_aux>: 104b8: f1 c0 push_s blink 104ba: f8 1c 48 b3 st.a r13,[sp,-8] 104be: fc 1c c8 b6 st.a fp,[sp,-4] 104c2: 0a 23 00 37 mov fp,sp 104c6: 00 16 02 70 01 00 0c 26 ld r2,[0x0001260c] 104ce: cf 75 01 00 0c 26 mov_s r13,0x0001260c 104d4: 19 0a 80 0f ff ff ff ff breq r2,-1,104ec <__do_global_ctors_aux+0x34> 104dc: 22 20 80 00 jl [r2] 104e0: fc 15 02 92 ld.a r2,[r13,-4] 104e4: f9 0a 81 8f ff ff ff ff brne r2,-1,104dc <__do_global_ctors_aux+0x24> 104ec: 04 14 1b 34 ld.ab fp,[sp,4] 104f0: 02 14 1f 36 ld.as blink,[sp,2] 104f4: 00 c5 ld_s r13,[sp,0] 104f6: e0 7f j_s.d [blink] 104f8: 40 24 1c 33 add sp,sp,12 Disassembly of section .fini: 000104fc <_fini-0x4>: 104fc: 00 00 00 00 00010500 <_fini>: 10500: f1 c0 push_s blink 10502: e0 78 nop_s 10504: ee 0d cf ff bl 102f0 <__do_global_dtors_aux> 10508: d1 c0 pop_s blink 1050a: e0 7e j_s [blink]
test/interaction/KeepPatternVariables.agda
cruhland/agda
1,989
2540
{-# OPTIONS --keep-pattern-variables #-} open import Agda.Builtin.Nat open import Agda.Builtin.Equality test₁ : (m : Nat) → m ≡ 0 → Set test₁ m eq = {!eq!} test₂ : (A B : Set) → A ≡ B → Set test₂ A B eq = {!eq!}
ModelRender/CopyXX15ToXX12.asm
ped7g/EliteNext
9
91810
CopyXX15ToXX12: ld hl,XX15 ld de,XX12 ld bc,6 ldir ret CopyXX15ToXX15Save: ld hl,XX15 ld de,XX15Save ld bc,6 ldir ret CopyXX15SaveToXX15: ld hl,XX15Save ld de,XX15 ld bc,6 ldir ret CopyXX15ToXX15Save2: ld hl,XX15 ld de,XX15Save2 ld bc,6 ldir ret CopyXX15Save2ToXX15: ld hl,XX15Save2 ld de,XX15 ld bc,6 ldir ret
programs/oeis/063/A063957.asm
jmorken/loda
1
165223
; A063957: Numbers not of the form round(m*sqrt(2)) for any integer m, i.e., complement of A022846. ; 2,5,9,12,15,19,22,26,29,32,36,39,43,46,50,53,56,60,63,67,70,73,77,80,84,87,90,94,97,101,104,108,111,114,118,121,125,128,131,135,138,142,145,149,152,155,159,162,166,169,172,176,179,183,186,189,193,196,200,203,207,210,213,217,220,224,227,230,234,237,241,244,248,251,254,258,261,265,268,271,275,278,282,285,289,292,295,299,302,306,309,312,316,319,323,326,329,333,336,340,343,347,350,353,357,360,364,367,370,374,377,381,384,388,391,394,398,401,405,408,411,415,418,422,425,428,432,435,439,442,446,449,452,456,459,463,466,469,473,476,480,483,487,490,493,497,500,504,507,510,514,517,521,524,527,531,534,538,541,545,548,551,555,558,562,565,568,572,575,579,582,586,589,592,596,599,603,606,609,613,616,620,623,627,630,633,637,640,644,647,650,654,657,661,664,667,671,674,678,681,685,688,691,695,698,702,705,708,712,715,719,722,726,729,732,736,739,743,746,749,753,756,760,763,766,770,773,777,780,784,787,790,794,797,801,804,807,811,814,818,821,825,828,831,835,838,842,845,848,852 mov $2,$0 mov $4,$0 lpb $0 add $3,$2 lpb $2 add $0,$3 sub $2,1 lpe lpb $0 sub $0,2 trn $0,$1 add $1,1 lpe lpe lpb $4 add $1,2 sub $4,1 lpe add $1,2
Task/Order-disjoint-list-items/AppleScript/order-disjoint-list-items.applescript
LaudateCorpus1/RosettaCodeData
1
4613
<reponame>LaudateCorpus1/RosettaCodeData -- DISJOINT ORDER ------------------------------------------------------------ -- disjointOrder :: String -> String -> String on disjointOrder(m, n) set {ms, ns} to map(my |words|, {m, n}) unwords(flatten(zip(segments(ms, ns), ns & ""))) end disjointOrder -- segments :: [String] -> [String] -> [String] on segments(ms, ns) script segmentation on |λ|(a, x) set wds to |words| of a if wds contains x then {parts:(parts of a) & ¬ [current of a], current:[], |words|:deleteFirst(x, wds)} ¬ else {parts:(parts of a), current:(current of a) & x, |words|:wds} end if end |λ| end script tell foldl(segmentation, {|words|:ns, parts:[], current:[]}, ms) (parts of it) & [current of it] end tell end segments -- TEST ---------------------------------------------------------------------- on run script order on |λ|(rec) tell rec [its m, its n, my disjointOrder(its m, its n)] end tell end |λ| end script arrowTable(map(order, [¬ {m:"the cat sat on the mat", n:"mat cat"}, ¬ {m:"the cat sat on the mat", n:"cat mat"}, ¬ {m:"A B C A B C A B C", n:"C A C A"}, ¬ {m:"A B C A B D A B E", n:"E A D A"}, ¬ {m:"A B", n:"B"}, {m:"A B", n:"B A"}, ¬ {m:"A B B A", n:"B A"}])) -- the cat sat on the mat -> mat cat -> the mat sat on the cat -- the cat sat on the mat -> cat mat -> the cat sat on the mat -- A B C A B C A B C -> C A C A -> C B A C B A A B C -- A B C A B D A B E -> E A D A -> E B C A B D A B A -- A B -> B -> A B -- A B -> B A -> B A -- A B B A -> B A -> B A B A end run -- GENERIC FUNCTIONS --------------------------------------------------------- -- Formatting test results -- arrowTable :: [[String]] -> String on arrowTable(rows) script leftAligned script width on |λ|(a, b) (length of a) - (length of b) end |λ| end script on |λ|(col) set widest to length of maximumBy(width, col) script padding on |λ|(s) justifyLeft(widest, space, s) end |λ| end script map(padding, col) end |λ| end script script arrows on |λ|(row) intercalate(" -> ", row) end |λ| end script intercalate(linefeed, ¬ map(arrows, ¬ transpose(map(leftAligned, transpose(rows))))) end arrowTable -- concatMap :: (a -> [b]) -> [a] -> [b] on concatMap(f, xs) script append on |λ|(a, b) a & b end |λ| end script foldl(append, {}, map(f, xs)) end concatMap -- deleteBy :: (a -> a -> Bool) -> a -> [a] -> [a] on deleteBy(fnEq, x, xs) if length of xs > 0 then set {h, t} to uncons(xs) if |λ|(x, h) of mReturn(fnEq) then t else {h} & deleteBy(fnEq, x, t) end if else {} end if end deleteBy -- deleteFirst :: a -> [a] -> [a] on deleteFirst(x, xs) script Eq on |λ|(a, b) a = b end |λ| end script deleteBy(Eq, x, xs) end deleteFirst -- flatten :: Tree a -> [a] on flatten(t) if class of t is list then concatMap(my flatten, t) else t end if end flatten -- foldl :: (a -> b -> a) -> a -> [b] -> a on foldl(f, startValue, xs) tell mReturn(f) set v to startValue set lng to length of xs repeat with i from 1 to lng set v to |λ|(v, item i of xs, i, xs) end repeat return v end tell end foldl -- intercalate :: Text -> [Text] -> Text on intercalate(strText, lstText) set {dlm, my text item delimiters} to {my text item delimiters, strText} set strJoined to lstText as text set my text item delimiters to dlm return strJoined end intercalate -- justifyLeft :: Int -> Char -> Text -> Text on justifyLeft(n, cFiller, strText) if n > length of strText then text 1 thru n of (strText & replicate(n, cFiller)) else strText end if end justifyLeft -- map :: (a -> b) -> [a] -> [b] on map(f, xs) tell mReturn(f) set lng to length of xs set lst to {} repeat with i from 1 to lng set end of lst to |λ|(item i of xs, i, xs) end repeat return lst end tell end map -- maximumBy :: (a -> a -> Ordering) -> [a] -> a on maximumBy(f, xs) set cmp to mReturn(f) script max on |λ|(a, b) if a is missing value or cmp's |λ|(a, b) < 0 then b else a end if end |λ| end script foldl(max, missing value, xs) end maximumBy -- minimum :: [a] -> a on minimum(xs) script min on |λ|(a, x) if x < a or a is missing value then x else a end if end |λ| end script foldl(min, missing value, xs) end minimum -- Lift 2nd class handler function into 1st class script wrapper -- mReturn :: Handler -> Script on mReturn(f) if class of f is script then f else script property |λ| : f end script end if end mReturn -- Egyptian multiplication - progressively doubling a list, appending -- stages of doubling to an accumulator where needed for binary -- assembly of a target length -- replicate :: Int -> a -> [a] on replicate(n, a) set out to {} if n < 1 then return out set dbl to {a} repeat while (n > 1) if (n mod 2) > 0 then set out to out & dbl set n to (n div 2) set dbl to (dbl & dbl) end repeat return out & dbl end replicate -- transpose :: [[a]] -> [[a]] on transpose(xss) script column on |λ|(_, iCol) script row on |λ|(xs) item iCol of xs end |λ| end script map(row, xss) end |λ| end script map(column, item 1 of xss) end transpose -- uncons :: [a] -> Maybe (a, [a]) on uncons(xs) if length of xs > 0 then {item 1 of xs, rest of xs} else missing value end if end uncons -- unwords :: [String] -> String on unwords(xs) intercalate(space, xs) end unwords -- words :: String -> [String] on |words|(s) words of s end |words| -- zip :: [a] -> [b] -> [(a, b)] on zip(xs, ys) script pair on |λ|(x, i) [x, item i of ys] end |λ| end script map(pair, items 1 thru minimum([length of xs, length of ys]) of xs) end zip
libsrc/_DEVELOPMENT/arch/zxn/esxdos/c/sccz80/esx_slice_dirent.asm
jpoikela/z88dk
640
7460
<reponame>jpoikela/z88dk<gh_stars>100-1000 ; struct esx_dirent_slice *esx_slice_dirent(struct esx_dirent *) SECTION code_esxdos PUBLIC esx_slice_dirent EXTERN asm_esx_slice_dirent defc esx_slice_dirent = asm_esx_slice_dirent ; SDCC bridge for Classic IF __CLASSIC PUBLIC _esx_slice_dirent defc _esx_slice_dirent = esx_slice_dirent ENDIF
private/windows/media/avi/drawdib.16/dith775a.asm
King0987654/windows2000
17
92555
page ,132 ;----------------------------Module-Header------------------------------; ; Module Name: DITH775.ASM ; ; code to dither 16 or 24 bit DIBs to a 8bit DIB with a fixed palette ; ; NOTES: ; this is a ASM version of the code found in dith775.c ; ;-----------------------------------------------------------------------; ?PLM=1 ?WIN=0 .xlist include cmacro32.inc include windows.inc .list externA __AHINCR externA __AHSHIFT sBegin Data externB _lookup775 ; in look775.h externB _rdith775 ; in dtab775.h externB _gdith775 ; in dtab775.h sEnd Data ; The following structure should be used to access high and low ; words of a DWORD. This means that "word ptr foo[2]" -> "foo.hi". LONG struc lo dw ? hi dw ? LONG ends FARPOINTER struc off dw ? sel dw ? FARPOINTER ends ifndef SEGNAME SEGNAME equ <_TEXT> endif createSeg %SEGNAME, CodeSeg, word, public, CODE sBegin CodeSeg .386 assumes cs,CodeSeg assumes ds,nothing assumes es,nothing ;--------------------------------------------------------------------------; ; ; GET16 - read a RGB555 from the input ; ; INPUT: ; fs:[esi] rgb555 DIB ; ; OUTPUT: ; bx rgb555 ; ;--------------------------------------------------------------------------; GET16 macro col if col and 1 shr ebx,16 ; get pel from last time else mov ebx, dword ptr fs:[esi] ; grab two pels add esi,4 endif endm ;--------------------------------------------------------------------------; ; ; DITH m1, m2, row, col ; ; grab a 16 bit pel and dither it. ; ; m1 and m2 are the magic dither table offsets. ; ; here is the 'C' code we are emulating ; ; w = *((WORD huge *)pbS)++; ; r = (int)((w >> 7) & 0xF8); ; g = (int)((w >> 2) & 0xF8); ; b = (int)((w << 3) & 0xF8); ; ; *pbD++ = (BYTE)lookup775[ rdith775[r + m1] + gdith775[g + m1] + ((b + m2) >> 6) ]; ; ; the 'magic' values vary over a 4x4 block ; ; m1: 1 17 25 41 m2: 2 26 38 62 ; 31 36 7 12 46 54 19 18 ; 20 4 39 23 30 6 58 34 ; 33 28 15 9 50 42 22 14 ; ; ; for a 2x2 dither use the following numbers: ; ; m1: 5 27 m2: 8 40 ; 38 16 56 24 ; ; m1: 1 41 m2: 2 62 ; 33 9 50 14 ; ; NOTE: ; !!! the lookup tables should be BYTEs not INTs !!! ; ; Entry: ; m1, m2 - magic values ; fs:esi - 16bit pel to dither ; ds - data segment ; ; Returns: ; al - dithered pel (rotated into eax) ; ; Uses: ; eax, ebx, edx, ebp, esi, edi, flags ; ; Saves: ; ecx, edi, es,ds,fs,gs,ss ; ;--------------------------------------------------------------------------; DITH16 macro m1, m2, row, col GET16 col mov al, bl ; get blue and al, 1Fh add al, (m2 shr 3) shr al, 3 shr bx, 2 ; get green mov dl, bl and dx, 0F8h shr bx, 5 ; get red and bx, 0F8h add al, _rdith775[bx + m1] mov bl, dl add al, _gdith775[bx + m1] mov bl, al if col and 1 mov al, byte ptr _lookup775[bx] xchg al, ah ror eax,16 ; rotate pixel into eax else mov ah, byte ptr _lookup775[bx] endif endm ;--------------------------------------------------------------------------; ; ; Dither16() ; ; Entry: ; Stack based parameters as described below. ; ; Returns: ; none ; ; Registers Preserved: ; DS,ES,ESI,EDI,EBP ; ;--------------------------------------------------------------------------; assumes ds,Data assumes es,nothing Dither16TJumpTable label dword dd Dither16Scan0 dd Dither16Scan3 dd Dither16Scan2 dd Dither16Scan1 cProc Dither16T,<FAR,PUBLIC,PASCAL>,<> parmD biDst ;--> BITMAPINFO of dest parmD lpDst ;--> to destination bits parmW DstX ;Destination origin - x coordinate parmW DstY ;Destination origin - y coordinate parmW DstXE ;x extent of the BLT parmW DstYE ;y extent of the BLT parmD biSrc ;--> BITMAPINFO of source parmD lpSrc ;--> to source bits parmW SrcX ;Source origin - x coordinate parmW SrcY ;Source origin - y coordinate parmD lpDitherTable ;not used (for 8->4 bit dither) localD SrcWidth ;width of source in bytes localD DstWidth ;width of dest in bytes localD SrcInc localD DstInc cBegin push esi push edi ; push ds ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; We only handle (DstXE % 4) == 0 or 3. If it's == 1 or 2, then we ; round down, because otherwise we'd have to deal with half of a ; dither cell on the end. ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; inc DstXE ; Make the == 3 mod 4 case work and DstXE, not 011b ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; mov eax,16 mov ebx,8 call dither_init ; init all the frame variables jc Dither16Exit ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; movzx ecx, DstYE ; divide by 4 mov ebx, ecx add ecx, 3 ; be sure to round up shr ecx, 2 jz Dither16Exit mov DstYE, cx movzx ecx, DstXE ; divide by 4 shr ecx,2 jz Dither16Exit mov DstXE,cx and ebx, 011b ; Get height mod 4 jmp Dither16TJumpTable[ebx*4] ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; align 4 Dither16OuterLoop: movzx ecx, DstXE align 4 Dither16Scan0: DITH16 1 2 0 0 ; DITH16 1 2 0 0 DITH16 17 26 0 1 ; DITH16 41 62 0 1 DITH16 25 38 0 2 ; DITH16 1 2 0 2 DITH16 41 62 0 3 ; DITH16 41 62 0 3 stos dword ptr es:[edi] dec ecx jnz Dither16Scan0 add esi, SrcInc add edi, DstInc movzx ecx, DstXE align 4 Dither16Scan1: DITH16 31 46 1 0 ; DITH16 33 50 1 0 DITH16 36 54 1 1 ; DITH16 9 14 1 1 DITH16 7 19 1 2 ; DITH16 33 50 1 2 DITH16 12 18 1 3 ; DITH16 9 14 1 3 stos dword ptr es:[edi] dec ecx jnz Dither16Scan1 add esi, SrcInc add edi, DstInc movzx ecx, DstXE align 4 Dither16Scan2: DITH16 20 30 2 0 ; DITH16 1 2 2 0 DITH16 4 6 2 1 ; DITH16 41 62 2 1 DITH16 39 58 2 2 ; DITH16 1 2 2 2 DITH16 23 34 2 3 ; DITH16 41 62 2 3 stos dword ptr es:[edi] dec ecx jnz Dither16Scan2 add esi, SrcInc add edi, DstInc movzx ecx, DstXE align 4 Dither16Scan3: DITH16 33 50 3 0 ; DITH16 33 50 3 0 DITH16 28 42 3 1 ; DITH16 9 14 3 1 DITH16 15 22 3 2 ; DITH16 33 50 3 2 DITH16 9 14 3 3 ; DITH16 9 14 3 3 stos dword ptr es:[edi] dec ecx jnz Dither16Scan3 add esi, SrcInc add edi, DstInc dec DstYE jnz Dither16OuterLoop ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Dither16Exit: xor ax,ax mov fs,ax ; to make KRNL286.EXE and DOSX happy ; pop ds pop edi pop esi cEnd ;--------------------------------------------------------------------------; ; ; Dither16L() - dither using lookup table(s) ; ; using dither matrix: ; ; 0 2 2 4 ; 3 4 0 1 [or possibly 3 3 1 1 -- see which looks better] ; 2 0 4 2 ; 3 3 1 1 ; ; the dither matrix determines which lookup table to use. ; ; Entry: ; Stack based parameters as described below. ; ; Returns: ; none ; ; Registers Preserved: ; DS,ES,ESI,EDI,EBP ; ;--------------------------------------------------------------------------; assumes ds,Data assumes es,nothing FOO macro reg, err if err eq 0 mov reg, ds:[ebx] elseif err eq 1 mov reg, ds:[ebx + edx] elseif err eq 2 mov reg, ds:[ebx + 2*edx] elseif err eq 3 or bh,80h mov reg, ds:[ebx + 2*edx] elseif err eq 4 mov reg, ds:[ebx + 4*edx] else bark endif endm DITH16L macro m1, m2, m3, m4 mov bx, fs:[esi + 4] and bh, ch FOO al, m3 mov bx, fs:[esi + 6] and bh, ch FOO ah, m4 shl eax,16 mov bx, fs:[esi + 0] and bh, ch FOO al, m1 mov bx, fs:[esi + 2] and bh, ch FOO ah, m2 mov dword ptr es:[edi], eax add edi, 4 add esi, 8 endm Dither16LJumpTable label dword dd Dither16lScan0 dd Dither16lScan3 dd Dither16lScan2 dd Dither16lScan1 cProc Dither16L,<FAR,PUBLIC,PASCAL>,<> parmD biDst ;--> BITMAPINFO of dest parmD lpDst ;--> to destination bits parmW DstX ;Destination origin - x coordinate parmW DstY ;Destination origin - y coordinate parmW DstXE ;x extent of the BLT parmW DstYE ;y extent of the BLT parmD biSrc ;--> BITMAPINFO of source parmD lpSrc ;--> to source bits parmW SrcX ;Source origin - x coordinate parmW SrcY ;Source origin - y coordinate parmD lpDitherTable ;196k dither table localD SrcWidth ;width of source in bytes localD DstWidth ;width of dest in bytes localD SrcInc localD DstInc cBegin push esi push edi push ds ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; We only handle (DstXE % 4) == 0 or 3. If it's == 1 or 2, then we ; round down, because otherwise we'd have to deal with half of a ; dither cell on the end. ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; inc DstXE ; Make the == 3 mod 4 case work and DstXE, not 011b ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; mov eax,16 mov ebx,8 call dither_init ; init all the frame variables jc Dither16lExit ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; movzx ecx, DstYE ; divide by 4 mov ebx, ecx add ecx, 3 ; be sure to round up shr ecx, 2 jz Dither16lExit mov DstYE, cx movzx ecx, DstXE ; divide by 4 shr ecx,2 jz Dither16lExit mov DstXE,cx mov ds, lpDitherTable.sel ; DS --> dither table mov ax, ds add ax, __AHINCR mov gs, ax xor ebx, ebx mov edx, 32768 mov ch,7Fh and ebx, 011b ; Get height mod 4 jmp Dither16LJumpTable[ebx*4] ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; align 4 Dither16lOuterLoop: mov cl, byte ptr DstXE align 4 Dither16lScan0: DITH16L 0 2 2 4 dec cl jnz short Dither16lScan0 add esi, SrcInc add edi, DstInc mov cl, byte ptr DstXE align 4 Dither16lScan1: DITH16L 3 4 0 1 dec cl jnz short Dither16lScan1 add esi, SrcInc add edi, DstInc mov cl, byte ptr DstXE align 4 Dither16lScan2: DITH16L 2 0 4 2 dec cl jnz short Dither16lScan2 add esi, SrcInc add edi, DstInc mov cl, byte ptr DstXE align 4 Dither16lScan3: DITH16L 3 3 1 1 dec cl jnz short Dither16lScan3 add esi, SrcInc add edi, DstInc dec DstYE jnz Dither16lOuterLoop ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Dither16lExit: xor ax,ax mov fs,ax ; to make KRNL286.EXE and DOSX happy mov gs,ax pop ds pop edi pop esi cEnd ;--------------------------------------------------------------------------; ; ; Dither16S() - dither using scale table(s) ; ; pel8 = lookup[scale[rgb555] + error] ; ; using error matrix: ; ; 0 3283 4924 8207 ; 6565 6566 1641 1642 ; 3283 0 8207 4924 ; 6566 4925 3282 1641 ; ; Entry: ; Stack based parameters as described below. ; ; Returns: ; none ; ; Registers Preserved: ; DS,ES,ESI,EDI,EBP ; ;--------------------------------------------------------------------------; assumes ds,Data assumes es,nothing DITH16S macro m1, m2, m3, m4 mov ebx, fs:[esi + 4] ; grab rgb555 add bx, bx mov bx, ds:[bx] ; scale it mov al, gs:[bx + m3] ; dither it with error shr ebx,16 ; mov bx, fs:[esi + 6] ; grab rgb555 add bx, bx mov bx, ds:[bx] ; scale it mov ah, gs:[bx + m4] ; dither it with error shl eax,16 mov ebx, fs:[esi + 0] ; grab rgb555 add bx, bx mov bx, ds:[bx] ; scale it mov al, gs:[bx + m1] ; dither it with error shr ebx,16 ; mov bx, fs:[esi + 2] ; grab rgb555 add bx, bx mov bx, ds:[bx] ; scale it mov ah, gs:[bx + m2] ; dither it with error mov dword ptr es:[edi], eax add edi, 4 add esi, 8 endm Dither16SJumpTable label dword dd Dither16sScan0 dd Dither16sScan3 dd Dither16sScan2 dd Dither16sScan1 cProc Dither16S,<FAR,PUBLIC,PASCAL>,<> parmD biDst ;--> BITMAPINFO of dest parmD lpDst ;--> to destination bits parmW DstX ;Destination origin - x coordinate parmW DstY ;Destination origin - y coordinate parmW DstXE ;x extent of the BLT parmW DstYE ;y extent of the BLT parmD biSrc ;--> BITMAPINFO of source parmD lpSrc ;--> to source bits parmW SrcX ;Source origin - x coordinate parmW SrcY ;Source origin - y coordinate parmD lpDitherTable ;196k dither table localD SrcWidth ;width of source in bytes localD DstWidth ;width of dest in bytes localD SrcInc localD DstInc cBegin push esi push edi push ds ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; align everything on four pixel boundries, we realy should ; not do this but should handle the general case instead, ; but hey we are hackers. ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; inc DstXE ; Make the == 3 mod 4 case work and DstXE, not 011b ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; mov eax,16 mov ebx,8 call dither_init ; init all the frame variables jc Dither16sExit ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; movzx ecx, DstYE ; divide by 4 mov ebx, ecx add ecx, 3 ; be sure to round up shr ecx, 2 jz Dither16sExit mov DstYE, cx movzx ecx, DstXE ; divide by 4 shr ecx,2 jz Dither16sExit mov DstXE,cx mov ds, lpDitherTable.sel ; DS --> dither table mov ax, ds add ax, __AHINCR mov gs, ax and ebx, 011b ; Get height mod 4 jmp Dither16SJumpTable[ebx*4] ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; align 4 Dither16sOuterLoop: movzx ecx, DstXE align 4 Dither16sScan0: DITH16S 0 3283 4924 8207 dec ecx jnz short Dither16sScan0 add esi, SrcInc add edi, DstInc movzx ecx, DstXE align 4 Dither16sScan1: DITH16S 6565 6566 1641 1642 dec ecx jnz short Dither16sScan1 add esi, SrcInc add edi, DstInc movzx ecx, DstXE align 4 Dither16sScan2: DITH16S 3283 0 8207 4924 dec ecx jnz short Dither16sScan2 add esi, SrcInc add edi, DstInc movzx ecx, DstXE align 4 Dither16sScan3: DITH16S 6566 4925 3282 1641 dec ecx jnz short Dither16sScan3 add esi, SrcInc add edi, DstInc dec DstYE jnz Dither16sOuterLoop ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Dither16sExit: xor ax,ax mov fs,ax ; to make KRNL286.EXE and DOSX happy mov gs,ax pop ds pop edi pop esi cEnd ;--------------------------------------------------------------------------; ; ; LODSB32 - get a byte, every four times doing a LODSD ; ;--------------------------------------------------------------------------; LODSB32_N = 0 LODSB32 macro if (LODSB32_N mod 4) eq 0 ;; lods dword ptr ds:[esi] mov eax,dword ptr fs:[esi] add esi,4 else ror eax,8 endif LODSB32_N = LODSB32_N + 1 endm ;--------------------------------------------------------------------------; ; ; Dither24S() - dither using scale table(s) ; ; pel8 = lookup[scale[rgb555] + error] ; ; using error matrix: ; ; 0 3283 4924 8207 ; 6565 6566 1641 1642 ; 3283 0 8207 4924 ; 6566 4925 3282 1641 ; ; Entry: ; Stack based parameters as described below. ; ; Returns: ; none ; ; Registers Preserved: ; DS,ES,ESI,EDI,EBP ; ;--------------------------------------------------------------------------; assumes ds,Data assumes es,nothing GET24 macro LODSB32 ; get BLUE and al,0F8h mov bl,al LODSB32 ; get GREEN mov bh,al shr bh,3 shr ebx,2 LODSB32 ; get RED and al,0F8h or bh,al endm DITH24S macro m1, m2, m3, m4 GET24 ; grab rgb555*2 movzx ebx, word ptr ds:[ebx] ; scale it mov dl, ds:[ebx + m1 + 65536] ; dither it with error GET24 ; grab rgb555*2 movzx ebx, word ptr ds:[ebx] ; scale it mov dh, ds:[ebx + m2 + 65536] ; dither it with error ror edx,16 ; save ax GET24 ; grab rgb555 movzx ebx, word ptr ds:[ebx] ; scale it mov dl, ds:[ebx + m3 + 65536] ; dither it with error GET24 ; grab rgb555 movzx ebx, word ptr ds:[ebx] ; scale it mov dh, ds:[ebx + m4 + 65536] ; dither it with error ror edx,16 ; get eax right mov dword ptr es:[edi], edx ; store four pixels add edi, 4 endm Dither24SJumpTable label dword dd Dither24sScan0 dd Dither24sScan3 dd Dither24sScan2 dd Dither24sScan1 cProc Dither24S,<FAR,PUBLIC,PASCAL>,<> parmD biDst ;--> BITMAPINFO of dest parmD lpDst ;--> to destination bits parmW DstX ;Destination origin - x coordinate parmW DstY ;Destination origin - y coordinate parmW DstXE ;x extent of the BLT parmW DstYE ;y extent of the BLT parmD biSrc ;--> BITMAPINFO of source parmD lpSrc ;--> to source bits parmW SrcX ;Source origin - x coordinate parmW SrcY ;Source origin - y coordinate parmD lpDitherTable ;196k dither table localD SrcWidth ;width of source in bytes localD DstWidth ;width of dest in bytes localD SrcInc localD DstInc cBegin push esi push edi push ds ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; align everything on four pixel boundries, we realy should ; not do this but should handle the general case instead, ; but hey we are hackers. ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; inc DstXE ; Make the == 3 mod 4 case work and DstXE, not 011b ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; mov eax,24 mov ebx,8 call dither_init ; init all the frame variables jc Dither24sExit ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; movzx ecx, DstYE ; divide by 4 mov ebx, ecx add ecx, 3 ; be sure to round up shr ecx, 2 jz Dither24sExit mov DstYE, cx movzx ecx, DstXE ; divide by 4 shr ecx,2 jz Dither24sExit mov DstXE,cx mov ds, lpDitherTable.sel ; DS --> dither table mov ax, ds add ax, __AHINCR mov gs, ax and ebx, 011b ; Get height mod 4 jmp Dither24SJumpTable[ebx*4] ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; align 4 Dither24sOuterLoop: movzx ecx, DstXE align 4 Dither24sScan0: DITH24S 0 3283 4924 8207 dec ecx jnz Dither24sScan0 add esi, SrcInc add edi, DstInc movzx ecx, DstXE align 4 Dither24sScan1: DITH24S 6565 6566 1641 1642 dec ecx jnz Dither24sScan1 add esi, SrcInc add edi, DstInc movzx ecx, DstXE align 4 Dither24sScan2: DITH24S 3283 0 8207 4924 dec ecx jnz Dither24sScan2 add esi, SrcInc add edi, DstInc movzx ecx, DstXE align 4 Dither24sScan3: DITH24S 6566 4925 3282 1641 dec ecx jnz Dither24sScan3 add esi, SrcInc add edi, DstInc dec DstYE jnz Dither24sOuterLoop ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Dither24sExit: xor ax,ax mov fs,ax ; to make KRNL286.EXE and DOSX happy mov gs,ax pop ds pop edi pop esi cEnd ;--------------------------------------------------------------------------; ; ; Dither32S() - dither using scale table(s) ; ; pel8 = lookup[scale[rgb555] + error] ; ; using error matrix: ; ; 0 3283 4924 8207 ; 6565 6566 1641 1642 ; 3283 0 8207 4924 ; 6566 4925 3282 1641 ; ; Entry: ; Stack based parameters as described below. ; ; Returns: ; none ; ; Registers Preserved: ; DS,ES,ESI,EDI,EBP ; ;--------------------------------------------------------------------------; assumes ds,Data assumes es,nothing GET32 macro if 1 mov bx,fs:[esi+0] ; ebx = ????????????????GGGGGgggBBBBBbbb shr bh,3 ; ebx = 000?????????????000GGGGGBBBBBbbb shr bx,3 ; ebx = 000?????????????000000GGGGGBBBBB mov al,fs:[esi+2] ; eax = ????????????????????????RRRRRrrr and al,0F8h ; eax = ????????????????????????RRRRR000 shr al,1 ; eax = ????????????????????????0RRRRR00 or bh,al ; ebx = 000?????????????0RRRRRGGGGGBBBBB add ebx,ebx ; ebx = 00?????????????0RRRRRGGGGGBBBBB0 add esi,4 else mov eax,fs:[esi] ; eax = RRRRRrrrGGGGGgggBBBBBbbb add esi,2 mov bl,al ; ebx = 00000000????????BBBBBbbb shr eax,8 ; eax = 00000000RRRRRrrrGGGGGggg shr ah,3 ; eax = 00000000000RRRRRGGGGGggg shl ax,5 ; eax = 000000RRRRRGGGGGggg00000 endif endm DITH32S macro m1, m2, m3, m4 GET32 ; grab rgb555*2 mov bx, word ptr ds:[ebx] ; scale it mov dl, ds:[ebx + m1 + 65536] ; dither it with error GET32 ; grab rgb555*2 mov bx, word ptr ds:[ebx] ; scale it mov dh, ds:[ebx + m2 + 65536] ; dither it with error ror edx,16 ; save ax GET32 ; grab rgb555 mov bx, word ptr ds:[ebx] ; scale it mov dl, ds:[ebx + m3 + 65536] ; dither it with error GET32 ; grab rgb555 movzx bx, word ptr ds:[ebx] ; scale it mov dh, ds:[ebx + m4 + 65536] ; dither it with error ror edx,16 ; get eax right mov dword ptr es:[edi], edx ; store four pixels add edi, 4 endm Dither32SJumpTable label dword dd Dither32sScan0 dd Dither32sScan3 dd Dither32sScan2 dd Dither32sScan1 cProc Dither32S,<FAR,PUBLIC,PASCAL>,<> parmD biDst ;--> BITMAPINFO of dest parmD lpDst ;--> to destination bits parmW DstX ;Destination origin - x coordinate parmW DstY ;Destination origin - y coordinate parmW DstXE ;x extent of the BLT parmW DstYE ;y extent of the BLT parmD biSrc ;--> BITMAPINFO of source parmD lpSrc ;--> to source bits parmW SrcX ;Source origin - x coordinate parmW SrcY ;Source origin - y coordinate parmD lpDitherTable ;196k dither table localD SrcWidth ;width of source in bytes localD DstWidth ;width of dest in bytes localD SrcInc localD DstInc cBegin push esi push edi push ds ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; align everything on four pixel boundries, we realy should ; not do this but should handle the general case instead, ; but hey we are hackers. ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; inc DstXE ; Make the == 3 mod 4 case work and DstXE, not 011b ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; mov eax,32 mov ebx,8 call dither_init ; init all the frame variables jc Dither32sExit ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; movzx ecx, DstYE ; divide by 4 mov ebx, ecx add ecx, 3 ; be sure to round up shr ecx, 2 jz Dither32sExit mov DstYE, cx movzx ecx, DstXE ; divide by 4 shr ecx,2 jz Dither32sExit mov DstXE,cx mov ds, lpDitherTable.sel ; DS --> dither table mov ax, ds add ax, __AHINCR mov gs, ax and ebx, 011b ; Get height mod 4 jmp Dither32SJumpTable[ebx*4] ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; align 4 Dither32sOuterLoop: movzx ecx, DstXE align 4 Dither32sScan0: DITH32S 0 3283 4924 8207 dec ecx jnz Dither32sScan0 add esi, SrcInc add edi, DstInc movzx ecx, DstXE align 4 Dither32sScan1: DITH32S 6565 6566 1641 1642 dec ecx jnz Dither32sScan1 add esi, SrcInc add edi, DstInc movzx ecx, DstXE align 4 Dither32sScan2: DITH32S 3283 0 8207 4924 dec ecx jnz Dither32sScan2 add esi, SrcInc add edi, DstInc movzx ecx, DstXE align 4 Dither32sScan3: DITH32S 6566 4925 3282 1641 dec ecx jnz Dither32sScan3 add esi, SrcInc add edi, DstInc dec DstYE jnz Dither32sOuterLoop ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Dither32sExit: xor ax,ax mov fs,ax ; to make KRNL286.EXE and DOSX happy mov gs,ax pop ds pop edi pop esi cEnd ;--------------------------------------------------------------------------; ; ; dither_init ; ; init local frame vars for DitherDIB ; ; ENTRY: ; AX - source bpp ; BX - dest bpp ; ss:bp --> ditherdib frame ; ; EXIT: ; FS:ESI --> source DIB start x,y ; ES:EDI --> dest DIB start x,y ; DS: --> dither tables (in DGROUP) ; ;--------------------------------------------------------------------------; dither_init_error: stc ret dither_init proc near ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; validate the DIBs ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; movzx eax,ax movzx ebx,bx movzx ecx,cx movzx edx,dx movzx edi,di movzx esi,si lfs si, biSrc les di, biDst mov cx, es:[di].biBitCount ; dest must be right cmp cx, bx jne dither_init_error mov cx, fs:[si].biBitCount ; source must be right cmp cx, ax jne dither_init_error dither_init_bit_depth_ok: ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; ; Set up the initial source pointer ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; mov eax,fs:[si].biWidth mul ecx add eax,31 and eax,not 31 shr eax,3 mov SrcWidth,eax mov SrcInc,eax lfs si,lpSrc movzx edx,SrcY mul edx add esi,eax movzx eax,SrcX mul ecx shr eax,3 add esi,eax movzx eax, DstXE ; SrcInc = SrcWidth - DstXE*bits/8 mul ecx shr eax, 3 sub SrcInc, eax ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; ; Set up the initial dest pointer ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; mov cx, es:[di].biBitCount mov eax,es:[di].biWidth mul ecx add eax,31 and eax,not 31 shr eax,3 mov DstWidth,eax mov DstInc,eax cmp es:[edi].biHeight,0 ; init a upside down DIB jge short @f movsx ebx,DstY add ebx,es:[edi].biHeight not ebx mov DstY,bx neg DstWidth neg DstInc @@: les di,lpDst movsx edx,DstY mul edx add edi,eax movsx eax,DstX mul ecx shr eax,3 add edi,eax movzx eax, DstXE ; DstInc = DstWidth - DstXE*bits/8 mul ecx shr eax, 3 sub DstInc, eax ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; dither_init_exit: clc ret dither_init endp sEnd CodeSeg end
libsrc/farz88/incfar.asm
grancier/z180
0
24054
<filename>libsrc/farz88/incfar.asm ; Internal routine to read increment local address HL with far pointer EBC ; 31/3/00 GWL ; Corrupts D via farseg1, but preserves A ; ; $Id: incfar.asm,v 1.4 2016/06/10 22:42:22 dom Exp $ ; SECTION code_clib PUBLIC incfar EXTERN farseg1 .incfar inc hl inc c ret nz inc b jr nz,skiphigh inc e .skiphigh push af call farseg1 pop af ret
Task/Factors-of-an-integer/AppleScript/factors-of-an-integer-2.applescript
LaudateCorpus1/RosettaCodeData
1
2625
{1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 24, 30, 40, 60, 120}
Data/Bits/Order/Reverse.agda
oisdk/agda-playground
6
17334
<gh_stars>1-10 {-# OPTIONS --cubical --safe #-} module Data.Bits.Order.Reverse where open import Prelude open import Data.Bits -- Least significant bit first infix 4 _≲ᴮ_&_ _≲ᴮ_&_ : Bits → Bits → Bool → Bool [] ≲ᴮ ys & true = true [] ≲ᴮ [] & false = false [] ≲ᴮ 0∷ ys & false = true [] ≲ᴮ 1∷ ys & false = true 0∷ xs ≲ᴮ [] & s = false 0∷ xs ≲ᴮ 0∷ ys & s = xs ≲ᴮ ys & s 0∷ xs ≲ᴮ 1∷ ys & s = xs ≲ᴮ ys & true 1∷ xs ≲ᴮ [] & s = false 1∷ xs ≲ᴮ 0∷ ys & s = xs ≲ᴮ ys & false 1∷ xs ≲ᴮ 1∷ ys & s = xs ≲ᴮ ys & s infix 4 _≤ᴮ_ _<ᴮ_ _≤ᴮ_ : Bits → Bits → Bool xs ≤ᴮ ys = xs ≲ᴮ ys & true _<ᴮ_ : Bits → Bits → Bool xs <ᴮ ys = xs ≲ᴮ ys & false infix 4 _≤_ _<_ _≤_ : Bits → Bits → Type xs ≤ ys = T (xs ≤ᴮ ys) _<_ : Bits → Bits → Type xs < ys = T (xs <ᴮ ys)
tests/test-1-functions.64.asm
sporiyano/rgat
381
179159
;basic sanity check with a few external calls global main section .text main: mov rcx, 100 mov rax, 20 mov rbx, 10 xchg rax, rbx dec rcx dec rcx dec rcx dec rcx mov rcx, 1000 call func1 inc eax call func2 dec eax call func3 dec eax call func4 end: ;basic blocks 6-9 xor RCX, RCX ;sequential node 14 ret func1: mov rax, 20 mov rbx, 10 xchg rax, rbx dec rcx mov rcx, 10000 mov rax, 20 mov rbx, 10 xchg rax, rbx dec rcx mov rcx, 10000 mov rax, 20 mov rbx, 10 xchg rax, rbx dec rcx mov rcx, 10000 mov rax, 20 mov rbx, 10 xchg rax, rbx dec rcx mov rcx, 10000 mov rax, 20 mov rbx, 10 xchg rax, rbx dec rcx mov rcx, 10000 mov rax, 20 mov rbx, 10 xchg rax, rbx dec rcx mov rcx, 10000 ret func2: inc rax inc rax inc rax inc rax inc rax inc rax inc rax inc rax inc rax inc rax inc rax inc rax inc rax inc rax inc rax inc rax inc rax inc rax inc rax inc rax inc rax inc rax inc rax inc rax inc rax inc rax inc rax inc rax ret func3: dec rax dec rax dec rax dec rax dec rax dec rax dec rax ret func4: call func2 call func3 dec rax dec rax dec rax dec rax dec rax dec rax dec rax ret
src/commands-topics-issues.ads
GLADORG/glad-cli
0
12092
with AAA.Strings; with CLIC.Subcommand; with CLIC.TTY; package Commands.Topics.Issues is package TT renames CLIC.TTY; type Topic is new CLIC.Subcommand.Help_Topic with null record; overriding function Name (This : Topic) return CLIC.Subcommand.Identifier is ("issues"); overriding function Title (This : Topic) return String is ("Reporting bugs and feature requests and other issues."); overriding function Content (This : Topic) return AAA.Strings.Vector is (AAA.Strings.Empty_Vector.Append ("Please create issues on the Glad-cli project's GitHub page: ") .Append (TT.Url ("https://github.com/GLADORG/glad-cli/issues"))); end Commands.Topics.Issues;
Numeral/Integer/Relation/Divisibility/Proofs.agda
Lolirofle/stuff-in-agda
6
14712
module Numeral.Integer.Relation.Divisibility.Proofs where open import Functional open import Logic.Propositional import Numeral.Natural.Relation.Divisibility as ℕ import Numeral.Natural.Relation.Divisibility.Proofs as ℕ open import Numeral.Natural using (ℕ) import Numeral.Natural.Oper as ℕ open import Numeral.Integer.Oper open import Numeral.Integer.Proofs open import Numeral.Integer.Relation.Divisibility open import Numeral.Integer open import Relator.Equals open import Relator.Equals.Proofs.Equiv open import Structure.Function.Multi open import Structure.Operator.Properties open import Structure.Relator open import Structure.Relator.Properties open import Type instance [∣][−𝐒ₙ]-sub : ((_∣_) on₂ (−𝐒ₙ_)) ⊆₂ ((ℕ._∣_) on₂ ℕ.𝐒) [∣][−𝐒ₙ]-sub = intro id instance [∣][+ₙ]-sub : ((_∣_) on₂ (+ₙ_)) ⊆₂ (ℕ._∣_) [∣][+ₙ]-sub = intro id instance [∣][−ₙ]-sub : ((_∣_) on₂ (−ₙ_)) ⊆₂ (ℕ._∣_) _⊆₂_.proof [∣][−ₙ]-sub {ℕ.𝟎} {ℕ.𝟎} p = p _⊆₂_.proof [∣][−ₙ]-sub {ℕ.𝟎} {ℕ.𝐒 y} p = p _⊆₂_.proof [∣][−ₙ]-sub {ℕ.𝐒 x} {ℕ.𝟎} p = p _⊆₂_.proof [∣][−ₙ]-sub {ℕ.𝐒 x} {ℕ.𝐒 y} p = p instance [∣][−𝐒ₙ]-super : ((_∣_) on₂ (−𝐒ₙ_)) ⊇₂ ((ℕ._∣_) on₂ ℕ.𝐒) [∣][−𝐒ₙ]-super = intro id instance [∣][+ₙ]-super : ((_∣_) on₂ (+ₙ_)) ⊇₂ (ℕ._∣_) [∣][+ₙ]-super = intro id instance [∣][−ₙ]-super : ((_∣_) on₂ (−ₙ_)) ⊇₂ (ℕ._∣_) _⊆₂_.proof [∣][−ₙ]-super {ℕ.𝟎} {ℕ.𝟎} p = p _⊆₂_.proof [∣][−ₙ]-super {ℕ.𝟎} {ℕ.𝐒 y} p = p _⊆₂_.proof [∣][−ₙ]-super {ℕ.𝐒 x} {ℕ.𝟎} p = p _⊆₂_.proof [∣][−ₙ]-super {ℕ.𝐒 x} {ℕ.𝐒 y} p = p divides-with-[−ₙ] : ∀{a b c} → ((absₙ a) ℕ.∣ b) → ((absₙ a) ℕ.∣ c) → (a ∣ (b −ₙ c)) divides-with-[−ₙ] {a} ℕ.Div𝟎 ℕ.Div𝟎 = ℕ.Div𝟎 divides-with-[−ₙ] {a} (ℕ.Div𝐒 ab) ℕ.Div𝟎 = ℕ.Div𝐒 ab divides-with-[−ₙ] {a} ℕ.Div𝟎 (ℕ.Div𝐒 {x = x} ac) with p ← ℕ.divides-with-[+] (reflexivity(ℕ._∣_)) ((super₂((_∣_) on₂ (−ₙ_))(ℕ._∣_) ac)) rewrite absₙ-of-[−ₙ] {x} rewrite absₙ-of-[−ₙ] {absₙ a} rewrite [−ₙ]-antiidentityₗ {absₙ a ℕ.+ x} rewrite absₙ-of-[−ₙ] {absₙ(a) ℕ.+ x} = p divides-with-[−ₙ] {a} (ℕ.Div𝐒 {x = x} ab) (ℕ.Div𝐒 {x = y} ac) rewrite [−ₙ]-on-[+]ₗ-redundancy{absₙ a}{x}{y} = divides-with-[−ₙ] {a} ab ac divides-with-[+] : ∀{a b c} → (a ∣ b) → (a ∣ c) → (a ∣ (b + c)) divides-with-[+] {+ₙ a} {+ₙ b} {+ₙ c} ab ac = ℕ.divides-with-[+] ab ac divides-with-[+] {+ₙ a} {+ₙ b} {−𝐒ₙ c} ab ac = divides-with-[−ₙ] {+ₙ a} ab ac divides-with-[+] {+ₙ a} {−𝐒ₙ b} {+ₙ c} ab ac = divides-with-[−ₙ] {+ₙ a} ac ab divides-with-[+] {+ₙ a} {−𝐒ₙ b} {−𝐒ₙ c} ab ac = ℕ.divides-with-[+] ab ac divides-with-[+] {−𝐒ₙ a} {+ₙ b} {+ₙ c} ab ac = ℕ.divides-with-[+] ab ac divides-with-[+] {−𝐒ₙ a} {+ₙ b} {−𝐒ₙ c} ab ac = divides-with-[−ₙ] {−𝐒ₙ a} ab ac divides-with-[+] {−𝐒ₙ a} {−𝐒ₙ b} {+ₙ c} ab ac = divides-with-[−ₙ] {−𝐒ₙ a} ac ab divides-with-[+] {−𝐒ₙ a} {−𝐒ₙ b} {−𝐒ₙ c} ab ac = ℕ.divides-with-[+] ab ac divides-with-[⋅] : ∀{a b c} → ((a ∣ b) ∨ (a ∣ c)) → (a ∣ (b ⋅ c)) divides-with-[⋅] {a} {b} {c} p = substitute₂ᵣ(ℕ._∣_) {absₙ a} (symmetry(_≡_) (preserving₂(absₙ)(_⋅_)(ℕ._⋅_) {b}{c})) (ℕ.divides-with-[⋅] {absₙ a}{absₙ b}{absₙ c} p)
include/bits_types_sigset_t_h.ads
docandrew/troodon
5
9372
<gh_stars>1-10 pragma Ada_2012; pragma Style_Checks (Off); with Interfaces.C; use Interfaces.C; with bits_types_u_sigset_t_h; package bits_types_sigset_t_h is -- A set of signals to be blocked, unblocked, or waited for. subtype sigset_t is bits_types_u_sigset_t_h.uu_sigset_t; -- /usr/include/bits/types/sigset_t.h:7 end bits_types_sigset_t_h;
prototyping/Examples/Run.agda
FreakingBarbarians/luau
1
8456
<filename>prototyping/Examples/Run.agda {-# OPTIONS --rewriting #-} module Examples.Run where open import Agda.Builtin.Equality using (_≡_; refl) open import Luau.Syntax using (nil; var; _$_; function_⟨_⟩_end; return; _∙_; done) open import Luau.Value using (nil) open import Luau.Run using (run; return) open import Luau.Heap using (emp; lookup-next; next-emp; lookup-next-emp) import Agda.Builtin.Equality.Rewrite {-# REWRITE lookup-next next-emp lookup-next-emp #-} x = var "x" id = var "id" ex1 : (run (function "id" ⟨ "x" ⟩ return x ∙ done end ∙ return (id $ nil) ∙ done) ≡ return nil _) ex1 = refl
Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/s-putima.ads
djamal2727/Main-Bearing-Analytical-Model
0
7996
<filename>Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/s-putima.ads<gh_stars>0 ------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- SYSTEM.PUT_IMAGES -- -- -- -- S p e c -- -- -- -- Copyright (C) 2020, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Ada.Strings.Text_Output; with System.Unsigned_Types; package System.Put_Images with Pure is -- This package contains subprograms that are called by the generated code -- for the 'Put_Image attribute. -- -- For an integer type that fits in Integer, the actual parameter is -- converted to Integer, and Put_Image_Integer is called. For larger types, -- Put_Image_Long_Long_Integer is used. Other numeric types are treated -- similarly. Access values are unchecked-converted to either Thin_Pointer -- or Fat_Pointer, and Put_Image_Thin_Pointer or Put_Image_Fat_Pointer is -- called. The Before/Between/After procedures are called before printing -- the components of a composite type, between pairs of components, and -- after them. See Exp_Put_Image in the compiler for details of these -- calls. pragma Preelaborate; subtype Sink is Ada.Strings.Text_Output.Sink; procedure Put_Image_Integer (S : in out Sink'Class; X : Integer); procedure Put_Image_Long_Long_Integer (S : in out Sink'Class; X : Long_Long_Integer); subtype Unsigned is System.Unsigned_Types.Unsigned; subtype Long_Long_Unsigned is System.Unsigned_Types.Long_Long_Unsigned; procedure Put_Image_Unsigned (S : in out Sink'Class; X : Unsigned); procedure Put_Image_Long_Long_Unsigned (S : in out Sink'Class; X : Long_Long_Unsigned); type Byte is new Character with Alignment => 1; type Byte_String is array (Positive range <>) of Byte with Alignment => 1; type Thin_Pointer is access all Byte with Storage_Size => 0; type Fat_Pointer is access all Byte_String with Storage_Size => 0; procedure Put_Image_Thin_Pointer (S : in out Sink'Class; X : Thin_Pointer); procedure Put_Image_Fat_Pointer (S : in out Sink'Class; X : Fat_Pointer); -- Print "null", or the address of the designated object as an unsigned -- hexadecimal integer. procedure Put_Image_Access_Subp (S : in out Sink'Class; X : Thin_Pointer); -- For access-to-subprogram types procedure Put_Image_Access_Prot_Subp (S : in out Sink'Class; X : Thin_Pointer); -- For access-to-protected-subprogram types procedure Put_Image_String (S : in out Sink'Class; X : String); procedure Put_Image_Wide_String (S : in out Sink'Class; X : Wide_String); procedure Put_Image_Wide_Wide_String (S : in out Sink'Class; X : Wide_Wide_String); procedure Array_Before (S : in out Sink'Class); procedure Array_Between (S : in out Sink'Class); procedure Array_After (S : in out Sink'Class); procedure Simple_Array_Between (S : in out Sink'Class); -- For "simple" arrays, where we don't want a newline between every -- component. procedure Record_Before (S : in out Sink'Class); procedure Record_Between (S : in out Sink'Class); procedure Record_After (S : in out Sink'Class); procedure Put_Arrow (S : in out Sink'Class); procedure Put_Image_Unknown (S : in out Sink'Class; Type_Name : String); -- For Put_Image of types that don't have the attribute, such as type -- Sink. end System.Put_Images;
programs/oeis/128/A128464.asm
karttu/loda
1
84077
; A128464: Numbers that are congruent to {11, 17, 29} mod 30. ; 11,17,29,41,47,59,71,77,89,101,107,119,131,137,149,161,167,179,191,197,209,221,227,239,251,257,269,281,287,299,311,317,329,341,347,359,371,377,389,401,407,419,431,437,449,461,467,479,491,497,509,521,527,539,551,557,569,581,587,599,611,617,629,641,647,659,671,677,689,701,707,719,731,737,749,761,767,779,791,797,809,821,827,839,851,857,869,881,887,899,911,917,929,941,947,959,971,977,989,1001,1007,1019,1031,1037,1049,1061,1067,1079,1091,1097,1109,1121,1127,1139,1151,1157,1169,1181,1187,1199,1211,1217,1229,1241,1247,1259,1271,1277,1289,1301,1307,1319,1331,1337,1349,1361,1367,1379,1391,1397,1409,1421,1427,1439,1451,1457,1469,1481,1487,1499,1511,1517,1529,1541,1547,1559,1571,1577,1589,1601,1607,1619,1631,1637,1649,1661,1667,1679,1691,1697,1709,1721,1727,1739,1751,1757,1769,1781,1787,1799,1811,1817,1829,1841,1847,1859,1871,1877,1889,1901,1907,1919,1931,1937,1949,1961,1967,1979,1991,1997,2009,2021,2027,2039,2051,2057,2069,2081,2087,2099,2111,2117,2129,2141,2147,2159,2171,2177,2189,2201,2207,2219,2231,2237,2249,2261,2267,2279,2291,2297,2309,2321,2327,2339,2351,2357,2369,2381,2387,2399,2411,2417,2429,2441,2447,2459,2471,2477,2489,2501 mul $0,10 mov $1,$0 div $1,6 mul $1,6 add $1,11
test/interaction/Highlighting.agda
pthariensflame/agda
3
809
<filename>test/interaction/Highlighting.agda module Highlighting where Set-one : Set₂ Set-one = Set₁ record R (A : Set) : Set-one where constructor con field X : Set F : Set → Set → Set F A B = B field P : F A X → Set -- highlighting of non-terminating definition Q : F A X → Set Q = Q postulate P : _ open import Highlighting.M data D (A : Set) : Set-one where d : let X = D in X A postulate _+_ _×_ : Set → Set → Set infixl 4 _×_ _+_ -- Issue #2140: the operators should be highlighted also in the -- fixity declaration.
programs/oeis/207/A207361.asm
jmorken/loda
1
178748
; A207361: Displacement under constant discrete unit surge. ; 0,1,11,53,173,448,994,1974,3606,6171,10021,15587,23387,34034,48244,66844,90780,121125,159087,206017,263417,332948,416438,515890,633490,771615,932841,1119951,1335943,1584038,1867688 lpb $0 add $3,$0 sub $0,1 add $4,$3 add $2,$4 add $1,$2 add $4,$3 lpe
Assignment/passwordmanager.ads
vivianjia123/Password-Manager
0
21498
with PIN; with PasswordDatabase; with Ada.Containers; use Ada.Containers; with Ada.Text_IO; use Ada.Text_IO; package PasswordManager with SPARK_Mode is type Information is private; -- Private function returns length of database in Password Manager function StoredDatabaseLength(Manager_Information : in Information) return Ada.Containers.Count_Type; -- Private function returns Master Pin in Password Manager function GetMasterPin(Manager_Information: in Information) return PIN.PIN; -- Private function returns database in Password Manager function GetDatabase(Manager_Information: in Information) return PasswordDatabase.Database; -- Private function returns status of Password Manager function IsLocked(Manager_Information: in Information) return Boolean; -- Inital Password Manager Setup procedure Init(Pin_Input : in String; Manager_Information : out Information) with Pre => (Pin_Input' Length = 4 and (for all I in Pin_Input'Range => Pin_Input(I) >= '0' and Pin_Input(I) <= '9')); -- Gets the current status of the Password Manager function Lock_Status(Manager_Information : in Information) return Boolean; -- Only executes Unlock_Manager if the current state is unlocked procedure Execute_Unlock(Manager_Information : in out Information; Pin_Input : in PIN.PIN); -- Procedure changes state of the Password Manager to Unlocked procedure Unlock_Manager(Manager_Information : in out Information; Pin_Input : in PIN.PIN) with Pre => (IsLocked(Manager_Information)), Post =>(if PIN."="(GetMasterPin(Manager_Information), Pin_Input) then IsLocked(Manager_Information) = False); -- Only executes Lock_Manager if the current state is unlocked procedure Execute_Lock(Manager_Information : in out Information; Pin_Input : in PIN.PIN); -- Procedure changes state of the Password Manager to Locked procedure Lock_Manager(Manager_Information : in out Information; Pin_Input : in PIN.PIN) with Pre => (IsLocked(Manager_Information) = False), Post => PIN."="(GetMasterPin(Manager_Information), Pin_Input) and IsLocked(Manager_Information); -- Only executes Get Command if requirements are met procedure Execute_Get_Command(Manager_Information : in Information; Input_Url : in PasswordDatabase.URL); -- Get Command executed procedure Get_Database(Manager_Information : in Information; Input_Url : in PasswordDatabase.URL) with Pre => (IsLocked(Manager_Information) = False and PasswordDatabase.Has_Password_For (GetDatabase(Manager_Information), Input_Url)); -- Only executes Put Command if requirements are met procedure Execute_Put_Command(Manager_Information : in out Information; Input_Url : in PasswordDatabase.URL; Input_Pwd : in PasswordDatabase.Password); -- Put Command executed procedure Put_Database(Manager_Information : in out Information; Input_Url : in PasswordDatabase.URL; Input_Pwd : in PasswordDatabase.Password) with Pre => (IsLocked(Manager_Information) = False and StoredDatabaseLength(Manager_Information) < PasswordDatabase.Max_Entries); -- Only executes Rem Command if requirements are met procedure Execute_Rem_Command(Manager_Information : in out Information; Input_Url : in PasswordDatabase.URL); -- Rem Command executed procedure Rem_Database(Manager_Information : in out Information; Input_Url : in PasswordDatabase.URL) with Pre => (IsLocked(Manager_Information) = False and PasswordDatabase.Has_Password_For (GetDatabase(Manager_Information), Input_Url)); private -- Password Manager is Record which encapsulates -- Locked status, Master Pin and Master Database type Information is record Is_Locked : Boolean; Master_Pin : PIN.PIN; Master_Database : PasswordDatabase.Database; end record; -- private function declarations function GetMasterPin(Manager_Information: in Information) return PIN.PIN is (Manager_Information.Master_Pin); function StoredDatabaseLength(Manager_Information : in Information) return Ada.Containers.Count_Type is (PasswordDatabase.Length(Manager_Information.Master_Database)); function GetDatabase(Manager_Information: in Information) return PasswordDatabase.Database is (Manager_Information.Master_Database); function IsLocked(Manager_Information: in Information) return Boolean is (Manager_Information.Is_Locked); end PasswordManager;
Source/Kernel/Assembly/InstallGdt.asm
jorgy343/RustyOS
0
24662
[bits 32] global InstallGdt InstallGdt: mov eax,[esp + 4] lgdt [eax] ; Set the segments to use the new GDT. ; Force a far jump to load the cs segment register with our new code segment. jmp 0x08:ProtectedMode ProtectedMode: ; Set all other segments to the data segment descriptor. mov ax,0x10 mov ds,ax mov ss,ax mov es,ax mov fs,ax mov gs,ax ret
testcode/timer1_interrupt.asm
jnidzwetzki/pic
1
13908
; PIC16F628A Configuration Bit Settings ; ASM source line config statements #include "p16F628A.inc" ; CONFIG ; __config 0x3F70 __CONFIG _FOSC_INTOSCIO & _WDTE_OFF & _PWRTE_ON & _MCLRE_ON & _BOREN_ON & _LVP_OFF & _CPD_OFF & _CP_OFF cblock 0x20 w_temp ;0x20 status_temp ;0x21 output_state ;0x22 endc org 0x000 goto prepare ; Interrupt handler org 0x004 goto interrupt_handler toggle_led: incf output_state,f movfw output_state bcf PORTB,0 bcf PORTB,1 bcf PORTB,2 bcf PORTB,3 btfsc output_state,0 bsf PORTB,0 btfsc output_state,1 bsf PORTB,1 btfsc output_state,2 bsf PORTB,2 btfsc output_state,3 bsf PORTB,3 return prepare: movlw b'00000000' movwf PORTB ; Reset all pins on PORTB movwf output_state banksel TRISB movlw b'11110000' movwf TRISB ; 4 Pins on PORTB are outputs banksel T1CON ; Prepare Timer1 movlw b'00000000' movwf TMR1L movwf TMR1H bcf PIR1,TMR1IF movlw b'00100001' ; Prescale 8, internal clock, timer active movwf T1CON ; Enable interrupts banksel PIE1 bsf PIE1,TMR1IE bsf INTCON,PEIE bsf INTCON,GIE banksel RA0 goto main main: goto main interrupt_handler: movwf w_temp ; Save w register swapf STATUS,w ; STATUS -> w bcf STATUS,RP0 ; Switch to bank0 movwf status_temp ; w -> status_temp ; Handle TMR1 Interrupt btfsc PIR1,TMR1IF call tmr1_int ; return from interrupt bcf INTCON, INTF swapf status_temp,w ; Restore status movwf STATUS swapf w_temp,f swapf w_temp,w retfie tmr1_int: call toggle_led bcf PIR1,TMR1IF return ;--------End of All Code Sections --------------------------------------------- end ;End of program code in this file
source/calendar/machine-apple-darwin/s-nareti.ads
ytomino/drake
33
25703
<filename>source/calendar/machine-apple-darwin/s-nareti.ads<gh_stars>10-100 pragma License (Unrestricted); -- implementation unit specialized for Darwin with C.mach.mach_time; with C.stdint; package System.Native_Real_Time is pragma Preelaborate; subtype Native_Time is C.stdint.uint64_t; function To_Native_Time (T : Duration) return Native_Time; function To_Duration (T : Native_Time) return Duration; pragma Pure_Function (To_Native_Time); pragma Pure_Function (To_Duration); pragma Inline (To_Native_Time); pragma Inline (To_Duration); function Clock return Native_Time renames C.mach.mach_time.mach_absolute_time; -- same as Ada.Real_Time subtype Time is Duration; Tick : constant := 1.0 / 1_000_000_000; -- mach_absolute_time returns nano-seconds. -- for delay until procedure Delay_Until (T : Native_Time); -- no hook for Darwin end System.Native_Real_Time;
xv6/stressfs.asm
roneissu/tp2-ronaldo-joaopedro
0
28868
_stressfs: file format elf32-i386 Disassembly of section .text: 00000000 <main>: #include "fs.h" #include "fcntl.h" int main(int argc, char *argv[]) { 0: 8d 4c 24 04 lea 0x4(%esp),%ecx 4: 83 e4 f0 and $0xfffffff0,%esp int fd, i; char path[] = "stressfs0"; 7: b8 30 00 00 00 mov $0x30,%eax #include "fs.h" #include "fcntl.h" int main(int argc, char *argv[]) { c: ff 71 fc pushl -0x4(%ecx) f: 55 push %ebp 10: 89 e5 mov %esp,%ebp 12: 57 push %edi 13: 56 push %esi 14: 53 push %ebx 15: 51 push %ecx int fd, i; char path[] = "stressfs0"; char data[512]; printf(1, "stressfs starting\n"); memset(data, 'a', sizeof(data)); 16: 8d b5 e8 fd ff ff lea -0x218(%ebp),%esi for(i = 0; i < 4; i++) 1c: 31 db xor %ebx,%ebx #include "fs.h" #include "fcntl.h" int main(int argc, char *argv[]) { 1e: 81 ec 20 02 00 00 sub $0x220,%esp int fd, i; char path[] = "stressfs0"; 24: 66 89 85 e6 fd ff ff mov %ax,-0x21a(%ebp) 2b: c7 85 de fd ff ff 73 movl $0x65727473,-0x222(%ebp) 32: 74 72 65 char data[512]; printf(1, "stressfs starting\n"); 35: 68 10 08 00 00 push $0x810 3a: 6a 01 push $0x1 int main(int argc, char *argv[]) { int fd, i; char path[] = "stressfs0"; 3c: c7 85 e2 fd ff ff 73 movl $0x73667373,-0x21e(%ebp) 43: 73 66 73 char data[512]; printf(1, "stressfs starting\n"); 46: e8 a5 04 00 00 call 4f0 <printf> memset(data, 'a', sizeof(data)); 4b: 83 c4 0c add $0xc,%esp 4e: 68 00 02 00 00 push $0x200 53: 6a 61 push $0x61 55: 56 push %esi 56: e8 95 01 00 00 call 1f0 <memset> 5b: 83 c4 10 add $0x10,%esp for(i = 0; i < 4; i++) if(fork() > 0) 5e: e8 17 03 00 00 call 37a <fork> 63: 85 c0 test %eax,%eax 65: 0f 8f bf 00 00 00 jg 12a <main+0x12a> char data[512]; printf(1, "stressfs starting\n"); memset(data, 'a', sizeof(data)); for(i = 0; i < 4; i++) 6b: 83 c3 01 add $0x1,%ebx 6e: 83 fb 04 cmp $0x4,%ebx 71: 75 eb jne 5e <main+0x5e> 73: bf 04 00 00 00 mov $0x4,%edi if(fork() > 0) break; printf(1, "write %d\n", i); 78: 83 ec 04 sub $0x4,%esp 7b: 53 push %ebx 7c: 68 23 08 00 00 push $0x823 path[8] += i; fd = open(path, O_CREATE | O_RDWR); 81: bb 14 00 00 00 mov $0x14,%ebx for(i = 0; i < 4; i++) if(fork() > 0) break; printf(1, "write %d\n", i); 86: 6a 01 push $0x1 88: e8 63 04 00 00 call 4f0 <printf> path[8] += i; 8d: 89 f8 mov %edi,%eax 8f: 00 85 e6 fd ff ff add %al,-0x21a(%ebp) fd = open(path, O_CREATE | O_RDWR); 95: 5f pop %edi 96: 58 pop %eax 97: 8d 85 de fd ff ff lea -0x222(%ebp),%eax 9d: 68 02 02 00 00 push $0x202 a2: 50 push %eax a3: e8 1a 03 00 00 call 3c2 <open> a8: 83 c4 10 add $0x10,%esp ab: 89 c7 mov %eax,%edi ad: 8d 76 00 lea 0x0(%esi),%esi for(i = 0; i < 20; i++) // printf(fd, "%d\n", i); write(fd, data, sizeof(data)); b0: 83 ec 04 sub $0x4,%esp b3: 68 00 02 00 00 push $0x200 b8: 56 push %esi b9: 57 push %edi ba: e8 e3 02 00 00 call 3a2 <write> printf(1, "write %d\n", i); path[8] += i; fd = open(path, O_CREATE | O_RDWR); for(i = 0; i < 20; i++) bf: 83 c4 10 add $0x10,%esp c2: 83 eb 01 sub $0x1,%ebx c5: 75 e9 jne b0 <main+0xb0> // printf(fd, "%d\n", i); write(fd, data, sizeof(data)); close(fd); c7: 83 ec 0c sub $0xc,%esp ca: 57 push %edi cb: e8 da 02 00 00 call 3aa <close> printf(1, "read\n"); d0: 58 pop %eax d1: 5a pop %edx d2: 68 2d 08 00 00 push $0x82d d7: 6a 01 push $0x1 d9: e8 12 04 00 00 call 4f0 <printf> fd = open(path, O_RDONLY); de: 59 pop %ecx df: 8d 85 de fd ff ff lea -0x222(%ebp),%eax e5: 5b pop %ebx e6: 6a 00 push $0x0 e8: 50 push %eax e9: bb 14 00 00 00 mov $0x14,%ebx ee: e8 cf 02 00 00 call 3c2 <open> f3: 83 c4 10 add $0x10,%esp f6: 89 c7 mov %eax,%edi f8: 90 nop f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi for (i = 0; i < 20; i++) read(fd, data, sizeof(data)); 100: 83 ec 04 sub $0x4,%esp 103: 68 00 02 00 00 push $0x200 108: 56 push %esi 109: 57 push %edi 10a: e8 8b 02 00 00 call 39a <read> close(fd); printf(1, "read\n"); fd = open(path, O_RDONLY); for (i = 0; i < 20; i++) 10f: 83 c4 10 add $0x10,%esp 112: 83 eb 01 sub $0x1,%ebx 115: 75 e9 jne 100 <main+0x100> read(fd, data, sizeof(data)); close(fd); 117: 83 ec 0c sub $0xc,%esp 11a: 57 push %edi 11b: e8 8a 02 00 00 call 3aa <close> wait(); 120: e8 65 02 00 00 call 38a <wait> exit(); 125: e8 58 02 00 00 call 382 <exit> 12a: 89 df mov %ebx,%edi 12c: e9 47 ff ff ff jmp 78 <main+0x78> 131: 66 90 xchg %ax,%ax 133: 66 90 xchg %ax,%ax 135: 66 90 xchg %ax,%ax 137: 66 90 xchg %ax,%ax 139: 66 90 xchg %ax,%ax 13b: 66 90 xchg %ax,%ax 13d: 66 90 xchg %ax,%ax 13f: 90 nop 00000140 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, char *t) { 140: 55 push %ebp 141: 89 e5 mov %esp,%ebp 143: 53 push %ebx 144: 8b 45 08 mov 0x8(%ebp),%eax 147: 8b 4d 0c mov 0xc(%ebp),%ecx char *os; os = s; while((*s++ = *t++) != 0) 14a: 89 c2 mov %eax,%edx 14c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 150: 83 c1 01 add $0x1,%ecx 153: 0f b6 59 ff movzbl -0x1(%ecx),%ebx 157: 83 c2 01 add $0x1,%edx 15a: 84 db test %bl,%bl 15c: 88 5a ff mov %bl,-0x1(%edx) 15f: 75 ef jne 150 <strcpy+0x10> ; return os; } 161: 5b pop %ebx 162: 5d pop %ebp 163: c3 ret 164: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 16a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 00000170 <strcmp>: int strcmp(const char *p, const char *q) { 170: 55 push %ebp 171: 89 e5 mov %esp,%ebp 173: 56 push %esi 174: 53 push %ebx 175: 8b 55 08 mov 0x8(%ebp),%edx 178: 8b 4d 0c mov 0xc(%ebp),%ecx while(*p && *p == *q) 17b: 0f b6 02 movzbl (%edx),%eax 17e: 0f b6 19 movzbl (%ecx),%ebx 181: 84 c0 test %al,%al 183: 75 1e jne 1a3 <strcmp+0x33> 185: eb 29 jmp 1b0 <strcmp+0x40> 187: 89 f6 mov %esi,%esi 189: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi p++, q++; 190: 83 c2 01 add $0x1,%edx } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 193: 0f b6 02 movzbl (%edx),%eax p++, q++; 196: 8d 71 01 lea 0x1(%ecx),%esi } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 199: 0f b6 59 01 movzbl 0x1(%ecx),%ebx 19d: 84 c0 test %al,%al 19f: 74 0f je 1b0 <strcmp+0x40> 1a1: 89 f1 mov %esi,%ecx 1a3: 38 d8 cmp %bl,%al 1a5: 74 e9 je 190 <strcmp+0x20> p++, q++; return (uchar)*p - (uchar)*q; 1a7: 29 d8 sub %ebx,%eax } 1a9: 5b pop %ebx 1aa: 5e pop %esi 1ab: 5d pop %ebp 1ac: c3 ret 1ad: 8d 76 00 lea 0x0(%esi),%esi } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 1b0: 31 c0 xor %eax,%eax p++, q++; return (uchar)*p - (uchar)*q; 1b2: 29 d8 sub %ebx,%eax } 1b4: 5b pop %ebx 1b5: 5e pop %esi 1b6: 5d pop %ebp 1b7: c3 ret 1b8: 90 nop 1b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 000001c0 <strlen>: uint strlen(char *s) { 1c0: 55 push %ebp 1c1: 89 e5 mov %esp,%ebp 1c3: 8b 4d 08 mov 0x8(%ebp),%ecx int n; for(n = 0; s[n]; n++) 1c6: 80 39 00 cmpb $0x0,(%ecx) 1c9: 74 12 je 1dd <strlen+0x1d> 1cb: 31 d2 xor %edx,%edx 1cd: 8d 76 00 lea 0x0(%esi),%esi 1d0: 83 c2 01 add $0x1,%edx 1d3: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1) 1d7: 89 d0 mov %edx,%eax 1d9: 75 f5 jne 1d0 <strlen+0x10> ; return n; } 1db: 5d pop %ebp 1dc: c3 ret uint strlen(char *s) { int n; for(n = 0; s[n]; n++) 1dd: 31 c0 xor %eax,%eax ; return n; } 1df: 5d pop %ebp 1e0: c3 ret 1e1: eb 0d jmp 1f0 <memset> 1e3: 90 nop 1e4: 90 nop 1e5: 90 nop 1e6: 90 nop 1e7: 90 nop 1e8: 90 nop 1e9: 90 nop 1ea: 90 nop 1eb: 90 nop 1ec: 90 nop 1ed: 90 nop 1ee: 90 nop 1ef: 90 nop 000001f0 <memset>: void* memset(void *dst, int c, uint n) { 1f0: 55 push %ebp 1f1: 89 e5 mov %esp,%ebp 1f3: 57 push %edi 1f4: 8b 55 08 mov 0x8(%ebp),%edx } static inline void stosb(void *addr, int data, int cnt) { asm volatile("cld; rep stosb" : 1f7: 8b 4d 10 mov 0x10(%ebp),%ecx 1fa: 8b 45 0c mov 0xc(%ebp),%eax 1fd: 89 d7 mov %edx,%edi 1ff: fc cld 200: f3 aa rep stos %al,%es:(%edi) stosb(dst, c, n); return dst; } 202: 89 d0 mov %edx,%eax 204: 5f pop %edi 205: 5d pop %ebp 206: c3 ret 207: 89 f6 mov %esi,%esi 209: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000210 <strchr>: char* strchr(const char *s, char c) { 210: 55 push %ebp 211: 89 e5 mov %esp,%ebp 213: 53 push %ebx 214: 8b 45 08 mov 0x8(%ebp),%eax 217: 8b 5d 0c mov 0xc(%ebp),%ebx for(; *s; s++) 21a: 0f b6 10 movzbl (%eax),%edx 21d: 84 d2 test %dl,%dl 21f: 74 1d je 23e <strchr+0x2e> if(*s == c) 221: 38 d3 cmp %dl,%bl 223: 89 d9 mov %ebx,%ecx 225: 75 0d jne 234 <strchr+0x24> 227: eb 17 jmp 240 <strchr+0x30> 229: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 230: 38 ca cmp %cl,%dl 232: 74 0c je 240 <strchr+0x30> } char* strchr(const char *s, char c) { for(; *s; s++) 234: 83 c0 01 add $0x1,%eax 237: 0f b6 10 movzbl (%eax),%edx 23a: 84 d2 test %dl,%dl 23c: 75 f2 jne 230 <strchr+0x20> if(*s == c) return (char*)s; return 0; 23e: 31 c0 xor %eax,%eax } 240: 5b pop %ebx 241: 5d pop %ebp 242: c3 ret 243: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 249: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000250 <gets>: char* gets(char *buf, int max) { 250: 55 push %ebp 251: 89 e5 mov %esp,%ebp 253: 57 push %edi 254: 56 push %esi 255: 53 push %ebx int i, cc; char c; for(i=0; i+1 < max; ){ 256: 31 f6 xor %esi,%esi cc = read(0, &c, 1); 258: 8d 7d e7 lea -0x19(%ebp),%edi return 0; } char* gets(char *buf, int max) { 25b: 83 ec 1c sub $0x1c,%esp int i, cc; char c; for(i=0; i+1 < max; ){ 25e: eb 29 jmp 289 <gets+0x39> cc = read(0, &c, 1); 260: 83 ec 04 sub $0x4,%esp 263: 6a 01 push $0x1 265: 57 push %edi 266: 6a 00 push $0x0 268: e8 2d 01 00 00 call 39a <read> if(cc < 1) 26d: 83 c4 10 add $0x10,%esp 270: 85 c0 test %eax,%eax 272: 7e 1d jle 291 <gets+0x41> break; buf[i++] = c; 274: 0f b6 45 e7 movzbl -0x19(%ebp),%eax 278: 8b 55 08 mov 0x8(%ebp),%edx 27b: 89 de mov %ebx,%esi if(c == '\n' || c == '\r') 27d: 3c 0a cmp $0xa,%al for(i=0; i+1 < max; ){ cc = read(0, &c, 1); if(cc < 1) break; buf[i++] = c; 27f: 88 44 1a ff mov %al,-0x1(%edx,%ebx,1) if(c == '\n' || c == '\r') 283: 74 1b je 2a0 <gets+0x50> 285: 3c 0d cmp $0xd,%al 287: 74 17 je 2a0 <gets+0x50> gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 289: 8d 5e 01 lea 0x1(%esi),%ebx 28c: 3b 5d 0c cmp 0xc(%ebp),%ebx 28f: 7c cf jl 260 <gets+0x10> break; buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 291: 8b 45 08 mov 0x8(%ebp),%eax 294: c6 04 30 00 movb $0x0,(%eax,%esi,1) return buf; } 298: 8d 65 f4 lea -0xc(%ebp),%esp 29b: 5b pop %ebx 29c: 5e pop %esi 29d: 5f pop %edi 29e: 5d pop %ebp 29f: c3 ret break; buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 2a0: 8b 45 08 mov 0x8(%ebp),%eax gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 2a3: 89 de mov %ebx,%esi break; buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 2a5: c6 04 30 00 movb $0x0,(%eax,%esi,1) return buf; } 2a9: 8d 65 f4 lea -0xc(%ebp),%esp 2ac: 5b pop %ebx 2ad: 5e pop %esi 2ae: 5f pop %edi 2af: 5d pop %ebp 2b0: c3 ret 2b1: eb 0d jmp 2c0 <stat> 2b3: 90 nop 2b4: 90 nop 2b5: 90 nop 2b6: 90 nop 2b7: 90 nop 2b8: 90 nop 2b9: 90 nop 2ba: 90 nop 2bb: 90 nop 2bc: 90 nop 2bd: 90 nop 2be: 90 nop 2bf: 90 nop 000002c0 <stat>: int stat(char *n, struct stat *st) { 2c0: 55 push %ebp 2c1: 89 e5 mov %esp,%ebp 2c3: 56 push %esi 2c4: 53 push %ebx int fd; int r; fd = open(n, O_RDONLY); 2c5: 83 ec 08 sub $0x8,%esp 2c8: 6a 00 push $0x0 2ca: ff 75 08 pushl 0x8(%ebp) 2cd: e8 f0 00 00 00 call 3c2 <open> if(fd < 0) 2d2: 83 c4 10 add $0x10,%esp 2d5: 85 c0 test %eax,%eax 2d7: 78 27 js 300 <stat+0x40> return -1; r = fstat(fd, st); 2d9: 83 ec 08 sub $0x8,%esp 2dc: ff 75 0c pushl 0xc(%ebp) 2df: 89 c3 mov %eax,%ebx 2e1: 50 push %eax 2e2: e8 f3 00 00 00 call 3da <fstat> 2e7: 89 c6 mov %eax,%esi close(fd); 2e9: 89 1c 24 mov %ebx,(%esp) 2ec: e8 b9 00 00 00 call 3aa <close> return r; 2f1: 83 c4 10 add $0x10,%esp 2f4: 89 f0 mov %esi,%eax } 2f6: 8d 65 f8 lea -0x8(%ebp),%esp 2f9: 5b pop %ebx 2fa: 5e pop %esi 2fb: 5d pop %ebp 2fc: c3 ret 2fd: 8d 76 00 lea 0x0(%esi),%esi int fd; int r; fd = open(n, O_RDONLY); if(fd < 0) return -1; 300: b8 ff ff ff ff mov $0xffffffff,%eax 305: eb ef jmp 2f6 <stat+0x36> 307: 89 f6 mov %esi,%esi 309: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000310 <atoi>: return r; } int atoi(const char *s) { 310: 55 push %ebp 311: 89 e5 mov %esp,%ebp 313: 53 push %ebx 314: 8b 4d 08 mov 0x8(%ebp),%ecx int n; n = 0; while('0' <= *s && *s <= '9') 317: 0f be 11 movsbl (%ecx),%edx 31a: 8d 42 d0 lea -0x30(%edx),%eax 31d: 3c 09 cmp $0x9,%al 31f: b8 00 00 00 00 mov $0x0,%eax 324: 77 1f ja 345 <atoi+0x35> 326: 8d 76 00 lea 0x0(%esi),%esi 329: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi n = n*10 + *s++ - '0'; 330: 8d 04 80 lea (%eax,%eax,4),%eax 333: 83 c1 01 add $0x1,%ecx 336: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax atoi(const char *s) { int n; n = 0; while('0' <= *s && *s <= '9') 33a: 0f be 11 movsbl (%ecx),%edx 33d: 8d 5a d0 lea -0x30(%edx),%ebx 340: 80 fb 09 cmp $0x9,%bl 343: 76 eb jbe 330 <atoi+0x20> n = n*10 + *s++ - '0'; return n; } 345: 5b pop %ebx 346: 5d pop %ebp 347: c3 ret 348: 90 nop 349: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 00000350 <memmove>: void* memmove(void *vdst, void *vsrc, int n) { 350: 55 push %ebp 351: 89 e5 mov %esp,%ebp 353: 56 push %esi 354: 53 push %ebx 355: 8b 5d 10 mov 0x10(%ebp),%ebx 358: 8b 45 08 mov 0x8(%ebp),%eax 35b: 8b 75 0c mov 0xc(%ebp),%esi char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) 35e: 85 db test %ebx,%ebx 360: 7e 14 jle 376 <memmove+0x26> 362: 31 d2 xor %edx,%edx 364: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi *dst++ = *src++; 368: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx 36c: 88 0c 10 mov %cl,(%eax,%edx,1) 36f: 83 c2 01 add $0x1,%edx { char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) 372: 39 da cmp %ebx,%edx 374: 75 f2 jne 368 <memmove+0x18> *dst++ = *src++; return vdst; } 376: 5b pop %ebx 377: 5e pop %esi 378: 5d pop %ebp 379: c3 ret 0000037a <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 37a: b8 01 00 00 00 mov $0x1,%eax 37f: cd 40 int $0x40 381: c3 ret 00000382 <exit>: SYSCALL(exit) 382: b8 02 00 00 00 mov $0x2,%eax 387: cd 40 int $0x40 389: c3 ret 0000038a <wait>: SYSCALL(wait) 38a: b8 03 00 00 00 mov $0x3,%eax 38f: cd 40 int $0x40 391: c3 ret 00000392 <pipe>: SYSCALL(pipe) 392: b8 04 00 00 00 mov $0x4,%eax 397: cd 40 int $0x40 399: c3 ret 0000039a <read>: SYSCALL(read) 39a: b8 05 00 00 00 mov $0x5,%eax 39f: cd 40 int $0x40 3a1: c3 ret 000003a2 <write>: SYSCALL(write) 3a2: b8 10 00 00 00 mov $0x10,%eax 3a7: cd 40 int $0x40 3a9: c3 ret 000003aa <close>: SYSCALL(close) 3aa: b8 15 00 00 00 mov $0x15,%eax 3af: cd 40 int $0x40 3b1: c3 ret 000003b2 <kill>: SYSCALL(kill) 3b2: b8 06 00 00 00 mov $0x6,%eax 3b7: cd 40 int $0x40 3b9: c3 ret 000003ba <exec>: SYSCALL(exec) 3ba: b8 07 00 00 00 mov $0x7,%eax 3bf: cd 40 int $0x40 3c1: c3 ret 000003c2 <open>: SYSCALL(open) 3c2: b8 0f 00 00 00 mov $0xf,%eax 3c7: cd 40 int $0x40 3c9: c3 ret 000003ca <mknod>: SYSCALL(mknod) 3ca: b8 11 00 00 00 mov $0x11,%eax 3cf: cd 40 int $0x40 3d1: c3 ret 000003d2 <unlink>: SYSCALL(unlink) 3d2: b8 12 00 00 00 mov $0x12,%eax 3d7: cd 40 int $0x40 3d9: c3 ret 000003da <fstat>: SYSCALL(fstat) 3da: b8 08 00 00 00 mov $0x8,%eax 3df: cd 40 int $0x40 3e1: c3 ret 000003e2 <link>: SYSCALL(link) 3e2: b8 13 00 00 00 mov $0x13,%eax 3e7: cd 40 int $0x40 3e9: c3 ret 000003ea <mkdir>: SYSCALL(mkdir) 3ea: b8 14 00 00 00 mov $0x14,%eax 3ef: cd 40 int $0x40 3f1: c3 ret 000003f2 <chdir>: SYSCALL(chdir) 3f2: b8 09 00 00 00 mov $0x9,%eax 3f7: cd 40 int $0x40 3f9: c3 ret 000003fa <dup>: SYSCALL(dup) 3fa: b8 0a 00 00 00 mov $0xa,%eax 3ff: cd 40 int $0x40 401: c3 ret 00000402 <getpid>: SYSCALL(getpid) 402: b8 0b 00 00 00 mov $0xb,%eax 407: cd 40 int $0x40 409: c3 ret 0000040a <sbrk>: SYSCALL(sbrk) 40a: b8 0c 00 00 00 mov $0xc,%eax 40f: cd 40 int $0x40 411: c3 ret 00000412 <sleep>: SYSCALL(sleep) 412: b8 0d 00 00 00 mov $0xd,%eax 417: cd 40 int $0x40 419: c3 ret 0000041a <uptime>: SYSCALL(uptime) 41a: b8 0e 00 00 00 mov $0xe,%eax 41f: cd 40 int $0x40 421: c3 ret 00000422 <date>: SYSCALL(date) 422: b8 16 00 00 00 mov $0x16,%eax 427: cd 40 int $0x40 429: c3 ret 0000042a <virt2real>: SYSCALL(virt2real) 42a: b8 17 00 00 00 mov $0x17,%eax 42f: cd 40 int $0x40 431: c3 ret 00000432 <num_pages>: SYSCALL(num_pages) 432: b8 18 00 00 00 mov $0x18,%eax 437: cd 40 int $0x40 439: c3 ret 0000043a <forkcow>: SYSCALL(forkcow) 43a: b8 19 00 00 00 mov $0x19,%eax 43f: cd 40 int $0x40 441: c3 ret 442: 66 90 xchg %ax,%ax 444: 66 90 xchg %ax,%ax 446: 66 90 xchg %ax,%ax 448: 66 90 xchg %ax,%ax 44a: 66 90 xchg %ax,%ax 44c: 66 90 xchg %ax,%ax 44e: 66 90 xchg %ax,%ax 00000450 <printint>: write(fd, &c, 1); } static void printint(int fd, int xx, int base, int sgn) { 450: 55 push %ebp 451: 89 e5 mov %esp,%ebp 453: 57 push %edi 454: 56 push %esi 455: 53 push %ebx 456: 89 c6 mov %eax,%esi 458: 83 ec 3c sub $0x3c,%esp char buf[16]; int i, neg; uint x; neg = 0; if(sgn && xx < 0){ 45b: 8b 5d 08 mov 0x8(%ebp),%ebx 45e: 85 db test %ebx,%ebx 460: 74 7e je 4e0 <printint+0x90> 462: 89 d0 mov %edx,%eax 464: c1 e8 1f shr $0x1f,%eax 467: 84 c0 test %al,%al 469: 74 75 je 4e0 <printint+0x90> neg = 1; x = -xx; 46b: 89 d0 mov %edx,%eax int i, neg; uint x; neg = 0; if(sgn && xx < 0){ neg = 1; 46d: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp) x = -xx; 474: f7 d8 neg %eax 476: 89 75 c0 mov %esi,-0x40(%ebp) } else { x = xx; } i = 0; 479: 31 ff xor %edi,%edi 47b: 8d 5d d7 lea -0x29(%ebp),%ebx 47e: 89 ce mov %ecx,%esi 480: eb 08 jmp 48a <printint+0x3a> 482: 8d b6 00 00 00 00 lea 0x0(%esi),%esi do{ buf[i++] = digits[x % base]; 488: 89 cf mov %ecx,%edi 48a: 31 d2 xor %edx,%edx 48c: 8d 4f 01 lea 0x1(%edi),%ecx 48f: f7 f6 div %esi 491: 0f b6 92 3c 08 00 00 movzbl 0x83c(%edx),%edx }while((x /= base) != 0); 498: 85 c0 test %eax,%eax x = xx; } i = 0; do{ buf[i++] = digits[x % base]; 49a: 88 14 0b mov %dl,(%ebx,%ecx,1) }while((x /= base) != 0); 49d: 75 e9 jne 488 <printint+0x38> if(neg) 49f: 8b 45 c4 mov -0x3c(%ebp),%eax 4a2: 8b 75 c0 mov -0x40(%ebp),%esi 4a5: 85 c0 test %eax,%eax 4a7: 74 08 je 4b1 <printint+0x61> buf[i++] = '-'; 4a9: c6 44 0d d8 2d movb $0x2d,-0x28(%ebp,%ecx,1) 4ae: 8d 4f 02 lea 0x2(%edi),%ecx 4b1: 8d 7c 0d d7 lea -0x29(%ebp,%ecx,1),%edi 4b5: 8d 76 00 lea 0x0(%esi),%esi 4b8: 0f b6 07 movzbl (%edi),%eax #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 4bb: 83 ec 04 sub $0x4,%esp 4be: 83 ef 01 sub $0x1,%edi 4c1: 6a 01 push $0x1 4c3: 53 push %ebx 4c4: 56 push %esi 4c5: 88 45 d7 mov %al,-0x29(%ebp) 4c8: e8 d5 fe ff ff call 3a2 <write> buf[i++] = digits[x % base]; }while((x /= base) != 0); if(neg) buf[i++] = '-'; while(--i >= 0) 4cd: 83 c4 10 add $0x10,%esp 4d0: 39 df cmp %ebx,%edi 4d2: 75 e4 jne 4b8 <printint+0x68> putc(fd, buf[i]); } 4d4: 8d 65 f4 lea -0xc(%ebp),%esp 4d7: 5b pop %ebx 4d8: 5e pop %esi 4d9: 5f pop %edi 4da: 5d pop %ebp 4db: c3 ret 4dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi neg = 0; if(sgn && xx < 0){ neg = 1; x = -xx; } else { x = xx; 4e0: 89 d0 mov %edx,%eax static char digits[] = "0123456789ABCDEF"; char buf[16]; int i, neg; uint x; neg = 0; 4e2: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 4e9: eb 8b jmp 476 <printint+0x26> 4eb: 90 nop 4ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 000004f0 <printf>: } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 4f0: 55 push %ebp 4f1: 89 e5 mov %esp,%ebp 4f3: 57 push %edi 4f4: 56 push %esi 4f5: 53 push %ebx int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 4f6: 8d 45 10 lea 0x10(%ebp),%eax } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 4f9: 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++){ 4fc: 8b 75 0c mov 0xc(%ebp),%esi } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 4ff: 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++){ 502: 89 45 d0 mov %eax,-0x30(%ebp) 505: 0f b6 1e movzbl (%esi),%ebx 508: 83 c6 01 add $0x1,%esi 50b: 84 db test %bl,%bl 50d: 0f 84 b0 00 00 00 je 5c3 <printf+0xd3> 513: 31 d2 xor %edx,%edx 515: eb 39 jmp 550 <printf+0x60> 517: 89 f6 mov %esi,%esi 519: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ 520: 83 f8 25 cmp $0x25,%eax 523: 89 55 d4 mov %edx,-0x2c(%ebp) state = '%'; 526: 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 == '%'){ 52b: 74 18 je 545 <printf+0x55> #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 52d: 8d 45 e2 lea -0x1e(%ebp),%eax 530: 83 ec 04 sub $0x4,%esp 533: 88 5d e2 mov %bl,-0x1e(%ebp) 536: 6a 01 push $0x1 538: 50 push %eax 539: 57 push %edi 53a: e8 63 fe ff ff call 3a2 <write> 53f: 8b 55 d4 mov -0x2c(%ebp),%edx 542: 83 c4 10 add $0x10,%esp 545: 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++){ 548: 0f b6 5e ff movzbl -0x1(%esi),%ebx 54c: 84 db test %bl,%bl 54e: 74 73 je 5c3 <printf+0xd3> c = fmt[i] & 0xff; if(state == 0){ 550: 85 d2 test %edx,%edx uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ c = fmt[i] & 0xff; 552: 0f be cb movsbl %bl,%ecx 555: 0f b6 c3 movzbl %bl,%eax if(state == 0){ 558: 74 c6 je 520 <printf+0x30> if(c == '%'){ state = '%'; } else { putc(fd, c); } } else if(state == '%'){ 55a: 83 fa 25 cmp $0x25,%edx 55d: 75 e6 jne 545 <printf+0x55> if(c == 'd'){ 55f: 83 f8 64 cmp $0x64,%eax 562: 0f 84 f8 00 00 00 je 660 <printf+0x170> printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ 568: 81 e1 f7 00 00 00 and $0xf7,%ecx 56e: 83 f9 70 cmp $0x70,%ecx 571: 74 5d je 5d0 <printf+0xe0> printint(fd, *ap, 16, 0); ap++; } else if(c == 's'){ 573: 83 f8 73 cmp $0x73,%eax 576: 0f 84 84 00 00 00 je 600 <printf+0x110> s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 57c: 83 f8 63 cmp $0x63,%eax 57f: 0f 84 ea 00 00 00 je 66f <printf+0x17f> putc(fd, *ap); ap++; } else if(c == '%'){ 585: 83 f8 25 cmp $0x25,%eax 588: 0f 84 c2 00 00 00 je 650 <printf+0x160> #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 58e: 8d 45 e7 lea -0x19(%ebp),%eax 591: 83 ec 04 sub $0x4,%esp 594: c6 45 e7 25 movb $0x25,-0x19(%ebp) 598: 6a 01 push $0x1 59a: 50 push %eax 59b: 57 push %edi 59c: e8 01 fe ff ff call 3a2 <write> 5a1: 83 c4 0c add $0xc,%esp 5a4: 8d 45 e6 lea -0x1a(%ebp),%eax 5a7: 88 5d e6 mov %bl,-0x1a(%ebp) 5aa: 6a 01 push $0x1 5ac: 50 push %eax 5ad: 57 push %edi 5ae: 83 c6 01 add $0x1,%esi 5b1: e8 ec fd ff ff call 3a2 <write> int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 5b6: 0f b6 5e ff movzbl -0x1(%esi),%ebx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 5ba: 83 c4 10 add $0x10,%esp } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 5bd: 31 d2 xor %edx,%edx int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 5bf: 84 db test %bl,%bl 5c1: 75 8d jne 550 <printf+0x60> putc(fd, c); } state = 0; } } } 5c3: 8d 65 f4 lea -0xc(%ebp),%esp 5c6: 5b pop %ebx 5c7: 5e pop %esi 5c8: 5f pop %edi 5c9: 5d pop %ebp 5ca: c3 ret 5cb: 90 nop 5cc: 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); 5d0: 83 ec 0c sub $0xc,%esp 5d3: b9 10 00 00 00 mov $0x10,%ecx 5d8: 6a 00 push $0x0 5da: 8b 5d d0 mov -0x30(%ebp),%ebx 5dd: 89 f8 mov %edi,%eax 5df: 8b 13 mov (%ebx),%edx 5e1: e8 6a fe ff ff call 450 <printint> ap++; 5e6: 89 d8 mov %ebx,%eax 5e8: 83 c4 10 add $0x10,%esp } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 5eb: 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++; 5ed: 83 c0 04 add $0x4,%eax 5f0: 89 45 d0 mov %eax,-0x30(%ebp) 5f3: e9 4d ff ff ff jmp 545 <printf+0x55> 5f8: 90 nop 5f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi } else if(c == 's'){ s = (char*)*ap; 600: 8b 45 d0 mov -0x30(%ebp),%eax 603: 8b 18 mov (%eax),%ebx ap++; 605: 83 c0 04 add $0x4,%eax 608: 89 45 d0 mov %eax,-0x30(%ebp) if(s == 0) s = "(null)"; 60b: b8 33 08 00 00 mov $0x833,%eax 610: 85 db test %ebx,%ebx 612: 0f 44 d8 cmove %eax,%ebx while(*s != 0){ 615: 0f b6 03 movzbl (%ebx),%eax 618: 84 c0 test %al,%al 61a: 74 23 je 63f <printf+0x14f> 61c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 620: 88 45 e3 mov %al,-0x1d(%ebp) #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 623: 8d 45 e3 lea -0x1d(%ebp),%eax 626: 83 ec 04 sub $0x4,%esp 629: 6a 01 push $0x1 ap++; if(s == 0) s = "(null)"; while(*s != 0){ putc(fd, *s); s++; 62b: 83 c3 01 add $0x1,%ebx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 62e: 50 push %eax 62f: 57 push %edi 630: e8 6d fd ff ff call 3a2 <write> } else if(c == 's'){ s = (char*)*ap; ap++; if(s == 0) s = "(null)"; while(*s != 0){ 635: 0f b6 03 movzbl (%ebx),%eax 638: 83 c4 10 add $0x10,%esp 63b: 84 c0 test %al,%al 63d: 75 e1 jne 620 <printf+0x130> } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 63f: 31 d2 xor %edx,%edx 641: e9 ff fe ff ff jmp 545 <printf+0x55> 646: 8d 76 00 lea 0x0(%esi),%esi 649: 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); 650: 83 ec 04 sub $0x4,%esp 653: 88 5d e5 mov %bl,-0x1b(%ebp) 656: 8d 45 e5 lea -0x1b(%ebp),%eax 659: 6a 01 push $0x1 65b: e9 4c ff ff ff jmp 5ac <printf+0xbc> } else { putc(fd, c); } } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); 660: 83 ec 0c sub $0xc,%esp 663: b9 0a 00 00 00 mov $0xa,%ecx 668: 6a 01 push $0x1 66a: e9 6b ff ff ff jmp 5da <printf+0xea> 66f: 8b 5d d0 mov -0x30(%ebp),%ebx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 672: 83 ec 04 sub $0x4,%esp 675: 8b 03 mov (%ebx),%eax 677: 6a 01 push $0x1 679: 88 45 e4 mov %al,-0x1c(%ebp) 67c: 8d 45 e4 lea -0x1c(%ebp),%eax 67f: 50 push %eax 680: 57 push %edi 681: e8 1c fd ff ff call 3a2 <write> 686: e9 5b ff ff ff jmp 5e6 <printf+0xf6> 68b: 66 90 xchg %ax,%ax 68d: 66 90 xchg %ax,%ax 68f: 90 nop 00000690 <free>: static Header base; static Header *freep; void free(void *ap) { 690: 55 push %ebp Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 691: a1 e0 0a 00 00 mov 0xae0,%eax static Header base; static Header *freep; void free(void *ap) { 696: 89 e5 mov %esp,%ebp 698: 57 push %edi 699: 56 push %esi 69a: 53 push %ebx 69b: 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)) 69e: 8b 10 mov (%eax),%edx void free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; 6a0: 8d 4b f8 lea -0x8(%ebx),%ecx for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 6a3: 39 c8 cmp %ecx,%eax 6a5: 73 19 jae 6c0 <free+0x30> 6a7: 89 f6 mov %esi,%esi 6a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 6b0: 39 d1 cmp %edx,%ecx 6b2: 72 1c jb 6d0 <free+0x40> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 6b4: 39 d0 cmp %edx,%eax 6b6: 73 18 jae 6d0 <free+0x40> static Header base; static Header *freep; void free(void *ap) { 6b8: 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) 6ba: 39 c8 cmp %ecx,%eax if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 6bc: 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) 6be: 72 f0 jb 6b0 <free+0x20> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 6c0: 39 d0 cmp %edx,%eax 6c2: 72 f4 jb 6b8 <free+0x28> 6c4: 39 d1 cmp %edx,%ecx 6c6: 73 f0 jae 6b8 <free+0x28> 6c8: 90 nop 6c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi break; if(bp + bp->s.size == p->s.ptr){ 6d0: 8b 73 fc mov -0x4(%ebx),%esi 6d3: 8d 3c f1 lea (%ecx,%esi,8),%edi 6d6: 39 d7 cmp %edx,%edi 6d8: 74 19 je 6f3 <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; 6da: 89 53 f8 mov %edx,-0x8(%ebx) if(p + p->s.size == bp){ 6dd: 8b 50 04 mov 0x4(%eax),%edx 6e0: 8d 34 d0 lea (%eax,%edx,8),%esi 6e3: 39 f1 cmp %esi,%ecx 6e5: 74 23 je 70a <free+0x7a> p->s.size += bp->s.size; p->s.ptr = bp->s.ptr; } else p->s.ptr = bp; 6e7: 89 08 mov %ecx,(%eax) freep = p; 6e9: a3 e0 0a 00 00 mov %eax,0xae0 } 6ee: 5b pop %ebx 6ef: 5e pop %esi 6f0: 5f pop %edi 6f1: 5d pop %ebp 6f2: 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; 6f3: 03 72 04 add 0x4(%edx),%esi 6f6: 89 73 fc mov %esi,-0x4(%ebx) bp->s.ptr = p->s.ptr->s.ptr; 6f9: 8b 10 mov (%eax),%edx 6fb: 8b 12 mov (%edx),%edx 6fd: 89 53 f8 mov %edx,-0x8(%ebx) } else bp->s.ptr = p->s.ptr; if(p + p->s.size == bp){ 700: 8b 50 04 mov 0x4(%eax),%edx 703: 8d 34 d0 lea (%eax,%edx,8),%esi 706: 39 f1 cmp %esi,%ecx 708: 75 dd jne 6e7 <free+0x57> p->s.size += bp->s.size; 70a: 03 53 fc add -0x4(%ebx),%edx p->s.ptr = bp->s.ptr; } else p->s.ptr = bp; freep = p; 70d: a3 e0 0a 00 00 mov %eax,0xae0 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; 712: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 715: 8b 53 f8 mov -0x8(%ebx),%edx 718: 89 10 mov %edx,(%eax) } else p->s.ptr = bp; freep = p; } 71a: 5b pop %ebx 71b: 5e pop %esi 71c: 5f pop %edi 71d: 5d pop %ebp 71e: c3 ret 71f: 90 nop 00000720 <malloc>: return freep; } void* malloc(uint nbytes) { 720: 55 push %ebp 721: 89 e5 mov %esp,%ebp 723: 57 push %edi 724: 56 push %esi 725: 53 push %ebx 726: 83 ec 0c sub $0xc,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 729: 8b 45 08 mov 0x8(%ebp),%eax if((prevp = freep) == 0){ 72c: 8b 15 e0 0a 00 00 mov 0xae0,%edx malloc(uint nbytes) { Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 732: 8d 78 07 lea 0x7(%eax),%edi 735: c1 ef 03 shr $0x3,%edi 738: 83 c7 01 add $0x1,%edi if((prevp = freep) == 0){ 73b: 85 d2 test %edx,%edx 73d: 0f 84 a3 00 00 00 je 7e6 <malloc+0xc6> 743: 8b 02 mov (%edx),%eax 745: 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){ 748: 39 cf cmp %ecx,%edi 74a: 76 74 jbe 7c0 <malloc+0xa0> 74c: 81 ff 00 10 00 00 cmp $0x1000,%edi 752: be 00 10 00 00 mov $0x1000,%esi 757: 8d 1c fd 00 00 00 00 lea 0x0(,%edi,8),%ebx 75e: 0f 43 f7 cmovae %edi,%esi 761: ba 00 80 00 00 mov $0x8000,%edx 766: 81 ff ff 0f 00 00 cmp $0xfff,%edi 76c: 0f 46 da cmovbe %edx,%ebx 76f: eb 10 jmp 781 <malloc+0x61> 771: 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){ 778: 8b 02 mov (%edx),%eax if(p->s.size >= nunits){ 77a: 8b 48 04 mov 0x4(%eax),%ecx 77d: 39 cf cmp %ecx,%edi 77f: 76 3f jbe 7c0 <malloc+0xa0> p->s.size = nunits; } freep = prevp; return (void*)(p + 1); } if(p == freep) 781: 39 05 e0 0a 00 00 cmp %eax,0xae0 787: 89 c2 mov %eax,%edx 789: 75 ed jne 778 <malloc+0x58> char *p; Header *hp; if(nu < 4096) nu = 4096; p = sbrk(nu * sizeof(Header)); 78b: 83 ec 0c sub $0xc,%esp 78e: 53 push %ebx 78f: e8 76 fc ff ff call 40a <sbrk> if(p == (char*)-1) 794: 83 c4 10 add $0x10,%esp 797: 83 f8 ff cmp $0xffffffff,%eax 79a: 74 1c je 7b8 <malloc+0x98> return 0; hp = (Header*)p; hp->s.size = nu; 79c: 89 70 04 mov %esi,0x4(%eax) free((void*)(hp + 1)); 79f: 83 ec 0c sub $0xc,%esp 7a2: 83 c0 08 add $0x8,%eax 7a5: 50 push %eax 7a6: e8 e5 fe ff ff call 690 <free> return freep; 7ab: 8b 15 e0 0a 00 00 mov 0xae0,%edx } freep = prevp; return (void*)(p + 1); } if(p == freep) if((p = morecore(nunits)) == 0) 7b1: 83 c4 10 add $0x10,%esp 7b4: 85 d2 test %edx,%edx 7b6: 75 c0 jne 778 <malloc+0x58> return 0; 7b8: 31 c0 xor %eax,%eax 7ba: eb 1c jmp 7d8 <malloc+0xb8> 7bc: 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) 7c0: 39 cf cmp %ecx,%edi 7c2: 74 1c je 7e0 <malloc+0xc0> prevp->s.ptr = p->s.ptr; else { p->s.size -= nunits; 7c4: 29 f9 sub %edi,%ecx 7c6: 89 48 04 mov %ecx,0x4(%eax) p += p->s.size; 7c9: 8d 04 c8 lea (%eax,%ecx,8),%eax p->s.size = nunits; 7cc: 89 78 04 mov %edi,0x4(%eax) } freep = prevp; 7cf: 89 15 e0 0a 00 00 mov %edx,0xae0 return (void*)(p + 1); 7d5: 83 c0 08 add $0x8,%eax } if(p == freep) if((p = morecore(nunits)) == 0) return 0; } } 7d8: 8d 65 f4 lea -0xc(%ebp),%esp 7db: 5b pop %ebx 7dc: 5e pop %esi 7dd: 5f pop %edi 7de: 5d pop %ebp 7df: 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; 7e0: 8b 08 mov (%eax),%ecx 7e2: 89 0a mov %ecx,(%edx) 7e4: eb e9 jmp 7cf <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; 7e6: c7 05 e0 0a 00 00 e4 movl $0xae4,0xae0 7ed: 0a 00 00 7f0: c7 05 e4 0a 00 00 e4 movl $0xae4,0xae4 7f7: 0a 00 00 base.s.size = 0; 7fa: b8 e4 0a 00 00 mov $0xae4,%eax 7ff: c7 05 e8 0a 00 00 00 movl $0x0,0xae8 806: 00 00 00 809: e9 3e ff ff ff jmp 74c <malloc+0x2c>
grammar/env.g4
Lam-Steven/cpp-dotenv
0
3520
grammar dotenv; env : line_content (NL line_content)* EOF ; // FIRST: SP, UNQUOTED_KEY_CHAR, '"', '\'', CS, NL, EOF // FOLLOW: - line_content : SP* (key SP* EQ SP* value SP*)? comment? ; // FIRST: SP, UNQUOTED_KEY_CHAR, '"', '\'', CS, 3 // FOLLOW: NL, EOF key : (UNQUOTED_KEY | STRING)+ ; // FIRST: UNQUOTED_KEY_CHAR, '"', '\'' // FOLLOW: SP, EQ value : (UNQUOTED_VALUE | STRING)* ; // FIRST: UNQUOTED_VALUE_CHAR, '"', '\'', 3 // FOLLOW: SP, CS, NL, EOF comment : CS UNQUOTED_COMMENT ; // FIRST: CS // FOLLOW: NL, EOF STRING : '"' UNQUOTED_STRING '"' | '\''UNQUOTED_STRING '\'' ; // FIRST: '"', '\'' // FOLLOW: SP, EQ, CS, NL, EOF fragment UNQUOTED_STRING : (ESC | SAFECODEPOINT)* ; fragment ESC : '\\' (["\\/bfnrt] | UNICODE) ; fragment UNICODE : 'u' HEX HEX HEX HEX ; fragment HEX : [0-9a-fA-F] ; fragment SAFECODEPOINT : ~["\\\u0000-\u001F] ; UNQUOTED_KEY : UNQUOTED_KEY_CHAR+ ; // FIRST: UNQUOTED_KEY_CHAR // FOLLOW: SP, EQ fragment UNQUOTED_KEY_CHAR : ~[#= "'\t\n\r] ; UNQUOTED_VALUE : UNQUOTED_VALUE_CHAR+ ; // FIRST: UNQUOTED_VALUE_CHAR // FOLLOW: SP, CS, NL, EOF fragment UNQUOTED_VALUE_CHAR : ~[# "'\t\n\r] ; UNQUOTED_COMMENT : UNQUOTED_COMMENT_CHAR+ ; // FIRST: UNQUOTED_COMMENT_CHAR // FOLLOW: NL, EOF fragment UNQUOTED_COMMENT_CHAR : ~[\n\r] ; CS : '#' ; EQ : '=' ; SP : ' ' | '\t' ; NL : '\r'? '\n' ;
test/Succeed/Issue1874.agda
cruhland/agda
1,989
15146
module _ where module LocalSetoidCalc (Node : Set) where module _ (A : Node) where module _IsRelatedTo_ where module SGFunctorSetup (Obj₁ Obj₂ : Set) where open LocalSetoidCalc Obj₁ public renaming (module _IsRelatedTo_ to _IsRelatedTo₁_) open LocalSetoidCalc Obj₂ public renaming (module _IsRelatedTo_ to _IsRelatedTo₂_) postulate X Y : Set open SGFunctorSetup X Y
resources/scripts/scrape/baidu.ads
shahriarr-sec/Amass
1
11650
<gh_stars>1-10 -- Copyright 2017 <NAME>. All rights reserved. -- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. local url = require("url") local json = require("json") name = "Baidu" type = "scrape" function start() setratelimit(1) end function vertical(ctx, domain) apirequest(ctx, domain) doscrape(ctx, domain) end function doscrape(ctx, domain) for i=1,10 do checkratelimit() local ok = scrape(ctx, {['url']=buildurl(domain, i)}) if not ok then break end end end function buildurl(domain, pagenum) local query = "site:" .. domain .. " -site:www." .. domain local params = { wd=query, oq=query, pn=tostring(pagenum), } return "https://www.baidu.com/s?" .. url.build_query_string(params) end function apirequest(ctx, domain) local page, err = request({['url']=apiurl(domain)}) if (err ~= nil and err ~= "") then return end local resp = json.decode(page) if (resp == nil or resp.code ~= 0 or #resp['data'] == 0) then return end for i, tb in pairs(resp.data) do newname(ctx, tb.domain) end end function apiurl(domain) return "https://ce.baidu.com/index/getRelatedSites?site_address=" .. domain end
oeis/206/A206857.asm
neoneye/loda-programs
11
247657
<gh_stars>10-100 ; A206857: Number of n X 2 0..2 arrays avoiding the pattern z z+1 z in any row, column, diagonal or antidiagonal. ; 9,81,625,4761,36481,279841,2146225,16459249,126225225,968018769,7423717921,56932346025,436613028289,3348376640449,25678633973281,196928934060769,1510244084935881,11582031898782801,88822372650180625,681177012130215225,5223932980061365441,40062238293730645729,307236509968550975569,2356190694228571516369,18069579647736487823241,138575247515266824138321,1062730821539778775457089,8150061568002522031801161,62502660331231814932368001,479331660980175093479971201,3675984990085387251042450241 add $0,2 seq $0,98182 ; a(n) = 3*a(n-1) - a(n-2) + a(n-3), a(0)=1,a(1)=1,a(2)=3. pow $0,2
programs/oeis/266/A266662.asm
jmorken/loda
1
29509
; A266662: Number of ON (black) cells in the n-th iteration of the "Rule 47" elementary cellular automaton starting with a single ON (black) cell. ; 1,2,2,5,2,9,2,13,2,17,2,21,2,25,2,29,2,33,2,37,2,41,2,45,2,49,2,53,2,57,2,61,2,65,2,69,2,73,2,77,2,81,2,85,2,89,2,93,2,97,2,101,2,105,2,109,2,113,2,117,2,121,2,125,2,129,2,133,2,137,2,141,2,145,2,149,2,153,2,157,2,161,2,165,2,169,2,173,2,177,2,181,2,185,2,189,2,193,2,197,2,201,2,205,2,209,2,213,2,217,2,221,2,225,2,229,2,233,2,237,2,241,2,245,2,249,2,253,2,257,2,261,2,265,2,269,2,273,2,277,2,281,2,285,2,289,2,293,2,297,2,301,2,305,2,309,2,313,2,317,2,321,2,325,2,329,2,333,2,337,2,341,2,345,2,349,2,353,2,357,2,361,2,365,2,369,2,373,2,377,2,381,2,385,2,389,2,393,2,397,2,401,2,405,2,409,2,413,2,417,2,421,2,425,2,429,2,433,2,437,2,441,2,445,2,449,2,453,2,457,2,461,2,465,2,469,2,473,2,477,2,481,2,485,2,489,2,493,2,497 mul $0,2 mov $1,3 mov $2,$0 mov $4,1 lpb $0 sub $0,2 mov $3,$2 add $2,$4 trn $3,$1 add $3,4 mov $1,$3 trn $4,2 lpe sub $1,2
applet/aide/source/editors/aide-editor-of_subprogram.adb
charlie5/aIDE
3
11698
<reponame>charlie5/aIDE<filename>applet/aide/source/editors/aide-editor-of_subprogram.adb<gh_stars>1-10 with Glib, glib.Error, gtk.Builder, gtk.Handlers; package body aIDE.Editor.of_subprogram is use gtk.Builder, Glib, glib.Error; function on_name_Entry_leave (the_Entry : access Gtk_Entry_Record'Class; Self : in aIDE.Editor.of_subprogram.view) return Boolean is the_Text : constant String := the_Entry.Get_Text; begin Self.Subprogram.Name_is (the_Text); return False; end on_name_Entry_leave; package Entry_return_Callbacks is new Gtk.Handlers.User_Return_Callback (Gtk_Entry_Record, Boolean, aIDE.Editor.of_subprogram.view); function on_procedure_Label_clicked (the_Label : access Gtk_Label_Record'Class; Self : in aIDE.Editor.of_subprogram.view) return Boolean is begin return False; end on_procedure_Label_clicked; package Label_return_Callbacks is new Gtk.Handlers.User_Return_Callback (Gtk_Label_Record, Boolean, aIDE.Editor.of_subprogram.view); package body Forge is function to_subprogram_Editor (the_Subprogram : in AdaM.Subprogram.view) return View is Self : constant Editor.of_subprogram.view := new Editor.of_subprogram.item; the_Builder : Gtk_Builder; Error : aliased GError; Result : Guint; pragma Unreferenced (Result); begin Gtk_New (the_Builder); Result := the_Builder.Add_From_File ("glade/editor/subprogram_editor.glade", Error'Access); if Error /= null then Error_Free (Error); end if; Self.top_Box := gtk_Box (the_Builder.get_Object ("top_Box")); Self.block_Alignment := gtk_Alignment (the_Builder.get_Object ("block_Alignment")); Self.context_Alignment := gtk_Alignment (the_Builder.get_Object ("context_Alignment")); Self.procedure_Label := gtk_Label (the_Builder.get_Object ("procedure_Label")); Self.name_Entry := gtk_Entry (the_Builder.get_Object ("name_Entry")); Entry_return_Callbacks.Connect (Self.name_Entry, "focus-out-event", on_name_Entry_leave'Access, Self); Label_return_Callbacks.Connect (Self.procedure_Label, "button-release-event", on_procedure_Label_clicked'Access, Self); Self.Subprogram := the_Subprogram; Self.context_Editor := aIDE.Editor.of_context.Forge.to_context_Editor (Self.Subprogram.Context); Self.context_Editor.top_Widget.Reparent (new_Parent => Self.context_Alignment); Self.block_Editor := aIDE.Editor.of_block.Forge.to_block_Editor (Self.Subprogram.Block); Self.block_Editor.top_Widget.Reparent (new_Parent => Self.block_Alignment); Self.freshen; return Self; end to_subprogram_Editor; end Forge; overriding procedure freshen (Self : in out Item) is use AdaM; begin Self.name_Entry.Set_Text (+Self.Subprogram.Name); Self.context_Editor.Context_is (Self.Subprogram.Context); Self. block_Editor.Target_is (Self.Subprogram.Block); end freshen; function Target (Self : in Item) return AdaM.Subprogram.view is begin return Self.Subprogram; end Target; procedure Target_is (Self : in out Item; Now : in AdaM.Subprogram.view) is begin Self.Subprogram := Now; Self.freshen; end Target_is; overriding function top_Widget (Self : in Item) return gtk.Widget.Gtk_Widget is begin return gtk.Widget.Gtk_Widget (Self.top_Box); end top_Widget; end aIDE.Editor.of_subprogram;
courses/fundamentals_of_ada/labs/radar/030_basic_types/answers/main.adb
AdaCore/training_material
15
30658
with Radar_Internals; procedure Main is -- You are in charge of developping a rotating radar for the new T-1000 -- Some of the radar code is already in place, it is just missing the -- high-level interface to handle incoming objects. type Object_Status_T is (Out_Of_Range, Tracked, Cleared, Selected); -- QUESTION 1 - Part A -- -- Define a type Angle_Degrees_T that is modulo 360 type Angle_Degrees_T is mod 360; -- Define a subtype Object_Distance_Km_T as a Float with values -- between 10cm and 100km subtype Object_Distance_Km_T is Float range 0.000_01 .. 100.0; -- Define a subtype Speed_Kph_T that is a Float between 0 and 50 km/h subtype Speed_Kph_T is Float range 0.0 .. 50.0; John_Connor : Object_Status_T := Out_Of_Range; -- QUESTION 1 - Part B -- -- Set Radar_Angle to be an Angle_Degrees_T with a starting value Radar_Angle : Angle_Degrees_T := 180; -- Declare an Object_Distance_Km_T named Distance_Closest_Object, set to 10km Distance_Closest_Object : Object_Distance_Km_T := 10.0; -- Declare a Speed_Kph_T named Running_Speed, set to 25km/h Running_Speed : Speed_Kph_T := 25.0; -- Assign Time_To_Arrival to -- Distance_Closest_Object divided by Running_Speed * 3600 Time_To_Arrival : Float := Distance_Closest_Object / Running_Speed * 3600.0; begin -- This line will compile if the declarations are OK Radar_Internals.Time_Step (Float (Radar_Angle), Time_To_Arrival, Object_Status_T'Image (John_Connor)); -- QUESTION 2 - Part A -- -- Some time has passed since setup, set variables as follow to reflect that. -- -- Rotate the radar 200 degrees by incrementing its value Radar_Angle := Radar_Angle + 200; -- Set the status of John_Connor to Tracked John_Connor := Tracked; -- Set distance to closest object to 4km Distance_Closest_Object := 4.0; -- Update Running_Time accordingly Time_To_Arrival := Distance_Closest_Object / Running_Speed * 3600.0; -- This line will compile if the declarations are OK Radar_Internals.Time_Step (Float (Radar_Angle), Time_To_Arrival, Object_Status_T'Image (John_Connor)); -- QUESTION 2 - Part B -- -- Some more time has passed since setup. -- -- Rotate the radar 180 degrees Radar_Angle := Radar_Angle + 180; -- Set the status of John_Connor to Selected John_Connor := Selected; -- This line will compile if the declarations are OK Radar_Internals.Time_Step (Float (Radar_Angle), Time_To_Arrival, Object_Status_T'Image (John_Connor)); -- QUESTION 3 - Quiz -- -- a. What happens if we want to rotate the radar by 361 degrees? -- This won't compile: 361 is not a valid `Angle_Degrees_T` -- Radar_Angle := Radar_Angle + 361; -- This will work though, end result is identical to adding 1 degree Radar_Angle := Radar_Angle + 359; Radar_Angle := Radar_Angle + 2; -- b. There is a last minute change in the spec: John Connor is now in -- the "Friend" status, make changes to the code to allow for that. -- Simply add a Friend value to Object_Status_T and call -- John_Connor := Friend; -- Notice that Time_Step handles the new enumeral without issue -- c. What happens to the E.T.A. if Running_Speed is 0? Try it. -- Running speed is used as a divisor, so there will be a division -- by 0. This will either return a NaN or raise a Constraint_Error -- depending on value of Real'Machine_Overflows. -- QUESTION 4 - Advanced -- -- Redefine Object_Distance_Km_T as a type instead of subtype. -- Modify the two division to make it work, using explicit casting. end Main;
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_4579_1344.asm
ljhsiun2/medusa
9
163830
<reponame>ljhsiun2/medusa<filename>Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_4579_1344.asm .global s_prepare_buffers s_prepare_buffers: push %r12 push %r15 push %rax push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0xe780, %rdi xor %rax, %rax movl $0x61626364, (%rdi) nop nop cmp $54222, %r12 lea addresses_A_ht+0x1c80, %rsi lea addresses_normal_ht+0x15040, %rdi nop nop cmp $31473, %rbx mov $93, %rcx rep movsw nop nop nop nop nop xor $54050, %rax lea addresses_normal_ht+0xf00, %rax nop nop nop nop nop and %r12, %r12 movb (%rax), %r15b nop sub %rax, %rax lea addresses_WC_ht+0x1e880, %rcx nop nop nop nop cmp %rax, %rax mov $0x6162636465666768, %rsi movq %rsi, %xmm4 vmovups %ymm4, (%rcx) xor %rdi, %rdi lea addresses_normal_ht+0x3680, %rsi lea addresses_WT_ht+0x17070, %rdi nop sub $46064, %rdx mov $94, %rcx rep movsq nop nop sub %rcx, %rcx lea addresses_D_ht+0x7480, %rsi lea addresses_normal_ht+0x101b4, %rdi nop cmp $15781, %rbx mov $11, %rcx rep movsb nop nop and $2746, %rdx lea addresses_WC_ht+0x12c80, %rsi lea addresses_WT_ht+0x1ce80, %rdi nop nop cmp $38498, %rax mov $68, %rcx rep movsw nop nop add %r12, %r12 lea addresses_A_ht+0x1db70, %rdi nop cmp $30027, %rcx movb (%rdi), %al nop nop nop sub %r12, %r12 lea addresses_normal_ht+0x7880, %rdi nop nop nop nop nop dec %rdx movb (%rdi), %r15b nop nop xor $52632, %rdi lea addresses_normal_ht+0x3680, %rsi lea addresses_UC_ht+0x6bf8, %rdi nop nop nop nop and %rbx, %rbx mov $121, %rcx rep movsb nop xor $62155, %rbx lea addresses_WC_ht+0x2c80, %rax nop nop nop nop mfence mov $0x6162636465666768, %r12 movq %r12, %xmm4 vmovups %ymm4, (%rax) nop nop nop sub %r12, %r12 lea addresses_A_ht+0x10e38, %rbx clflush (%rbx) nop sub %r15, %r15 mov (%rbx), %di nop nop nop nop nop sub %r15, %r15 lea addresses_D_ht+0x15a80, %rsi nop xor %rdi, %rdi mov $0x6162636465666768, %r12 movq %r12, %xmm7 vmovups %ymm7, (%rsi) cmp $17560, %rsi lea addresses_UC_ht+0xd920, %rsi lea addresses_WT_ht+0xf380, %rdi clflush (%rdi) nop nop cmp %rax, %rax mov $52, %rcx rep movsl nop nop dec %r12 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rax pop %r15 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r15 push %r9 push %rbx push %rcx // Store mov $0x55ea980000000d00, %rcx nop nop and $15577, %r12 mov $0x5152535455565758, %r9 movq %r9, (%rcx) nop nop nop nop nop cmp %r10, %r10 // Faulty Load lea addresses_PSE+0x1a880, %rbx nop nop nop nop nop add $30089, %r15 movb (%rbx), %cl lea oracles, %rbx and $0xff, %rcx shlq $12, %rcx mov (%rbx,%rcx,1), %rcx pop %rcx pop %rbx pop %r9 pop %r15 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 1, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 10, 'same': True}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': True, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': False}} {'33': 4579} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
lab3_test_harness/Lab1test/ldb.asm
Zaydax/PipelineProcessor
2
170787
.ORIG x3000 LEA R0, B LDB R1, R0, #-2 LDB R2, R0, #-1 LDB R3, R0, #0 LDB R4, R0, #1 LDB R5, R0, #2 LDB R6, R0, #3 HALT A .FILL xDEFA B .FILL x6E4C C .FILL XCAB0 .END
programs/oeis/309/A309330.asm
neoneye/loda
22
103381
; A309330: Numbers k such that 10*k^2 + 40 is a square. ; 6,234,8886,337434,12813606,486579594,18477210966,701647437114,26644125399366,1011775117738794,38420810348674806,1458979018131903834,55402781878663670886,2103846732371087589834,79890773048222664742806,3033745529100090172636794,115202439332755203895455366,4374658949115597657854667114,166121837627059955794581894966,6308255170879162722536257341594,239547574655781123500583197085606,9096499581748803530299625231911434,345427436531798753027885175615548886 mul $0,2 add $0,1 seq $0,5667 ; Numerators of continued fraction convergents to sqrt(10). mul $0,2
stdlib/stdlib.asm
Wynjones1/pycompiler
0
18509
<filename>stdlib/stdlib.asm %define ASCII_0 0x30 %define ASCII_NEWLINE 0xa %define BUFSIZE 10 ; print the integer pointed to by the first argument print: push ebp mov ebp, esp mov eax, [ebp + 8] mov ebx, 10 mov ecx, 0 sub esp, BUFSIZE; reserve space for the integer mov esi, BUFSIZE - 1 sub esi, ecx mov byte [ebp - 1], ASCII_NEWLINE add ecx, 1 ; adjust length .loop: ; push character on the stack ; store length in ecx mov edx, 0 ; zero upper bits of EDX:EAX div ebx ; divide by 10 add edx, ASCII_0 ; adjust to ascii mov esi, BUFSIZE - 1 sub esi, ecx mov [esp + esi], dl; store in the buffer add ecx, 1 ; adjust length cmp eax, 0 ; see if we are done jnz .loop mov eax, 4 ; write syscall mov ebx, 0 ; stdout fd mov edx, ecx ; length of string mov ecx, ebp sub ecx, edx ; location of output string int 0x80 mov esp, ebp pop ebp ret ; get the length of a null terminated string strlen: mov esi, [esp + 4] xor ebx, ebx .start: mov al, [esi + ebx] cmp al, 0 jz .done add ebx, 1 jmp .start .done: mov eax, ebx ret putc: mov edx, 1 mov eax, 4 mov ebx, 0 push 0xa mov ecx, esp int 0x80 add esp, 4 ret ; print a string to stdout prints: push dword [esp + 4] call strlen add esp, 4 mov edx, eax ; length of the string mov eax, 4 ; write syscall mov ebx, 0 ; stdout fd mov ecx, [esp + 4] ; location of string to print int 0x80 push 0xa ;print a newline call putc add esp, 4 ret exit: mov ebx, [esp + 4] mov eax, 1 int 0x80
agda/Text/Greek/SBLGNT/Phlm.agda
scott-fleischman/GreekGrammar
44
9573
module Text.Greek.SBLGNT.Phlm where open import Data.List open import Text.Greek.Bible open import Text.Greek.Script open import Text.Greek.Script.Unicode ΠΡΟΣ-ΦΙΛΗΜΟΝΑ : List (Word) ΠΡΟΣ-ΦΙΛΗΜΟΝΑ = word (Π ∷ α ∷ ῦ ∷ ∙λ ∷ ο ∷ ς ∷ []) "Phlm.1.1" ∷ word (δ ∷ έ ∷ σ ∷ μ ∷ ι ∷ ο ∷ ς ∷ []) "Phlm.1.1" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "Phlm.1.1" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "Phlm.1.1" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Phlm.1.1" ∷ word (Τ ∷ ι ∷ μ ∷ ό ∷ θ ∷ ε ∷ ο ∷ ς ∷ []) "Phlm.1.1" ∷ word (ὁ ∷ []) "Phlm.1.1" ∷ word (ἀ ∷ δ ∷ ε ∷ ∙λ ∷ φ ∷ ὸ ∷ ς ∷ []) "Phlm.1.1" ∷ word (Φ ∷ ι ∷ ∙λ ∷ ή ∷ μ ∷ ο ∷ ν ∷ ι ∷ []) "Phlm.1.1" ∷ word (τ ∷ ῷ ∷ []) "Phlm.1.1" ∷ word (ἀ ∷ γ ∷ α ∷ π ∷ η ∷ τ ∷ ῷ ∷ []) "Phlm.1.1" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Phlm.1.1" ∷ word (σ ∷ υ ∷ ν ∷ ε ∷ ρ ∷ γ ∷ ῷ ∷ []) "Phlm.1.1" ∷ word (ἡ ∷ μ ∷ ῶ ∷ ν ∷ []) "Phlm.1.1" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Phlm.1.2" ∷ word (Ἀ ∷ π ∷ φ ∷ ί ∷ ᾳ ∷ []) "Phlm.1.2" ∷ word (τ ∷ ῇ ∷ []) "Phlm.1.2" ∷ word (ἀ ∷ δ ∷ ε ∷ ∙λ ∷ φ ∷ ῇ ∷ []) "Phlm.1.2" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Phlm.1.2" ∷ word (Ἀ ∷ ρ ∷ χ ∷ ί ∷ π ∷ π ∷ ῳ ∷ []) "Phlm.1.2" ∷ word (τ ∷ ῷ ∷ []) "Phlm.1.2" ∷ word (σ ∷ υ ∷ σ ∷ τ ∷ ρ ∷ α ∷ τ ∷ ι ∷ ώ ∷ τ ∷ ῃ ∷ []) "Phlm.1.2" ∷ word (ἡ ∷ μ ∷ ῶ ∷ ν ∷ []) "Phlm.1.2" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Phlm.1.2" ∷ word (τ ∷ ῇ ∷ []) "Phlm.1.2" ∷ word (κ ∷ α ∷ τ ∷ []) "Phlm.1.2" ∷ word (ο ∷ ἶ ∷ κ ∷ ό ∷ ν ∷ []) "Phlm.1.2" ∷ word (σ ∷ ο ∷ υ ∷ []) "Phlm.1.2" ∷ word (ἐ ∷ κ ∷ κ ∷ ∙λ ∷ η ∷ σ ∷ ί ∷ ᾳ ∷ []) "Phlm.1.2" ∷ word (χ ∷ ά ∷ ρ ∷ ι ∷ ς ∷ []) "Phlm.1.3" ∷ word (ὑ ∷ μ ∷ ῖ ∷ ν ∷ []) "Phlm.1.3" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Phlm.1.3" ∷ word (ε ∷ ἰ ∷ ρ ∷ ή ∷ ν ∷ η ∷ []) "Phlm.1.3" ∷ word (ἀ ∷ π ∷ ὸ ∷ []) "Phlm.1.3" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "Phlm.1.3" ∷ word (π ∷ α ∷ τ ∷ ρ ∷ ὸ ∷ ς ∷ []) "Phlm.1.3" ∷ word (ἡ ∷ μ ∷ ῶ ∷ ν ∷ []) "Phlm.1.3" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Phlm.1.3" ∷ word (κ ∷ υ ∷ ρ ∷ ί ∷ ο ∷ υ ∷ []) "Phlm.1.3" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "Phlm.1.3" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "Phlm.1.3" ∷ word (Ε ∷ ὐ ∷ χ ∷ α ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ῶ ∷ []) "Phlm.1.4" ∷ word (τ ∷ ῷ ∷ []) "Phlm.1.4" ∷ word (θ ∷ ε ∷ ῷ ∷ []) "Phlm.1.4" ∷ word (μ ∷ ο ∷ υ ∷ []) "Phlm.1.4" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ ο ∷ τ ∷ ε ∷ []) "Phlm.1.4" ∷ word (μ ∷ ν ∷ ε ∷ ί ∷ α ∷ ν ∷ []) "Phlm.1.4" ∷ word (σ ∷ ο ∷ υ ∷ []) "Phlm.1.4" ∷ word (π ∷ ο ∷ ι ∷ ο ∷ ύ ∷ μ ∷ ε ∷ ν ∷ ο ∷ ς ∷ []) "Phlm.1.4" ∷ word (ἐ ∷ π ∷ ὶ ∷ []) "Phlm.1.4" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "Phlm.1.4" ∷ word (π ∷ ρ ∷ ο ∷ σ ∷ ε ∷ υ ∷ χ ∷ ῶ ∷ ν ∷ []) "Phlm.1.4" ∷ word (μ ∷ ο ∷ υ ∷ []) "Phlm.1.4" ∷ word (ἀ ∷ κ ∷ ο ∷ ύ ∷ ω ∷ ν ∷ []) "Phlm.1.5" ∷ word (σ ∷ ο ∷ υ ∷ []) "Phlm.1.5" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Phlm.1.5" ∷ word (ἀ ∷ γ ∷ ά ∷ π ∷ η ∷ ν ∷ []) "Phlm.1.5" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Phlm.1.5" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Phlm.1.5" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "Phlm.1.5" ∷ word (ἣ ∷ ν ∷ []) "Phlm.1.5" ∷ word (ἔ ∷ χ ∷ ε ∷ ι ∷ ς ∷ []) "Phlm.1.5" ∷ word (π ∷ ρ ∷ ὸ ∷ ς ∷ []) "Phlm.1.5" ∷ word (τ ∷ ὸ ∷ ν ∷ []) "Phlm.1.5" ∷ word (κ ∷ ύ ∷ ρ ∷ ι ∷ ο ∷ ν ∷ []) "Phlm.1.5" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ ν ∷ []) "Phlm.1.5" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Phlm.1.5" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "Phlm.1.5" ∷ word (π ∷ ά ∷ ν ∷ τ ∷ α ∷ ς ∷ []) "Phlm.1.5" ∷ word (τ ∷ ο ∷ ὺ ∷ ς ∷ []) "Phlm.1.5" ∷ word (ἁ ∷ γ ∷ ί ∷ ο ∷ υ ∷ ς ∷ []) "Phlm.1.5" ∷ word (ὅ ∷ π ∷ ω ∷ ς ∷ []) "Phlm.1.6" ∷ word (ἡ ∷ []) "Phlm.1.6" ∷ word (κ ∷ ο ∷ ι ∷ ν ∷ ω ∷ ν ∷ ί ∷ α ∷ []) "Phlm.1.6" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Phlm.1.6" ∷ word (π ∷ ί ∷ σ ∷ τ ∷ ε ∷ ώ ∷ ς ∷ []) "Phlm.1.6" ∷ word (σ ∷ ο ∷ υ ∷ []) "Phlm.1.6" ∷ word (ἐ ∷ ν ∷ ε ∷ ρ ∷ γ ∷ ὴ ∷ ς ∷ []) "Phlm.1.6" ∷ word (γ ∷ έ ∷ ν ∷ η ∷ τ ∷ α ∷ ι ∷ []) "Phlm.1.6" ∷ word (ἐ ∷ ν ∷ []) "Phlm.1.6" ∷ word (ἐ ∷ π ∷ ι ∷ γ ∷ ν ∷ ώ ∷ σ ∷ ε ∷ ι ∷ []) "Phlm.1.6" ∷ word (π ∷ α ∷ ν ∷ τ ∷ ὸ ∷ ς ∷ []) "Phlm.1.6" ∷ word (ἀ ∷ γ ∷ α ∷ θ ∷ ο ∷ ῦ ∷ []) "Phlm.1.6" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Phlm.1.6" ∷ word (ἐ ∷ ν ∷ []) "Phlm.1.6" ∷ word (ἡ ∷ μ ∷ ῖ ∷ ν ∷ []) "Phlm.1.6" ∷ word (ε ∷ ἰ ∷ ς ∷ []) "Phlm.1.6" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ό ∷ ν ∷ []) "Phlm.1.6" ∷ word (χ ∷ α ∷ ρ ∷ ὰ ∷ ν ∷ []) "Phlm.1.7" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "Phlm.1.7" ∷ word (π ∷ ο ∷ ∙λ ∷ ∙λ ∷ ὴ ∷ ν ∷ []) "Phlm.1.7" ∷ word (ἔ ∷ σ ∷ χ ∷ ο ∷ ν ∷ []) "Phlm.1.7" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Phlm.1.7" ∷ word (π ∷ α ∷ ρ ∷ ά ∷ κ ∷ ∙λ ∷ η ∷ σ ∷ ι ∷ ν ∷ []) "Phlm.1.7" ∷ word (ἐ ∷ π ∷ ὶ ∷ []) "Phlm.1.7" ∷ word (τ ∷ ῇ ∷ []) "Phlm.1.7" ∷ word (ἀ ∷ γ ∷ ά ∷ π ∷ ῃ ∷ []) "Phlm.1.7" ∷ word (σ ∷ ο ∷ υ ∷ []) "Phlm.1.7" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "Phlm.1.7" ∷ word (τ ∷ ὰ ∷ []) "Phlm.1.7" ∷ word (σ ∷ π ∷ ∙λ ∷ ά ∷ γ ∷ χ ∷ ν ∷ α ∷ []) "Phlm.1.7" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "Phlm.1.7" ∷ word (ἁ ∷ γ ∷ ί ∷ ω ∷ ν ∷ []) "Phlm.1.7" ∷ word (ἀ ∷ ν ∷ α ∷ π ∷ έ ∷ π ∷ α ∷ υ ∷ τ ∷ α ∷ ι ∷ []) "Phlm.1.7" ∷ word (δ ∷ ι ∷ ὰ ∷ []) "Phlm.1.7" ∷ word (σ ∷ ο ∷ ῦ ∷ []) "Phlm.1.7" ∷ word (ἀ ∷ δ ∷ ε ∷ ∙λ ∷ φ ∷ έ ∷ []) "Phlm.1.7" ∷ word (Δ ∷ ι ∷ ό ∷ []) "Phlm.1.8" ∷ word (π ∷ ο ∷ ∙λ ∷ ∙λ ∷ ὴ ∷ ν ∷ []) "Phlm.1.8" ∷ word (ἐ ∷ ν ∷ []) "Phlm.1.8" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ῷ ∷ []) "Phlm.1.8" ∷ word (π ∷ α ∷ ρ ∷ ρ ∷ η ∷ σ ∷ ί ∷ α ∷ ν ∷ []) "Phlm.1.8" ∷ word (ἔ ∷ χ ∷ ω ∷ ν ∷ []) "Phlm.1.8" ∷ word (ἐ ∷ π ∷ ι ∷ τ ∷ ά ∷ σ ∷ σ ∷ ε ∷ ι ∷ ν ∷ []) "Phlm.1.8" ∷ word (σ ∷ ο ∷ ι ∷ []) "Phlm.1.8" ∷ word (τ ∷ ὸ ∷ []) "Phlm.1.8" ∷ word (ἀ ∷ ν ∷ ῆ ∷ κ ∷ ο ∷ ν ∷ []) "Phlm.1.8" ∷ word (δ ∷ ι ∷ ὰ ∷ []) "Phlm.1.9" ∷ word (τ ∷ ὴ ∷ ν ∷ []) "Phlm.1.9" ∷ word (ἀ ∷ γ ∷ ά ∷ π ∷ η ∷ ν ∷ []) "Phlm.1.9" ∷ word (μ ∷ ᾶ ∷ ∙λ ∷ ∙λ ∷ ο ∷ ν ∷ []) "Phlm.1.9" ∷ word (π ∷ α ∷ ρ ∷ α ∷ κ ∷ α ∷ ∙λ ∷ ῶ ∷ []) "Phlm.1.9" ∷ word (τ ∷ ο ∷ ι ∷ ο ∷ ῦ ∷ τ ∷ ο ∷ ς ∷ []) "Phlm.1.9" ∷ word (ὢ ∷ ν ∷ []) "Phlm.1.9" ∷ word (ὡ ∷ ς ∷ []) "Phlm.1.9" ∷ word (Π ∷ α ∷ ῦ ∷ ∙λ ∷ ο ∷ ς ∷ []) "Phlm.1.9" ∷ word (π ∷ ρ ∷ ε ∷ σ ∷ β ∷ ύ ∷ τ ∷ η ∷ ς ∷ []) "Phlm.1.9" ∷ word (ν ∷ υ ∷ ν ∷ ὶ ∷ []) "Phlm.1.9" ∷ word (δ ∷ ὲ ∷ []) "Phlm.1.9" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Phlm.1.9" ∷ word (δ ∷ έ ∷ σ ∷ μ ∷ ι ∷ ο ∷ ς ∷ []) "Phlm.1.9" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "Phlm.1.9" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "Phlm.1.9" ∷ word (π ∷ α ∷ ρ ∷ α ∷ κ ∷ α ∷ ∙λ ∷ ῶ ∷ []) "Phlm.1.10" ∷ word (σ ∷ ε ∷ []) "Phlm.1.10" ∷ word (π ∷ ε ∷ ρ ∷ ὶ ∷ []) "Phlm.1.10" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Phlm.1.10" ∷ word (ἐ ∷ μ ∷ ο ∷ ῦ ∷ []) "Phlm.1.10" ∷ word (τ ∷ έ ∷ κ ∷ ν ∷ ο ∷ υ ∷ []) "Phlm.1.10" ∷ word (ὃ ∷ ν ∷ []) "Phlm.1.10" ∷ word (ἐ ∷ γ ∷ έ ∷ ν ∷ ν ∷ η ∷ σ ∷ α ∷ []) "Phlm.1.10" ∷ word (ἐ ∷ ν ∷ []) "Phlm.1.10" ∷ word (τ ∷ ο ∷ ῖ ∷ ς ∷ []) "Phlm.1.10" ∷ word (δ ∷ ε ∷ σ ∷ μ ∷ ο ∷ ῖ ∷ ς ∷ []) "Phlm.1.10" ∷ word (Ὀ ∷ ν ∷ ή ∷ σ ∷ ι ∷ μ ∷ ο ∷ ν ∷ []) "Phlm.1.10" ∷ word (τ ∷ ό ∷ ν ∷ []) "Phlm.1.11" ∷ word (π ∷ ο ∷ τ ∷ έ ∷ []) "Phlm.1.11" ∷ word (σ ∷ ο ∷ ι ∷ []) "Phlm.1.11" ∷ word (ἄ ∷ χ ∷ ρ ∷ η ∷ σ ∷ τ ∷ ο ∷ ν ∷ []) "Phlm.1.11" ∷ word (ν ∷ υ ∷ ν ∷ ὶ ∷ []) "Phlm.1.11" ∷ word (δ ∷ ὲ ∷ []) "Phlm.1.11" ∷ word (σ ∷ ο ∷ ὶ ∷ []) "Phlm.1.11" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Phlm.1.11" ∷ word (ἐ ∷ μ ∷ ο ∷ ὶ ∷ []) "Phlm.1.11" ∷ word (ε ∷ ὔ ∷ χ ∷ ρ ∷ η ∷ σ ∷ τ ∷ ο ∷ ν ∷ []) "Phlm.1.11" ∷ word (ὃ ∷ ν ∷ []) "Phlm.1.12" ∷ word (ἀ ∷ ν ∷ έ ∷ π ∷ ε ∷ μ ∷ ψ ∷ ά ∷ []) "Phlm.1.12" ∷ word (σ ∷ ο ∷ ι ∷ []) "Phlm.1.12" ∷ word (α ∷ ὐ ∷ τ ∷ ό ∷ ν ∷ []) "Phlm.1.12" ∷ word (τ ∷ ο ∷ ῦ ∷ τ ∷ []) "Phlm.1.12" ∷ word (ἔ ∷ σ ∷ τ ∷ ι ∷ ν ∷ []) "Phlm.1.12" ∷ word (τ ∷ ὰ ∷ []) "Phlm.1.12" ∷ word (ἐ ∷ μ ∷ ὰ ∷ []) "Phlm.1.12" ∷ word (σ ∷ π ∷ ∙λ ∷ ά ∷ γ ∷ χ ∷ ν ∷ α ∷ []) "Phlm.1.12" ∷ word (ὃ ∷ ν ∷ []) "Phlm.1.13" ∷ word (ἐ ∷ γ ∷ ὼ ∷ []) "Phlm.1.13" ∷ word (ἐ ∷ β ∷ ο ∷ υ ∷ ∙λ ∷ ό ∷ μ ∷ η ∷ ν ∷ []) "Phlm.1.13" ∷ word (π ∷ ρ ∷ ὸ ∷ ς ∷ []) "Phlm.1.13" ∷ word (ἐ ∷ μ ∷ α ∷ υ ∷ τ ∷ ὸ ∷ ν ∷ []) "Phlm.1.13" ∷ word (κ ∷ α ∷ τ ∷ έ ∷ χ ∷ ε ∷ ι ∷ ν ∷ []) "Phlm.1.13" ∷ word (ἵ ∷ ν ∷ α ∷ []) "Phlm.1.13" ∷ word (ὑ ∷ π ∷ ὲ ∷ ρ ∷ []) "Phlm.1.13" ∷ word (σ ∷ ο ∷ ῦ ∷ []) "Phlm.1.13" ∷ word (μ ∷ ο ∷ ι ∷ []) "Phlm.1.13" ∷ word (δ ∷ ι ∷ α ∷ κ ∷ ο ∷ ν ∷ ῇ ∷ []) "Phlm.1.13" ∷ word (ἐ ∷ ν ∷ []) "Phlm.1.13" ∷ word (τ ∷ ο ∷ ῖ ∷ ς ∷ []) "Phlm.1.13" ∷ word (δ ∷ ε ∷ σ ∷ μ ∷ ο ∷ ῖ ∷ ς ∷ []) "Phlm.1.13" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Phlm.1.13" ∷ word (ε ∷ ὐ ∷ α ∷ γ ∷ γ ∷ ε ∷ ∙λ ∷ ί ∷ ο ∷ υ ∷ []) "Phlm.1.13" ∷ word (χ ∷ ω ∷ ρ ∷ ὶ ∷ ς ∷ []) "Phlm.1.14" ∷ word (δ ∷ ὲ ∷ []) "Phlm.1.14" ∷ word (τ ∷ ῆ ∷ ς ∷ []) "Phlm.1.14" ∷ word (σ ∷ ῆ ∷ ς ∷ []) "Phlm.1.14" ∷ word (γ ∷ ν ∷ ώ ∷ μ ∷ η ∷ ς ∷ []) "Phlm.1.14" ∷ word (ο ∷ ὐ ∷ δ ∷ ὲ ∷ ν ∷ []) "Phlm.1.14" ∷ word (ἠ ∷ θ ∷ έ ∷ ∙λ ∷ η ∷ σ ∷ α ∷ []) "Phlm.1.14" ∷ word (π ∷ ο ∷ ι ∷ ῆ ∷ σ ∷ α ∷ ι ∷ []) "Phlm.1.14" ∷ word (ἵ ∷ ν ∷ α ∷ []) "Phlm.1.14" ∷ word (μ ∷ ὴ ∷ []) "Phlm.1.14" ∷ word (ὡ ∷ ς ∷ []) "Phlm.1.14" ∷ word (κ ∷ α ∷ τ ∷ ὰ ∷ []) "Phlm.1.14" ∷ word (ἀ ∷ ν ∷ ά ∷ γ ∷ κ ∷ η ∷ ν ∷ []) "Phlm.1.14" ∷ word (τ ∷ ὸ ∷ []) "Phlm.1.14" ∷ word (ἀ ∷ γ ∷ α ∷ θ ∷ ό ∷ ν ∷ []) "Phlm.1.14" ∷ word (σ ∷ ο ∷ υ ∷ []) "Phlm.1.14" ∷ word (ᾖ ∷ []) "Phlm.1.14" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ ὰ ∷ []) "Phlm.1.14" ∷ word (κ ∷ α ∷ τ ∷ ὰ ∷ []) "Phlm.1.14" ∷ word (ἑ ∷ κ ∷ ο ∷ ύ ∷ σ ∷ ι ∷ ο ∷ ν ∷ []) "Phlm.1.14" ∷ word (τ ∷ ά ∷ χ ∷ α ∷ []) "Phlm.1.15" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "Phlm.1.15" ∷ word (δ ∷ ι ∷ ὰ ∷ []) "Phlm.1.15" ∷ word (τ ∷ ο ∷ ῦ ∷ τ ∷ ο ∷ []) "Phlm.1.15" ∷ word (ἐ ∷ χ ∷ ω ∷ ρ ∷ ί ∷ σ ∷ θ ∷ η ∷ []) "Phlm.1.15" ∷ word (π ∷ ρ ∷ ὸ ∷ ς ∷ []) "Phlm.1.15" ∷ word (ὥ ∷ ρ ∷ α ∷ ν ∷ []) "Phlm.1.15" ∷ word (ἵ ∷ ν ∷ α ∷ []) "Phlm.1.15" ∷ word (α ∷ ἰ ∷ ώ ∷ ν ∷ ι ∷ ο ∷ ν ∷ []) "Phlm.1.15" ∷ word (α ∷ ὐ ∷ τ ∷ ὸ ∷ ν ∷ []) "Phlm.1.15" ∷ word (ἀ ∷ π ∷ έ ∷ χ ∷ ῃ ∷ ς ∷ []) "Phlm.1.15" ∷ word (ο ∷ ὐ ∷ κ ∷ έ ∷ τ ∷ ι ∷ []) "Phlm.1.16" ∷ word (ὡ ∷ ς ∷ []) "Phlm.1.16" ∷ word (δ ∷ ο ∷ ῦ ∷ ∙λ ∷ ο ∷ ν ∷ []) "Phlm.1.16" ∷ word (ἀ ∷ ∙λ ∷ ∙λ ∷ ὰ ∷ []) "Phlm.1.16" ∷ word (ὑ ∷ π ∷ ὲ ∷ ρ ∷ []) "Phlm.1.16" ∷ word (δ ∷ ο ∷ ῦ ∷ ∙λ ∷ ο ∷ ν ∷ []) "Phlm.1.16" ∷ word (ἀ ∷ δ ∷ ε ∷ ∙λ ∷ φ ∷ ὸ ∷ ν ∷ []) "Phlm.1.16" ∷ word (ἀ ∷ γ ∷ α ∷ π ∷ η ∷ τ ∷ ό ∷ ν ∷ []) "Phlm.1.16" ∷ word (μ ∷ ά ∷ ∙λ ∷ ι ∷ σ ∷ τ ∷ α ∷ []) "Phlm.1.16" ∷ word (ἐ ∷ μ ∷ ο ∷ ί ∷ []) "Phlm.1.16" ∷ word (π ∷ ό ∷ σ ∷ ῳ ∷ []) "Phlm.1.16" ∷ word (δ ∷ ὲ ∷ []) "Phlm.1.16" ∷ word (μ ∷ ᾶ ∷ ∙λ ∷ ∙λ ∷ ο ∷ ν ∷ []) "Phlm.1.16" ∷ word (σ ∷ ο ∷ ὶ ∷ []) "Phlm.1.16" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Phlm.1.16" ∷ word (ἐ ∷ ν ∷ []) "Phlm.1.16" ∷ word (σ ∷ α ∷ ρ ∷ κ ∷ ὶ ∷ []) "Phlm.1.16" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Phlm.1.16" ∷ word (ἐ ∷ ν ∷ []) "Phlm.1.16" ∷ word (κ ∷ υ ∷ ρ ∷ ί ∷ ῳ ∷ []) "Phlm.1.16" ∷ word (Ε ∷ ἰ ∷ []) "Phlm.1.17" ∷ word (ο ∷ ὖ ∷ ν ∷ []) "Phlm.1.17" ∷ word (μ ∷ ε ∷ []) "Phlm.1.17" ∷ word (ἔ ∷ χ ∷ ε ∷ ι ∷ ς ∷ []) "Phlm.1.17" ∷ word (κ ∷ ο ∷ ι ∷ ν ∷ ω ∷ ν ∷ ό ∷ ν ∷ []) "Phlm.1.17" ∷ word (π ∷ ρ ∷ ο ∷ σ ∷ ∙λ ∷ α ∷ β ∷ ο ∷ ῦ ∷ []) "Phlm.1.17" ∷ word (α ∷ ὐ ∷ τ ∷ ὸ ∷ ν ∷ []) "Phlm.1.17" ∷ word (ὡ ∷ ς ∷ []) "Phlm.1.17" ∷ word (ἐ ∷ μ ∷ έ ∷ []) "Phlm.1.17" ∷ word (ε ∷ ἰ ∷ []) "Phlm.1.18" ∷ word (δ ∷ έ ∷ []) "Phlm.1.18" ∷ word (τ ∷ ι ∷ []) "Phlm.1.18" ∷ word (ἠ ∷ δ ∷ ί ∷ κ ∷ η ∷ σ ∷ έ ∷ ν ∷ []) "Phlm.1.18" ∷ word (σ ∷ ε ∷ []) "Phlm.1.18" ∷ word (ἢ ∷ []) "Phlm.1.18" ∷ word (ὀ ∷ φ ∷ ε ∷ ί ∷ ∙λ ∷ ε ∷ ι ∷ []) "Phlm.1.18" ∷ word (τ ∷ ο ∷ ῦ ∷ τ ∷ ο ∷ []) "Phlm.1.18" ∷ word (ἐ ∷ μ ∷ ο ∷ ὶ ∷ []) "Phlm.1.18" ∷ word (ἐ ∷ ∙λ ∷ ∙λ ∷ ό ∷ γ ∷ α ∷ []) "Phlm.1.18" ∷ word (ἐ ∷ γ ∷ ὼ ∷ []) "Phlm.1.19" ∷ word (Π ∷ α ∷ ῦ ∷ ∙λ ∷ ο ∷ ς ∷ []) "Phlm.1.19" ∷ word (ἔ ∷ γ ∷ ρ ∷ α ∷ ψ ∷ α ∷ []) "Phlm.1.19" ∷ word (τ ∷ ῇ ∷ []) "Phlm.1.19" ∷ word (ἐ ∷ μ ∷ ῇ ∷ []) "Phlm.1.19" ∷ word (χ ∷ ε ∷ ι ∷ ρ ∷ ί ∷ []) "Phlm.1.19" ∷ word (ἐ ∷ γ ∷ ὼ ∷ []) "Phlm.1.19" ∷ word (ἀ ∷ π ∷ ο ∷ τ ∷ ί ∷ σ ∷ ω ∷ []) "Phlm.1.19" ∷ word (ἵ ∷ ν ∷ α ∷ []) "Phlm.1.19" ∷ word (μ ∷ ὴ ∷ []) "Phlm.1.19" ∷ word (∙λ ∷ έ ∷ γ ∷ ω ∷ []) "Phlm.1.19" ∷ word (σ ∷ ο ∷ ι ∷ []) "Phlm.1.19" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "Phlm.1.19" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Phlm.1.19" ∷ word (σ ∷ ε ∷ α ∷ υ ∷ τ ∷ ό ∷ ν ∷ []) "Phlm.1.19" ∷ word (μ ∷ ο ∷ ι ∷ []) "Phlm.1.19" ∷ word (π ∷ ρ ∷ ο ∷ σ ∷ ο ∷ φ ∷ ε ∷ ί ∷ ∙λ ∷ ε ∷ ι ∷ ς ∷ []) "Phlm.1.19" ∷ word (ν ∷ α ∷ ί ∷ []) "Phlm.1.20" ∷ word (ἀ ∷ δ ∷ ε ∷ ∙λ ∷ φ ∷ έ ∷ []) "Phlm.1.20" ∷ word (ἐ ∷ γ ∷ ώ ∷ []) "Phlm.1.20" ∷ word (σ ∷ ο ∷ υ ∷ []) "Phlm.1.20" ∷ word (ὀ ∷ ν ∷ α ∷ ί ∷ μ ∷ η ∷ ν ∷ []) "Phlm.1.20" ∷ word (ἐ ∷ ν ∷ []) "Phlm.1.20" ∷ word (κ ∷ υ ∷ ρ ∷ ί ∷ ῳ ∷ []) "Phlm.1.20" ∷ word (ἀ ∷ ν ∷ ά ∷ π ∷ α ∷ υ ∷ σ ∷ ό ∷ ν ∷ []) "Phlm.1.20" ∷ word (μ ∷ ο ∷ υ ∷ []) "Phlm.1.20" ∷ word (τ ∷ ὰ ∷ []) "Phlm.1.20" ∷ word (σ ∷ π ∷ ∙λ ∷ ά ∷ γ ∷ χ ∷ ν ∷ α ∷ []) "Phlm.1.20" ∷ word (ἐ ∷ ν ∷ []) "Phlm.1.20" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ῷ ∷ []) "Phlm.1.20" ∷ word (π ∷ ε ∷ π ∷ ο ∷ ι ∷ θ ∷ ὼ ∷ ς ∷ []) "Phlm.1.21" ∷ word (τ ∷ ῇ ∷ []) "Phlm.1.21" ∷ word (ὑ ∷ π ∷ α ∷ κ ∷ ο ∷ ῇ ∷ []) "Phlm.1.21" ∷ word (σ ∷ ο ∷ υ ∷ []) "Phlm.1.21" ∷ word (ἔ ∷ γ ∷ ρ ∷ α ∷ ψ ∷ ά ∷ []) "Phlm.1.21" ∷ word (σ ∷ ο ∷ ι ∷ []) "Phlm.1.21" ∷ word (ε ∷ ἰ ∷ δ ∷ ὼ ∷ ς ∷ []) "Phlm.1.21" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "Phlm.1.21" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Phlm.1.21" ∷ word (ὑ ∷ π ∷ ὲ ∷ ρ ∷ []) "Phlm.1.21" ∷ word (ἃ ∷ []) "Phlm.1.21" ∷ word (∙λ ∷ έ ∷ γ ∷ ω ∷ []) "Phlm.1.21" ∷ word (π ∷ ο ∷ ι ∷ ή ∷ σ ∷ ε ∷ ι ∷ ς ∷ []) "Phlm.1.21" ∷ word (ἅ ∷ μ ∷ α ∷ []) "Phlm.1.22" ∷ word (δ ∷ ὲ ∷ []) "Phlm.1.22" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Phlm.1.22" ∷ word (ἑ ∷ τ ∷ ο ∷ ί ∷ μ ∷ α ∷ ζ ∷ έ ∷ []) "Phlm.1.22" ∷ word (μ ∷ ο ∷ ι ∷ []) "Phlm.1.22" ∷ word (ξ ∷ ε ∷ ν ∷ ί ∷ α ∷ ν ∷ []) "Phlm.1.22" ∷ word (ἐ ∷ ∙λ ∷ π ∷ ί ∷ ζ ∷ ω ∷ []) "Phlm.1.22" ∷ word (γ ∷ ὰ ∷ ρ ∷ []) "Phlm.1.22" ∷ word (ὅ ∷ τ ∷ ι ∷ []) "Phlm.1.22" ∷ word (δ ∷ ι ∷ ὰ ∷ []) "Phlm.1.22" ∷ word (τ ∷ ῶ ∷ ν ∷ []) "Phlm.1.22" ∷ word (π ∷ ρ ∷ ο ∷ σ ∷ ε ∷ υ ∷ χ ∷ ῶ ∷ ν ∷ []) "Phlm.1.22" ∷ word (ὑ ∷ μ ∷ ῶ ∷ ν ∷ []) "Phlm.1.22" ∷ word (χ ∷ α ∷ ρ ∷ ι ∷ σ ∷ θ ∷ ή ∷ σ ∷ ο ∷ μ ∷ α ∷ ι ∷ []) "Phlm.1.22" ∷ word (ὑ ∷ μ ∷ ῖ ∷ ν ∷ []) "Phlm.1.22" ∷ word (Ἀ ∷ σ ∷ π ∷ ά ∷ ζ ∷ ε ∷ τ ∷ α ∷ ί ∷ []) "Phlm.1.23" ∷ word (σ ∷ ε ∷ []) "Phlm.1.23" ∷ word (Ἐ ∷ π ∷ α ∷ φ ∷ ρ ∷ ᾶ ∷ ς ∷ []) "Phlm.1.23" ∷ word (ὁ ∷ []) "Phlm.1.23" ∷ word (σ ∷ υ ∷ ν ∷ α ∷ ι ∷ χ ∷ μ ∷ ά ∷ ∙λ ∷ ω ∷ τ ∷ ό ∷ ς ∷ []) "Phlm.1.23" ∷ word (μ ∷ ο ∷ υ ∷ []) "Phlm.1.23" ∷ word (ἐ ∷ ν ∷ []) "Phlm.1.23" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ῷ ∷ []) "Phlm.1.23" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "Phlm.1.23" ∷ word (Μ ∷ ᾶ ∷ ρ ∷ κ ∷ ο ∷ ς ∷ []) "Phlm.1.24" ∷ word (Ἀ ∷ ρ ∷ ί ∷ σ ∷ τ ∷ α ∷ ρ ∷ χ ∷ ο ∷ ς ∷ []) "Phlm.1.24" ∷ word (Δ ∷ η ∷ μ ∷ ᾶ ∷ ς ∷ []) "Phlm.1.24" ∷ word (Λ ∷ ο ∷ υ ∷ κ ∷ ᾶ ∷ ς ∷ []) "Phlm.1.24" ∷ word (ο ∷ ἱ ∷ []) "Phlm.1.24" ∷ word (σ ∷ υ ∷ ν ∷ ε ∷ ρ ∷ γ ∷ ο ∷ ί ∷ []) "Phlm.1.24" ∷ word (μ ∷ ο ∷ υ ∷ []) "Phlm.1.24" ∷ word (Ἡ ∷ []) "Phlm.1.25" ∷ word (χ ∷ ά ∷ ρ ∷ ι ∷ ς ∷ []) "Phlm.1.25" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Phlm.1.25" ∷ word (κ ∷ υ ∷ ρ ∷ ί ∷ ο ∷ υ ∷ []) "Phlm.1.25" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "Phlm.1.25" ∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ []) "Phlm.1.25" ∷ word (μ ∷ ε ∷ τ ∷ ὰ ∷ []) "Phlm.1.25" ∷ word (τ ∷ ο ∷ ῦ ∷ []) "Phlm.1.25" ∷ word (π ∷ ν ∷ ε ∷ ύ ∷ μ ∷ α ∷ τ ∷ ο ∷ ς ∷ []) "Phlm.1.25" ∷ word (ὑ ∷ μ ∷ ῶ ∷ ν ∷ []) "Phlm.1.25" ∷ []
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_429.asm
ljhsiun2/medusa
9
21554
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r14 push %r8 push %r9 push %rbp push %rcx push %rdi push %rsi lea addresses_WC_ht+0xea78, %rsi lea addresses_WC_ht+0x8bb0, %rdi clflush (%rsi) inc %rbp mov $109, %rcx rep movsb nop nop nop and %r8, %r8 lea addresses_normal_ht+0xffb0, %r9 nop nop nop nop nop and %rcx, %rcx movl $0x61626364, (%r9) nop xor $31844, %rsi lea addresses_A_ht+0x11278, %r9 nop nop nop add %rdi, %rdi movb (%r9), %r8b add $16444, %rbp lea addresses_normal_ht+0x163b0, %rdi and $12935, %r14 mov $0x6162636465666768, %rsi movq %rsi, %xmm6 movups %xmm6, (%rdi) nop nop sub %rcx, %rcx lea addresses_WC_ht+0x17ad0, %r9 nop nop nop nop xor $45494, %r8 movw $0x6162, (%r9) nop nop nop sub $64984, %rcx lea addresses_D_ht+0x87b0, %rcx nop nop nop cmp $30455, %rsi movb (%rcx), %r8b add %r14, %r14 lea addresses_WC_ht+0x4eb8, %rsi nop nop nop nop nop inc %r8 movups (%rsi), %xmm6 vpextrq $1, %xmm6, %rdi nop nop nop nop cmp %r8, %r8 lea addresses_UC_ht+0x7d90, %rsi lea addresses_D_ht+0xdeb0, %rdi clflush (%rdi) nop nop dec %r10 mov $67, %rcx rep movsw nop nop nop add $23134, %rcx pop %rsi pop %rdi pop %rcx pop %rbp pop %r9 pop %r8 pop %r14 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r13 push %r8 push %rax push %rbp push %rdi push %rdx // Store mov $0x230, %rbp nop nop nop nop nop and %rdx, %rdx movw $0x5152, (%rbp) nop nop xor $25305, %r13 // Faulty Load lea addresses_PSE+0x14bb0, %rdi nop nop and %rax, %rax vmovups (%rdi), %ymm2 vextracti128 $1, %ymm2, %xmm2 vpextrq $0, %xmm2, %r10 lea oracles, %r13 and $0xff, %r10 shlq $12, %r10 mov (%r13,%r10,1), %r10 pop %rdx pop %rdi pop %rbp pop %rax pop %r8 pop %r13 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_P', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 5}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 11, 'type': 'addresses_WC_ht'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 9}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A_ht', 'NT': True, 'AVXalign': False, 'size': 1, 'congruent': 1}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 9}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 4}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 8}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 2}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 2, 'type': 'addresses_D_ht'}} {'33': 21829} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/controlled_record.ads
best08618/asylo
7
30382
<filename>gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/controlled_record.ads with Ada.Finalization; package Controlled_Record is type Point_T is limited private; procedure Assert_Invariants (PA : Point_T); private type Coords_T is array (1 .. 2) of Natural; type Point_T is new Ada.Finalization.Controlled with record Pos : Coords_T := (0, 0); end record; end Controlled_Record;