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
data/pokemon/base_stats/numel.asm
AtmaBuster/pokeplat-gen2
6
99453
<gh_stars>1-10 db 0 ; species ID placeholder db 60, 60, 40, 35, 65, 45 ; hp atk def spd sat sdf db FIRE, GROUND ; type db 255 ; catch rate db 88 ; base exp db ICE_BERRY, ICE_BERRY ; items db GENDER_F50 ; gender ratio db 20 ; step cycles to hatch INCBIN "gfx/pokemon/numel/front.dimensions" db GROWTH_MEDIUM_FAST ; growth rate dn EGG_GROUND, EGG_GROUND ; egg groups db 70 ; happiness ; tm/hm learnset tmhm TOXIC, HIDDEN_POWER, SUNNY_DAY, PROTECT, FRUSTRATION, EARTHQUAKE, RETURN, DIG, DOUBLE_TEAM, FLAMETHROWER, SANDSTORM, FIRE_BLAST, ROCK_TOMB, FACADE, SECRET_POWER, REST, ATTRACT, OVERHEAT, ENDURE, WILL_O_WISP, STEALTH_ROCK, CAPTIVATE, ROCK_SLIDE, SLEEP_TALK, NATURAL_GIFT, SWAGGER, SUBSTITUTE, STRENGTH, ROCK_SMASH, EARTH_POWER, HEAT_WAVE, MUD_SLAP, ROLLOUT, SNORE ; end
programs/oeis/024/A024501.asm
neoneye/loda
22
179339
<gh_stars>10-100 ; A024501: [ C(4n,2n)/C(4n,n) ]. ; 1,1,2,4,7,11,20,33,57,96,162,274,462,780,1317,2223,3751,6329,10680,18021,30409,51312,86584,146103,246538,416013,701993,1184566,1998882,3372999,5691754,9604549,16207222,27348969,46150243,77876717,131414064 sub $1,$0 mov $2,$0 sub $2,$1 sub $1,1 bin $1,$2 bin $2,$0 div $1,$2 mov $0,$1
.emacs.d/elpa/wisi-3.0.1/wisitoken-productions.adb
caqg/linux-home
0
21674
-- Abstract : -- -- See spec. -- -- Copyright (C) 2018 Free Software Foundation, Inc. -- -- This file is part of the WisiToken package. -- -- The WisiToken package is free software; you can redistribute it -- and/or modify it under terms of the GNU General Public License as -- published by the Free Software Foundation; either version 3, or -- (at your option) any later version. This library is distributed in -- the hope that it will be useful, but WITHOUT ANY WARRANTY; without -- even the implied warranty of MERCHAN- TABILITY 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. pragma License (Modified_GPL); with Ada.Text_IO; package body WisiToken.Productions is function Image (LHS : in Token_ID; RHS_Index : in Natural; RHS : in Token_ID_Arrays.Vector; Descriptor : in WisiToken.Descriptor) return String is use Ada.Strings.Unbounded; Result : Unbounded_String := +Trimmed_Image ((LHS, RHS_Index)) & ": " & Image (LHS, Descriptor) & " <="; begin for ID of RHS loop Result := Result & ' ' & Image (ID, Descriptor); end loop; return To_String (Result); end Image; procedure Put (Grammar : Prod_Arrays.Vector; Descriptor : in WisiToken.Descriptor) is begin for P of Grammar loop for R in P.RHSs.First_Index .. P.RHSs.Last_Index loop Ada.Text_IO.Put_Line (Image (P.LHS, R, P.RHSs (R).Tokens, Descriptor)); end loop; end loop; end Put; end WisiToken.Productions;
Compare.asm
Mohamed-94/Group-of-Assembly-Programs-Samples--8086-85-Processors-family-
16
102251
<filename>Compare.asm .MODEL SMALL .STACK 100H .DATA printCh dw '?' MSGS DB 0DH,0AH,'Start Time is $' Hs DB '?' Ms DB '?' Scs DB '?' HSs DB '?' MSGe DB 0DH,0AH,'Finish Time is $' He DB '?' Me DB '?' Se DB '?' HSe DB '?' MSGR DB 0DH,0AH,'Run Time is $' .CODE MAIN PROC ;initialization MOV AX , @DATA MOV DS , AX ; Get start time MOV AH,2CH INT 21H MOV Hs , CH MOV Ms , CL MOV Scs , DH MOV HSs , DL MOV AX,0B800h ;color active display page MOV DS,AX MOV AH,17H MOV BX,9 DISPLAY_ALL: MOV AL,41h AGAIN: MOV DI,0 MOV CX,2000d ;fill active display page FILL_BUF: MOV [DI],AX ADD DI,2 LOOP FILL_BUF ;loop until done ADD AX,01H CMP AL,'Z' JLE AGAIN DEC BX JNZ DISPLAY_ALL ; Get finish time MOV AX , @DATA MOV DS , AX MOV AH,2CH INT 21H MOV He , CH MOV Me , CL MOV Se , DH MOV HSe , DL ; display start time MOV AH , 9 LEA DX , MSGs INT 21H XOR AX , AX MOV AL , Hs CALL OUTDEC MOV DL , ':' MOV AH , 2 INT 21H XOR AX , AX MOV AL , Ms CALL OUTDEC MOV DL , ':' MOV AH , 2 INT 21H ; XOR AX , AX MOV AL , Scs CALL OUTDEC MOV DL , '.' MOV AH , 2 INT 21H ; XOR AX , AX MOV AL , HSs CALL OUTDEC MOV DL , ':' MOV AH , 2 INT 21H ; display finish time MOV AH , 9 LEA DX , MSGe INT 21H XOR AX , AX MOV AL , He CALL OUTDEC MOV DL , ':' MOV AH , 2 INT 21H ; XOR AX , AX MOV AL , Me CALL OUTDEC MOV DL , ':' MOV AH , 2 INT 21H ; XOR AX , AX MOV AL , Se CALL OUTDEC MOV DL , '.' MOV AH , 2 INT 21H ; XOR AX , AX MOV AL , Hse CALL OUTDEC MOV DL , ':' MOV AH , 2 INT 21H ; display run time MOV AH , 9 LEA DX , MSGR INT 21H XOR AX , AX MOV AL , He SUB AL , Hs CALL OUTDEC MOV DL , ':' MOV AH , 2 INT 21H XOR AX , AX MOV AL , Me SUB AL , Ms CALL OUTDEC MOV DL , ':' MOV AH , 2 INT 21H XOR AX , AX MOV AL , Se SUB AL , Scs CALL OUTDEC MOV DL , '.' MOV AH , 2 INT 21H XOR AX , AX MOV AL , HSe SUB AL , HSs CALL OUTDEC ; dos exit MOV AH,4CH INT 21H MAIN ENDP Include DES_NUM.asm END MAIN
test/asset/agda-stdlib-1.0/Data/Product/Categorical/Left/Base.agda
omega12345/agda-mode
5
14431
------------------------------------------------------------------------ -- The Agda standard library -- -- Base definitions for the left-biased universe-sensitive functor and -- monad instances for the Product type. -- -- To minimize the universe level of the RawFunctor, we require that -- elements of B are "lifted" to a copy of B at a higher universe level -- (a ⊔ b). See the Data.Product.Categorical.Examples for how this is -- done. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Level module Data.Product.Categorical.Left.Base {a} (A : Set a) (b : Level) where open import Data.Product using (_×_; map₂; proj₁; proj₂; <_,_>) open import Category.Functor using (RawFunctor) open import Category.Comonad using (RawComonad) ------------------------------------------------------------------------ -- Definitions Productₗ : Set (a ⊔ b) → Set (a ⊔ b) Productₗ B = A × B functor : RawFunctor Productₗ functor = record { _<$>_ = λ f → map₂ f } comonad : RawComonad Productₗ comonad = record { extract = proj₂ ; extend = < proj₁ ,_> }
Transynther/x86/_processed/NONE/_zr_/i3-7100_9_0x84_notsx.log_21829_2913.asm
ljhsiun2/medusa
9
19614
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r15 push %r8 push %r9 push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_D_ht+0x33a9, %r8 nop nop inc %rbp movb $0x61, (%r8) nop nop nop and %r11, %r11 lea addresses_A_ht+0x3a9, %rbx nop nop nop nop dec %rcx mov $0x6162636465666768, %r15 movq %r15, %xmm0 movups %xmm0, (%rbx) nop nop cmp $42900, %rcx lea addresses_normal_ht+0x23a9, %rbp nop cmp %r8, %r8 and $0xffffffffffffffc0, %rbp movaps (%rbp), %xmm6 vpextrq $1, %xmm6, %r15 nop nop xor %r8, %r8 lea addresses_WT_ht+0x102ae, %rsi lea addresses_WC_ht+0x73a9, %rdi nop nop nop nop nop and %r15, %r15 mov $54, %rcx rep movsw nop nop nop nop xor $33346, %r15 lea addresses_D_ht+0x12889, %r9 nop add %r15, %r15 mov (%r9), %ebp nop nop nop nop dec %r8 lea addresses_D_ht+0x113a9, %rbx nop xor $47369, %r8 mov $0x6162636465666768, %r11 movq %r11, (%rbx) nop nop nop nop sub %rbx, %rbx lea addresses_A_ht+0xf7e9, %r8 nop nop nop nop nop inc %rdi mov (%r8), %r9d nop nop nop nop cmp %rdi, %rdi lea addresses_A_ht+0x12fa9, %rbx nop nop nop nop xor $35156, %r9 and $0xffffffffffffffc0, %rbx vmovaps (%rbx), %ymm0 vextracti128 $0, %ymm0, %xmm0 vpextrq $0, %xmm0, %r11 nop nop nop inc %rcx lea addresses_UC_ht+0x16ba9, %r11 nop nop xor $17098, %r15 movups (%r11), %xmm6 vpextrq $0, %xmm6, %r9 nop nop nop and %r8, %r8 lea addresses_normal_ht+0x1aba9, %rdi nop nop sub %rbx, %rbx movw $0x6162, (%rdi) nop nop nop sub %rbp, %rbp pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %r9 pop %r8 pop %r15 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r14 push %rbp push %rbx push %rcx // Store lea addresses_D+0xf629, %r14 nop inc %r11 mov $0x5152535455565758, %rbp movq %rbp, (%r14) // Exception!!! nop nop nop mov (0), %rcx nop nop nop nop sub $35147, %r11 // Faulty Load lea addresses_A+0x13ba9, %rbx nop nop nop nop nop add $11118, %r11 mov (%rbx), %r12w lea oracles, %r14 and $0xff, %r12 shlq $12, %r12 mov (%r14,%r12,1), %r12 pop %rcx pop %rbx pop %rbp pop %r14 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_A', 'same': False, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_D', 'same': False, 'size': 8, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_A', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 1, 'congruent': 11, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 16, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 16, 'congruent': 11, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_D_ht', 'same': True, 'size': 4, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 8, 'congruent': 10, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} {'src': {'type': 'addresses_A_ht', 'same': False, 'size': 4, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'same': False, 'size': 32, 'congruent': 9, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 16, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 2, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
src/natools-getopt_long.adb
faelys/natools
0
17408
------------------------------------------------------------------------------ -- Copyright (c) 2011, <NAME> -- -- -- -- Permission to use, copy, modify, and distribute this software for any -- -- purpose with or without fee is hereby granted, provided that the above -- -- copyright notice and this permission notice appear in all copies. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- -- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -- -- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- -- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -- -- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -- -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -- ------------------------------------------------------------------------------ with Ada.Strings.Fixed; with Ada.Strings.Maps; package body Natools.Getopt_Long is package Fixed renames Ada.Strings.Fixed; package Maps renames Ada.Strings.Maps; --------------------------- -- Any_Name constructors -- --------------------------- function To_Name (Long_Name : String) return Any_Name is begin return Any_Name'(Style => Long, Size => Long_Name'Length, Long => Long_Name); end To_Name; function To_Name (Short_Name : Character) return Any_Name is begin return Any_Name'(Style => Short, Size => 1, Short => Short_Name); end To_Name; function Image (Name : Any_Name) return String is begin case Name.Style is when Short => return '-' & Name.Short; when Long => return "--" & Name.Long; end case; -- Alternate implementation: -- case Name.Style is -- when Short => return String'(1 => Name.Short); -- when Long => return '"' & Name.Long & '"'; -- end case; end Image; ---------------------- -- Default handlers -- ---------------------- package body Handlers is procedure Missing_Argument (Handler : in out Callback; Id : Option_Id; Name : Any_Name) is pragma Unreferenced (Handler); pragma Unreferenced (Id); begin raise Option_Error with "Missing argument to option " & Image (Name); end Missing_Argument; procedure Unexpected_Argument (Handler : in out Callback; Id : Option_Id; Name : Any_Name; Argument : String) is pragma Unreferenced (Handler); pragma Unreferenced (Id); begin raise Option_Error with "Unexpected argument """ & Argument & """ to option " & Image (Name); end Unexpected_Argument; procedure Unknown_Option (Handler : in out Callback; Name : Any_Name) is pragma Unreferenced (Handler); begin raise Option_Error with "Unknown option " & Image (Name); end Unknown_Option; end Handlers; ------------------------------------- -- Simple configuration parameters -- ------------------------------------- function Posixly_Correct (Config : Configuration) return Boolean is begin return Config.Posixly_Correct; end Posixly_Correct; procedure Posixly_Correct (Config : in out Configuration; To : Boolean := True) is begin Config.Posixly_Correct := To; end Posixly_Correct; function Long_Only (Config : Configuration) return Boolean is begin return Config.Long_Only; end Long_Only; procedure Use_Long_Only (Config : in out Configuration; Value : Boolean := True) is begin Config.Long_Only := Value; end Use_Long_Only; ---------------------------- -- Option list management -- ---------------------------- procedure Add_Option (Config : in out Configuration; Long_Name : String; Short_Name : Character; Has_Arg : Argument_Requirement; Id : Option_Id) is New_Option : constant Option := (Long_Name_Length => Long_Name'Length, Id => Id, Has_Arg => Has_Arg, Long_Name => Long_Name, Short_Name => Short_Name); begin if Long_Name = Null_Long_Name or Short_Name = Null_Short_Name then raise Constraint_Error; end if; Config.By_Long_Name.Insert (Long_Name, New_Option); Config.By_Short_Name.Insert (Short_Name, New_Option); end Add_Option; procedure Add_Option (Config : in out Configuration; Long_Name : String; Has_Arg : Argument_Requirement; Id : Option_Id) is New_Option : constant Option := (Long_Name_Length => Long_Name'Length, Id => Id, Has_Arg => Has_Arg, Long_Name => Long_Name, Short_Name => Null_Short_Name); begin if Long_Name = Null_Long_Name then raise Constraint_Error; end if; Config.By_Long_Name.Insert (Long_Name, New_Option); end Add_Option; procedure Add_Option (Config : in out Configuration; Short_Name : Character; Has_Arg : Argument_Requirement; Id : Option_Id) is New_Option : constant Option := (Long_Name_Length => 0, Id => Id, Has_Arg => Has_Arg, Long_Name => Null_Long_Name, Short_Name => Short_Name); begin if Short_Name = Null_Short_Name then raise Constraint_Error; end if; Config.By_Short_Name.Insert (Short_Name, New_Option); end Add_Option; procedure Del_Option (Config : in out Configuration; Id : Option_Id) is Short_Name_Cursor : Short_Option_Maps.Cursor := Config.By_Short_Name.First; Long_Name_Cursor : Long_Option_Maps.Cursor := Config.By_Long_Name.First; begin while Short_Option_Maps.Has_Element (Short_Name_Cursor) loop declare Next : constant Short_Option_Maps.Cursor := Short_Option_Maps.Next (Short_Name_Cursor); begin if Short_Option_Maps.Element (Short_Name_Cursor).Id = Id then Config.By_Short_Name.Delete (Short_Name_Cursor); end if; Short_Name_Cursor := Next; end; end loop; while Long_Option_Maps.Has_Element (Long_Name_Cursor) loop declare Next : constant Long_Option_Maps.Cursor := Long_Option_Maps.Next (Long_Name_Cursor); begin if Long_Option_Maps.Element (Long_Name_Cursor).Id = Id then Config.By_Long_Name.Delete (Long_Name_Cursor); end if; Long_Name_Cursor := Next; end; end loop; end Del_Option; procedure Del_Option (Config : in out Configuration; Long_Name : String) is begin Config.By_Long_Name.Delete (Long_Name); end Del_Option; procedure Del_Option (Config : in out Configuration; Short_Name : Character) is begin Config.By_Short_Name.Delete (Short_Name); end Del_Option; ---------------------------- -- Formatting subprograms -- ---------------------------- function Format_Long_Names (Config : Configuration; Id : Option_Id; Separator : String := ", "; Name_Prefix : String := "--") return String is Long_Name_Count : constant Natural := Get_Long_Name_Count (Config, Id); Result_Length : Natural; Position : Positive; begin if Long_Name_Count = 0 then return ""; end if; Result_Length := Long_Name_Count * Name_Prefix'Length + (Long_Name_Count - 1) * Separator'Length; for J in 1 .. Long_Name_Count loop Result_Length := Result_Length + Get_Long_Name (Config, Id, J)'Length; end loop; return Result : String (1 .. Result_Length) do Position := Result'First; for J in 1 .. Long_Name_Count loop if J > 1 then Result (Position .. Position + Separator'Length - 1) := Separator; Position := Position + Separator'Length; end if; Result (Position .. Position + Name_Prefix'Length - 1) := Name_Prefix; Position := Position + Name_Prefix'Length; declare Name : constant String := Get_Long_Name (Config, Id, J); begin Result (Position .. Position + Name'Length - 1) := Name; Position := Position + Name'Length; end; end loop; end return; end Format_Long_Names; function Format_Names (Config : Configuration; Id : Option_Id; Separator : String := ", "; Long_Name_Prefix : String := "--"; Short_Name_Prefix : String := "-"; Short_First : Boolean := True) return String is Long_Names : constant String := Format_Long_Names (Config, Id, Separator, Long_Name_Prefix); Short_Names : constant String := Format_Short_Names (Config, Id, Separator, Short_Name_Prefix); begin if Long_Names = "" then return Short_Names; elsif Short_Names = "" then return Long_Names; elsif Short_First then return Short_Names & Separator & Long_Names; else return Long_Names & Separator & Short_Names; end if; end Format_Names; function Format_Short_Names (Config : Configuration; Id : Option_Id; Separator : String := ", "; Name_Prefix : String := "-") return String is Short_Names : constant String := Get_Short_Names (Config, Id); Space_Per_Name : constant Positive := Name_Prefix'Length + 1 + Separator'Length; Result : String (1 .. Short_Names'Length * Space_Per_Name); begin if Short_Names = "" then return ""; end if; for J in Short_Names'Range loop declare First : constant Positive := Result'First + (J - Short_Names'First) * Space_Per_Name; begin Result (First .. First + Name_Prefix'Length - 1) := Name_Prefix; Result (First + Name_Prefix'Length) := Short_Names (J); Result (First + Name_Prefix'Length + 1 .. First + Space_Per_Name - 1) := Separator; end; end loop; return Result (Result'First .. Result'Last - Separator'Length); end Format_Short_Names; function Get_Long_Name (Config : Configuration; Id : Option_Id; Index : Positive := 1) return String is Seen : Natural := 0; Cursor : Long_Option_Maps.Cursor := Config.By_Long_Name.First; begin while Long_Option_Maps.Has_Element (Cursor) loop declare Opt : constant Option := Long_Option_Maps.Element (Cursor); begin if Opt.Id = Id then Seen := Seen + 1; if Seen = Index then return Opt.Long_Name; end if; end if; end; Long_Option_Maps.Next (Cursor); end loop; raise Constraint_Error; end Get_Long_Name; function Get_Long_Name_Count (Config : Configuration; Id : Option_Id) return Natural is procedure Process (Key : String; Element : Option); procedure Process (Cursor : Long_Option_Maps.Cursor); Result : Natural := 0; procedure Process (Key : String; Element : Option) is pragma Unreferenced (Key); begin if Element.Id = Id then Result := Result + 1; end if; end Process; procedure Process (Cursor : Long_Option_Maps.Cursor) is begin Long_Option_Maps.Query_Element (Cursor, Process'Access); end Process; begin Config.By_Long_Name.Iterate (Process'Access); return Result; end Get_Long_Name_Count; function Get_Short_Name_Count (Config : Configuration; Id : Option_Id) return Natural is procedure Process (Key : Character; Element : Option); procedure Process (Cursor : Short_Option_Maps.Cursor); Result : Natural := 0; procedure Process (Key : Character; Element : Option) is pragma Unreferenced (Key); begin if Element.Id = Id then Result := Result + 1; end if; end Process; procedure Process (Cursor : Short_Option_Maps.Cursor) is begin Short_Option_Maps.Query_Element (Cursor, Process'Access); end Process; begin Config.By_Short_Name.Iterate (Process'Access); return Result; end Get_Short_Name_Count; function Get_Short_Names (Config : Configuration; Id : Option_Id) return String is procedure Process (Key : Character; Element : Option); procedure Process (Cursor : Short_Option_Maps.Cursor); Result : String (1 .. Config.Get_Short_Name_Count (Id)); J : Positive := Result'First; procedure Process (Key : Character; Element : Option) is begin if Element.Id = Id then Result (J) := Key; J := J + 1; end if; end Process; procedure Process (Cursor : Short_Option_Maps.Cursor) is begin Short_Option_Maps.Query_Element (Cursor, Process'Access); end Process; begin Config.By_Short_Name.Iterate (Process'Access); return Result; end Get_Short_Names; procedure Iterate (Config : Configuration; Process : not null access procedure (Id : Option_Id; Long_Name : String; Short_Name : Character; Has_Arg : Argument_Requirement)) is procedure Long_Process (Key : String; Opt : Option); procedure Long_Query (C : Long_Option_Maps.Cursor); procedure Short_Process (Key : Character; Opt : Option); procedure Short_Query (C : Short_Option_Maps.Cursor); procedure Long_Process (Key : String; Opt : Option) is pragma Unreferenced (Key); begin if Opt.Short_Name = Null_Short_Name then Process (Opt.Id, Opt.Long_Name, Opt.Short_Name, Opt.Has_Arg); end if; end Long_Process; procedure Long_Query (C : Long_Option_Maps.Cursor) is begin Long_Option_Maps.Query_Element (C, Long_Process'Access); end Long_Query; procedure Short_Process (Key : Character; Opt : Option) is pragma Unreferenced (Key); begin Process (Opt.Id, Opt.Long_Name, Opt.Short_Name, Opt.Has_Arg); end Short_Process; procedure Short_Query (C : Short_Option_Maps.Cursor) is begin Short_Option_Maps.Query_Element (C, Short_Process'Access); end Short_Query; begin Config.By_Short_Name.Iterate (Short_Query'Access); Config.By_Long_Name.Iterate (Long_Query'Access); end Iterate; ----------------------------- -- Command-line processing -- ----------------------------- procedure Process (Config : Configuration; Handler : in out Handlers.Callback'Class; Argument_Count : not null access function return Natural := Ada.Command_Line.Argument_Count'Access; Argument : not null access function (Number : Positive) return String := Ada.Command_Line.Argument'Access) is procedure Process_Long_Option (Arg : String); Arg_Count : constant Natural := Argument_Count.all; Arg_N : Positive := 1; procedure Process_Long_Option (Arg : String) is function Has_Prefix (C : Long_Option_Maps.Cursor; Prefix : String) return Boolean; Equal : constant Natural := Fixed.Index (Arg, Maps.To_Set ('=')); Cursor : Long_Option_Maps.Cursor; Arg_Name_Last : Natural := Arg'Last; function Has_Prefix (C : Long_Option_Maps.Cursor; Prefix : String) return Boolean is Key : constant String := Long_Option_Maps.Key (C); begin return Key'Length >= Prefix'Length and then Key (1 .. Prefix'Length) = Prefix; end Has_Prefix; begin if Equal /= 0 then Arg_Name_Last := Equal - 1; end if; declare Arg_Name : String renames Arg (Arg'First .. Arg_Name_Last); begin -- Looking for an exact match Cursor := Config.By_Long_Name.Find (Arg_Name); if not Long_Option_Maps.Has_Element (Cursor) then -- Looking for a unique partial match Cursor := Config.By_Long_Name.Ceiling (Arg_Name); if not Long_Option_Maps.Has_Element (Cursor) or else not Has_Prefix (Cursor, Arg_Name) or else Has_Prefix (Long_Option_Maps.Next (Cursor), Arg_Name) then Handler.Unknown_Option (To_Name (Arg_Name)); return; end if; end if; -- At this point, Cursor points to the selected argument declare Opt : constant Option := Long_Option_Maps.Element (Cursor); begin case Opt.Has_Arg is when No_Argument => if Equal = 0 then Handler.Option (Opt.Id, ""); else Handler.Unexpected_Argument (Opt.Id, To_Name (Opt.Long_Name), Arg (Equal + 1 .. Arg'Last)); end if; when Optional_Argument => if Equal = 0 then Handler.Option (Opt.Id, ""); else Handler.Option (Opt.Id, Arg (Equal + 1 .. Arg'Last)); end if; when Required_Argument => if Equal = 0 then if Arg_N = Arg_Count then Handler.Missing_Argument (Opt.Id, To_Name (Opt.Long_Name)); else Handler.Option (Opt.Id, Argument (Arg_N + 1)); Arg_N := Arg_N + 1; end if; else Handler.Option (Opt.Id, Arg (Equal + 1 .. Arg'Last)); end if; end case; end; end; end Process_Long_Option; begin while Arg_N <= Arg_Count loop declare Arg : constant String := Argument (Arg_N); begin if Arg'Length <= 1 or else Arg (Arg'First) /= '-' then -- This is a non-flag argument, abort option processing if -- posixly correct. if Config.Posixly_Correct then exit; else Handler.Argument (Arg); Arg_N := Arg_N + 1; end if; elsif Arg (Arg'First + 1) = '-' then -- "--" stops option processing. if Arg'Length = 2 then Arg_N := Arg_N + 1; exit; end if; -- Argument starting with "--": long option. Process_Long_Option (Arg (Arg'First + 2 .. Arg'Last)); Arg_N := Arg_N + 1; elsif Config.Long_Only then -- Force long option on a single dash prefix. Process_Long_Option (Arg (Arg'First + 1 .. Arg'Last)); Arg_N := Arg_N + 1; else -- Process a list of short options, until one with required -- argument is encountered (and the rest is its argument). for Arg_I in Arg'First + 1 .. Arg'Last loop declare Cursor : constant Short_Option_Maps.Cursor := Config.By_Short_Name.Find (Arg (Arg_I)); begin if Short_Option_Maps.Has_Element (Cursor) then declare Opt : constant Option := Short_Option_Maps.Element (Cursor); begin if Opt.Has_Arg = Required_Argument then if Arg_I = Arg'Last then if Arg_N = Arg_Count then Handler.Missing_Argument (Opt.Id, To_Name (Opt.Short_Name)); else Handler.Option (Opt.Id, Argument (Arg_N + 1)); Arg_N := Arg_N + 1; exit; end if; else Handler.Option (Opt.Id, Arg (Arg_I + 1 .. Arg'Last)); exit; end if; else Handler.Option (Opt.Id, ""); end if; end; else Handler.Unknown_Option (To_Name (Arg (Arg_I))); end if; end; end loop; Arg_N := Arg_N + 1; end if; end; end loop; -- Only non-flag arguments remain while Arg_N <= Arg_Count loop Handler.Argument (Argument (Arg_N)); Arg_N := Arg_N + 1; end loop; end Process; end Natools.Getopt_Long;
programs/oeis/027/A027484.asm
karttu/loda
1
82057
; A027484: n(n^4-1)/2. ; 15,120,510,1560,3885,8400,16380,29520,49995,80520,124410,185640,268905,379680,524280,709920,944775,1238040,1599990,2042040,2576805,3218160,3981300,4882800,5940675,7174440,8605170,10255560,12149985,14314560,16777200,19567680,22717695,26260920,30233070,34671960,39617565,45112080,51199980,57928080,65345595,73504200,82458090,92264040,102981465,114672480,127401960,141237600,156249975,172512600,190101990,209097720,229582485,251642160,275365860,300846000,328178355,357462120,388799970,422298120,458066385,496218240,536870880,580145280,626166255,675062520,726966750,782015640,840349965,902114640,967458780,1036535760,1109503275,1186523400,1267762650,1353392040,1443587145,1538528160,1638399960,1743392160,1853699175,1969520280,2091059670,2218526520,2352135045,2492104560,2638659540,2792029680,2952449955,3120160680,3295407570,3478441800,3669520065,3868904640,4076863440,4293670080,4519603935,4754950200,4999999950,5255050200,5520403965,5796370320,6083264460,6381407760,6691127835,7012758600,7346640330,7693119720,8052549945,8425290720,8811708360,9212175840,9627072855,10056785880,10501708230,10962240120,11438788725,11931768240,12441599940,12968712240,13513540755,14076528360,14658125250,15258789000,15878984625,16519184640,17179869120,17861525760,18564649935,19289744760,20037321150,20807897880,21602001645,22420167120,23262937020,24130862160,25024501515,25944422280,26891199930,27865418280,28867669545,29898554400,30958682040,32048670240,33169145415,34320742680,35504105910,36719887800,37968749925,39251362800,40568405940,41920567920,43308546435,44733048360,46194789810,47694496200,49232902305,50810752320,52428799920,54087808320,55788550335,57531808440,59318374830,61149051480,63024650205,64945992720,66913910700,68929245840,70992849915,73105584840,75268322730,77481945960,79747347225,82065429600,84437106600,86863302240,89344951095,91882998360,94478399910,97132122360,99845143125,102618450480,105453043620,108349932720,111310138995,114334694760,117424643490,120581039880,123804949905,127097450880,130459631520,133892592000,137397444015,140975310840,144627327390,148354640280,152158407885,156039800400,159999999900,164040200400,168161607915,172365440520,176652928410,181025313960,185483851785,190029808800,194664464280,199389109920,204205049895,209113600920,214116092310,219213866040,224408276805,229700692080,235092492180,240585070320,246179832675,251878198440,257681599890,263591482440,269609304705,275736538560,281974669200,288325195200,294789628575,301369494840,308066333070,314881695960,321817149885,328874274960,336054665100,343359928080,350791685595,358351573320,366041240970,373862352360,381816585465,389905632480,398131199880,406495008480,414998793495,423644304600,432433305990,441367576440,450448909365,459679112880,469060009860,478593438000,488281249875,498125313000 add $0,2 mov $1,$0 pow $0,5 sub $0,$1 mov $1,$0 div $1,2
Transynther/x86/_processed/AVXALIGN/_st_sm_/i3-7100_9_0x84_notsx.log_21829_2231.asm
ljhsiun2/medusa
9
10836
<filename>Transynther/x86/_processed/AVXALIGN/_st_sm_/i3-7100_9_0x84_notsx.log_21829_2231.asm .global s_prepare_buffers s_prepare_buffers: push %r12 push %r13 push %r8 push %rax push %rbx push %rcx push %rdi push %rsi lea addresses_D_ht+0x1c9f, %rbx nop sub $36814, %r12 mov (%rbx), %ax nop nop sub %rsi, %rsi lea addresses_normal_ht+0x49b7, %rsi lea addresses_WT_ht+0x1ddb7, %rdi nop cmp %r8, %r8 mov $12, %rcx rep movsb sub $65350, %rdi lea addresses_UC_ht+0x180b7, %rbx add $61198, %rax mov (%rbx), %r12d nop nop nop nop nop cmp $8843, %rax lea addresses_normal_ht+0x89ff, %rsi lea addresses_UC_ht+0x11eb7, %rdi nop nop nop nop and $47947, %r13 mov $71, %rcx rep movsl nop nop nop nop nop add %rdi, %rdi lea addresses_WT_ht+0x1c937, %r12 nop cmp %rdi, %rdi mov (%r12), %esi nop nop nop xor %r8, %r8 lea addresses_WT_ht+0x19cb7, %rax nop nop nop nop cmp $55022, %r13 movl $0x61626364, (%rax) nop nop nop xor %r13, %r13 lea addresses_WT_ht+0x34b7, %rbx nop inc %r12 mov (%rbx), %ax nop sub $9104, %rcx lea addresses_A_ht+0x118b7, %rcx nop nop nop add %rbx, %rbx mov $0x6162636465666768, %rsi movq %rsi, %xmm6 vmovups %ymm6, (%rcx) nop nop nop nop nop sub $46772, %r8 lea addresses_normal_ht+0x4617, %rsi lea addresses_normal_ht+0x17737, %rdi nop nop nop nop xor $64858, %r13 mov $63, %rcx rep movsl nop nop nop nop nop dec %rax lea addresses_UC_ht+0x4de8, %rdi nop cmp %r8, %r8 mov (%rdi), %rbx nop nop lfence lea addresses_UC_ht+0x67b1, %rsi lea addresses_A_ht+0x1c747, %rdi cmp %rax, %rax mov $117, %rcx rep movsw nop nop sub $9013, %rbx lea addresses_A_ht+0x16ac7, %rcx nop nop nop nop xor %r8, %r8 movups (%rcx), %xmm3 vpextrq $1, %xmm3, %rsi nop nop nop add $16444, %r8 pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r8 pop %r13 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r13 push %rbx push %rdi push %rdx // Store lea addresses_normal+0x1c4b7, %r13 nop add %r12, %r12 movl $0x51525354, (%r13) nop nop nop nop nop cmp %rbx, %rbx // Load lea addresses_US+0x16117, %r11 clflush (%r11) nop nop nop sub $38016, %rdx mov (%r11), %edi nop sub $32110, %r13 // Store lea addresses_UC+0x1a277, %r11 nop nop nop nop dec %r13 movw $0x5152, (%r11) nop add $53042, %r13 // Faulty Load lea addresses_normal+0x1c4b7, %r11 nop nop nop sub %rdx, %rdx mov (%r11), %r13w lea oracles, %rbx and $0xff, %r13 shlq $12, %r13 mov (%rbx,%r13,1), %r13 pop %rdx pop %rdi pop %rbx pop %r13 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_normal', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_normal', 'same': True, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} {'src': {'type': 'addresses_US', 'same': False, 'size': 4, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_UC', 'same': False, 'size': 2, 'congruent': 5, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_normal', 'same': True, 'size': 2, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_D_ht', 'same': False, 'size': 2, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': True}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 4, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 4, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 4, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 2, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 32, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': True}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_UC_ht', 'same': True, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_A_ht', 'same': False, 'size': 16, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'54': 21829} 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 */
libsrc/gfx/wide/w_point.asm
ahjelm/z88dk
640
90546
<reponame>ahjelm/z88dk ; ----- int point(int x, int y) ;Result is true/false SECTION code_graphics PUBLIC point PUBLIC _point EXTERN asm_point .point ._point pop bc pop de ; y pop hl ; x push hl push de push bc jp asm_point
software/hal/hal/src/hal-touch_panel.ads
TUM-EI-RCS/StratoX
12
17556
package HAL.Touch_Panel is type TP_Touch_State is record X : Natural; Y : Natural; Weight : Natural; end record; type Swap_State is new UInt3; Invert_X : constant Swap_State; Invert_Y : constant Swap_State; Swap_XY : constant Swap_State; subtype Touch_Identifier is Natural range 0 .. 10; type TP_State is array (Touch_Identifier range <>) of TP_Touch_State; type Touch_Panel_Device is limited interface; type Touch_Panel_Ref is access all Touch_Panel_Device'Class; procedure Set_Bounds (This : in out Touch_Panel_Device; Width : Natural; Height : Natural; Swap : Swap_State) is abstract; -- Set screen bounds. Touch_State must should stay within screen bounds function Active_Touch_Points (This : in out Touch_Panel_Device) return Touch_Identifier is abstract; -- Retrieve the number of active touch points function Get_Touch_Point (This : in out Touch_Panel_Device; Touch_Id : Touch_Identifier) return TP_Touch_State is abstract; -- Retrieves the position and pressure information of the specified -- touch function Get_All_Touch_Points (This : in out Touch_Panel_Device) return TP_State is abstract; -- Retrieves the position and pressure information of every active touch -- points private Invert_X : constant Swap_State := 2#001#; Invert_Y : constant Swap_State := 2#010#; Swap_XY : constant Swap_State := 2#100#; end HAL.Touch_Panel;
Parser_Tools/test/src/text-suite.ads
robdaemon/AdaYaml
32
23242
<gh_stars>10-100 -- part of AdaYaml, (c) 2017 <NAME> -- released under the terms of the MIT license, see the file "copying.txt" with AUnit.Test_Suites; package Text.Suite is function Suite return AUnit.Test_Suites.Access_Test_Suite; end Text.Suite;
test/LibSucceed/CoInf.agda
andreasabel/agda-with-old-branches
3
7235
module CoInf where open import Coinduction -- Check that ∞ can be used as an "expression". test : Set → Set test = ∞
BFFPlug.agda
jvoigtlaender/bidiragda
0
15537
<filename>BFFPlug.agda open import Level using () renaming (zero to ℓ₀) open import Relation.Binary using (DecSetoid) module BFFPlug (A : DecSetoid ℓ₀ ℓ₀) where open import Data.Nat using (ℕ ; _≟_ ; _+_ ; zero ; suc ; ⌈_/2⌉) open import Data.Maybe using (Maybe ; just ; nothing) open import Data.Vec using (Vec) open import Data.Product using (∃ ; _,_) open import Relation.Binary using (module DecSetoid) open import Relation.Binary.PropositionalEquality using (refl ; cong ; subst ; sym ; module ≡-Reasoning) renaming (setoid to PropEq) open import Relation.Nullary using (yes ; no) open import Function using (flip ; id ; _∘_) open import Function.LeftInverse using (_RightInverseOf_) import Category.Monad open Category.Monad.RawMonad {ℓ₀} Data.Maybe.monad using (_>>=_) open import Generic using (sequenceV ; ≡-to-Π) import BFF import GetTypes import Examples open DecSetoid A using (Carrier) open GetTypes.PartialVecVec public using (Get) open BFF.PartialVecBFF A public using (sbff ; bff) bffsameshape : (G : Get) → {i : Get.I G} → Vec Carrier (Get.gl₁ G i) → Vec Carrier (Get.gl₂ G i) → Maybe (Vec Carrier (Get.gl₁ G i)) bffsameshape G {i} = sbff G i bffplug : (G : Get) → (Get.I G → ℕ → Maybe (Get.I G)) → {i : Get.I G} → {m : ℕ} → Vec Carrier (Get.gl₁ G i) → Vec Carrier m → Maybe (∃ λ j → Vec (Maybe Carrier) (Get.gl₁ G j)) bffplug G sput {i} {m} s v with sput i m ... | nothing = nothing ... | just j with Get.gl₂ G j ≟ m ... | no gl₂j≢m = nothing bffplug G sput {i} s v | just j | yes refl with bff G j s v ... | nothing = nothing ... | just s′ = just (j , s′) _SimpleRightInvOf_ : {A B : Set} → (A → B) → (B → A) → Set f SimpleRightInvOf g = ≡-to-Π f RightInverseOf ≡-to-Π g bffinv : (G : Get) → (nelteg : ℕ → Get.I G) → nelteg SimpleRightInvOf Get.gl₂ G → {i : Get.I G} → {m : ℕ} → Vec Carrier (Get.gl₁ G i) → Vec Carrier m → Maybe (Vec (Maybe Carrier) (Get.gl₁ G (nelteg m))) bffinv G nelteg inv {m = m} s v = bff G (nelteg m) s (subst (Vec Carrier) (sym (inv m)) v) module InvExamples where open Examples using (reverse' ; drop' ; sieve' ; tail' ; take') reverse-put : {n m : ℕ} → Vec Carrier n → Vec Carrier m → Maybe (Vec Carrier m) reverse-put s v = bffinv reverse' id (λ _ → refl) s v >>= sequenceV drop-put : (k : ℕ) → {n m : ℕ} → Vec Carrier (k + n) → Vec Carrier m → Maybe (Vec (Maybe Carrier) (k + m)) drop-put k = bffinv (drop' k) id (λ _ → refl) double : ℕ → ℕ double zero = zero double (suc n) = suc (suc (double n)) sieve-inv-len : double SimpleRightInvOf ⌈_/2⌉ sieve-inv-len zero = refl sieve-inv-len (suc zero) = refl sieve-inv-len (suc (suc x)) = cong (suc ∘ suc) (sieve-inv-len x) sieve-put : {n m : ℕ} → Vec Carrier n → Vec Carrier m → Maybe (Vec (Maybe Carrier) (double m)) sieve-put = bffinv sieve' double sieve-inv-len tail-put : {n m : ℕ} → Vec Carrier (suc n) → Vec Carrier m → Maybe (Vec (Maybe Carrier) (suc m)) tail-put = bffinv tail' id (λ _ → refl) take-put : (k : ℕ) → {n : ℕ} → Vec Carrier (k + n) → Vec Carrier k → Maybe (Vec Carrier (k + n)) take-put k = bffsameshape (take' k)
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/ce/ce2104c.ada
best08618/asylo
7
1804
-- CE2104C.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 A FILE CAN BE CLOSED AND THEN RE-OPENED. -- B) DIRECT FILES -- APPLICABLILITY CRITERIA: -- THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHOSE -- ENVIRONMENT SUPPORTS CREATE/OPEN FOR THE GIVEN MODE. -- HISTORY: -- DLD 08/11/82 -- SPS 11/09/82 -- JBG 03/24/83 -- EG 06/03/85 -- PWB 02/10/86 CORRECTED REPORTED TEST NAME; CHANGED DATA FILE -- NAME TO "Y2104C" TO MATCH TEST NAME. -- SPW 08/07/87 REMOVED UNNECESSARY CODE AND CORRECTED EXCEPTION -- HANDLING. WITH REPORT; USE REPORT; WITH DIRECT_IO; PROCEDURE CE2104C IS PACKAGE DIR_IO IS NEW DIRECT_IO(INTEGER); USE DIR_IO; DIR_FILE : DIR_IO.FILE_TYPE; VAR : INTEGER; INCOMPLETE : EXCEPTION; BEGIN TEST ("CE2104C", "CHECK THAT A FILE CAN BE CLOSED " & "AND THEN RE-OPENED"); -- INITIALIZE TEST FILE BEGIN CREATE (DIR_FILE, OUT_FILE, LEGAL_FILE_NAME); EXCEPTION WHEN USE_ERROR => NOT_APPLICABLE ("USE_ERROR RAISED ON CREATE WITH " & "OUT_FILE MODE"); RAISE INCOMPLETE; WHEN NAME_ERROR => NOT_APPLICABLE ("NAME_ERROR RAISED ON CREATE WITH " & "OUT_FILE MODE"); RAISE INCOMPLETE; WHEN OTHERS => FAILED ("UNEXPECTED EXCEPTION RAISED ON CREATE"); RAISE INCOMPLETE; END; WRITE (DIR_FILE, 28); CLOSE (DIR_FILE); -- RE-OPEN DIRECT TEST FILE BEGIN OPEN (DIR_FILE, IN_FILE, LEGAL_FILE_NAME); EXCEPTION WHEN USE_ERROR => NOT_APPLICABLE ("USE_ERROR RAISED ON OPEN WITH " & "IN_FILE MODE"); RAISE INCOMPLETE; END; READ (DIR_FILE, VAR); IF VAR /= 28 THEN FAILED ("WRONG DATA RETURNED FROM READ - DIRECT"); END IF; -- DELETE TEST FILE BEGIN DELETE (DIR_FILE); EXCEPTION WHEN USE_ERROR => NULL; END; RESULT; EXCEPTION WHEN INCOMPLETE => RESULT; END CE2104C;
examples/fpu.adb
ytomino/drake
33
9408
<filename>examples/fpu.adb with Ada.Formatting; with Interfaces; with System.Machine_Code; procedure fpu is use type Interfaces.Unsigned_16; CW : aliased Interfaces.Unsigned_16 := 0; begin System.Machine_Code.Asm ("fstcw (%0)", Inputs => System.Address'Asm_Input ("r", CW'Address), Volatile => True); declare function Image is new Ada.Formatting.Modular_Image ( Interfaces.Unsigned_16, Form => Ada.Formatting.Simple, Signs => Ada.Formatting.Triming_Unsign_Marks, Base => 16, Digits_Width => 4); begin Ada.Debug.Put (Image (CW)); end; -- 0 : IM (Invalid-op Mask), 1 as masking exceptions -- 1 : DM (Denormal Mask) -- 2 : ZM (Zero-divide Mask) -- 3 : OM (Overflow Mask) -- 4 : UM (Underflow Mask) -- 5 : PM (Precision Mask) -- 6 .. 7 : ?? -- 8 .. 9 : PC (Precision Control), expected to 2#11# as extended -- 10 .. 11 : RC (Rounding Control), 0 as rounding -- 12 : X (Infinity Control), no effect -- 13 .. 15 : ?? if (CW and 16#0300#) = 16#0300# then Ada.Debug.Put ("ok, extended precision"); end if; end fpu;
source/image/required/s-fore.adb
ytomino/drake
33
21068
<gh_stars>10-100 with System.Formatting.Float; package body System.Fore is function Fore (Lo, Hi : Long_Long_Float) return Natural is begin return Formatting.Float.Fore_Digits_Width (Lo, Hi) + 1; -- including sign end Fore; end System.Fore;
include/sf-graphics-vertexarray.ads
Fabien-Chouteau/ASFML
0
29050
<filename>include/sf-graphics-vertexarray.ads --////////////////////////////////////////////////////////// -- SFML - Simple and Fast Multimedia Library -- Copyright (C) 2007-2015 <NAME> (<EMAIL>) -- This software is provided 'as-is', without any express or implied warranty. -- In no event will the authors be held liable for any damages arising from the use of this software. -- Permission is granted to anyone to use this software for any purpose, -- including commercial applications, and to alter it and redistribute it freely, -- subject to the following restrictions: -- 1. The origin of this software must not be misrepresented; -- you must not claim that you wrote the original software. -- If you use this software in a product, an acknowledgment -- in the product documentation would be appreciated but is not required. -- 2. Altered source versions must be plainly marked as such, -- and must not be misrepresented as being the original software. -- 3. This notice may not be removed or altered from any source distribution. --////////////////////////////////////////////////////////// with Sf.Graphics.Vertex; with Sf.Graphics.PrimitiveType; with Sf.Graphics.Rect; package Sf.Graphics.VertexArray is --////////////////////////////////////////////////////////// --/ @brief Create a new vertex array --/ --/ @return A new sfVertexArray object --/ --////////////////////////////////////////////////////////// function create return sfVertexArray_Ptr; --////////////////////////////////////////////////////////// --/ @brief Copy an existing vertex array --/ --/ @param vertexArray Vertex array to copy --/ --/ @return Copied object --/ --////////////////////////////////////////////////////////// function copy (vertexArray : sfVertexArray_Ptr) return sfVertexArray_Ptr; --////////////////////////////////////////////////////////// --/ @brief Destroy an existing vertex array --/ --/ @param vertexArray Vertex array to delete --/ --////////////////////////////////////////////////////////// procedure destroy (vertexArray : sfVertexArray_Ptr); --////////////////////////////////////////////////////////// --/ @brief Return the vertex count of a vertex array --/ --/ @param vertexArray Vertex array object --/ --/ @return Number of vertices in the array --/ --////////////////////////////////////////////////////////// function getVertexCount (vertexArray : sfVertexArray_Ptr) return sfSize_t; --////////////////////////////////////////////////////////// --/ @brief Get access to a vertex by its index --/ --/ This function doesn't check @a index, it must be in range --/ [0, vertex count - 1]. The behaviour is undefined --/ otherwise. --/ --/ @param vertexArray Vertex array object --/ @param index Index of the vertex to get --/ --/ @return Pointer to the index-th vertex --/ --////////////////////////////////////////////////////////// function getVertex (vertexArray : sfVertexArray_Ptr; index : sfSize_t) return access Sf.Graphics.Vertex.sfVertex; --////////////////////////////////////////////////////////// --/ @brief Clear a vertex array --/ --/ This function removes all the vertices from the array. --/ It doesn't deallocate the corresponding memory, so that --/ adding new vertices after clearing doesn't involve --/ reallocating all the memory. --/ --/ @param vertexArray Vertex array object --/ --////////////////////////////////////////////////////////// procedure clear (vertexArray : sfVertexArray_Ptr); --////////////////////////////////////////////////////////// --/ @brief Resize the vertex array --/ --/ If @a vertexCount is greater than the current size, the previous --/ vertices are kept and new (default-constructed) vertices are --/ added. --/ If @a vertexCount is less than the current size, existing vertices --/ are removed from the array. --/ --/ @param vertexArray Vertex array objet --/ @param vertexCount New size of the array (number of vertices) --/ --////////////////////////////////////////////////////////// procedure resize (vertexArray : sfVertexArray_Ptr; vertexCount : sfSize_t); --////////////////////////////////////////////////////////// --/ @brief Add a vertex to a vertex array array --/ --/ @param vertexArray Vertex array objet --/ @param vertex Vertex to add --/ --////////////////////////////////////////////////////////// procedure append (vertexArray : sfVertexArray_Ptr; vertex : Sf.Graphics.Vertex.sfVertex); --////////////////////////////////////////////////////////// --/ @brief Set the type of primitives of a vertex array --/ --/ This function defines how the vertices must be interpreted --/ when it's time to draw them: --/ @li As points --/ @li As lines --/ @li As triangles --/ @li As quads --/ The default primitive type is sfPoints. --/ --/ @param vertexArray Vertex array objet --/ @param primitiveType Type of primitive --/ --////////////////////////////////////////////////////////// procedure setPrimitiveType (vertexArray : sfVertexArray_Ptr; primitiveType : Sf.Graphics.PrimitiveType.sfPrimitiveType); --////////////////////////////////////////////////////////// --/ @brief Get the type of primitives drawn by a vertex array --/ --/ @param vertexArray Vertex array objet --/ --/ @return Primitive type --/ --////////////////////////////////////////////////////////// function getPrimitiveType (vertexArray : sfVertexArray_Ptr) return Sf.Graphics.PrimitiveType.sfPrimitiveType; --////////////////////////////////////////////////////////// --/ @brief Compute the bounding rectangle of a vertex array --/ --/ This function returns the axis-aligned rectangle that --/ contains all the vertices of the array. --/ --/ @param vertexArray Vertex array objet --/ --/ @return Bounding rectangle of the vertex array --/ --////////////////////////////////////////////////////////// function getBounds (vertexArray : sfVertexArray_Ptr) return Sf.Graphics.Rect.sfFloatRect; private pragma Import (C, create, "sfVertexArray_create"); pragma Import (C, copy, "sfVertexArray_copy"); pragma Import (C, destroy, "sfVertexArray_destroy"); pragma Import (C, getVertexCount, "sfVertexArray_getVertexCount"); pragma Import (C, getVertex, "sfVertexArray_getVertex"); pragma Import (C, clear, "sfVertexArray_clear"); pragma Import (C, resize, "sfVertexArray_resize"); pragma Import (C, append, "sfVertexArray_append"); pragma Import (C, setPrimitiveType, "sfVertexArray_setPrimitiveType"); pragma Import (C, getPrimitiveType, "sfVertexArray_getPrimitiveType"); pragma Import (C, getBounds, "sfVertexArray_getBounds"); end Sf.Graphics.VertexArray;
scripts/track/finder.tmpl.scpt
randybias/itunes-client
1
2881
<filename>scripts/track/finder.tmpl.scpt<gh_stars>1-10 tell application "iTunes" set specified_tracks to (every track #{whose} #{conditions}) set json to "[" repeat with specified_track in specified_tracks set props to {} set end of props to "{" set end of props to ("\"persistent_id\":\"" & persistent ID of specified_track & "\",") set end of props to ("\"name\":\"" & my escape_quote(name of specified_track) & "\",") set end of props to ("\"album\":\"" & my escape_quote(album of specified_track) & "\",") set end of props to ("\"artist\":\"" & my escape_quote(artist of specified_track) & "\",") set end of props to ("\"track_count\":\"" & track count of specified_track & "\",") set end of props to ("\"track_number\":\"" & track number of specified_track & "\",") set end of props to ("\"year\":\"" & year of specified_track & "\"") set end of props to "}" set json to json & props as string & "," end repeat set json to json & "null]" return json end tell on escape_quote(someText) return replaceText(someText, "\"", "\\\"") end escape_quote (* https://discussions.apple.com/thread/4588230?start=0&tstart=0 *) on replaceText(someText, oldItem, newItem) set {tempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, oldItem} try set {itemList, AppleScript's text item delimiters} to {text items of someText, newItem} set {someText, AppleScript's text item delimiters} to {itemList as text, tempTID} on error errorMessage number errorNumber -- oops set AppleScript's text item delimiters to tempTID error errorMessage number errorNumber -- pass it on end try return someText end replaceText
projects/batfish/src/main/antlr4/org/batfish/grammar/palo_alto/PaloAltoParser.g4
nickgian/batfish
0
4655
parser grammar PaloAltoParser; /* This is only needed if parser grammar is spread across files */ import PaloAlto_address, PaloAlto_address_group, PaloAlto_application, PaloAlto_application_filter, PaloAlto_common, PaloAlto_deviceconfig, PaloAlto_interface, PaloAlto_network, PaloAlto_rulebase, PaloAlto_service, PaloAlto_service_group, PaloAlto_shared, PaloAlto_vsys, PaloAlto_zone; options { superClass = 'org.batfish.grammar.BatfishParser'; tokenVocab = PaloAltoLexer; } palo_alto_configuration : ( set_line /* TODO: delete line, etc. */ | newline )+ EOF ; newline : NEWLINE ; s_null : ( MGT_CONFIG | TAG ) null_rest_of_line ; /* * The distinction between config device and general config statements is needed in order to handle * syntax differences in filesystem-style config dumps */ set_line_config_devices : (CONFIG DEVICES name = variable)? statement_config_devices ; set_line_config_general : CONFIG? statement_config_general ; /* * These are settings that show up on the device under /config/devices/<DEV>/... */ statement_config_devices : s_address | s_address_group | s_application | s_deviceconfig | s_network | s_null | s_rulebase | s_service | s_service_group | s_vsys | s_zone ; /* * These are settings that show up on the device under /config/... (NOT under the devices/ dir) */ statement_config_general : s_null | s_shared ; set_line : SET set_line_tail NEWLINE ; set_line_template : // TODO: do we need this if we have the applied template from other show commands? TEMPLATE null_rest_of_line ; set_line_tail : set_line_config_devices | set_line_config_general | set_line_template | s_policy ; s_policy : POLICY ( s_policy_panorama | s_policy_shared ) ; s_policy_panorama : PANORAMA ( ss_common | panorama_post_rulebase | panorama_pre_rulebase ) ; s_policy_shared : SHARED /* TODO */ ; panorama_post_rulebase : POST_RULEBASE rulebase_inner ; panorama_pre_rulebase : PRE_RULEBASE rulebase_inner ;
Regex.g4
DazeDC/regex-parser
0
555
grammar Regex; @header { package it.unicam.cs.cmp.parser.generated; } expr : union EOF # unionEOF ; union : union PLUS concat # unionMatch | concat # unionConcat ; concat : concat kleene # concatMatch | kleene # concatKleene ; kleene : term KLEENE # kleeneMatch | term # kleeneTerm ; term : LETTER # termLetter | DIGIT # termDigit | EPSILON # termEpsilon | '(' union ')' # termParenthesis ; EPSILON: 'epsilon' ; LETTER: [a-zA-Z] ; DIGIT: [0-9]; PLUS: '+'; KLEENE: '*'; WS : [ \t\r\n]+ -> skip ; // toss out whitespace
lib/isa-l/erasure_code/gf_vect_mad_avx2.asm
fossabot/7bgzf
1
90647
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Copyright(c) 2011-2015 Intel Corporation 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 Intel Corporation nor the names of its ; contributors may be used to endorse or promote products derived ; from this software without specific prior written permission. ; ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; gf_vect_mad_avx2(len, vec, vec_i, mul_array, src, dest); ;;; %include "reg_sizes.asm" %ifidn __OUTPUT_FORMAT__, win64 %define arg0 rcx %define arg0.w ecx %define arg1 rdx %define arg2 r8 %define arg3 r9 %define arg4 r12 ; must be saved and loaded %define arg5 r15 %define tmp r11 %define tmp.w r11d %define tmp.b r11b %define return rax %define return.w eax %define PS 8 %define stack_size 16*3 + 3*8 %define arg(x) [rsp + stack_size + PS + PS*x] %define func(x) proc_frame x %macro FUNC_SAVE 0 sub rsp, stack_size vmovdqa [rsp+16*0],xmm6 vmovdqa [rsp+16*1],xmm7 vmovdqa [rsp+16*2],xmm8 save_reg r12, 3*16 + 0*8 save_reg r15, 3*16 + 1*8 end_prolog mov arg4, arg(4) mov arg5, arg(5) %endmacro %macro FUNC_RESTORE 0 vmovdqa xmm6, [rsp+16*0] vmovdqa xmm7, [rsp+16*1] vmovdqa xmm8, [rsp+16*2] mov r12, [rsp + 3*16 + 0*8] mov r15, [rsp + 3*16 + 1*8] add rsp, stack_size %endmacro %elifidn __OUTPUT_FORMAT__, elf64 %define arg0 rdi %define arg0.w edi %define arg1 rsi %define arg2 rdx %define arg3 rcx %define arg4 r8 %define arg5 r9 %define tmp r11 %define tmp.w r11d %define tmp.b r11b %define return rax %define return.w eax %define func(x) x: %define FUNC_SAVE %define FUNC_RESTORE %endif ;;; gf_vect_mad_avx2(len, vec, vec_i, mul_array, src, dest) %define len arg0 %define len.w arg0.w %define vec arg1 %define vec_i arg2 %define mul_array arg3 %define src arg4 %define dest arg5 %define pos return %define pos.w return.w %ifndef EC_ALIGNED_ADDR ;;; Use Un-aligned load/store %define XLDR vmovdqu %define XSTR vmovdqu %else ;;; Use Non-temporal load/stor %ifdef NO_NT_LDST %define XLDR vmovdqa %define XSTR vmovdqa %else %define XLDR vmovntdqa %define XSTR vmovntdq %endif %endif default rel [bits 64] section .text %define xmask0f ymm8 %define xmask0fx xmm8 %define xgft_lo ymm7 %define xgft_hi ymm6 %define x0 ymm0 %define xtmpa ymm1 %define xtmph ymm2 %define xtmpl ymm3 %define xd ymm4 %define xtmpd ymm5 align 16 global gf_vect_mad_avx2:ISAL_SYM_TYPE_FUNCTION func(gf_vect_mad_avx2) FUNC_SAVE sub len, 32 jl .return_fail xor pos, pos mov tmp.b, 0x0f vpinsrb xmask0fx, xmask0fx, tmp.w, 0 vpbroadcastb xmask0f, xmask0fx ;Construct mask 0x0f0f0f... sal vec_i, 5 ;Multiply by 32 vmovdqu xgft_lo, [vec_i+mul_array] ;Load array Cx{00}, Cx{01}, Cx{02}, ... ; " Cx{00}, Cx{10}, Cx{20}, ... , Cx{f0} vperm2i128 xgft_hi, xgft_lo, xgft_lo, 0x11 ; swapped to hi | hi vperm2i128 xgft_lo, xgft_lo, xgft_lo, 0x00 ; swapped to lo | lo XLDR xtmpd, [dest+len] ;backup the last 32 bytes in dest .loop32: XLDR xd, [dest+pos] ;Get next dest vector .loop32_overlap: XLDR x0, [src+pos] ;Get next source vector vpand xtmpa, x0, xmask0f ;Mask low src nibble in bits 4-0 vpsraw x0, x0, 4 ;Shift to put high nibble into bits 4-0 vpand x0, x0, xmask0f ;Mask high src nibble in bits 4-0 vpshufb xtmph, xgft_hi, x0 ;Lookup mul table of high nibble vpshufb xtmpl, xgft_lo, xtmpa ;Lookup mul table of low nibble vpxor xtmph, xtmph, xtmpl ;GF add high and low partials vpxor xd, xd, xtmph ;xd += partial XSTR [dest+pos], xd add pos, 32 ;Loop on 32 bytes at a time cmp pos, len jle .loop32 lea tmp, [len + 32] cmp pos, tmp je .return_pass ;; Tail len mov pos, len ;Overlapped offset length-32 vmovdqa xd, xtmpd ;Restore xd jmp .loop32_overlap ;Do one more overlap pass .return_pass: mov return, 0 FUNC_RESTORE ret .return_fail: mov return, 1 FUNC_RESTORE ret endproc_frame section .data ;;; func core, ver, snum slversion gf_vect_mad_avx2, 04, 01, 0202
VisualRust.Project/Module.g4
dlsteuer/VisualRust
0
6162
<reponame>dlsteuer/VisualRust<filename>VisualRust.Project/Module.g4<gh_stars>0 /* * Very simple module parsing grammar. * Works like rustc --dep-info, but handles broken files. */ grammar Module; PUB : 'pub'; MOD : 'mod'; LBRACE : '{' ; RBRACE : '}' ; SEMI : ';' ; POUND : '#' ; LBRACKET : '[' ; RBRACKET : ']' ; EQ : '=' ; fragment XID_start : [_a-zA-Z] ; fragment XID_continue : [_a-zA-Z0-9] ; IDENT : XID_start XID_continue* ; LINE_COMMENT : '//' ~[\n]* { Skip(); }; BLOCK_COMMENT : '/*' (BLOCK_COMMENT | .)*? '*/' { Skip(); }; fragment HEXIT : [0-9a-fA-F] ; fragment CHAR_ESCAPE: [nrt\\'"0] | [xX] HEXIT HEXIT | 'u' HEXIT HEXIT HEXIT HEXIT | 'U' HEXIT HEXIT HEXIT HEXIT HEXIT HEXIT HEXIT HEXIT ; LIT_STR : '"' ('\\\n' | '\\\r\n' | '\\' CHAR_ESCAPE | .)*? '"' ; ANY_CHAR: . { Skip(); }; mod_block: attrs? PUB? MOD IDENT LBRACE body RBRACE; mod_import: attrs? PUB? MOD IDENT SEMI; body: (mod_import | mod_block | item)*?; item: ( IDENT | SEMI | LBRACE | RBRACE | POUND | LBRACKET | IDENT | EQ | LIT_STR | RBRACKET | PUB); attrs: attr+; attr: POUND LBRACKET IDENT EQ LIT_STR RBRACKET;
programs/oeis/179/A179894.asm
jmorken/loda
1
4802
; A179894: Given the series (1, 2, 1, 2, 1, 2, ...), let (1 + 2x + x^2 + 2x^3 + ...) * (1 + 2x^2 + x^3 + 2x^4 + ...) = (1 + 2x + 3x^2 + 7x^3 + ...) ; 1,2,3,7,7,12,11,17,15,22,19,27,23,32,27,37,31,42,35,47,39,52,43,57,47,62,51,67,55,72,59,77,63,82,67,87,71,92,75,97,79,102,83,107,87,112,91,117,95,122,99,127,103,132,107,137,111,142,115,147,119,152,123,157,127,162 mov $2,$0 trn $2,1 add $0,$2 mov $3,1 lpb $3 add $1,$0 add $0,1 lpb $0 add $1,1 mov $3,$0 trn $0,4 lpe trn $3,3 lpe add $1,$0
notes/FOT/FOTC/Data/Nat/Stream/PropertiesI.agda
asr/fotc
11
14018
<reponame>asr/fotc<gh_stars>10-100 ------------------------------------------------------------------------------ -- Properties of streams of total natural numbers ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module FOT.FOTC.Data.Nat.Stream.PropertiesI where open import FOT.FOTC.Data.Nat.Stream.Type open import FOTC.Base open import FOTC.Base.List open import FOTC.Data.Nat.Type ------------------------------------------------------------------------------ postulate zeros : D zeros-eq : zeros ≡ zero ∷ zeros zeros-StreamN : StreamN zeros zeros-StreamN = StreamN-coind A h refl where A : D → Set A xs = xs ≡ zeros h : ∀ {ns} → A ns → ∃[ n' ] ∃[ ns' ] N n' ∧ A ns' ∧ ns ≡ n' ∷ ns' h Ans = zero , zeros , nzero , refl , (trans Ans zeros-eq)
bb-runtimes/runtimes/ravenscar-full-stm32g474/gnat/a-chahan.ads
JCGobbi/Nucleo-STM32G474RE
0
23734
<gh_stars>0 ------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . C H A R A C T E R S . H A N D L I N G -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- -- apply solely to the contents of the part following the private keyword. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 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. -- -- -- -- -- -- -- -- -- -- -- -- 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. -- -- -- ------------------------------------------------------------------------------ package Ada.Characters.Handling is pragma Pure; -- In accordance with Ada 2005 AI-362 ---------------------------------------- -- Character Classification Functions -- ---------------------------------------- function Is_Control (Item : Character) return Boolean; function Is_Graphic (Item : Character) return Boolean; function Is_Letter (Item : Character) return Boolean; function Is_Lower (Item : Character) return Boolean; function Is_Upper (Item : Character) return Boolean; function Is_Basic (Item : Character) return Boolean; function Is_Digit (Item : Character) return Boolean; function Is_Decimal_Digit (Item : Character) return Boolean renames Is_Digit; function Is_Hexadecimal_Digit (Item : Character) return Boolean; function Is_Alphanumeric (Item : Character) return Boolean; function Is_Special (Item : Character) return Boolean; function Is_Line_Terminator (Item : Character) return Boolean; function Is_Mark (Item : Character) return Boolean; function Is_Other_Format (Item : Character) return Boolean; function Is_Punctuation_Connector (Item : Character) return Boolean; function Is_Space (Item : Character) return Boolean; function Is_NFKC (Item : Character) return Boolean; --------------------------------------------------- -- Conversion Functions for Character and String -- --------------------------------------------------- function To_Lower (Item : Character) return Character; function To_Upper (Item : Character) return Character; function To_Basic (Item : Character) return Character; function To_Lower (Item : String) return String; function To_Upper (Item : String) return String; function To_Basic (Item : String) return String; ---------------------------------------------------------------------- -- Classifications of and Conversions Between Character and ISO 646 -- ---------------------------------------------------------------------- subtype ISO_646 is Character range Character'Val (0) .. Character'Val (127); function Is_ISO_646 (Item : Character) return Boolean; function Is_ISO_646 (Item : String) return Boolean; function To_ISO_646 (Item : Character; Substitute : ISO_646 := ' ') return ISO_646; function To_ISO_646 (Item : String; Substitute : ISO_646 := ' ') return String; ------------------------------------------------------ -- Classifications of Wide_Character and Characters -- ------------------------------------------------------ -- Ada 2005 AI 395: these functions are moved to Ada.Characters.Conversions -- and are considered obsolete in Ada.Characters.Handling. However we do -- not complain about this obsolescence, since in practice it is necessary -- to use these routines when creating code that is intended to run in -- either Ada 95 or Ada 2005 mode. -- We do however have to flag these if the pragma No_Obsolescent_Features -- restriction is active (see Restrict.Check_Obsolescent_2005_Entity). function Is_Character (Item : Wide_Character) return Boolean; function Is_String (Item : Wide_String) return Boolean; ------------------------------------------------------ -- Conversions between Wide_Character and Character -- ------------------------------------------------------ -- Ada 2005 AI 395: these functions are moved to Ada.Characters.Conversions -- and are considered obsolete in Ada.Characters.Handling. However we do -- not complain about this obsolescence, since in practice it is necessary -- to use these routines when creating code that is intended to run in -- either Ada 95 or Ada 2005 mode. -- We do however have to flag these if the pragma No_Obsolescent_Features -- restriction is active (see Restrict.Check_Obsolescent_2005_Entity). function To_Character (Item : Wide_Character; Substitute : Character := ' ') return Character; function To_String (Item : Wide_String; Substitute : Character := ' ') return String; function To_Wide_Character (Item : Character) return Wide_Character; function To_Wide_String (Item : String) return Wide_String; private pragma Inline (Is_Alphanumeric); pragma Inline (Is_Basic); pragma Inline (Is_Character); pragma Inline (Is_Control); pragma Inline (Is_Digit); pragma Inline (Is_Graphic); pragma Inline (Is_Hexadecimal_Digit); pragma Inline (Is_ISO_646); pragma Inline (Is_Letter); pragma Inline (Is_Line_Terminator); pragma Inline (Is_Lower); pragma Inline (Is_Mark); pragma Inline (Is_Other_Format); pragma Inline (Is_Punctuation_Connector); pragma Inline (Is_Space); pragma Inline (Is_Special); pragma Inline (Is_Upper); pragma Inline (To_Basic); pragma Inline (To_Character); pragma Inline (To_Lower); pragma Inline (To_Upper); pragma Inline (To_Wide_Character); end Ada.Characters.Handling;
src/rp2040_zfp.ads
hgrodriguez/rp2040_zfp
0
11358
package Rp2040_Zfp is end Rp2040_Zfp;
test/Fail/TabsInPragmas.agda
cruhland/agda
1,989
4898
{-# OPTIONS --type-in-type #-} module TabsInPragmas where
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1322.asm
ljhsiun2/medusa
9
96096
<reponame>ljhsiun2/medusa<filename>Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1322.asm .global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r8 push %rcx push %rdi push %rdx push %rsi lea addresses_UC_ht+0x893b, %rsi lea addresses_WT_ht+0x1abb, %rdi nop nop nop nop xor $43098, %r10 mov $3, %rcx rep movsl nop inc %rdi lea addresses_A_ht+0x10ebb, %rdx clflush (%rdx) nop nop nop add $60746, %r10 mov $0x6162636465666768, %r11 movq %r11, %xmm5 and $0xffffffffffffffc0, %rdx movaps %xmm5, (%rdx) nop nop nop cmp $32113, %rsi lea addresses_D_ht+0x24e4, %rsi lea addresses_WC_ht+0x12cbb, %rdi nop nop nop nop add %rdx, %rdx mov $110, %rcx rep movsw nop nop nop nop add $63454, %rdi lea addresses_WC_ht+0x151b3, %rdi nop nop nop nop nop xor $25241, %r8 mov (%rdi), %dx cmp %rdx, %rdx lea addresses_UC_ht+0x100fb, %rdi nop nop xor $9512, %r10 mov $0x6162636465666768, %rsi movq %rsi, (%rdi) nop nop nop nop nop sub $8933, %r11 pop %rsi pop %rdx pop %rdi pop %rcx pop %r8 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r8 push %r9 push %rax push %rbp push %rbx push %rsi // Store lea addresses_WT+0x884b, %r9 clflush (%r9) nop xor %r8, %r8 movb $0x51, (%r9) nop nop inc %rbx // Store lea addresses_UC+0xce2f, %rbx nop nop add $28295, %r11 movb $0x51, (%rbx) nop nop dec %rbx // Faulty Load lea addresses_WT+0x22bb, %r8 nop sub $41951, %rsi movups (%r8), %xmm3 vpextrq $0, %xmm3, %r9 lea oracles, %r11 and $0xff, %r9 shlq $12, %r9 mov (%r11,%r9,1), %r9 pop %rsi pop %rbx pop %rbp pop %rax pop %r9 pop %r8 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 3}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 2}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 11, 'type': 'addresses_WT_ht'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': True, 'size': 16, 'congruent': 9}} {'OP': 'REPM', 'src': {'same': True, 'congruent': 0, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_WC_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 2}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': True, 'AVXalign': False, 'size': 8, 'congruent': 5}} {'39': 21829} 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 */
oeis/240/A240847.asm
neoneye/loda-programs
11
8221
; A240847: a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) - a(n-4) for n>3, a(0)=a(1)=a(3)=0, a(2)=1. ; Submitted by <NAME> ; 0,0,1,0,1,0,0,-2,-5,-12,-25,-50,-96,-180,-331,-600,-1075,-1908,-3360,-5878,-10225,-17700,-30509,-52390,-89664,-153000,-260375,-442032,-748775,-1265832,-2136000,-3598250,-6052061,-10164540,-17048641,-28559450,-47786400,-79870428,-133359715,-222457608,-370747675,-617363100,-1027198944,-1707808030,-2837341129,-4710729300,-7815984725,-12960208462,-21477601920,-35572713552,-58886627375,-97430556000,-161124710351,-266334008400,-440044987776,-726744007250,-1199740275125,-1979800573548,-3265808419945 mov $3,2 mov $5,$0 sub $5,1 lpb $3 mov $0,$5 sub $3,1 add $0,$3 max $0,0 seq $0,1629 ; Self-convolution of Fibonacci numbers. mov $2,$3 mul $2,$0 add $1,$2 mov $4,$0 lpe sub $1,$4 min $5,1 mul $5,$4 sub $1,$5 mov $0,$1
test/interaction/Issue2076.agda
hborum/agda
3
4840
<reponame>hborum/agda<gh_stars>1-10 -- Andrea(s), 2016-07-06, issue #2076 reported by Andrea -- This is to test printing of extended lambdas -- {-# OPTIONS -v tc.cc:60 -v tc.term.exlam:100 -v reify.clause:60 #-} postulate A : Set _,_ : A → A → A data Unit : Set where true : Unit bar : (p : A) (q : A) → Unit → A bar p q = aux where aux : Unit → A aux true = p , q foo : (p : A) (q : A) → Unit → A foo p q = \ { true → p , q} test : (a : A) → Unit → A test a = foo a a -- Normalize me! Expected: -- λ a → λ { true → a , a } -- From test/interaction/ExtendedLambdaCase.agda data Bool : Set where true false : Bool data Void : Set where module M {A : Set}(B : A → Set) where postulate Bar : (Bool → Bool) → Set Test : Set Test = (y : Bool) → M.Bar {Bool} (λ _ → Void) (λ { true → true ; false → false }) -- Normalize me! Expected: -- (y : Bool) → M.Bar (λ _ → Void) (λ { true → true ; false → false }) -- .extendedlambda1 y true = true -- .extendedlambda1 y false = false -- dropped args: [] -- hidden args: [] -- visible args: [y] -- Extended lambda inside parameterized module module PM (X : Set) where extlam : (p : A) (q : A) → Unit → A extlam p q = \ { true -> p , q} -- ConcreteDef extended lambda's implementation ".extendedlambda1" has type: -- Unit → A -- dropped args: [X] -- hidden args: [] -- visible args: [p, q] -- clauses before compilation .extendedlambda1 p₁ q₁ true = p₁ , q₁ -- , clauseTel = -- ExtendTel r(El {_getSort = Type (Max [ClosedLevel 1]), unEl = Sort (Type (Max []))}) (Abs "X" -- ExtendTel r(El {_getSort = Type (Max []), unEl = Def Issue2076.A []}) (Abs "p" -- ExtendTel r(El {_getSort = Type (Max []), unEl = Def Issue2076.A []}) (Abs "q" -- EmptyTel))) -- , namedClausePats = -- [r(X = VarP (DBPatVar {dbPatVarName = "X", dbPatVarIndex = 2})) -- ,r(p = VarP (DBPatVar {dbPatVarName = "p", dbPatVarIndex = 1})) -- ,r(q = VarP (DBPatVar {dbPatVarName = "q", dbPatVarIndex = 0})) -- ,r(x = ConP Issue2076.Unit.true(inductive)[] (ConPatternInfo {conPRecord = Nothing, conPType = Just r(El {_getSort = Type (Max []), unEl = Def Issue2076.Unit []})}) []) -- ] -- , clauseBody = Bind (Abs "h0" Bind (Abs "h1" Bind (Abs "h2" Body (Def Issue2076._,_ [Apply r(Var 1 []),Apply r(Var 0 [])])))) -- clauses before compilation -- , clauseTel = -- ExtendTel r(El {_getSort = Type (Max [ClosedLevel 1]), unEl = Sort (Type (Max []))}) (Abs "X" -- ExtendTel r(El {_getSort = Type (Max []), unEl = Def Issue2076.A []}) (Abs "p" -- ExtendTel r(El {_getSort = Type (Max []), unEl = Def Issue2076.A []}) (Abs "q" -- EmptyTel))) -- , namedClausePats = -- [r(X = VarP (DBPatVar {dbPatVarName = "X", dbPatVarIndex = 2})) -- ,r(p = VarP (DBPatVar {dbPatVarName = "p", dbPatVarIndex = 1})) -- ,r(q = VarP (DBPatVar {dbPatVarName = "q", dbPatVarIndex = 0}))] -- , clauseBody = Bind (Abs "h0" Bind (Abs "h1" Bind (Abs "h2" -- Body (Def Issue2076.PM..extendedlambda1 -- [Apply r(Var 2 []),Apply r(Var 1 []),Apply r(Var 0 [])])))) -- wrong printing -- clauses before compilation extlam p q = λ { q₁ true → p₁ , q₁ } inside : (a : A) → Unit → A inside a = extlam a a bla : (a : A) → {!!} bla a = {!inside a!} -- Normalization of `inside a` here should yield -- λ { true → a , a } ptest : (a : A) → Unit → A ptest a = PM.extlam Unit a a -- ptest should normalize to λ a → λ { true → a , a } module MM (Y : Set) where open PM Y public -- Normalizing MM.extlam should yield -- λ Y p q → λ { true → p , q } open MM Unit opentest : (a : A) → Unit → A opentest a = extlam a a -- opentest should normalize to λ a → λ { true → a , a } module Parent (Y : Set) where module Child (X : Set) where extlam2 : (p : A) (q : A) → Unit → A extlam2 p q = \ { true -> p , q} -- Normalizing Parent.Child.extlam2 should yield -- λ Y X p q → λ { true → p , q } open import Agda.Builtin.Nat data Vec (A : Set) : Nat → Set where [] : Vec A 0 _∷_ : ∀ {n} → A → Vec A n → Vec A (suc n) postulate h : (∀ {n} → Vec Nat n → Nat) → Nat f : Nat → Nat f n = h λ where [] → 0 (x ∷ xs) → n -- Normalising f should yield -- λ n → h (λ { [] → 0 ; (x ∷ xs) → n })
libsrc/_DEVELOPMENT/math/float/math48/z80/core/mm48__comser.asm
jpoikela/z88dk
640
167617
SECTION code_clib SECTION code_fp_math48 PUBLIC mm48__comser EXTERN mm48_equal, mm48_fpmul, mm48__calcs mm48__comser: ; enter : a = loop count ; AC' = X ; ; exit : AC' = result ; AC = X ; ; uses : af, bc, de, hl, af', bc', de', hl' ;COMSER udregner en potensraekke af formen: ;T=X*((((X^2+K1)*X^2+K2)....)*X^2+Kn)/Kn, ;hvor X er i AC, n er i A, og adressen paa ;konstanterne (minus 6) i IX. exx push bc ;save X push de push hl push af ;save loop count call mm48_equal call mm48_fpmul pop af ;restore loop count ; AC = X ; AC'= X*X call mm48__calcs ;AC'= result pop hl pop de pop bc ;AC = X jp mm48_fpmul
src/Categories/Category/Instance/SingletonSet.agda
MirceaS/agda-categories
0
16379
{-# OPTIONS --without-K --safe #-} open import Level -- This is really a degenerate version of Categories.Category.Instance.One -- Here SingletonSet is not given an explicit name, it is an alias for Lift o ⊤ module Categories.Category.Instance.SingletonSet where open import Data.Unit using (⊤; tt) open import Relation.Binary.PropositionalEquality using (refl) open import Categories.Category.Instance.Sets open import Categories.Category.Instance.Setoids import Categories.Object.Terminal as Term module _ {o : Level} where open Term (Sets o) SingletonSet-⊤ : Terminal SingletonSet-⊤ = record { ⊤ = Lift o ⊤ ; !-unique = λ _ → refl } module _ {c ℓ : Level} where open Term (Setoids c ℓ) SingletonSetoid-⊤ : Terminal SingletonSetoid-⊤ = record { ⊤ = record { Carrier = Lift c ⊤ ; _≈_ = λ _ _ → Lift ℓ ⊤ } }
OSSOURCE/numcnvrt.asm
mooseman/smallOS
3
100297
<gh_stars>1-10 ; MMURTL Operating System Source Code ; Written by <NAME> ; This code is released to the public domain. ; "Share and enjoy....." ;) .DATA .INCLUDE MOSEDF.INC ;============================================================================= .CODE ;============================================================================= ; ; HextoDD - Converts a text string of Hex chars to a DD ; This converts an ASCII string of hex digits to a DD (3 params) ; 1) 32 bit near ptr to the ASCII Hex String ; 2) The 32 Bit Near Ptr (relative to DS) of returned DD ; 3) DD with count of bytes in string ; This can easily be converted to accept a DF (48 bit Far Ptr) ; EAX returns ercBadString if string supplied was not convertable! ; This only saves segment registers!!! ; pHexStr EQU DWORD PTR [EBP+10h] pDDOut EQU DWORD PTR [EBP+0Ch] cbHexStr EQU DWORD PTR [EBP+08h] HexTotal EQU DWORD PTR [EBP-04h] ;Local variable PUBLIC HexToDD: ENTER 4,0 MOV ECX,cbHexStr ;how long is the string MOV ESI,pHexStr ;EBX points to str[1] ADD ESI, ECX ;EBX points to str[cbStr] (LSD) DEC ESI ;Offset of last is p - 1 MOV EDI,pDDOut ;prepare to return answer MOV HexTotal, 0 ;start with nothing MOV EBX, 1 ;First mutliplier NextHex: XOR EAX, EAX MOV AL, [ESI] CMP AL, 47h ; JB Hex000 ;It's not lower case... AND AL, 01001111b ;make it Upper case Hex000: CMP AL, 30h ;Less than "0"? JB BadHex ;Yes... SUB AL, 30h ;No, make it a binary number CMP AL, 0Ah ;Is it A-F?? JB Hex001 SUB AL, 07h ;Yes, make it a number Hex001: MUL EBX ;TIMES multiplier ADD EAX, HexTotal ;add to total MOV HexTotal, EAX SHL EBX, 4 ;increase mutiplier TIMES 16 DEC ESI LOOP NextHex MOV EAX, HexTotal MOV [EDI], EAX MOV EAX, ercOk JMP HexDone BadHex: MOV EAX, ercBadString HexDone: LEAVE RETN 12 ;============================================================================= ; ; DecToDD: ; This converts an ASCII string of Decimal digits to a DD (3 params) ; 1) 32 bit near ptr to the ASCII Decimal String ; 2) The 32 Bit Near Ptr (relative to DS) of returned DD ; 3) DD with count of bytes in string ; EAX returns ercBadString if string supplied was not convertable! ; ;============================================================================= pDecStr EQU DWORD PTR [EBP+16] pDDOut1 EQU DWORD PTR [EBP+12] cbDecStr EQU DWORD PTR [EBP+08] DecTotal EQU DWORD PTR [EBP-04] PUBLIC DecToDD: ENTER 4,0 MOV ECX,cbDecStr ;how long is the string MOV ESI,pDecStr ;EBX points to str[1] ADD ESI, ECX ;EBX points to str[cbStr] (LSD) DEC ESI ;Offset of last is p - 1 MOV EDI,pDDOut1 ;prepare to return answer MOV DecTotal, 0 ;start with nothing MOV EBX, 1 ;First mutliplier NextDec: XOR EAX, EAX MOV AL, [ESI] CMP AL, 39h ;> "9"? JA BadDec ;It's not lower case... Dec000: CMP AL, 30h ;Less than "0"? JB BadDec ;Yes... SUB AL, 30h ;No, make it a binary number MUL EBX ;TIMES multiplier ADD EAX, DecTotal ;add to total MOV DecTotal, EAX MOV EAX, 10 MUL EBX ;increase mutiplier TIMES 10 MOV EBX, EAX DEC ESI LOOP NextDec MOV EAX, DecTotal MOV [EDI], EAX MOV EAX, ercOk JMP DecDone BadDec: MOV EAX, ercBadString DecDone: LEAVE RETN 12 ;============================================================================= ; ; DDtoHex: ; This converts a DD to an 8 Byte ASCII String in Hex (2 params) ; 1) the DD to convert ; 2) The 32 Bit Near Ptr (relative to DS) of returned string ; ;============================================================================= DDin EQU DWORD PTR [EBP+0Ch] pStrOut EQU DWORD PTR [EBP+08h] PUBLIC DDtoHex: ENTER 0,0 PUSHAD MOV EAX,DDin MOV EDI,pStrOut MOV ECX,8h DDAgain: MOV BL,AL AND BL,0Fh MOV BH,30h ;0 in ASCII ADD BH, BL CMP BH,39h JLE SHORT PutOut ADD BH,7 PutOut: MOV [EDI+ECX-1],BH DEC ECX JZ SHORT DDDone SHR EAX,4 JMP SHORT DDAgain ddDone: POPAD LEAVE RETN 08h ;============================================================================= ; ; DDtoDec: ; This converts a DD to a 10 Byte ASCII DECIMAL String (2 params) ; 1) the DD to convert ; 2) The 32 Bit Near Ptr (relative to DS) of returned string ; This can easily be converted to accept a DF (48 bit Far Ptr) ; ;============================================================================= DDinD EQU DWORD PTR [EBP+0Ch] pStrOutD EQU DWORD PTR [EBP+08h] PUBLIC DDtoDec: ENTER 0,0 PUSHAD MOV ESI,DDin ;ESI has what's left of DD MOV EDI,pStrOut MOV ECX,10 MOV EBX, 1000000000 ;A billion (exactly...DUH) MOV AL, 30h ;A zero (ASCII) DDtoDec0: CMP ESI, EBX JB DDtoDec1 ;Go for the next digit SUB ESI, EBX INC AL JMP DDtoDec0 DDtoDec1: MOV [EDI], AL ;Give them this byte INC EDI ;setup for next byte in string XOR EDX,EDX ;Div EBX by 10 put back in EBX MOV EAX,EBX MOV EBX,10 DIV EBX MOV EBX, EAX ; MOV AL, 30h ;start with zero again LOOP DDtoDec0 ;Go back for more POPAD LEAVE RETN 08h ;============ End of Module ==================
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c3/c35503l.ada
best08618/asylo
7
12926
<filename>gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c3/c35503l.ada -- C35503L.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 'POS' AND 'VAL' YIELD THE CORRECT RESULTS WHEN THE -- PREFIX IS A GENERIC FORMAL DISCRETE TYPE WHOSE ACTUAL PARAMETER -- IS AN INTEGER TYPE. -- HISTORY: -- RJW 03/17/86 CREATED ORIGINAL TEST. -- DHH 10/19/87 SHORTENED LINES CONTAINING MORE THAN 72 CHARACTERS. WITH REPORT; USE REPORT; PROCEDURE C35503L IS BEGIN TEST ("C35503L", "CHECK THAT 'POS' AND 'VAL' YIELD THE " & "CORRECT RESULTS WHEN THE PREFIX IS A " & "GENERIC FORMAL DISCRETE TYPE WHOSE " & "ACTUAL PARAMETER IS AN INTEGER TYPE" ); DECLARE TYPE INTRANGE IS RANGE -6 .. 6; GENERIC TYPE INT IS (<>); PROCEDURE P (STR : STRING); PROCEDURE P (STR : STRING) IS SUBTYPE SINT IS INT RANGE INT'VAL (IDENT_INT(-4)) .. INT'VAL (IDENT_INT(4)); I :INTEGER; BEGIN I := IDENT_INT(-6); FOR S IN INT'VAL (IDENT_INT(-6)) .. INT'VAL (IDENT_INT(6)) LOOP BEGIN IF SINT'POS (S) /= I THEN FAILED ( "WRONG VALUE FOR " & STR & "'POS OF " & INT'IMAGE (S) ); END IF; EXCEPTION WHEN OTHERS => FAILED ( "EXCEPTION RAISED FOR " & STR & "'POS " & "OF " & INT'IMAGE (S) ); END; BEGIN IF SINT'VAL (I) /= S THEN FAILED ( "WRONG VALUE FOR " & STR & "'VAL " & "OF " & INT'IMAGE (S) ); END IF; EXCEPTION WHEN OTHERS => FAILED ( "EXCEPTION RAISED FOR " & STR & "'VAL " & "OF " & INT'IMAGE (S) ); END; I := I + 1; END LOOP; END P; PROCEDURE P1 IS NEW P (INTRANGE); PROCEDURE P2 IS NEW P (INTEGER); BEGIN P1 ("INTRANGE"); P2 ("INTEGER"); END; RESULT; END C35503L;
next_level/demosrc/s_itwilllead.asm
viznut/demoscene
14
244224
;,; lyrics_itwillleadus .withinpagefrom=lyrics ;,; <- lyrics !byte $21,$29,$1d ; IT !byte $07 ; 'LL !byte $51,$19,$1d ; (L)EAD ; was 71 !byte $3a,$34 ; US !byte $59,$1d,$46 ; TO ; was 49 !byte $4a,$46,$40,$89 ; OUR ; was 09 !byte $1b,$2a,$40 ; PRO !byte $28,$41,$24,$19,$1d ; MISED !byte $39,$43,$51 ; (H)A !byte $26,$63,$62 ; VEN !byte $0f ;,; deps_itwilllead ;,; <- lyrics_itwillleadus ;,; <- ibpcaablocks ;,; SC31_000a ;,; <- deps_itwilllead ;,; <- streamvars ;,; <- lyrics_itwillleadus ;,; <- player_ivars !src "demosrc/smac.inc" +sAddr nextlyrictosing !byte $00,lyrics_itwillleadus-lyrics ; method 4 ( clrscr bytes ) -- 462 bytes (462 cumu) ; method 5 ( clrscr ibpc0 bytes ) -- 493 bytes (493 cumu) ; method 6 ( clrscr bytes ) -- 462 bytes (462 cumu) ; method 7 ( clrscr ibpc0 ibpcaa bytes ) -- 518 bytes (518 cumu) ; METHOD 4 CHOSEN !byte $e4,3,ch0000000000000000 ; clrscr ; total unique chars in pic: 46 (worst case req 368 bytes) !byte $DA,$00 ;addr !byte $54,$02 ;fill !byte $e2,1;mode4 !byte $01 ;data4 !byte $66 !byte $22 !byte $52,$01 ;fill !byte $01 ;data4 !byte $66 !byte $22 !byte $52,$01 ;fill !byte $00 ;data4 !byte $66 !byte $4F,$02 ;fill !byte $07 ;data4 !byte $44 !byte $64 !byte $66 !byte $26 !byte $22 !byte $22 !byte $12 !byte $33 !byte $46,$02 ;fill !byte $0B ;data4 !byte $44 !byte $44 !byte $64 !byte $26 !byte $22 !byte $22 !byte $12 !byte $33 !byte $33 !byte $22 !byte $22 !byte $22 !byte $45,$04 ;fill !byte $03 ;data4 !byte $22 !byte $22 !byte $22 !byte $31 !byte $8F ;skip !byte $03 ;data4 !byte $22 !byte $22 !byte $22 !byte $31 !byte $8F ;skip !byte $03 ;data4 !byte $22 !byte $22 !byte $22 !byte $31 !byte $8F ;skip !byte $03 ;data4 !byte $22 !byte $22 !byte $22 !byte $31 !byte $8F ;skip !byte $03 ;data4 !byte $22 !byte $22 !byte $22 !byte $31 !byte $8F ;skip !byte $03 ;data4 !byte $22 !byte $22 !byte $22 !byte $31 !byte $8F ;skip !byte $03 ;data4 !byte $22 !byte $22 !byte $22 !byte $31 !byte $8F ;skip !byte $03 ;data4 !byte $55 !byte $55 !byte $55 !byte $31 !byte $8F ;skip !byte $03 ;data4 !byte $55 !byte $55 !byte $55 !byte $31 !byte $8F ;skip !byte $03 ;data4 !byte $55 !byte $55 !byte $55 !byte $31 !byte $8F ;skip !byte $03 ;data4 !byte $55 !byte $55 !byte $55 !byte $31 !byte $8F ;skip !byte $59,$05 ;fill !byte $50,$01 ;fill !byte $02 ;data4 !byte $55 !byte $55 !byte $55 !byte $50,$01 ;fill !byte $58,$05 ;fill !byte $00 ;data4 !byte $0B !byte $e1,3 ;,; *_000b ;,; <- deps_itwilllead ;,; <- streamvars ;,; <- lyrics_itwillleadus ;,; <- player_ivars ;,; <- chFFFFFFFFFFFFFFFF ; 88 ;,; <- ch0000000000000000 ; 178 ;,; <- chFCFC303030303030 ; 5 ;,; <- chC6C6C6C6C6C6C6C6 ; 2 ;,; <- chC0C0C0C0C0C0C0C0 ; 3 ;,; <- chFCFCE0C0C0C0C0C0 ; 6 ;,; <- chFCFCDCCCCCCCCCCC ; 12 ;,; <- chF0F8CCCCCCCCCCCC ; 4 ;,; <- chCCCCCCCCCCCCCCCC ; 5 ;,; <- chFEFEFEFCFEFCFCF8 ; 2 ;,; <- chFF7F7F3F7F3F3F1F ; 3 ;,; <- ch303030303030FCFC ; 3 ;,; <- ch3030303030303030 ; 2 ;,; <- chD6D6D6D6D6F6FEFE ; 1 ;,; <- chC0C0C0C0C0E0FCFC ; 3 ;,; <- chFCFCE0C0C0E0FCFC ; 3 ;,; <- chCCCCCCCCCCECFCFC ; 7 ;,; <- chFCFC1C0C0C1CFCFC ; 2 ;,; <- chFEFEFCFCF8F8F0E0 ; 6 ;,; <- ch7F7F3F3F1F1F0F07 ; 7 ;,; <- chF8F8F0F0E0E0C080 ; 7 ;,; <- ch1F1F0F0F07070301 ; 5 ;,; <- chC0F0FCFFFFFFFFFF ; 7 ;,; <- ch00000000C0F0FCFF ; 7 ;,; <- ch7F3F1F0F07030100 ; 4 ;,; <- chF0E0C08000000000 ; 4 ;,; <- ch000000000103070F ; 5 ;,; <- chFFFFFFFFFEFEFEFE ; 5 ;,; <- ch0008080800000000 ; 4 ;,; <- ch1F1F1F1F1F1F1F1F ; 6 ;,; <- chFEFEFEFEFFFFFFFF ; 5 ;,; <- ch00000000C0E0F0F0 ; 5 ;,; <- ch4002001000044100 ; 11 ;,; <- ch5002148128004210 ; 9 ;,; <- ch1F3F7FFFFFFF7F3F ; 6 ;,; <- chC0C0C0E0E1E0E0E0 ; 5 ;,; <- chF05A2CC52A554ABD ; 13 ;,; <- ch3F3F3F3F3F3F3F3F ; 12 ;,; <- chE0C0800000000000 ; 5 ;,; <- ch80C0E0F0F8F8F8F8 ; 5 ;,; <- ch7F7F7F7F7F7F7F7F ; 6 ;,; <- chF8F8F8F8C0C0C0C0 ; 5 ;,; <- chFFFFFFFFFFFF0000 ; 18 ;,; <- chFEFEDED6D6D6D6D6 ; 1 ;,; <- chCCCCCCCC78783030 ; 1 ;,; <- ch5555555555555555 ; 1 !byte $CE,$00 ;addr !byte $e2,0;mode8 !byte $01 ;data8 !byte chFFFFFFFFFFFFFFFF !byte chFFFFFFFFFFFFFFFF !byte $93 ;skip !byte $42,chFFFFFFFFFFFFFFFF ;fill !byte $2F ;data8 !byte ch0000000000000000 !byte chFCFC303030303030 !byte chFCFC303030303030 !byte ch0000000000000000 !byte chC6C6C6C6C6C6C6C6 !byte chFCFC303030303030 !byte chC0C0C0C0C0C0C0C0 !byte chC0C0C0C0C0C0C0C0 !byte ch0000000000000000 !byte chC0C0C0C0C0C0C0C0 !byte chFCFCE0C0C0C0C0C0 !byte chFCFCDCCCCCCCCCCC !byte chF0F8CCCCCCCCCCCC !byte ch0000000000000000 !byte chCCCCCCCCCCCCCCCC !byte chFCFCE0C0C0C0C0C0 !byte ch0000000000000000 !byte chFCFC303030303030 !byte chFCFCDCCCCCCCCCCC !byte ch0000000000000000 !byte chFFFFFFFFFFFFFFFF !byte chFFFFFFFFFFFFFFFF !byte chFEFEFEFCFEFCFCF8 !byte chFF7F7F3F7F3F3F1F !byte ch0000000000000000 !byte ch303030303030FCFC !byte ch3030303030303030 !byte ch0000000000000000 !byte chD6D6D6D6D6F6FEFE !byte ch303030303030FCFC !byte chC0C0C0C0C0E0FCFC !byte chC0C0C0C0C0E0FCFC !byte ch0000000000000000 !byte chC0C0C0C0C0E0FCFC !byte chFCFCE0C0C0E0FCFC !byte chFCFCDCCCCCCCCCCC !byte chCCCCCCCCCCECFCFC !byte ch0000000000000000 !byte chCCCCCCCCCCECFCFC !byte chFCFC1C0C0C1CFCFC !byte ch0000000000000000 !byte ch3030303030303030 !byte chCCCCCCCCCCECFCFC !byte ch0000000000000000 !byte chFEFEFEFCFEFCFCF8 !byte chFF7F7F3F7F3F3F1F !byte chFEFEFCFCF8F8F0E0 !byte ch7F7F3F3F1F1F0F07 !byte $93 ;skip !byte $19 ;data8 !byte chFEFEFCFCF8F8F0E0 !byte chFF7F7F3F7F3F3F1F !byte chF8F8F0F0E0E0C080 !byte ch1F1F0F0F07070301 !byte chF8F8F0F0E0E0C080 !byte ch0000000000000000 !byte ch0000000000000000 !byte ch0000000000000000 !byte chFFFFFFFFFFFFFFFF !byte chC0F0FCFFFFFFFFFF !byte ch00000000C0F0FCFF !byte ch0000000000000000 !byte ch7F7F3F3F1F1F0F07 !byte chFFFFFFFFFFFFFFFF !byte chFEFEFCFCF8F8F0E0 !byte ch7F7F3F3F1F1F0F07 !byte chF8F8F0F0E0E0C080 !byte ch1F1F0F0F07070301 !byte chFEFEFCFCF8F8F0E0 !byte ch7F7F3F3F1F1F0F07 !byte chFEFEFCFCF8F8F0E0 !byte ch7F7F3F3F1F1F0F07 !byte chFEFEFCFCF8F8F0E0 !byte ch7F7F3F3F1F1F0F07 !byte chF8F8F0F0E0E0C080 !byte ch7F7F3F3F1F1F0F07 !byte $85 ;skip !byte $06 ;data8 !byte chFFFFFFFFFFFFFFFF !byte chFFFFFFFFFFFFFFFF !byte chFFFFFFFFFFFFFFFF !byte chC0F0FCFFFFFFFFFF !byte ch00000000C0F0FCFF !byte ch1F1F0F0F07070301 !byte chF8F8F0F0E0E0C080 !byte $83 ;skip !byte $03 ;data8 !byte ch1F1F0F0F07070301 !byte chF8F8F0F0E0E0C080 !byte ch1F1F0F0F07070301 !byte chF8F8F0F0E0E0C080 !byte $88 ;skip !byte $43,chFFFFFFFFFFFFFFFF ;fill !byte $01 ;data8 !byte chC0F0FCFFFFFFFFFF !byte ch00000000C0F0FCFF !byte $90 ;skip !byte $45,chFFFFFFFFFFFFFFFF ;fill !byte $01 ;data8 !byte chC0F0FCFFFFFFFFFF !byte ch00000000C0F0FCFF !byte $8E ;skip !byte $47,chFFFFFFFFFFFFFFFF ;fill !byte $01 ;data8 !byte chC0F0FCFFFFFFFFFF !byte ch00000000C0F0FCFF !byte $8C ;skip !byte $49,chFFFFFFFFFFFFFFFF ;fill !byte $01 ;data8 !byte chC0F0FCFFFFFFFFFF !byte ch00000000C0F0FCFF !byte $8A ;skip !byte $0E ;data8 !byte chFFFFFFFFFFFFFFFF !byte ch7F3F1F0F07030100 !byte chFFFFFFFFFFFFFFFF !byte chF0E0C08000000000 !byte ch7F3F1F0F07030100 !byte chFFFFFFFFFFFFFFFF !byte chF0E0C08000000000 !byte ch7F3F1F0F07030100 !byte chFFFFFFFFFFFFFFFF !byte chF0E0C08000000000 !byte ch7F3F1F0F07030100 !byte chFFFFFFFFFFFFFFFF !byte chF0E0C08000000000 !byte ch0000000000000000 !byte ch00000000C0F0FCFF !byte $88 ;skip !byte $0E ;data8 !byte chFFFFFFFFFFFFFFFF !byte ch000000000103070F !byte chFFFFFFFFFEFEFEFE !byte ch0008080800000000 !byte ch000000000103070F !byte chFFFFFFFFFEFEFEFE !byte ch0008080800000000 !byte ch000000000103070F !byte chFFFFFFFFFEFEFEFE !byte ch0008080800000000 !byte ch000000000103070F !byte chFFFFFFFFFEFEFEFE !byte ch0008080800000000 !byte ch000000000103070F !byte chFFFFFFFFFEFEFEFE !byte $88 ;skip !byte $3F ;data8 !byte chFFFFFFFFFFFFFFFF !byte ch1F1F1F1F1F1F1F1F !byte chFEFEFEFEFFFFFFFF !byte ch00000000C0E0F0F0 !byte ch1F1F1F1F1F1F1F1F !byte chFEFEFEFEFFFFFFFF !byte ch00000000C0E0F0F0 !byte ch1F1F1F1F1F1F1F1F !byte chFEFEFEFEFFFFFFFF !byte ch00000000C0E0F0F0 !byte ch1F1F1F1F1F1F1F1F !byte chFEFEFEFEFFFFFFFF !byte ch00000000C0E0F0F0 !byte ch1F1F1F1F1F1F1F1F !byte chFEFEFEFEFFFFFFFF !byte ch00000000C0E0F0F0 !byte ch1F1F1F1F1F1F1F1F !byte chC0F0FCFFFFFFFFFF !byte ch0000000000000000 !byte ch4002001000044100 !byte ch4002001000044100 !byte ch4002001000044100 !byte ch5002148128004210 !byte ch5002148128004210 !byte chFFFFFFFFFFFFFFFF !byte ch1F3F7FFFFFFF7F3F !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0E0E1E0E0E0 !byte ch1F3F7FFFFFFF7F3F !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0E0E1E0E0E0 !byte ch1F3F7FFFFFFF7F3F !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0E0E1E0E0E0 !byte ch1F3F7FFFFFFF7F3F !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0E0E1E0E0E0 !byte ch1F3F7FFFFFFF7F3F !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0E0E1E0E0E0 !byte ch1F3F7FFFFFFF7F3F !byte chFFFFFFFFFFFFFFFF !byte ch4002001000044100 !byte ch4002001000044100 !byte ch5002148128004210 !byte chF05A2CC52A554ABD !byte chF05A2CC52A554ABD !byte chF05A2CC52A554ABD !byte chFFFFFFFFFFFFFFFF !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte chE0C0800000000000 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte chE0C0800000000000 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte chE0C0800000000000 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte chE0C0800000000000 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte chE0C0800000000000 !byte $1C ;data8 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte ch4002001000044100 !byte ch5002148128004210 !byte chF05A2CC52A554ABD !byte chF05A2CC52A554ABD !byte chFFFFFFFFFFFFFFFF !byte chFFFFFFFFFFFFFFFF !byte chFFFFFFFFFFFFFFFF !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte ch80C0E0F0F8F8F8F8 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte ch80C0E0F0F8F8F8F8 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte ch80C0E0F0F8F8F8F8 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte ch80C0E0F0F8F8F8F8 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte ch80C0E0F0F8F8F8F8 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte ch5002148128004210 !byte chF05A2CC52A554ABD !byte chF05A2CC52A554ABD !byte $42,chFFFFFFFFFFFFFFFF ;fill !byte $13 ;data8 !byte ch7F7F7F7F7F7F7F7F !byte chFFFFFFFFFFFFFFFF !byte chF8F8F8F8C0C0C0C0 !byte ch7F7F7F7F7F7F7F7F !byte chFFFFFFFFFFFFFFFF !byte chF8F8F8F8C0C0C0C0 !byte ch7F7F7F7F7F7F7F7F !byte chFFFFFFFFFFFFFFFF !byte chF8F8F8F8C0C0C0C0 !byte ch7F7F7F7F7F7F7F7F !byte chFFFFFFFFFFFFFFFF !byte chF8F8F8F8C0C0C0C0 !byte ch7F7F7F7F7F7F7F7F !byte chFFFFFFFFFFFFFFFF !byte chF8F8F8F8C0C0C0C0 !byte ch7F7F7F7F7F7F7F7F !byte chFFFFFFFFFFFFFFFF !byte ch5002148128004210 !byte chF05A2CC52A554ABD !byte chF05A2CC52A554ABD !byte $50,chFFFFFFFFFFFF0000 ;fill !byte $32 ;data8 !byte chFFFFFFFFFFFFFFFF !byte chFFFFFFFFFFFFFFFF !byte chFFFFFFFFFFFFFFFF !byte ch4002001000044100 !byte ch5002148128004210 !byte chF05A2CC52A554ABD !byte chFCFCDCCCCCCCCCCC !byte chCCCCCCCCCCCCCCCC !byte chFCFCDCCCCCCCCCCC !byte ch0000000000000000 !byte chFCFCDCCCCCCCCCCC !byte chFCFCDCCCCCCCCCCC !byte chFCFCDCCCCCCCCCCC !byte chFEFEDED6D6D6D6D6 !byte chFCFC303030303030 !byte chFCFCE0C0C0C0C0C0 !byte chFCFCE0C0C0C0C0C0 !byte chF0F8CCCCCCCCCCCC !byte ch0000000000000000 !byte chCCCCCCCCCCCCCCCC !byte chFCFCDCCCCCCCCCCC !byte chCCCCCCCCCCCCCCCC !byte chFCFCE0C0C0C0C0C0 !byte chFCFCDCCCCCCCCCCC !byte chF05A2CC52A554ABD !byte chF05A2CC52A554ABD !byte chF05A2CC52A554ABD !byte ch4002001000044100 !byte ch5002148128004210 !byte ch5002148128004210 !byte chCCCCCCCCCCECFCFC !byte chCCCCCCCCCCECFCFC !byte chF0F8CCCCCCCCCCCC !byte ch0000000000000000 !byte chFCFCE0C0C0C0C0C0 !byte chF0F8CCCCCCCCCCCC !byte chCCCCCCCCCCECFCFC !byte chC6C6C6C6C6C6C6C6 !byte ch303030303030FCFC !byte chFCFC1C0C0C1CFCFC !byte chFCFCE0C0C0E0FCFC !byte chCCCCCCCCCCECFCFC !byte ch0000000000000000 !byte chFCFCDCCCCCCCCCCC !byte chFCFCDCCCCCCCCCCC !byte chCCCCCCCC78783030 !byte chFCFCE0C0C0E0FCFC !byte chCCCCCCCCCCCCCCCC !byte ch4002001000044100 !byte ch4002001000044100 !byte ch4002001000044100 !byte $96 ;skip !byte $00 ;data8 !byte ch5555555555555555 !byte $e1,9 ;,; *_001 .waits=30 ;,; <- deps_itwilllead ;,; <- streamvars !byte 0xD0,loopctr,0,10 ; set loopctr .loop ; method 0 ( bytes ) -- 142 bytes (604 cumu) ; method 1 ( ibpc0 bytes ) -- 142 bytes (604 cumu) ; method 2 ( bytes ) -- 142 bytes (604 cumu) ; method 3 ( ibpc0 ibpcaa bytes ) -- 193 bytes (655 cumu) ; method 4 ( clrscr bytes ) -- 456 bytes (918 cumu) ; method 5 ( clrscr ibpc0 bytes ) -- 485 bytes (947 cumu) ; method 6 ( clrscr bytes ) -- 456 bytes (918 cumu) ; method 7 ( clrscr ibpc0 ibpcaa bytes ) -- 511 bytes (973 cumu) ; METHOD 0 CHOSEN ;,; <- chFFFFFFFFFFFFFFFF ; 88 ;,; <- ch0000000000000000 ; 179 ;,; <- chFCFC303030303030 ; 5 ;,; <- chC6C6C6C6C6C6C6C6 ; 2 ;,; <- chC0C0C0C0C0C0C0C0 ; 3 ;,; <- chFCFCE0C0C0C0C0C0 ; 6 ;,; <- chFCFCDCCCCCCCCCCC ; 12 ;,; <- chF0F8CCCCCCCCCCCC ; 4 ;,; <- chCCCCCCCCCCCCCCCC ; 5 ;,; <- chFEFEFEFCFEFCFCF8 ; 2 ;,; <- chFF7F7F3F7F3F3F1F ; 3 ;,; <- ch303030303030FCFC ; 3 ;,; <- ch3030303030303030 ; 2 ;,; <- chD6D6D6D6D6F6FEFE ; 1 ;,; <- chC0C0C0C0C0E0FCFC ; 3 ;,; <- chFCFCE0C0C0E0FCFC ; 3 ;,; <- chCCCCCCCCCCECFCFC ; 7 ;,; <- chFCFC1C0C0C1CFCFC ; 2 ;,; <- chFEFEFCFCF8F8F0E0 ; 6 ;,; <- ch7F7F3F3F1F1F0F07 ; 7 ;,; <- chF8F8F0F0E0E0C080 ; 7 ;,; <- ch1F1F0F0F07070301 ; 5 ;,; <- chC0F0FCFFFFFFFFFF ; 7 ;,; <- ch00000000C0F0FCFF ; 7 ;,; <- chF0E0C08000000000 ; 4 ;,; <- ch7F3F1F0F07030100 ; 4 ;,; <- chFFFFFFFFFEFEFEFE ; 5 ;,; <- ch0008080800000000 ; 5 ;,; <- ch000000000103070F ; 4 ;,; <- chFEFEFEFEFFFFFFFF ; 6 ;,; <- ch00000000C0E0F0F0 ; 5 ;,; <- ch1F1F1F1F1F1F1F1F ; 5 ;,; <- ch4002001000044100 ; 11 ;,; <- ch5002148128004210 ; 9 ;,; <- chC0C0C0E0E1E0E0E0 ; 6 ;,; <- ch1F3F7FFFFFFF7F3F ; 5 ;,; <- chF05A2CC52A554ABD ; 13 ;,; <- chE0C0800000000000 ; 6 ;,; <- ch3F3F3F3F3F3F3F3F ; 5 ;,; <- ch80C0E0F0F8F8F8F8 ; 6 ;,; <- ch3F3F3F1F1F0F0F07 ; 5 ;,; <- chC0C0C0C0FFFFFFFF ; 6 ;,; <- ch47436361C1C0C0C0 ; 5 ;,; <- chFFFFFFFFFFFF0000 ; 18 ;,; <- chFEFEDED6D6D6D6D6 ; 1 ;,; <- chCCCCCCCC78783030 ; 1 ; total unique chars in pic: 46 (worst case req 368 bytes) !byte $DB,$F7 ;addr !byte $e2,1;mode4 !byte $00 ;data4 !byte $05 !byte $CE,$F7 ;addr !byte $e2,0;mode8 !byte $0D ;data8 !byte chFFFFFFFFFFFFFFFF !byte chF0E0C08000000000 !byte ch7F3F1F0F07030100 !byte chFFFFFFFFFFFFFFFF !byte chF0E0C08000000000 !byte ch7F3F1F0F07030100 !byte chFFFFFFFFFFFFFFFF !byte chF0E0C08000000000 !byte ch7F3F1F0F07030100 !byte chFFFFFFFFFFFFFFFF !byte chF0E0C08000000000 !byte ch7F3F1F0F07030100 !byte chC0F0FCFFFFFFFFFF !byte ch0000000000000000 !byte $89 ;skip !byte $0F ;data8 !byte chFFFFFFFFFEFEFEFE !byte ch0008080800000000 !byte ch000000000103070F !byte chFFFFFFFFFEFEFEFE !byte ch0008080800000000 !byte ch000000000103070F !byte chFFFFFFFFFEFEFEFE !byte ch0008080800000000 !byte ch000000000103070F !byte chFFFFFFFFFEFEFEFE !byte ch0008080800000000 !byte ch000000000103070F !byte chFFFFFFFFFEFEFEFE !byte ch0008080800000000 !byte ch0000000000000000 !byte ch00000000C0F0FCFF !byte $87 ;skip !byte $10 ;data8 !byte chFEFEFEFEFFFFFFFF !byte ch00000000C0E0F0F0 !byte ch1F1F1F1F1F1F1F1F !byte chFEFEFEFEFFFFFFFF !byte ch00000000C0E0F0F0 !byte ch1F1F1F1F1F1F1F1F !byte chFEFEFEFEFFFFFFFF !byte ch00000000C0E0F0F0 !byte ch1F1F1F1F1F1F1F1F !byte chFEFEFEFEFFFFFFFF !byte ch00000000C0E0F0F0 !byte ch1F1F1F1F1F1F1F1F !byte chFEFEFEFEFFFFFFFF !byte ch00000000C0E0F0F0 !byte ch1F1F1F1F1F1F1F1F !byte chFEFEFEFEFFFFFFFF !byte ch0000000000000000 !byte $86 ;skip !byte $10 ;data8 !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0E0E1E0E0E0 !byte ch1F3F7FFFFFFF7F3F !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0E0E1E0E0E0 !byte ch1F3F7FFFFFFF7F3F !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0E0E1E0E0E0 !byte ch1F3F7FFFFFFF7F3F !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0E0E1E0E0E0 !byte ch1F3F7FFFFFFF7F3F !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0E0E1E0E0E0 !byte ch1F3F7FFFFFFF7F3F !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0E0E1E0E0E0 !byte $86 ;skip !byte $10 ;data8 !byte chFFFFFFFFFFFFFFFF !byte chE0C0800000000000 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte chE0C0800000000000 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte chE0C0800000000000 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte chE0C0800000000000 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte chE0C0800000000000 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte chE0C0800000000000 !byte $86 ;skip !byte $10 ;data8 !byte chFFFFFFFFFFFFFFFF !byte ch80C0E0F0F8F8F8F8 !byte ch3F3F3F1F1F0F0F07 !byte chFFFFFFFFFFFFFFFF !byte ch80C0E0F0F8F8F8F8 !byte ch3F3F3F1F1F0F0F07 !byte chFFFFFFFFFFFFFFFF !byte ch80C0E0F0F8F8F8F8 !byte ch3F3F3F1F1F0F0F07 !byte chFFFFFFFFFFFFFFFF !byte ch80C0E0F0F8F8F8F8 !byte ch3F3F3F1F1F0F0F07 !byte chFFFFFFFFFFFFFFFF !byte ch80C0E0F0F8F8F8F8 !byte ch3F3F3F1F1F0F0F07 !byte chFFFFFFFFFFFFFFFF !byte ch80C0E0F0F8F8F8F8 !byte $86 ;skip !byte $10 ;data8 !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0C0FFFFFFFF !byte ch47436361C1C0C0C0 !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0C0FFFFFFFF !byte ch47436361C1C0C0C0 !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0C0FFFFFFFF !byte ch47436361C1C0C0C0 !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0C0FFFFFFFF !byte ch47436361C1C0C0C0 !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0C0FFFFFFFF !byte ch47436361C1C0C0C0 !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0C0FFFFFFFF !byte $CF,$F7 ;addr !byte $00 ;data8 !byte ch0000000000000000 !byte $e1,6 ; method 0 ( bytes ) -- 128 bytes (732 cumu) ; method 1 ( ibpc0 bytes ) -- 128 bytes (732 cumu) ; method 2 ( bytes ) -- 128 bytes (732 cumu) ; method 3 ( ibpc0 ibpcaa bytes ) -- 182 bytes (786 cumu) ; method 4 ( clrscr bytes ) -- 456 bytes (1060 cumu) ; method 5 ( clrscr ibpc0 bytes ) -- 486 bytes (1090 cumu) ; method 6 ( clrscr bytes ) -- 456 bytes (1060 cumu) ; method 7 ( clrscr ibpc0 ibpcaa bytes ) -- 512 bytes (1116 cumu) ; METHOD 0 CHOSEN ;,; <- chFFFFFFFFFFFFFFFF ; 84 ;,; <- ch0000000000000000 ; 180 ;,; <- chFCFC303030303030 ; 5 ;,; <- chC6C6C6C6C6C6C6C6 ; 2 ;,; <- chC0C0C0C0C0C0C0C0 ; 3 ;,; <- chFCFCE0C0C0C0C0C0 ; 6 ;,; <- chFCFCDCCCCCCCCCCC ; 12 ;,; <- chF0F8CCCCCCCCCCCC ; 4 ;,; <- chCCCCCCCCCCCCCCCC ; 5 ;,; <- chFEFEFEFCFEFCFCF8 ; 2 ;,; <- chFF7F7F3F7F3F3F1F ; 3 ;,; <- ch303030303030FCFC ; 3 ;,; <- ch3030303030303030 ; 2 ;,; <- chD6D6D6D6D6F6FEFE ; 1 ;,; <- chC0C0C0C0C0E0FCFC ; 3 ;,; <- chFCFCE0C0C0E0FCFC ; 3 ;,; <- chCCCCCCCCCCECFCFC ; 7 ;,; <- chFCFC1C0C0C1CFCFC ; 2 ;,; <- chFEFEFCFCF8F8F0E0 ; 6 ;,; <- ch7F7F3F3F1F1F0F07 ; 7 ;,; <- chF8F8F0F0E0E0C080 ; 7 ;,; <- ch1F1F0F0F07070301 ; 5 ;,; <- chC0F0FCFFFFFFFFFF ; 7 ;,; <- ch00000000C0F0FCFF ; 6 ;,; <- chF0E0C08000000000 ; 4 ;,; <- ch7F3F1F0F07030100 ; 4 ;,; <- ch0008080800000000 ; 5 ;,; <- ch000000000103070F ; 5 ;,; <- chFFFFFFFFFEFEFEFE ; 4 ;,; <- ch00000000C0E0F0F0 ; 6 ;,; <- ch1F1F1F1F1F1F1F1F ; 5 ;,; <- chFEFEFEFEFFFFFFFF ; 5 ;,; <- ch4002001000044100 ; 11 ;,; <- ch5002148128004210 ; 9 ;,; <- chC0C0C0E0E1E0E0E0 ; 6 ;,; <- ch1F3F7FFFFFFF7F3F ; 6 ;,; <- chF05A2CC52A554ABD ; 13 ;,; <- chE0C0800000000000 ; 6 ;,; <- ch3F3F3F3F3F3F3F3F ; 6 ;,; <- ch80C0E0F0F8F8F8F8 ; 6 ;,; <- ch3F3F030303030323 ; 6 ;,; <- chC0C0C0C0FFFFFFFF ; 6 ;,; <- ch7F7F7F7FFFFFFFFF ; 6 ;,; <- chFFFFFFFFFFFF0000 ; 18 ;,; <- chFEFEDED6D6D6D6D6 ; 1 ;,; <- chCCCCCCCC78783030 ; 1 ; total unique chars in pic: 46 (worst case req 368 bytes) !byte $CE,$F7 ;addr !byte $0C ;data8 !byte chF0E0C08000000000 !byte ch7F3F1F0F07030100 !byte chFFFFFFFFFFFFFFFF !byte chF0E0C08000000000 !byte ch7F3F1F0F07030100 !byte chFFFFFFFFFFFFFFFF !byte chF0E0C08000000000 !byte ch7F3F1F0F07030100 !byte chFFFFFFFFFFFFFFFF !byte chF0E0C08000000000 !byte ch7F3F1F0F07030100 !byte chFFFFFFFFFFFFFFFF !byte ch0000000000000000 !byte $8A ;skip !byte $0F ;data8 !byte ch0008080800000000 !byte ch000000000103070F !byte chFFFFFFFFFEFEFEFE !byte ch0008080800000000 !byte ch000000000103070F !byte chFFFFFFFFFEFEFEFE !byte ch0008080800000000 !byte ch000000000103070F !byte chFFFFFFFFFEFEFEFE !byte ch0008080800000000 !byte ch000000000103070F !byte chFFFFFFFFFEFEFEFE !byte ch0008080800000000 !byte ch000000000103070F !byte chC0F0FCFFFFFFFFFF !byte ch0000000000000000 !byte $87 ;skip !byte $0F ;data8 !byte ch00000000C0E0F0F0 !byte ch1F1F1F1F1F1F1F1F !byte chFEFEFEFEFFFFFFFF !byte ch00000000C0E0F0F0 !byte ch1F1F1F1F1F1F1F1F !byte chFEFEFEFEFFFFFFFF !byte ch00000000C0E0F0F0 !byte ch1F1F1F1F1F1F1F1F !byte chFEFEFEFEFFFFFFFF !byte ch00000000C0E0F0F0 !byte ch1F1F1F1F1F1F1F1F !byte chFEFEFEFEFFFFFFFF !byte ch00000000C0E0F0F0 !byte ch1F1F1F1F1F1F1F1F !byte chFEFEFEFEFFFFFFFF !byte ch00000000C0E0F0F0 !byte $87 ;skip !byte $10 ;data8 !byte chC0C0C0E0E1E0E0E0 !byte ch1F3F7FFFFFFF7F3F !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0E0E1E0E0E0 !byte ch1F3F7FFFFFFF7F3F !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0E0E1E0E0E0 !byte ch1F3F7FFFFFFF7F3F !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0E0E1E0E0E0 !byte ch1F3F7FFFFFFF7F3F !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0E0E1E0E0E0 !byte ch1F3F7FFFFFFF7F3F !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0E0E1E0E0E0 !byte ch1F3F7FFFFFFF7F3F !byte $86 ;skip !byte $10 ;data8 !byte chE0C0800000000000 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte chE0C0800000000000 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte chE0C0800000000000 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte chE0C0800000000000 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte chE0C0800000000000 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte chE0C0800000000000 !byte ch3F3F3F3F3F3F3F3F !byte $86 ;skip !byte $10 ;data8 !byte ch80C0E0F0F8F8F8F8 !byte ch3F3F030303030323 !byte chFFFFFFFFFFFFFFFF !byte ch80C0E0F0F8F8F8F8 !byte ch3F3F030303030323 !byte chFFFFFFFFFFFFFFFF !byte ch80C0E0F0F8F8F8F8 !byte ch3F3F030303030323 !byte chFFFFFFFFFFFFFFFF !byte ch80C0E0F0F8F8F8F8 !byte ch3F3F030303030323 !byte chFFFFFFFFFFFFFFFF !byte ch80C0E0F0F8F8F8F8 !byte ch3F3F030303030323 !byte chFFFFFFFFFFFFFFFF !byte ch80C0E0F0F8F8F8F8 !byte ch3F3F030303030323 !byte $86 ;skip !byte $10 ;data8 !byte chC0C0C0C0FFFFFFFF !byte ch7F7F7F7FFFFFFFFF !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0C0FFFFFFFF !byte ch7F7F7F7FFFFFFFFF !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0C0FFFFFFFF !byte ch7F7F7F7FFFFFFFFF !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0C0FFFFFFFF !byte ch7F7F7F7FFFFFFFFF !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0C0FFFFFFFF !byte ch7F7F7F7FFFFFFFFF !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0C0FFFFFFFF !byte ch7F7F7F7FFFFFFFFF !byte $e1,6 ; method 0 ( bytes ) -- 133 bytes (865 cumu) ; method 1 ( ibpc0 bytes ) -- 133 bytes (865 cumu) ; method 2 ( bytes ) -- 133 bytes (865 cumu) ; method 3 ( ibpc0 ibpcaa bytes ) -- 186 bytes (918 cumu) ; method 4 ( clrscr bytes ) -- 462 bytes (1194 cumu) ; method 5 ( clrscr ibpc0 bytes ) -- 493 bytes (1225 cumu) ; method 6 ( clrscr bytes ) -- 462 bytes (1194 cumu) ; method 7 ( clrscr ibpc0 ibpcaa bytes ) -- 518 bytes (1250 cumu) ; METHOD 0 CHOSEN ;,; <- chFFFFFFFFFFFFFFFF ; 88 ;,; <- ch0000000000000000 ; 179 ;,; <- chFCFC303030303030 ; 5 ;,; <- chC6C6C6C6C6C6C6C6 ; 2 ;,; <- chC0C0C0C0C0C0C0C0 ; 3 ;,; <- chFCFCE0C0C0C0C0C0 ; 6 ;,; <- chFCFCDCCCCCCCCCCC ; 12 ;,; <- chF0F8CCCCCCCCCCCC ; 4 ;,; <- chCCCCCCCCCCCCCCCC ; 5 ;,; <- chFEFEFEFCFEFCFCF8 ; 2 ;,; <- chFF7F7F3F7F3F3F1F ; 3 ;,; <- ch303030303030FCFC ; 3 ;,; <- ch3030303030303030 ; 2 ;,; <- chD6D6D6D6D6F6FEFE ; 1 ;,; <- chC0C0C0C0C0E0FCFC ; 3 ;,; <- chFCFCE0C0C0E0FCFC ; 3 ;,; <- chCCCCCCCCCCECFCFC ; 7 ;,; <- chFCFC1C0C0C1CFCFC ; 2 ;,; <- chFEFEFCFCF8F8F0E0 ; 6 ;,; <- ch7F7F3F3F1F1F0F07 ; 7 ;,; <- chF8F8F0F0E0E0C080 ; 7 ;,; <- ch1F1F0F0F07070301 ; 5 ;,; <- chC0F0FCFFFFFFFFFF ; 7 ;,; <- ch00000000C0F0FCFF ; 7 ;,; <- ch7F3F1F0F07030100 ; 4 ;,; <- chF0E0C08000000000 ; 4 ;,; <- ch000000000103070F ; 5 ;,; <- chFFFFFFFFFEFEFEFE ; 5 ;,; <- ch0008080800000000 ; 4 ;,; <- ch1F1F1F1F1F1F1F1F ; 6 ;,; <- chFEFEFEFEFFFFFFFF ; 5 ;,; <- ch00000000C0E0F0F0 ; 5 ;,; <- ch4002001000044100 ; 11 ;,; <- ch5002148128004210 ; 9 ;,; <- ch1F3F7FFFFFFF7F3F ; 6 ;,; <- chC0C0C0E0E1E0E0E0 ; 5 ;,; <- chF05A2CC52A554ABD ; 13 ;,; <- ch3F3F3F3F3F3F3F3F ; 12 ;,; <- chE0C0800000000000 ; 5 ;,; <- ch80C0E0F0F8F8F8F8 ; 5 ;,; <- ch7F7F7F7F7F7F7F7F ; 6 ;,; <- chF8F8F8F8C0C0C0C0 ; 5 ;,; <- chFFFFFFFFFFFF0000 ; 18 ;,; <- chFEFEDED6D6D6D6D6 ; 1 ;,; <- chCCCCCCCC78783030 ; 1 ; total unique chars in pic: 45 (worst case req 360 bytes) !byte $DB,$E0 ;addr !byte $56,$00 ;fill !byte $CE,$F7 ;addr !byte $0D ;data8 !byte ch7F3F1F0F07030100 !byte chFFFFFFFFFFFFFFFF !byte chF0E0C08000000000 !byte ch7F3F1F0F07030100 !byte chFFFFFFFFFFFFFFFF !byte chF0E0C08000000000 !byte ch7F3F1F0F07030100 !byte chFFFFFFFFFFFFFFFF !byte chF0E0C08000000000 !byte ch7F3F1F0F07030100 !byte chFFFFFFFFFFFFFFFF !byte chF0E0C08000000000 !byte ch0000000000000000 !byte ch00000000C0F0FCFF !byte $89 ;skip !byte $0E ;data8 !byte ch000000000103070F !byte chFFFFFFFFFEFEFEFE !byte ch0008080800000000 !byte ch000000000103070F !byte chFFFFFFFFFEFEFEFE !byte ch0008080800000000 !byte ch000000000103070F !byte chFFFFFFFFFEFEFEFE !byte ch0008080800000000 !byte ch000000000103070F !byte chFFFFFFFFFEFEFEFE !byte ch0008080800000000 !byte ch000000000103070F !byte chFFFFFFFFFEFEFEFE !byte ch0000000000000000 !byte $88 ;skip !byte $10 ;data8 !byte ch1F1F1F1F1F1F1F1F !byte chFEFEFEFEFFFFFFFF !byte ch00000000C0E0F0F0 !byte ch1F1F1F1F1F1F1F1F !byte chFEFEFEFEFFFFFFFF !byte ch00000000C0E0F0F0 !byte ch1F1F1F1F1F1F1F1F !byte chFEFEFEFEFFFFFFFF !byte ch00000000C0E0F0F0 !byte ch1F1F1F1F1F1F1F1F !byte chFEFEFEFEFFFFFFFF !byte ch00000000C0E0F0F0 !byte ch1F1F1F1F1F1F1F1F !byte chFEFEFEFEFFFFFFFF !byte ch00000000C0E0F0F0 !byte ch1F1F1F1F1F1F1F1F !byte chC0F0FCFFFFFFFFFF !byte $86 ;skip !byte $10 ;data8 !byte ch1F3F7FFFFFFF7F3F !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0E0E1E0E0E0 !byte ch1F3F7FFFFFFF7F3F !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0E0E1E0E0E0 !byte ch1F3F7FFFFFFF7F3F !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0E0E1E0E0E0 !byte ch1F3F7FFFFFFF7F3F !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0E0E1E0E0E0 !byte ch1F3F7FFFFFFF7F3F !byte chFFFFFFFFFFFFFFFF !byte chC0C0C0E0E1E0E0E0 !byte ch1F3F7FFFFFFF7F3F !byte chFFFFFFFFFFFFFFFF !byte $86 ;skip !byte $10 ;data8 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte chE0C0800000000000 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte chE0C0800000000000 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte chE0C0800000000000 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte chE0C0800000000000 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte chE0C0800000000000 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte $86 ;skip !byte $10 ;data8 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte ch80C0E0F0F8F8F8F8 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte ch80C0E0F0F8F8F8F8 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte ch80C0E0F0F8F8F8F8 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte ch80C0E0F0F8F8F8F8 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte ch80C0E0F0F8F8F8F8 !byte ch3F3F3F3F3F3F3F3F !byte chFFFFFFFFFFFFFFFF !byte $86 ;skip !byte $10 ;data8 !byte ch7F7F7F7F7F7F7F7F !byte chFFFFFFFFFFFFFFFF !byte chF8F8F8F8C0C0C0C0 !byte ch7F7F7F7F7F7F7F7F !byte chFFFFFFFFFFFFFFFF !byte chF8F8F8F8C0C0C0C0 !byte ch7F7F7F7F7F7F7F7F !byte chFFFFFFFFFFFFFFFF !byte chF8F8F8F8C0C0C0C0 !byte ch7F7F7F7F7F7F7F7F !byte chFFFFFFFFFFFFFFFF !byte chF8F8F8F8C0C0C0C0 !byte ch7F7F7F7F7F7F7F7F !byte chFFFFFFFFFFFFFFFF !byte chF8F8F8F8C0C0C0C0 !byte ch7F7F7F7F7F7F7F7F !byte chFFFFFFFFFFFFFFFF !byte $e1,6 ; total compressed size 865 bytes !byte $e0,<.loop,>.loop
3-mid/impact/source/3d/collision/dispatch/impact-d3-collision-algorithm-activating.ads
charlie5/lace
20
11878
with impact.d3.collision.Algorithm, impact.d3.Object, impact.d3.Dispatcher, impact.d3.collision.manifold_Result; package impact.d3.collision.Algorithm.activating -- -- This class is not enabled yet (work-in-progress) to more aggressively activate objects. -- is type Item is abstract new impact.d3.collision.Algorithm.item with private; procedure define (Self : in out Item; ci : in AlgorithmConstructionInfo; colObj0, colObj1 : access impact.d3.Object.item'Class); -- package Forge -- is -- function to_activating_Algorithm (ci : in AlgorithmConstructionInfo) return Item; -- function to_activating_Algorithm (ci : in AlgorithmConstructionInfo; -- colObj0, colObj1 : access impact.d3.Object.item'Class ) return Item; -- end Forge; overriding procedure destruct (Self : in out Item); overriding function calculateTimeOfImpact (Self : in Item; body0, body1 : access impact.d3.Object.item'Class; dispatchInfo : in impact.d3.Dispatcher.DispatcherInfo; resultOut : access impact.d3.collision.manifold_Result.item) return math.Real; private type Item is abstract new impact.d3.collision.Algorithm.item with record null; end record; end impact.d3.collision.Algorithm.activating;
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/modular3_pkg.ads
best08618/asylo
7
28587
package Modular3_Pkg is type Int16_T is range -32768 .. 32767; for Int16_T'Size use 16; for Int16_T'Alignment use 1; type Mod16_T is mod 2 ** 16; for Mod16_T'Size use 16; for Mod16_T'Alignment use 1; end Modular3_Pkg;
libsrc/_DEVELOPMENT/adt/b_vector/c/sdcc_iy/b_vector_reserve_callee.asm
jpoikela/z88dk
640
177805
<reponame>jpoikela/z88dk<gh_stars>100-1000 ; int b_vector_reserve_callee(b_vector_t *v, size_t n) SECTION code_clib SECTION code_adt_b_vector PUBLIC _b_vector_reserve_callee EXTERN asm_b_vector_reserve _b_vector_reserve_callee: pop af pop hl pop bc push af jp asm_b_vector_reserve
build/inputs/riverCrossing.als
shmorcel/Alloy_GNU_Bison_Parser
0
466
<gh_stars>0 abstract sig Object { eats : disj set Object, location : dynamic Location } one sig Farmer, Fox, Chicken, Grain extends Object {} abstract sig Location {} one sig Near, Far extends Location {} fact eating { eats = (Fox -> Chicken) + (Chicken -> Grain) } action cross { some o: Object - Farmer, fl: Location - Farmer.location, ol: Location | (Farmer.location, o.location := fl, ol) and after (all o: Object | o.location = Farmer.location || (all o': (Object - o) | o'.location = o.location => o ! in o'.eats)) } pred solvePuzzle { sometimes | before (all o: Object | o.location = Near) && loop { cross[] } && after (all o: Object | o.location = Far) }
oeis/186/A186314.asm
neoneye/loda-programs
11
82201
<filename>oeis/186/A186314.asm ; A186314: Number of ternary strings of length n which contain 01. ; Submitted by <NAME> ; 0,0,1,6,26,99,352,1200,3977,12918,41338,130779,410048,1276512,3950929,12170598,37343834,114209811,348332320,1059927312,3218870105,9758944470,29544747706,89335651851,269843267456,814337329344,2455598257057,7399746051270 sub $0,1 mov $2,1 mov $3,1 lpb $0 sub $0,1 mul $1,3 add $1,$2 add $3,$2 add $2,$3 lpe mov $0,$1
Src/Ant32/Tests/ant32/comp/eq-null-super-comp-14.autotest.asm
geoffthorpe/ant-architecture
0
85422
lc r4, 0x00000080 lc r5, 0x00013d79 eq r6, r4, r5 halt #@expected values #r4 = 0x00000080 #r5 = 0x00013d79 #r6 = 0x00000000 #pc = -2147483628 #e0 = 0 #e1 = 0 #e2 = 0 #e3 = 0
Src/Pc/Compiler/Antlr/PParser.g4
cristicmf/P
0
585
<gh_stars>0 parser grammar PParser; options { tokenVocab=PLexer; } // A small overview of ANTLRs parser rules: // // Parser rules begin with a lower case letter, lexer rules begin // with an Uppercase letter. To create a parser rule, write the name // followed by a colon (:) and then a list of alternatives, separated // by pipe (|) characters. You can use parenthesis for sub-expressions, // alternatives within those sub-expressions, and kleene * or + on any // element in a rule. // // Every production rule corresponds to a class that gets generated // in the target language for the ANTLR generator. If we use alternative // labels, as in `type`, then subclasses of the rule-class will be created // for each label. If one alternative is labelled, then they all must be. // The purpose of labels is to call different functions in the generated // listeners and visitors for the results of these productions. // // Lastly, ANTLR's DSL contains a feature that allows us to name the matched // tokens and productions in an alternative (name=part) or collect multiple // tokens or productions of the same type into a list (list+=part). The `type` // production below uses this feature, too. program : (topDecl | annotationSet)* EOF ; iden : Iden ; int : IntLiteral ; type : SEQ LBRACK type RBRACK # SeqType | MAP LBRACK keyType=type COMMA valueType=type RBRACK # MapType | LPAREN tupTypes+=type (COMMA tupTypes+=type)* RPAREN # TupleType | LPAREN idenTypeList RPAREN # NamedTupleType | BOOL # PrimitiveType | INT # PrimitiveType | FLOAT # PrimitiveType | EVENT # PrimitiveType | MACHINE # PrimitiveType | DATA # PrimitiveType | ANY # PrimitiveType | name=iden # NamedType ; idenTypeList : idenType (COMMA idenType)* ; idenType : name=iden COLON type ; funParamList : funParam (COMMA funParam)* ; funParam : name=iden COLON type ; topDecl : typeDefDecl | enumTypeDefDecl | eventDecl | eventSetDecl | interfaceDecl | implMachineDecl | specMachineDecl | funDecl ; annotationSet : LBRACK (annotations+=annotation (COMMA annotations+=annotation)*)? RBRACK; annotation : name=iden ASSIGN value=NullLiteral | name=iden ASSIGN value=BoolLiteral | name=iden ASSIGN value=IntLiteral | name=iden ASSIGN value=Iden ; typeDefDecl : TYPE name=iden SEMI # ForeignTypeDef | TYPE name=iden ASSIGN type SEMI # PTypeDef ; enumTypeDefDecl : ENUM name=iden LBRACE enumElemList RBRACE | ENUM name=iden LBRACE numberedEnumElemList RBRACE ; enumElemList : enumElem (COMMA enumElem)* ; enumElem : name=iden ; numberedEnumElemList : numberedEnumElem (COMMA numberedEnumElem)* ; numberedEnumElem : name=iden ASSIGN value=IntLiteral ; eventDecl : EVENT name=iden cardinality? (COLON type)? annotationSet? SEMI; cardinality : ASSERT IntLiteral | ASSUME IntLiteral ; eventSetDecl : EVENTSET name=iden ASSIGN LBRACE eventSetLiteral RBRACE SEMI ; eventSetLiteral : events+=nonDefaultEvent (COMMA events+=nonDefaultEvent)* ; interfaceDecl : INTERFACE name=iden LPAREN type? RPAREN (RECEIVES nonDefaultEventList?) SEMI ; // has scope implMachineDecl : MACHINE name=iden cardinality? annotationSet? (COLON idenList)? receivesSends* machineBody ; idenList : names+=iden (COMMA names+=iden)* ; receivesSends : RECEIVES eventSetLiteral? SEMI # MachineReceive | SENDS eventSetLiteral? SEMI # MachineSend ; specMachineDecl : SPEC name=iden OBSERVES eventSetLiteral machineBody ; machineBody : LBRACE machineEntry* RBRACE; machineEntry : varDecl | funDecl | group | stateDecl ; varDecl : VAR idenList COLON type annotationSet? SEMI ; funDecl : FUN name=iden LPAREN funParamList? RPAREN (COLON type)? annotationSet? SEMI # ForeignFunDecl | FUN name=iden LPAREN funParamList? RPAREN (COLON type)? annotationSet? functionBody # PFunDecl ; group : GROUP name=iden LBRACE groupItem* RBRACE ; groupItem : stateDecl | group ; stateDecl : START? temperature=(HOT | COLD)? STATE name=iden annotationSet? LBRACE stateBodyItem* RBRACE ; stateBodyItem : ENTRY anonEventHandler # StateEntry | ENTRY funName=iden SEMI # StateEntry | EXIT noParamAnonEventHandler # StateExit | EXIT funName=iden SEMI # StateExit | DEFER nonDefaultEventList annotationSet? SEMI # StateDefer | IGNORE nonDefaultEventList annotationSet? SEMI # StateIgnore | ON eventList DO funName=iden annotationSet? SEMI # OnEventDoAction | ON eventList DO annotationSet? anonEventHandler # OnEventDoAction | ON eventList PUSH stateName annotationSet? SEMI # OnEventPushState | ON eventList GOTO stateName annotationSet? SEMI # OnEventGotoState | ON eventList GOTO stateName annotationSet? WITH anonEventHandler # OnEventGotoState | ON eventList GOTO stateName annotationSet? WITH funName=iden SEMI # OnEventGotoState ; nonDefaultEventList : events+=nonDefaultEvent (COMMA events+=nonDefaultEvent)* ; nonDefaultEvent : HALT | iden ; eventList : eventId (COMMA eventId)* ; eventId : NullLiteral | HALT | iden ; stateName : (groups+=iden DOT)* state=iden ; // First few Idens are groups functionBody : LBRACE varDecl* statement* RBRACE ; statement : LBRACE statement* RBRACE # CompoundStmt | POP SEMI # PopStmt | ASSERT expr (COMMA StringLiteral)? SEMI # AssertStmt | PRINT StringLiteral (COMMA rvalueList)? SEMI # PrintStmt | RETURN expr? SEMI # ReturnStmt | lvalue ASSIGN rvalue SEMI # AssignStmt | lvalue INSERT LPAREN expr COMMA rvalue RPAREN SEMI # InsertStmt | lvalue REMOVE expr SEMI # RemoveStmt | WHILE LPAREN expr RPAREN statement # WhileStmt | IF LPAREN expr RPAREN thenBranch=statement (ELSE elseBranch=statement)? # IfStmt | NEW iden LPAREN rvalueList? RPAREN SEMI # CtorStmt | fun=iden LPAREN rvalueList? RPAREN SEMI # FunCallStmt | RAISE expr (COMMA rvalueList)? SEMI # RaiseStmt | SEND machine=expr COMMA event=expr (COMMA rvalueList)? SEMI # SendStmt | ANNOUNCE expr (COMMA rvalueList)? SEMI # AnnounceStmt | GOTO stateName (COMMA rvalueList)? SEMI # GotoStmt | RECEIVE LBRACE recvCase+ RBRACE # ReceiveStmt | SEMI # NoStmt ; lvalue : name=iden # VarLvalue | lvalue DOT field=iden # NamedTupleLvalue | lvalue DOT int # TupleLvalue | lvalue LBRACK expr RBRACK # MapOrSeqLvalue ; recvCase : CASE eventList COLON anonEventHandler ; anonEventHandler : (LPAREN funParam RPAREN)? functionBody ; noParamAnonEventHandler : functionBody; expr : primitive # PrimitiveExpr | LPAREN unnamedTupleBody RPAREN # UnnamedTupleExpr | LPAREN namedTupleBody RPAREN # NamedTupleExpr | LPAREN expr RPAREN # ParenExpr | expr DOT field=iden # NamedTupleAccessExpr | expr DOT field=int # TupleAccessExpr | seq=expr LBRACK index=expr RBRACK # SeqAccessExpr | fun=KEYS LPAREN expr RPAREN # KeywordExpr | fun=VALUES LPAREN expr RPAREN # KeywordExpr | fun=SIZEOF LPAREN expr RPAREN # KeywordExpr | fun=DEFAULT LPAREN type RPAREN # KeywordExpr | NEW machineName=iden LPAREN rvalueList? RPAREN # CtorExpr | fun=iden LPAREN rvalueList? RPAREN # FunCallExpr | op=(SUB | LNOT) expr # UnaryExpr | lhs=expr op=(MUL | DIV) rhs=expr # BinExpr | lhs=expr op=(ADD | SUB) rhs=expr # BinExpr | expr cast=(AS | TO) type # CastExpr | lhs=expr op=(LT | GT | GE | LE | IN) rhs=expr # BinExpr | lhs=expr op=(EQ | NE) rhs=expr # BinExpr | lhs=expr op=LAND rhs=expr # BinExpr | lhs=expr op=LOR rhs=expr # BinExpr ; primitive : iden | floatLiteral | BoolLiteral | IntLiteral | NullLiteral | NONDET | FAIRNONDET | HALT | THIS ; floatLiteral : pre=IntLiteral? DOT post=IntLiteral # DecimalFloat | FLOAT LPAREN base=IntLiteral COMMA exp=IntLiteral RPAREN # ExpFloat ; unnamedTupleBody : fields+=rvalue COMMA | fields+=rvalue (COMMA fields+=rvalue)+ ; namedTupleBody : names+=iden ASSIGN values+=rvalue COMMA | names+=iden ASSIGN values+=rvalue (COMMA names+=iden ASSIGN values+=rvalue)+ ; rvalueList : rvalue (COMMA rvalue)* ; rvalue : iden linear=(SWAP | MOVE) | expr ;
src/test/resources/testData/parse/live_samples/class_name_case.scpt
stigger/AppleScript-IDEA
18
1647
<reponame>stigger/AppleScript-IDEA set ffolder to choose folder tell application "Finder" set fileNames to (get the name of every file of ffolder) set theItems to selection repeat with itemRef in theItems set end of fileNames to name of itemRef end repeat set fileNames to fileNames as Unicode text set fileNames to fileNames as unicode text set fn to choose file name set fid to open for access fn with write permission write fileNames to fid close access fid end tell fileNames
Appl/Startup/CommonStartup/CMain/cmainStartupRoomTrigger.asm
steakknife/pcgeos
504
13560
COMMENT @---------------------------------------------------------------------- Copyright (c) GeoWorks 1988 -- All Rights Reserved PROJECT: PC GEOS MODULE: welcome FILE: cmainStartupRoomTrigger.asm REVISION HISTORY: Name Date Description ---- ---- ----------- Doug 12/89 Initial version DESCRIPTION: This file contains the StartupRoomTriggerClass $Id: cmainStartupRoomTrigger.asm,v 1.1 97/04/04 16:52:18 newdeal Exp $ ------------------------------------------------------------------------------@ ;------------------------------------------------------------------------------ ; Constants & Structures ;------------------------------------------------------------------------------ BMonikerPrologue struct BMP_height word (?) BMP_drawbitmapOp byte (?) BMP_drawbitmapX word (?) BMP_drawbitmapY word (?) BMP_drawbitmapOptr optr (?) BMP_setfontOp byte (?) BMP_setfontPtFrac byte (?) BMP_setfontPtInt word (?) BMP_setfontID word (?) BMP_drawtextOp byte (?) BMP_drawtextX word (?) BMP_drawtextY word (?) BMP_drawtextLen word (?) BMonikerPrologue ends .assert (BMP_drawbitmapOp eq VMGS_gstring) ; ; CONSTANTS FOR WIDTHS AND POSITIONS IN OVERVIEW MONIKER ; ;Title font is Berkeley 10 point OVERVIEW_MONIKER_TITLE_FONT equ FID_BERKELEY OVERVIEW_MONIKER_TITLE_SIZE equ 12 CGA_OVERVIEW_MONIKER_TITLE_SIZE equ 10 OVERVIEW_MONIKER_WIDTH equ 143 OVERVIEW_MONIKER_HEIGHT equ 132 ;OVERVIEW_MONIKER_HEIGHT equ 129 OVERVIEW_BITMAP_WIDTH equ 143 OVERVIEW_BITMAP_HEIGHT equ 113 OVERVIEW_MONIKER_TOP_OFFSET equ 116 OVERVIEW_MONIKER_BITMAP_OFFSET equ 2 CGA_OVERVIEW_MONIKER_HEIGHT equ 74 CGA_OVERVIEW_BITMAP_HEIGHT equ 62 CGA_OVERVIEW_MONIKER_TOP_OFFSET equ 62 idata segment StartupRoomTriggerClass idata ends CommonCode segment resource ifdef WELCOME VGAOverviewMonikers label optr EGAOverviewMonikers optr ProRoomColorMoniker, ProRoomColorMoniker, ProRoomColorMoniker NUM_EGA_OVERVIEW_MONIKERS equ ($-EGAOverviewMonikers)/4 .assert NUM_EGA_OVERVIEW_MONIKERS eq PictureNumber HGCOverviewMonikers optr ProRoomBWMoniker, ProRoomBWMoniker, ProRoomBWMoniker NUM_HGC_OVERVIEW_MONIKERS equ ($-HGCOverviewMonikers)/4 .assert NUM_HGC_OVERVIEW_MONIKERS eq PictureNumber CGAOverviewMonikers optr ProRoomCGAMoniker, ProRoomCGAMoniker, ProRoomCGAMoniker NUM_CGA_OVERVIEW_MONIKERS equ ($-CGAOverviewMonikers)/4 .assert NUM_CGA_OVERVIEW_MONIKERS eq PictureNumber endif ifdef ISTARTUP VGAOverviewMonikers label optr EGAOverviewMonikers optr CPrimaryMoniker, CAssistedMoniker, CSelfGuidedMoniker NUM_EGA_OVERVIEW_MONIKERS equ ($-EGAOverviewMonikers)/4 .assert NUM_EGA_OVERVIEW_MONIKERS eq PictureNumber HGCOverviewMonikers optr BWPrimaryMoniker, BWAssistedMoniker, BWSelfGuidedMoniker NUM_HGC_OVERVIEW_MONIKERS equ ($-HGCOverviewMonikers)/4 .assert NUM_HGC_OVERVIEW_MONIKERS eq PictureNumber CGAOverviewMonikers optr CGAPrimaryMoniker, CGAAssistedMoniker, CGASelfGuidedMoniker NUM_CGA_OVERVIEW_MONIKERS equ ($-CGAOverviewMonikers)/4 .assert NUM_CGA_OVERVIEW_MONIKERS eq PictureNumber endif ;############################################################################## ; CODE ;############################################################################## COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StartupRoomTriggerSpecBuild %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: When the object is vis built, copy in the correct moniker CALLED BY: GLOBAL PASS: nada RETURN: nada DESTROYED: various important but undocumented things PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 12/29/89 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ StartupRoomTriggerSpecBuild method StartupRoomTriggerClass, MSG_SPEC_BUILD push es,cx,dx,bp ; preserve SpecBuildFlags mov al,ds:[di].SRTI_pictureNumber clr ah EC < cmp ax, NUM_CGA_OVERVIEW_MONIKERS > EC < ERROR_AE BAD_PICTURE_NUMBER > push ax push si ;Save ptr to Overview trigger mov ax, MSG_GEN_APPLICATION_GET_DISPLAY_SCHEME mov bx, handle StartupApp mov si, offset StartupApp mov di,mask MF_CALL call ObjMessage ;Get app display scheme in AH pop si ;Restore ptr to Overview trigger mov al, ah ;copy display type to AL andnf ah, mask DT_DISP_ASPECT_RATIO mov di, offset CGAOverviewMonikers ; cmp ah, DAR_VERY_SQUISHED shl offset DT_DISP_ASPECT_RATIO je 10$ ;CGA mov di, offset VGAOverviewMonikers ; cmp ah, DAR_NORMAL je 8$ ;VGA or MCGA mov di, offset EGAOverviewMonikers ;else EGA or HGC 8$: and al, mask DT_DISP_CLASS ;Get display class cmp al, DC_GRAY_1 ;Are we on a monochrome display jne 10$ ;EGA mov di, offset HGCOverviewMonikers ; 10$: pop bp ;Restore picture number shl bp,1 ;Multiply picture # by 4 (size of table shl bp,1 ; entry -- optr) ; SET UP MONIKER mov cx, ({optr} cs:[di][bp]).handle ;^lCX:DX <- bitmap to put in mov dx, ({optr} cs:[di][bp]).chunk ; moniker mov ax, MSG_SRT_SET_MONIKER call ObjCallInstanceNoLock pop es,cx,dx,bp ; restore SpecBuildFlags ; Continue by calling superclass with same ; method mov ax, MSG_SPEC_BUILD mov di, offset StartupRoomTriggerClass GOTO ObjCallSuperNoLock StartupRoomTriggerSpecBuild endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StartupRoomTriggerSetMoniker %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This method combines the passed moniker and passed title string to be one beautiful moniker. It overwrites the passed chunk in DX, so any DIRTY or IGNORE_DIRTY flags can be set on it. CALLED BY: GLOBAL PASS: CX:DX - optr of bitmap to be part of moniker RETURN: nada DESTROYED: various important but undocumented things PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 1/13/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ StartupRoomTriggerSetMoniker method dynamic StartupRoomTriggerClass, MSG_SRT_SET_MONIKER bitmap local optr object local lptr titleStr local TITLE_MAX_LEN+4 dup (char) ;Title max size + null + ; room for ellipsis .enter ; SET UP LOCALS mov object, si mov bitmap.handle, cx mov bitmap.chunk, dx ; COPY TITLE DATA OUT OF CHUNK AND ONTO STACK FOR MANIPULATION mov si, ds:[di].SRTI_title mov si, ds:[si] ;DS:SI <- ptr to title data segmov es, ss, di ; lea di, titleStr ;ES:DI <- where to put title ; data ChunkSizePtr ds, si, cx inc cx shr cx, 1 ;CX <- # words rep movsw ;Copy data over from title ; NUKE OLD VIS MONIKER push bp ;Save ptr to locals mov si, object mov ax, MSG_GEN_GET_VIS_MONIKER call ObjCallInstanceNoLock push ax ;Save vis moniker chunk clr cx ;Nuke old vis moniker mov ax, MSG_GEN_USE_VIS_MONIKER mov dl, VUM_DELAYED_VIA_UI_QUEUE call ObjCallInstanceNoLock pop ax ;Get vis moniker chunk tst ax ;If no chunk, exit jz 10$ ; call LMemFree ;Else, free old vis moniker 10$: pop bp ;Restore ptr to locals ; GET INFORMATION ABOUT TITLE AND CLIP IF NECESSARY push cx, dx, bp mov ax, MSG_GEN_APPLICATION_GET_DISPLAY_SCHEME mov bx, handle StartupApp mov si, offset StartupApp mov di,mask MF_CALL or mask MF_FIXUP_DS call ObjMessage ;Get app display scheme in AH pop cx, dx, bp push ax lea si, titleStr ;ES:SI <- ptr to title mov bx, OVERVIEW_MONIKER_WIDTH mov cx, OVERVIEW_MONIKER_TITLE_FONT ; mov dx, OVERVIEW_MONIKER_TITLE_SIZE ; cmp ah, CGA_DISPLAY_TYPE jne 40$ ;Adjust size for CGA mov dx, CGA_OVERVIEW_MONIKER_TITLE_SIZE ; 40$: call GetBTitleInfo ;Returns strlen in CX and width ; in BP (Clips title and adds ; ellipsis if necessary) ; ALLOCATE MONIKER CHUNK ;CX <- total size of moniker add cx, size BMonikerPrologue + size VisMoniker + size OpEndGString mov al, mask OCF_DIRTY ;Save this to the state file. call LMemAlloc ;Allocate the moniker ; FILL IN MONIKER CHUNK segmov es,ds,di ;ES <- moniker segment xchg di, ax ;DI <- moniker chunk handle pop ax push di ;Save moniker chunk handle mov di,ds:[di] ;Deref moniker chunk ;Set cached size mov ds:[di].VM_width, OVERVIEW_MONIKER_WIDTH mov ({VisMonikerGString} ds:[di].VM_data).VMGS_height, \ OVERVIEW_MONIKER_HEIGHT mov ({BMonikerPrologue} ds:[di].VM_data).BMP_drawtextY, \ OVERVIEW_MONIKER_TOP_OFFSET mov ({BMonikerPrologue} ds:[di].VM_data).BMP_setfontPtInt, \ OVERVIEW_MONIKER_TITLE_SIZE cmp ah, CGA_DISPLAY_TYPE jne notCGA ;Adjust height for CGA mov ({BMonikerPrologue} ds:[di].VM_data).BMP_setfontPtInt, \ CGA_OVERVIEW_MONIKER_TITLE_SIZE mov ({VisMonikerGString} ds:[di].VM_data).VMGS_height, \ CGA_OVERVIEW_MONIKER_HEIGHT mov ({BMonikerPrologue} ds:[di].VM_data).BMP_drawtextY, \ CGA_OVERVIEW_MONIKER_TOP_OFFSET notCGA: mov ds:[di].VM_type,( mask VMLET_GSTRING or \ (DAR_NORMAL shl offset VMLET_GS_ASPECT_RATIO) or \ (DC_GRAY_1 shl offset VMLET_GS_COLOR) ) mov ({BMonikerPrologue} ds:[di].VM_data).BMP_drawbitmapOp, \ GR_DRAW_BITMAP_OPTR mov ({BMonikerPrologue} ds:[di].VM_data).BMP_drawbitmapX, \ (OVERVIEW_MONIKER_WIDTH - OVERVIEW_BITMAP_WIDTH)/2 mov ({BMonikerPrologue} ds:[di].VM_data).BMP_drawbitmapY, \ OVERVIEW_MONIKER_BITMAP_OFFSET mov ax, bitmap.handle mov ({BMonikerPrologue} ds:[di].VM_data).BMP_drawbitmapOptr.handle,\ ax mov ax, bitmap.chunk mov ({BMonikerPrologue} ds:[di].VM_data).BMP_drawbitmapOptr.chunk,\ ax mov ({BMonikerPrologue} ds:[di].VM_data).BMP_setfontOp, GR_SET_FONT mov ({BMonikerPrologue} ds:[di].VM_data).BMP_setfontPtFrac, 0 mov ({BMonikerPrologue} ds:[di].VM_data).BMP_setfontID, \ OVERVIEW_MONIKER_TITLE_FONT mov ax, OVERVIEW_MONIKER_WIDTH sub ax,dx shr ax,1 ;AX <- offset to draw text at. mov ({BMonikerPrologue} ds:[di].VM_data).BMP_drawtextOp, \ GR_DRAW_TEXT mov ({BMonikerPrologue} ds:[di].VM_data).BMP_drawtextX, ax sub cx, size BMonikerPrologue + size VisMoniker + size OpEndGString ;CX <- byte length of title mov ({BMonikerPrologue} ds:[di].VM_data).BMP_drawtextLen, cx ;Store string byte length ;ES:DI <- ptr to store title add di,size BMonikerPrologue + size VisMoniker push ds ;Save object block segmov ds, ss, si ; lea si, titleStr ;DS:SI <- title string rep movsb ;Copy over string mov es:[di].OEGS_opcode, GR_END_GSTRING ;End the string pop ds ;Restore object block pop cx ;Restore moniker chunk handle push bp mov si, object mov dl, VUM_DELAYED_VIA_UI_QUEUE ;Update the moniker mov ax, MSG_GEN_USE_VIS_MONIKER call ObjCallInstanceNoLock pop bp .leave ret StartupRoomTriggerSetMoniker endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetBTitleInfo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This routine gets the width/length of the passed string and clips it if necessary. CALLED BY: GLOBAL PASS: ES:SI - null-terminated string BX - width to clip to CX - font ID DX - point size of font RETURN: CX - string length DX - pixel width DESTROYED: di, si PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 1/14/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GetBTitleInfo proc near uses ax,ds,bp .enter segmov ds,es,di ;DS:SI <- ptr to string push cx, dx mov di, si ;ES:DI <- ptr to string mov cx, -1 ; clr al ; repne scasb ; not cx ;CX <- length of string push cx ;Save length clr di call GrCreateState ;Get a GState to manipulate pop ax ;Restore string len pop cx, dx ;Restore Font/Pt Size push ax ;Save string len clr ah ; call GrSetFont ; clr cx ; call GrTextWidth ;Do trivial reject -- entire ; string fits pop cx ;CX <- string length mov bp,dx ;BP <- pixel width cmp bp, bx ;If width < moniker width, then jle noclip ; no clipping, dude! mov al, '.' ;Get width of a '.' call GrCharWidth ; mov bp, dx ;BP <- width of '.' * 3... shl dx, 1 ; add bp, dx ; clr cx cliploop: inc cx lodsb ;Get next character from string call GrCharWidth add bp,dx ;BP += width of next char cmp bp, bx ; jl cliploop ; sub bp, dx ;BP <- real width mov al, '.' ;Add '...' push di ;Save GState lea di, ds:[si][-1] stosb stosb stosb clr al ;Add null terminator stosb add cx, 3 ;CX <- clipped string length pop di ;Restore GState noclip: call GrDestroyState mov dx, bp .leave ret GetBTitleInfo endp CommonCode ends
awa/src/model/awa-audits-models.adb
twdroeger/ada-awa
0
24331
<gh_stars>0 ----------------------------------------------------------------------- -- AWA.Audits.Models -- AWA.Audits.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) 2019 <NAME> -- Written by <NAME> (<EMAIL>) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Unchecked_Deallocation; with Util.Beans.Objects.Time; package body AWA.Audits.Models is use type ADO.Objects.Object_Record_Access; use type ADO.Objects.Object_Ref; pragma Warnings (Off, "formal parameter * is not referenced"); function Audit_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key is Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER, Of_Class => AUDIT_DEF'Access); begin ADO.Objects.Set_Value (Result, Id); return Result; end Audit_Key; function Audit_Key (Id : in String) return ADO.Objects.Object_Key is Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER, Of_Class => AUDIT_DEF'Access); begin ADO.Objects.Set_Value (Result, Id); return Result; end Audit_Key; function "=" (Left, Right : Audit_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 Audit_Ref'Class; Impl : out Audit_Access) is Result : ADO.Objects.Object_Record_Access; begin Object.Prepare_Modify (Result); Impl := Audit_Impl (Result.all)'Access; end Set_Field; -- Internal method to allocate the Object_Record instance procedure Allocate (Object : in out Audit_Ref) is Impl : Audit_Access; begin Impl := new Audit_Impl; Impl.Date := ADO.DEFAULT_TIME; Impl.Old_Value.Is_Null := True; Impl.New_Value.Is_Null := True; Impl.Entity_Id := ADO.NO_IDENTIFIER; Impl.Field := 0; Impl.Entity_Type := 0; ADO.Objects.Set_Object (Object, Impl.all'Access); end Allocate; -- ---------------------------------------- -- Data object: Audit -- ---------------------------------------- procedure Set_Id (Object : in out Audit_Ref; Value : in ADO.Identifier) is Impl : Audit_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Key_Value (Impl.all, 1, Value); end Set_Id; function Get_Id (Object : in Audit_Ref) return ADO.Identifier is Impl : constant Audit_Access := Audit_Impl (Object.Get_Object.all)'Access; begin return Impl.Get_Key_Value; end Get_Id; procedure Set_Date (Object : in out Audit_Ref; Value : in Ada.Calendar.Time) is Impl : Audit_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Time (Impl.all, 2, Impl.Date, Value); end Set_Date; function Get_Date (Object : in Audit_Ref) return Ada.Calendar.Time is Impl : constant Audit_Access := Audit_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Date; end Get_Date; procedure Set_Old_Value (Object : in out Audit_Ref; Value : in String) is Impl : Audit_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_String (Impl.all, 3, Impl.Old_Value, Value); end Set_Old_Value; procedure Set_Old_Value (Object : in out Audit_Ref; Value : in ADO.Nullable_String) is Impl : Audit_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_String (Impl.all, 3, Impl.Old_Value, Value); end Set_Old_Value; function Get_Old_Value (Object : in Audit_Ref) return String is Value : constant ADO.Nullable_String := Object.Get_Old_Value; begin if Value.Is_Null then return ""; else return Ada.Strings.Unbounded.To_String (Value.Value); end if; end Get_Old_Value; function Get_Old_Value (Object : in Audit_Ref) return ADO.Nullable_String is Impl : constant Audit_Access := Audit_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Old_Value; end Get_Old_Value; procedure Set_New_Value (Object : in out Audit_Ref; Value : in String) is Impl : Audit_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_String (Impl.all, 4, Impl.New_Value, Value); end Set_New_Value; procedure Set_New_Value (Object : in out Audit_Ref; Value : in ADO.Nullable_String) is Impl : Audit_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_String (Impl.all, 4, Impl.New_Value, Value); end Set_New_Value; function Get_New_Value (Object : in Audit_Ref) return String is Value : constant ADO.Nullable_String := Object.Get_New_Value; begin if Value.Is_Null then return ""; else return Ada.Strings.Unbounded.To_String (Value.Value); end if; end Get_New_Value; function Get_New_Value (Object : in Audit_Ref) return ADO.Nullable_String is Impl : constant Audit_Access := Audit_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.New_Value; end Get_New_Value; procedure Set_Entity_Id (Object : in out Audit_Ref; Value : in ADO.Identifier) is Impl : Audit_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Identifier (Impl.all, 5, Impl.Entity_Id, Value); end Set_Entity_Id; function Get_Entity_Id (Object : in Audit_Ref) return ADO.Identifier is Impl : constant Audit_Access := Audit_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Entity_Id; end Get_Entity_Id; procedure Set_Field (Object : in out Audit_Ref; Value : in Integer) is Impl : Audit_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Integer (Impl.all, 6, Impl.Field, Value); end Set_Field; function Get_Field (Object : in Audit_Ref) return Integer is Impl : constant Audit_Access := Audit_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Field; end Get_Field; procedure Set_Session (Object : in out Audit_Ref; Value : in AWA.Users.Models.Session_Ref'Class) is Impl : Audit_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Object (Impl.all, 7, Impl.Session, Value); end Set_Session; function Get_Session (Object : in Audit_Ref) return AWA.Users.Models.Session_Ref'Class is Impl : constant Audit_Access := Audit_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Session; end Get_Session; procedure Set_Entity_Type (Object : in out Audit_Ref; Value : in ADO.Entity_Type) is Impl : Audit_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Entity_Type (Impl.all, 8, Impl.Entity_Type, Value); end Set_Entity_Type; function Get_Entity_Type (Object : in Audit_Ref) return ADO.Entity_Type is Impl : constant Audit_Access := Audit_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Entity_Type; end Get_Entity_Type; -- Copy of the object. procedure Copy (Object : in Audit_Ref; Into : in out Audit_Ref) is Result : Audit_Ref; begin if not Object.Is_Null then declare Impl : constant Audit_Access := Audit_Impl (Object.Get_Load_Object.all)'Access; Copy : constant Audit_Access := new Audit_Impl; begin ADO.Objects.Set_Object (Result, Copy.all'Access); Copy.Copy (Impl.all); Copy.Date := Impl.Date; Copy.Old_Value := Impl.Old_Value; Copy.New_Value := Impl.New_Value; Copy.Entity_Id := Impl.Entity_Id; Copy.Field := Impl.Field; Copy.Session := Impl.Session; Copy.Entity_Type := Impl.Entity_Type; end; end if; Into := Result; end Copy; procedure Find (Object : in out Audit_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean) is Impl : constant Audit_Access := new Audit_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 Audit_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier) is Impl : constant Audit_Access := new Audit_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 Audit_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean) is Impl : constant Audit_Access := new Audit_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 Audit_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 Audit_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 Audit_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 Audit_Impl) is type Audit_Impl_Ptr is access all Audit_Impl; procedure Unchecked_Free is new Ada.Unchecked_Deallocation (Audit_Impl, Audit_Impl_Ptr); pragma Warnings (Off, "*redundant conversion*"); Ptr : Audit_Impl_Ptr := Audit_Impl (Object.all)'Access; pragma Warnings (On, "*redundant conversion*"); begin Unchecked_Free (Ptr); end Destroy; procedure Find (Object : in out Audit_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, AUDIT_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 Audit_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 Audit_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Stmt : ADO.Statements.Update_Statement := Session.Create_Statement (AUDIT_DEF'Access); begin if Object.Is_Modified (6) then Stmt.Save_Field (Name => COL_5_1_NAME, -- field Value => Object.Field); Object.Clear_Modified (6); end if; if Object.Is_Modified (7) then Stmt.Save_Field (Name => COL_6_1_NAME, -- session_id Value => Object.Session); Object.Clear_Modified (7); end if; if Object.Is_Modified (8) then Stmt.Save_Field (Name => COL_7_1_NAME, -- entity_type Value => Object.Entity_Type); Object.Clear_Modified (8); 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 Audit_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Query : ADO.Statements.Insert_Statement := Session.Create_Statement (AUDIT_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, -- date Value => Object.Date); Query.Save_Field (Name => COL_2_1_NAME, -- old_value Value => Object.Old_Value); Query.Save_Field (Name => COL_3_1_NAME, -- new_value Value => Object.New_Value); Query.Save_Field (Name => COL_4_1_NAME, -- entity_id Value => Object.Entity_Id); Query.Save_Field (Name => COL_5_1_NAME, -- field Value => Object.Field); Query.Save_Field (Name => COL_6_1_NAME, -- session_id Value => Object.Session); Query.Save_Field (Name => COL_7_1_NAME, -- entity_type Value => Object.Entity_Type); 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 Audit_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Stmt : ADO.Statements.Delete_Statement := Session.Create_Statement (AUDIT_DEF'Access); begin Stmt.Set_Filter (Filter => "id = ?"); Stmt.Add_Param (Value => Object.Get_Key); Stmt.Execute; end Delete; -- ------------------------------ -- Get the bean attribute identified by the name. -- ------------------------------ overriding function Get_Value (From : in Audit_Ref; Name : in String) return Util.Beans.Objects.Object is Obj : ADO.Objects.Object_Record_Access; Impl : access Audit_Impl; begin if From.Is_Null then return Util.Beans.Objects.Null_Object; end if; Obj := From.Get_Load_Object; Impl := Audit_Impl (Obj.all)'Access; if Name = "id" then return ADO.Objects.To_Object (Impl.Get_Key); elsif Name = "date" then return Util.Beans.Objects.Time.To_Object (Impl.Date); elsif Name = "old_value" then if Impl.Old_Value.Is_Null then return Util.Beans.Objects.Null_Object; else return Util.Beans.Objects.To_Object (Impl.Old_Value.Value); end if; elsif Name = "new_value" then if Impl.New_Value.Is_Null then return Util.Beans.Objects.Null_Object; else return Util.Beans.Objects.To_Object (Impl.New_Value.Value); end if; elsif Name = "entity_id" then return Util.Beans.Objects.To_Object (Long_Long_Integer (Impl.Entity_Id)); elsif Name = "field" then return Util.Beans.Objects.To_Object (Long_Long_Integer (Impl.Field)); elsif Name = "entity_type" then return Util.Beans.Objects.To_Object (Long_Long_Integer (Impl.Entity_Type)); end if; return Util.Beans.Objects.Null_Object; end Get_Value; procedure List (Object : in out Audit_Vector; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class) is Stmt : ADO.Statements.Query_Statement := Session.Create_Statement (Query, AUDIT_DEF'Access); begin Stmt.Execute; Audit_Vectors.Clear (Object); while Stmt.Has_Elements loop declare Item : Audit_Ref; Impl : constant Audit_Access := new Audit_Impl; begin Impl.Load (Stmt, Session); ADO.Objects.Set_Object (Item, Impl.all'Access); Object.Append (Item); end; Stmt.Next; end loop; end List; -- ------------------------------ -- Load the object from current iterator position -- ------------------------------ procedure Load (Object : in out Audit_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.Date := Stmt.Get_Time (1); Object.Old_Value := Stmt.Get_Nullable_String (2); Object.New_Value := Stmt.Get_Nullable_String (3); Object.Entity_Id := Stmt.Get_Identifier (4); Object.Field := Stmt.Get_Integer (5); if not Stmt.Is_Null (6) then Object.Session.Set_Key_Value (Stmt.Get_Identifier (6), Session); end if; Object.Entity_Type := ADO.Entity_Type (Stmt.Get_Integer (7)); ADO.Objects.Set_Created (Object); end Load; function Audit_Field_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key is Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_STRING, Of_Class => AUDIT_FIELD_DEF'Access); begin ADO.Objects.Set_Value (Result, Id); return Result; end Audit_Field_Key; function Audit_Field_Key (Id : in String) return ADO.Objects.Object_Key is Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_STRING, Of_Class => AUDIT_FIELD_DEF'Access); begin ADO.Objects.Set_Value (Result, Id); return Result; end Audit_Field_Key; function "=" (Left, Right : Audit_Field_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 Audit_Field_Ref'Class; Impl : out Audit_Field_Access) is Result : ADO.Objects.Object_Record_Access; begin Object.Prepare_Modify (Result); Impl := Audit_Field_Impl (Result.all)'Access; end Set_Field; -- Internal method to allocate the Object_Record instance procedure Allocate (Object : in out Audit_Field_Ref) is Impl : Audit_Field_Access; begin Impl := new Audit_Field_Impl; Impl.Entity_Type := 0; ADO.Objects.Set_Object (Object, Impl.all'Access); end Allocate; -- ---------------------------------------- -- Data object: Audit_Field -- ---------------------------------------- procedure Set_Id (Object : in out Audit_Field_Ref; Value : in Integer) is Impl : Audit_Field_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Key_Value (Impl.all, 1, ADO.Identifier (Value)); end Set_Id; function Get_Id (Object : in Audit_Field_Ref) return Integer is Impl : constant Audit_Field_Access := Audit_Field_Impl (Object.Get_Object.all)'Access; begin return Integer (ADO.Identifier '(Impl.Get_Key_Value)); end Get_Id; procedure Set_Name (Object : in out Audit_Field_Ref; Value : in String) is Impl : Audit_Field_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 Audit_Field_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String) is Impl : Audit_Field_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 Audit_Field_Ref) return String is begin return Ada.Strings.Unbounded.To_String (Object.Get_Name); end Get_Name; function Get_Name (Object : in Audit_Field_Ref) return Ada.Strings.Unbounded.Unbounded_String is Impl : constant Audit_Field_Access := Audit_Field_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Name; end Get_Name; procedure Set_Entity_Type (Object : in out Audit_Field_Ref; Value : in ADO.Entity_Type) is Impl : Audit_Field_Access; begin Set_Field (Object, Impl); ADO.Objects.Set_Field_Entity_Type (Impl.all, 3, Impl.Entity_Type, Value); end Set_Entity_Type; function Get_Entity_Type (Object : in Audit_Field_Ref) return ADO.Entity_Type is Impl : constant Audit_Field_Access := Audit_Field_Impl (Object.Get_Load_Object.all)'Access; begin return Impl.Entity_Type; end Get_Entity_Type; -- Copy of the object. procedure Copy (Object : in Audit_Field_Ref; Into : in out Audit_Field_Ref) is Result : Audit_Field_Ref; begin if not Object.Is_Null then declare Impl : constant Audit_Field_Access := Audit_Field_Impl (Object.Get_Load_Object.all)'Access; Copy : constant Audit_Field_Access := new Audit_Field_Impl; begin ADO.Objects.Set_Object (Result, Copy.all'Access); Copy.Copy (Impl.all); Copy.Name := Impl.Name; Copy.Entity_Type := Impl.Entity_Type; end; end if; Into := Result; end Copy; procedure Find (Object : in out Audit_Field_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean) is Impl : constant Audit_Field_Access := new Audit_Field_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 Audit_Field_Ref; Session : in out ADO.Sessions.Session'Class; Id : in Integer) is Impl : constant Audit_Field_Access := new Audit_Field_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 Audit_Field_Ref; Session : in out ADO.Sessions.Session'Class; Id : in Integer; Found : out Boolean) is Impl : constant Audit_Field_Access := new Audit_Field_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 Audit_Field_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 Audit_Field_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 Audit_Field_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 Audit_Field_Impl) is type Audit_Field_Impl_Ptr is access all Audit_Field_Impl; procedure Unchecked_Free is new Ada.Unchecked_Deallocation (Audit_Field_Impl, Audit_Field_Impl_Ptr); pragma Warnings (Off, "*redundant conversion*"); Ptr : Audit_Field_Impl_Ptr := Audit_Field_Impl (Object.all)'Access; pragma Warnings (On, "*redundant conversion*"); begin Unchecked_Free (Ptr); end Destroy; procedure Find (Object : in out Audit_Field_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, AUDIT_FIELD_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 Audit_Field_Impl; Session : in out ADO.Sessions.Session'Class) is Found : Boolean; Query : ADO.SQL.Query; Id : constant Integer := Integer (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 Audit_Field_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Stmt : ADO.Statements.Update_Statement := Session.Create_Statement (AUDIT_FIELD_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, -- name Value => Object.Name); Object.Clear_Modified (2); end if; if Object.Is_Modified (3) then Stmt.Save_Field (Name => COL_2_2_NAME, -- entity_type Value => Object.Entity_Type); 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 Audit_Field_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Query : ADO.Statements.Insert_Statement := Session.Create_Statement (AUDIT_FIELD_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, -- name Value => Object.Name); Query.Save_Field (Name => COL_2_2_NAME, -- entity_type Value => Object.Entity_Type); 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 Audit_Field_Impl; Session : in out ADO.Sessions.Master_Session'Class) is Stmt : ADO.Statements.Delete_Statement := Session.Create_Statement (AUDIT_FIELD_DEF'Access); begin Stmt.Set_Filter (Filter => "id = ?"); Stmt.Add_Param (Value => Object.Get_Key); Stmt.Execute; end Delete; -- ------------------------------ -- Get the bean attribute identified by the name. -- ------------------------------ overriding function Get_Value (From : in Audit_Field_Ref; Name : in String) return Util.Beans.Objects.Object is Obj : ADO.Objects.Object_Record_Access; Impl : access Audit_Field_Impl; begin if From.Is_Null then return Util.Beans.Objects.Null_Object; end if; Obj := From.Get_Load_Object; Impl := Audit_Field_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 = "entity_type" then return Util.Beans.Objects.To_Object (Long_Long_Integer (Impl.Entity_Type)); end if; return Util.Beans.Objects.Null_Object; end Get_Value; -- ------------------------------ -- Load the object from current iterator position -- ------------------------------ procedure Load (Object : in out Audit_Field_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class) is begin Object.Set_Key_Value (Stmt.Get_Unbounded_String (0)); Object.Name := Stmt.Get_Unbounded_String (1); Object.Entity_Type := ADO.Entity_Type (Stmt.Get_Integer (2)); ADO.Objects.Set_Created (Object); end Load; end AWA.Audits.Models;
tests/typing/bad/testfile-unique-1.adb
xuedong/mini-ada
0
20468
<filename>tests/typing/bad/testfile-unique-1.adb with Ada.Text_IO; use Ada.Text_IO; procedure Test is type T is record A: Integer; end record; T: Integer; begin New_Line; end;
generated/simple_webapps-commands-upload_servers.ads
faelys/simple-webapps
1
20414
<gh_stars>1-10 -- Generated at 2014-07-02 17:53:59 +0000 by Natools.Static_Hash_Maps -- from src/simple_webapps-upload_servers-commands.sx package Simple_Webapps.Commands.Upload_Servers is pragma Pure; type Config_Command is (Config_Error, Set_Storage_File, Set_Directory, Set_Error_Template, Set_HMAC_Key, Set_Index_Template, Set_Input_Dir, Set_Max_Expiration, Set_Report_Template, Set_Static_Dir); type File_Command is (File_Error, Set_Name, Set_Comment, Set_Download, Set_Expiration, Set_MIME_Type, Set_Upload); function To_Config_Command (Key : String) return Config_Command; function To_File_Command (Key : String) return File_Command; private Map_1_Key_0 : aliased constant String := "backend"; Map_1_Key_1 : aliased constant String := "directory"; Map_1_Key_2 : aliased constant String := "error-template"; Map_1_Key_3 : aliased constant String := "hmac-key"; Map_1_Key_4 : aliased constant String := "index-template"; Map_1_Key_5 : aliased constant String := "input-directory"; Map_1_Key_6 : aliased constant String := "max-expiration"; Map_1_Key_7 : aliased constant String := "report-template"; Map_1_Key_8 : aliased constant String := "static"; Map_1_Key_9 : aliased constant String := "static-dir"; Map_1_Key_10 : aliased constant String := "static-resources"; Map_1_Keys : constant array (0 .. 10) of access constant String := (Map_1_Key_0'Access, Map_1_Key_1'Access, Map_1_Key_2'Access, Map_1_Key_3'Access, Map_1_Key_4'Access, Map_1_Key_5'Access, Map_1_Key_6'Access, Map_1_Key_7'Access, Map_1_Key_8'Access, Map_1_Key_9'Access, Map_1_Key_10'Access); Map_1_Elements : constant array (0 .. 10) of Config_Command := (Set_Storage_File, Set_Directory, Set_Error_Template, Set_HMAC_Key, Set_Index_Template, Set_Input_Dir, Set_Max_Expiration, Set_Report_Template, Set_Static_Dir, Set_Static_Dir, Set_Static_Dir); Map_2_Key_0 : aliased constant String := "name"; Map_2_Key_1 : aliased constant String := "comment"; Map_2_Key_2 : aliased constant String := "download-key"; Map_2_Key_3 : aliased constant String := "expire"; Map_2_Key_4 : aliased constant String := "mime-type"; Map_2_Key_5 : aliased constant String := "upload"; Map_2_Keys : constant array (0 .. 5) of access constant String := (Map_2_Key_0'Access, Map_2_Key_1'Access, Map_2_Key_2'Access, Map_2_Key_3'Access, Map_2_Key_4'Access, Map_2_Key_5'Access); Map_2_Elements : constant array (0 .. 5) of File_Command := (Set_Name, Set_Comment, Set_Download, Set_Expiration, Set_MIME_Type, Set_Upload); end Simple_Webapps.Commands.Upload_Servers;
Task/Terminal-control-Inverse-video/Ada/terminal-control-inverse-video.ada
LaudateCorpus1/RosettaCodeData
1
8331
<reponame>LaudateCorpus1/RosettaCodeData with Ada.Text_IO; use Ada.Text_IO; procedure Reverse_Video is Rev_Video : String := Ascii.ESC & "[7m"; Norm_Video : String := Ascii.ESC & "[m"; begin Put (Rev_Video & "Reversed"); Put (Norm_Video & " Normal"); end Reverse_Video;
tools-src/gnu/gcc/gcc/ada/g-trasym.ads
enfoTek/tomato.linksys.e2000.nvram-mod
80
5223
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- G N A T . T R A C E B A C K . S Y M B O L I C -- -- -- -- S p e c -- -- -- -- $Revision$ -- -- -- Copyright (C) 1999-2001 Ada Core Technologies, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- -- MA 02111-1307, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT is maintained by Ada Core Technologies Inc (http://www.gnat.com). -- -- -- ------------------------------------------------------------------------------ -- Run-time symbolic traceback support -- Note: this is only available on selected targets. Currently it is -- supported on Sparc/Solaris, GNU/Linux, Windows NT, HP-UX, IRIX and Tru64. -- The routines provided in this package assume that your application has -- been compiled with debugging information turned on, since this information -- is used to build a symbolic traceback. with Ada.Exceptions; use Ada.Exceptions; package GNAT.Traceback.Symbolic is pragma Elaborate_Body (Traceback.Symbolic); ------------------------ -- Symbolic_Traceback -- ------------------------ function Symbolic_Traceback (Traceback : Tracebacks_Array) return String; -- Build a string containing a symbolic traceback of the given call chain. function Symbolic_Traceback (E : Exception_Occurrence) return String; -- Build a string containing a symbolic traceback of the given exception -- occurrence. end GNAT.Traceback.Symbolic;
printing_vertically/icalc.asm
noahabe/playing_with_assembly
0
93950
<filename>printing_vertically/icalc.asm<gh_stars>0 ; icalc.asm extern printf section .data bstring db "10111101011",10,0 abit db "%d",10,0 section .bss section .text global main main: mov rbx,bstring xor rsi,rsi xor r15,r15 bloop: mov byte r15b, [rbx] sub r15,48 mov rdi,abit mov rsi,r15 mov rax,0 call printf inc rbx add r15,48 cmp r15b,10 jne bloop
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/specs/storage.ads
best08618/asylo
7
4564
<gh_stars>1-10 -- { dg-do compile } with System.Pool_Global; package Storage is x1: System.Pool_Global.Unbounded_No_Reclaim_Pool; type T1 is access integer; for T1'Storage_Pool use (x1); -- { dg-error "must be a variable" } type T2 is access Integer; for T2'Storage_Pool use x1; end Storage;
programs/oeis/056/A056577.asm
neoneye/loda
22
82851
; A056577: Difference between 3^n and highest power of 2 less than or equal to 3^n. ; 0,1,1,11,17,115,217,139,2465,3299,26281,46075,7153,545747,588665,5960299,9492289,62031299,118985033,88519643,1339300753,1870418611,14201190425,25423702091,7551629537,297532795555,342842572777,3227550973883,5284606410545,33446005276051,65153643739321,54723442862635,727120282009217,1055460939185027,7669982444925577,14002748080035739,5979447221143249,162053529739285619,197930213066145113,1746712143805282315,2934293422202152993,18026252303461234787,35632012836674152745,33109062215184251771,394475091824905581169,593129465116011091795,4140571636782855882233,7699348427478922433003,4208579350958186444225,88183601778788882751811,113435077884538001417161,944768143460928591604571,1625378610768156600107537,40432553845953101497907,19464110775371926099792537,19706706098447644708779979,213862623206015468488730465,332102859796701336741410339,2234248618675484285123355241,4226865777455692305571817275,2777077018084034717522458033,47945312311384272949339349267,64607774419888481254474097465,510735973316722794137598093739,898382619836053681664442678529,159846659051702241999921624835,10620744778980941937973390517513,11579824733291155389972920266523,115869112614480147865707765943633,185348061014227080205545287542771,1205081290359534694182947903780825,2317169656444897175416219629037451,1759212110799863897718162557892257,26046823766538902207276472990557155,36602096431338085593585448337910697,275959788767128740893732227548775163,495572367355157254455244917576239345,157489106280555890461927692448373459 seq $0,198644 ; 8*3^n-1. seq $0,53645 ; Distance to largest power of 2 less than or equal to n; write n in binary, change the first digit to zero, and convert back to decimal. div $0,8
error/Debugger.asm
NatsumiFox/AMPS
20
84607
; =============================================================== ; --------------------------------------------------------------- ; Error handling and debugging modules ; 2016-2017, Vladikcomper ; --------------------------------------------------------------- ; Debugging macros definitions file ; --------------------------------------------------------------- isAMPS = 1 ; Set to 1 ; =============================================================== ; --------------------------------------------------------------- ; Constants ; --------------------------------------------------------------- ; ---------------------------- ; Arguments formatting flags ; ---------------------------- ; General arguments format flags hex equ $80 ; flag to display as hexadecimal number decm equ $90 ; flag to display as decimal number bin equ $A0 ; flag to display as binary number sym equ $B0 ; flag to display as symbol (treat as offset, decode into symbol +displacement, if present) symdisp equ $C0 ; flag to display as symbol's displacement alone (DO NOT USE, unless complex formatting is required, see notes below) str equ $D0 ; flag to display as string (treat as offset, insert string from that offset) ; NOTES: ; * By default, the "sym" flag displays both symbol and displacement (e.g.: "Map_Sonic+$2E") ; In case, you need a different formatting for the displacement part (different text color and such), ; use "sym|split", so the displacement won't be displayed until symdisp is met ; * The "symdisp" can only be used after the "sym|split" instance, which decodes offset, otherwise, it'll ; display a garbage offset. ; * No other argument format flags (hex, dec, bin, str) are allowed between "sym|split" and "symdisp", ; otherwise, the "symdisp" results are undefined. ; * When using "str" flag, the argument should point to string offset that will be inserted. ; Arguments format flags CAN NOT be used in the string (as no arguments are meant to be here), ; only console control flags (see below). ; Additional flags ... ; ... for number formatters (hex, dec, bin) signed equ 8 ; treat number as signed (display + or - before the number depending on sign) ; ... for symbol formatter (sym) split equ 8 ; DO NOT write displacement (if present), skip and wait for "symdisp" flag to write it later (optional) forced equ 4 ; display "<unknown>" if symbol was not found, otherwise, plain offset is displayed by the displacement formatter ; ... for symbol displacement formatter (symdisp) weak equ 8 ; DO NOT write plain offset if symbol is displayed as "<unknown>" ; Argument type flags: ; - DO NOT USE in formatted strings processed by macros, as these are included automatically ; - ONLY USE when writting down strings manually with DC.B byte equ 0 word equ 1 long equ 3 ; ----------------------- ; Console control flags ; ----------------------- ; Plain control flags: no arguments following endl equ $E0 ; "End of line": flag for line break cr equ $E6 ; "Carriage return": jump to the beginning of the line pal0 equ $E8 ; use palette line #0 pal1 equ $EA ; use palette line #1 pal2 equ $EC ; use palette line #2 pal3 equ $EE ; use palette line #3 ; Parametrized control flags: followed by 1-byte argument setw equ $F0 ; set line width: number of characters before automatic line break setoff equ $F4 ; set tile offset: lower byte of base pattern, which points to tile index of ASCII character 00 setpat equ $F8 ; set tile pattern: high byte of base pattern, which determines palette flags and $100-tile section id setx equ $FA ; set x-position ; --------------------------------------------------------------- ; Macros ; --------------------------------------------------------------- RaiseError & macro string, console_program, opts pea *(pc) RaiseError2 \_ endm RaiseError2 & macro string, console_program, opts move.w sr, -(sp) __FSTRING_GenerateArgumentsCode \string jsr ErrorHandler __FSTRING_GenerateDecodedString \string if strlen("\console_program") ; if console program offset is specified ... dc.b \opts+_eh_enter_console|(((*&1)^1)*_eh_align_offset) ; add flag "_eh_align_offset" if the next byte is at odd offset ... even ; ... to tell Error handler to skip this byte, so it'll jump to ... jmp \console_program ; ... an aligned "jmp" instruction that calls console program itself else dc.b \opts+0 ; otherwise, just specify \opts for error handler, +0 will generate dc.b 0 ... even ; ... in case \opts argument is empty or skipped endc even endm ; --------------------------------------------------------------- Console & macro if strcmp("\0","write")|strcmp("\0","writeline") move.w sr, -(sp) __FSTRING_GenerateArgumentsCode \1 movem.l a0-a2/d7, -(sp) if (__sp>0) lea 4*4(sp), a2 endc lea .str\@(pc), a1 jsr ErrorHandler.__global__console_\0\_formatted movem.l (sp)+, a0-a2/d7 if (__sp>8) lea __sp(sp), sp elseif (__sp>0) addq.w #__sp, sp endc move.w (sp)+, sr bra.w .instr_end\@ .str\@: __FSTRING_GenerateDecodedString \1 even .instr_end\@: elseif strcmp("\0","run") jsr ErrorHandler.__extern__console_only jsr \1 if narg<=1 ; HACK bra.s * endif elseif strcmp("\0","setxy") move.w sr, -(sp) movem.l d0-d1, -(sp) move.w \2, -(sp) move.w \1, -(sp) jsr ErrorHandler.__global__console_setposasxy_stack addq.w #4, sp movem.l (sp)+, d0-d1 move.w (sp)+, sr elseif strcmp("\0","breakline") move.w sr, -(sp) jsr ErrorHandler.__global__console_startnewline move.w (sp)+, sr else inform 2,"""\0"" isn't a member of ""Console""" endc endm ; --------------------------------------------------------------- __ErrorMessage & macro string, opts __FSTRING_GenerateArgumentsCode \string jsr ErrorHandler __FSTRING_GenerateDecodedString \string dc.b \opts+0 even endm ; --------------------------------------------------------------- __FSTRING_GenerateArgumentsCode & macro string __pos: set instr(\string,'%<') ; token position __stack:set 0 ; size of actual stack __sp: set 0 ; stack displacement ; Parse string itself while (__pos) ; Retrive expression in brackets following % char __endpos: set instr(__pos+1,\string,'>') __midpos: set instr(__pos+5,\string,' ') if (__midpos<1)|(__midpos>__endpos) __midpos: = __endpos endc __substr: substr __pos+1+1,__endpos-1,\string ; .type ea param __type: substr __pos+1+1,__pos+1+1+1,\string ; .type ; Expression is an effective address (e.g. %(.w d0 hex) ) if "\__type">>8="." __operand: substr __pos+1+1,__midpos-1,\string ; .type ea __param: substr __midpos+1,__endpos-1,\string ; param if "\__type"=".b" pushp "move\__operand\,1(sp)" pushp "subq.w #2, sp" __stack: = __stack+2 __sp: = __sp+2 elseif "\__type"=".w" pushp "move\__operand\,-(sp)" __stack: = __stack+1 __sp: = __sp+2 elseif "\__type"=".l" pushp "move\__operand\,-(sp)" __stack: = __stack+1 __sp: = __sp+4 else fatal 'Unrecognized type in string operand: %<\__substr>' endc endc __pos: set instr(__pos+1,\string,'%<') endw ; Generate stack code rept __stack popp __command \__command endr endm ; --------------------------------------------------------------- __FSTRING_GenerateDecodedString & macro string __lpos: set 1 ; start position __pos: set instr(\string,'%<') ; token position while (__pos) ; Write part of string before % token __substr: substr __lpos,__pos-1,\string dc.b "\__substr" ; Retrive expression in brakets following % char __endpos: set instr(__pos+1,\string,'>') __midpos: set instr(__pos+5,\string,' ') if (__midpos<1)|(__midpos>__endpos) __midpos: = __endpos endc __type: substr __pos+1+1,__pos+1+1+1,\string ; .type ; Expression is an effective address (e.g. %<.w d0 hex> ) if "\__type">>8="." __param: substr __midpos+1,__endpos-1,\string ; param if strlen("\__param")<1 __param: substr ,,"hex" ; if param is ommited, set it to "hex" endc if "\__type"=".b" dc.b \__param elseif "\__type"=".w" dc.b \__param|1 else dc.b \__param|3 endc ; Expression is an inline constant (e.g. %<endl> ) else __substr: substr __pos+1+1,__endpos-1,\string dc.b \__substr endc __lpos: set __endpos+1 __pos: set instr(__pos+1,\string,'%<') endw ; Write part of string before the end __substr: substr __lpos,,\string dc.b "\__substr" dc.b 0 endm
openkore-master/plugins/needs-review/Obsolete/legacy/ropp/trunk/src/call16/func_56.asm
phuchduong/ro_restart_bot
0
103990
; OpenKore - Padded Packet Emulator. ; ; This program is free software; you can redistribute it and/or ; modify it under the terms of the GNU General Public License ; as published by the Free Software Foundation; either version 2 ; of the License, or (at your option) any later version. ; ; This program is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ; See http://www.gnu.org/licenses/gpl.html for the full license. section .data use32 CLASS=data d068AAD6h db 1 d068AAD7h db 1 section .bss use32 CLASS=bss ; Please check a dup block d06E1D24h RESB 89h d06E5F58h RESB 89h d0723528h RESB 1Ch d0723544h RESB 0E4h d0723628h RESB 100h section .code use32 CLASS=code ;############################### sub_420660 #################################### global __func5 __func5: PUSH EBP MOV EBP,ESP SUB ESP,018h ; May be bug MOV AL,byte [d068AAD6h] TEST AL,AL JZ .Ragexe004206B4 CALL Ragexe00503650 PUSH d06E1D24h PUSH 0 LEA EAX,[EBP-8] PUSH 8 LEA ECX,[EBP-8] PUSH EAX PUSH ECX MOV byte [EBP-8],09Ch MOV byte [EBP-7],056h MOV byte [EBP-6],0D1h MOV byte [EBP-5],012h MOV byte [EBP-4],023h MOV byte [EBP-3],0C0h MOV byte [EBP-2],0B4h MOV byte [EBP-1],037h CALL Ragexe00503690 ADD ESP,014h ; May be bug MOV byte [d068AAD6h],0 .Ragexe004206B4: XOR EDX,EDX MOV EAX,dword [EBP+8] MOV dword [EBP-0Fh],EDX LEA ECX,[EBP-018h] MOV word [EBP-0Bh],DX PUSH ECX MOV byte [EBP-9],DL LEA EDX,[EBP-010h] PUSH d06E1D24h PUSH EDX MOV dword [EBP-010h],EAX CALL Ragexe00503800 MOV EAX,dword [EBP-018h] ADD ESP,0Ch MOV ESP,EBP POP EBP RET ;############################### sub_4206F0 #################################### global __func6 __func6: PUSH EBP MOV EBP,ESP SUB ESP,018h ; May be bug MOV AL,byte [d068AAD7h] TEST AL,AL JZ .Ragexe00420744 CALL Ragexe00503650 PUSH d06E5F58h PUSH 0 LEA EAX,[EBP-8] PUSH 8 LEA ECX,[EBP-8] PUSH EAX PUSH ECX MOV byte [EBP-8],09Ch MOV byte [EBP-7],056h MOV byte [EBP-6],0DDh MOV byte [EBP-5],012h MOV byte [EBP-4],023h MOV byte [EBP-3],0C1h MOV byte [EBP-2],0B4h MOV byte [EBP-1],037h CALL Ragexe00503690 ADD ESP,014h ; May be bug MOV byte [d068AAD7h],0 .Ragexe00420744: XOR EDX,EDX MOV EAX,dword [EBP+8] MOV dword [EBP-0Fh],EDX LEA ECX,[EBP-018h] MOV word [EBP-0Bh],DX PUSH ECX MOV byte [EBP-9],DL LEA EDX,[EBP-010h] PUSH d06E5F58h PUSH EDX MOV dword [EBP-010h],EAX CALL .Ragexe00503AA0 MOV EAX,dword [EBP-018h] ADD ESP,0Ch MOV ESP,EBP POP EBP RET ;############################### sub_503AA0 #################################### .Ragexe00503AA0: PUSH EBP MOV EBP,ESP SUB ESP,01Ch PUSH EBX PUSH ESI MOV ESI,dword [EBP+8] PUSH EDI MOV EDI,dword [EBP+0Ch] MOV AL,byte [ESI+1] MOV CL,byte [ESI+2] MOV byte [EBP-01Ch],AL MOV AL,byte [ESI+3] MOV DL,byte [ESI] MOV BL,byte [ESI+4] MOV byte [EBP-8],AL MOV AL,byte [ESI+6] MOV byte [EBP-4],CL MOV CL,byte [ESI+5] MOV byte [EBP-010h],AL XOR EAX,EAX MOV AL,byte [EDI] MOV byte [EBP-0Ch],CL MOV CL,byte [ESI+7] MOV ESI,EAX CMP ESI,0Dh JBE .Ragexe00503AE5 MOV ESI,0Dh .Ragexe00503AE5: MOV EAX,ESI SHL EAX,4 XOR CL,byte [EDI+EAX+8] LEA EAX,[EDI+EAX+8] DEC EAX MOV EDI,ESI MOV byte [EBP+0Ch],CL MOV CL,byte [EAX] SUB byte [EBP-010h],CL MOV CL,byte [EAX-1] SUB byte [EBP-0Ch],CL DEC EAX DEC EAX MOV CL,byte [EAX] XOR BL,CL MOV CL,byte [EAX-1] XOR byte [EBP-8],CL DEC EAX DEC EAX MOV CL,byte [EAX] SUB byte [EBP-4],CL MOV CL,byte [EBP-01Ch] SUB CL,byte [EAX-1] DEC EAX DEC EAX MOV byte [EBP-01Ch],CL XOR DL,byte [EAX] DEC ESI TEST EDI,EDI JZ near .Ragexe00503D00 INC ESI .Ragexe00503B2D: MOV CL,byte [EBP-01Ch] MOV byte [EBP-014h],CL MOV CL,byte [EBP-4] MOV byte [EBP-4],BL MOV BL,byte [EBP-0Ch] MOV byte [EBP+0Bh],BL MOV BL,byte [EBP-8] MOV byte [EBP-0Ch],BL MOV BL,byte [EBP-010h] MOV byte [EBP-8],BL MOV BL,byte [EBP-014h] SUB DL,BL SUB BL,DL MOV byte [EBP-018h],DL MOV DL,byte [EBP-0Ch] MOV byte [EBP-014h],BL MOV BL,byte [EBP-4] SUB CL,DL SUB DL,CL MOV byte [EBP-0Ch],DL MOV DL,byte [EBP+0Bh] SUB BL,DL SUB DL,BL MOV byte [EBP-4],BL MOV BL,byte [EBP+0Ch] MOV byte [EBP-010h],DL MOV DL,byte [EBP-8] SUB DL,BL SUB BL,DL MOV byte [EBP-8],DL MOV DL,byte [EBP-4] MOV byte [EBP+0Ch],BL MOV BL,byte [EBP-018h] SUB BL,DL SUB DL,BL MOV byte [EBP-018h],BL MOV BL,byte [EBP-010h] MOV byte [EBP-4],DL MOV DL,byte [EBP-014h] SUB DL,BL MOV byte [EBP-014h],DL SUB BL,DL MOV DL,byte [EBP-8] MOV byte [EBP-010h],BL MOV BL,byte [EBP+0Ch] SUB CL,DL SUB DL,CL MOV byte [EBP-8],DL MOV DL,byte [EBP-0Ch] SUB DL,BL MOV byte [EBP-0Ch],DL SUB BL,DL MOV DL,byte [EBP-018h] MOV byte [EBP+0Ch],BL MOV BL,byte [EBP-4] SUB DL,CL MOV byte [EBP-018h],DL MOV DL,byte [EBP-8] SUB BL,DL MOV DL,byte [EBP-0Ch] MOV byte [EBP-4],BL MOV BL,byte [EBP-014h] SUB BL,DL MOV DL,byte [EBP-010h] MOV byte [EBP-014h],BL MOV BL,byte [EBP+0Ch] SUB DL,BL MOV BL,byte [EAX-1] DEC EAX MOV byte [EBP-010h],DL ADD BL,DL MOV DL,byte [EBP+0Ch] SUB DL,BL MOV BL,byte [EBP-010h] DEC EAX MOV byte [EBP+0Ch],DL MOV DL,byte [EAX] XOR BL,DL MOV DL,byte [EBP-0Ch] MOV byte [EBP-010h],BL DEC EAX MOV BL,byte [EBP-014h] SUB DL,BL XOR DL,byte [EAX] DEC EAX MOV byte [EBP-0Ch],DL MOV DL,byte [EAX] SUB BL,DL MOV DL,byte [EAX-1] DEC EAX MOV byte [EBP-014h],BL MOV BL,byte [EBP-4] ADD DL,BL MOV BL,byte [EBP-8] SUB BL,DL MOV DL,byte [EAX-1] DEC EAX MOV byte [EBP-8],BL MOV BL,byte [EBP-4] XOR BL,DL MOV DL,byte [EBP-018h] DEC EAX MOV byte [EBP-4],BL SUB CL,DL MOV BL,byte [EAX] XOR CL,BL MOV BL,byte [EAX-1] DEC EAX MOV byte [EBP-01Ch],CL MOV ECX,dword [EBP+0Ch] SUB DL,BL MOV BL,byte [EAX-1] AND ECX,0FFh DEC EAX MOV byte [EBP-018h],DL MOV DL,byte [ECX+d0723628h] MOV ECX,dword [EBP-010h] XOR DL,BL MOV BL,byte [EAX-1] AND ECX,0FFh DEC EAX MOV byte [EBP+0Ch],DL MOV DL,byte [ECX+d0723528h] MOV ECX,dword [EBP-0Ch] SUB DL,BL AND ECX,0FFh DEC EAX MOV byte [EBP-010h],DL MOV DL,byte [ECX+d0723528h] MOV CL,byte [EAX] SUB DL,CL MOV ECX,dword [EBP-014h] DEC EAX AND ECX,0FFh MOV byte [EBP-0Ch],DL MOV BL,byte [ECX+d0723628h] MOV DL,byte [EAX] XOR BL,DL MOV EDX,dword [EBP-8] AND EDX,0FFh DEC EAX MOV CL,byte [EDX+d0723628h] MOV DL,byte [EAX] XOR CL,DL MOV EDX,dword [EBP-4] AND EDX,0FFh DEC EAX MOV byte [EBP-8],CL MOV CL,byte [EDX+d0723528h] MOV DL,byte [EAX] SUB CL,DL MOV EDX,dword [EBP-01Ch] AND EDX,0FFh DEC EAX MOV byte [EBP-4],CL MOV CL,byte [EDX+d0723528h] MOV DL,byte [EAX] SUB CL,DL MOV EDX,dword [EBP-018h] DEC EAX MOV byte [EBP-01Ch],CL AND EDX,0FFh MOV DL,byte [EDX+d0723628h] XOR DL,byte [EAX] DEC ESI JNZ .Ragexe00503B2D .Ragexe00503D00: MOV EAX,dword [EBP+010h] POP EDI POP ESI MOV byte [EAX+1],CL MOV CL,byte [EBP-4] MOV byte [EAX],DL MOV DL,byte [EBP-8] MOV byte [EAX+2],CL MOV CL,byte [EBP-0Ch] MOV byte [EAX+3],DL MOV DL,byte [EBP-010h] MOV byte [EAX+5],CL MOV CL,byte [EBP+0Ch] MOV byte [EAX+4],BL MOV byte [EAX+6],DL MOV byte [EAX+7],CL POP EBX MOV ESP,EBP POP EBP RET ;############################### sub_503800 #################################### Ragexe00503800: PUSH EBP MOV EBP,ESP SUB ESP,01Ch PUSH EBX PUSH ESI MOV ESI,dword [EBP+8] XOR EBX,EBX PUSH EDI MOV AL,byte [ESI+2] MOV CL,byte [ESI] MOV byte [EBP-014h],AL MOV AL,byte [ESI+3] MOV byte [EBP-8],AL MOV AL,byte [ESI+4] MOV byte [EBP-010h],AL MOV AL,byte [ESI+5] MOV byte [EBP-0Ch],AL MOV AL,byte [ESI+6] MOV DL,byte [ESI+1] MOV byte [EBP-4],AL MOV AL,byte [ESI+7] MOV byte [EBP-018h],AL MOV EAX,dword [EBP+0Ch] MOV BL,byte [EAX] MOV ESI,EBX CMP ESI,0Dh JBE .Ragexe00503848 MOV ESI,0Dh .Ragexe00503848: MOV EDI,ESI DEC ESI TEST EDI,EDI JZ near .Ragexe00503A32 MOV BL,byte [EBP-8] INC ESI .Ragexe00503857: XOR CL,byte [EAX+1] INC EAX INC EAX MOV byte [EBP-01Ch],CL MOV CL,byte [EAX] ADD DL,CL MOV CL,byte [EAX+1] INC EAX MOV byte [EBP+0Ch],DL MOV DL,byte [EBP-014h] ADD DL,CL INC EAX MOV byte [EBP-014h],DL MOV DL,byte [EAX] MOV EDI,dword [EBP-014h] XOR BL,DL MOV DL,byte [EAX+1] INC EAX MOV byte [EBP-8],BL MOV BL,byte [EBP-010h] AND EDI,0FFh MOV CL,byte [EAX+1] XOR BL,DL MOV DL,byte [EBP-0Ch] INC EAX ADD DL,CL INC EAX MOV byte [EBP-010h],BL MOV BL,byte [EBP-4] MOV CL,byte [EAX+1] MOV byte [EBP-0Ch],DL MOV DL,byte [EAX] ADD BL,DL MOV DL,byte [EBP-018h] INC EAX XOR DL,CL MOV byte [EBP-018h],DL MOV EDX,dword [EBP-01Ch] AND EDX,0FFh INC EAX MOV byte [EBP-4],BL MOV CL,byte [EDX+d0723528h] MOV DL,byte [EAX] MOV BL,byte [EAX+1] ADD CL,DL MOV EDX,dword [EBP+0Ch] INC EAX AND EDX,0FFh MOV DL,byte [EDX+d0723628h] XOR DL,BL MOV BL,byte [EDI+d0723628h] MOV EDI,dword [EBP-8] XOR BL,byte [EAX+1] INC EAX AND EDI,0FFh MOV byte [EBP-014h],BL INC EAX MOV BL,byte [EDI+d0723528h] MOV EDI,dword [EBP-010h] ADD BL,byte [EAX] AND EDI,0FFh INC EAX MOV byte [EBP-8],BL MOV BL,byte [EDI+d0723528h] MOV EDI,dword [EBP-0Ch] ADD BL,byte [EAX] AND EDI,0FFh INC EAX MOV byte [EBP-010h],BL MOV BL,byte [EDI+d0723628h] MOV EDI,dword [EBP-4] XOR BL,byte [EAX] AND EDI,0FFh INC EAX MOV byte [EBP-0Ch],BL MOV BL,byte [EDI+d0723628h] XOR BL,byte [EAX] INC EAX ADD DL,CL MOV byte [EBP-4],BL MOV byte [EBP+0Ch],DL MOV BL,byte [EBP-8] ADD CL,DL MOV DL,byte [EBP-014h] ADD BL,DL MOV DL,byte [EBP-010h] MOV byte [EBP-8],BL MOV BL,byte [EBP-0Ch] ADD BL,DL ADD DL,BL MOV byte [EBP-0Ch],BL MOV BL,byte [EAX] MOV byte [EBP-010h],DL MOV EDX,dword [EBP-018h] AND EDX,0FFh MOV DL,byte [EDX+d0723528h] ADD DL,BL MOV BL,byte [EBP-4] ADD DL,BL MOV BL,byte [EBP-8] MOV byte [EBP-018h],DL MOV DL,byte [EBP-014h] ADD BL,CL ADD DL,BL MOV BL,byte [EBP-010h] MOV byte [EBP-014h],DL ADD CL,DL MOV DL,byte [EBP-018h] ADD DL,BL MOV BL,byte [EBP-4] ADD BL,DL MOV DL,byte [EBP+0Ch] MOV byte [EBP-4],BL MOV BL,byte [EBP-8] ADD BL,DL ADD DL,BL MOV byte [EBP-8],BL MOV BL,byte [EBP-018h] MOV byte [EBP+0Ch],DL MOV DL,byte [EBP-0Ch] ADD BL,DL MOV DL,byte [EBP-010h] MOV byte [EBP-018h],BL MOV BL,byte [EBP-4] ADD BL,CL ADD DL,BL MOV BL,byte [EBP+0Ch] MOV byte [EBP-010h],DL ADD CL,DL MOV DL,byte [EBP-018h] ADD DL,BL MOV BL,byte [EBP-0Ch] ADD BL,DL MOV DL,byte [EBP-014h] MOV byte [EBP-0Ch],BL MOV BL,byte [EBP-4] ADD BL,DL MOV DL,byte [EBP-8] MOV byte [EBP-4],BL MOV BL,byte [EBP-018h] ADD BL,DL MOV DL,byte [EBP-0Ch] MOV byte [EBP-018h],BL MOV BL,byte [EBP+0Ch] ADD DL,BL MOV BL,byte [EBP-014h] MOV byte [EBP+0Bh],DL MOV DL,byte [EBP-010h] MOV byte [EBP+0Ch],DL MOV DL,byte [EBP-4] ADD DL,BL MOV BL,byte [EBP-8] MOV byte [EBP-010h],DL MOV DL,byte [EBP+0Bh] MOV byte [EBP-014h],DL MOV DL,byte [EBP-018h] ADD DL,BL MOV BL,byte [EBP-0Ch] MOV byte [EBP+0Bh],DL MOV DL,byte [EBP-4] MOV byte [EBP-8],BL MOV byte [EBP-0Ch],DL MOV DL,byte [EBP+0Bh] DEC ESI MOV byte [EBP-4],DL MOV DL,byte [EBP+0Ch] JNZ .Ragexe00503857 .Ragexe00503A32: MOV BL,byte [EAX+1] INC EAX XOR CL,BL INC EAX POP EDI POP ESI MOV BL,byte [EAX] ADD DL,BL MOV BL,byte [EAX+1] ADD byte [EBP-014h],BL INC EAX INC EAX MOV BL,byte [EAX] XOR byte [EBP-8],BL MOV BL,byte [EAX+1] XOR byte [EBP-010h],BL INC EAX INC EAX MOV BL,byte [EAX] ADD byte [EBP-0Ch],BL MOV BL,byte [EAX+1] ADD byte [EBP-4],BL MOV BL,byte [EBP-018h] INC EAX XOR BL,byte [EAX+1] MOV EAX,dword [EBP+010h] MOV byte [EAX],CL MOV CL,byte [EBP-014h] MOV byte [EAX+1],DL MOV DL,byte [EBP-8] MOV byte [EAX+2],CL MOV CL,byte [EBP-010h] MOV byte [EAX+3],DL MOV DL,byte [EBP-0Ch] MOV byte [EAX+4],CL MOV CL,byte [EBP-4] MOV byte [EAX+7],BL MOV byte [EAX+5],DL MOV byte [EAX+6],CL POP EBX MOV ESP,EBP POP EBP RET ;############################### sub_503690 #################################### Ragexe00503690: PUSH EBP MOV EBP,ESP SUB ESP,018h MOV ECX,dword [EBP+010h] MOV EAX,0Dh CMP ECX,EAX JBE .Ragexe005036A5 MOV dword [EBP+010h],EAX .Ragexe005036A5: MOV ECX,dword [EBP+018h] MOV AL,byte [EBP+010h] PUSH EBX MOV EBX,dword [EBP+0Ch] PUSH ESI MOV ESI,dword [EBP+8] PUSH EDI MOV byte [ECX],AL LEA EDI,[EBP-0Ch] LEA EAX,[EBP-018h] INC ECX SUB EDI,ESI SUB EBX,ESI SUB EAX,ESI MOV byte [EBP-4],0 MOV byte [EBP-010h],0 MOV dword [EBP+8],EAX MOV dword [EBP+018h],8 .Ragexe005036D5: MOV DL,byte [ESI] MOV AL,DL SHR AL,3 SHL DL,5 OR AL,DL MOV byte [EDI+ESI],AL MOV DL,byte [EBP-4] XOR DL,AL MOV AL,byte [EBX+ESI] MOV byte [EBP-4],DL MOV EDX,dword [EBP+8] MOV byte [ECX],AL MOV byte [EDX+ESI],AL MOV DL,byte [EBP-010h] XOR DL,AL MOV EAX,dword [EBP+018h] INC ECX INC ESI DEC EAX MOV byte [EBP-010h],DL MOV dword [EBP+018h],EAX JNZ .Ragexe005036D5 MOV EAX,dword [EBP+010h] MOV EDX,1 CMP EAX,EDX MOV dword [EBP+018h],EDX JB near .Ragexe005037F3 MOV EDI, d0723544h .Ragexe00503722: XOR ESI,ESI .Ragexe00503724: MOV AL,byte [EBP+ESI-0Ch] MOV BL,AL SHL BL,6 SHR AL,2 OR BL,AL MOV AL,byte [EBP+ESI-018h] MOV byte [EBP+ESI-0Ch],BL MOV BL,AL SHL BL,6 SHR AL,2 OR BL,AL MOV byte [EBP+ESI-018h],BL INC ESI CMP ESI,9 JB .Ragexe00503724 XOR ESI,ESI .Ragexe00503750: MOV EAX,dword [EBP+014h] TEST EAX,EAX JZ .Ragexe0050377E LEA EAX,[ESI+EDX*2-1] XOR EDX,EDX MOV EBX,9 DIV EBX XOR EAX,EAX MOV AL,byte [EDI+ESI-9] MOV BL,byte [EAX+d0723528h] MOV DL,byte [EBP+EDX-0Ch] ADD DL,BL MOV byte [ECX],DL MOV EDX,dword [EBP+018h] INC ECX JMP .Ragexe00503793 .Ragexe0050377E: MOV BL,byte [EBP+ESI-0Ch] XOR EAX,EAX MOV AL,byte [EDI+ESI-9] MOV AL,byte [EAX+d0723528h] ADD AL,BL MOV byte [ECX],AL INC ECX .Ragexe00503793: INC ESI CMP ESI,8 JB .Ragexe00503750 XOR ESI,ESI .Ragexe0050379B: MOV EAX,dword [EBP+014h] TEST EAX,EAX JZ .Ragexe005037C7 LEA EAX,[ESI+EDX*2] XOR EDX,EDX MOV EBX,9 DIV EBX XOR EAX,EAX MOV AL,byte [EDI+ESI] MOV BL,byte [EAX+d0723528h] MOV DL,byte [EBP+EDX-018h] ADD DL,BL MOV byte [ECX],DL MOV EDX,dword [EBP+018h] INC ECX JMP .Ragexe005037DB .Ragexe005037C7: MOV BL,byte [EBP+ESI-018h] XOR EAX,EAX MOV AL,byte [EDI+ESI] MOV AL,byte [EAX+d0723528h] ADD AL,BL MOV byte [ECX],AL INC ECX .Ragexe005037DB: INC ESI CMP ESI,8 JB .Ragexe0050379B MOV EAX,dword [EBP+010h] INC EDX ADD EDI,012h CMP EDX,EAX MOV dword [EBP+018h],EDX JBE .Ragexe00503722 .Ragexe005037F3: POP EDI POP ESI POP EBX MOV ESP,EBP POP EBP RET ;############################### sub_503650 #################################### Ragexe00503650: PUSH ESI MOV EDX,1 XOR ECX,ECX .Ragexe00503658: MOV EAX,EDX ; May be bug MOV byte [ECX+d0723528h],DL AND EAX,0FFh MOV ESI,0101h ; May be bug MOV byte [EAX+d0723628h],CL LEA EAX,[EDX+EDX*4] XOR EDX,EDX LEA EAX,[EAX+EAX*8] DIV ESI INC ECX CMP ECX,0100h JB .Ragexe00503658 POP ESI RET end
docs/antora/modules/ROOT/pages/nand2tetris/projects/04/fill/Fill.asm
peacetrue/learn-nand2tetris
0
92810
// This file is part of www.nand2tetris.org // and the book "The Elements of Computing Systems" // by <NAME> Schocken, MIT Press. // File name: projects/04/Fill.asm // Runs an infinite loop that listens to the keyboard input. // When a key is pressed (any key), the program blackens the screen, // i.e. writes "black" in every pixel; // the screen should remain fully black as long as the key is pressed. // When no key is pressed, the program clears the screen, i.e. writes // "white" in every pixel; // the screen should remain fully clear as long as no key is pressed. // Put your code here. //i=0 @i M=0 (LOOP) //D=M[KBD] @KBD D=M //if M[KBD]>0 then goto ADD else goto remove @ADD D;JGT //REMOVE //D=M[i] @i D=M //if i<=0 then goto LOOP @LOOP D;JLE //i=i-1 @i M=M-1 //R[i]=0 @SCREEN D=A @i A=D+M M=0 @LOOP 0;JMP (ADD) // if i>=1000 then goto LOOP @i D=M @8192 D=D-A @LOOP D;JGE //R[i]=1 @SCREEN D=A @i A=D+M M=-1 //i=i+1 @i M=M+1 @LOOP 0;JMP
source/amf/mof/amf-internals-elements.adb
svn2github/matreshka
24
1125
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, <NAME> <<EMAIL>> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with AMF.CMOF.Associations; with AMF.CMOF.Classes; with AMF.CMOF.Properties.Collections; with AMF.CMOF.Types; with AMF.Elements.Collections; with AMF.Extents; with AMF.Links.Collections; package body AMF.Internals.Elements is --------------- -- Container -- --------------- overriding function Container (Self : not null access constant Element_Base) return AMF.Elements.Element_Access is use type AMF.Elements.Element_Access; Model_Extent : constant AMF.Extents.Extent_Access := AMF.Elements.Element_Access (Self).Extent; Meta_Class : constant AMF.CMOF.Classes.CMOF_Class_Access := Element_Base'Class (Self.all).Get_Meta_Class; Metamodel_Extent : constant AMF.Extents.Extent_Access := AMF.Elements.Element_Access (Meta_Class).Extent; Metamodel_Elements : constant AMF.Elements.Collections.Set_Of_Element := Metamodel_Extent.Elements; Links : AMF.Links.Collections.Set_Of_Link; Association : AMF.CMOF.Associations.CMOF_Association_Access; Member_Ends : AMF.CMOF.Properties.Collections.Ordered_Set_Of_CMOF_Property; End_Property : AMF.CMOF.Properties.CMOF_Property_Access; End_Type : AMF.CMOF.Types.CMOF_Type_Access; Metamodel_Element : AMF.Elements.Element_Access; begin -- General algoriphm is: -- -- - select all association in metamodel's extent; -- -- - select all association where one member end is composite and -- element's metaclass conforms to type of member end; -- -- - select all links for association; -- -- - check whether corresponding end is element itself and return -- another end. for J in 1 .. Metamodel_Elements.Length loop Metamodel_Element := Metamodel_Elements.Element (J); if Metamodel_Element.all in AMF.CMOF.Associations.CMOF_Association'Class then Association := AMF.CMOF.Associations.CMOF_Association_Access (Metamodel_Element); Member_Ends := Association.Get_Member_End; End_Property := Member_Ends.Element (1); End_Type := End_Property.Get_Type; if End_Property.Get_Is_Composite and then Meta_Class.Conforms_To (End_Type) then Links := Model_Extent.Links_Of_Type (Association); for K in 1 .. Integer (Links.Length) loop if Links.Element (K).Get_First_End = AMF.Elements.Element_Access (Self) then return Links.Element (K).Get_Second_End; end if; end loop; end if; End_Property := Member_Ends.Element (2); End_Type := End_Property.Get_Type; if End_Property.Get_Is_Composite and then Meta_Class.Conforms_To (End_Type) then Links := Model_Extent.Links_Of_Type (Association); for K in 1 .. Integer (Links.Length) loop if Links.Element (K).Get_Second_End = AMF.Elements.Element_Access (Self) then return Links.Element (K).Get_First_End; end if; end loop; end if; end if; end loop; return null; end Container; end AMF.Internals.Elements;
Scripts/NewTerminalWindow.scpt
rxhanson/Charmstone-Community
3
3886
<filename>Scripts/NewTerminalWindow.scpt tell application "Terminal" activate tell application "System Events" keystroke "n" using command down end tell end tell
specs/ada/server/ike/tkmrpc-operation_handlers-ike-tkm_limits.adb
DrenfongWong/tkm-rpc
0
12033
<filename>specs/ada/server/ike/tkmrpc-operation_handlers-ike-tkm_limits.adb with Tkmrpc.Servers.Ike; with Tkmrpc.Response.Ike.Tkm_Limits.Convert; package body Tkmrpc.Operation_Handlers.Ike.Tkm_Limits is ------------------------------------------------------------------------- procedure Handle (Req : Request.Data_Type; Res : out Response.Data_Type) is pragma Unreferenced (Req); Specific_Res : Response.Ike.Tkm_Limits.Response_Type; begin Specific_Res := Response.Ike.Tkm_Limits.Null_Response; Servers.Ike.Tkm_Limits (Result => Specific_Res.Header.Result, Max_Active_Requests => Specific_Res.Data.Max_Active_Requests, Nc_Contexts => Specific_Res.Data.Nc_Contexts, Dh_Contexts => Specific_Res.Data.Dh_Contexts, Cc_Contexts => Specific_Res.Data.Cc_Contexts, Ae_Contexts => Specific_Res.Data.Ae_Contexts, Isa_Contexts => Specific_Res.Data.Isa_Contexts, Esa_Contexts => Specific_Res.Data.Esa_Contexts); Res := Response.Ike.Tkm_Limits.Convert.To_Response (S => Specific_Res); end Handle; end Tkmrpc.Operation_Handlers.Ike.Tkm_Limits;
tools-src/gnu/gcc/gcc/ada/4wintnam.ads
enfoTek/tomato.linksys.e2000.nvram-mod
80
8777
<gh_stars>10-100 ------------------------------------------------------------------------------ -- -- -- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- A D A . I N T E R R U P T S . N A M E S -- -- -- -- S p e c -- -- -- -- $Revision$ -- -- -- Copyright (C) 1997-1998 Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNARL is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNARL; see file COPYING. If not, write -- -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- -- MA 02111-1307, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNARL was developed by the GNARL team at Florida State University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This is a NT (native) version of this package. -- This target-dependent package spec contains names of interrupts -- supported by the local system. with System.OS_Interface; -- used for names of interrupts package Ada.Interrupts.Names is -- Beware that the mapping of names to signals may be -- many-to-one. There may be aliases. Also, for all -- signal names that are not supported on the current system -- the value of the corresponding constant will be zero. SIGINT : constant Interrupt_ID := System.OS_Interface.SIGINT; -- interrupt (rubout) SIGILL : constant Interrupt_ID := System.OS_Interface.SIGILL; -- illegal instruction (not reset) SIGABRT : constant Interrupt_ID := -- used by abort, System.OS_Interface.SIGABRT; -- replace SIGIOT in the future SIGFPE : constant Interrupt_ID := System.OS_Interface.SIGFPE; -- floating point exception SIGSEGV : constant Interrupt_ID := System.OS_Interface.SIGSEGV; -- segmentation violation SIGTERM : constant Interrupt_ID := System.OS_Interface.SIGTERM; -- software termination signal from kill end Ada.Interrupts.Names;
projects/batfish/src/main/antlr4/org/batfish/grammar/arista/Arista_mlag.g4
adiapel/batfish
0
6577
parser grammar Arista_mlag; import Legacy_common; options { tokenVocab = AristaLexer; } eos_mlag_domain : DOMAIN_ID id = variable NEWLINE ; eos_mlag_local_interface : LOCAL_INTERFACE iface = variable NEWLINE ; eos_mlag_peer_address : PEER_ADDRESS HEARTBEAT? ip = IP_ADDRESS NEWLINE ; eos_mlag_peer_link : PEER_LINK iface = variable NEWLINE ; eos_mlag_reload_delay : RELOAD_DELAY (MLAG | NON_MLAG)? period = (INFINITY | UINT8 | UINT16 | UINT32 | DEC) NEWLINE ; eos_mlag_reload_mode : MODE LACP STANDBY NEWLINE ; eos_mlag_shutdown : (NO)? SHUTDOWN NEWLINE ; s_eos_mlag : MLAG CONFIGURATION NEWLINE ( eos_mlag_domain | eos_mlag_local_interface | eos_mlag_peer_address | eos_mlag_peer_link | eos_mlag_reload_delay | eos_mlag_shutdown )* ;
programs/oeis/135/A135680.asm
neoneye/loda
22
13984
; A135680: a(n) = n if n = 1 or if n is prime. Otherwise, n = 4 if n is even and n = 5 if n is odd. ; 1,2,3,4,5,4,7,4,5,4,11,4,13,4,5,4,17,4,19,4,5,4,23,4,5,4,5,4,29,4,31,4,5,4,5,4,37,4,5,4,41,4,43,4,5,4,47,4,5,4,5,4,53,4,5,4,5,4,59,4,61,4,5,4,5,4,67,4,5,4,71,4,73,4,5,4,5,4,79,4,5,4,83,4,5,4,5,4,89,4,5,4,5,4,5,4,97,4,5,4 mov $1,1 lpb $0 mov $2,$0 seq $2,135679 ; a(n) = n if n = 1 or if n is prime. Otherwise, a(n) = 2 if n is even and a(n) = 3 if n is odd. add $1,$2 mov $0,$1 lpe add $0,1
ga_lib/src/c3ga_utilities.adb
rogermc2/GA_Ada
3
25264
-- with Interfaces; with Ada.Numerics; with Ada.Text_IO; use Ada.Text_IO; with Blade; with Blade_Types; with C3GA; with E3GA; with GA_Utilities; with Metric; -- with Multivector_Type; package body C3GA_Utilities is epsilon : constant Float := 10.0 ** (-6); -- Multivector function exp is implemented in the Multivectors package -- ------------------------------------------------------------------------- function exp (BV : Multivectors.Bivector) return Multivectors.Rotor is V : constant Multivectors.M_Vector := Inner_Product (BV, BV, Blade.Left_Contraction); X2 : float := C3GA.e1_e2 (V); Half_Angle : float; Cos_HA : float; Sin_HA : float; Result : Rotor; begin if X2 > 0.0 then X2 := 0.0; end if; Half_Angle := GA_Maths.Float_Functions.Sqrt (-X2); if Half_Angle = 0.0 then Update_Scalar_Part (Result, 1.0); else Cos_HA := GA_Maths.Float_Functions.Cos (Half_Angle); Sin_HA := GA_Maths.Float_Functions.Sin (Half_Angle) / Half_Angle; Result := New_Rotor (0.0, Cos_HA + Sin_HA * BV); end if; return Result; exception when others => Put_Line ("An exception occurred in C3GA_Utilities.exp."); raise; end exp; -- ---------------------------------------------------------------------------- -- special log() for 3D rotors function Log_Rotor (R : Multivectors.Rotor) return Multivectors.Bivector is use E3GA; R2 : float; R1 : float; BV : Bivector; Log_R : Bivector; begin -- get the bivector 2-blade part of R BV := To_Bivector (R); -- compute the 'reverse norm' of the bivector part of R R2 := Norm_E (BV); if R2 > 0.0 then -- return _bivector(B * ((float)atan2(R2, _Float(R)) / R2)); R1 := GA_Maths.Float_Functions.Arctan (R2, Scalar_Part (R)) / R2; Log_R := R1 * BV; -- otherwise, avoid divide-by-zero (and below zero due to FP roundoff) elsif Scalar_Part (R) < 0.0 then -- Return a 360 degree rotation in an arbitrary plane Log_R := Ada.Numerics.Pi * Outer_Product (e1, e2); else Log_R := New_Bivector (0.0, 0.0, 0.0); end if; return Log_R; exception when others => Put_Line ("An exception occurred in C3GA_Utilities.Log_Rotor."); raise; end Log_Rotor; -- ------------------------------------------------------------------------ function Log_TR_Versor (V : TR_Versor) return Dual_Line is use Blade_Types; use Metric; MV : constant Multivector := V; Rot : Rotor; Rot_I : Rotor; Rot_Sq : Rotor; Trans : Multivector; I3_Blade : constant Blade.Basis_Blade := Blade.New_Basis_Blade (C3_e3, 1.0); I3 : constant Multivector := New_Multivector (I3_Blade); BV_Norm : float; BV : Bivector; BV_I : Bivector; BV_I_Phi : Bivector; GP : Multivector; OP : Multivector; GOP_II : Multivector; DL_1 : Dual_Line; I_R2 : Rotor; Log_V : Dual_Line; LC : Multivector; begin -- isolate the rotation and translation parts LC := Left_Contraction (C3GA.no, (Geometric_Product (MV, C3GA.ni, C3_Metric)), C3_Metric); Rot := To_Rotor (-LC); Rot_I := Inverse_Rotor (Rot); LC := Left_Contraction (C3GA.no, MV, C3_Metric); Trans := -2.0 * Geometric_Product (LC, Rot_I, C3_Metric); -- get the bivector 2-blade part of R BV := New_Bivector (E3GA.e1_e2 (MV), E3GA.e2_e3 (MV), E3GA.e3_e1 (MV)); -- 'reverse norm' of the bivector part of R BV_Norm := Norm_Esq (BV); if BV_Norm > epsilon then -- regular case -- Logarithm of rotation part BV_I_Phi := -2.0 * Log_Rotor (Rot); -- Rotation plane: Rot_I := To_Rotor (Unit_E (BV_I_Phi)); GOP_II := Geometric_Product (Inverse_Rotor (Rot_I), C3GA.ni, C3_Metric); OP := Outer_Product (Trans, Rot_I); if Norm_Esq (OP) = 0.0 then GOP_II := New_Multivector (0.0); else GOP_II := -Geometric_Product (OP, GOP_II, C3_Metric); end if; Rot_Sq := To_Rotor (Geometric_Product (Rot, Rot, C3_Metric)); I_R2 := Inverse_Rotor (1.0 - Rot_Sq); LC := Left_Contraction (Trans, BV_I_Phi, C3_Metric); GP := Geometric_Product (LC, C3GA.ni, C3_Metric) - BV_I_Phi; GP := Geometric_Product (I_R2, GP, C3_Metric); Log_V := To_Dual_Line (0.5 * (GOP_II + GP)); else -- BV_Norm <= epsilon if Scalar_Part (Rot) < 0.0 then -- The versor has a rotation over 360 degrees. if Norm_E (Trans) > epsilon then BV_I := Unit_E (Left_Contraction (Trans, I3, C3_Metric)); else BV_I := Outer_Product (E3GA.e1, E3GA.e2); end if; DL_1 := Outer_Product (Trans, C3GA.ni); Log_V := 0.5 * (2.0 * GA_Maths.Pi * BV_I - DL_1); else -- Scalar_Part (Rot) >= 0.0 Log_V := To_Dual_Line (-0.5 * Outer_Product (Trans, C3GA.ni)); end if; end if; return Log_V; exception when others => Put_Line ("An exception occurred in C3GA_Utilities.Log_TR_Versor."); raise; end Log_TR_Versor; -- ------------------------------------------------------------------------ procedure Print_Rotor (Name : String; R : Multivectors.Rotor) is begin GA_Utilities.Print_Multivector (Name, R); end Print_Rotor; -- ------------------------------------------------------------------------ procedure Rotor_To_Matrix (R : Multivectors.Rotor; M : out GA_Maths.GA_Matrix3) is Rot : constant GA_Maths.Float_4D := E3GA.Get_Coords (R); begin M (1, 1) := 1.0 - 2.0 * (Rot (3) * Rot (3) + Rot (4) * Rot (4)); M (2, 1) := 2.0 * (Rot (2) * Rot (3) + Rot (4) * Rot (1)); M (3, 1) := 2.0 * (Rot (2) * Rot (4) - Rot (3) * Rot (1)); M (1, 2) := 2.0 * (Rot (2) * Rot (3) - Rot (4) * Rot (1)); M (2, 2) := 1.0 - 2.0 * (Rot (2) * Rot (2) + Rot (4) * Rot (4)); M (3, 2) := 2.0 * (Rot (3) * Rot (4) + Rot (2) * Rot (1)); M (1, 3) := 2.0 * (Rot (2) * Rot (4) + Rot (3) * Rot (1)); M (2, 3) := 2.0 * (Rot (3) * Rot (4) - Rot (2) * Rot (1)); M (3, 3) := 1.0 - 2.0 * (Rot (2) * Rot (2) + Rot (3) * Rot (3)); end Rotor_To_Matrix; -- ------------------------------------------------------------------------ -- Based on rotorFromVectorToVector function Rotor_Vector_To_Vector (From_V1, To_V2 : Multivectors.M_Vector) return Multivectors.Rotor is use GA_Maths.Float_Functions; S : float; w0 : M_Vector; w1 : M_Vector; w2 : M_Vector; Nsq : Float; R : Rotor; Result : Rotor; begin if Scalar_Product (From_V1, To_V2) < -0.9 then -- "near" 180 degree rotation : -- v1 factor in returning blade regardless of any loss of precision -- v1 << (v1^v2) means c3ga::lcont(v1, (v1^v2)), -- lcont Left_Contraction w0 := Left_Contraction (From_V1, Outer_Product (From_V1, To_V2)); Nsq := Norm_Esq (w0); if Nsq = 0.0 then w1 := Left_Contraction (From_V1, Outer_Product (From_V1, Basis_Vector (Blade_Types.E3_e1))); w2 := Left_Contraction (From_V1, Outer_Product (From_V1, Basis_Vector (Blade_Types.E3_e2))); if Norm_Esq (w1) > Norm_Esq (w2) then Result := Outer_Product (From_V1, Unit_e (w1)); else Result := Outer_Product (From_V1, Unit_e (w2)); end if; else -- Nsq /= 0.0 -- Replace V1 with -V1 and an additional 180 degree rotation. S := Sqrt (2.0 * (1.0 - Scalar_Part (Left_Contraction (To_V2, From_V1)))); R := (1.0 - Geometric_Product (To_V2, From_V1)) / S; Result := Geometric_Product (R, Outer_Product (From_V1, Unit_e (w0))); end if; else -- normal case, not "near" 180 degree rotation. -- (1 + ba)(1 + ab) = 1 + ab + ba + baab -- = 1 + a.b + a^b + b.a + b^a + 1 -- = 2 + 2a.b + a^b - a^b -- = 2(1 + a.b) -- Geometric Algebra for Computer Science, Equation (10.13) S := Sqrt (2.0 * (1.0 + Scalar_Part (Dot (To_V2, From_V1)))); Result := To_Rotor ((1.0 + Geometric_Product (To_V2, From_V1)) / S); end if; Simplify (Result); return Result; exception when others => Put_Line ("An exception occurred in C3GA_Utilities.Rotor_Vector_To_Vector."); raise; end Rotor_Vector_To_Vector; -- ---------------------------------------------------------------------------- end C3GA_Utilities;
Transynther/x86/_processed/US/_zr_/i7-8650U_0xd2_notsx.log_137_883.asm
ljhsiun2/medusa
9
169812
<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %rax push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_normal_ht+0x6b5f, %rsi lea addresses_A_ht+0x14945, %rdi nop nop nop nop add %rax, %rax mov $74, %rcx rep movsb nop nop dec %rbx lea addresses_WT_ht+0x17cb5, %rax nop nop nop nop xor $14995, %rdx movb $0x61, (%rax) nop nop nop nop nop dec %rsi pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rax ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r15 push %rax push %rcx push %rdx push %rsi // Store lea addresses_D+0x11d5d, %r15 nop nop nop nop and %r11, %r11 movb $0x51, (%r15) nop nop cmp $49555, %rsi // Load lea addresses_normal+0x182dd, %rax clflush (%rax) nop nop nop nop nop cmp %r15, %r15 mov (%rax), %r10d xor $43818, %rax // Faulty Load lea addresses_US+0x1e45d, %r10 nop nop nop nop nop cmp $6521, %rdx mov (%r10), %r11d lea oracles, %rcx and $0xff, %r11 shlq $12, %r11 mov (%rcx,%r11,1), %r11 pop %rsi pop %rdx pop %rcx pop %rax pop %r15 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'00': 137} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
projects/batfish/src/org/batfish/grammar/routing_table/nxos/NxosRoutingTableParser.g4
gaberger/batfish
1
1231
parser grammar NxosRoutingTableParser; options { superClass = 'org.batfish.grammar.BatfishParser'; tokenVocab = NxosRoutingTableLexer; } @header { package org.batfish.grammar.routing_table.nxos; } @members { } double_quoted_string : DOUBLE_QUOTE ID? DOUBLE_QUOTE ; interface_name : ~COMMA+ ; network : IP_PREFIX COMMA UNICAST_MULTICAST_COUNT ( COMMA ATTACHED )? NEWLINE route+ ; nxos_routing_table : NEWLINE? vrf_routing_table+ EOF ; protocol : ( BGP DASH DEC COMMA ( EXTERNAL | INTERNAL ) ) | DIRECT | LOCAL | ( OSPF DASH DEC COMMA ( INTER | INTRA | TYPE_1 | TYPE_2 ) ) | STATIC ; route : ASTERISK VIA ( nexthop = IP_ADDRESS | nexthopint = interface_name ) ( COMMA nexthopint = interface_name )? COMMA BRACKET_LEFT admin = DEC FORWARD_SLASH cost = DEC BRACKET_RIGHT COMMA ELAPSED_TIME COMMA protocol ( COMMA TAG DEC )? NEWLINE ; vrf_declaration : VRF_HEADER double_quoted_string NEWLINE ; vrf_routing_table : vrf_declaration NEWLINE? network* ;
src/fltk-widgets-groups-input_choices.ads
micahwelf/FLTK-Ada
1
19881
<filename>src/fltk-widgets-groups-input_choices.ads with FLTK.Widgets.Inputs, FLTK.Widgets.Menus.Menu_Buttons; package FLTK.Widgets.Groups.Input_Choices is type Input_Choice is new Group with private; type Input_Choice_Reference (Data : not null access Input_Choice'Class) is limited null record with Implicit_Dereference => Data; package Forge is function Create (X, Y, W, H : in Integer; Text : in String) return Input_Choice; end Forge; function Input (This : in out Input_Choice) return FLTK.Widgets.Inputs.Input_Reference; function Menu_Button (This : in out Input_Choice) return FLTK.Widgets.Menus.Menu_Buttons.Menu_Button_Reference; procedure Clear (This : in out Input_Choice); function Has_Changed (This : in Input_Choice) return Boolean; procedure Clear_Changed (This : in out Input_Choice); procedure Set_Changed (This : in out Input_Choice; To : in Boolean); function Get_Down_Box (This : in Input_Choice) return Box_Kind; procedure Set_Down_Box (This : in out Input_Choice; To : in Box_Kind); function Get_Text_Color (This : in Input_Choice) return Color; procedure Set_Text_Color (This : in out Input_Choice; To : in Color); function Get_Text_Font (This : in Input_Choice) return Font_Kind; procedure Set_Text_Font (This : in out Input_Choice; To : in Font_Kind); function Get_Text_Size (This : in Input_Choice) return Font_Size; procedure Set_Text_Size (This : in out Input_Choice; To : in Font_Size); function Get_Input (This : in Input_Choice) return String; procedure Set_Input (This : in out Input_Choice; To : in String); procedure Set_Item (This : in out Input_Choice; Num : in Integer); procedure Draw (This : in out Input_Choice); function Handle (This : in out Input_Choice; Event : in Event_Kind) return Event_Outcome; private package INP renames FLTK.Widgets.Inputs; package MB renames FLTK.Widgets.Menus.Menu_Buttons; type Input_Access is access INP.Input; type Menu_Button_Access is access MB.Menu_Button; type Input_Choice is new Group with record My_Input : Input_Access; My_Menu_Button : Menu_Button_Access; end record; overriding procedure Finalize (This : in out Input_Choice); pragma Inline (Input); pragma Inline (Menu_Button); pragma Inline (Has_Changed); pragma Inline (Clear_Changed); pragma Inline (Get_Down_Box); pragma Inline (Set_Down_Box); pragma Inline (Get_Text_Color); pragma Inline (Set_Text_Color); pragma Inline (Get_Text_Font); pragma Inline (Set_Text_Font); pragma Inline (Get_Text_Size); pragma Inline (Set_Text_Size); pragma Inline (Get_Input); pragma Inline (Set_Input); pragma Inline (Set_Item); pragma Inline (Draw); pragma Inline (Handle); end FLTK.Widgets.Groups.Input_Choices;
sources/acme.ads
reznikmm/acme-ada
3
10263
<reponame>reznikmm/acme-ada -- SPDX-FileCopyrightText: 2020 <NAME> <<EMAIL>> -- -- SPDX-License-Identifier: MIT ---------------------------------------------------------------- with League.JSON.Objects; with League.Strings; with League.String_Vectors; with League.Stream_Element_Vectors; with League.Calendars; package ACME is type Context is tagged limited private; procedure Initialize (Self : in out Context'Class; Directory_URL : League.Strings.Universal_String; Terms_Of_Service : out League.Strings.Universal_String); procedure Create_Account (Self : in out Context'Class; Public_Key : League.JSON.Objects.JSON_Object; Private_Key : League.Stream_Element_Vectors.Stream_Element_Vector; Contact : League.String_Vectors.Universal_String_Vector; TOS_Agreed : Boolean := True; Only_Existing : Boolean := False; Account_URL : out League.Strings.Universal_String); type Optional_Date_Time (Is_Set : Boolean := False) is record case Is_Set is when True => Value : League.Calendars.Date_Time; when False => null; end case; end record; procedure Create_Order (Self : in out Context'Class; Account_URL : League.Strings.Universal_String; Private_Key : League.Stream_Element_Vectors.Stream_Element_Vector; DNS_Id_List : League.String_Vectors.Universal_String_Vector; Not_Before : Optional_Date_Time := (Is_Set => False); Not_After : Optional_Date_Time := (Is_Set => False); Auth_List : out League.String_Vectors.Universal_String_Vector; Finalize : out League.Strings.Universal_String; Order_URL : out League.Strings.Universal_String); procedure Get_Order_Status (Self : in out Context'Class; Account_URL : League.Strings.Universal_String; Private_Key : League.Stream_Element_Vectors.Stream_Element_Vector; Order_URL : League.Strings.Universal_String; Certificate : out League.Strings.Universal_String; Status : out League.Strings.Universal_String); type Challenge is record URL : League.Strings.Universal_String; Token : League.Strings.Universal_String; end record; procedure Get_Challenges (Self : in out Context'Class; Account_URL : League.Strings.Universal_String; Private_Key : League.Stream_Element_Vectors.Stream_Element_Vector; Auth_URL : League.Strings.Universal_String; HTTP : out Challenge; DNS : out Challenge); function Key_Authorization (Token : League.Strings.Universal_String; Public_Key : League.JSON.Objects.JSON_Object) return League.Strings.Universal_String; procedure Challenge_Status (Self : in out Context'Class; Account_URL : League.Strings.Universal_String; Private_Key : League.Stream_Element_Vectors.Stream_Element_Vector; Challenge : ACME.Challenge; Status : out League.Strings.Universal_String); procedure Challenge_Complete (Self : in out Context'Class; Account_URL : League.Strings.Universal_String; Private_Key : League.Stream_Element_Vectors.Stream_Element_Vector; Challenge : ACME.Challenge); procedure Finalize_Order (Self : in out Context'Class; Account_URL : League.Strings.Universal_String; Private_Key : League.Stream_Element_Vectors.Stream_Element_Vector; Finalize : League.Strings.Universal_String; CSR : League.Stream_Element_Vectors.Stream_Element_Vector); procedure Get_Certificate (Self : in out Context'Class; Account_URL : League.Strings.Universal_String; Private_Key : League.Stream_Element_Vectors.Stream_Element_Vector; Certificate : League.Strings.Universal_String; Text : out League.Strings.Universal_String); private type Context is tagged limited record Directory : League.JSON.Objects.JSON_Object; Nonce : League.Strings.Universal_String; end record; end ACME;
src/intel/tools/tests/gen5/else.asm
SoftReaper/Mesa-Renoir-deb
0
91451
else(8) Jump: 86 Pop: 1 { align1 switch }; else(16) Jump: 86 Pop: 1 { align1 switch }; else(8) Jump: 14 Pop: 1 { align16 switch };
programs/oeis/043/A043543.asm
neoneye/loda
22
104144
; A043543: Number of distinct base-16 digits of n. ; 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2 mov $1,2 mov $3,1 mov $4,8 lpb $0 mov $2,1 add $2,$0 mov $0,0 mov $1,$4 mul $1,2 add $1,$3 gcd $2,$1 add $3,1 trn $3,$2 add $2,$3 add $2,1 mov $5,1 sub $5,$2 mul $5,7 sub $0,$5 mov $1,3 lpe sub $1,1 mov $0,$1
Tejas-Simulator/PIN/pin-2.14/source/tools/Regvalue/doXsave_intel64.asm
markoshorro/tejas_knl
17
245893
PUBLIC DoXsave extern xsaveArea:qword .code ; void DoXsave(); ; This function calls xsave and stores the FP state in the given dst area. ; The caller is expected to allocate enough space for the xsave area. ; The function expects the given dst pointer to be properly aligned for the xsave instruction. DoXsave PROC ; Save the necessary GPRs push rax push rcx push rdx lea rcx, xsaveArea xor rdx, rdx mov rax, 7 ; Do xsave xsave [rcx] ; Restore the GPRs pop rdx pop rcx pop rax ret DoXsave ENDP end
ioctl/IomSetPtrPos.asm
osfree-project/FamilyAPI
1
14660
;-------------------------------------------------------- ; Category 7 Function 59 Set pointer screen position ;-------------------------------------------------------- ; ;Purpose ;Specifies/Replaces the Pointer Position ;Parameter Packet Format ;Fie Id ;Row Position ;Column Position ;Data Packet Format ;None ;Row Position ;Length ;WORD ;WORD ;The new row coordinate pointer screen position. ;Column Position ;The new column coordinate pointer screen position. ;The coordinate values are display mode dependent. Pixel values ;must be used if the display is in graphics mode. Character position ;values must be used if the display is in text mode. ;Returns ;None ;Remarks ;This function does not override functions 57H and 58H. ;If the pointer is directed into a restricted area, it remains invisible ;until moved out of the area or until the area is freed of restrictions. ;The parameter packet is a far pointer to a structure in application ;storage where the mouse device driver will read coordinate positions. ; ;------------------------------------------------------------------------ ; ;INT 33 - MS MOUSE v1.0+ - POSITION MOUSE CURSOR ; ; AX = 0004h ; CX = column ; DX = row ;Note: the row and column are truncated to the next lower multiple of the cell ; size (typically 8x8 in text modes); however, some versions of the ; Microsoft documentation incorrectly state that the coordinates are ; rounded ;SeeAlso: AX=0003h,INT 62/AX=0081h,INT 6F/AH=10h"F_PUT_SPRITE" ; IOMSETPTRPOS PROC NEAR MOV AX, ERROR_INVALID_PARAMETER XOR BX, BX CMP BX, WORD PTR [DS:BP].ARGS.DDATA JNZ EXIT CMP BX, WORD PTR [DS:BP].ARGS.DDATA+2 JNZ EXIT LES BX, [DS:BP].ARGS.PARMLIST MOV DX, [ES:BX] MOV CX, [ES:BX+2] MOV AX, 04H INT 33H XOR AX, AX EXIT: RET IOMSETPTRPOS ENDP
skype-to-online.applescript
rmehner/workflow
2
1320
<reponame>rmehner/workflow tell application "System Events" to set SkypeIsRunning to (count of (every process whose name is "Skype")) > 0 if SkypeIsRunning then tell application "Skype" send command "SET USERSTATUS ONLINE" script name "SETSKYPESTATUSTOONLINE" end tell end if
libsrc/_DEVELOPMENT/math/float/am9511/c/sdcc/cam32_sdcc___fs2sint_callee.asm
dikdom/z88dk
1
98053
<filename>libsrc/_DEVELOPMENT/math/float/am9511/c/sdcc/cam32_sdcc___fs2sint_callee.asm SECTION code_fp_am9511 PUBLIC cam32_sdcc___fs2sint_callee PUBLIC cam32_sdcc___fs2schar_callee EXTERN asm_am9511_f2sint EXTERN asm_sdcc_read1_callee .cam32_sdcc___fs2sint_callee .cam32_sdcc___fs2schar_callee call asm_sdcc_read1_callee jp asm_am9511_f2sint
asm/Lcd_I2C_Lib.asm
JON95Git/ICCP
1
23279
_Lcd_I2C_Cmd: ;Lcd_I2C_Lib.c,41 :: void Lcd_I2C_Cmd(char out_char) ;Lcd_I2C_Lib.c,46 :: I2C_byte = out_char & 0xF0; MOVLW 240 ANDWF FARG_Lcd_I2C_Cmd_out_char+0, 0 MOVWF Lcd_I2C_Cmd_I2C_byte_L0+0 ;Lcd_I2C_Lib.c,48 :: I2C1_Start(); CALL _I2C1_Start+0, 0 ;Lcd_I2C_Lib.c,49 :: I2C1_Wr(LCD_I2C_address); MOVF _Lcd_I2C_address+0, 0 MOVWF FARG_I2C1_Wr_data_+0 CALL _I2C1_Wr+0, 0 ;Lcd_I2C_Lib.c,51 :: I2C_byte.F3 = 1; // pino base j3y BSF Lcd_I2C_Cmd_I2C_byte_L0+0, 3 ;Lcd_I2C_Lib.c,52 :: I2C_byte.F1 = 0; BCF Lcd_I2C_Cmd_I2C_byte_L0+0, 1 ;Lcd_I2C_Lib.c,53 :: I2C_byte.F0 = 0; BCF Lcd_I2C_Cmd_I2C_byte_L0+0, 0 ;Lcd_I2C_Lib.c,54 :: I2C_byte.F2 = 1; BSF Lcd_I2C_Cmd_I2C_byte_L0+0, 2 ;Lcd_I2C_Lib.c,55 :: I2C1_Wr(I2C_byte); MOVF Lcd_I2C_Cmd_I2C_byte_L0+0, 0 MOVWF FARG_I2C1_Wr_data_+0 CALL _I2C1_Wr+0, 0 ;Lcd_I2C_Lib.c,56 :: I2C_byte.F2 = 0; BCF Lcd_I2C_Cmd_I2C_byte_L0+0, 2 ;Lcd_I2C_Lib.c,57 :: I2C1_Wr(I2C_byte); MOVF Lcd_I2C_Cmd_I2C_byte_L0+0, 0 MOVWF FARG_I2C1_Wr_data_+0 CALL _I2C1_Wr+0, 0 ;Lcd_I2C_Lib.c,59 :: I2C_byte = (out_char << 4) & 0xF0; MOVF FARG_Lcd_I2C_Cmd_out_char+0, 0 MOVWF Lcd_I2C_Cmd_I2C_byte_L0+0 RLCF Lcd_I2C_Cmd_I2C_byte_L0+0, 1 BCF Lcd_I2C_Cmd_I2C_byte_L0+0, 0 RLCF Lcd_I2C_Cmd_I2C_byte_L0+0, 1 BCF Lcd_I2C_Cmd_I2C_byte_L0+0, 0 RLCF Lcd_I2C_Cmd_I2C_byte_L0+0, 1 BCF Lcd_I2C_Cmd_I2C_byte_L0+0, 0 RLCF Lcd_I2C_Cmd_I2C_byte_L0+0, 1 BCF Lcd_I2C_Cmd_I2C_byte_L0+0, 0 MOVLW 240 ANDWF Lcd_I2C_Cmd_I2C_byte_L0+0, 1 ;Lcd_I2C_Lib.c,61 :: I2C_byte.F3 = 1; // pino base j3y BSF Lcd_I2C_Cmd_I2C_byte_L0+0, 3 ;Lcd_I2C_Lib.c,62 :: I2C_byte.F1 = 0; BCF Lcd_I2C_Cmd_I2C_byte_L0+0, 1 ;Lcd_I2C_Lib.c,63 :: I2C_byte.F0 = 0; BCF Lcd_I2C_Cmd_I2C_byte_L0+0, 0 ;Lcd_I2C_Lib.c,64 :: I2C_byte.F2 = 1; BSF Lcd_I2C_Cmd_I2C_byte_L0+0, 2 ;Lcd_I2C_Lib.c,65 :: I2C1_Wr(I2C_byte); MOVF Lcd_I2C_Cmd_I2C_byte_L0+0, 0 MOVWF FARG_I2C1_Wr_data_+0 CALL _I2C1_Wr+0, 0 ;Lcd_I2C_Lib.c,66 :: I2C_byte.F2 = 0; BCF Lcd_I2C_Cmd_I2C_byte_L0+0, 2 ;Lcd_I2C_Lib.c,67 :: I2C1_Wr(I2C_byte); MOVF Lcd_I2C_Cmd_I2C_byte_L0+0, 0 MOVWF FARG_I2C1_Wr_data_+0 CALL _I2C1_Wr+0, 0 ;Lcd_I2C_Lib.c,68 :: I2C1_stop(); CALL _I2C1_Stop+0, 0 ;Lcd_I2C_Lib.c,70 :: Delay_ms(10); MOVLW 65 MOVWF R12, 0 MOVLW 238 MOVWF R13, 0 L_Lcd_I2C_Cmd0: DECFSZ R13, 1, 1 BRA L_Lcd_I2C_Cmd0 DECFSZ R12, 1, 1 BRA L_Lcd_I2C_Cmd0 NOP ;Lcd_I2C_Lib.c,71 :: }//Final LCD_I2C_Cmd L_end_Lcd_I2C_Cmd: RETURN 0 ; end of _Lcd_I2C_Cmd _Lcd_I2C_Init: ;Lcd_I2C_Lib.c,74 :: void Lcd_I2C_Init() ;Lcd_I2C_Lib.c,79 :: Delay_ms(100); MOVLW 3 MOVWF R11, 0 MOVLW 138 MOVWF R12, 0 MOVLW 85 MOVWF R13, 0 L_Lcd_I2C_Init1: DECFSZ R13, 1, 1 BRA L_Lcd_I2C_Init1 DECFSZ R12, 1, 1 BRA L_Lcd_I2C_Init1 DECFSZ R11, 1, 1 BRA L_Lcd_I2C_Init1 NOP NOP ;Lcd_I2C_Lib.c,81 :: I2C1_Start(); CALL _I2C1_Start+0, 0 ;Lcd_I2C_Lib.c,82 :: I2C1_Wr(LCD_I2C_address); MOVF _Lcd_I2C_address+0, 0 MOVWF FARG_I2C1_Wr_data_+0 CALL _I2C1_Wr+0, 0 ;Lcd_I2C_Lib.c,83 :: Delay_ms(10); MOVLW 65 MOVWF R12, 0 MOVLW 238 MOVWF R13, 0 L_Lcd_I2C_Init2: DECFSZ R13, 1, 1 BRA L_Lcd_I2C_Init2 DECFSZ R12, 1, 1 BRA L_Lcd_I2C_Init2 NOP ;Lcd_I2C_Lib.c,85 :: I2C_byte = 0x30; MOVLW 48 MOVWF Lcd_I2C_Init_I2C_byte_L0+0 ;Lcd_I2C_Lib.c,87 :: I2C_byte.F3 = 1; // pino base j3y BSF Lcd_I2C_Init_I2C_byte_L0+0, 3 ;Lcd_I2C_Lib.c,88 :: I2C_byte.F1 = 0; BCF Lcd_I2C_Init_I2C_byte_L0+0, 1 ;Lcd_I2C_Lib.c,89 :: I2C_byte.F2 = 1; BSF Lcd_I2C_Init_I2C_byte_L0+0, 2 ;Lcd_I2C_Lib.c,90 :: I2C1_Wr(I2C_byte); MOVF Lcd_I2C_Init_I2C_byte_L0+0, 0 MOVWF FARG_I2C1_Wr_data_+0 CALL _I2C1_Wr+0, 0 ;Lcd_I2C_Lib.c,92 :: I2C_byte.F2 = 0; BCF Lcd_I2C_Init_I2C_byte_L0+0, 2 ;Lcd_I2C_Lib.c,93 :: I2C1_Wr(I2C_byte); MOVF Lcd_I2C_Init_I2C_byte_L0+0, 0 MOVWF FARG_I2C1_Wr_data_+0 CALL _I2C1_Wr+0, 0 ;Lcd_I2C_Lib.c,95 :: Delay_ms(10); MOVLW 65 MOVWF R12, 0 MOVLW 238 MOVWF R13, 0 L_Lcd_I2C_Init3: DECFSZ R13, 1, 1 BRA L_Lcd_I2C_Init3 DECFSZ R12, 1, 1 BRA L_Lcd_I2C_Init3 NOP ;Lcd_I2C_Lib.c,97 :: I2C_byte.F3 = 1; // pino base j3y BSF Lcd_I2C_Init_I2C_byte_L0+0, 3 ;Lcd_I2C_Lib.c,98 :: I2C_byte.F2 = 1; BSF Lcd_I2C_Init_I2C_byte_L0+0, 2 ;Lcd_I2C_Lib.c,99 :: I2C1_Wr(I2C_byte); MOVF Lcd_I2C_Init_I2C_byte_L0+0, 0 MOVWF FARG_I2C1_Wr_data_+0 CALL _I2C1_Wr+0, 0 ;Lcd_I2C_Lib.c,100 :: I2C_byte.F2 = 0; BCF Lcd_I2C_Init_I2C_byte_L0+0, 2 ;Lcd_I2C_Lib.c,101 :: I2C1_Wr(I2C_byte); MOVF Lcd_I2C_Init_I2C_byte_L0+0, 0 MOVWF FARG_I2C1_Wr_data_+0 CALL _I2C1_Wr+0, 0 ;Lcd_I2C_Lib.c,103 :: Delay_ms(10); MOVLW 65 MOVWF R12, 0 MOVLW 238 MOVWF R13, 0 L_Lcd_I2C_Init4: DECFSZ R13, 1, 1 BRA L_Lcd_I2C_Init4 DECFSZ R12, 1, 1 BRA L_Lcd_I2C_Init4 NOP ;Lcd_I2C_Lib.c,105 :: I2C_byte.F3 = 1; // pino base j3y BSF Lcd_I2C_Init_I2C_byte_L0+0, 3 ;Lcd_I2C_Lib.c,106 :: I2C_byte.F2 = 1; BSF Lcd_I2C_Init_I2C_byte_L0+0, 2 ;Lcd_I2C_Lib.c,107 :: I2C1_Wr(I2C_byte); MOVF Lcd_I2C_Init_I2C_byte_L0+0, 0 MOVWF FARG_I2C1_Wr_data_+0 CALL _I2C1_Wr+0, 0 ;Lcd_I2C_Lib.c,108 :: I2C_byte.F2 = 0; BCF Lcd_I2C_Init_I2C_byte_L0+0, 2 ;Lcd_I2C_Lib.c,109 :: I2C1_Wr(I2C_byte); MOVF Lcd_I2C_Init_I2C_byte_L0+0, 0 MOVWF FARG_I2C1_Wr_data_+0 CALL _I2C1_Wr+0, 0 ;Lcd_I2C_Lib.c,111 :: Delay_ms(10); MOVLW 65 MOVWF R12, 0 MOVLW 238 MOVWF R13, 0 L_Lcd_I2C_Init5: DECFSZ R13, 1, 1 BRA L_Lcd_I2C_Init5 DECFSZ R12, 1, 1 BRA L_Lcd_I2C_Init5 NOP ;Lcd_I2C_Lib.c,113 :: I2C_byte = 0x20; MOVLW 32 MOVWF Lcd_I2C_Init_I2C_byte_L0+0 ;Lcd_I2C_Lib.c,115 :: I2C_byte.F3 = 1; // pino base j3y BSF Lcd_I2C_Init_I2C_byte_L0+0, 3 ;Lcd_I2C_Lib.c,116 :: I2C_byte.F1 = 0; BCF Lcd_I2C_Init_I2C_byte_L0+0, 1 ;Lcd_I2C_Lib.c,117 :: I2C_byte.F2 = 1; BSF Lcd_I2C_Init_I2C_byte_L0+0, 2 ;Lcd_I2C_Lib.c,118 :: I2C1_Wr(I2C_byte); MOVF Lcd_I2C_Init_I2C_byte_L0+0, 0 MOVWF FARG_I2C1_Wr_data_+0 CALL _I2C1_Wr+0, 0 ;Lcd_I2C_Lib.c,119 :: I2C_byte.F2 = 0; BCF Lcd_I2C_Init_I2C_byte_L0+0, 2 ;Lcd_I2C_Lib.c,120 :: I2C1_Wr(I2C_byte); MOVF Lcd_I2C_Init_I2C_byte_L0+0, 0 MOVWF FARG_I2C1_Wr_data_+0 CALL _I2C1_Wr+0, 0 ;Lcd_I2C_Lib.c,122 :: Delay_ms(10); MOVLW 65 MOVWF R12, 0 MOVLW 238 MOVWF R13, 0 L_Lcd_I2C_Init6: DECFSZ R13, 1, 1 BRA L_Lcd_I2C_Init6 DECFSZ R12, 1, 1 BRA L_Lcd_I2C_Init6 NOP ;Lcd_I2C_Lib.c,124 :: LCD_I2C_Cmd(0x28); MOVLW 40 MOVWF FARG_Lcd_I2C_Cmd_out_char+0 CALL _Lcd_I2C_Cmd+0, 0 ;Lcd_I2C_Lib.c,125 :: Delay_ms(10); MOVLW 65 MOVWF R12, 0 MOVLW 238 MOVWF R13, 0 L_Lcd_I2C_Init7: DECFSZ R13, 1, 1 BRA L_Lcd_I2C_Init7 DECFSZ R12, 1, 1 BRA L_Lcd_I2C_Init7 NOP ;Lcd_I2C_Lib.c,126 :: LCD_I2C_Cmd(0x0F); MOVLW 15 MOVWF FARG_Lcd_I2C_Cmd_out_char+0 CALL _Lcd_I2C_Cmd+0, 0 ;Lcd_I2C_Lib.c,127 :: Delay_ms(10); MOVLW 65 MOVWF R12, 0 MOVLW 238 MOVWF R13, 0 L_Lcd_I2C_Init8: DECFSZ R13, 1, 1 BRA L_Lcd_I2C_Init8 DECFSZ R12, 1, 1 BRA L_Lcd_I2C_Init8 NOP ;Lcd_I2C_Lib.c,128 :: LCD_I2C_Cmd(0x06); MOVLW 6 MOVWF FARG_Lcd_I2C_Cmd_out_char+0 CALL _Lcd_I2C_Cmd+0, 0 ;Lcd_I2C_Lib.c,129 :: Delay_ms(10); MOVLW 65 MOVWF R12, 0 MOVLW 238 MOVWF R13, 0 L_Lcd_I2C_Init9: DECFSZ R13, 1, 1 BRA L_Lcd_I2C_Init9 DECFSZ R12, 1, 1 BRA L_Lcd_I2C_Init9 NOP ;Lcd_I2C_Lib.c,130 :: LCD_I2C_Cmd(0x01); MOVLW 1 MOVWF FARG_Lcd_I2C_Cmd_out_char+0 CALL _Lcd_I2C_Cmd+0, 0 ;Lcd_I2C_Lib.c,131 :: Delay_ms(10); MOVLW 65 MOVWF R12, 0 MOVLW 238 MOVWF R13, 0 L_Lcd_I2C_Init10: DECFSZ R13, 1, 1 BRA L_Lcd_I2C_Init10 DECFSZ R12, 1, 1 BRA L_Lcd_I2C_Init10 NOP ;Lcd_I2C_Lib.c,132 :: }//Final do I2C_Lcd_Init L_end_Lcd_I2C_Init: RETURN 0 ; end of _Lcd_I2C_Init _Lcd_I2C_Chr_CP: ;Lcd_I2C_Lib.c,135 :: void Lcd_I2C_Chr_CP(char out_char) ;Lcd_I2C_Lib.c,140 :: byte = out_char & 0xF0; MOVLW 240 ANDWF FARG_Lcd_I2C_Chr_CP_out_char+0, 0 MOVWF Lcd_I2C_Chr_CP_byte_L0+0 ;Lcd_I2C_Lib.c,142 :: I2C1_Start(); CALL _I2C1_Start+0, 0 ;Lcd_I2C_Lib.c,143 :: I2C1_Wr(LCD_I2C_address); MOVF _Lcd_I2C_address+0, 0 MOVWF FARG_I2C1_Wr_data_+0 CALL _I2C1_Wr+0, 0 ;Lcd_I2C_Lib.c,145 :: byte.F3 = 1; // pino base j3y BSF Lcd_I2C_Chr_CP_byte_L0+0, 3 ;Lcd_I2C_Lib.c,146 :: byte.F1 = 0; BCF Lcd_I2C_Chr_CP_byte_L0+0, 1 ;Lcd_I2C_Lib.c,147 :: byte.F0 = 1; //rs = 0 BSF Lcd_I2C_Chr_CP_byte_L0+0, 0 ;Lcd_I2C_Lib.c,148 :: byte.F2 = 1; //e = 2 BSF Lcd_I2C_Chr_CP_byte_L0+0, 2 ;Lcd_I2C_Lib.c,149 :: I2C1_Wr(byte); MOVF Lcd_I2C_Chr_CP_byte_L0+0, 0 MOVWF FARG_I2C1_Wr_data_+0 CALL _I2C1_Wr+0, 0 ;Lcd_I2C_Lib.c,150 :: byte.F2 = 0; BCF Lcd_I2C_Chr_CP_byte_L0+0, 2 ;Lcd_I2C_Lib.c,151 :: I2C1_Wr(byte); MOVF Lcd_I2C_Chr_CP_byte_L0+0, 0 MOVWF FARG_I2C1_Wr_data_+0 CALL _I2C1_Wr+0, 0 ;Lcd_I2C_Lib.c,153 :: byte = (out_char << 4) & 0xF0; MOVF FARG_Lcd_I2C_Chr_CP_out_char+0, 0 MOVWF Lcd_I2C_Chr_CP_byte_L0+0 RLCF Lcd_I2C_Chr_CP_byte_L0+0, 1 BCF Lcd_I2C_Chr_CP_byte_L0+0, 0 RLCF Lcd_I2C_Chr_CP_byte_L0+0, 1 BCF Lcd_I2C_Chr_CP_byte_L0+0, 0 RLCF Lcd_I2C_Chr_CP_byte_L0+0, 1 BCF Lcd_I2C_Chr_CP_byte_L0+0, 0 RLCF Lcd_I2C_Chr_CP_byte_L0+0, 1 BCF Lcd_I2C_Chr_CP_byte_L0+0, 0 MOVLW 240 ANDWF Lcd_I2C_Chr_CP_byte_L0+0, 1 ;Lcd_I2C_Lib.c,155 :: byte.F3 = 1; // pino base j3y BSF Lcd_I2C_Chr_CP_byte_L0+0, 3 ;Lcd_I2C_Lib.c,156 :: byte.F1 = 0; BCF Lcd_I2C_Chr_CP_byte_L0+0, 1 ;Lcd_I2C_Lib.c,157 :: byte.F0 = 1; BSF Lcd_I2C_Chr_CP_byte_L0+0, 0 ;Lcd_I2C_Lib.c,158 :: byte.F2 = 1; BSF Lcd_I2C_Chr_CP_byte_L0+0, 2 ;Lcd_I2C_Lib.c,159 :: I2C1_Wr(byte); MOVF Lcd_I2C_Chr_CP_byte_L0+0, 0 MOVWF FARG_I2C1_Wr_data_+0 CALL _I2C1_Wr+0, 0 ;Lcd_I2C_Lib.c,160 :: byte.F2 = 0; BCF Lcd_I2C_Chr_CP_byte_L0+0, 2 ;Lcd_I2C_Lib.c,161 :: I2C1_Wr(byte); MOVF Lcd_I2C_Chr_CP_byte_L0+0, 0 MOVWF FARG_I2C1_Wr_data_+0 CALL _I2C1_Wr+0, 0 ;Lcd_I2C_Lib.c,163 :: I2C1_Stop(); CALL _I2C1_Stop+0, 0 ;Lcd_I2C_Lib.c,164 :: Delay_ms(10); MOVLW 65 MOVWF R12, 0 MOVLW 238 MOVWF R13, 0 L_Lcd_I2C_Chr_CP11: DECFSZ R13, 1, 1 BRA L_Lcd_I2C_Chr_CP11 DECFSZ R12, 1, 1 BRA L_Lcd_I2C_Chr_CP11 NOP ;Lcd_I2C_Lib.c,165 :: }//Final da Lcd_I2C_Chr_CP L_end_Lcd_I2C_Chr_CP: RETURN 0 ; end of _Lcd_I2C_Chr_CP _Lcd_I2C_Out_CP: ;Lcd_I2C_Lib.c,168 :: void Lcd_I2C_Out_CP(char *text) ;Lcd_I2C_Lib.c,170 :: while(*text) L_Lcd_I2C_Out_CP12: MOVFF FARG_Lcd_I2C_Out_CP_text+0, FSR0 MOVFF FARG_Lcd_I2C_Out_CP_text+1, FSR0H MOVF POSTINC0+0, 1 BTFSC STATUS+0, 2 GOTO L_Lcd_I2C_Out_CP13 ;Lcd_I2C_Lib.c,172 :: Lcd_I2C_Chr_CP(*text); MOVFF FARG_Lcd_I2C_Out_CP_text+0, FSR0 MOVFF FARG_Lcd_I2C_Out_CP_text+1, FSR0H MOVF POSTINC0+0, 0 MOVWF FARG_Lcd_I2C_Chr_CP_out_char+0 CALL _Lcd_I2C_Chr_CP+0, 0 ;Lcd_I2C_Lib.c,173 :: text++; INFSNZ FARG_Lcd_I2C_Out_CP_text+0, 1 INCF FARG_Lcd_I2C_Out_CP_text+1, 1 ;Lcd_I2C_Lib.c,174 :: } GOTO L_Lcd_I2C_Out_CP12 L_Lcd_I2C_Out_CP13: ;Lcd_I2C_Lib.c,175 :: }//Final do Lcd_I2C_Out_CP L_end_Lcd_I2C_Out_CP: RETURN 0 ; end of _Lcd_I2C_Out_CP _Lcd_I2C_Chr: ;Lcd_I2C_Lib.c,178 :: void Lcd_I2C_Chr(char row, char column, char out_char) ;Lcd_I2C_Lib.c,183 :: switch(row) GOTO L_Lcd_I2C_Chr14 ;Lcd_I2C_Lib.c,185 :: case 1: L_Lcd_I2C_Chr16: ;Lcd_I2C_Lib.c,186 :: Lcd_I2C_Cmd(0x80 + (column - 1)); DECF FARG_Lcd_I2C_Chr_column+0, 0 MOVWF R0 MOVF R0, 0 ADDLW 128 MOVWF FARG_Lcd_I2C_Cmd_out_char+0 CALL _Lcd_I2C_Cmd+0, 0 ;Lcd_I2C_Lib.c,187 :: break; GOTO L_Lcd_I2C_Chr15 ;Lcd_I2C_Lib.c,188 :: case 2: L_Lcd_I2C_Chr17: ;Lcd_I2C_Lib.c,189 :: Lcd_I2C_Cmd(0xC0 + (column - 1)); DECF FARG_Lcd_I2C_Chr_column+0, 0 MOVWF R0 MOVF R0, 0 ADDLW 192 MOVWF FARG_Lcd_I2C_Cmd_out_char+0 CALL _Lcd_I2C_Cmd+0, 0 ;Lcd_I2C_Lib.c,190 :: break; GOTO L_Lcd_I2C_Chr15 ;Lcd_I2C_Lib.c,191 :: case 3: L_Lcd_I2C_Chr18: ;Lcd_I2C_Lib.c,192 :: Lcd_I2C_Cmd(0x94 + (column - 1)); DECF FARG_Lcd_I2C_Chr_column+0, 0 MOVWF R0 MOVF R0, 0 ADDLW 148 MOVWF FARG_Lcd_I2C_Cmd_out_char+0 CALL _Lcd_I2C_Cmd+0, 0 ;Lcd_I2C_Lib.c,193 :: break; GOTO L_Lcd_I2C_Chr15 ;Lcd_I2C_Lib.c,194 :: case 4: L_Lcd_I2C_Chr19: ;Lcd_I2C_Lib.c,195 :: Lcd_I2C_Cmd(0xD4 + (column - 1)); DECF FARG_Lcd_I2C_Chr_column+0, 0 MOVWF R0 MOVF R0, 0 ADDLW 212 MOVWF FARG_Lcd_I2C_Cmd_out_char+0 CALL _Lcd_I2C_Cmd+0, 0 ;Lcd_I2C_Lib.c,196 :: break; GOTO L_Lcd_I2C_Chr15 ;Lcd_I2C_Lib.c,197 :: }; L_Lcd_I2C_Chr14: MOVF FARG_Lcd_I2C_Chr_row+0, 0 XORLW 1 BTFSC STATUS+0, 2 GOTO L_Lcd_I2C_Chr16 MOVF FARG_Lcd_I2C_Chr_row+0, 0 XORLW 2 BTFSC STATUS+0, 2 GOTO L_Lcd_I2C_Chr17 MOVF FARG_Lcd_I2C_Chr_row+0, 0 XORLW 3 BTFSC STATUS+0, 2 GOTO L_Lcd_I2C_Chr18 MOVF FARG_Lcd_I2C_Chr_row+0, 0 XORLW 4 BTFSC STATUS+0, 2 GOTO L_Lcd_I2C_Chr19 L_Lcd_I2C_Chr15: ;Lcd_I2C_Lib.c,199 :: Lcd_I2C_Chr_CP(out_char); MOVF FARG_Lcd_I2C_Chr_out_char+0, 0 MOVWF FARG_Lcd_I2C_Chr_CP_out_char+0 CALL _Lcd_I2C_Chr_CP+0, 0 ;Lcd_I2C_Lib.c,200 :: }//Final do Lcd_I2C_Chr L_end_Lcd_I2C_Chr: RETURN 0 ; end of _Lcd_I2C_Chr _Lcd_I2C_Out: ;Lcd_I2C_Lib.c,203 :: void Lcd_I2C_Out(char row, char col, char *text) ;Lcd_I2C_Lib.c,205 :: while(*text) L_Lcd_I2C_Out20: MOVFF FARG_Lcd_I2C_Out_text+0, FSR0 MOVFF FARG_Lcd_I2C_Out_text+1, FSR0H MOVF POSTINC0+0, 1 BTFSC STATUS+0, 2 GOTO L_Lcd_I2C_Out21 ;Lcd_I2C_Lib.c,207 :: Lcd_I2C_Chr(row, col, *text); MOVF FARG_Lcd_I2C_Out_row+0, 0 MOVWF FARG_Lcd_I2C_Chr_row+0 MOVF FARG_Lcd_I2C_Out_col+0, 0 MOVWF FARG_Lcd_I2C_Chr_column+0 MOVFF FARG_Lcd_I2C_Out_text+0, FSR0 MOVFF FARG_Lcd_I2C_Out_text+1, FSR0H MOVF POSTINC0+0, 0 MOVWF FARG_Lcd_I2C_Chr_out_char+0 CALL _Lcd_I2C_Chr+0, 0 ;Lcd_I2C_Lib.c,208 :: col++; INCF FARG_Lcd_I2C_Out_col+0, 1 ;Lcd_I2C_Lib.c,209 :: text++; INFSNZ FARG_Lcd_I2C_Out_text+0, 1 INCF FARG_Lcd_I2C_Out_text+1, 1 ;Lcd_I2C_Lib.c,210 :: } GOTO L_Lcd_I2C_Out20 L_Lcd_I2C_Out21: ;Lcd_I2C_Lib.c,211 :: }//Final do Lcd_I2C_Out L_end_Lcd_I2C_Out: RETURN 0 ; end of _Lcd_I2C_Out
dos/DosGetMachineMode.asm
osfree-project/FamilyAPI
1
162740
<reponame>osfree-project/FamilyAPI<gh_stars>1-10 ;/*! ; @file ; ; @ingroup fapi ; ; @brief DosGetMachineMode DOS wrapper ; ; @param MACHINEMODE pointer to BYTE, which will contain mode ; ; @return NO_ERROR ; ; (c) osFree Project 2018, <http://www.osFree.org> ; for licence see licence.txt in root directory, or project website ; ; This is Family API implementation for DOS, used with BIND tools ; to link required API ; ; @author <NAME> (<EMAIL>) ; ;*/ .8086 ; Helpers INCLUDE helpers.inc _TEXT SEGMENT BYTE PUBLIC 'CODE' USE16 @PROLOG DOSGETMACHINEMODE MACHINEMODE DD ? ; Pointer to byte @START DOSGETMACHINEMODE XOR AX, AX LES DI,[DS:BP].ARGS.MACHINEMODE STOSB @EPILOG DOSGETMACHINEMODE _TEXT ENDS END
danagy/mcmpa.asm
DW0RKiN/Floating-point-Library-for-Z80
12
83229
if not defined MCMPA ; Warning: must be included before first use! ; Compare two numbers in absolute value. ; Input: reg1_hi, reg1_lo, reg2_hi, reg2_lo ; Output: set flags for abs(reg1)-abs(reg2) ; Pollutes: AF ; Use: MCMPA B,C,D,E ; flags for abs(BC)-abs(DE) MCMPA MACRO reg1_hi, reg1_lo, reg2_hi, reg2_lo if SIGN_BIT > 7 LD A, reg1_hi ; 1:4 XOR reg2_hi ; 1:4 AND SIGN_MASK ; 2:7 XOR reg1_hi ; 1:4 A = 2111 1111 SUB reg2_hi ; 1:4 if 0 JP nz, $+5 ; 3:10 else JR nz, $+4 ; 2:12/7 endif LD A, reg1_lo ; 1:4 else LD A, reg1_hi ; 1:4 SUB reg2_hi ; 1:4 if 0 JP nz, $+9 ; 3:10 else JR nz, $+8 ; 2:12/7 endif LD A, reg1_lo ; 1:4 XOR reg2_lo ; 1:4 AND SIGN_MASK ; 2:7 XOR reg1_lo ; 1:4 A = 2111 1111 endif SUB reg2_lo ; 1:4 ENDM endif
programs/oeis/319/A319390.asm
neoneye/loda
22
4263
<filename>programs/oeis/319/A319390.asm ; A319390: a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5), a(0)=1, a(1)=2, a(2)=3, a(3)=6, a(4)=8. ; 1,2,3,6,8,13,16,23,27,36,41,52,58,71,78,93,101,118,127,146,156,177,188,211,223,248,261,288,302,331,346,377,393,426,443,478,496,533,552,591,611,652,673,716,738,783,806,853,877,926,951,1002,1028,1081,1108,1163,1191,1248,1277,1336,1366,1427,1458,1521,1553,1618,1651,1718,1752,1821,1856,1927,1963,2036,2073,2148,2186,2263,2302,2381,2421,2502,2543,2626,2668,2753,2796,2883,2927,3016,3061,3152,3198,3291,3338,3433,3481,3578,3627,3726 add $0,1 mul $0,3 div $0,2 bin $0,2 div $0,3 add $0,1
zos/old/disk.asm
zzh8829/OSPP
0
242561
<filename>zos/old/disk.asm ; load dh sectors to es:bx from drive dl loadDisk: push dx mov ah, 0x02 mov al, dh mov ch, 0x00 mov dh, 0x00 mov cl, 0x2 int 0x13 jc loadDiskError pop dx cmp dh,al jne loadDiskError ret ; Error loadDiskError: mov si, MSG_DISK_LOAD_ERROR call printString16 jmp $ MSG_DISK_LOAD_ERROR db "Read disk Err",0 BOOT_DRIVE db 0
src/ado-drivers-dialects.ads
Letractively/ada-ado
0
16877
<reponame>Letractively/ada-ado ----------------------------------------------------------------------- -- ADO Dialects -- Driver support for basic SQL Generation -- Copyright (C) 2010, 2011, 2012 <NAME> -- Written by <NAME> (<EMAIL>) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Strings; -- The <b>ADO.Drivers.Dialects</b> package controls the database specific SQL dialects. package ADO.Drivers.Dialects is type Keyword_Array is array (Natural range <>) of Util.Strings.Name_Access; -- -------------------- -- SQL Dialect -- -------------------- -- The <b>Dialect</b> defines the specific characteristics that must be -- taken into account when building the SQL statement. This includes: -- <ul> -- <li>The definition of reserved keywords that must be escaped</li> -- <li>How to escape those keywords</li> -- <li>How to escape special characters</li> -- </ul> type Dialect is tagged private; type Dialect_Access is access all Dialect'Class; -- Check if the string is a reserved keyword. function Is_Reserved (D : Dialect; Name : String) return Boolean; -- Add a set of keywords to be escaped. procedure Add_Keywords (D : in out Dialect; Keywords : in Keyword_Array); -- Get the quote character to escape an identifier. function Get_Identifier_Quote (D : in Dialect) return Character; -- Append the item in the buffer escaping some characters if necessary. -- The default implementation only escapes the single quote ' by doubling them. procedure Escape_Sql (D : in Dialect; Buffer : in out Unbounded_String; Item : in String); -- Append the item in the buffer escaping some characters if necessary procedure Escape_Sql (D : in Dialect; Buffer : in out Unbounded_String; Item : in ADO.Blob_Ref); private type Dialect is tagged record Keywords : Util.Strings.String_Set.Set; end record; end ADO.Drivers.Dialects;
programs/oeis/171/A171442.asm
neoneye/loda
22
162768
; A171442: Expansion of (1+x)^7/(1-x). ; 1,8,29,64,99,120,127,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128 lpb $0 mov $2,7 bin $2,$0 sub $0,1 add $1,$2 lpe add $1,1 mov $0,$1
src/curve25519_add.ads
joffreyhuguet/curve25519-spark2014
4
8439
<filename>src/curve25519_add.ads with Big_Integers; use Big_Integers; with Types; use Types; with Conversion; use Conversion; package Curve25519_Add with SPARK_Mode is function Add (X, Y : Integer_255) return Integer_255 with Pre => All_In_Range (X, Y, Min_Add, Max_Add), Post => +Add'Result = (+X) + (+Y); end Curve25519_Add;
scripts/flux-hour.scpt
ramrom/rams_dot_files
2
4660
<reponame>ramrom/rams_dot_files<filename>scripts/flux-hour.scpt<gh_stars>1-10 #!/usr/bin/osascript -- see https://stackoverflow.com/questions/16492839/applescript-on-clicking-menu-bar-item-via-gui-script -- tell application "System Events" to tell process "Flux" */ -- tell menu bar item 1 of menu bar 2 */ -- click */ -- -- click menu item "for an hour" of menu "Disable" */ -- end tell */ -- end tell */ ignoring application responses tell application "System Events" to tell process "Flux" click menu bar item 1 of menu bar 2 end tell end ignoring do shell script "killall System\\ Events" delay 0.1 tell application "System Events" to tell process "Flux" tell menu bar item 1 of menu bar 2 click menu item "Disable for an hour" of menu 1 end tell end tell
oeis/213/A213667.asm
neoneye/loda-programs
11
86789
<gh_stars>10-100 ; A213667: Number of dominating subsets with k vertices in all the graphs G(n) (n>=1) obtained by taking n copies of the path P_3 and identifying one of their endpoints (a star with n branches of length 2). ; 1,6,16,40,98,238,576,1392,3362,8118,19600,47320,114242,275806,665856,1607520,3880898,9369318,22619536,54608392,131836322,318281038,768398400,1855077840,4478554082,10812186006,26102926096,63018038200,152139002498,367296043198,886731088896,2140758220992,5168247530882,12477253282758,30122754096400,72722761475560,175568277047522,423859315570606,1023286908188736,2470433131948080,5964153172084898,14398739476117878,34761632124320656,83922003724759192,202605639573839042,489133282872437278 seq $0,34182 ; Number of not-necessarily-symmetric n X 2 crossword puzzle grids. lpb $0 mul $0,2 sub $0,2 lpe add $0,1
src/index.agda
ice1k/Theorems
1
17497
<reponame>ice1k/Theorems<filename>src/index.agda module index where -- natural numbers --- additions import Nats.Add.Assoc using (nat-add-assoc) -- associative law import Nats.Add.Comm using (nat-add-comm) -- commutative law import Nats.Add.Invert using (nat-add-invert) -- a + a == b + b implies a == b using (nat-add-invert-1) -- a + 1 == b + 1 implies a == b --- multiplications import Nats.Multiply.Comm using (nat-multiply-comm) -- commutative law import Nats.Multiply.Distrib using (nat-multiply-distrib) -- distributive law import Nats.Multiply.Assoc using (nat-multiply-assoc) -- associative law -- integers --- some properties import Ints.Properties using (eq-int-to-nat) -- for natrual number a, + a == + a implis a == a using (eq-neg-int-to-nat) -- for natrual number a, - a == - a implis a == a using (eq-nat-to-int) -- for natrual number a, a == a implis + a == + a using (eq-neg-nat-to-int) -- for natrual number a, a == a implis - a == - a --- additions import Ints.Add.Comm using (int-add-comm) -- commutative law import Ints.Add.Assoc using (int-add-assoc) -- associative law import Ints.Add.Invert using (int-add-invert) -- a + a == b + b implis a == b -- non-negative rationals --- some properties import Rationals.Properties -- if b is not zero, n times b div b is the original number using (times-div-id) -- additions import Rationals.Add.Comm using (rational-add-comm) -- commutative law import Rationals.Add.Assoc using (rational-add-assoc) -- associative law -- multiplications import Rationals.Multiply.Comm using (rational-multiply-comm) -- commutative law -- logics --- the "and" relations import Logics.And using (and-comm) -- commutative law using (and-assoc) -- associative law --- the "or" relations import Logics.Or using (or-comm) -- commutative law using (or-assoc) -- associative law using (or-elim) -- elimination rule --- negations import Logics.Not -- law that negative twice will make a positive using (not-not) using (contrapositive) -- contrapositive -- vectors --- reverse twice gives the original vector import Vecs.Reverse using (vec-rev-rev-id) -- lists --- reverse twice gives the original vector import Lists.Reverse using (list-rev-rev-id) -- isomorphisms --- natrual numbers and others import Isos.NatLike using (iso-nat-vec) -- with vector using (iso-nat-list) -- with list --- trees import Isos.TreeLike using (iso-seven-tree-in-one) -- seven trees in one -- groups --- s3 group, xxx=e, yy=e, yx=xxy import Groups.Symm.S3 using (s3-property-1) -- given s3, prove xyx≡y
maps/PewterCity.asm
Trap-Master/spacworld97-thingy
0
29257
object_const_def ; object_event constants const PEWTERCITY_COOLTRAINER_F const PEWTERCITY_BUG_CATCHER const PEWTERCITY_GRAMPS const PEWTERCITY_FRUIT_TREE1 const PEWTERCITY_FRUIT_TREE2 PewterCity_MapScripts: db 0 ; scene scripts db 1 ; callbacks callback MAPCALLBACK_NEWMAP, .FlyPoint .FlyPoint: setflag ENGINE_FLYPOINT_PEWTER return PewterCityCooltrainerFScript: jumptextfaceplayer PewterCityCooltrainerFText PewterCityBugCatcherScript: jumptextfaceplayer PewterCityBugCatcherText PewterCityGrampsScript: faceplayer opentext checkevent EVENT_GOT_SILVER_WING iftrue .GotSilverWing writetext PewterCityGrampsText buttonsound verbosegiveitem SILVER_WING setevent EVENT_GOT_SILVER_WING closetext end .GotSilverWing: writetext PewterCityGrampsText_GotSilverWing waitbutton closetext end PewterCitySign: jumptext PewterCitySignText PewterGymSign: jumptext PewterGymSignText PewterMuseumSign: jumptext PewterMuseumSignText PewterCityMtMoonGiftShopSign: jumptext PewterCityMtMoonGiftShopSignText PewterCityWelcomeSign: jumptext PewterCityWelcomeSignText PewterCityPokecenterSign: jumpstd pokecentersign PewterCityMartSign: jumpstd martsign PewterCityFruitTree1: fruittree FRUITTREE_PEWTER_CITY_1 PewterCityFruitTree2: fruittree FRUITTREE_PEWTER_CITY_2 PewterCityCooltrainerFText: text "Have you visited" line "PEWTER GYM?" para "The LEADER uses" line "rock-type #MON." done PewterCityBugCatcherText: text "At night, CLEFAIRY" line "come out to play" cont "at MT.MOON." para "But not every" line "night." done PewterCityGrampsText: text "Ah, you came all" line "the way out here" cont "from JOHTO?" para "That brings back" line "memories. When I" para "was young, I went" line "to JOHTO to train." para "You remind me so" line "much of what I was" para "like as a young" line "man." para "Here. I want you" line "to have this item" cont "I found in JOHTO." done PewterCityGrampsText_GotSilverWing: text "Going to new, un-" line "known places and" cont "seeing new people…" para "Those are the joys" line "of travel." done PewterCitySignText: text "PEWTER CITY" line "A Stone Gray City" done PewterGymSignText: text "PEWTER CITY" line "#MON GYM" cont "LEADER: BROCK" para "The Rock Solid" line "#MON Trainer" done PewterMuseumSignText: text "There's a notice" line "here…" para "PEWTER MUSEUM OF" line "SCIENCE is closed" cont "for renovations…" done PewterCityMtMoonGiftShopSignText: text "There's a notice" line "here…" para "MT.MOON GIFT SHOP" line "NOW OPEN!" done PewterCityWelcomeSignText: text "WELCOME TO" line "PEWTER CITY!" done PewterCity_MapEvents: db 0, 0 ; filler db 9 ; warp events warp_event 27, 11, PEWTER_NIDORAN_SPEECH_HOUSE, 1 warp_event 14, 13, PEWTER_GYM, 1 warp_event 23, 17, PEWTER_MART, 2 warp_event 15, 25, PEWTER_POKECENTER_1F, 1 warp_event 7, 29, PEWTER_SNOOZE_SPEECH_HOUSE, 1 warp_event 18, 33, ROUTE_2, 8 warp_event 19, 33, ROUTE_2, 8 warp_event 35, 17, ROUTE_3, 2 warp_event 35, 18, ROUTE_3, 2 db 0 ; coord events db 7 ; bg events bg_event 25, 22, BGEVENT_READ, PewterCitySign bg_event 12, 13, BGEVENT_READ, PewterGymSign bg_event 9, 4, BGEVENT_READ, PewterMuseumSign bg_event 33, 17, BGEVENT_READ, PewterCityMtMoonGiftShopSign bg_event 13, 29, BGEVENT_READ, PewterCityWelcomeSign bg_event 16, 25, BGEVENT_READ, PewterCityPokecenterSign bg_event 24, 17, BGEVENT_READ, PewterCityMartSign db 5 ; object events object_event 20, 11, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, PewterCityCooltrainerFScript, -1 object_event 17, 28, SPRITE_BUG_CATCHER, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, PewterCityBugCatcherScript, -1 object_event 29, 17, SPRITE_GRAMPS, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, PewterCityGrampsScript, -1 object_event 32, 3, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PewterCityFruitTree1, -1 object_event 30, 3, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PewterCityFruitTree2, -1
alloy4fun_models/trashltl/models/10/DSy5TznP8oGQnHgzJ.als
Kaixi26/org.alloytools.alloy
0
2248
open main pred idDSy5TznP8oGQnHgzJ_prop11 { all f : File | f not in Protected and after f in Protected } pred __repair { idDSy5TznP8oGQnHgzJ_prop11 } check __repair { idDSy5TznP8oGQnHgzJ_prop11 <=> prop11o }
wof/lcs/base/4BE.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
6
88338
copyright zengfr site:http://github.com/zengfr/romhack 001648 move.w A0, -(A4) [base+328] 00164A move.w A4, ($328,A5) [base+4BE] 0084C6 tst.b (A0) [base+4BE] 009240 tst.b (A1) [base+4BE] copyright zengfr site:http://github.com/zengfr/romhack
test/Succeed/Issue1726.agda
cruhland/agda
1,989
8308
<filename>test/Succeed/Issue1726.agda postulate U V W X Y Z : Set u : U v : V w : W x : X y : Y z : Z module Top (u : U) where module A (v : V) where module M (w : W) where module O (x : X) where postulate O : X postulate O : X module B (y : Y) where open A public module Test0 where module C = Top.B u y module D = C.M.O v w x O₁ : X O₁ = C.M.O v w O₂ : X O₂ = C.O v module Test1 where module C (i g n o r i n g m e : Z) = Top.B u y module D = C.M.O z z z z z z z z z z v w x O : X O = C.M.O z z z z z z z z z z v w module Test2 where module C (y : Y) = Top.B u y module D = C.M.O y v w x O : X O = C.M.O y v w module Test3 where module C (z : Z) = Top.B u y module D = C.M.O z v w x
transpiler/grammar/AuthnFlow.g4
jgomer2001/flowless
0
2598
<filename>transpiler/grammar/AuthnFlow.g4<gh_stars>0 grammar AuthnFlow; /* * Fix for Python-like indentation tokens. See https://github.com/yshavit/antlr-denter */ tokens { INDENT, DEDENT } @lexer::header { import com.yuvalshavit.antlr4.DenterHelper; } @lexer::members { private final DenterHelper denter = DenterHelper.builder() .nl(NL) .indent(AuthnFlowParser.INDENT) .dedent(AuthnFlowParser.DEDENT) .pullToken(AuthnFlowLexer.super::nextToken); @Override public Token nextToken() { return denter.nextToken(); } } NL: '\r'? '\n' [\t ]* ; /* * Parser Rules */ flow: header statement+ ; qname: ALPHANUM | DOTEXPR ; header: FLOWSTART WS qname WS? INDENT base inputs? DEDENT NL* ; // header always ends in a NL base: BASE WS STRING WS? NL; inputs: FLOWINPUTS (WS short_var)+ WS? NL ; short_var: ALPHANUM ; statement: flow_call | action_call | rrf_call | assignment | log | rfac | finish | ifelse | choice | loop ; preassign: variable WS? EQ WS? ; preassign_catch: variable? WS? '|' WS? short_var WS? EQ WS? ; variable: short_var | IDXEXPR | DOTEXPR | DOTIDXEXPR ; flow_call: preassign? FLOWCALL WS call (overrides | NL) ; overrides: INDENT OVERRIDE WS STRING (WS STRING)* WS? NL DEDENT ; //I don't get why the NL is needed above action_call: (preassign | preassign_catch)? ACTIONCALL WS call NL ; rrf_call: preassign? RRFCALL WS STRING (WS variable)? (WS BOOL)? WS? (statusr_block | NL) ; log: LOG argument+ WS? NL ; call: ('$' variable | call_subject) argument* WS? ; call_subject: qname ('#' ALPHANUM)? ; argument: WS simple_expr ; simple_expr: literal | variable | (MINUS variable) ; literal: BOOL | STRING | UINT | SINT | DECIMAL | NUL; expression: object_expr | array_expr | simple_expr ; array_expr: '[' WS? expression* (SPCOMMA expression)* WS? ']' ; object_expr: '{' WS? keypair* (SPCOMMA keypair)* WS? '}' ; assignment: preassign expression NL ; keypair: ALPHANUM WS? ':' WS? expression ; rfac: preassign? RFAC WS (STRING | variable) NL; finish: FINISH WS (BOOL | variable) WS? NL ; choice: MATCH WS simple_expr WS TO WS? INDENT option+ DEDENT elseblock? ; option: simple_expr WS? INDENT statement+ DEDENT ; ifelse: caseof INDENT statement+ DEDENT elseblock? ; caseof: WHEN WS boolean_expr boolean_op_expr* ; boolean_op_expr: NL* (AND | OR) WS? NL* boolean_expr ; boolean_expr: simple_expr WS IS WS (NOT WS)? simple_expr WS? ; elseblock: OTHERWISE WS? INDENT statement+ DEDENT ; loop: preassign? REPEAT WS (variable | UINT) WS MAXTIMES WS? INDENT statement+ quit_stmt? DEDENT ; quit_stmt: QUIT WS caseof NL elseblock? ; statusr_block: INDENT STATUS_REQ WS? INDENT statusr_allow statusr_reply statusr_until DEDENT DEDENT ; statusr_allow: ALLOW WS (variable | UINT) WS SECS WS? NL; statusr_reply: REPLY WS call NL ; statusr_until: UNTIL WS boolean_expr WS? NL; /* * Lexer Rules */ fragment DIGIT : [0-9] ; fragment CH : [a-zA-Z] ; fragment ALNUM : CH ('_' | CH | DIGIT)* ; fragment SPACES: [\t ]+ ; fragment COMMA: ',' ; COMMENT: '//' ~[\r\n]* -> skip ; FLOWSTART: 'Flow' ; BASE: 'Basepath' ; FLOWINPUTS: 'Inputs' ; LOG: 'Log' ; FLOWCALL: 'Trigger' ; ACTIONCALL: 'Call' ; RRFCALL: 'RRF' ; STATUS_REQ: 'Status requests' ; ALLOW: 'Allow for' ; REPLY: 'Reply' ; UNTIL: 'Until' ; OVERRIDE: 'Override templates' ; WHEN: 'When' ; OTHERWISE: 'Otherwise' ; REPEAT: 'Repeat' ; MATCH: 'Match' ; QUIT: 'Quit' ; FINISH: 'Finish' ; RFAC: 'RFAC' ; IS: 'is' ; NOT: 'not' ; AND: 'and' ; OR: 'or' ; SECS: 'seconds' ; TO: 'to' ; MAXTIMES: 'times max' ; EQ: '=' ; MINUS: '-' ; NUL: 'null' ; BOOL: 'false' | 'true' ; STRING: '"' [\u0009\u0020\u0021\u0023-\u007E\u0080-\u008C\u00A0-\uFFFF]* '"' ; //horizontal tab, space, exclamation mark, ASCII chars from hash(#) to tilde(~), plus other printable unicode chars UINT : DIGIT+ ; SINT : MINUS UINT ; DECIMAL: (SINT | UINT) '.' UINT ; ALPHANUM: ALNUM ; DOTEXPR: ALNUM ('.' ALNUM )+ ; IDXEXPR: ALNUM '[' UINT ']' ; DOTIDXEXPR: ALNUM ('[' UINT ']')? ('.' ALNUM ('[' UINT ']')? )+ ; SPCOMMA: SPACES? NL* COMMA SPACES? NL* ; WS: SPACES ; //Entails "spaces" (plural)
Chapter_7/Program 7.2/x86_64/Program_7.2_NASM.asm
chen150182055/Assembly
272
22806
; Program 7.2 ; SCAS - NASM (64-bit) ; Copyright (c) 2019 Hall & Slonka SECTION .data src: DB "Test sentence",0 lenSrc: EQU ($ - src) search: DB "s" SECTION .text global _main _main: xor rax, rax mov al, [rel search] lea rdi, [rel src] mov rcx, lenSrc cld repne scasb ; after SCAS, test for success jnz notfound ; found things jmp done notfound: ; non-found things done: mov rax, 60 xor rdi, rdi syscall
alloy4fun_models/trashltl/models/11/hh6wkq57tXxQqXrRF.als
Kaixi26/org.alloytools.alloy
0
4339
<gh_stars>0 open main pred idhh6wkq57tXxQqXrRF_prop12 { some t : Trash | after t not in Trash } pred __repair { idhh6wkq57tXxQqXrRF_prop12 } check __repair { idhh6wkq57tXxQqXrRF_prop12 <=> prop12o }
oeis/111/A111059.asm
neoneye/loda-programs
11
162697
<gh_stars>10-100 ; A111059: Product{k=1 to n} (A005117(k)), the product of the first n squarefree positive integers. ; Submitted by <NAME> ; 1,2,6,30,180,1260,12600,138600,1801800,25225200,378378000,6432426000,122216094000,2566537974000,56463835428000,1298668214844000,33765373585944000,979195833992376000,29375875019771280000,910652125612909680000,30051520145226019440000,1021751684937684660960000,35761308972818963133600000,1323168431994301635943200000,50280400415783462165841600000,1960935616215555024467822400000,80398360264837756003180718400000,3376731131123185752133590172800000,145199438638296987341744377430400000 mul $0,6 mov $1,1 mov $2,1 lpb $0 sub $0,6 seq $2,67535 ; Smallest squarefree number >= n. mul $1,$2 lpe mov $0,$1
source/nodes/program-nodes-subtype_declarations.adb
reznikmm/gela
0
26347
<filename>source/nodes/program-nodes-subtype_declarations.adb<gh_stars>0 -- SPDX-FileCopyrightText: 2019 <NAME> <<EMAIL>> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- package body Program.Nodes.Subtype_Declarations is function Create (Subtype_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Name : not null Program.Elements.Defining_Identifiers .Defining_Identifier_Access; Is_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Subtype_Indication : not null Program.Elements.Subtype_Indications .Subtype_Indication_Access; With_Token : Program.Lexical_Elements.Lexical_Element_Access; Aspects : Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access; Semicolon_Token : not null Program.Lexical_Elements .Lexical_Element_Access) return Subtype_Declaration is begin return Result : Subtype_Declaration := (Subtype_Token => Subtype_Token, Name => Name, Is_Token => Is_Token, Subtype_Indication => Subtype_Indication, With_Token => With_Token, Aspects => Aspects, Semicolon_Token => Semicolon_Token, Enclosing_Element => null) do Initialize (Result); end return; end Create; function Create (Name : not null Program.Elements.Defining_Identifiers .Defining_Identifier_Access; Subtype_Indication : not null Program.Elements.Subtype_Indications .Subtype_Indication_Access; Aspects : Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access; Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False) return Implicit_Subtype_Declaration is begin return Result : Implicit_Subtype_Declaration := (Name => Name, Subtype_Indication => Subtype_Indication, Aspects => Aspects, Is_Part_Of_Implicit => Is_Part_Of_Implicit, Is_Part_Of_Inherited => Is_Part_Of_Inherited, Is_Part_Of_Instance => Is_Part_Of_Instance, Enclosing_Element => null) do Initialize (Result); end return; end Create; overriding function Name (Self : Base_Subtype_Declaration) return not null Program.Elements.Defining_Identifiers .Defining_Identifier_Access is begin return Self.Name; end Name; overriding function Subtype_Indication (Self : Base_Subtype_Declaration) return not null Program.Elements.Subtype_Indications .Subtype_Indication_Access is begin return Self.Subtype_Indication; end Subtype_Indication; overriding function Aspects (Self : Base_Subtype_Declaration) return Program.Elements.Aspect_Specifications .Aspect_Specification_Vector_Access is begin return Self.Aspects; end Aspects; overriding function Subtype_Token (Self : Subtype_Declaration) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Subtype_Token; end Subtype_Token; overriding function Is_Token (Self : Subtype_Declaration) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Is_Token; end Is_Token; overriding function With_Token (Self : Subtype_Declaration) return Program.Lexical_Elements.Lexical_Element_Access is begin return Self.With_Token; end With_Token; overriding function Semicolon_Token (Self : Subtype_Declaration) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Semicolon_Token; end Semicolon_Token; overriding function Is_Part_Of_Implicit (Self : Implicit_Subtype_Declaration) return Boolean is begin return Self.Is_Part_Of_Implicit; end Is_Part_Of_Implicit; overriding function Is_Part_Of_Inherited (Self : Implicit_Subtype_Declaration) return Boolean is begin return Self.Is_Part_Of_Inherited; end Is_Part_Of_Inherited; overriding function Is_Part_Of_Instance (Self : Implicit_Subtype_Declaration) return Boolean is begin return Self.Is_Part_Of_Instance; end Is_Part_Of_Instance; procedure Initialize (Self : in out Base_Subtype_Declaration'Class) is begin Set_Enclosing_Element (Self.Name, Self'Unchecked_Access); Set_Enclosing_Element (Self.Subtype_Indication, Self'Unchecked_Access); for Item in Self.Aspects.Each_Element loop Set_Enclosing_Element (Item.Element, Self'Unchecked_Access); end loop; null; end Initialize; overriding function Is_Subtype_Declaration (Self : Base_Subtype_Declaration) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Subtype_Declaration; overriding function Is_Declaration (Self : Base_Subtype_Declaration) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Declaration; overriding procedure Visit (Self : not null access Base_Subtype_Declaration; Visitor : in out Program.Element_Visitors.Element_Visitor'Class) is begin Visitor.Subtype_Declaration (Self); end Visit; overriding function To_Subtype_Declaration_Text (Self : in out Subtype_Declaration) return Program.Elements.Subtype_Declarations .Subtype_Declaration_Text_Access is begin return Self'Unchecked_Access; end To_Subtype_Declaration_Text; overriding function To_Subtype_Declaration_Text (Self : in out Implicit_Subtype_Declaration) return Program.Elements.Subtype_Declarations .Subtype_Declaration_Text_Access is pragma Unreferenced (Self); begin return null; end To_Subtype_Declaration_Text; end Program.Nodes.Subtype_Declarations;
oeis/074/A074580.asm
neoneye/loda-programs
11
7955
<reponame>neoneye/loda-programs<gh_stars>10-100 ; A074580: a(n) = 7^n + 8^n + 9^n. ; Submitted by <NAME> ; 3,24,194,1584,13058,108624,911234,7703664,65588738,561991824,4843001474,41948320944,364990300418,3188510652624,27953062038914,245823065693424,2167728096132098,19161612027339024,169737447404391554,1506365800934221104,13390379229961387778,119200907032450419024,1062467699527032427394,9480602677351287663984,84680390791122721491458,757017988174473715380624,6772700824467978346914434,60633301004632852319942064,543150432677739343969787138,4868091107912730549010831824,43651637654792276047281420674 mov $3,$0 seq $0,74525 ; a(n) = 1^n + 8^n + 9^n. sub $0,1 mov $2,7 pow $2,$3 add $0,$2
8088/cga/artifact/artifact.asm
reenigne/reenigne
92
8138
<gh_stars>10-100 %include "../../defaults_bin.asm" ; Set graphics mode mov ax,6 int 0x10 mov al,0x1a mov dx,0x3d8 out dx,al mov al,0x0f mov dx,0x3d9 out dx,al ; Draw pattern in graphics memory mov ax,0xb800 mov es,ax screenLoop: mov di,0 cld rowLoop: mov cx,200 lineLoop: push cx mov al,0 mov cx,16 barLoop: push cx mov cx,5 rep stosb pop cx add al,0x11 loop barLoop add di,0x1fb0 cmp di,0x4000 jl oddLine sub di,0x3fb0 oddLine: pop cx loop lineLoop ; ; Set up CRTC registers ; mov dx,0x3d4 ; mov ax,0x1401 ; 1: horizontal displayed = 20 ; out dx,ax ; mov ax,0x0005 ; 5: Vertical total adjust = 8 ; out dx,ax mov dx,0x3da frameLoop: ; mov dl,0xd9 ; mov al,0xf ; out dx,al ; mov dl,0xd4 ; mov ax,0x2d02 ; out dx,ax ; mov dl,0xda waitForVerticalSync waitforNoVerticalSync ; waitForDisplayEnable ; waitForDisplayDisable ; waitForDisplayEnable ; mov dl,0xd4 ; 2 0 2 2 ; mov ax,0x0009 ; 9: lines per row = 1 ; 3 0 3 5 ; out dx,ax ; mov dl,0xda ; waitForDisplayDisable ; ; waitForDisplayEnable ; mov dl,0xd4 ; 2 0 2 2 ; mov ax,0x1300 ; 0: horizontal total = 20 ; 3 0 3 5 ; out dx,ax ; 1 2 3 8 ; mov ax,0x1902 ; 2: horizontal sync position = 25 ; 3 0 3 11 ; out dx,ax ; 1 2 3 14 ; times 13 nop ; 1 0 1 27 ; mov ax,0x2400 ; 0: horizontal total = 37 ; 3 0 3 30 ; out dx,ax ; 1 2 3 33 ; mov dl,0xda ; waitForDisplayDisable ; ; waitForDisplayEnable ; mov dl,0xd4 ; 2 0 2 2 ; mov ax,0x3800 ; 0: horizontal total = 57 ; 3 0 3 5 ; out dx,ax ; 1 2 3 8 ; mov ax,0x2d02 ; 2: horizontal sync position = 45 ; 3 0 3 11 ; out dx,ax ; 1 2 3 14 ; mov dl,0xda ; waitForDisplayDisable ; ; waitForDisplayEnable ; mov dl,0xd4 ; 2 0 2 2 ; mov ax,0x0109 ; 9: lines per row = 2 ; 3 0 3 5 ; out dx,ax ; mov dl,0xda ; waitForDisplayDisable ; mov dl,0xd4 ; mov ax,0x3700 ; out dx,ax ; mov ax,0x2e02 ; out dx,ax ; mov dl,0xda ; waitForDisplayDisable ; waitForDisplayEnable ; mov dl,0xd4 ; mov ax,0x3800 ; out dx,ax ; mov dl,0xda ; waitForDisplayDisable ; waitForDisplayEnable ; waitForDisplayDisable mov cx,16 mov bl,0 rowLoop2: push cx mov cx,12 lineLoop2: waitForDisplayEnable waitForDisplayDisable loop lineLoop2 inc bl mov al,bl dec dx out dx,al inc dx pop cx loop rowLoop2 jmp frameLoop ; ; Set up the 8259 PIC to read the IRR lines ; mov al,0x0a ; OCW3 - no bit 5 action, no poll command issued, act on bit 0, ; out 0x20,al ; read Interrupt Request Register ;keyboardRead: ; ; Loop until the IRR bit 1 (IRQ 1) is high ; in al,0x20 ; and al,2 ; jz keyboardRead ; ; Read the keyboard byte and store it ; in al,0x60 ;; mov bl,al ; ; Acknowledge the previous byte ; in al,0x61 ; or al,0x80 ; out 0x61,al ; and al,0x7f ; out 0x61,al jmp screenLoop
parsers/src/main/goslin/SumFormula.g4
lifs-tools/jg
4
4472
//////////////////////////////////////////////////////////////////////////////// // MIT License // // Copyright (c) the authors (listed in global LICENSE file) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. //////////////////////////////////////////////////////////////////////////////// //// This is a BNF grammer for lipid subspecies identifiers followed by //// <NAME> al. 2017, PLoS One, 12(11):e0188394. grammar SumFormula; /* first rule is always start rule */ molecule: molecule_rule EOF; molecule_rule: molecule_group; molecule_group: element_group | single_element | molecule_group molecule_group; element_group: element count; single_element: element; element: 'C' | 'H' | 'N' | 'O' | 'P' | 'S' | 'Br' | 'I' | 'F' | 'Cl' | 'As'; count: number | '-' number; number : digit | digit number; digit: '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
programs/oeis/074/A074501.asm
karttu/loda
1
5319
; A074501: a(n) = 1^n + 2^n + 5^n. ; 3,8,30,134,642,3158,15690,78254,390882,1953638,9766650,48830174,244144722,1220711318,6103532010,30517610894,152587956162,762939584198,3814697527770,19073486852414,95367432689202,476837160300278 mov $1,5 pow $1,$0 mov $2,2 pow $2,$0 add $1,$2 add $1,1
oeis/110/A110129.asm
neoneye/loda-programs
11
173181
<filename>oeis/110/A110129.asm ; A110129: Central coefficients of a scaled Legendre triangle. ; Submitted by <NAME> ; 1,2,22,504,16966,752800,41492284,2734083968,209681631814,18348172005888,1804161160185748,196945525458761728,23633625832975567644,3092337510752711057408,438161926888980929318584 mov $4,$0 add $0,2 lpb $0 sub $0,1 mov $2,$1 add $2,$0 sub $2,2 pow $2,$1 mov $3,$4 bin $3,$1 add $1,1 pow $3,2 mul $3,$2 add $3,$5 mul $5,$4 add $5,$3 lpe mov $0,$3
Cubical/Data/FinSet/Base.agda
howsiyu/cubical
0
12717
{- Definition of finite sets There are may different formulations of finite sets in constructive mathematics, and we will use Bishop finiteness as is usually called in the literature. -} {-# OPTIONS --safe #-} module Cubical.Data.FinSet.Base where open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Foundations.Structure open import Cubical.Foundations.Equiv renaming (_∙ₑ_ to _⋆_) open import Cubical.Foundations.Univalence open import Cubical.HITs.PropositionalTruncation as Prop open import Cubical.Data.Nat open import Cubical.Data.Fin renaming (Fin to Finℕ) hiding (isSetFin) open import Cubical.Data.SumFin open import Cubical.Data.Sigma private variable ℓ ℓ' ℓ'' : Level A : Type ℓ -- definition of (Bishop) finite sets -- this definition makes cardinality computation more efficient isFinSet : Type ℓ → Type ℓ isFinSet A = Σ[ n ∈ ℕ ] ∥ A ≃ Fin n ∥ isFinOrd : Type ℓ → Type ℓ isFinOrd A = Σ[ n ∈ ℕ ] A ≃ Fin n isFinOrd→isFinSet : isFinOrd A → isFinSet A isFinOrd→isFinSet (_ , p) = _ , ∣ p ∣ -- finite sets are sets isFinSet→isSet : isFinSet A → isSet A isFinSet→isSet p = rec isPropIsSet (λ e → isOfHLevelRespectEquiv 2 (invEquiv e) isSetFin) (p .snd) -- isFinSet is proposition isPropIsFinSet : isProp (isFinSet A) isPropIsFinSet p q = Σ≡PropEquiv (λ _ → isPropPropTrunc) .fst ( Prop.elim2 (λ _ _ → isSetℕ _ _) (λ p q → Fin-inj _ _ (ua (invEquiv (SumFin≃Fin _) ⋆ (invEquiv p) ⋆ q ⋆ SumFin≃Fin _))) (p .snd) (q .snd)) -- isFinOrd is Set -- ordering can be seen as extra structures over finite sets isSetIsFinOrd : isSet (isFinOrd A) isSetIsFinOrd = isOfHLevelΣ 2 isSetℕ (λ _ → isOfHLevel⁺≃ᵣ 1 isSetFin) -- alternative definition of isFinSet isFinSet' : Type ℓ → Type ℓ isFinSet' A = ∥ Σ[ n ∈ ℕ ] A ≃ Fin n ∥ isFinSet→isFinSet' : isFinSet A → isFinSet' A isFinSet→isFinSet' (_ , p) = Prop.rec isPropPropTrunc (λ p → ∣ _ , p ∣) p isFinSet'→isFinSet : isFinSet' A → isFinSet A isFinSet'→isFinSet = Prop.rec isPropIsFinSet (λ (n , p) → _ , ∣ p ∣ ) isFinSet≡isFinSet' : isFinSet A ≡ isFinSet' A isFinSet≡isFinSet' = hPropExt isPropIsFinSet isPropPropTrunc isFinSet→isFinSet' isFinSet'→isFinSet -- the type of finite sets/propositions FinSet : (ℓ : Level) → Type (ℓ-suc ℓ) FinSet ℓ = TypeWithStr _ isFinSet FinProp : (ℓ : Level) → Type (ℓ-suc ℓ) FinProp ℓ = Σ[ P ∈ FinSet ℓ ] isProp (P .fst) -- cardinality of finite sets card : FinSet ℓ → ℕ card X = X .snd .fst -- equality between finite sets/propositions FinSet≡ : (X Y : FinSet ℓ) → (X .fst ≡ Y .fst) ≃ (X ≡ Y) FinSet≡ _ _ = Σ≡PropEquiv (λ _ → isPropIsFinSet) FinProp≡ : (X Y : FinProp ℓ) → (X .fst .fst ≡ Y .fst .fst) ≃ (X ≡ Y) FinProp≡ X Y = compEquiv (FinSet≡ (X .fst) (Y .fst)) (Σ≡PropEquiv (λ _ → isPropIsProp)) -- hlevels of FinSet and FinProp isGroupoidFinSet : isGroupoid (FinSet ℓ) isGroupoidFinSet X Y = isOfHLevelRespectEquiv 2 (FinSet≡ X Y) (isOfHLevel≡ 2 (isFinSet→isSet (X .snd)) (isFinSet→isSet (Y .snd))) isSetFinProp : isSet (FinProp ℓ) isSetFinProp X Y = isOfHLevelRespectEquiv 1 (FinProp≡ X Y) (isOfHLevel≡ 1 (X .snd) (Y .snd))
lib/libc.asm
untoxa/RGBDK
1
164103
SECTION "LibC", ROM0 _printf:: ret