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
arch/ARM/Nordic/svd/nrf52/nrf_svd-spi.ads
rocher/Ada_Drivers_Library
192
26466
-- Copyright (c) 2010 - 2018, Nordic Semiconductor ASA -- -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without modification, -- are permitted provided that the following conditions are met: -- -- 1. Redistributions of source code must retain the above copyright notice, this -- list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form, except as embedded into a Nordic -- Semiconductor ASA integrated circuit in a product or a software update for -- such product, must reproduce the above copyright notice, this list of -- conditions and the following disclaimer in the documentation and/or other -- materials provided with the distribution. -- -- 3. Neither the name of Nordic Semiconductor ASA nor the names of its -- contributors may be used to endorse or promote products derived from this -- software without specific prior written permission. -- -- 4. This software, with or without modification, must only be used with a -- Nordic Semiconductor ASA integrated circuit. -- -- 5. Any software provided in binary form under this license must not be reverse -- engineered, decompiled, modified and/or disassembled. -- -- THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS -- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -- OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE -- DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA 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. -- -- This spec has been automatically generated from nrf52.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package NRF_SVD.SPI is pragma Preelaborate; --------------- -- Registers -- --------------- -- Write '1' to Enable interrupt for READY event type INTENSET_READY_Field is (-- Read: Disabled Disabled, -- Read: Enabled Enabled) with Size => 1; for INTENSET_READY_Field use (Disabled => 0, Enabled => 1); -- Write '1' to Enable interrupt for READY event type INTENSET_READY_Field_1 is (-- Reset value for the field Intenset_Ready_Field_Reset, -- Enable Set) with Size => 1; for INTENSET_READY_Field_1 use (Intenset_Ready_Field_Reset => 0, Set => 1); -- Enable interrupt type INTENSET_Register is record -- unspecified Reserved_0_1 : HAL.UInt2 := 16#0#; -- Write '1' to Enable interrupt for READY event READY : INTENSET_READY_Field_1 := Intenset_Ready_Field_Reset; -- unspecified Reserved_3_31 : HAL.UInt29 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for INTENSET_Register use record Reserved_0_1 at 0 range 0 .. 1; READY at 0 range 2 .. 2; Reserved_3_31 at 0 range 3 .. 31; end record; -- Write '1' to Disable interrupt for READY event type INTENCLR_READY_Field is (-- Read: Disabled Disabled, -- Read: Enabled Enabled) with Size => 1; for INTENCLR_READY_Field use (Disabled => 0, Enabled => 1); -- Write '1' to Disable interrupt for READY event type INTENCLR_READY_Field_1 is (-- Reset value for the field Intenclr_Ready_Field_Reset, -- Disable Clear) with Size => 1; for INTENCLR_READY_Field_1 use (Intenclr_Ready_Field_Reset => 0, Clear => 1); -- Disable interrupt type INTENCLR_Register is record -- unspecified Reserved_0_1 : HAL.UInt2 := 16#0#; -- Write '1' to Disable interrupt for READY event READY : INTENCLR_READY_Field_1 := Intenclr_Ready_Field_Reset; -- unspecified Reserved_3_31 : HAL.UInt29 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for INTENCLR_Register use record Reserved_0_1 at 0 range 0 .. 1; READY at 0 range 2 .. 2; Reserved_3_31 at 0 range 3 .. 31; end record; -- Enable or disable SPI type ENABLE_ENABLE_Field is (-- Disable SPI Disabled, -- Enable SPI Enabled) with Size => 4; for ENABLE_ENABLE_Field use (Disabled => 0, Enabled => 1); -- Enable SPI type ENABLE_Register is record -- Enable or disable SPI ENABLE : ENABLE_ENABLE_Field := NRF_SVD.SPI.Disabled; -- unspecified Reserved_4_31 : HAL.UInt28 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for ENABLE_Register use record ENABLE at 0 range 0 .. 3; Reserved_4_31 at 0 range 4 .. 31; end record; subtype RXD_RXD_Field is HAL.UInt8; -- RXD register type RXD_Register is record -- Read-only. *** Reading this field has side effects on other resources -- ***. RX data received. Double buffered RXD : RXD_RXD_Field; -- unspecified Reserved_8_31 : HAL.UInt24; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for RXD_Register use record RXD at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype TXD_TXD_Field is HAL.UInt8; -- TXD register type TXD_Register is record -- TX data to send. Double buffered TXD : TXD_TXD_Field := 16#0#; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TXD_Register use record TXD at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; -- Bit order type CONFIG_ORDER_Field is (-- Most significant bit shifted out first Msbfirst, -- Least significant bit shifted out first Lsbfirst) with Size => 1; for CONFIG_ORDER_Field use (Msbfirst => 0, Lsbfirst => 1); -- Serial clock (SCK) phase type CONFIG_CPHA_Field is (-- Sample on leading edge of clock, shift serial data on trailing edge Leading, -- Sample on trailing edge of clock, shift serial data on leading edge Trailing) with Size => 1; for CONFIG_CPHA_Field use (Leading => 0, Trailing => 1); -- Serial clock (SCK) polarity type CONFIG_CPOL_Field is (-- Active high Activehigh, -- Active low Activelow) with Size => 1; for CONFIG_CPOL_Field use (Activehigh => 0, Activelow => 1); -- Configuration register type CONFIG_Register is record -- Bit order ORDER : CONFIG_ORDER_Field := NRF_SVD.SPI.Msbfirst; -- Serial clock (SCK) phase CPHA : CONFIG_CPHA_Field := NRF_SVD.SPI.Leading; -- Serial clock (SCK) polarity CPOL : CONFIG_CPOL_Field := NRF_SVD.SPI.Activehigh; -- unspecified Reserved_3_31 : HAL.UInt29 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CONFIG_Register use record ORDER at 0 range 0 .. 0; CPHA at 0 range 1 .. 1; CPOL at 0 range 2 .. 2; Reserved_3_31 at 0 range 3 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Serial Peripheral Interface 0 type SPI_Peripheral is record -- TXD byte sent and RXD byte received EVENTS_READY : aliased HAL.UInt32; -- Enable interrupt INTENSET : aliased INTENSET_Register; -- Disable interrupt INTENCLR : aliased INTENCLR_Register; -- Enable SPI ENABLE : aliased ENABLE_Register; -- Pin select for SCK. PSELSCK : aliased HAL.UInt32; -- Pin select for MISO. PSELMISO : aliased HAL.UInt32; -- Pin select for MOSI. PSELMOSI : aliased HAL.UInt32; -- RXD register RXD : aliased RXD_Register; -- TXD register TXD : aliased TXD_Register; -- SPI frequency FREQUENCY : aliased HAL.UInt32; -- Configuration register CONFIG : aliased CONFIG_Register; end record with Volatile; for SPI_Peripheral use record EVENTS_READY at 16#108# range 0 .. 31; INTENSET at 16#304# range 0 .. 31; INTENCLR at 16#308# range 0 .. 31; ENABLE at 16#500# range 0 .. 31; PSELSCK at 16#508# range 0 .. 31; PSELMISO at 16#50C# range 0 .. 31; PSELMOSI at 16#510# range 0 .. 31; RXD at 16#518# range 0 .. 31; TXD at 16#51C# range 0 .. 31; FREQUENCY at 16#524# range 0 .. 31; CONFIG at 16#554# range 0 .. 31; end record; -- Serial Peripheral Interface 0 SPI0_Periph : aliased SPI_Peripheral with Import, Address => SPI0_Base; -- Serial Peripheral Interface 1 SPI1_Periph : aliased SPI_Peripheral with Import, Address => SPI1_Base; -- Serial Peripheral Interface 2 SPI2_Periph : aliased SPI_Peripheral with Import, Address => SPI2_Base; end NRF_SVD.SPI;
tarmi-symbols.adb
DerickEddington/tarmi
0
5479
-- TODO: Think about memory management issues w.r.t. strings -- and symbols used in the symbol table. What about string -- pointers given as arguments to Interned? -- Newly-allocated strings in other version of Interned? -- Newly-allocated symbols when a name not already -- interned? What is the portable semantics w.r.t. master -- completion and finalization and ownership? with Ada.Strings.Hash; package body Tarmi.Symbols is function Hash_String (Key : String_Type_A) return Hash_Type is begin return Ada.Strings.Hash (Key.all) ; end Hash_String ; function Keys_Equal (Left, Right : String_Type_A) return Boolean is begin return Left.all = Right.all ; end Keys_Equal ; function Interned (Name : String_Type_A) return Symbol is use type Hashed_Maps.Cursor ; C : Hashed_Maps.Cursor := Hashed_Maps.Find (Symbol_Table, Name) ; begin if C = Hashed_Maps.No_Element then declare S : Symbol := new Symbol_R'(Name'Length, Name.all) ; begin Hashed_Maps.Insert (Symbol_Table, Name, S) ; return S ; end ; else return Hashed_Maps.Element (C) ; end if ; -- TODO: Could this be faster by using 4-arg Hashed_Maps.Insert ? -- I think that would do only one hash, whereas now it's doing two. end Interned ; function Interned (Name : String_Type) return Symbol is S : String_Type_A := new String_Type'(Name) ; begin return Interned (S) ; end Interned ; --begin --Hashed_Maps.Reserve_Capacity (Symbol_Table, 1000) ; -- TODO: best size end Tarmi.Symbols ;
src/ili9341-hack.adb
Fabien-Chouteau/bb_pico_bsp
0
28307
with ILI9341_Regs; package body ILI9341.Hack is --------------------- -- Prepare_For_DMA -- --------------------- procedure Prepare_For_DMA (This : in out ILI9341_Device; X1 : Width; Y1 : Height; X2 : Width; Y2 : Height) is begin This.Set_Cursor_Position (X1, Y1, X2, Y2); This.Send_Command (ILI9341_Regs.ILI9341_GRAM); This.WRX.Set; This.Chip_Select_Low; end Prepare_For_DMA; ------------- -- End_DMA -- ------------- procedure End_DMA (This : in out ILI9341_Device) is begin This.Chip_Select_High; end End_DMA; end ILI9341.Hack;
Type/Identity/Heterogenous.agda
Lolirofle/stuff-in-agda
6
1209
<reponame>Lolirofle/stuff-in-agda module Type.Identity.Heterogenous where import Lvl open import Type data HId {β„“} : βˆ€{A : Type{β„“}}{B : Type{β„“}} β†’ A β†’ B β†’ Type{Lvl.𝐒(β„“)} where instance intro : βˆ€{T : Type{β„“}}{x : T} β†’ HId x x
programs/oeis/025/A025112.asm
karttu/loda
1
160767
; A025112: a(n) = s(1)s(n) + s(2)s(n-1) + ... + s(k)s(n-k+1), where k = floor(n/2), s = (odd natural numbers). ; 3,5,22,30,73,91,172,204,335,385,578,650,917,1015,1368,1496,1947,2109,2670,2870,3553,3795,4612,4900,5863,6201,7322,7714,9005,9455,10928,11440,13107,13685,15558,16206,18297,19019,21340,22140,24703,25585,28402,29370,32453 add $0,1 mul $0,2 add $0,1 cal $0,295317 ; Sum of the products of the smaller and larger parts of the partitions of n into two distinct parts with the smaller part odd. mov $1,$0
Transynther/x86/_processed/US/_st_sm_/i9-9900K_12_0xca.log_21829_1654.asm
ljhsiun2/medusa
9
175809
<filename>Transynther/x86/_processed/US/_st_sm_/i9-9900K_12_0xca.log_21829_1654.asm<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r12 push %r14 push %r8 push %rbx push %rcx push %rdi push %rsi lea addresses_normal_ht+0x1a81a, %rsi nop nop nop nop nop xor %r11, %r11 and $0xffffffffffffffc0, %rsi movntdqa (%rsi), %xmm6 vpextrq $1, %xmm6, %r10 nop nop nop nop nop cmp $10825, %r14 lea addresses_normal_ht+0x1612a, %r12 and %r14, %r14 mov $0x6162636465666768, %r11 movq %r11, %xmm7 vmovups %ymm7, (%r12) and %r12, %r12 lea addresses_WT_ht+0xd572, %r8 clflush (%r8) nop nop nop nop nop sub %rbx, %rbx and $0xffffffffffffffc0, %r8 vmovaps (%r8), %ymm4 vextracti128 $1, %ymm4, %xmm4 vpextrq $0, %xmm4, %r14 and %rsi, %rsi lea addresses_A_ht+0x150fa, %r12 nop sub $54149, %r14 mov $0x6162636465666768, %r10 movq %r10, (%r12) add %r11, %r11 lea addresses_D_ht+0x10d92, %rsi lea addresses_D_ht+0xc72, %rdi nop and %r14, %r14 mov $18, %rcx rep movsw add $9291, %r12 lea addresses_WC_ht+0xd6d2, %rsi lea addresses_normal_ht+0x49ea, %rdi dec %r8 mov $29, %rcx rep movsl nop nop nop sub $20277, %rcx lea addresses_normal_ht+0xa572, %rbx nop nop nop and %r10, %r10 mov (%rbx), %rdi nop nop cmp %r10, %r10 lea addresses_WC_ht+0x6d22, %rdi nop nop nop nop and $15857, %r11 movl $0x61626364, (%rdi) nop nop nop nop nop add %r11, %r11 lea addresses_WT_ht+0x1e496, %rsi lea addresses_WC_ht+0xa232, %rdi nop nop nop nop cmp $6058, %rbx mov $93, %rcx rep movsw nop nop nop nop add $33908, %r10 pop %rsi pop %rdi pop %rcx pop %rbx pop %r8 pop %r14 pop %r12 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r15 push %r8 push %r9 push %rcx push %rsi // Store mov $0xd0e, %r8 nop nop nop nop nop xor $4253, %r9 movw $0x5152, (%r8) nop nop nop inc %r11 // Store lea addresses_US+0x1fb72, %rcx nop nop nop nop xor $38751, %rsi movb $0x51, (%rcx) nop nop nop nop nop dec %r10 // Store mov $0x42a21a0000000ae2, %r10 nop cmp $6510, %r15 movb $0x51, (%r10) nop nop nop nop inc %r11 // Store lea addresses_A+0xa2b2, %r8 nop nop nop nop add $14200, %r15 movw $0x5152, (%r8) nop inc %r9 // Store lea addresses_US+0x12372, %r9 nop nop nop nop inc %r11 mov $0x5152535455565758, %r15 movq %r15, %xmm6 vmovaps %ymm6, (%r9) and $34803, %r11 // Store mov $0x70f0c30000000452, %r15 nop nop nop xor %rcx, %rcx movl $0x51525354, (%r15) nop nop nop cmp $26447, %r8 // Faulty Load lea addresses_US+0x12372, %r10 clflush (%r10) nop nop nop xor $7960, %rcx mov (%r10), %r15w lea oracles, %r9 and $0xff, %r15 shlq $12, %r15 mov (%r9,%r15,1), %r15 pop %rsi pop %rcx pop %r9 pop %r8 pop %r15 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_US', 'same': False, 'AVXalign': True, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_P', 'same': False, 'AVXalign': True, 'congruent': 1}} {'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_US', 'same': False, 'AVXalign': False, 'congruent': 8}} {'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_NC', 'same': False, 'AVXalign': False, 'congruent': 4}} {'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_A', 'same': False, 'AVXalign': False, 'congruent': 6}} {'OP': 'STOR', 'dst': {'size': 32, 'NT': True, 'type': 'addresses_US', 'same': True, 'AVXalign': True, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_NC', 'same': False, 'AVXalign': False, 'congruent': 5}} [Faulty Load] {'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_US', 'same': True, 'AVXalign': False, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'size': 16, 'NT': True, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 2}} {'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 2}} {'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': True, 'congruent': 9}} {'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 1}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_D_ht', 'congruent': 4}, 'dst': {'same': False, 'type': 'addresses_D_ht', 'congruent': 8}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 1}, 'dst': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 0}} {'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 9}} {'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 2}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 2}, 'dst': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 6}} {'58': 21829} 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 */
test/Succeed/Issue4122-match.agda
cruhland/agda
1,989
6745
{-# OPTIONS --prop #-} data _≑_ {X : Set} (a : X) : X β†’ Prop where refl : a ≑ a postulate A : Set P : Prop p : P u : P β†’ A f : {x : A} (q : u p ≑ x) β†’ P f refl = p -- works in 2.6.0.1
libsrc/stdio/ansi/spectrum/f_ansi_scrollup.asm
jpoikela/z88dk
640
241598
; ; Spectrum C Library ; ; ANSI Video handling for ZX Spectrum ; ; Handles colors referring to current PAPER/INK/etc. settings ; ; Scrollup ; ; ; $Id: f_ansi_scrollup.asm $ ; SECTION code_clib PUBLIC ansi_SCROLLUP EXTERN generic_console_scrollup .ansi_SCROLLUP jp generic_console_scrollup
exercises/fasl6soal11.asm
amirshnll/assembly-exercises
4
243949
<filename>exercises/fasl6soal11.asm ; multi-segment executable file template. data segment ; add your data here! pkey db 10, 13, "press any key...$" message db 10, 13, "Result : $" string db 300 dup("$") ends stack segment dw 128 dup(0) ends code segment start: ; set segment registers: mov ax, data mov ds, ax mov es, ax ; add your code here mov cx,1 mov si,0 for1: cmp cx, 300 jg endfor1 mov ah, 1h int 21h cmp al, 13 je endfor1 cmp al, 122 jg continue cmp al, 97 jge writing cmp al, 90 jg continue cmp al, 65 jge writing jmp continue writing: mov string[si], al inc si inc cx continue: jmp for1 endfor1: lea dx, message mov ah, 9 int 21h lea dx, string mov ah, 9 int 21h lea dx, pkey mov ah, 9 int 21h ; output string at ds:dx ; wait for any key.... mov ah, 1 int 21h mov ax, 4c00h ; exit to operating system. int 21h ends end start ; set entry point and stop the assembler.
programs/oeis/109/A109255.asm
neoneye/loda
22
90794
; A109255: a(n) = (p^2 - 1) / 12, where p is the n-th prime of the form 4*k+1. ; 2,14,24,70,114,140,234,310,444,660,784,850,990,1064,1564,1850,2054,2494,2730,3104,3234,4370,4524,4840,5504,6030,6394,6580,7154,8164,8374,9464,10150,10384,11594,12610,13134,13400,13940,14770,15624,16800,17404,17710,21590,22620,24390,25854,26980,27744,29304,30100,31314,31724,34240,35534,36410,37744,38194,40950,41890,44774,47754,48260,49280,49794,52934,54540,56170,57270,60634,61204,64094,64680,71920,73164,73790,75684,79544,82834,84840,85514,86870,88924,91700,93810,95230,99554,100284,102490,103974,106220,110784,116230,118604,120200,122614,123424,125870,127514 seq $0,119681 ; Odd numbers n such that 2n-1 is prime. bin $0,2 mul $0,2 div $0,6 mul $0,2
tools-src/gnu/gcc/gcc/config/mips/crti.asm
enfoTek/tomato.linksys.e2000.nvram-mod
105
241549
<gh_stars>100-1000 /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ .section .init,"ax",@progbits .globl _init .type _init,@function _init: #ifdef __mips64 daddu $sp,$sp,-48 sd $31,40($sp) #else addu $sp,$sp,-32 sw $31,20($sp) #endif .section .fini,"ax",@progbits .globl _fini .type _fini,@function _fini: #ifdef __mips64 daddu $sp,$sp,-48 sd $31,40($sp) #else addu $sp,$sp,-32 sw $31,20($sp) #endif
libpok/ada/arinc653/apex-health_monitoring.ads
BaldLee/pok
73
20356
<filename>libpok/ada/arinc653/apex-health_monitoring.ads -- POK header -- -- The following file is a part of the POK project. Any modification should -- be made according to the POK licence. You CANNOT use this file or a part -- of a file for your own project. -- -- For more information on the POK licence, please see our LICENCE FILE -- -- Please follow the coding guidelines described in doc/CODING_GUIDELINES -- -- Copyright (c) 2007-2021 POK team -- --------------------------------------------------------------------------- -- -- -- ERROR constant and type definitions and management services -- -- -- -- --------------------------------------------------------------------------- with APEX.Processes; package APEX.Health_Monitoring is Max_Error_Message_Size : constant := 64; subtype Error_Message_Size_Type is APEX_Integer range 1 .. Max_Error_Message_Size; type Error_Message_Type is array (Error_Message_Size_Type) of APEX_Byte; type Error_Code_Type is ( Deadline_Missed, Application_Error, Numeric_Error, Illegal_Request, Stack_Overflow, Memory_Violation, Hardware_Fault, Power_Fail); type Error_Status_Type is record Error_Code : Error_Code_Type; Length : Error_Message_Size_Type; Failed_Process_Id : APEX.Processes.Process_Id_Type; Failed_Address : System_Address_Type; Message : Error_Message_Type; end record; procedure Report_Application_Message (Message_Addr : in Message_Addr_Type; Length : in Message_Size_Type; Return_Code : out Return_Code_Type); procedure Create_Error_Handler (Entry_Point : in System_Address_Type; Stack_Size : in APEX.Processes.Stack_Size_Type; Return_Code : out Return_Code_Type); procedure Get_Error_Status (Error_Status : out Error_Status_Type; Return_Code : out Return_Code_Type); procedure Raise_Application_Error (Error_Code : in Error_Code_Type; Message_Addr : in Message_Addr_Type; Length : in Error_Message_Size_Type; Return_Code : out Return_Code_Type); private pragma Convention (C, Error_Code_Type); pragma Convention (C, Error_Status_Type); end APEX.Health_Monitoring;
libsrc/input/srr/in_KeyPressed.asm
jpoikela/z88dk
640
4565
; uint in_KeyPressed(uint scancode) SECTION code_clib PUBLIC in_KeyPressed PUBLIC _in_KeyPressed ; Determines if a key is pressed using the scan code ; returned by in_LookupKey. ; enter : l = scan row ; h = key mask ; exit : carry = key is pressed & HL = 1 ; no carry = key not pressed & HL = 0 ; used : AF,BC,HL .in_KeyPressed ._in_KeyPressed ld a,0 out (254),a in a,(254) ld c,@00010100 bit 6,l jr z,no_control bit 2,a jr nz,fail res 2,c no_control: bit 7,l jr z,no_shift bit 4,a jr nz, fail res 4,c no_shift: cpl ; Any erroneous modifiers pressed? and c jr nz,fail ld a,l and @00011111 out (254),a in a,(254) cpl and h jr z,fail ld hl,1 scf ret fail: ld hl,0 and a ret
sources/jupyter/jupyter-start_kernel.ads
reznikmm/jupyter
4
8359
-- SPDX-FileCopyrightText: 2020 <NAME> <<EMAIL>> -- -- SPDX-License-Identifier: MIT ---------------------------------------------------------------- with League.Strings; with Jupyter.Kernels; procedure Jupyter.Start_Kernel (Kernel : in out Jupyter.Kernels.Kernel'Class; File : League.Strings.Universal_String);
misc/cpcacid_src/cpcacid_cpctest.asm
floooh/yakc
106
20656
;; (c) Copyright <NAME> 2015-2016 ;; This code is part of the Arnold emulator distribution. ;; This code is free to distribute without modification ;; this copyright header must be retained. include "../lib/testdef.asm" ;; cpc tester org &8000 start: ;;raster int test needed ld a,2 call &bc0e ld ix,tests call run_tests ret tests: DEFINE_TEST "CPC MRER mode and rom register (bit 5=0)",cpc_mode_setl DEFINE_TEST "CPC MRER mode and rom register (bit 5=1)",cpc_mode_setl2 ;; type 4: 0 for all DEFINE_TEST "CPC int (HSYNC pos)", cpc_hspos_rint ;; type 1 fails with 0 for all . type 4 0 for all DEFINE_TEST "CPC int (HSYNC width)", cpc_hswid_rint ;; fix for type 2 ;;DEFINE_TEST "int in vsync test (50hz, 60hz, delayed)",vsync_int_test ;; DEFINE_TEST "GA I/O decode test",ga_io_decode DEFINE_END_TEST cpc_hspos_rint: di call store_int ld hl,&c9fb ld (&0038),hl ld bc,&bc03 out (c),c ld bc,&bd00+&08 out (c),c ld hl,hspos_jp ld b,64-8-1 ld de,dmh_jp_end-64-8-8-8-8-4 chr1: ld (hl),e inc hl ld (hl),d inc hl inc de djnz chr1 ld ix,result_buffer ld hl,hspos_jp ld b,64-8-1 xor a chpr: push bc push af push hl ld bc,&bc02 out (c),c inc b out (c),a call do_hsync_measure ld a,d and &1 ld (ix+0),a ld (ix+1),1 ld a,e and &1 ld (ix+2),a ld (ix+3),0 inc ix inc ix inc ix inc ix pop hl inc hl inc hl pop af inc a pop bc dec b jp nz,chpr call crtc_reset call restore_int ei ld ix,result_buffer ld bc,256*2 call simple_results ret do_hsync_measure: ld e,(hl) inc hl ld d,(hl) ld (dhm_jp+1),de ei ;; wait for stabalisation call vsync_sync call vsync_sync call vsync_sync call vsync_sync ;; wait for start call wait_vsync_start ;; int within vsync halt ;; 2 hsync from start of vsync (in theory) di ;; wait some lines ld a,16-3 call wait_x_lines ;; vsync ld b,&f5 dhm_jp: jp dmh_jp_end defs 64*6 dmh_jp_end: in d,(c) in e,(c) ret hspos_jp: defs 64*2 cpc_hswid_rint: di call store_int ld hl,&c9fb ld (&0038),hl ld bc,&bc02 out (c),c ld bc,&bd00+46 out (c),c ld hl,hsw_jp ld ix,result_buffer ld b,15 ld a,1 chwr: push bc push af push hl ld bc,&bc03 out (c),c inc b out (c),a call do_hsync_measure ld a,d and &1 ld (ix+0),a ld (ix+1),1 ld a,e and &1 ld (ix+2),a ld (ix+3),0 inc ix inc ix inc ix inc ix pop hl inc hl inc hl pop af inc a pop bc dec b jp nz,chwr call crtc_reset call restore_int ei ld ix,result_buffer ld bc,15*2 call simple_results ret ;; first at 46 ;; second at 64+46. ;; 64+46+0+1+2+3 ;; 64+46+1+1+2+3 ;; 16 is max but closest to in hsw_jp: defw dmh_jp_end-46-16 defw dmh_jp_end-46-15 defw dmh_jp_end-46-14 defw dmh_jp_end-46-13 defw dmh_jp_end-46-12 defw dmh_jp_end-46-11 defw dmh_jp_end-46-10 defw dmh_jp_end-46-9 defw dmh_jp_end-46-8 defw dmh_jp_end-46-7 defw dmh_jp_end-46-6 defw dmh_jp_end-46-5 defw dmh_jp_end-46-4 defw dmh_jp_end-46-3 defw dmh_jp_end-46-2 defw dmh_jp_end-46-1 ;;------------------------ vsync_int_test: ld ix,result_buffer call store_int di ld a,&c3 ld hl,int_vsync_test ld (&0038),a ld (&0039),hl ei ld hl,crtc_50hz call set_crtc ;; check there is an int in vsync call wait_vsync_start call wait_vsync_end call wait_vsync_start call wait_vsync_end call wait_vsync_start call wait_vsync_end call wait_vsync_start call wait_vsync_end di xor a ld (seen_int_vsync),a ei call wait_vsync_start call wait_vsync_end di ld a,(seen_int_vsync) ld (ix+0),a inc ix ld (ix+0),1 inc ix ld hl,crtc_60hz call set_crtc ;; check there is an int in vsync call wait_vsync_start call wait_vsync_end call wait_vsync_start call wait_vsync_end call wait_vsync_start call wait_vsync_end call wait_vsync_start call wait_vsync_end di xor a ld (seen_int_vsync),a call wait_vsync_start call wait_vsync_end di ld a,(seen_int_vsync) ld (ix+0),a inc ix ld (ix+0),0 inc ix ld hl,crtc_50hz call set_crtc ld e,16 wvi: ei ;; wait for a few vsync to stabalise it call wait_vsync_start call wait_vsync_end call wait_vsync_start call wait_vsync_end call wait_vsync_start call wait_vsync_end call wait_vsync_start call wait_vsync_end ;; now do the delay call wait_vsync_start ;; halt after vsync halt ;; +2 halt ;; +54 halt ;; +106 halt ;; +158 halt ;; +210 halt ;; +262 di ld a,32 call wait_x_lines xor a ld (seen_int_vsync),a ei call wait_vsync_start call wait_vsync_end di ld a,(seen_int_vsync) ld (ix+0),a inc ix ld (ix+0),0 inc ix dec e jp nz,wvi call restore_int ei ld ix,result_buffer ld bc,16 call simple_results ret int_vsync_test: push af push bc ld b,&f5 in a,(c) rra jr nc,ivt ld a,1 ld (seen_int_vsync),a ivt: pop bc pop af ei ret seen_int_vsync: defb 0 ga_io_decode: ld de,&c000 ld hl,&7fff ld ix,ga_io_decode_action ld iy,ga_io_decode_init jp io_decode ga_io_decode_init: ld bc,&df00 out (c),c ld bc,&7f00+%10000010 out (c),c ld a,(&1000) ld (val_1000+1),a ld a,(&d000) ld (val_d000+1),a ret ga_io_decode_action: ld a,%10000010 out (c),a push bc ld bc,&df00 out (c),c pop bc ld a,(&1000) val_1000: cp 0 ret nz ld a,(&d000) val_d000: cp 0 ret nz ret ga_io_restore_extra: ret cpc_mode_setl: ld d,%00000000 ld e,0 jp cpc_mode_set cpc_mode_setl2: ld d,%00100000 ld e,0 jp cpc_mode_set lower_byte: defb 0 upper_byte: defb 0 setup: ld bc,&7f00+%10000000 out (c),c ld bc,&df00 out (c),c ld a,(&1000) ld (lower_byte),a ld a,(&d000) ld (upper_byte),a ld bc,&7f00+%10001100 out (c),c ret cpc_mode_set: di call setup ld ix,result_buffer ld bc,&7fc0 out (c),c ld hl,&d000 ld (hl),&33 ld hl,&1000 ld (hl),&11 ld hl,&5000 ld (hl),&22 ld bc,&7f00+%10001100 out (c),c ld bc,&df00 out (c),c ld b,&7f ld a,%10000000 or d out (c),a ld a,(&d000) ld (ix+0),a inc ix ld a,(upper_byte) ld (ix+0),a ;; rom at &d000 inc ix ld a,(&1000) ld (ix+0),a inc ix ld a,(lower_byte) ld (ix+0),a ;; rom at &1000 inc ix ld a,(&5000) ld (ix+0),a inc ix ld (ix+0),&22 ;; ram at &5000 inc ix ld bc,&7f00+%10001100 out (c),c ld bc,&df00 out (c),c ld b,&7f ld a,%10001100 or d out (c),a ld a,(&d000) ;; ram at &d000 ld (ix+0),a inc ix ld (ix+0),&33 inc ix ld a,(&1000) ;; ram at &1000 ld (ix+0),a inc ix ld (ix+0),&11 inc ix ld a,(&5000) ;; ram at &5000 ld (ix+0),a inc ix ld (ix+0),&22 inc ix ei ld ix,result_buffer ld bc,6 call simple_results ret ;;----------------------------------------------------- include "../lib/mem.asm" include "../lib/report.asm" include "../lib/test.asm" include "../lib/outputmsg.asm" include "../lib/outputhex.asm" include "../lib/output.asm" include "../lib/hw/psg.asm" ;; firmware based output include "../lib/fw/output.asm" include "../lib/int.asm" include "../lib/hw/crtc.asm" include "../lib/portdec.asm" include "../lib/hw/cpc.asm" result_buffer: equ $ end start
mac_os_scripts/external/change_background.scpt
initialed85/mac_os_scripts
32
3036
<reponame>initialed85/mac_os_scripts on run argv tell application "System Events" set monitors to a reference to every desktop set numMonitors to count (monitors) repeat with monitorIndex from 1 to numMonitors by 1 set picture of item monitorIndex of the monitors to "" & item 1 of argv & "" -- display 1 set picture of item monitorIndex of the monitors to "" & item 1 of argv & "" -- display 2 set picture of item monitorIndex of the monitors to "" & item 1 of argv & "" -- display 3 set picture of item monitorIndex of the monitors to "" & item 1 of argv & "" -- display 4 set picture of item monitorIndex of the monitors to "" & item 1 of argv & "" -- display 5 set picture of item monitorIndex of the monitors to "" & item 1 of argv & "" -- display 6 set picture of item monitorIndex of the monitors to "" & item 1 of argv & "" -- display 7 set picture of item monitorIndex of the monitors to "" & item 1 of argv & "" -- display 8 end repeat end tell end run
STLC/Syntax.agda
TrulyNonstrict/STLC
1
3372
{-# OPTIONS --safe #-} module STLC.Syntax where open import Data.Nat using (β„•; suc) open import Data.Fin using (Fin) renaming (zero to fzero; suc to fsuc) open import Relation.Binary.PropositionalEquality using (_≑_; refl) open import Relation.Nullary using (Dec; yes; no) private variable n : β„• data Type : Set where _β‡’_ : Type β†’ Type β†’ Type _Γ—'_ : Type β†’ Type β†’ Type unit : Type data Term : β„• β†’ Set where abs : Type β†’ Term (suc n) β†’ Term n app : Term n β†’ Term n β†’ Term n var : Fin n β†’ Term n ⋆ : Term n pair : Term n β†’ Term n β†’ Term n projβ‚— : Term n β†’ Term n projα΅£ : Term n β†’ Term n data Ctx : β„• β†’ Set where ● : Ctx 0 _,-_ : Ctx n β†’ Type β†’ Ctx (suc n) find : Ctx n β†’ Fin n β†’ Type find (Ξ“ ,- A) fzero = A find (Ξ“ ,- A) (fsuc n) = find Ξ“ n _=?=_ : (x : Type) β†’ (y : Type) β†’ Dec (x ≑ y) unit =?= unit = yes refl (a β‡’ b) =?= (c β‡’ d) with a =?= c | b =?= d ... | yes refl | yes refl = yes refl ... | yes refl | no ne = no Ξ» { refl β†’ ne refl } ... | no ne | _ = no Ξ» { refl β†’ ne refl } (a Γ—' b) =?= (c Γ—' d) with a =?= c | b =?= d ... | yes refl | yes refl = yes refl ... | yes refl | no ne = no Ξ» { refl β†’ ne refl } ... | no ne | _ = no Ξ» { refl β†’ ne refl } unit =?= (_ Γ—' _) = no Ξ» () unit =?= (_ β‡’ _) = no Ξ» () (_ Γ—' _) =?= unit = no Ξ» () (_ Γ—' _) =?= (_ β‡’ _) = no Ξ» () (_ β‡’ _) =?= unit = no Ξ» () (_ β‡’ _) =?= (_ Γ—' _) = no Ξ» ()
programs/oeis/070/A070628.asm
neoneye/loda
22
163570
; A070628: n^5 mod 45. ; 0,1,32,18,34,20,36,22,8,9,10,41,27,43,29,0,31,17,18,19,5,36,7,38,9,40,26,27,28,14,0,16,2,18,4,35,36,37,23,9,25,11,27,13,44,0,1,32,18,34,20,36,22,8,9,10,41,27,43,29,0,31,17,18,19,5,36,7,38,9,40,26,27,28,14,0 pow $0,5 mod $0,45
src/scroller.asm
onslaught-demogroup/ons_paddo_music_disk
0
171555
/* Scroller */ .var zp_1 = $ab .var zp_2 = $ac .var zp_3 = $ad .var zp_4 = $ae .var s_row = 16 .var s_font_page = $78 //stick font /* Scroll init */ s_init: lda #s_font_page jsr s_copy_character_rom !loop: .for(var i=0;i<8;i++){ lda (s_charmask + (i * 40)),x sta ($0400 + ((i + s_row) * 40)),x } inx cpx #$28 bne !loop- s_init_scrolltext: lda #>s_scrolltext sta zp_2 lda #<s_scrolltext sta zp_1 ldx #$00 rts /* Scroll IRQ call */ s_scroll: jsr s_blit lda s_current_char_counter bne !scroll_char+ jsr s_load_new_char cmp #$00 bne !load_char+ jsr s_init_scrolltext jsr s_load_new_char !load_char: jsr s_push_char_to_buffer !scroll_char: jsr s_setting_scroll_routine: s_render_char_slice rts s_switch_alt: lda #<s_render_char_slice_alt sta s_setting_scroll_routine lda #>s_render_char_slice_alt sta s_setting_scroll_routine + 1 rts s_switch_main: lda #<s_render_char_slice sta s_setting_scroll_routine lda #>s_render_char_slice sta s_setting_scroll_routine + 1 rts // Scroll char and color ram s_blit: ldx #$00 !loop: .for(var i=0;i<8;i++){ lda ($d800 + ((i + s_row) * 40) + 1),x sta ($d800 + ((i + s_row) * 40)),x } inx cpx #$28 beq !done+ jmp !loop- !done: rts // Load New Char s_load_new_char: ldy #$00 lda (zp_1),y inc zp_1 bne !+ inc zp_2 !: rts // Push Char to the Buffer s_push_char_to_buffer: ldy #$00 sty OffsetHi clc asl rol OffsetHi asl rol OffsetHi asl rol OffsetHi sta zp_3 clc lda OffsetHi: #$00 adc #s_font_page sta zp_4 !loop: lda (zp_3),y sta s_current_char_buffer,y iny cpy #$08 bne !loop- rts //render slice to the screen and color RAM s_render_char_slice: ldx s_current_char_counter .for (var i=0;i<8;i++){ clc asl s_current_char_buffer + i bcs !draw+ lda s_colormask + (8 * i),x jmp !done+ !draw: lda #$02 !done: sta $d800 + $27 + ((i + s_row) * 40) } inc s_current_char_counter lda s_current_char_counter cmp #$07 bne !skip+ lda #$00 sta s_current_char_counter !skip: rts //render slice to the screen and color RAM s_render_char_slice_alt: ldx s_current_char_counter .for (var i=0;i<8;i++){ clc asl s_current_char_buffer + i bcs !draw+ lda s_colormask_alt + i jmp !done+ !draw: lda #$00 !done: sta $d800 + $27 + ((i + s_row) * 40) } inc s_current_char_counter lda s_current_char_counter cmp #$07 bne !skip+ lda #$00 sta s_current_char_counter !skip: rts /* a: page in RAM to copy char roms into */ s_copy_character_rom: sei sta zp_4 lda $01 sta s_target ldx #$04 lda #$33 sta $01 lda #$d8 sta zp_2 ldy #$00 sty zp_1 sty zp_3 !loop: lda (zp_1),y sta (zp_3),y iny bne !loop- inc zp_2 inc zp_4 dex bne !loop- lda s_target: #$36 sta $01 cli rts s_current_char_buffer: .fill $08, $00 s_current_char_counter: .byte $00 //these get rendered onto the screen - set up to suit style s_off_char: .byte $20 s_off_color: .byte $00 .align $100 s_charmask: .byte 213,242,219,192,192,219,242,201, 209,215,213,206,205,201,215,209, 078,206,205,206,205,206,205,077, 203,250,224,207,208,224,204,202, 213,242,219,192,192,219,242,201 .byte 168,235,203,213,201,202,243,169, 215,205,206,213,201,205,206,215, 206,205,206,205,206,205,206,205, 207,202,201,194,194,213,203,208, 168,235,203,213,201,202,243,169 .byte 235,203,213,241,241,201,202,243, 213,206,213,206,205,201,205,201, 205,206,213,206,205,201,205,206, 208,213,203,219,219,202,201,207, 235,203,213,241,241,201,202,243 .byte 161,213,203,206,205,202,201,161, 206,213,206,205,206,205,201,205, 206,205,206,206,205,205,206,205, 201,208,213,241,241,201,207,213, 161,213,203,206,205,202,201,161 .byte 186,202,201,205,206,213,203,186, 205,202,205,206,205,206,203,206, 205,206,205,205,206,206,205,206, 203,250,202,242,242,203,204,202, 186,202,201,205,206,213,203,186 .byte 235,201,202,242,242,203,213,243, 202,205,202,205,206,203,206,203, 206,205,202,205,206,203,206,205, 250,202,201,219,219,213,203,204, 235,201,202,242,242,203,213,243 .byte 168,235,201,202,203,213,243,169, 215,206,205,202,203,206,205,215, 205,206,205,206,205,206,205,206, 204,213,203,194,194,202,201,250, 168,235,201,202,203,213,243,169 .byte 202,241,219,192,192,219,241,203, 209,215,202,205,206,203,215,209, 077,205,206,205,206,205,206,078, 201,208,224,204,250,224,207,213, 202,241,219,192,192,219,241,203 s_colormask: .byte 07,07,15,15,03,03,13,13 .byte 13,07,07,15,15,03,03,13 .byte 13,13,07,07,15,15,03,03 .byte 03,13,13,07,07,15,15,03 .byte 03,03,13,13,07,07,15,15 .byte 15,03,03,13,13,07,07,15 .byte 15,15,03,03,13,13,07,07 .byte 07,15,15,03,03,13,13,07 s_colormask_alt: .byte 0,0,0,0,0,0,0,0 /* Variations of the scroller tile to test */ // .byte $0f,$07,$03,$0d,$0f,$07,$03,$0d // .byte $07,$03,$0d,$0f,$07,$03,$0d,$0f // .byte $03,$0d,$0f,$07,$03,$0d,$0f,$07 // .byte $0d,$0f,$07,$03,$0d,$0f,$07,$03 // .byte $0f,$07,$03,$0d,$0f,$07,$03,$0d // .byte $07,$03,$0d,$0f,$07,$03,$0d,$0f // .byte $03,$0d,$0f,$07,$03,$0d,$0f,$07 // .byte $0d,$0f,$07,$03,$0d,$0f,$07,$03 // .byte 15,15,15,15,15,15,15,15 // .byte 03,13,13,03,03,13,13,03 // .byte 03,13,03,07,07,03,13,03 // .byte 13,03,07,13,13,07,03,13 // .byte 13,03,07,13,13,07,03,13 // .byte 03,13,03,07,07,03,13,03 // .byte 03,13,13,03,03,13,13,03 // .byte 15,15,15,15,15,15,15,15 // .byte 15,15,15,15,15,15,15,15 // .byte 07,03,03,07,07,13,13,07 // .byte 03,03,03,03,03,13,13,03 // .byte 07,03,03,07,07,13,13,07 // .byte 07,03,03,07,07,13,13,07 // .byte 13,03,03,13,13,13,13,13 // .byte 07,03,03,07,07,13,13,07 // .byte 15,15,15,15,15,15,15,15 // .byte 15,15,15,15,15,15,15,15 // .byte 07,03,07,07,13,03,13,07 // .byte 07,13,07,13,03,07,03,13 // .byte 13,03,13,03,07,13,07,03 // .byte 13,03,13,03,07,13,07,03 // .byte 07,13,07,13,03,07,03,13 // .byte 07,03,07,07,13,03,13,07 // .byte 15,15,15,15,15,15,15,15 // .byte 15,15,15,15,15,15,15,15 // .byte 07,03,03,13,13,03,03,07 // .byte 03,07,03,13,13,03,07,03 // .byte 13,13,13,03,03,13,13,13 // .byte 13,13,13,03,03,13,13,13 // .byte 03,07,03,13,13,03,07,03 // .byte 07,03,03,13,13,03,03,07 // .byte 15,15,15,15,15,15,15,15 s_scrolltext: .text " Welcome to Patto's music collection... An absolutely insane pack featuring 100 sid covers, remixes and arcade quality conversions for your commodore 64." .text " Listen to tracks from Sonic the Hedgehog, Double Dragon, Strider, Golden Axe, Midnight Resistance and loads more. Enjoy the collection and do check out sidamp.com for the latest releases... and don't forget to vote!" .text " All music by Patto. Code by Ziggy. Graphics and disk cover by Lobo. Production and sexual favours by Jazzcat." .text " Greetings fly out to the organisers of SYNTAX, you guys always bring a great weekend of retro computing, modern-day coding, chip music, pixel graphics and diy electronics projects, keeping the aussie scene alive! " .text " We also salute those in 64ever, Abyss, Algotech, Angels, Arise, Army Of Darkness, Arsenic, Artline Designs, Atlantis, Beyond Force, Bonzai, Booze Design, Camelot, Censor, Chorus, Christopherjam, Chrome, Cosine, Crest, Cydonia, Cygnus Oz, Datadoor, Defame, Dekadence, Digital Access, Disaster Area, Elysium, Excess, Exclusive On, Extend, Fairlight, Finnish Gold, Focus, Genesis Project, Hack N' Trade, Hoaxers, Hokuto Force, Icon64, Laxity, Lepsi De, Level 64, Lft, Mahoney, Maniacs Of Noise, Mayday!, Mdg, Megastyle, Multistyle Labs, Nah-Kolor, No Name, Noice, Nostalgia, Offence, Origo, Oxyron, Padua, Panda Design, Plush, Priorart, Prosonix, Protovision, Psytronik, Pvm, Resource, Rgcd, Role, Samar, Shape, Singular, Starz, Success & TRC, Svenonacid, The Dreams, The Solution, Triad, Trsi, Udi, Unkle K, Vibrants, Vision, WoW, X-Ample And Xenon." .text " Make sure to get a carrier detect at one of our boards dzbbs.hopto.org, antidote.triad.se, reflections.servebbs.com (port 64128) or to check our other fine releases at onslaught.c64.org " .text " The collection awaits, Press SPACE and follow me down the PETSCII rabbithole... " .byte $00, $00
core/lib/groups/FreeAbelianGroup.agda
timjb/HoTT-Agda
0
1677
<reponame>timjb/HoTT-Agda<filename>core/lib/groups/FreeAbelianGroup.agda {-# OPTIONS --without-K --rewriting #-} open import lib.Basics open import lib.NType2 open import lib.types.Empty open import lib.types.Group open import lib.types.Int open import lib.types.List open import lib.types.Nat open import lib.types.Pi open import lib.types.SetQuotient open import lib.types.Sigma open import lib.types.Word open import lib.groups.GroupProduct open import lib.groups.Homomorphism open import lib.groups.Isomorphism module lib.groups.FreeAbelianGroup {i} where -- the relation for making the quotient. -- [fsr-sym] is not needed, but it seems more principled to -- make [FormalSumRel] an equivalence relation. data FormalSumRel {A : Type i} : Word A β†’ Word A β†’ Type i where fsr-refl : βˆ€ {l₁ lβ‚‚} β†’ l₁ == lβ‚‚ β†’ FormalSumRel l₁ lβ‚‚ fsr-trans : βˆ€ {l₁ lβ‚‚ l₃} β†’ FormalSumRel l₁ lβ‚‚ β†’ FormalSumRel lβ‚‚ l₃ β†’ FormalSumRel l₁ l₃ fsr-sym : βˆ€ {l₁ lβ‚‚} β†’ FormalSumRel l₁ lβ‚‚ β†’ FormalSumRel lβ‚‚ l₁ fsr-cons : βˆ€ x {l₁ lβ‚‚} β†’ FormalSumRel l₁ lβ‚‚ β†’ FormalSumRel (x :: l₁) (x :: lβ‚‚) fsr-swap : βˆ€ x₁ xβ‚‚ l β†’ FormalSumRel (x₁ :: xβ‚‚ :: l) (xβ‚‚ :: x₁ :: l) fsr-flip : βˆ€ x₁ l β†’ FormalSumRel (x₁ :: flip x₁ :: l) l -- The quotient FormalSum : Type i β†’ Type i FormalSum A = SetQuot (FormalSumRel {A}) module _ {A : Type i} where fs[_] : Word A β†’ FormalSum A fs[_] = q[_] module FormalSumElim {k} {P : FormalSum A β†’ Type k} {{p : {x : FormalSum A} β†’ is-set (P x)}} (incl* : (a : Word A) β†’ P fs[ a ]) (rel* : βˆ€ {a₁ aβ‚‚} (r : FormalSumRel a₁ aβ‚‚) β†’ incl* a₁ == incl* aβ‚‚ [ P ↓ quot-rel r ]) = SetQuotElim incl* rel* open FormalSumElim public using () renaming (f to FormalSum-elim) module FormalSumRec {k} {B : Type k} {{p : is-set B}} (incl* : Word A β†’ B) (rel* : βˆ€ {a₁ aβ‚‚} (r : FormalSumRel a₁ aβ‚‚) β†’ incl* a₁ == incl* aβ‚‚) = SetQuotRec incl* rel* open FormalSumRec public using () renaming (f to FormalSum-rec) module _ {A : Type i} where -- useful properties that remain public abstract FormalSumRel-cong-++-l : βˆ€ {l₁ l₁'} β†’ FormalSumRel {A} l₁ l₁' β†’ (lβ‚‚ : Word A) β†’ FormalSumRel (l₁ ++ lβ‚‚) (l₁' ++ lβ‚‚) FormalSumRel-cong-++-l (fsr-refl idp) lβ‚‚ = fsr-refl idp FormalSumRel-cong-++-l (fsr-trans fsr₁ fsrβ‚‚) lβ‚‚ = fsr-trans (FormalSumRel-cong-++-l fsr₁ lβ‚‚) (FormalSumRel-cong-++-l fsrβ‚‚ lβ‚‚) FormalSumRel-cong-++-l (fsr-sym fsr) lβ‚‚ = fsr-sym (FormalSumRel-cong-++-l fsr lβ‚‚) FormalSumRel-cong-++-l (fsr-cons x fsr₁) lβ‚‚ = fsr-cons x (FormalSumRel-cong-++-l fsr₁ lβ‚‚) FormalSumRel-cong-++-l (fsr-swap x₁ xβ‚‚ l₁) lβ‚‚ = fsr-swap x₁ xβ‚‚ (l₁ ++ lβ‚‚) FormalSumRel-cong-++-l (fsr-flip x₁ l₁) lβ‚‚ = fsr-flip x₁ (l₁ ++ lβ‚‚) FormalSumRel-cong-++-r : βˆ€ (l₁ : Word A) β†’ βˆ€ {lβ‚‚ lβ‚‚'} β†’ FormalSumRel lβ‚‚ lβ‚‚' β†’ FormalSumRel (l₁ ++ lβ‚‚) (l₁ ++ lβ‚‚') FormalSumRel-cong-++-r nil fsrβ‚‚ = fsrβ‚‚ FormalSumRel-cong-++-r (x :: l₁) fsrβ‚‚ = fsr-cons x (FormalSumRel-cong-++-r l₁ fsrβ‚‚) FormalSumRel-swap1 : βˆ€ x l₁ lβ‚‚ β†’ FormalSumRel {A} (l₁ ++ (x :: lβ‚‚)) (x :: l₁ ++ lβ‚‚) FormalSumRel-swap1 x nil lβ‚‚ = fsr-refl idp FormalSumRel-swap1 x (x₁ :: l₁) lβ‚‚ = fsr-trans (fsr-cons x₁ (FormalSumRel-swap1 x l₁ lβ‚‚)) (fsr-swap x₁ x (l₁ ++ lβ‚‚)) module _ (A : Type i) where private infixl 80 _⊞_ _⊞_ : FormalSum A β†’ FormalSum A β†’ FormalSum A _⊞_ = FormalSum-rec (Ξ» l₁ β†’ FormalSum-rec (Ξ» lβ‚‚ β†’ fs[ l₁ ++ lβ‚‚ ]) (Ξ» r β†’ quot-rel $ FormalSumRel-cong-++-r l₁ r)) (Ξ» {l₁} {l₁'} r β†’ Ξ»= $ FormalSum-elim (Ξ» lβ‚‚ β†’ quot-rel $ FormalSumRel-cong-++-l r lβ‚‚) (Ξ» _ β†’ prop-has-all-paths-↓)) abstract FormalSumRel-cong-flip : βˆ€ {l₁ lβ‚‚} β†’ FormalSumRel {A} l₁ lβ‚‚ β†’ FormalSumRel (Word-flip l₁) (Word-flip lβ‚‚) FormalSumRel-cong-flip (fsr-refl idp) = fsr-refl idp FormalSumRel-cong-flip (fsr-trans fsr₁ fsrβ‚‚) = fsr-trans (FormalSumRel-cong-flip fsr₁) (FormalSumRel-cong-flip fsrβ‚‚) FormalSumRel-cong-flip (fsr-sym fsr) = fsr-sym (FormalSumRel-cong-flip fsr) FormalSumRel-cong-flip (fsr-cons x fsr₁) = fsr-cons (flip x) (FormalSumRel-cong-flip fsr₁) FormalSumRel-cong-flip (fsr-swap x₁ xβ‚‚ l) = fsr-swap (flip x₁) (flip xβ‚‚) (Word-flip l) FormalSumRel-cong-flip (fsr-flip (inl x) l) = fsr-flip (inr x) (Word-flip l) FormalSumRel-cong-flip (fsr-flip (inr x) l) = fsr-flip (inl x) (Word-flip l) ⊟ : FormalSum A β†’ FormalSum A ⊟ = FormalSum-rec (fs[_] ∘ Word-flip) (Ξ» r β†’ quot-rel $ FormalSumRel-cong-flip r) ⊞-unit : FormalSum A ⊞-unit = fs[ nil ] abstract ⊞-unit-l : βˆ€ g β†’ ⊞-unit ⊞ g == g ⊞-unit-l = FormalSum-elim (Ξ» _ β†’ idp) (Ξ» _ β†’ prop-has-all-paths-↓) ⊞-assoc : βˆ€ g₁ gβ‚‚ g₃ β†’ (g₁ ⊞ gβ‚‚) ⊞ g₃ == g₁ ⊞ (gβ‚‚ ⊞ g₃) ⊞-assoc = FormalSum-elim (Ξ» l₁ β†’ FormalSum-elim (Ξ» lβ‚‚ β†’ FormalSum-elim (Ξ» l₃ β†’ ap fs[_] $ ++-assoc l₁ lβ‚‚ l₃) (Ξ» _ β†’ prop-has-all-paths-↓)) (Ξ» _ β†’ prop-has-all-paths-↓)) (Ξ» _ β†’ prop-has-all-paths-↓) Word-inv-l : βˆ€ l β†’ FormalSumRel {A} (Word-flip l ++ l) nil Word-inv-l nil = fsr-refl idp Word-inv-l (x :: l) = fsr-trans (FormalSumRel-swap1 x (flip x :: Word-flip l) l) $ fsr-trans (fsr-flip x (Word-flip l ++ l)) (Word-inv-l l) ⊟-inv-l : βˆ€ g β†’ (⊟ g) ⊞ g == ⊞-unit ⊟-inv-l = FormalSum-elim (Ξ» l β†’ quot-rel (Word-inv-l l)) (Ξ» _ β†’ prop-has-all-paths-↓) FormalSumRel-swap : βˆ€ l₁ lβ‚‚ β†’ FormalSumRel {A} (l₁ ++ lβ‚‚) (lβ‚‚ ++ l₁) FormalSumRel-swap l₁ nil = fsr-refl (++-unit-r l₁) FormalSumRel-swap l₁ (x :: lβ‚‚) = fsr-trans (FormalSumRel-swap1 x l₁ lβ‚‚) (fsr-cons x (FormalSumRel-swap l₁ lβ‚‚)) ⊞-comm : βˆ€ g₁ gβ‚‚ β†’ g₁ ⊞ gβ‚‚ == gβ‚‚ ⊞ g₁ ⊞-comm = FormalSum-elim (Ξ» l₁ β†’ FormalSum-elim (Ξ» lβ‚‚ β†’ quot-rel $ FormalSumRel-swap l₁ lβ‚‚) (Ξ» _ β†’ prop-has-all-paths-↓)) (Ξ» _ β†’ prop-has-all-paths-↓) FormalSum-group-structure : GroupStructure (FormalSum A) FormalSum-group-structure = record { ident = ⊞-unit ; inv = ⊟ ; comp = _⊞_ ; unit-l = ⊞-unit-l ; assoc = ⊞-assoc ; inv-l = ⊟-inv-l } FreeAbGroup : AbGroup i FreeAbGroup = group _ FormalSum-group-structure , ⊞-comm module FreeAbGroup = AbGroup FreeAbGroup {- Freeness (universal properties) -} module _ {A : Type i} {j} (G : AbGroup j) where private module G = AbGroup G abstract Word-extendα΄³-emap : βˆ€ f {l₁ lβ‚‚} β†’ FormalSumRel {A} l₁ lβ‚‚ β†’ Word-extendα΄³ G.grp f l₁ == Word-extendα΄³ G.grp f lβ‚‚ Word-extendα΄³-emap f (fsr-refl idp) = idp Word-extendα΄³-emap f (fsr-trans fsr fsr₁) = (Word-extendα΄³-emap f fsr) βˆ™ (Word-extendα΄³-emap f fsr₁) Word-extendα΄³-emap f (fsr-sym fsr) = ! (Word-extendα΄³-emap f fsr) Word-extendα΄³-emap f (fsr-cons x fsr) = ap (G.comp (PlusMinus-extendα΄³ G.grp f x)) (Word-extendα΄³-emap f fsr) Word-extendα΄³-emap f (fsr-swap x₁ xβ‚‚ l) = ! (G.assoc (PlusMinus-extendα΄³ G.grp f x₁) (PlusMinus-extendα΄³ G.grp f xβ‚‚) (Word-extendα΄³ G.grp f l)) βˆ™ ap (Ξ» g β†’ G.comp g (Word-extendα΄³ G.grp f l)) (G.comm (PlusMinus-extendα΄³ G.grp f x₁) (PlusMinus-extendα΄³ G.grp f xβ‚‚)) βˆ™ G.assoc (PlusMinus-extendα΄³ G.grp f xβ‚‚) (PlusMinus-extendα΄³ G.grp f x₁) (Word-extendα΄³ G.grp f l) Word-extendα΄³-emap f (fsr-flip (inl x) l) = ! (G.assoc (f x) (G.inv (f x)) (Word-extendα΄³ G.grp f l)) βˆ™ ap (Ξ» g β†’ G.comp g (Word-extendα΄³ G.grp f l)) (G.inv-r (f x)) βˆ™ G.unit-l _ Word-extendα΄³-emap f (fsr-flip (inr x) l) = ! (G.assoc (G.inv (f x)) (f x) (Word-extendα΄³ G.grp f l)) βˆ™ ap (Ξ» g β†’ G.comp g (Word-extendα΄³ G.grp f l)) (G.inv-l (f x)) βˆ™ G.unit-l _ FormalSum-extend : (A β†’ G.El) β†’ FormalSum A β†’ G.El FormalSum-extend f = FormalSum-rec (Word-extendα΄³ G.grp f) (Ξ» r β†’ Word-extendα΄³-emap f r) FreeAbGroup-extend : (A β†’ G.El) β†’ (FreeAbGroup.grp A β†’α΄³ G.grp) FreeAbGroup-extend f' = record {M} where module M where f : FreeAbGroup.El A β†’ G.El f = FormalSum-extend f' abstract pres-comp : preserves-comp (FreeAbGroup.comp A) G.comp f pres-comp = FormalSum-elim (Ξ» l₁ β†’ FormalSum-elim (Ξ» lβ‚‚ β†’ Word-extendα΄³-++ G.grp f' l₁ lβ‚‚) (Ξ» _ β†’ prop-has-all-paths-↓)) (Ξ» _ β†’ prop-has-all-paths-↓) private module Lemma (hom : FreeAbGroup.grp A β†’α΄³ G.grp) where open GroupHom hom f* : A β†’ G.El f* a = f fs[ inl a :: nil ] abstract PlusMinus-extend-hom : βˆ€ x β†’ PlusMinus-extendα΄³ G.grp f* x == f fs[ x :: nil ] PlusMinus-extend-hom (inl x) = idp PlusMinus-extend-hom (inr x) = ! $ pres-inv fs[ inl x :: nil ] Word-extend-hom : βˆ€ l β†’ Word-extendα΄³ G.grp f* l == f fs[ l ] Word-extend-hom nil = ! pres-ident Word-extend-hom (x :: l) = ap2 G.comp (PlusMinus-extend-hom x) (Word-extend-hom l) βˆ™ ! (pres-comp _ _) open Lemma FreeAbGroup-extend-is-equiv : is-equiv FreeAbGroup-extend FreeAbGroup-extend-is-equiv = is-eq _ from to-from from-to where to = FreeAbGroup-extend from = f* abstract to-from : βˆ€ h β†’ to (from h) == h to-from h = group-hom= $ Ξ»= $ FormalSum-elim (Ξ» l β†’ Word-extend-hom h l) (Ξ» _ β†’ prop-has-all-paths-↓) from-to : βˆ€ f β†’ from (to f) == f from-to f = Ξ»= Ξ» a β†’ G.unit-r (f a) FreeAbGroup-extend-hom : Ξ α΄³ A (Ξ» _ β†’ G.grp) β†’α΄³ hom-group (FreeAbGroup.grp A) G FreeAbGroup-extend-hom = record {M} where module M where f : (A β†’ G.El) β†’ (FreeAbGroup.grp A β†’α΄³ G.grp) f = FreeAbGroup-extend abstract pres-comp : preserves-comp (Group.comp (Ξ α΄³ A (Ξ» _ β†’ G.grp))) (Group.comp (hom-group (FreeAbGroup.grp A) G)) f pres-comp = Ξ» f₁ fβ‚‚ β†’ group-hom= $ Ξ»= $ FormalSum-elim (Word-extendα΄³-comp G f₁ fβ‚‚) (Ξ» _ β†’ prop-has-all-paths-↓) FreeAbGroup-extend-iso : Ξ α΄³ A (Ξ» _ β†’ G.grp) ≃ᴳ hom-group (FreeAbGroup.grp A) G FreeAbGroup-extend-iso = FreeAbGroup-extend-hom , FreeAbGroup-extend-is-equiv {- relation with [Word-exp] -} module _ {A : Type i} where abstract FormalSumRel-pres-exp : βˆ€ (a : A) z β†’ fs[ Word-exp a z ] == GroupStructure.exp (FormalSum-group-structure A) fs[ inl a :: nil ] z FormalSumRel-pres-exp a (pos O) = idp FormalSumRel-pres-exp a (pos (S O)) = idp FormalSumRel-pres-exp a (pos (S (S n))) = ap (Group.comp (FreeAbGroup.grp A) fs[ inl a :: nil ]) (FormalSumRel-pres-exp a (pos (S n))) FormalSumRel-pres-exp a (negsucc O) = idp FormalSumRel-pres-exp a (negsucc (S n)) = ap (Group.comp (FreeAbGroup.grp A) fs[ inr a :: nil ]) (FormalSumRel-pres-exp a (negsucc n))
Appl/Calendar/Main/mainEventsContent.asm
steakknife/pcgeos
504
164639
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% (c) Copyright Geoworks 1996 -- All Rights Reserved GEOWORKS CONFIDENTIAL PROJECT: PC GEOS MODULE: Calendar\Main FILE: mainEventsContent.asm AUTHOR: <NAME>, Dec 11, 1996 METHODS: Name Description ---- ----------- MSG_VIS_DRAW Draw the event list in window next to confirm dialog. MSG_CALENDAR_EVENTS_LIST_CONTENT_SET_GSTRING Set the gstring associated with the content, and resize myself according to bound of gstate. MSG_VIS_CLOSE When closing, destroy the gstate associated with this content. ROUTINES: Name Description ---- ----------- REVISION HISTORY: Name Date Description ---- ---- ----------- kho 12/11/96 Initial revision DESCRIPTION: Code for CalendarEventsListContentClass. This is a content that shows (statically) the events of the day, when appointment confirm dialog comes up. $Id: mainEventsContent.asm,v 1.1 97/04/04 14:48:31 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if HANDLE_MAILBOX_MSG ; ; There must be an instance of every class in a resource. ; idata segment CalendarEventsListContentClass idata ends MailboxCode segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CalendarEventsListContentVisDraw %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Draw the event list in window next to confirm dialog. CALLED BY: MSG_VIS_DRAW PASS: *ds:si = CalendarEventsListContentClass object ds:di = CalendarEventsListContentClass instance data ds:bx = CalendarEventsListContentClass object (same as *ds:si) es = segment of CalendarEventsListContentClass ax = message # cl = DrawFlags: DF_EXPOSED set if GState is set to update window ^hbp = gstate to draw through. RETURN: nothing GState = The graphics state must be returned unchanged except for pen position, colors -- can be destroyed. DESTROYED: ax, cx, dx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- kho 12/11/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CalendarEventsListContentVisDraw method dynamic \ CalendarEventsListContentClass, MSG_VIS_DRAW .enter Assert gstate, bp ; ; GString to be drawn. ; mov si, ds:[di].CELCI_gsHandle ; ; Move gstate to something useful ; mov di, bp ; di = GState clr ax, bx, dx ; coordinates to ; draw, flags call GrDrawGString .leave ret CalendarEventsListContentVisDraw endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CalendarEventsListContentSetGString %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Set the gstring associated with the content, and resize myself according to bound of gstate. CALLED BY: MSG_CALENDAR_EVENTS_LIST_CONTENT_SET_GSTRING PASS: *ds:si = CalendarEventsListContentClass object ds:di = CalendarEventsListContentClass instance data ds:bx = CalendarEventsListContentClass object (same as *ds:si) es = segment of CalendarEventsListContentClass ax = message # cx = handle of gstring block dx = gstring chunk handle RETURN: nothing DESTROYED: ax SIDE EFFECTS: PSEUDO CODE/STRATEGY: Store the gstate handle to instance data. Figure out the bounds to gstring, and set the bounds of self. If the bound overflows, the default bound of the content is 600 (CONFIRM_EVENT_LIST_HEIGHT), and that's all the user can scroll. REVISION HISTORY: Name Date Description ---- ---- ----------- kho 12/13/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CalendarEventsListContentSetGString method dynamic \ CalendarEventsListContentClass, MSG_CALENDAR_EVENTS_LIST_CONTENT_SET_GSTRING uses cx, dx .enter ; ; Set instance data. ; Assert handle, cx Assert gstate, dx mov ds:[di].CELCI_gsBlock, cx mov ds:[di].CELCI_gsHandle, dx ; ; Find the bound of gstring. GrGetGStringBounds documentation ; seems to be wrong, and it wants gstate handle to be in si. ; push si mov si, dx clr di, dx clr dx ; no GSControl call GrGetGStringBounds ; c set if overflow, ; else (ax,bx), ; (cx,dx) <- bounds pop si jc quit ; ; Set the vis size. ; clr cx ; don't want ; to set right bound call VisSetSize quit: .leave ret CalendarEventsListContentSetGString endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CalendarEventsListContentVisClose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: When closing, destroy the gstate associated with this content. CALLED BY: MSG_VIS_CLOSE PASS: *ds:si = CalendarEventsListContentClass object ds:di = CalendarEventsListContentClass instance data ds:bx = CalendarEventsListContentClass object (same as *ds:si) es = segment of CalendarEventsListContentClass ax = message # RETURN: nothing DESTROYED: ax, cx, dx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- kho 12/14/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CalendarEventsListContentVisClose method dynamic \ CalendarEventsListContentClass, MSG_VIS_CLOSE ; ; First destroy the gstring, and free the gstring block. ; push si mov bx, ds:[di].CELCI_gsBlock mov si, ds:[di].CELCI_gsHandle clr di mov dl, GSKT_KILL_DATA call GrDestroyGString call MemFree ; bx destroyed pop si ; ; Call super. ; mov di, offset CalendarEventsListContentClass GOTO ObjCallSuperNoLock CalendarEventsListContentVisClose endm MailboxCode ends endif ; HANDLE_MAILBOX_MSG
examples/examplesPaperJFP/ConsoleInterface.agda
agda/ooAgda
23
11878
<reponame>agda/ooAgda module examplesPaperJFP.ConsoleInterface where open import examplesPaperJFP.NativeIOSafe open import examplesPaperJFP.BasicIO hiding (main) module _ where data ConsoleCommand : Set where getLine : ConsoleCommand putStrLn : String β†’ ConsoleCommand ConsoleResponse : ConsoleCommand β†’ Set ConsoleResponse getLine = Maybe String ConsoleResponse (putStrLn s) = Unit ConsoleInterface : IOInterface Command ConsoleInterface = ConsoleCommand Response ConsoleInterface = ConsoleResponse
src/unison/test/fast/Hexagon/speed/gcc.rtlanal.insn_dependent_p_1.asm
Patstrom/disUnison
88
13289
<filename>src/unison/test/fast/Hexagon/speed/gcc.rtlanal.insn_dependent_p_1.asm .text .file "gcc.rtlanal.insn_dependent_p_1.ll" .hidden insn_dependent_p_1 .globl insn_dependent_p_1 .align 16 .type insn_dependent_p_1,@function insn_dependent_p_1: // @insn_dependent_p_1 // BB#0: { r16 = r2 memd(r29 + #-16) = r17:16 allocframe(#8) } { r1 = memw(r16 + #0) if (cmp.eq(r1.new, #0)) jump:nt .LBB0_3 } { jump .LBB0_1 } .LBB0_1: { call reg_mentioned_p } { p0 = cmp.eq(r0, #0); if (p0.new) jump:nt .LBB0_3 } { jump .LBB0_2 } .LBB0_2: { memw(r16+#0)=#0 } .LBB0_3: { r17:16 = memd(r29 + #0) dealloc_return } .Lfunc_end0: .size insn_dependent_p_1, .Lfunc_end0-insn_dependent_p_1 .ident "clang version 3.8.0 (http://llvm.org/git/clang.git 2d49f0a0ae8366964a93e3b7b26e29679bee7160) (http://llvm.org/git/llvm.git 60bc66b44837125843b58ed3e0fd2e6bb948d839)" .section ".note.GNU-stack","",@progbits
src/implementation/cl-vector_set.adb
flyx/OpenCLAda
8
28633
-------------------------------------------------------------------------------- -- Copyright (c) 2013, <NAME> <<EMAIL>> -- -- Permission to use, copy, modify, and/or 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. -------------------------------------------------------------------------------- package body CL.Vector_Set is function CL_Vector (X, Y : Base) return R2 is Value : R2; begin Value.S := (X, Y); return Value; end CL_Vector; function CL_Vector (V : V2.Vector) return R2 is Value : R2; begin Value.S := V; return Value; end CL_Vector; function CL_Vector (X, Y, Z : Base) return R3 is Value : R3; begin Value.S := (X, Y, Z); return Value; end CL_Vector; function CL_Vector (V : V3.Vector) return R3 is Value : R3; begin Value.S := V; return Value; end CL_Vector; function CL_Vector (X, Y, Z, W : Base) return R4 is Value : R4; begin Value.S := (X, Y, Z, W); return Value; end CL_Vector; function CL_Vector (V : V4.Vector) return R4 is Value : R4; begin Value.S := V; return Value; end CL_Vector; function CL_Vector (S0, S1, S2, S3, S4, S5, S6, S7 : Base) return R8 is Value : R8; begin Value.S := (S0, S1, S2, S3, S4, S5, S6, S7); return Value; end CL_Vector; function CL_Vector (V : V8.Vector) return R8 is Value : R8; begin Value.S := V; return Value; end CL_Vector; function CL_Vector (S0, S1, S2, S3, S4, S5, S6, S7, S8, S9, SA, SB, SC, SD, SE, SF : Base) return R16 is Value : R16; begin Value.S := (S0, S1, S2, S3, S4, S5, S6, S7, S8, S9, SA, SB, SC, SD, SE, SF); return Value; end CL_Vector; function CL_Vector (V : V16.Vector) return R16 is Value : R16; begin Value.S := V; return Value; end CL_Vector; function Vector2_Array (List : V2.Vector_Array) return Record_Array is Value : Record_Array (List'Range); begin for I in List'Range loop Value (I) := CL_Vector (List (I)); end loop; return Value; end Vector2_Array; function Vector3_Array (List : V3.Vector_Array) return Record_Array is Value : Record_Array (List'Range); begin for I in List'Range loop Value (I) := CL_Vector (List (I)); end loop; return Value; end Vector3_Array; function Vector4_Array (List : V4.Vector_Array) return Record_Array is Value : Record_Array (List'Range); begin for I in List'Range loop Value (I) := CL_Vector (List (I)); end loop; return Value; end Vector4_Array; function Vector8_Array (List : V8.Vector_Array) return Record_Array is Value : Record_Array (List'Range); begin for I in List'Range loop Value (I) := CL_Vector (List (I)); end loop; return Value; end Vector8_Array; function Vector16_Array (List : V16.Vector_Array) return Record_Array is Value : Record_Array (List'Range); begin for I in List'Range loop Value (I) := CL_Vector (List (I)); end loop; return Value; end Vector16_Array; function To_String (Value : R2) return String is begin return V2.To_String (Value.S); end To_String; function To_String (Value : R3) return String is begin return V3.To_String (Value.S); end To_String; function To_String (Value : R4) return String is begin return V4.To_String (Value.S); end To_String; function To_String (Value : R8) return String is begin return V8.To_String (Value.S); end To_String; function To_String (Value : R16) return String is begin return V16.To_String (Value.S); end To_String; end CL.Vector_Set;
test/Succeed/Issue296.agda
shlevy/agda
1,989
585
<filename>test/Succeed/Issue296.agda module Issue296 where postulate Unit : Set IO : Set β†’ Set foo : ((A B : Set) β†’ Unit) β†’ IO Unit bar : (A B : Set) β†’ Unit {-# BUILTIN IO IO #-} {-# COMPILE GHC IO = type IO #-} {-# COMPILE GHC Unit = type () #-} {-# COMPILE GHC bar = undefined #-} main : IO Unit main = foo bar
programs/oeis/063/A063905.asm
neoneye/loda
22
92766
; A063905: Each prime p appears p times. ; 2,2,3,3,3,5,5,5,5,5,7,7,7,7,7,7,7,11,11,11,11,11,11,11,11,11,11,11,13,13,13,13,13,13,13,13,13,13,13,13,13,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23 mov $2,$0 add $2,2 mov $5,1 lpb $2 sub $2,1 mov $3,$1 add $1,$5 seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0. mul $3,$1 sub $0,$3 mov $4,$0 max $4,0 cmp $4,$0 mul $2,$4 lpe mov $0,$1
src/main/java/org/shirolang/interpreter/Shiro.g4
jeffreyguenther/shiro
14
1755
grammar Shiro; shiro : includeStmt* shiroStmt* EOF ; includeStmt: INCLUDE STRING_LITERAL NEWLINE; shiroStmt : anonymousGraphStmt | nodeDecl | graphDecl | stateDecl | NEWLINE ; stateDecl : STATE stateName BEGIN NEWLINE stateGraphSelection NEWLINE stateStmt* END ; stateName : IDENT ; stateStmt : stateActivation NEWLINE | NEWLINE ; stateGraphSelection : GRAPH (IDENT | DEFAULT) ; stateActivation : optionSelection | nestedOptionSelection ; nestedOptionSelection : nodeName=IDENT LSQUARE activeObject=IDENT RSQUARE BEGIN NEWLINE (stateActivation NEWLINE | NEWLINE )* END ; optionSelection : nodeName=IDENT LSQUARE activeObject=IDENT RSQUARE ; graphDecl : GRAPH IDENT BEGIN NEWLINE graphStmt* END ; graphStmt : portAssignment | funcDeclInit | funcDecl | NEWLINE ; nodeDecl : NODE MFNAME ('[' optionSelector ']')? BEGIN NEWLINE nodeStmt END ; anonymousRef : reference ; reference : REF fullyQualifiedType ( LSQUARE activeObject=IDENT RSQUARE )? ('(' arguments? ')') outputSelector? ; outputSelector : (LSQUARE selectedOutput=(IDENT| NUMBER) RSQUARE) ; funcDeclInit : name=IDENT fullyQualifiedType ( LSQUARE activeObject=IDENT RSQUARE )? ('(' arguments ')') ; funcCall : fullyQualifiedType ( LSQUARE activeObject=IDENT RSQUARE )? ('(' arguments ')')?; funcDecl : name=IDENT fullyQualifiedType ( LSQUARE activeObject=IDENT RSQUARE )? ; arguments : argMap | argList ; argMap : (keys+=IDENT ':' values+=arg)(',' keys+=IDENT ':' values+=arg)* ; argList : arg(',' arg)* ; arg: expr; optionSelector : IDENT ; nodeStmt : (portstmt | portAssignment | nodeDecl | NEWLINE)* ; portDecl : OPTION? accessModifier? funcDecl ; portDeclInit : OPTION? accessModifier? funcDeclInit ; portstmt : ( portDeclInit | portDecl ) NEWLINE ; portName : IDENT ; accessModifier : INPUT | OUTPUT ; fullyQualifiedType : types+=MFNAME ('.' types+=MFNAME)* ; path : (REF| SELECT)? segments+=pathSegment ('.' segments+=pathSegment)* ; pathSegment : IDENT | (INPUTS| OUTPUTS) LSQUARE pathIndex RSQUARE ; pathIndex : index=(NUMBER | IDENT) ; portAssignment : path '(' arguments ')' NEWLINE? ; anonExpr : expr NEWLINE? ; anonymousGraphStmt : portAssignment | funcDeclInit NEWLINE | funcDecl NEWLINE | anonExpr ; listLiteral : LSQUARE argList? RSQUARE ; expr : '(' expr ')' #parensExpr | NOT_OP expr #notExpr | MINUS_OP expr #negExpr | expr AND_OP expr #andExpr | expr OR_OP expr #orExpr | expr (DIV_OP | MULT_OP | MOD_OP) expr #multExpr | expr (PLUS_OP | MINUS_OP ) expr #addExpr | expr (GT | GTE | LT | LTE) expr #comparisonExpr | expr ( EQ | NEQ ) expr #equalityExpr | fullyQualifiedType #typeExpr | anonymousRef #anonRefExpr | funcCall #inlineFuncCall | path #pathExpr | NUMBER #numExpr | BOOLEAN_LITERAL #boolExpr | STRING_LITERAL #stringExpr ; SELECT : '@'; REF : '~'; DEFAULT : '^'; INPUT : 'input'; OUTPUT : 'output'; EVAL : 'eval'; THIS : 'this'; NOT_OP : '!'; AND_OP : '&&'; OR_OP : '||'; PLUS_OP : '+'; MINUS_OP : '-'; MULT_OP : '*'; DIV_OP : '/'; MOD_OP : '%'; LSQUARE : '['; RSQUARE : ']'; GT : '>'; GTE : '>='; LT : '<'; LTE : '<='; EQ : '=='; NEQ : '!='; INCLUDE: 'include'; STATE: 'state'; NODE: 'node'; GRAPH: 'graph'; BEGIN: 'begin'; END: 'end'; INPUTS: 'inputs'; OUTPUTS: 'outputs'; OPTION : 'option'; BOOLEAN_LITERAL : 'true' | 'false' ; STRING_LITERAL : '"' (~'"'|'\\"')* '"' ; NUMBER : DIGIT+ ('.'DIGIT+)? ; IDENT : LCLETTER (LCLETTER | UCLETTER | DIGIT|'_')* ; MFNAME : UCLETTER (LCLETTER | UCLETTER | DIGIT|'_')* ; WS : (' '|'\t'|'\f')+ -> channel(HIDDEN) ; COMMENT : '//' ~('\n'|'\r')* -> channel(HIDDEN) ; LINE_COMMENT : '/*' .*? '*/' NEWLINE? -> channel(HIDDEN) ; NEWLINE : '\r'?'\n' ; fragment LCLETTER : 'a'..'z'; fragment UCLETTER : 'A'..'Z'; fragment DIGIT : '0'..'9';
programs/oeis/065/A065102.asm
neoneye/loda
22
170225
; A065102: a(0) = c, a(1) = p*c^3; a(n+2) = p*c^2*a(n+1) - a(n), for p = 2, c = 3. ; 3,54,969,17388,312015,5598882,100467861,1802822616,32350339227,580503283470,10416708763233,186920254454724,3354147871421799,60187741431137658,1080025197889056045,19380265820571871152,347764759572404624691,6240385406482711373286,111979172557116400094457,2009384720621612490326940,36056945798631908425790463,647015639654752739173901394,11610224567986917396704434629,208337026584109760401505921928,3738456253945988769830402160075,67083875544443688096545732959422,1203771303546040396967992791109521,21600799588284283457327324507011956,387610621285571061834923848335105687 mul $0,6 add $0,6 mov $2,1 lpb $0 sub $0,2 add $1,$2 add $2,$1 lpe div $1,8 mul $1,3 mov $0,$1
Task/Filter/AppleScript/filter-1.applescript
LaudateCorpus1/RosettaCodeData
1
3772
<filename>Task/Filter/AppleScript/filter-1.applescript set array to {1, 2, 3, 4, 5, 6} set evens to {} repeat with i in array if (i mod 2 = 0) then set end of evens to i's contents end repeat return evens
Common/Predicate.agda
mietek/hilbert-gentzen
29
4077
module Common.Predicate where open import Common public open import Common.Context public using (Cx ; VCx ; βˆ… ; _,_) -- Predicates. Pred : βˆ€ {β„“} β†’ Set β„“ β†’ Set (sucα΄Έ β„“) Pred {β„“} U = U β†’ Set β„“ -- Set membership. module _ {U : Set} where infix 3 _∈ᴾ_ _∈ᴾ_ : U β†’ Pred U β†’ Set A ∈ᴾ P = P A infix 3 _βˆ‰α΄Ύ_ _βˆ‰α΄Ύ_ : U β†’ Pred U β†’ Set A βˆ‰α΄Ύ P = Not (A ∈ᴾ P) -- Empty set. module _ {U : Set} where βˆ…α΄Ύ : Pred U βˆ…α΄Ύ = K 𝟘 bot∈ᴾ : βˆ€ {A} β†’ A βˆ‰α΄Ύ βˆ…α΄Ύ bot∈ᴾ = elim𝟘 -- Universal set. module _ {U : Set} where Uα΄Ύ : Pred U Uα΄Ύ = K πŸ™ top∈ᴾ : βˆ€ {A} β†’ A ∈ᴾ Uα΄Ύ top∈ᴾ = βˆ™ -- Set inclusion. module _ {U : Set} where infix 3 _βŠ†α΄Ύ_ _βŠ†α΄Ύ_ : Pred U β†’ Pred U β†’ Set P βŠ†α΄Ύ Q = βˆ€ {A : U} β†’ A ∈ᴾ P β†’ A ∈ᴾ Q infix 3 _⊈ᴾ_ _⊈ᴾ_ : Pred U β†’ Pred U β†’ Set P ⊈ᴾ Q = Not (P βŠ†α΄Ύ Q) reflβŠ†α΄Ύ : βˆ€ {P} β†’ P βŠ†α΄Ύ P reflβŠ†α΄Ύ = I transβŠ†α΄Ύ : βˆ€ {P Q R} β†’ P βŠ†α΄Ύ Q β†’ Q βŠ†α΄Ύ R β†’ P βŠ†α΄Ύ R transβŠ†α΄Ύ Ξ· Ξ·β€² = Ξ·β€² ∘ Ξ· botβŠ†α΄Ύ : βˆ€ {P} β†’ βˆ…α΄Ύ βŠ†α΄Ύ P botβŠ†α΄Ύ = elim𝟘 topβŠ†α΄Ύ : βˆ€ {P} β†’ P βŠ†α΄Ύ Uα΄Ύ topβŠ†α΄Ύ = K βˆ™ -- Set equality. module _ {U : Set} where infix 3 _β«—α΄Ύ_ _β«—α΄Ύ_ : Pred U β†’ Pred U β†’ Set P β«—α΄Ύ Q = (P βŠ†α΄Ύ Q) Γ— (Q βŠ†α΄Ύ P) reflβ«—α΄Ύ : βˆ€ {P} β†’ P β«—α΄Ύ P reflβ«—α΄Ύ {P} = reflβŠ†α΄Ύ {P = P} , reflβŠ†α΄Ύ {P = P} transβ«—α΄Ύ : βˆ€ {P Q R} β†’ P β«—α΄Ύ Q β†’ Q β«—α΄Ύ R β†’ P β«—α΄Ύ R transβ«—α΄Ύ {P} (Ξ· , ΞΌ) (Ξ·β€² , ΞΌβ€²) = transβŠ†α΄Ύ {P = P} Ξ· Ξ·β€² , transβŠ†α΄Ύ {R = P} ΞΌβ€² ΞΌ symβ«—α΄Ύ : βˆ€ {P Q} β†’ P β«—α΄Ύ Q β†’ Q β«—α΄Ύ P symβ«—α΄Ύ (Ξ· , ΞΌ) = (ΞΌ , Ξ·) antisymβŠ†α΄Ύ : βˆ€ {P Q} β†’ ((P βŠ†α΄Ύ Q) Γ— (Q βŠ†α΄Ύ P)) ≑ (P β«—α΄Ύ Q) antisymβŠ†α΄Ύ = refl -- Predicate-based necessity. module _ {U : Set} where data All (P : Pred U) : Pred (Cx U) where βˆ… : All P βˆ… _,_ : βˆ€ {A Ξ“} β†’ All P Ξ“ β†’ P A β†’ All P (Ξ“ , A) fill : βˆ€ {Ξ“ P} β†’ (βˆ€ A β†’ P A) β†’ All P Ξ“ fill {βˆ…} f = βˆ… fill {Ξ“ , A} f = fill f , f A mapAll : βˆ€ {P Q} β†’ P βŠ†α΄Ύ Q β†’ All P βŠ†α΄Ύ All Q mapAll Ξ· βˆ… = βˆ… mapAll Ξ· (Ξ³ , a) = mapAll Ξ· Ξ³ , Ξ· a lastAll : βˆ€ {A Ξ“ P} β†’ All P (Ξ“ , A) β†’ P A lastAll (Ξ³ , a) = a initAll : βˆ€ {A Ξ“ P} β†’ All P (Ξ“ , A) β†’ All P Ξ“ initAll (Ξ³ , a) = Ξ³ all : βˆ€ {P} β†’ (βˆ€ A β†’ Dec (P A)) β†’ (βˆ€ Ξ“ β†’ Dec (All P Ξ“)) all P? βˆ… = yes βˆ… all P? (Ξ“ , A) with P? A … | yes a = mapDec (_, a) initAll (all P? Ξ“) … | no Β¬a = no (Β¬a ∘ lastAll) -- Predicate-based possibility. module _ {U : Set} where data Any (P : Pred U) : Pred (Cx U) where top : βˆ€ {A Ξ“} β†’ P A β†’ Any P (Ξ“ , A) pop : βˆ€ {A Ξ“} β†’ Any P Ξ“ β†’ Any P (Ξ“ , A) find : βˆ€ {Ξ“ P} β†’ Any P Ξ“ β†’ Ξ£ U (Ξ» A β†’ P A) find (top {A} a) = A , a find (pop i) = find i mapAny : βˆ€ {P Q} β†’ P βŠ†α΄Ύ Q β†’ Any P βŠ†α΄Ύ Any Q mapAny Ξ· (top a) = top (Ξ· a) mapAny Ξ· (pop Ξ³) = pop (mapAny Ξ· Ξ³) initAny : βˆ€ {A Ξ“ P} β†’ Not (P A) β†’ Any P (Ξ“ , A) β†’ Any P Ξ“ initAny Β¬a (top a) = a β†― Β¬a initAny Β¬a (pop Ξ³) = Ξ³ any : βˆ€ {P} β†’ (βˆ€ A β†’ Dec (P A)) β†’ (βˆ€ Ξ“ β†’ Dec (Any P Ξ“)) any P? βˆ… = no Ξ» () any P? (Ξ“ , A) with P? A … | yes a = yes (top a) … | no Β¬a = mapDec pop (initAny Β¬a) (any P? Ξ“)
macros/chip_macros.asm
StraDaMa/mmbn6-pikachu-boss-battle
7
81253
<reponame>StraDaMa/mmbn6-pikachu-boss-battle ;Chip Data Types ;Chip Codes ChipCode_A equ 0x00 ChipCode_B equ 0x01 ChipCode_C equ 0x02 ChipCode_D equ 0x03 ChipCode_E equ 0x04 ChipCode_F equ 0x05 ChipCode_G equ 0x06 ChipCode_H equ 0x07 ChipCode_I equ 0x08 ChipCode_J equ 0x09 ChipCode_K equ 0x0A ChipCode_L equ 0x0B ChipCode_M equ 0x0C ChipCode_N equ 0x0D ChipCode_O equ 0x0E ChipCode_P equ 0x0F ChipCode_Q equ 0x10 ChipCode_R equ 0x11 ChipCode_S equ 0x12 ChipCode_T equ 0x13 ChipCode_U equ 0x14 ChipCode_V equ 0x15 ChipCode_W equ 0x16 ChipCode_X equ 0x17 ChipCode_Y equ 0x18 ChipCode_Z equ 0x19 ChipCode_STAR equ 0x1A ChipCode_NONE equ 0xFF ;Element Icons ElementIcon_Heat equ 0x00 ElementIcon_Aqua equ 0x01 ElementIcon_Elec equ 0x02 ElementIcon_Wood equ 0x03 ElementIcon_Number equ 0x04 ElementIcon_Sword equ 0x05 ElementIcon_Cursor equ 0x06 ElementIcon_Object equ 0x07 ElementIcon_Wind equ 0x08 ElementIcon_Break equ 0x09 ElementIcon_Null equ 0x0A ;Library Library_Standard equ 0x00 Library_Mega equ 0x01 Library_Giga equ 0x02 Library_None equ 0x03 Library_PA equ 0x04 ;ChipEfects ChipEffect_DimScreen equ 0x01 ChipEffect_ShowAttack equ 0x02 ChipEffect_Navi equ 0x04 ChipEffect_Flag08 equ 0x08 ChipEffect_UnknownAttack equ 0x10 ChipEffect_DarkChip equ 0x20 ChipEffect_AppearsInLibrary equ 0x40 ChipEffect_VariableAttack equ 0x80 ;LibraryFlags LibraryFlags_Secret equ 0x01 LibraryFlags_Flag02 equ 0x02 LibraryFlags_GregarGiga equ 0x04 LibraryFlags_FalzerGiga equ 0x08 LibraryFlags_CannotTrade equ 0x10 LibraryFlags_NotInPack equ 0x20 LibraryFlags_ModifierChip equ 0x40 LibraryFlags_Flag80 equ 0x80 ;eof
nimrodg-parsing/src/main/antlr/NimrodCString.g4
UQ-RCC/nimrodg
0
466
<filename>nimrodg-parsing/src/main/antlr/NimrodCString.g4 /* * Nimrod/G * https://github.com/UQ-RCC/nimrodg * * SPDX-License-Identifier: Apache-2.0 * Copyright (c) 2019 The University of Queensland * * 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. */ lexer grammar NimrodCString; fragment SCharSequence : SChar+ ; fragment SChar : ~["\\\r\n] | EscapeSequence | '\\\n' | '\\\r\n' ; fragment OctalDigit : [0-7] ; fragment HexadecimalDigit : [0-9a-fA-F] ; fragment EscapeSequence : SimpleEscapeSequence | OctalEscapeSequence | HexadecimalEscapeSequence ; fragment SimpleEscapeSequence : '\\' ['"?abfnrtv\\] ; fragment OctalEscapeSequence : '\\' OctalDigit | '\\' OctalDigit OctalDigit | '\\' OctalDigit OctalDigit OctalDigit ; fragment HexadecimalEscapeSequence : '\\x' HexadecimalDigit+ ;
fastmodel-transform/fastmodel-transform-zen/src/main/antlr4/com/aliyun/fastmodel/transform/zen/parser/FastModelZenLexer.g4
alibaba/fast-modeling-language
9
7146
<reponame>alibaba/fast-modeling-language<filename>fastmodel-transform/fastmodel-transform-zen/src/main/antlr4/com/aliyun/fastmodel/transform/zen/parser/FastModelZenLexer.g4<gh_stars>1-10 lexer grammar FastModelZenLexer; channels { WS_CHANNEL, COMMENT_CHANNEL } EQUAL:'='; LESSTHAN:'<'; GREATERTHAN:'>'; EQUAL_NS : '<=>'; NOTEQUAL : '<>' | '!='; LESSTHANOREQUALTO : '<='; GREATERTHANOREQUALTO : '>='; DOT : '.'; // generated as a part of Number rule COLON : ':' ; COMMA : ',' ; SEMICOLON : ';' ; LPAREN : '(' ; RPAREN : ')' ; LSQUARE : '[' ; RSQUARE : ']' ; LCURLY : '{'; RCURLY : '}'; DIVIDE : '/'; PLUS : '+'; MINUS : '-'; MINUSMINUS : '--'; STAR : '*'; MOD : '%'; DIV : 'DIV'; NEW_LINE : '\r'?'\n'; TAB : '\t'; BLANK :' '; AMPERSAND : '&'; TILDE : '~'; BITWISEOR : '|'; CONCATENATE : '||'; BITWISEXOR : '^'; QUESTION : '?'; DOLLAR : '$'; MACRO : '#'; // LITERALS fragment Letter : 'a'..'z' | 'A'..'Z' ; fragment Digit : '0'..'9' ; fragment RegexComponent : 'a'..'z' | 'A'..'Z' | '0'..'9' | '_' | PLUS | STAR | QUESTION | MINUS | DOT | LPAREN | RPAREN | LSQUARE | RSQUARE | LCURLY | RCURLY | BITWISEXOR | BITWISEOR | DOLLAR | '!' ; StringLiteral : ( '\'' ( ~('\''|'\\') | ('\\' .) )* '\'' | '"' ( ~('"'|'\\') | ('\\' .) )* '"' )+ ; INTEGER_VALUE : DIGIT+ ; // Ported from Java.g fragment IDLetter : '\u0024' | '\u0041'..'\u005a' | '\u005f' | '\u0061'..'\u007a' | '\u00c0'..'\u00d6' | '\u00d8'..'\u00f6' | '\u00f8'..'\u00ff' | '\u0100'..'\u1fff' | '\u3040'..'\u318f' | '\u3300'..'\u337f' | '\u3400'..'\u3d2d' | '\u4e00'..'\u9fff' | '\uf900'..'\ufaff' ; fragment IDDigit : '\u0030'..'\u0039' | '\u0660'..'\u0669' | '\u06f0'..'\u06f9' | '\u0966'..'\u096f' | '\u09e6'..'\u09ef' | '\u0a66'..'\u0a6f' | '\u0ae6'..'\u0aef' | '\u0b66'..'\u0b6f' | '\u0be7'..'\u0bef' | '\u0c66'..'\u0c6f' | '\u0ce6'..'\u0cef' | '\u0d66'..'\u0d6f' | '\u0e50'..'\u0e59' | '\u0ed0'..'\u0ed9' | '\u1040'..'\u1049' ; Identifier : (IDLetter | IDDigit) (IDLetter | IDDigit | '_' | LPAREN | RPAREN | COLON | COMMA | LESSTHAN | GREATERTHAN )* | QuotedIdentifier /* though at the language level we allow all Identifiers to be QuotedIdentifiers; at the API level only columns are allowed to be of this form */ | '`' RegexComponent+ '`' ; QuotedIdentifier : '`' ( '``' | ~('`') )* '`' ; SINGLE_LINE_COMMENT: '--' ~[\r\n]* (('\r'? '\n') | EOF) -> channel(HIDDEN); MULTILINE_COMMENT: '/*' ( '*/' | EOF) -> channel(HIDDEN); WS : (' '|'\r'|'\t'|'\n') -> channel(HIDDEN); fragment DIGIT : [0-9] ; UNRECOGNIZED : . ;
tests/tk-labelframe-test_data.ads
thindil/tashy2
2
11207
package Tk.Labelframe.Test_Data is end Tk.Labelframe.Test_Data;
agda/BBSTree/Properties.agda
bgbianchi/sorting
6
199
<gh_stars>1-10 open import Relation.Binary.Core module BBSTree.Properties {A : Set} (_≀_ : A β†’ A β†’ Set) (trans≀ : Transitive _≀_) where open import BBSTree _≀_ open import Bound.Total A open import Bound.Total.Order.Properties _≀_ trans≀ open import List.Order.Simple _≀_ open import List.Order.Simple.Properties _≀_ trans≀ open import List.Sorted _≀_ lemma-bbst-*≀ : {b : Bound}(x : A) β†’ (t : BBSTree b (val x)) β†’ flatten t *≀ x lemma-bbst-*≀ x (bslf _) = lenx lemma-bbst-*≀ x (bsnd {x = y} b≀y y≀x l r) = lemma-++-*≀ (lemma-LeB≀ y≀x) (lemma-bbst-*≀ y l) (lemma-bbst-*≀ x r) lemma-bbst-≀* : {b : Bound}(x : A) β†’ (t : BBSTree (val x) b) β†’ x ≀* flatten t lemma-bbst-≀* x (bslf _) = genx lemma-bbst-≀* x (bsnd {x = y} x≀y y≀t l r) = lemma-≀*-++ (lemma-LeB≀ x≀y) (lemma-bbst-≀* x l) (lemma-bbst-≀* y r) lemma-bbst-sorted : {b t : Bound}(t : BBSTree b t) β†’ Sorted (flatten t) lemma-bbst-sorted (bslf _) = nils lemma-bbst-sorted (bsnd {x = x} b≀x x≀t l r) = lemma-sorted++ (lemma-bbst-*≀ x l) (lemma-bbst-≀* x r) (lemma-bbst-sorted l) (lemma-bbst-sorted r)
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48_notsx.log_3_15.asm
ljhsiun2/medusa
9
19022
<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r12 push %r8 push %r9 push %rax push %rbp push %rcx push %rdi push %rsi lea addresses_D_ht+0x1a1f2, %r9 nop inc %rax mov $0x6162636465666768, %rcx movq %rcx, %xmm6 movups %xmm6, (%r9) nop nop nop nop and $52467, %rsi lea addresses_normal_ht+0x1b0b2, %rsi nop and $26216, %r12 movups (%rsi), %xmm6 vpextrq $0, %xmm6, %rbp nop nop sub $43723, %rax lea addresses_UC_ht+0x156d0, %r9 inc %rcx movb $0x61, (%r9) nop nop nop nop nop and $35305, %rcx lea addresses_UC_ht+0x8892, %r12 nop nop and $854, %rcx mov $0x6162636465666768, %rax movq %rax, (%r12) nop nop nop nop add $42097, %rcx lea addresses_D_ht+0x7bf2, %rsi nop nop nop nop and $65364, %r8 movb (%rsi), %al nop nop nop nop add $51382, %rbp lea addresses_normal_ht+0x13cf2, %rcx nop nop nop nop nop xor %rax, %rax and $0xffffffffffffffc0, %rcx movntdqa (%rcx), %xmm0 vpextrq $1, %xmm0, %rsi nop nop nop nop nop and $48758, %rax lea addresses_UC_ht+0xde52, %rbp nop inc %r9 movb $0x61, (%rbp) nop cmp %r9, %r9 lea addresses_UC_ht+0x1204a, %rsi lea addresses_A_ht+0xe7c7, %rdi nop nop nop nop nop cmp $25348, %rax mov $53, %rcx rep movsw nop nop nop and $43226, %rdi lea addresses_UC_ht+0x54db, %rsi lea addresses_D_ht+0x99f2, %rdi nop nop nop nop nop xor $31348, %r8 mov $75, %rcx rep movsl nop nop nop add %r9, %r9 lea addresses_WC_ht+0xd7ec, %rdi nop nop nop and %r9, %r9 vmovups (%rdi), %ymm4 vextracti128 $0, %ymm4, %xmm4 vpextrq $1, %xmm4, %rbp nop nop nop nop and %r9, %r9 lea addresses_UC_ht+0x7ff2, %rcx nop nop nop nop nop cmp $15866, %rbp mov (%rcx), %ax nop nop nop nop nop cmp $5878, %rbp lea addresses_UC_ht+0x83e6, %rsi clflush (%rsi) nop nop sub $37098, %rbp mov (%rsi), %r8 xor $42373, %r9 pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r9 pop %r8 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r13 push %r14 push %r15 push %r9 push %rbp push %rcx // Store lea addresses_A+0x1f242, %r14 clflush (%r14) nop nop nop nop xor %r13, %r13 mov $0x5152535455565758, %rcx movq %rcx, %xmm4 movaps %xmm4, (%r14) add %rcx, %rcx // Store lea addresses_US+0x6382, %rcx cmp $3269, %r9 movw $0x5152, (%rcx) nop nop nop add %r14, %r14 // Load lea addresses_PSE+0x17aea, %rbp nop nop nop cmp %r14, %r14 vmovups (%rbp), %ymm1 vextracti128 $0, %ymm1, %xmm1 vpextrq $0, %xmm1, %r13 nop nop nop nop dec %r13 // Faulty Load lea addresses_A+0x1cdf2, %rbp nop nop sub $8112, %r9 mov (%rbp), %rcx lea oracles, %r10 and $0xff, %rcx shlq $12, %rcx mov (%r10,%rcx,1), %rcx pop %rcx pop %rbp pop %r9 pop %r15 pop %r14 pop %r13 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_A', 'congruent': 0}} {'dst': {'same': False, 'NT': False, 'AVXalign': True, 'size': 16, 'type': 'addresses_A', 'congruent': 4}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': True, 'AVXalign': False, 'size': 2, 'type': 'addresses_US', 'congruent': 4}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_PSE', 'congruent': 2}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_A', 'congruent': 0}} <gen_prepare_buffer> {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_D_ht', 'congruent': 8}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_normal_ht', 'congruent': 6}} {'dst': {'same': False, 'NT': False, 'AVXalign': True, 'size': 1, 'type': 'addresses_UC_ht', 'congruent': 1}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_UC_ht', 'congruent': 4}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_D_ht', 'congruent': 7}} {'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 16, 'type': 'addresses_normal_ht', 'congruent': 8}} {'dst': {'same': False, 'NT': True, 'AVXalign': False, 'size': 1, 'type': 'addresses_UC_ht', 'congruent': 0}, 'OP': 'STOR'} {'dst': {'same': False, 'congruent': 0, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 2, 'type': 'addresses_UC_ht'}} {'dst': {'same': False, 'congruent': 2, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 0, 'type': 'addresses_UC_ht'}} {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_WC_ht', 'congruent': 0}} {'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 2, 'type': 'addresses_UC_ht', 'congruent': 9}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_UC_ht', 'congruent': 2}} {'00': 3} 00 00 00 */
programs/oeis/070/A070515.asm
karttu/loda
1
12856
<filename>programs/oeis/070/A070515.asm ; A070515: a(n) = n^4 mod 11. ; 0,1,5,4,3,9,9,3,4,5,1,0,1,5,4,3,9,9,3,4,5,1,0,1,5,4,3,9,9,3,4,5,1,0,1,5,4,3,9,9,3,4,5,1,0,1,5,4,3,9,9,3,4,5,1,0,1,5,4,3,9,9,3,4,5,1,0,1,5,4,3,9,9,3,4,5,1,0,1,5,4,3,9,9,3,4,5,1,0,1,5,4,3,9,9,3,4,5,1,0,1,5,4,3,9,9,3,4,5,1,0,1,5,4,3,9,9,3,4,5,1,0,1,5,4,3,9,9,3,4,5,1,0,1,5,4,3,9,9,3,4,5,1,0,1,5,4,3,9,9,3,4,5,1,0,1,5,4,3,9,9,3,4,5,1,0,1,5,4,3,9,9,3,4,5,1,0,1,5,4,3,9,9,3,4,5,1,0,1,5,4,3,9,9,3,4,5,1,0,1,5,4,3,9,9,3,4,5,1,0,1,5,4,3,9,9,3,4,5,1,0,1,5,4,3,9,9,3,4,5,1,0,1,5,4,3,9,9,3,4,5,1,0,1,5,4,3,9,9,3 mov $1,$0 pow $1,4 mod $1,11
QuickTag/QTagAppDelegate.applescript
Ryan0751/QuickTag
1
4239
-- -- QTagAppDelegate.applescript -- QuickTag -- -- Created by <NAME> on 12/14/13. -- Copyright (c) 2014 <NAME>. All rights reserved. -- script QTagAppDelegate property parent : class "NSObject" property myTitle : "QuickTag" -- Shared user defaults property defaults : missing value -- Limits property maxCategories : 8 property maxAttributes : 18 -- Interface outlets for existing track tag values property currentTrack : missing value property currentGenre : missing value property currentTaggingFieldLabel : missing value property currentTaggingField : missing value -- Interface outlets for the newly selected tag values property genreComboBox : missing value property ratingSelector : missing value property tagPreview : missing value -- Category checkbox outlets property categoryOne : missing value property categoryTwo : missing value property categoryThree : missing value property categoryFour : missing value property categoryFive : missing value property categorySix : missing value property categorySeven : missing value property categoryEight : missing value -- Attribute checkbox outlets property attributeOne : missing value property attributeTwo : missing value property attributeThree : missing value property attributeFour : missing value property attributeFive : missing value property attributeSix : missing value property attributeSeven : missing value property attributeEight : missing value property attributeNine : missing value property attributeTen : missing value property attributeEleven : missing value property attributeTwelve : missing value property attributeThirteen : missing value property attributeFourteen : missing value property attributeFifteen : missing value property attributeSixteen : missing value property attributeSeventeen : missing value property attributeEighteen : missing value -- Lists for all the above category and attribute outlets, -- for easy iteration later property categoryCheckboxList : missing value property attributeCheckboxList : missing value -- Array controllers for the configurable lists found in user preferences property genreArrayController : missing value property categoryArrayController : missing value property attributeArrayController : missing value -- Saved values, such that we can revert the user changes if requested property savedName : missing value property savedGenre : missing value property savedRating : missing value property savedTaggingField : missing value -- The lists of genres, categories and attributes, broken out from the array -- controllers for easier script use. property genreList : missing value property categoryList : missing value property attributeList : missing value -- List of all the current playlists property allPlaylistNameList : missing value -- Interface outlet for playlist selection property initialPlaylistComboBox : missing value -- Interface outlets for the configurable delimiters property genreStartDelimiter : missing value property genreEndDelimiter : missing value property categoryStartDelimiter : missing value property categoryEndDelimiter : missing value property attributeStartDelimiter : missing value property attributeEndDelimiter : missing value property ratingStartDelimiter : missing value property ratingEndDelimiter : missing value property tagSeparator : missing value property genreDelimiterEnabled : missing value property categoryDelimiterEnabled : missing value property attributeDelimiterEnabled : missing value property ratingDelimiterEnabled : missing value -- String values of the configured delimiters for convenience property genreSd : missing value property genreEd : missing value property categorySd : missing value property categoryEd : missing value property attributeSd : missing value property attributeEd : missing value property ratingSd : missing value property ratingEd : missing value property separator : missing value -- Additional tagline interface outlet property tagLine : missing value -- Tag destination interface outlets property tagDestFieldPref : missing value property tagDestPrefOverwrie : missing value property tagDestPrefPrepend : missing value property tagDestPrefAppend : missing value -- The main idle loop delay period, this should be low enough to make the app appear -- dynamic (since unfortunately we need to poll iTunes), but not so low as to impact performance. property idleLoopDelay : .5 (* * Application launch *) on applicationWillFinishLaunching_(aNotification) -- Try to access iTunes if (accessHook() is false) then try tell me to quit on error m log m return end try end if -- Set standard user defaults tell current application's NSUserDefaults to set defaults to standardUserDefaults() -- Configure some defaults into the user interface for the first time this application is run set genreDefaults to {{genre:"Genre 1"},{genre:"Genre 2"}, {genre:"Genre 3"}} set categoryDefaults to {{category:"Category 1"},{category:"Category 2"}, {category:"Category 3"}} set attributeDefaults to {{attribute:"Attribute 1"},{attribute:"Attribute 2"}, {attribute:"Attribute 3"}} set tagDefaults to {"Comments", "Category", "Grouping"} -- Place the interface outlets for all of the checkboxes into these lists so we can easily iterate over them set categoryCheckboxList to {categoryOne, categoryTwo, categoryThree, categoryFour, categoryFive, categorySix, categorySeven, categoryEight} set attributeCheckboxList to {attributeOne, attributeTwo, attributeThree, attributeFour, attributeFive, attributeSix, attributeSeven, attributeEight, attributeNine, attributeTen, attributeEleven, attributeTwelve, attributeThirteen, attributeFourteen, attributeFifteen, attributeSixteen, attributeSeventeen, attributeEighteen} -- Register user defaults log "Registering user defaults" tell defaults to registerDefaults_({tagFieldSelector:"Comments",tagDestination:"Overwrite existing value", genreStartDelim:"(", genreEndDelim:")", genreDelimEnabled:1, ratingStartDelim:"<", ratingEndDelim:">", ratingDelimEnabled:1, categoryStartDelim:"{", categoryEndDelim:"}",categoryDelimEnabled:1, attributeStartDelim:"[", attributeEndDelim:"]", attributeDelimEnabled:1, tagSeparator:",", tagField:tagDefaults, customTagline:"Tagged with QuickTag", genres:genreDefaults, categories:categoryDefaults, attributes:attributeDefaults, initialPlaylist:""}) -- Get the list of playlists, once on startup. User can refresh the list later from the preferences window. importPlaylists_(me) -- Apply preferences, grabbing current configured values and refresh the interface applyPreferences_(me) -- Select the preferred initial playlist set initList to initialPlaylistComboBox's stringValue as text try tell application id "com.apple.iTunes" to set view of front browser window to (get (first playlist whose name starts with initList)) on error log ("WARNING: applicationWillFinishLaunching_() - could not select initial playlist.") end try -- Start the idle loop, which is the event loop for all application events idleLoop_(idleLoopDelay) -- Interval in seconds end applicationWillFinishLaunching_ (* * Application termination *) on applicationShouldTerminate_(sender) log "Application terminating" return current application's NSTerminateNow end applicationShouldTerminate_ (* * Check if iTunes is active *) to checkItunesIsActive() tell application "iTunes" to return running end checkItunesIsActive (* * Check if iTunes is accessible *) on itunesIsNotAccesible() try with timeout of 10 seconds tell application id "com.apple.iTunes" to get name of library playlist 1 end timeout on error log ("ERROR: itunesIsNotAccesible() - could not get playlist name.") return true end try return false end itunesIsNotAccesible (* * Check if iTunes is runninng full-screen *) on isFullScreen() try tell application "System Events" tell process "iTunes" return (get value of attribute "AXFullScreen" of window 1) end tell end tell on error log ("iTunes is not in full-screen mode") return false end try end isFullScreen (* * Determine the state of iTunes *) on accessHook() if my checkItunesIsActive() is false then -- Start the application if not running log "Activating iTunes" tell application "iTunes" to activate return true end if if my itunesIsNotAccesible() is true then set opt to (display dialog "Please close any utility windows that may be open in iTunes" buttons {"OK"} default button 1 with title "Cannot proceed..." with icon 0 giving up after 30) return false end if if my isFullScreen() then log "iTunes is in full screen mode" delay 0.5 set opt to (display alert "iTunes is in full screen mode" message "QuickTag cannot be displayed with iTunes while in full screen mode. You can Quit and re-launch this application after taking iTunes out of full screen mode. Or you can Proceed Anyway, but iTunes will not be visible while the applet is running." buttons {"Quit", "Proceed Anyway"} default button 1 as warning giving up after 30) if button returned of opt is "quit" then tell application "iTunes" to activate return false end if end if return true end accessHook (* * The main event loop for the application. We have to poll iTunes as we don't have a * way to receive asynchronous events from it. *) on idleLoop_(secsDelay) set selectedTrackName to "" try tell application "iTunes" -- Look for a selected track if selection of front browser window is not {} then -- Copy values to our properties for use later copy name of current track to selectedTrackName copy genre of current track to selectedTrackGenre copy rating of current track to selectedTrackRating if tagDestFieldPref's stringValue() as string contains "Comments" then copy comment of current track to selectedTrackTaggingField else if tagDestFieldPref's stringValue() as string contains "Grouping" then copy grouping of current track to selectedTrackTaggingField else if tagDestFieldPref's stringValue() as string contains "Category" then copy category of current track to selectedTrackTaggingField end if else set selectedTrackName to "" end if end tell on error errorMessage number errorNumber log ("NOTICE: idleLoop_() get selected track - " & errorMessage & ", errorNumber: " & errorNumber) end try -- We have a track selected if selectedTrackName is not "" -- Grab the tag values currently in the interface set displayedTrack to currentTrack's stringValue set displayedGenre to currentGenre's stringValue set displayedTaggingField to currentTaggingField's stringValue -- Our trigger for handling a track change is when the displayed track name differs -- from the track name in iTunes. if selectedTrackName is not equal to displayedTrack as string then log "New track selected: " & selectedTrackName -- Save the original values set savedName to selectedTrackName set savedGenre to selectedTrackGenre set savedRating to selectedTrackRating set savedTaggingField to selectedTrackTaggingField -- Display the new track name currentTrack's setStringValue_(selectedTrackName) -- Update all of the new tag selection values refreshNewTagSelectors() end if if selectedTrackGenre is not equal to displayedGenre as string then currentGenre's setStringValue_(selectedTrackGenre) end if if selectedTrackTaggingField is not equal to displayedTaggingField as string then currentTaggingField's setStringValue_(selectedTrackTaggingField) end if -- Grab the delimiter values from the user interface set genreSd to genreStartDelimiter's stringValue as text set genreEd to genreEndDelimiter's stringValue as text if (genreDelimiterEnabled's state as integer) = 0 then set genreSd to "" set genreEd to "" end if set categorySd to categoryStartDelimiter's stringValue as text set categoryEd to categoryEndDelimiter's stringValue as text if (categoryDelimiterEnabled's state as integer) = 0 then set categorySd to "" set categoryEd to "" end if set attributeSd to attributeStartDelimiter's stringValue as text set attributeEd to attributeEndDelimiter's stringValue as text if (attributeDelimiterEnabled's state as integer) = 0 then set attributeSd to "" set attributeEd to "" end if set ratingSd to ratingStartDelimiter's stringValue as text set ratingEd to ratingEndDelimiter's stringValue as text if (ratingDelimiterEnabled's state as integer) = 0 then set ratingSd to "" set ratingEd to "" end if set separator to tagSeparator's stringValue as text -- Repopulate the tag preview, as this value is used in the final apply set nPc to "" set nPc to nPc & ratingSd & "Rating " & ratingSelector's integerValue() & ratingEd & separator repeat with catCount from 1 to maxCategories set aCategory to item catCount of categoryCheckboxList if (aCategory's integerValue) then set nPc to nPc & categorySd & (item catCount of categoryList) & categoryEd & separator end if end repeat repeat with attCount from 1 to maxAttributes set aAttribute to item attCount of attributeCheckboxList if (aAttribute's integerValue) then set nPc to nPc & attributeSd & (item attCount of attributeList) & attributeEd & separator end if end repeat -- Trim off any trailing tag separators set nPc to trim_line(nPc, separator, 2) set additionalTagLine to tagLine's stringValue as text if additionalTagLine is not "" then set nPc to nPc & "\n" & additionalTagLine end if if (tagDestPrefPrepend's integerValue) set nPc to nPc & "\n" & selectedTrackTaggingField else if (tagDestPrefAppend's integerValue) set nPc to selectedTrackTaggingField & "\n" & nPc end if tagPreview's setStringValue_(nPc) end if -- Restart the idle timer performSelector_withObject_afterDelay_("idleLoop:", secsDelay, secsDelay) end idleLoop_ (* * Refresh the "new" tag selectors such that they reflect the tags in the currently playing track *) on refreshNewTagSelectors() try tell application "iTunes" -- Look for a selected track if selection of front browser window is not {} then -- Copy values to our properties copy name of current track to selectedTrackName copy genre of current track to selectedTrackGenre copy rating of current track to selectedTrackRating if tagDestFieldPref's stringValue() as string contains "Comments" then copy comment of current track to selectedTrackTaggingField else if tagDestFieldPref's stringValue() as string contains "Grouping" then copy grouping of current track to selectedTrackTaggingField else if tagDestFieldPref's stringValue() as string contains "Category" then copy category of current track to selectedTrackTaggingField end if end if end tell on error errorMessage number errorNumber log ("ERROR: refreshNewTagSelectors() copy existing track tags " & errorMessage & ", errorNumber: " & errorNumber) end try -- Refresh the genre combo box repeat with theGenre in genreList if (selectedTrackGenre is equal to theGenre as string) or (selectedTrackGenre is equal to (genreSd & theGenre & genreEd)) then genreComboBox's setStringValue_(theGenre) exit repeat end if end repeat -- iTunes uses a rating scale up to 100, so we need to divide by 20 to have 5 star slots ratingSelector's setDoubleValue_(selectedTrackRating / 20) -- Set the initial category checkbox states to off repeat with aCategory in categoryCheckboxList aCategory's setIntegerValue_(0) end repeat -- If the category is configured, enable the check box repeat with theCategoryIndex from 1 to count of the categoryList try if selectedTrackTaggingField contains (categorySd & (item theCategoryIndex of categoryList) & categoryEd) then if theCategoryIndex is less than or equal to maxCategories then set aCategory to item theCategoryIndex of categoryCheckboxList aCategory's setIntegerValue_(1) end if end if on error errorMessage number errorNumber log ("ERROR: refreshNewTagSelectors() set categories - " & errorMessage & ", errorNumber: " & errorNumber) end try end repeat -- Set the initial attribute checkbox states to off repeat with aAttribute in attributeCheckboxList aAttribute's setIntegerValue_(0) end repeat -- If the attribute is configured, enable the check box repeat with theAttributeIndex from 1 to count of the attributeList try if selectedTrackTaggingField contains (attributeSd & (item theAttributeIndex of attributeList) & attributeEd) then if theAttributeIndex is less than or equal to maxAttributes then set aAttribute to item theAttributeIndex of attributeCheckboxList aAttribute's setIntegerValue_(1) end if end if on error errorMessage number errorNumber log ("ERROR: refreshNewTagSelectors() set attributes - " & errorMessage & ", errorNumber: " & errorNumber) end try end repeat end refreshNewTagSelectors (* * Set up the interface based on the configured user preferences *) on setupInterface() log "Setting up the user interface" -- Set the current track tagging field label to comments/grouping/etc set label to tagDestFieldPref's stringValue() as string & ":" currentTaggingFieldLabel's setStringValue_(label) -- Set up the pull down of genres genreComboBox's removeAllItems() genreComboBox's addItemsWithObjectValues_(genreList) -- Set up the category checkboxes for those configured -- First, disable them all and then make the ones configured visible repeat with aCategory in categoryCheckboxList aCategory's setTransparent_(1) aCategory's setEnabled_(0) end repeat repeat with catIndex from 1 to count of the categoryList set aCategory to item catIndex of categoryCheckboxList aCategory's setTransparent_(0) aCategory's setEnabled_(1) aCategory's setTitle_(item catIndex of categoryList) end repeat -- Set up the attribute checkboxes for those configured -- First, disable them all and then make the ones configured visible repeat with aAttribute in attributeCheckboxList aAttribute's setTransparent_(1) aAttribute's setEnabled_(0) end repeat repeat with attIndex from 1 to count of the attributeList set aAttribute to item attIndex of attributeCheckboxList aAttribute's setTransparent_(0) aAttribute's setEnabled_(1) aAttribute's setTitle_(item attIndex of attributeList) end repeat end setupInterface (* * Apply button clicked, update track tags in iTunes *) on applyChanges_(sender) log "Applying changes for track: " & savedName try tell application "iTunes" set newGenre to genreComboBox's stringValue as text if newGenre is not "" then set genre of current track to genreSd & newGenre & genreEd end if -- Multiply rating by 20 to get it in a scale of 1-100 for iTunes set rating of current track to ratingSelector's doubleValue() * 20 set newTags to (tagPreview's stringValue as text) if newTags is not "" then if tagDestFieldPref's stringValue() as string contains "Comments" then set comment of current track to (tagPreview's stringValue as text) else if tagDestFieldPref's stringValue() as string contains "Grouping" then set grouping of current track to (tagPreview's stringValue as text) else if tagDestFieldPref's stringValue() as string contains "Category" then set category of current track to (tagPreview's stringValue as text) end if end if end tell on error errorMessage number errorNumber log ("ERROR: applyChanges_() - " & errorMessage & ", errorNumber: " & errorNumber) end try end applyChanges (* * Revert button clicked, revert to original tag values *) on revertChanges_(sender) set opt to (display alert "Revert Changes?" message "Revert track tags to the original values?" buttons {"Cancel", "Revert"} default button 1 as warning giving up after 30) if button returned of opt is "Revert" then log "Reverting changes for track: " & savedName try tell application "iTunes" set genre of current track to savedGenre set rating of current track to savedRating if tagDestFieldPref's stringValue() as string contains "Comments" then set comment of current track to savedTaggingField else if tagDestFieldPref's stringValue() as string contains "Grouping" then set grouping of current track to savedTaggingField else if tagDestFieldPref's stringValue() as string contains "Category" then set category of current track to savedTaggingField end if end tell on error errorMessage number errorNumber log ("ERROR: revertChanges_() - " & errorMessage & ", errorNumber: " & errorNumber) end try refreshNewTagSelectors() return true else log "Revert cancelled" end if end revertChanges (* * Can we add a new category callback *) on canAddCategory_() set newCategories to (categoryArrayController's arrangedObjects()) as list if count of newCategories is greater than or equal to maxCategories then log "Cannot add any more categories" return 0 end if return 1 end canAddCategory (* * Can we add a new attribute callback *) on canAddAttribute_() set newAttributes to (attributeArrayController's arrangedObjects()) as list if count of newAttributes is greater than or equal to maxAttributes then log "Cannot add any more attributes" return 0 end if return 1 end canAddAttribute (* * Apply user preferences button clicked, update the interface *) on applyPreferences_(sender) log "Applying user preferences" set newGenres to (genreArrayController's arrangedObjects()) as list if count of newGenres is not 0 then set genreList to {} end if repeat with aGenre in newGenres try set theName to genre of aGenre set genreList to genreList & theName on error errorMessage number errorNumber log ("ERROR: applyPreferences_() genre - " & errorMessage & ", errorNumber: " & errorNumber) end try end repeat set newCategories to (categoryArrayController's arrangedObjects()) as list if count of newCategories is greater than maxCategories then display alert "QuickTag only supports up to " & maxCategories & " categories.\n\nOnly the first " & maxCategories & " will be displayed." end if if count of newCategories is not 0 then set categoryList to {} end if repeat with aCategory in newCategories try set theCategory to category of aCategory set categoryList to categoryList & theCategory on error errorMessage number errorNumber log ("ERROR: applyPreferences_() category - " & errorMessage & ", errorNumber: " & errorNumber) end try end repeat set newAttributes to (attributeArrayController's arrangedObjects()) as list if count of newAttributes is greater than maxAttributes then display alert "QuickTag only supports up to " & maxAttributes & " attributes.\n\nOnly the first " & maxAttributes & " will be displayed." end if if count of newAttributes is not 0 then set attributeList to {} end if repeat with aAttribute in newAttributes try set theAttribute to attribute of aAttribute set attributeList to attributeList & theAttribute on error errorMessage number errorNumber log ("ERROR: applyPreferences_() attribute - " & errorMessage & ", errorNumber: " & errorNumber) end try end repeat -- Finally, refresh the interface with the new values log "Refreshing user interface with new preferences" setupInterface() end applyPreferences (* * Get a list of unique genres from iTunes, for importing to the genre list *) on importGenres_(sender) set opt to (display alert "Import genres from iTunes?" message "Import all existing genres found in existing tracks in iTunes? \n\nThis may take up to several minutes depending on the size of your collection." buttons {"Cancel", "Import"} default button 1 as warning giving up after 30) if button returned of opt is "import" then log "Importing genre list from iTunes" try tell application "iTunes" set len to count of tracks repeat with num from 1 to len if num is equal to 1 then set importGenreList to {} set gen to genre of track num if gen is not in importGenreList then copy gen to the end of importGenreList end repeat end tell on error errorMessage number errorNumber log ("ERROR: importGenres_() - " & errorMessage & ", errorNumber: " & errorNumber) end try log "Imported genre list: " & importGenrelist set tempList to {} repeat with i from 1 to count of importGenrelist set end of tempList to {genre:item i of importGenrelist} end repeat tell genreArrayController to addObjects_(tempList) end if end importGenres (* * Get a list of the current playlists from iTunes, update the playlist selector combo box *) on importPlaylists_(sender) log "Importing playlists from iTunes" -- Get the current names of playlists try tell application id "com.apple.iTunes" set allPlaylistNameList to the name of every playlist end tell on error log("ERROR: importPlaylists_() - Unable to retrieve all playlist names") end try log "Playlist names are: " & allPlayListNameList -- Set up the pull down of playlists initialPlaylistComboBox's removeAllItems() initialPlaylistComboBox's addItemsWithObjectValues_(allPlaylistNameList) end importPlaylists (* * Trims "trim_chars" from "this_text". Trim indicator specifies where to trim: * 0 - beginning, 1 - end, 2 - both. *) on trim_line(this_text, trim_chars, trim_indicator) -- 0 = beginning, 1 = end, 2 = both set x to the length of the trim_chars -- Trim beginning if the trim_indicator is in {0, 2} then repeat while this_text begins with the trim_chars try set this_text to characters (x + 1) thru -1 of this_text as string on error -- the text contains nothing but the trim characters return "" end try end repeat end if -- Trim ending if the trim_indicator is in {1, 2} then repeat while this_text ends with the trim_chars try set this_text to characters 1 thru -(x + 1) of this_text as string on error -- the text contains nothing but the trim characters return "" end try end repeat end if return this_text end trim_line end script -- End of application
alloy4fun_models/trashltl/models/17/ZXmB8Q9qwwERJwvqZ.als
Kaixi26/org.alloytools.alloy
0
2440
<reponame>Kaixi26/org.alloytools.alloy open main pred idZXmB8Q9qwwERJwvqZ_prop18 { all p:Protected | always p in File - Protected iff after p in Trash } pred __repair { idZXmB8Q9qwwERJwvqZ_prop18 } check __repair { idZXmB8Q9qwwERJwvqZ_prop18 <=> prop18o }
alloy4fun_models/trashltl/models/5/R9zoZdwgggne2SXaf.als
Kaixi26/org.alloytools.alloy
0
3040
open main pred idR9zoZdwgggne2SXaf_prop6 { all f:File | f in Trash implies (always f in Trash) } pred __repair { idR9zoZdwgggne2SXaf_prop6 } check __repair { idR9zoZdwgggne2SXaf_prop6 <=> prop6o }
alice2/brads_alice2_archive/asm/strcpy.asm
lkesteloot/alice
63
104856
; ; char *strcpy(char *dst, char *src) -- just like C ; _strcpy PUSH IY LD IY, 0 ADD IY, SP PUSH AF PUSH IX LD L, (IY + 4) ; destination into IX LD H, (IY + 5) PUSH HL PUSH HL POP IX LD L, (IY + 6) ; source into HL LD H, (IY + 7) STRCPY_NEXT_BYTE LD A, (HL) LD (IX), A INC HL INC IX CP 0 JP NZ, STRCPY_NEXT_BYTE POP HL ; return the destination POP IX POP AF POP IY RET
Relator/Congruence/Proofs.agda
Lolirofle/stuff-in-agda
6
58
module Relator.Congruence.Proofs where import Lvl open import Functional open import Logic.Propositional open import Logic.Predicate -- TODO: open import Structure.Function.Domain open import Structure.Relator.Equivalence open import Structure.Relator.Properties open import Relator.Congruence open import Relator.Equals open import Relator.Equals.Proofs open import Structure.Function.Names open import Syntax.Transitivity open import Type module _ {ℓ₁ β„“β‚‚} {X : Type{ℓ₁}}{Y : Type{β„“β‚‚}} {f : X β†’ Y} where instance [β‰…]-reflexivity : Reflexivity (_β‰…_of f) Reflexivity.proof([β‰…]-reflexivity) = [β‰…]-intro [≑]-intro instance [β‰…]-symmetry : Symmetry (_β‰…_of f) Symmetry.proof([β‰…]-symmetry) = ([β‰…]-intro ∘ symmetry(_≑_) ∘ [β‰…]-elim) instance [β‰…]-transitivity : Transitivity (_β‰…_of f) Transitivity.proof([β‰…]-transitivity) (eq1) (eq2) = [β‰…]-intro(([β‰…]-elim eq1) πŸ– ([β‰…]-elim eq2)) instance [β‰…]-equivalence : Equivalence (_β‰…_of f) [β‰…]-equivalence = record { reflexivity = [β‰…]-reflexivity ; symmetry = [β‰…]-symmetry ; transitivity = [β‰…]-transitivity } [β‰…]-to-[≑] : Injective(f) ↔ (βˆ€{x₁ xβ‚‚ : X} β†’ (x₁ β‰… xβ‚‚ of f) β†’ (x₁ ≑ xβ‚‚)) [β‰…]-to-[≑] = [↔]-intro (_∘ [β‰…]-intro) (_∘ [β‰…]-elim) module _ {ℓ₁ β„“β‚‚ ℓ₃} {X₁ : Type{ℓ₁}}{Xβ‚‚ : Type{β„“β‚‚}}{Y : Type{ℓ₃}} where [β‰…]-composition : βˆ€{x₁ xβ‚‚ : X₁}{g : X₁ β†’ Xβ‚‚} β†’ (x₁ β‰… xβ‚‚ of g) β†’ βˆ€{f : Xβ‚‚ β†’ Y} β†’ (g(x₁) β‰… g(xβ‚‚) of f) [β‰…]-composition ([β‰…]-intro (fx₁≑fxβ‚‚)) {f} = [β‰…]-intro ([≑]-with(f) (fx₁≑fxβ‚‚)) -- x₁ β‰… xβ‚‚ -- ⇔ g(x₁) = g(xβ‚‚) -- β‡’ f(g(x₁)) = f(g(xβ‚‚))
data/pokemon/base_stats/pinsir.asm
AtmaBuster/pokeplat-gen2
6
26490
db 0 ; species ID placeholder db 65, 125, 100, 85, 55, 70 ; hp atk def spd sat sdf db BUG, BUG ; type db 45 ; catch rate db 200 ; base exp db NO_ITEM, NO_ITEM ; items db GENDER_F50 ; gender ratio db 25 ; step cycles to hatch INCBIN "gfx/pokemon/pinsir/front.dimensions" db GROWTH_SLOW ; growth rate dn EGG_BUG, EGG_BUG ; egg groups db 70 ; happiness ; tm/hm learnset tmhm FOCUS_PUNCH, TOXIC, BULK_UP, HIDDEN_POWER, SUNNY_DAY, PROTECT, RAIN_DANCE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, BRICK_BREAK, DOUBLE_TEAM, ROCK_TOMB, FACADE, SECRET_POWER, REST, ATTRACT, THIEF, FOCUS_BLAST, FALSE_SWIPE, FLING, ENDURE, GIGA_IMPACT, STONE_EDGE, SWORDS_DANCE, STEALTH_ROCK, CAPTIVATE, ROCK_SLIDE, X_SCISSOR, SLEEP_TALK, NATURAL_GIFT, SWAGGER, SUBSTITUTE, CUT, STRENGTH, ROCK_SMASH, ROCK_CLIMB, FURY_CUTTER, IRON_DEFENSE, KNOCK_OFF, SNORE, SUPERPOWER ; end
test/Fail/Issue1994.agda
KDr2/agda
0
13886
{- Example by <NAME>, 2016-05-23 -} {-# OPTIONS --rewriting --cubical-compatible #-} open import Agda.Builtin.Equality public infix 6 I─_ postulate 𝕀 : Set O : 𝕀 I : 𝕀 I─_ : 𝕀 β†’ 𝕀 {-# BUILTIN REWRITE _≑_ #-} postulate I─O≑I : I─ O ≑ I {-# REWRITE I─O≑I #-} data Pth (A : Set) : A β†’ A β†’ Set where path : (f : 𝕀 β†’ A) β†’ Pth A (f O) (f I) infix 6 _at_ _at_ : {A : Set}{x y : A} β†’ Pth A x y β†’ 𝕀 β†’ A path f at i = f i record Path (A : Set)(x y : A) : Set where field pth : Pth A x y feq : pth at O ≑ x seq : pth at I ≑ y open Path public {-# REWRITE feq #-} {-# REWRITE seq #-} infix 6 _β€²_ _β€²_ : {A : Set}{x y : A} β†’ Path A x y β†’ 𝕀 β†’ A p β€² i = pth p at i fun2path : {A : Set}(f : 𝕀 β†’ A) β†’ Path A (f O) (f I) pth (fun2path f) = path f feq (fun2path f) = refl seq (fun2path f) = refl inv : {A : Set}{x y : A} β†’ Path A x y β†’ Path A y x inv p = fun2path (Ξ» i β†’ p β€² (I─ i))
programs/oeis/106/A106387.asm
neoneye/loda
22
101511
; A106387: Numbers j such that 6j^2 + 6j + 1 = 11k. ; 4,6,15,17,26,28,37,39,48,50,59,61,70,72,81,83,92,94,103,105,114,116,125,127,136,138,147,149,158,160,169,171,180,182,191,193,202,204,213,215,224,226,235,237,246,248,257,259,268,270,279,281,290,292,301,303 mov $1,$0 div $0,2 mul $0,7 add $0,$1 add $0,$1 add $0,4
specs/ada/server/ees/tkmrpc-dispatchers-ees.ads
DrenfongWong/tkm-rpc
0
654
with Tkmrpc.Request; with Tkmrpc.Response; package Tkmrpc.Dispatchers.Ees is procedure Dispatch (Req : Request.Data_Type; Res : out Response.Data_Type); -- Dispatch EES request to concrete operation handler. end Tkmrpc.Dispatchers.Ees;
oeis/098/A098662.asm
neoneye/loda-programs
11
175296
; A098662: E.g.f. BesselI(0,2*sqrt(3)*x) + BesselI(1,2*sqrt(3)*x)/sqrt(3). ; 1,1,6,9,54,90,540,945,5670,10206,61236,112266,673596,1250964,7505784,14073345,84440070,159497910,956987460,1818276174,10909657044,20827527084,124965162504,239516561466,1437099368796,2763652632300,16581915793800,31979409030900,191876454185400,370961144758440,2225766868550640,4312423307816865,25874539846901190,50227047938102310,301362287628613860,585982225944526950,3515893355667161700,6846739692614999100,41080438155689994600,80106854403595489470,480641126421572936820,938394580156404305220 mov $1,$0 div $1,2 bin $0,$1 mov $2,3 pow $2,$1 mul $0,$2
lib/libc/setjmp.asm
archibate/Lake-OS
1
89889
<reponame>archibate/Lake-OS ; vim: ft=nasm ai [BITS 32] global setjmp [SECTION .text] setjmp: mov [ecx+0], esi mov [ecx+4], edi mov [ecx+8], ebx mov [ecx+12], ebp mov [ecx+16], esp ret longjmp: mov esi, [ecx+0] mov edi, [ecx+4] mov ebx, [ecx+8] mov ebp, [ecx+12] mov esp, [ecx+16] mov eax, edx ret
testfiles/loop.asm
ger-ald/pcmac
0
169106
;LOOP.ASM ;Demo program for looping directives ;This file contains two macro definitions ;for the same purpose. The first version (DEFS) ;works when the argument is 0. The second one ;works only for argument greater then zero. ;This program can not be compiled because ;the last macro tries to generate 100000000 bytes. ;I don't think you can wait until it finishes. ;If you start the compilation of this program ;do use the option -l and when you are tired ;looking the zeroes press CTRL+BREAK! macro("DEFS *",NUMERIC) #ifndef defs var defs #endif defs := #0 #while defs>0 DB 0 defs := defs - 1 #wend endm macro("SKIP *",NUMERIC) #ifndef skip var skip #endif skip := #0 #repeat DB 0 skip := skip - 1 #until skip=0 endm DEFS 10 SKIP 10 DEFS 0 SKIP 0 ;End of file LOOP.ASM 
_incObj/Sonic Floor.asm
kodishmediacenter/msu-md-sonic
9
173005
; --------------------------------------------------------------------------- ; Subroutine for Sonic to interact with the floor after jumping/falling ; --------------------------------------------------------------------------- ; ||||||||||||||| S U B R O U T I N E ||||||||||||||||||||||||||||||||||||||| Sonic_Floor: move.w obVelX(a0),d1 move.w obVelY(a0),d2 jsr (CalcAngle).l move.b d0,($FFFFFFEC).w subi.b #$20,d0 move.b d0,($FFFFFFED).w andi.b #$C0,d0 move.b d0,($FFFFFFEE).w cmpi.b #$40,d0 beq.w loc_13680 cmpi.b #$80,d0 beq.w loc_136E2 cmpi.b #$C0,d0 beq.w loc_1373E bsr.w Sonic_HitWall tst.w d1 bpl.s loc_135F0 sub.w d1,obX(a0) move.w #0,obVelX(a0) loc_135F0: bsr.w sub_14EB4 tst.w d1 bpl.s loc_13602 add.w d1,obX(a0) move.w #0,obVelX(a0) loc_13602: bsr.w Sonic_HitFloor move.b d1,($FFFFFFEF).w tst.w d1 bpl.s locret_1367E move.b obVelY(a0),d2 addq.b #8,d2 neg.b d2 cmp.b d2,d1 bge.s loc_1361E cmp.b d2,d0 blt.s locret_1367E loc_1361E: add.w d1,obY(a0) move.b d3,obAngle(a0) bsr.w Sonic_ResetOnFloor move.b #id_Walk,obAnim(a0) move.b d3,d0 addi.b #$20,d0 andi.b #$40,d0 bne.s loc_1365C move.b d3,d0 addi.b #$10,d0 andi.b #$20,d0 beq.s loc_1364E asr obVelY(a0) bra.s loc_13670 ; =========================================================================== loc_1364E: move.w #0,obVelY(a0) move.w obVelX(a0),obInertia(a0) rts ; =========================================================================== loc_1365C: move.w #0,obVelX(a0) cmpi.w #$FC0,obVelY(a0) ble.s loc_13670 move.w #$FC0,obVelY(a0) loc_13670: move.w obVelY(a0),obInertia(a0) tst.b d3 bpl.s locret_1367E neg.w obInertia(a0) locret_1367E: rts ; =========================================================================== loc_13680: bsr.w Sonic_HitWall tst.w d1 bpl.s loc_1369A sub.w d1,obX(a0) move.w #0,obVelX(a0) move.w obVelY(a0),obInertia(a0) rts ; =========================================================================== loc_1369A: bsr.w Sonic_DontRunOnWalls tst.w d1 bpl.s loc_136B4 sub.w d1,obY(a0) tst.w obVelY(a0) bpl.s locret_136B2 move.w #0,obVelY(a0) locret_136B2: rts ; =========================================================================== loc_136B4: tst.w obVelY(a0) bmi.s locret_136E0 bsr.w Sonic_HitFloor tst.w d1 bpl.s locret_136E0 add.w d1,obY(a0) move.b d3,obAngle(a0) bsr.w Sonic_ResetOnFloor move.b #id_Walk,obAnim(a0) move.w #0,obVelY(a0) move.w obVelX(a0),obInertia(a0) locret_136E0: rts ; =========================================================================== loc_136E2: bsr.w Sonic_HitWall tst.w d1 bpl.s loc_136F4 sub.w d1,obX(a0) move.w #0,obVelX(a0) loc_136F4: bsr.w sub_14EB4 tst.w d1 bpl.s loc_13706 add.w d1,obX(a0) move.w #0,obVelX(a0) loc_13706: bsr.w Sonic_DontRunOnWalls tst.w d1 bpl.s locret_1373C sub.w d1,obY(a0) move.b d3,d0 addi.b #$20,d0 andi.b #$40,d0 bne.s loc_13726 move.w #0,obVelY(a0) rts ; =========================================================================== loc_13726: move.b d3,obAngle(a0) bsr.w Sonic_ResetOnFloor move.w obVelY(a0),obInertia(a0) tst.b d3 bpl.s locret_1373C neg.w obInertia(a0) locret_1373C: rts ; =========================================================================== loc_1373E: bsr.w sub_14EB4 tst.w d1 bpl.s loc_13758 add.w d1,obX(a0) move.w #0,obVelX(a0) move.w obVelY(a0),obInertia(a0) rts ; =========================================================================== loc_13758: bsr.w Sonic_DontRunOnWalls tst.w d1 bpl.s loc_13772 sub.w d1,obY(a0) tst.w obVelY(a0) bpl.s locret_13770 move.w #0,obVelY(a0) locret_13770: rts ; =========================================================================== loc_13772: tst.w obVelY(a0) bmi.s locret_1379E bsr.w Sonic_HitFloor tst.w d1 bpl.s locret_1379E add.w d1,obY(a0) move.b d3,obAngle(a0) bsr.w Sonic_ResetOnFloor move.b #id_Walk,obAnim(a0) move.w #0,obVelY(a0) move.w obVelX(a0),obInertia(a0) locret_1379E: rts ; End of function Sonic_Floor
programs/oeis/074/A074092.asm
karttu/loda
0
99325
; A074092: Number of plane binary trees of size n+3 and contracted height n. ; 1,2,8,40,144,448,1280,3456,8960,22528,55296,133120,315392,737280,1703936,3899392,8847360,19922944,44564480,99090432,219152384,482344960,1056964608,2306867200,5016387584,10871635968,23488102400 mov $1,2 mov $2,$0 mov $3,$0 lpb $2,1 lpb $0,1 sub $0,1 add $3,$2 lpe trn $3,4 add $3,3 mov $1,$3 sub $2,1 mul $3,2 lpe sub $1,1
progs/modulo-viluon.asm
CoderPuppy/viluons-machine
0
6254
?K2 2 K2-- JMP -3 ?K3 2 K3-- JMP -3 ?K7 3 K1++ K7-- JMP -4 ?K1 4 K7++ K2++ K1-- JMP -5 ?K8 3 K1++ K8-- JMP -4 ?K1 4 K8++ K3++ K1-- JMP -5 ?K2 17 ?K3 3 K2-- K3-- JMP -5 ?K7 2 K7-- JMP -3 ?K2 3 K1++ K2-- JMP -4 ?K1 4 K2++ K7++ K1-- JMP -5 JMP -27 ?K3 1 JMP 3 ?K7 2 K7-- JMP -3
src/lv-tasks.ads
Fabien-Chouteau/ada-lvlg
3
6349
<reponame>Fabien-Chouteau/ada-lvlg with System; package Lv.Tasks is type Instance is private; type Prio_T is (Prio_Off, Prio_Lowest, Prio_Low, Prio_Mid, Prio_High, Prio_Highest, Prio_Num); -- Call it periodically to handle lv_tasks. procedure Handler; -- Create a new lv_task -- @param task a function which is the task itself -- @param period call period in ms unit -- @param prio priority of the task (LV_TASK_PRIO_OFF means the task is stopped) -- @param param free parameter -- @return pointer to the new task function Create (Proc : access procedure (Param : System.Address); Period : Uint32_T; Prio : Prio_T; Param : System.Address) return Instance; -- Delete a lv_task -- @param lv_task_p pointer to task created by lv_task_p procedure Del (Self : Instance); -- Set new priority for a lv_task -- @param lv_task_p pointer to a lv_task -- @param prio the new priority procedure Set_Prio (Self : Instance; Prio : Prio_T); -- Set new period for a lv_task -- @param lv_task_p pointer to a lv_task -- @param period the new period procedure Set_Period (Self : Instance; Period : Uint32_T); -- Make a lv_task ready. It will not wait its period. -- @param lv_task_p pointer to a lv_task. procedure Ready (Self : Instance); -- Delete the lv_task after one call -- @param lv_task_p pointer to a lv_task. procedure Once (Self : Instance); -- Reset a lv_task. -- It will be called the previously set period milliseconds later. -- @param lv_task_p pointer to a lv_task. procedure Reset (Self : Instance); -- Enable or disable the whole lv_task handling -- @param en: true: lv_task handling is running, false: lv_task handling is suspended procedure Enable (En : U_Bool); -- Get idle percentage -- @return the lv_task idle in percentage function Get_Idle return Uint8_T; private type Instance is new System.Address; -- This Init is already called in lv_init() procedure Init; ------------- -- Imports -- ------------- pragma Import (C, Handler, "lv_task_handler"); pragma Import (C, Create, "lv_task_create"); pragma Import (C, Del, "lv_task_del"); pragma Import (C, Set_Prio, "lv_task_set_prio"); pragma Import (C, Set_Period, "lv_task_set_period"); pragma Import (C, Ready, "lv_task_ready"); pragma Import (C, Once, "lv_task_once"); pragma Import (C, Reset, "lv_task_reset"); pragma Import (C, Enable, "lv_task_enable"); pragma Import (C, Get_Idle, "lv_task_get_idle"); pragma Import (C, Init, "lv_task_init"); for Prio_T'Size use 8; for Prio_T use (Prio_Off => 0, Prio_Lowest => 1, Prio_Low => 2, Prio_Mid => 3, Prio_High => 4, Prio_Highest => 5, Prio_Num => 6); end Lv.Tasks;
oeis/077/A077828.asm
neoneye/loda-programs
11
244031
; A077828: Expansion of 1/(1-3*x-3*x^2-3*x^3). ; Submitted by <NAME>(s2) ; 1,3,12,48,189,747,2952,11664,46089,182115,719604,2843424,11235429,44395371,175422672,693160416,2738935377,10822555395,42763953564,168976333008,667688525901,2638286437419,10424853888984,41192486556912,162766880649945,643152663287523 mov $2,1 lpb $0 sub $0,1 mul $2,3 mov $3,$4 mov $4,$2 add $2,$3 add $2,$5 mov $5,$3 lpe mov $0,$2
llvm-gcc-4.2-2.9/gcc/ada/s-tasinf-solaris.ads
vidkidz/crossbridge
1
1442
<filename>llvm-gcc-4.2-2.9/gcc/ada/s-tasinf-solaris.ads ------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S Y S T E M . T A S K _ I N F O -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package contains the definitions and routines associated with the -- implementation and use of the Task_Info pragma. It is specialized -- appropriately for targets that make use of this pragma. -- Note: the compiler generates direct calls to this interface, via Rtsfind. -- Any changes to this interface may require corresponding compiler changes. -- This unit may be used directly from an application program by providing -- an appropriate WITH, and the interface can be expected to remain stable. -- This is the Solaris (native) version of this module. with System.OS_Interface; package System.Task_Info is pragma Preelaborate; pragma Elaborate_Body; -- To ensure that a body is allowed ----------------------------------------------------- -- Binding of Tasks to LWPs and LWPs to processors -- ----------------------------------------------------- -- The Solaris implementation of the GNU Low-Level Interface (GNULLI) -- implements each Ada task as a Solaris thread. The Solaris thread -- library distributes threads across one or more LWPs (Light Weight -- Process) that are members of the same process. Solaris distributes -- processes and LWPs across the available CPUs on a given machine. The -- pragma Task_Info provides the mechanism to control the distribution -- of tasks to LWPs, and LWPs to processors. -- Each thread has a number of attributes that dictate it's scheduling. -- These attributes are: -- -- New_LWP: whether a new LWP is created for this thread. -- -- Bound_To_LWP: whether the thread is bound to a specific LWP -- for its entire lifetime. -- -- CPU: the CPU number associated to the LWP -- -- The Task_Info pragma: -- pragma Task_Info (EXPRESSION); -- allows the specification on a task by task basis of a value of type -- System.Task_Info.Task_Info_Type to be passed to a task when it is -- created. The specification of this type, and the effect on the task -- that is created is target dependent. -- The Task_Info pragma appears within a task definition (compare the -- definition and implementation of pragma Priority). If no such pragma -- appears, then the value Task_Info_Unspecified is passed. If a pragma -- is present, then it supplies an alternative value. If the argument of -- the pragma is a discriminant reference, then the value can be set on -- a task by task basis by supplying the appropriate discriminant value. -- Note that this means that the type used for Task_Info_Type must be -- suitable for use as a discriminant (i.e. a scalar or access type). ----------------------- -- Thread Attributes -- ----------------------- subtype CPU_Number is System.OS_Interface.processorid_t; CPU_UNCHANGED : constant CPU_Number := System.OS_Interface.PBIND_QUERY; -- Do not bind the LWP to a specific processor ANY_CPU : constant CPU_Number := System.OS_Interface.PBIND_NONE; -- Bind the LWP to any processor Invalid_CPU_Number : exception; type Thread_Attributes (New_LWP : Boolean) is record Bound_To_LWP : Boolean := True; case New_LWP is when False => null; when True => CPU : CPU_Number := CPU_UNCHANGED; end case; end record; Default_Thread_Attributes : constant Thread_Attributes := (False, True); function Unbound_Thread_Attributes return Thread_Attributes; function Bound_Thread_Attributes return Thread_Attributes; function Bound_Thread_Attributes (CPU : CPU_Number) return Thread_Attributes; type Task_Info_Type is access all Thread_Attributes; function New_Unbound_Thread_Attributes return Task_Info_Type; function New_Bound_Thread_Attributes return Task_Info_Type; function New_Bound_Thread_Attributes (CPU : CPU_Number) return Task_Info_Type; Unspecified_Task_Info : constant Task_Info_Type := null; end System.Task_Info;
kernel/memory/pagemanager.asm
Twometer/nekosys
1
171390
<reponame>Twometer/nekosys global enable_paging enable_paging: push eax mov eax, cr0 or eax, 0x80000000 ; set paging bit mov cr0, eax pop eax ret global load_page_directory load_page_directory: push eax mov eax, [esp + 8] mov cr3, eax pop eax ret
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_1299.asm
ljhsiun2/medusa
9
90312
<reponame>ljhsiun2/medusa<filename>Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_1299.asm .global s_prepare_buffers s_prepare_buffers: push %r11 push %r14 push %r15 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0x8f0c, %r15 clflush (%r15) nop nop nop add $48828, %r11 movb $0x61, (%r15) nop cmp $23230, %rbx lea addresses_WT_ht+0x76d8, %rsi lea addresses_D_ht+0x6d8, %rdi nop nop sub %r14, %r14 mov $45, %rcx rep movsq nop nop nop nop add %rdi, %rdi pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r15 pop %r14 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r15 push %rax push %rbp push %rbx push %rcx // Faulty Load lea addresses_RW+0x90d8, %r11 nop nop nop nop sub %rbx, %rbx mov (%r11), %ebp lea oracles, %r11 and $0xff, %rbp shlq $12, %rbp mov (%r11,%rbp,1), %rbp pop %rcx pop %rbx pop %rbp pop %rax pop %r15 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_RW', 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_RW', 'congruent': 0}} <gen_prepare_buffer> {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_D_ht', 'congruent': 2}, 'OP': 'STOR'} {'dst': {'same': False, 'congruent': 7, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_WT_ht'}} {'32': 21829} 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 */
EMPU_spec.asm
Lisoph/empu
0
179360
<reponame>Lisoph/empu<filename>EMPU_spec.asm<gh_stars>0 ; EMPU (Eazy memory processing unit) V1.0 Spec ; No registers - all operations operate on memory directly. ; EMPU has one dynamic addressing mode instead of a direct, register indirect and memory indirect. ; The dynamic addressing mode can achieve indirect addressing up to 4 levels. Level 1 is "direct". ; Examples: mov word @0x100, 0x400 ; Move the value 0x123 into mem[0x100] add word @0x100, 5 ; Add the value 5 to mem[0x100] mov word @0x1400, @@0x100 ; Move the value at mem[mem[0x100]] into mem[0x1400] mov word @0x1400, @0x405 ; Same as the 3 lines above mov word 0x100, 0x200 ; syntax error - left hand side must be an address '@' ; unit = (byte | word | dword) ; Instructions and their encodings ; The first 4 highest bits of an instructions it always the opcode ID. ; U = Unit, I = Ins2 (0 - 4 for mov, add, ...), ; L = lhs addressing level, R = rhs addressing level, D/F = destination address, S = source address, ; A = 8bit value, AB = 16bit value, ABCD = 32bit value (mov | add | sub | mul | div) unit destination, source ; 0000UU00 III0LLRR DDDDDDDD DDDDDDDD SSSSSSSS SSSSSSSS (mov | add | sub | mul | div) unit destination, value ; 0000UU01 III0LL00 FFFFFFFF FFFFFFFF AAAAAAAA (BBBBBBBB (CCCCCCCC DDDDDDDD)) ; U = unit, L = lhs addressing level, R = rhs addressing level, A = lhs address, B = rhs address, ; V = 8bit value, VX = 16bit value, VXYZ = 32bit value cmp unit address1, address2 ; 0001UULL 0RR00000 AAAAAAAA AAAAAAAA BBBBBBBB BBBBBBBB cmp unit address, value ; 0001UULL 10000000 AAAAAAAA AAAAAAAA VVVVVVVV(XXXXXXXX(YYYYYYYY ZZZZZZZZ)) ; M = Ins2 (0 - 3 for jg, je, ...), L = addressing level, A = address (jg | je | jl | jmp) address ; 0010MMLL AAAAAAAA AAAAAAAA ; I = interrupt id, A = address int id ; 00110000 IIIIIIII iret ; 00110001 ; M = Ins2 (0 - 5 for and, or, ...), U = unit, L = lhs addressing level, D = address, ; A = 8bit value, AB = 16bit value, ABCD = 32bit value ; R = source addressing mode, S = source address (and | or | xor | not | shl | shr) address value ; 01000MMM UULL0001 DDDDDDDD DDDDDDDD AAAAAAAA (BBBBBBBB (CCCCCCCC DDDDDDDD)) (and | or | xor | not | shl | shr) unit destination source ; 01000MMM UULLRR00 DDDDDDDD DDDDDDDD SSSSSSSS SSSSSSSS ; Example program: add: add @.a, @.b ; add whatever is in .b to .a jmp @.ret .a: db 2 ; reserve 2 bytes of memory at this location .b: db 2 ; ditto .ret: db 2 ; ditto main: ; register interrupt 0xEE handler mov 0xEE, handle_ee ; calculate 4 + 7 with a function mov add.a, 4 mov add.b, 7 mov add.ret, $+2 ; set add.ret to the next instruction after this jmp add mov 0x100, add.a ; store the result of the addition in mem[0x100] int 0x12 handle_ee: ; this gets called from the cpu in an interrupt mov print_str.str, .hello mov print_str.ret, $+2 jmp print_str iret ; return from interrupt, continue execution where it left of. .hello: ds "Hello world!\0" print_str: ; 0x101: Where the hardware expects the string address to be stored. mov 0x101, @.str int 0x10 ; 0x10 = print string interrupt jmp @.ret .str: db 2 .ret: db 2
src/lv-objx-preload.ads
Fabien-Chouteau/ada-lvlg
3
23425
<filename>src/lv-objx-preload.ads with Lv.Style; with System; package Lv.Objx.Preload is subtype Instance is Obj_T; type Type_T is (Type_Spinning_Arc); type Style_T is (Style_Main); -- Create a pre loader objects -- @param par pointer to an object, it will be the parent of the new pre loader -- @param copy pointer to a pre loader object, if not NULL then the new object will be copied from it -- @return pointer to the created pre loader function Create (Parent : Obj_T; Copy : Instance) return Instance; ---------------------- -- Setter functions -- ---------------------- -- Set the length of the spinning arc in degrees -- @param self pointer to a preload object -- @param deg length of the arc procedure Set_Arc_Length (Self : Instance; Deg : Uint16_T); -- Set the spin time of the arc -- @param self pointer to a preload object -- @param time time of one round in milliseconds procedure Set_Spin_Time (Self : Instance; Time : Uint16_T); -- Set a style of a pre loader. -- @param self pointer to pre loader object -- @param type which style should be set -- @param style pointer to a style procedure Set_Style (Self : Instance; Type_P : Style_T; Style : access Lv.Style.Style); ---------------------- -- Getter functions -- ---------------------- -- Get the arc length [degree] of the a pre loader -- @param self pointer to a pre loader object function Get_Arc_Length (Self : Instance) return Uint16_T; -- Get the spin time of the arc -- @param self pointer to a pre loader object [milliseconds] function Get_Spin_Time (Self : Instance) return Uint16_T; -- Get style of a pre loader. -- @param self pointer to pre loader object -- @param type which style should be get -- @return style pointer to the style function Get_Style (Self : Instance; Type_P : Style_T) return access Lv.Style.Style; --------------------- -- Other functions -- --------------------- procedure Spinner_Animation (Arg1 : System.Address; Arg2 : Int32_T); ------------- -- Imports -- ------------- pragma Import (C, Create, "lv_preload_create"); pragma Import (C, Set_Arc_Length, "lv_preload_set_arc_length"); pragma Import (C, Set_Spin_Time, "lv_preload_set_spin_time"); pragma Import (C, Set_Style, "lv_preload_set_style"); pragma Import (C, Get_Arc_Length, "lv_preload_get_arc_length"); pragma Import (C, Get_Spin_Time, "lv_preload_get_spin_time"); pragma Import (C, Get_Style, "lv_preload_get_style"); pragma Import (C, Spinner_Animation, "lv_preload_spinner_animation"); for Type_T'Size use 8; for Type_T use (Type_Spinning_Arc => 0); for Style_T'Size use 8; for Style_T use (Style_Main => 0); end Lv.Objx.Preload;
_build/dispatcher/jmp_ippsECCPSetPointAtInfinity_453c9f69.asm
zyktrcn/ippcp
1
6864
<reponame>zyktrcn/ippcp<gh_stars>1-10 extern m7_ippsECCPSetPointAtInfinity:function extern n8_ippsECCPSetPointAtInfinity:function extern y8_ippsECCPSetPointAtInfinity:function extern e9_ippsECCPSetPointAtInfinity:function extern l9_ippsECCPSetPointAtInfinity:function extern n0_ippsECCPSetPointAtInfinity:function extern k0_ippsECCPSetPointAtInfinity:function extern ippcpJumpIndexForMergedLibs extern ippcpSafeInit:function segment .data align 8 dq .Lin_ippsECCPSetPointAtInfinity .Larraddr_ippsECCPSetPointAtInfinity: dq m7_ippsECCPSetPointAtInfinity dq n8_ippsECCPSetPointAtInfinity dq y8_ippsECCPSetPointAtInfinity dq e9_ippsECCPSetPointAtInfinity dq l9_ippsECCPSetPointAtInfinity dq n0_ippsECCPSetPointAtInfinity dq k0_ippsECCPSetPointAtInfinity segment .text global ippsECCPSetPointAtInfinity:function (ippsECCPSetPointAtInfinity.LEndippsECCPSetPointAtInfinity - ippsECCPSetPointAtInfinity) .Lin_ippsECCPSetPointAtInfinity: db 0xf3, 0x0f, 0x1e, 0xfa call ippcpSafeInit wrt ..plt align 16 ippsECCPSetPointAtInfinity: db 0xf3, 0x0f, 0x1e, 0xfa mov rax, qword [rel ippcpJumpIndexForMergedLibs wrt ..gotpc] movsxd rax, dword [rax] lea r11, [rel .Larraddr_ippsECCPSetPointAtInfinity] mov r11, qword [r11+rax*8] jmp r11 .LEndippsECCPSetPointAtInfinity:
examples/accel.adb
JeremyGrosser/sensors
1
16131
-- -- Copyright (C) 2022 <NAME> <<EMAIL>> -- -- SPDX-License-Identifier: BSD-3-Clause -- with Ada.Text_IO; with Text_Format; use Text_Format; with HAL.SPI; with HAL; with RP.Clock; with RP.Device; with RP.GPIO; with RP.SPI; with Pico; with ADXL345; procedure Accel is Port : RP.SPI.SPI_Port renames RP.Device.SPI_0; MISO : RP.GPIO.GPIO_Point renames Pico.GP0; -- SDO/ALT CS : RP.GPIO.GPIO_Point renames Pico.GP1; -- ~CS SCK : RP.GPIO.GPIO_Point renames Pico.GP2; -- SCL/SCLK MOSI : RP.GPIO.GPIO_Point renames Pico.GP3; -- SDA/SDI/SDIO begin RP.Clock.Initialize (Pico.XOSC_Frequency); RP.Device.Timer.Enable; declare use RP.GPIO; use RP.SPI; Config : constant SPI_Configuration := (Baud => 1_000_000, Polarity => Active_High, -- CPOL = 1 Phase => Falling_Edge, -- CPHA = 1 others => <>); begin Pico.LED.Configure (Output); MOSI.Configure (Output, Floating, SPI); MISO.Configure (Output, Floating, SPI); SCK.Configure (Output, Floating, SPI); CS.Configure (Output, Pull_Up); CS.Set; Port.Configure (Config); end; declare use Ada.Text_IO; use HAL; Device_Id : UInt8; begin if ADXL345.DEVID.Get (Port'Access, CS'Access, Device_Id) and then Device_Id = 2#11100101# then Pico.LED.Set; Put ("DEVID "); Put (Device_Id'Image); New_Line; else Pico.LED.Clear; Put_Line ("Device Id failed"); return; end if; end; declare use Ada.Text_IO; use HAL; use ADXL345; Power : POWER_CTL_Register := POWER_CTL.Get (Port'Access, CS'Access); Format : DATA_FORMAT_Register := DATA_FORMAT.Get (Port'Access, CS'Access); M : Measurement; G : Acceleration; begin Power.Measure := True; POWER_CTL.Set (Port'Access, CS'Access, Power); Power := POWER_CTL.Get (Port'Access, CS'Access); Put_Line ("Link " & Power.Link'Image); Put_Line ("AUTO_SLEEP " & Power.AUTO_SLEEP'Image); Put_Line ("Measure " & Power.Measure'Image); Put_Line ("Sleep " & Power.Sleep'Image); Put_Line ("Wakeup " & Power.Wakeup'Image); Format.G_Range := Range_2g; Format.Justify := True; Format.FULL_RES := True; DATA_FORMAT.Set (Port'Access, CS'Access, Format); loop if DATA.Get (Port'Access, CS'Access, M) then Put ("X="); G := To_Acceleration (Range_2g, M (X)); Put (From_Float (G, Aft => 6)); Put (" Y="); G := To_Acceleration (Range_2g, M (Y)); Put (From_Float (G, Aft => 6)); Put (" Z="); G := To_Acceleration (Range_2g, M (Z)); Put (From_Float (G, Aft => 6)); New_Line; end if; RP.Device.Timer.Delay_Seconds (1); end loop; end; end Accel;
programs/oeis/081/A081032.asm
karttu/loda
1
87549
; A081032: Positions of black keys on piano keyboard, start with A0 = the 1st key. ; 2,5,7,10,12,14,17,19,22,24,26,29,31,34,36,38,41,43,46,48,50,53,55,58,60,62,65,67,70,72,74,77,79,82,84,86 mul $0,12 mov $1,$0 add $1,14 div $1,5
libsrc/_DEVELOPMENT/math/float/math48/lm/z80/asm_logb.asm
jpoikela/z88dk
640
4535
<gh_stars>100-1000 SECTION code_clib SECTION code_fp_math48 PUBLIC asm_logb EXTERN am48_logb defc asm_logb = am48_logb
conf/S18_GoTwo_pingpong.asm
liffiton/256asm
0
15739
<gh_stars>0 # PingPong in GoTwoAssembly # # Authors: <NAME> and <NAME> # Date: April, 2018 # # All variables # ballPos: x/y $1,$2 (x is horizontal) # ballPixel $14 # direction: horizontal/vertical (+1/-1) $3,$4 # left pad (+8 for 'mid' pixel) $5 # right pad (+8 for 'mid' pixel) $6 # left pad score $8 (store as pixel position, display from left of bottom row) # right pad score $9 (store as pixel position, display from right of bottom row) # initialize special registers, reduct seti instruction seti $13 8 #also 1000 seti $12 4 #also 0100 seti $11 2 #also 0010 seti $10 1 #also 0001 # initialize resetScore: seti $8 55 #score left pad, currently 0 seti $9 64 #score right pad, currently 0 #clear all scoring pixels seti $7 56 out $7 0 addi $7 1 out $7 0 addi $7 1 out $7 0 addi $7 1 out $7 0 addi $7 1 out $7 0 addi $7 1 out $7 0 addi $7 1 out $7 0 addi $7 1 out $7 0 reset: out $5 0 #clear pad1 addi $5 8 out $5 0 addi $5 8 out $5 0 out $6 0 #clear pad2 addi $6 8 out $6 0 addi $6 8 out $6 0 start: #turn off previous ball out $14 0 seti $5 8 #initialize pad1 seti $6 15 #initialize pad2 out $5 1 #out pad1 1st pixel add $7 $5 $13 out $7 1 #out pad1 2nd pixel add $7 $7 $13 out $7 1 #out pad1 3rd pixel out $6 1 #out pad2 1st pixel add $7 $6 $13 out $7 1 #out pad2 2nd pixel add $7 $7 $13 out $7 1 #out pad2 3rd pixel seti $1 1 #initialize x,y seti $2 1 seti $3 1 #initialize direction seti $4 1 add $7 $2 $2 #multiply y by 8 add $7 $7 $7 add $7 $7 $7 add $7 $7 $1 #add x for ball pixel out $7 1 #out ball add $14 $zero $7 #always keep ball display pos in $14 update after every loop updateLoop: add $1 $1 $3 #update x add $2 $2 $4 #update y add $7 $2 $2 #multiply y by 8 add $7 $7 $7 add $7 $7 $7 add $7 $7 $1 #add x for ball pixel out $14 0 out $7 1 add $14 $zero $7 #update ball pixel #check ball die checkBallDie: bz $1 scoreleft #die on left edge seti $7 7 sub $7 $1 $7 bz $7 scoreright #die on right edge # check pad contact with horizontal position leftPadContact: sub $7 $3 $10 #right or left? bz $7 rightPadContact #right pad add $7 $zero $14 #left pad addi $7 -1 sub $7 $7 $5 bz $zero padContact rightPadContact: add $7 $zero $14 addi $7 1 sub $7 $7 $6 padContact: bz $7 reverseX #check for match with pad-8/pad-16/pad-24 addi $7 -8 bz $7 reverseX addi $7 -8 bz $7 reverseX bz $zero cornerPad #no contact then skip to next check reverseX: seti $7 1 sub $7 $3 $7 bz $7 xToLeft #change direction to left seti $3 1 #change direction to right bz $zero checkY xToLeft: seti $3 -1 bz $zero checkY # check corner case cornerPad: # top corner? sub $7 $4 $10 #what vertical direction? if 1 check top case, else check bot case bz $7 topCorner bz $zero botCorner topCorner: #top left corner sub $7 $5 $13 #subtract 8 from pad 'high' pixel addi $7 1 #add 1 to match with ball pixel sub $7 $7 $14 bz $7 reverseXY # top right corner sub $7 $6 $13 #subtract 8 from pad 'high' pixel addi $7 -1 #subtract 1 to match with ball pixel sub $7 $7 $14 bz $7 reverseXY bz $zero checkY #no need to reverse, skip to next check # bottom corner botCorner: #botom left corner seti $7 25 add $7 $5 $7 #add 25 for 'low' pad pixel+1 sub $7 $7 $14 #check if match ball pixel bz $7 reverseXY #bottom right corner seti $7 23 add $7 $6 $7 #add 23 for 'low' pad pixel-1 sub $7 $7 $14 #check if match ball pixel bz $7 reverseXY bz $zero checkY #no need to reverse, skip to next check #reverse in corner case reverseXY: sub $7 $3 $10 #check if x-direction equal to 1 bz $7 xToNegative seti $3 1 bz $zero reverseY xToNegative: seti $3 -1 reverseY: sub $7 $4 $10 #check if y-direction equal to 1 bz $7 yToNegative seti $4 1 bz $zero checkY yToNegative: seti $4 -1 # check contact with top/bottom edge checkY: bz $2 ydirUp #at top edge? seti $7 6 sub $7 $2 $7 bz $7 ydirDown #at bottom edge? bz $zero input ydirUp: seti $4 1 bz $zero input ydirDown: seti $4 -1 #input check and update pad input: and $7 $13 $input #first button - pad1 down bz $7 Btn2 out $5 0 #turn off top pixel addi $5 8 seti $7 16 #turn on pixel 2 blocks away add $7 $5 $7 out $7 1 Btn2: and $7 $12 $input #second button - pad1 up bz $7 Btn3 addi $5 -8 out $5 1 seti $7 24 #turn off pixel 3 blocks away from $5 add $7 $5 $7 out $7 0 Btn3: and $7 $11 $input #third button - pad2 down bz $7 Btn4 out $6 0 addi $6 8 seti $7 16 add $7 $6 $7 out $7 1 Btn4: and $7 $10 $input #forth button - pad2 up bz $7 done addi $6 -8 out $6 1 seti $7 24 add $7 $6 $7 out $7 0 done: bz $zero updateLoop #end of game loop #scoring left pad scoreright: addi $8 1 #increment score out $8 1 seti $7 59 #win when score pixel reach 59 sub $7 $8 $7 bz $7 resetScore #reset match bz $zero reset #next game #scoring right pad scoreleft: addi $9 -1 out $9 1 seti $7 60 #win when score pixel reach 60 sub $7 $9 $7 bz $7 resetScore #reset match bz $zero reset #next game
Userland/SampleCodeModule/asm/libasm.asm
ssandrini/Arqui_TPE
0
26992
GLOBAL _write GLOBAL _getBuffer GLOBAL _getTime GLOBAL _getReg GLOBAL _getMem GLOBAL _changeScreen GLOBAL _clearScreen GLOBAL _quadratic GLOBAL _exc6Trigger GLOBAL _getCpuInfo GLOBAL _FtoCelcius GLOBAL _CtoFahren GLOBAL _rectToPolar section .text ; void _getBuffer(char * buffer, int bytes); _getBuffer: mov rax, 0 int 80h ret ; void _write(char * string, int color); _write: mov rax, 1 int 80h ret ; void _getTime(int * fecha, int * hora); _getTime: mov rax, 2 int 80h ret ; void _getReg(uint64_t registers); _getReg: mov rax, 3 int 80h ret ; void _getMem(uint8_t * dir, uint8_t * memory); _getMem: mov rax, 4 int 80h ret ; void _changeScreen(int cB); _changeScreen: mov rax, 5 int 80h ret ; void _clearScreen(int cB); _clearScreen: mov rax, 6 int 80h ret ;-----------------------------------------------------------------------------------; ;_getCpuInfo(&rg1, &rg2, &id); ; ; esta syscall devuelve dos datos de 32 bits con las features del procesador. ; ; si se indica el flag id=1 devuelve las comunes y ; ; y si el flag id=7 devuelve las special ; ; ademas en id se setea en 0 o en 1 si soporta la instruccion cpuid o no. ; ;-----------------------------------------------------------------------------------; ; caso ID = 0 | caso ID = 1 ; ;-----------------------------------------------------------------------------------; ; en rg1 tiene cargado: | en rg1 tiene cargado: ; ; sse3_support, (bit0) | vaesni_support (bit9) ; ; pclmulqdq_support (bit1) | vpclmulqdq_support (bit10) ; ; fma_support (bit12) | ; ; sse41_support, (bit19) | ; ; sse42_support (bit20) | ; ; aesni_support (bit25) | ; ; avx_support (bit28) | ; ; f16c_support (bit29) | ; ;-----------------------------------------------------------------------------------; ; en rg2 tiene cargado: | en rg2 tiene cargado: ; ; mx_support (bit23) | avx2_support (bit5) ; ; sse_support (bit25) | ; ; sse2_support (bit26) | ; ;-----------------------------------------------------------------------------------; _getCpuInfo: mov rax, 7 int 80h ret ; https://www.felixcloutier.com/x86/ud _exc6Trigger: UD2 ret ; int _quadratic(long double * a, long double * b, long double * c, long double * r1, long double * r2) _quadratic: push rbp ; armado del stackframe mov rbp, rsp fninit fld tword[rdi] ; st0 = a fadd st0 ; st0 = 2a fld tword[rsi] ; st0 = b ; st1 = 2a fmul st0 ; st0 = bΒ² ; st1 = 2a fld tword[rdx] ; st0 = c ; st1 = bΒ² ; st2 = 2a fmul st2 ; st0 = 2ac ; st1 = bΒ² ; st2 = 2a fadd st0 ; st0 = 4ac ; st1 = bΒ² ; st2 = 2a fsubp ; st0 = bΒ²-4ac ; st1 = 2a ; tengo que chequear si st0 es menor que 0 fldz ; st0 = 0.0 ; st1 = bΒ²-4ac ; st2 = 2a ; al finalizar la comparacion me deja los flags en EFLAGS fcomip st0, st1 ; st0 = bΒ²-4ac ; st1 = 2a ja .no_results ; si es negativo ; si sigo aca es porque el discriminante era positivo fsqrt ; st0 = raiz de bΒ²-4ac ; st1 = 2a ; calculo de la primera raiz fld tword[rsi] ; st0 = b ; st1 = raiz de bΒ²-4ac ; st2 = 2a fchs ; st0 = -b ; st1 = raiz de bΒ²-4ac ; st2 = 2a fsub st1 ; st0 = -b - raiz de bΒ²-4ac ; st1 = raiz de bΒ²-4ac ; st2 = 2a fdiv st2 ; st0 = (-b - raiz de bΒ²-4ac) / 2a ; st1 = raiz de bΒ²-4ac ; st2 = 2a fstp tword[rcx] ; st0 = raiz de bΒ²-4ac ; st1= 2a ;calculo de la segunda raiz fld tword[rsi] ; st0 = b ; st1 = raiz de bΒ²-4ac ; st2 = 2a fchs ; st0 = -b ; st1 = raiz de bΒ²-4ac ; st2 = 2a fadd st1 ; st0 = -b + raiz de bΒ²-4ac ; st1 = raiz de bΒ²-4ac ; st2 = 2a fdiv st2 ; st0 = (-b + raiz de bΒ²-4ac) / 2a ; st1 = raiz de bΒ²-4ac ; st2 = 2a fstp tword[r8] ; st0 = raiz de bΒ²-4ac ; st1= 2a mov rax, 1 ; devulevo 1 porque pude calcular mov rsp, rbp pop rbp ret .no_results: mov rax, 0 ; devulevo 0 porque no pude calcular mov rsp, rbp pop rbp ret _FtoCelcius: ;rdi ; rsi ;rdx rcx ; extern void FtoC_(long double * deg_f, long double * c1, long double * c2 , long double * res); push rbp ; armado del stackframe mov rbp, rsp fninit fld tword [rsi] ; st0 = 5/9 fld tword [rdi] ; st0 = deg ; st1 = 5/9 fld tword [rdx] ; st0 = 32 ; st1 = deg ; st2 = 5/9 fsubp fmulp fstp tword[rcx] mov rsp, rbp pop rbp ret _CtoFahren: ; extern void _CtoFahren(long double * deg_c, long double * c1, long double * c2 , long double * res); push rbp ; armado del stackframe mov rbp, rsp fninit fld tword [rsi] fld tword [rdi] fmulp fld tword [rdx] faddp fstp tword[rcx] mov rsp, rbp pop rbp ret _rectToPolar: ; rdi rsi rdx rcx ;extern void _rectToPolar(long double * x, long double * y, long double * mod, long double * angle, long double * c); push rbp ; armado del stackframe mov rbp, rsp fninit fld tword [rsi] ; st0 = y fld tword [rdi] ; st0 = x ; st1 = y fpatan ; st0 = atan(y/x) fld tword [r8] fldpi fdiv fmul ; st0 = angle fstp tword[rcx] fld tword[rdi] fmul st0, st0 fld tword[rsi] fmul st0, st0 faddp fsqrt fstp tword[rdx] mov rsp, rbp pop rbp ret
extern/gnat_sdl/gnat_sdl2/src/sdl_log_h.ads
AdaCore/training_material
15
25457
<filename>extern/gnat_sdl/gnat_sdl2/src/sdl_log_h.ads pragma Ada_2005; pragma Style_Checks (Off); with Interfaces.C; use Interfaces.C; with Interfaces.C.Strings; with stdarg_h; with System; package SDL_log_h is SDL_MAX_LOG_MESSAGE : constant := 4096; -- ..\SDL2_tmp\SDL_log.h:54 -- Simple DirectMedia Layer -- Copyright (C) 1997-2018 <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. -- --* -- * \file SDL_log.h -- * -- * Simple log messages with categories and priorities. -- * -- * By default logs are quiet, but if you're debugging SDL you might want: -- * -- * SDL_LogSetAllPriority(SDL_LOG_PRIORITY_WARN); -- * -- * Here's where the messages go on different platforms: -- * Windows: debug output stream -- * Android: log output -- * Others: standard error output (stderr) -- -- Set up for C function definitions, even when using C++ --* -- * \brief The maximum size of a log message -- * -- * Messages longer than the maximum size will be truncated -- --* -- * \brief The predefined log categories -- * -- * By default the application category is enabled at the INFO level, -- * the assert category is enabled at the WARN level, test is enabled -- * at the VERBOSE level and all other categories are enabled at the -- * CRITICAL level. -- -- Reserved for future SDL library use -- Beyond this point is reserved for application use, e.g. -- enum { -- MYAPP_CATEGORY_AWESOME1 = SDL_LOG_CATEGORY_CUSTOM, -- MYAPP_CATEGORY_AWESOME2, -- MYAPP_CATEGORY_AWESOME3, -- ... -- }; -- --* -- * \brief The predefined log priorities -- subtype SDL_LogPriority is unsigned; SDL_LOG_PRIORITY_VERBOSE : constant unsigned := 1; SDL_LOG_PRIORITY_DEBUG : constant unsigned := 2; SDL_LOG_PRIORITY_INFO : constant unsigned := 3; SDL_LOG_PRIORITY_WARN : constant unsigned := 4; SDL_LOG_PRIORITY_ERROR : constant unsigned := 5; SDL_LOG_PRIORITY_CRITICAL : constant unsigned := 6; SDL_NUM_LOG_PRIORITIES : constant unsigned := 7; -- ..\SDL2_tmp\SDL_log.h:111 --* -- * \brief Set the priority of all log categories -- procedure SDL_LogSetAllPriority (priority : SDL_LogPriority); -- ..\SDL2_tmp\SDL_log.h:117 pragma Import (C, SDL_LogSetAllPriority, "SDL_LogSetAllPriority"); --* -- * \brief Set the priority of a particular log category -- procedure SDL_LogSetPriority (category : int; priority : SDL_LogPriority); -- ..\SDL2_tmp\SDL_log.h:122 pragma Import (C, SDL_LogSetPriority, "SDL_LogSetPriority"); --* -- * \brief Get the priority of a particular log category -- function SDL_LogGetPriority (category : int) return SDL_LogPriority; -- ..\SDL2_tmp\SDL_log.h:128 pragma Import (C, SDL_LogGetPriority, "SDL_LogGetPriority"); --* -- * \brief Reset all priorities to default. -- * -- * \note This is called in SDL_Quit(). -- procedure SDL_LogResetPriorities; -- ..\SDL2_tmp\SDL_log.h:135 pragma Import (C, SDL_LogResetPriorities, "SDL_LogResetPriorities"); --* -- * \brief Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO -- procedure SDL_Log (fmt : Interfaces.C.Strings.chars_ptr -- , ... ); -- ..\SDL2_tmp\SDL_log.h:140 pragma Import (C, SDL_Log, "SDL_Log"); --* -- * \brief Log a message with SDL_LOG_PRIORITY_VERBOSE -- procedure SDL_LogVerbose (category : int; fmt : Interfaces.C.Strings.chars_ptr -- , ... ); -- ..\SDL2_tmp\SDL_log.h:145 pragma Import (C, SDL_LogVerbose, "SDL_LogVerbose"); --* -- * \brief Log a message with SDL_LOG_PRIORITY_DEBUG -- procedure SDL_LogDebug (category : int; fmt : Interfaces.C.Strings.chars_ptr -- , ... ); -- ..\SDL2_tmp\SDL_log.h:150 pragma Import (C, SDL_LogDebug, "SDL_LogDebug"); --* -- * \brief Log a message with SDL_LOG_PRIORITY_INFO -- procedure SDL_LogInfo (category : int; fmt : Interfaces.C.Strings.chars_ptr -- , ... ); -- ..\SDL2_tmp\SDL_log.h:155 pragma Import (C, SDL_LogInfo, "SDL_LogInfo"); --* -- * \brief Log a message with SDL_LOG_PRIORITY_WARN -- procedure SDL_LogWarn (category : int; fmt : Interfaces.C.Strings.chars_ptr -- , ... ); -- ..\SDL2_tmp\SDL_log.h:160 pragma Import (C, SDL_LogWarn, "SDL_LogWarn"); --* -- * \brief Log a message with SDL_LOG_PRIORITY_ERROR -- procedure SDL_LogError (category : int; fmt : Interfaces.C.Strings.chars_ptr -- , ... ); -- ..\SDL2_tmp\SDL_log.h:165 pragma Import (C, SDL_LogError, "SDL_LogError"); --* -- * \brief Log a message with SDL_LOG_PRIORITY_CRITICAL -- procedure SDL_LogCritical (category : int; fmt : Interfaces.C.Strings.chars_ptr -- , ... ); -- ..\SDL2_tmp\SDL_log.h:170 pragma Import (C, SDL_LogCritical, "SDL_LogCritical"); --* -- * \brief Log a message with the specified category and priority. -- procedure SDL_LogMessage (category : int; priority : SDL_LogPriority; fmt : Interfaces.C.Strings.chars_ptr -- , ... ); -- ..\SDL2_tmp\SDL_log.h:175 pragma Import (C, SDL_LogMessage, "SDL_LogMessage"); --* -- * \brief Log a message with the specified category and priority. -- procedure SDL_LogMessageV (category : int; priority : SDL_LogPriority; fmt : Interfaces.C.Strings.chars_ptr; ap : stdarg_h.va_list); -- ..\SDL2_tmp\SDL_log.h:182 pragma Import (C, SDL_LogMessageV, "SDL_LogMessageV"); --* -- * \brief The prototype for the log output function -- type SDL_LogOutputFunction is access procedure (arg1 : System.Address; arg2 : int; arg3 : SDL_LogPriority; arg4 : Interfaces.C.Strings.chars_ptr); pragma Convention (C, SDL_LogOutputFunction); -- ..\SDL2_tmp\SDL_log.h:189 --* -- * \brief Get the current log output function. -- procedure SDL_LogGetOutputFunction (callback : System.Address; userdata : System.Address); -- ..\SDL2_tmp\SDL_log.h:194 pragma Import (C, SDL_LogGetOutputFunction, "SDL_LogGetOutputFunction"); --* -- * \brief This function allows you to replace the default log output -- * function with one of your own. -- procedure SDL_LogSetOutputFunction (callback : SDL_LogOutputFunction; userdata : System.Address); -- ..\SDL2_tmp\SDL_log.h:200 pragma Import (C, SDL_LogSetOutputFunction, "SDL_LogSetOutputFunction"); -- Ends C function definitions when using C++ -- vi: set ts=4 sw=4 expandtab: end SDL_log_h;
test.asm
MaoKo/gFGFX
2
99874
virtual at 0H include "token_c.inc" end virtual virtual at 0H _raw:: file "test.c" _size = ($ - $$) end virtual macro _restore_state? _start?*, _last?*, _backup?*, _token?*, _count?*, _stream?* local _size, _symbol if (_start = 0H) ; reach DEAD state if (_last = 0H) error "lexing error" break end if load _offset:4H from token_c:(token_c._string_table + (_token shl 2H)) load _size:byte from token_c:_offset load _symbol:_size from token_c:(_offset+1H) display _symbol, 00AH if ((_token = token_c.IDENTIFIER) | (_token = token_c.STRING) | (_token = token_c.COMMENT)) load _lexeme:(_backup - _first) from _raw:_first display 01BH, "[31m", string(_lexeme), 00AH, 01BH, "[0m" end if _start = 1H _token = 0H _last = 0H _stream = _backup _first = _stream end if end macro _accept? := 0H _index = 0H while (not 0H) load _test:byte from token_c:(token_c._accept_table+(_index shl 1H)) if (_test = 0H) break end if load _token:byte from token_c:((token_c._accept_table+(_index shl 1H))+1H) rept 1H _:_test _accept?._? = _token end rept _index = _index + 1H end while _source_c = 0H _backup = "" _count = 0H _start = 1H _last = 0H _token = 0H _first = _source_c while (not 0H) rept 1H _:_start if (definite _accept?._?) _last = _start _backup = _source_c _token = _accept?._? end if end rept if (_source_c >= _size) break end if load _current:byte from _raw:_source_c load _start:byte from token_c:(token_c._state_table+((_start shl 8H) + _current)) _source_c = _source_c + 1H _restore_state _start, _last, _backup, _token, _count, _source_c end while _start = 0H _restore_state _start, _last, _backup, _token, _count, _source_c
code/alloy/psm_statecoverage_guards.als
thesnapdragon/msc-thesis
0
3853
module psm_statecoverage open util/integer abstract sig System {} abstract sig State {system: one System} abstract sig Transition {from, to: one State} one sig Initial, End extends State {} sig Coverage { paths: some Path } sig Path { firstStep: Step } sig Step { from, to: State, via: Transition, nextStep: lone Step } { via.from = from via.to = to } fun steps (p:Path): set Step { p.firstStep.*nextStep } fun transitions (p:Path): set Transition { p.firstStep.via + p.firstStep.*nextStep.via } fact { // test generation properties all p:Path | some c:Coverage | p in c.paths // all path belongs to a coverage no p1,p2:Path | p1! = p2 && steps[p1] = steps[p2] && transitions[p1] = transitions[p2] // there are no two equivalent paths no s1,s2:Step | s1! = s2 && s1.via = s2.via // there are no two equivalent steps all s:Step | some p:Path | s in p.firstStep.*nextStep // all steps belongs to a path // model consistency all p:Path | p.firstStep.from = Initial // all path starts with an Initial state all p:Path | some s:Step | s in steps[p] && s.to = End // all path end with End state // state machine properties all t:Transition | one s:Step | s.via = t // all transitions belongs to a step all curr:Step, next:curr.nextStep | next.from = curr.to // all steps are contionueos all sys:System | some s:State | sys = s.system // all system belongs to a state all s:State | some t:Transition | t.from = s or t.to = s // all state belongs to a transition } pred inheritSystem(s1, s2: System) { s1 = s2 } /*** GENERATED CODE START ***/ one sig A, B, C extends State {} some sig S extends System { a: Int } sig T0 extends Transition {}{ from = Initial to = A initSystem[from.system] E0[from.system, to.system] } sig T1 extends Transition {}{ from = A to = B inheritSystem[from.system, to.system] } sig T5 extends Transition {}{ from = A to = B inheritSystem[from.system, to.system] G0[from.system] } sig T2 extends Transition {}{ from = B to = End inheritSystem[from.system, to.system] } sig T3 extends Transition {}{ from = A to = C inheritSystem[from.system, to.system] } sig T4 extends Transition {}{ from = C to = End inheritSystem[from.system, to.system] } pred initSystem(s:System) { s.a = 0 } pred E0(s1, s2: System) { s2.a = add[s1.a, 1] } pred G0(s: System) { s.a > 1 } /*** GENERATED CODE END ***/ pred state_coverage() { all s:State | some p:Path | s in steps[p].from + steps[p].to } run state_coverage for 10 but exactly 1 Coverage, 4 System
programs/oeis/111/A111889.asm
jmorken/loda
1
22923
; A111889: A repeated permutation of {0,...,8}. ; 0,1,5,3,4,8,6,7,2,0,1,5,3,4,8,6,7,2,0,1,5,3,4,8,6,7,2,0,1,5,3,4,8,6,7,2,0,1,5,3,4,8,6,7,2,0,1,5,3,4,8,6,7,2,0,1,5,3,4,8,6,7,2,0,1,5,3,4,8,6,7,2,0,1,5,3,4,8,6,7,2 mov $1,$0 mul $1,15 add $1,13 mul $0,$1 lpb $0 mod $0,9 lpe mov $1,$0
agda/Properties/ConstructiveField.agda
mchristianl/synthetic-reals
3
10914
{-# OPTIONS --cubical --no-import-sorts #-} open import Bundles module Properties.ConstructiveField {β„“ β„“'} (F : ConstructiveField {β„“} {β„“'}) where open import Agda.Primitive renaming (_βŠ”_ to β„“-max; lsuc to β„“-suc; lzero to β„“-zero) private variable β„“'' : Level open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᡖ; assoc to βˆ™-assoc) open import Cubical.Data.Sum.Base renaming (_⊎_ to infixr 4 _⊎_) open import Cubical.Data.Sigma.Base renaming (_Γ—_ to infixr 4 _Γ—_) open import Cubical.Data.Empty renaming (elim to βŠ₯-elim) -- `βŠ₯` and `elim` open import Function.Base using (it) -- instance search open import MoreLogic open MoreLogic.Reasoning import MoreAlgebra -- Lemma 4.1.6. -- For a constructive field (F, 0, 1, +, Β·, #), the following hold. -- 1. 1 # 0. -- 2. Addition + is #-compatible in the sense that for all x, y, z : F -- x # y ⇔ x + z # y + z. -- 3. Multiplication Β· is #-extensional in the sense that for all w, x, y, z : F -- w Β· x # y Β· z β‡’ w # y ∨ x # z. open ConstructiveField F open import Cubical.Structures.Ring R = (makeRing 0f 1f _+_ _Β·_ -_ is-set +-assoc +-rid +-rinv +-comm Β·-assoc Β·-rid Β·-lid Β·-rdist-+ Β·-ldist-+) open Cubical.Structures.Ring.Theory R open MoreAlgebra.Properties.Ring R -- Lemma 4.1.6.1 1f#0f : 1f # 0f 1f#0f with Β·-identity 1f 1f#0f | 1Β·1≑1 , _ = fst (Β·-inv-back _ _ 1Β·1≑1) -- Lemma 4.1.6.2 -- For #-compatibility of +, suppose x # y, that is, (x +z) βˆ’z # (y +z) βˆ’z. -- Then #-extensionality gives (x + z # y + z) ∨ (βˆ’z # βˆ’z), where the latter case is excluded by irreflexivity of #. +-#-compatible : βˆ€(x y z : Carrier) β†’ x # y β†’ x + z # y + z +-#-compatible x y z x#y with let P = transport (Ξ» i β†’ a+b-b≑a x z i # a+b-b≑a y z i ) x#y in +-#-extensional _ _ _ _ P ... | inl x+z#y+z = x+z#y+z ... | inr -z#-z = βŠ₯-elim (#-irrefl _ -z#-z) -- The other direction is similar. +-#-compatible-inv : βˆ€(x y z : Carrier) β†’ x + z # y + z β†’ x # y +-#-compatible-inv _ _ _ x+z#y+z with +-#-extensional _ _ _ _ x+z#y+z ... | inl x#y = x#y ... | inr z#z = βŠ₯-elim (#-irrefl _ z#z) -- Lemma 4.1.6.3 Β·-#-extensional-case1 : βˆ€(w x y z : Carrier) β†’ w Β· x # y Β· z β†’ w Β· x # w Β· z β†’ x # z Β·-#-extensional-case1 w x y z wΒ·x#yΒ·z wΒ·x#wΒ·z = let instance -- this allows to use ⁻¹ᢠ without an instance argument wΒ·[z-x]#0f = ( w Β· x # w Β· z β‡’βŸ¨ +-#-compatible _ _ (- (w Β· x)) ⟩ w Β· x - w Β· x # w Β· z - w Β· x β‡’βŸ¨ transport (Ξ» i β†’ (fst (+-inv (w Β· x)) i) # aΒ·b-aΒ·c≑aΒ·[b-c] w z x i) ⟩ 0f # w Β· (z - x) β‡’βŸ¨ #-sym _ _ ⟩ w Β· (z - x) # 0f β—Ό) wΒ·x#wΒ·z in ( w Β· (z - x) # 0f β‡’βŸ¨ (Ξ» _ β†’ Β·-rinv (w Β· (z - x)) it ) ⟩ -- NOTE: "plugging in" the instance did not work, ∴ `it` w Β· (z - x) Β· (w Β· (z - x)) ⁻¹ᢠ ≑ 1f β‡’βŸ¨ transport (Ξ» i β†’ Β·-comm w (z - x) i Β· (w Β· (z - x)) ⁻¹ᢠ ≑ 1f) ⟩ (z - x) Β· w Β· (w Β· (z - x)) ⁻¹ᢠ ≑ 1f β‡’βŸ¨ transport (Ξ» i β†’ Β·-assoc (z - x) w ((w Β· (z - x)) ⁻¹ᢠ) (~ i) ≑ 1f) ⟩ (z - x) Β· (w Β· (w Β· (z - x)) ⁻¹ᢠ) ≑ 1f β‡’βŸ¨ fst ∘ (Β·-inv-back _ _) ⟩ z - x # 0f β‡’βŸ¨ +-#-compatible _ _ x ⟩ (z - x) + x # 0f + x β‡’βŸ¨ transport (Ξ» i β†’ +-assoc z (- x) x (~ i) # snd (+-identity x) i) ⟩ z + (- x + x) # x β‡’βŸ¨ transport (Ξ» i β†’ z + snd (+-inv x) i # x) ⟩ z + 0f # x β‡’βŸ¨ transport (Ξ» i β†’ fst (+-identity z) i # x) ⟩ z # x β‡’βŸ¨ #-sym _ _ ⟩ x # z β—Ό) it -- conceptually we would plug `wΒ·[z-x]#0f` in, but this breaks the very first step Β·-#-extensional : βˆ€(w x y z : Carrier) β†’ w Β· x # y Β· z β†’ (w # y) ⊎ (x # z) Β·-#-extensional w x y z wΒ·x#yΒ·z with #-cotrans _ _ wΒ·x#yΒ·z (w Β· z) ... | inl wΒ·x#wΒ·z = inr (Β·-#-extensional-case1 w x y z wΒ·x#yΒ·z wΒ·x#wΒ·z) -- first case ... | inr wΒ·z#yΒ·z = let zΒ·w≑zΒ·y = (transport (Ξ» i β†’ Β·-comm w z i # Β·-comm y z i) wΒ·z#yΒ·z) in inl (Β·-#-extensional-case1 _ _ _ _ zΒ·w≑zΒ·y zΒ·w≑zΒ·y) -- second case reduced to first case
data/moves.asm
etdv-thevoid/pokemon-rgb-enhanced
1
24776
Moves: ; Characteristics of each move. move: macro db \1 ; animation (interchangeable with move id) db \2 ; effect db \3 ; power db \4 ; type db \5 percent ; accuracy db \6 ; pp endm move POUND, NO_ADDITIONAL_EFFECT, 40, NORMAL, 100, 35 MoveEnd: move KARATE_CHOP, NO_ADDITIONAL_EFFECT, 50, FIGHTING, 100, 25 move DOUBLE_SLAP, ATTACK_TWICE_EFFECT, 30, NORMAL, 100, 25 move COMET_PUNCH, TWO_TO_FIVE_ATTACKS_EFFECT, 15, FIGHTING, 85, 15 move MEGA_PUNCH, NO_ADDITIONAL_EFFECT, 120, NORMAL, 75, 5 move PAY_DAY, PAY_DAY_EFFECT, 40, NORMAL, 100, 20 move FIRE_PUNCH, BURN_SIDE_EFFECT1, 75, FIRE, 100, 15 move ICE_PUNCH, FREEZE_SIDE_EFFECT1, 75, ICE, 100, 15 move THUNDERPUNCH, PARALYZE_SIDE_EFFECT1, 75, ELECTRIC, 100, 15 move SCRATCH, NO_ADDITIONAL_EFFECT, 40, NORMAL, 100, 35 move VICEGRIP, FLINCH_SIDE_EFFECT1, 55, BUG, 100, 30 move GUILLOTINE, OHKO_EFFECT, 1, BUG, 25, 5 move RAZOR_WIND, CHARGE_EFFECT, 80, FLYING, 100, 10 move SWORDS_DANCE, ATTACK_UP2_EFFECT, 0, NORMAL, 100, 15 move CUT, NO_ADDITIONAL_EFFECT, 60, NORMAL, 95, 25 move GUST, NO_ADDITIONAL_EFFECT, 40, FLYING, 100, 35 move WING_ATTACK, NO_ADDITIONAL_EFFECT, 60, FLYING, 100, 25 move WHIRLWIND, SWITCH_AND_TELEPORT_EFFECT, 0, FLYING, 100, 20 move FLY, FLY_EFFECT, 90, FLYING, 95, 15 move BIND, TRAPPING_EFFECT, 20, NORMAL, 85, 20 move SLAM, NO_ADDITIONAL_EFFECT, 80, NORMAL, 75, 20 move VINE_WHIP, NO_ADDITIONAL_EFFECT, 45, GRASS, 100, 25 move STOMP, FLINCH_SIDE_EFFECT2, 65, NORMAL, 100, 20 move DOUBLE_KICK, ATTACK_TWICE_EFFECT, 30, FIGHTING, 100, 25 move MEGA_KICK, NO_ADDITIONAL_EFFECT, 120, NORMAL, 75, 5 move JUMP_KICK, JUMP_KICK_EFFECT, 130, FIGHTING, 85, 10 move ROLLING_KICK, FLINCH_SIDE_EFFECT2, 60, FIGHTING, 85, 15 move SAND_ATTACK, ACCURACY_DOWN1_EFFECT, 0, GROUND, 100, 30 move HEADBUTT, FLINCH_SIDE_EFFECT2, 70, NORMAL, 100, 15 move HORN_ATTACK, NO_ADDITIONAL_EFFECT, 65, NORMAL, 100, 25 move FURY_ATTACK, TWO_TO_FIVE_ATTACKS_EFFECT, 15, FLYING, 85, 15 move HORN_DRILL, OHKO_EFFECT, 1, NORMAL, 25, 5 move TACKLE, NO_ADDITIONAL_EFFECT, 50, NORMAL, 95, 35 move BODY_SLAM, PARALYZE_SIDE_EFFECT2, 80, NORMAL, 100, 15 move WRAP, TRAPPING_EFFECT, 35, GRASS, 75, 15 move TAKE_DOWN, RECOIL_EFFECT, 90, NORMAL, 85, 20 move THRASH, THRASH_PETAL_DANCE_EFFECT, 120, FIGHTING, 100, 10 move DOUBLE_EDGE, RECOIL_EFFECT, 120, NORMAL, 100, 15 move TAIL_WHIP, DEFENSE_DOWN1_EFFECT, 0, NORMAL, 100, 40 move POISON_STING, POISON_SIDE_EFFECT1, 15, POISON, 100, 35 move TWINEEDLE, TWINEEDLE_EFFECT, 25, BUG, 100, 20 move PIN_MISSILE, TWO_TO_FIVE_ATTACKS_EFFECT, 25, BUG, 80, 10 move LEER, DEFENSE_DOWN1_EFFECT, 0, NORMAL, 100, 40 move BITE, FLINCH_SIDE_EFFECT1, 60, NORMAL, 100, 25 move GROWL, ATTACK_DOWN1_EFFECT, 0, NORMAL, 100, 40 move ROAR, SWITCH_AND_TELEPORT_EFFECT, 0, NORMAL, 100, 20 move SING, SLEEP_EFFECT, 0, NORMAL, 55, 20 move SUPERSONIC, CONFUSION_EFFECT, 0, NORMAL, 55, 20 move SONICBOOM, SPECIAL_DAMAGE_EFFECT, 1, ELECTRIC, 90, 10 move DISABLE, DISABLE_EFFECT, 0, PSYCHIC, 100, 20 move ACID, DEFENSE_DOWN_SIDE_EFFECT, 65, POISON, 100, 20 move EMBER, BURN_SIDE_EFFECT1, 40, FIRE, 100, 25 move FLAMETHROWER, BURN_SIDE_EFFECT1, 90, FIRE, 100, 15 move MIST, MIST_EFFECT, 0, ICE, 100, 30 move WATER_GUN, NO_ADDITIONAL_EFFECT, 45, WATER, 100, 25 move HYDRO_PUMP, NO_ADDITIONAL_EFFECT, 110, WATER, 85, 5 move SURF, NO_ADDITIONAL_EFFECT, 90, WATER, 100, 15 move ICE_BEAM, FREEZE_SIDE_EFFECT1, 90, ICE, 100, 15 move BLIZZARD, FREEZE_SIDE_EFFECT2, 110, ICE, 70, 10 move PSYBEAM, CONFUSION_SIDE_EFFECT, 65, PSYCHIC, 100, 20 move BUBBLEBEAM, SPEED_DOWN_SIDE_EFFECT, 65, WATER, 100, 20 move AURORA_BEAM, ATTACK_DOWN_SIDE_EFFECT, 65, ICE, 100, 20 move HYPER_BEAM, HYPER_BEAM_EFFECT, 150, NORMAL, 90, 5 move PECK, NO_ADDITIONAL_EFFECT, 50, FLYING, 95, 35 move DRILL_PECK, NO_ADDITIONAL_EFFECT, 80, FLYING, 100, 20 move SUBMISSION, RECOIL_EFFECT, 90, FIGHTING, 85, 20 move LOW_KICK, FLINCH_SIDE_EFFECT1, 50, FIGHTING, 100, 20 move COUNTER, NO_ADDITIONAL_EFFECT, 1, FIGHTING, 100, 20 move SEISMIC_TOSS, SPECIAL_DAMAGE_EFFECT, 1, FIGHTING, 100, 20 move STRENGTH, NO_ADDITIONAL_EFFECT, 85, NORMAL, 100, 15 move ABSORB, DRAIN_HP_EFFECT, 40, GRASS, 100, 25 move MEGA_DRAIN, DRAIN_HP_EFFECT, 75, GRASS, 100, 15 move LEECH_SEED, LEECH_SEED_EFFECT, 0, GRASS, 90, 10 move GROWTH, SPECIAL_UP1_EFFECT, 0, GRASS, 100, 20 move RAZOR_LEAF, NO_ADDITIONAL_EFFECT, 55, GRASS, 95, 25 move SOLARBEAM, CHARGE_EFFECT, 120, GRASS, 100, 10 move POISONPOWDER, POISON_EFFECT, 0, POISON, 75, 15 move STUN_SPORE, PARALYZE_EFFECT, 0, GRASS, 75, 15 move SLEEP_POWDER, SLEEP_EFFECT, 0, GRASS, 75, 15 move PETAL_DANCE, THRASH_PETAL_DANCE_EFFECT, 120, GRASS, 100, 10 move STRING_SHOT, SPEED_DOWN1_EFFECT, 0, BUG, 95, 40 move DRAGON_RAGE, SPECIAL_DAMAGE_EFFECT, 1, DRAGON, 90, 10 move FIRE_SPIN, TRAPPING_EFFECT, 35, FIRE, 75, 15 move THUNDERSHOCK, PARALYZE_SIDE_EFFECT1, 40, ELECTRIC, 100, 25 move THUNDERBOLT, PARALYZE_SIDE_EFFECT1, 90, ELECTRIC, 100, 15 move THUNDER_WAVE, PARALYZE_EFFECT, 0, ELECTRIC, 90, 10 move THUNDER, PARALYZE_SIDE_EFFECT2, 110, ELECTRIC, 70, 10 move ROCK_THROW, NO_ADDITIONAL_EFFECT, 50, ROCK, 90, 15 move EARTHQUAKE, NO_ADDITIONAL_EFFECT, 100, GROUND, 100, 10 move FISSURE, OHKO_EFFECT, 1, GROUND, 25, 5 move DIG, CHARGE_EFFECT, 80, GROUND, 100, 10 move TOXIC, POISON_EFFECT, 0, POISON, 90, 10 move CONFUSION, CONFUSION_SIDE_EFFECT, 50, PSYCHIC, 100, 25 move PSYCHIC_M, SPECIAL_DOWN_SIDE_EFFECT, 90, PSYCHIC, 100, 10 move HYPNOSIS, SLEEP_EFFECT, 0, PSYCHIC, 65, 20 move MEDITATE, ATTACK_UP1_EFFECT, 0, PSYCHIC, 100, 30 move AGILITY, SPEED_UP2_EFFECT, 0, PSYCHIC, 100, 15 move QUICK_ATTACK, NO_ADDITIONAL_EFFECT, 40, NORMAL, 100, 30 move RAGE, RAGE_EFFECT, 20, FIGHTING, 100, 20 move TELEPORT, SWITCH_AND_TELEPORT_EFFECT, 0, PSYCHIC, 100, 20 move NIGHT_SHADE, SPECIAL_DAMAGE_EFFECT, 1, GHOST, 100, 20 move MIMIC, MIMIC_EFFECT, 0, NORMAL, 100, 10 move SCREECH, DEFENSE_DOWN2_EFFECT, 0, NORMAL, 85, 20 move DOUBLE_TEAM, EVASION_UP1_EFFECT, 0, NORMAL, 100, 20 move RECOVER, HEAL_EFFECT, 0, PSYCHIC, 100, 10 move HARDEN, DEFENSE_UP1_EFFECT, 0, NORMAL, 100, 30 move MINIMIZE, EVASION_UP2_EFFECT, 0, NORMAL, 100, 10 move SMOKESCREEN, ACCURACY_DOWN1_EFFECT, 0, NORMAL, 100, 30 move CONFUSE_RAY, CONFUSION_EFFECT, 0, GHOST, 100, 10 move WITHDRAW, DEFENSE_UP1_EFFECT, 0, WATER, 100, 30 move DEFENSE_CURL, DEFENSE_UP1_EFFECT, 0, NORMAL, 100, 30 move BARRIER, DEFENSE_UP2_EFFECT, 0, PSYCHIC, 100, 15 move LIGHT_SCREEN, LIGHT_SCREEN_EFFECT, 0, PSYCHIC, 100, 20 move HAZE, HAZE_EFFECT, 0, POISON, 100, 30 move REFLECT, REFLECT_EFFECT, 0, PSYCHIC, 100, 20 move FOCUS_ENERGY, FOCUS_ENERGY_EFFECT, 0, FIGHTING, 100, 30 move BIDE, BIDE_EFFECT, 0, NORMAL, 100, 10 move METRONOME, METRONOME_EFFECT, 0, NORMAL, 100, 10 move MIRROR_MOVE, MIRROR_MOVE_EFFECT, 0, FLYING, 100, 20 move SELFDESTRUCT, EXPLODE_EFFECT, 200, NORMAL, 100, 5 move EGG_BOMB, NO_ADDITIONAL_EFFECT, 100, NORMAL, 75, 10 move LICK, PARALYZE_SIDE_EFFECT1, 40, GHOST, 100, 25 move SMOG, POISON_SIDE_EFFECT2, 30, POISON, 75, 20 move SLUDGE, POISON_SIDE_EFFECT1, 80, POISON, 100, 15 move BONE_CLUB, FLINCH_SIDE_EFFECT1, 65, GROUND, 85, 20 move FIRE_BLAST, BURN_SIDE_EFFECT2, 110, FIRE, 70, 10 move WATERFALL, FLINCH_SIDE_EFFECT2, 80, WATER, 100, 15 move CLAMP, TRAPPING_EFFECT, 35, WATER, 75, 15 move SWIFT, SWIFT_EFFECT, 60, NORMAL, 100, 20 move SKULL_BASH, CHARGE_EFFECT, 140, ROCK, 90, 5 move SPIKE_CANNON, TWO_TO_FIVE_ATTACKS_EFFECT, 25, ROCK, 80, 10 move CONSTRICT, SPEED_DOWN_SIDE_EFFECT, 10, NORMAL, 100, 35 move AMNESIA, SPECIAL_UP1_EFFECT, 0, PSYCHIC, 100, 20 move KINESIS, ACCURACY_DOWN2_EFFECT, 0, PSYCHIC, 100, 15 move SOFTBOILED, HEAL_EFFECT, 0, NORMAL, 100, 10 move SKY_UPPERCUT, JUMP_KICK_EFFECT, 130, FIGHTING, 85, 10 move GLARE, PARALYZE_EFFECT, 0, NORMAL, 90, 10 move DREAM_EATER, DREAM_EATER_EFFECT, 100, GHOST, 100, 15 move POISON_GAS, POISON_EFFECT, 0, POISON, 55, 20 move BARRAGE, TWO_TO_FIVE_ATTACKS_EFFECT, 25, GRASS, 80, 10 move LEECH_LIFE, DRAIN_HP_EFFECT, 40, BUG, 100, 25 move LOVELY_KISS, SLEEP_EFFECT, 0, PSYCHIC, 90, 10 move SKY_ATTACK, CHARGE_EFFECT, 140, FLYING, 90, 5 move TRANSFORM, TRANSFORM_EFFECT, 0, NORMAL, 100, 10 move BUBBLE, SPEED_DOWN_SIDE_EFFECT, 40, WATER, 100, 25 move DIZZY_PUNCH, CONFUSION_SIDE_EFFECT, 70, NORMAL, 100, 10 move SPORE, SLEEP_EFFECT, 0, GRASS, 100, 10 move FLASH, EVASION_DOWN2_EFFECT, 0, NORMAL, 100, 15 move PSYWAVE, SPECIAL_DAMAGE_EFFECT, 1, PSYCHIC, 100, 15 move SPLASH, SPLASH_EFFECT, 0, NORMAL, 100, 40 move ACID_ARMOR, DEFENSE_UP2_EFFECT, 0, POISON, 100, 15 move CRABHAMMER, NO_ADDITIONAL_EFFECT, 100, WATER, 90, 10 move EXPLOSION, EXPLODE_EFFECT, 250, NORMAL, 100, 5 move FURY_SWIPES, TWO_TO_FIVE_ATTACKS_EFFECT, 15, NORMAL, 85, 15 move BONEMERANG, ATTACK_TWICE_EFFECT, 50, GROUND, 90, 10 move REST, HEAL_EFFECT, 0, PSYCHIC, 100, 10 move ROCK_SLIDE, FLINCH_SIDE_EFFECT2, 75, ROCK, 90, 10 move HYPER_FANG, FLINCH_SIDE_EFFECT2, 80, NORMAL, 90, 15 move SHARPEN, ATTACK_UP1_EFFECT, 0, NORMAL, 100, 30 move CONVERSION, CONVERSION_EFFECT, 0, NORMAL, 100, 30 move TRI_ATTACK, TRI_ATTACK_EFFECT, 80, NORMAL, 100, 10 move SUPER_FANG, SUPER_FANG_EFFECT, 1, NORMAL, 90, 10 move SLASH, NO_ADDITIONAL_EFFECT, 70, NORMAL, 100, 20 move SUBSTITUTE, SUBSTITUTE_EFFECT, 0, NORMAL, 100, 10 ; NEW MOVES move OUTRAGE, THRASH_PETAL_DANCE_EFFECT, 120, DRAGON, 100, 10 move EXTREMESPEED, NO_ADDITIONAL_EFFECT, 80, NORMAL, 100, 5 move CROSS_CHOP, NO_ADDITIONAL_EFFECT, 100, FIGHTING, 80, 5 move FUTURE_SIGHT, CHARGE_EFFECT, 120, PSYCHIC, 100, 10 move SLUDGE_BOMB, POISON_SIDE_EFFECT2, 110, POISON, 70, 10 move MEGAHORN, NO_ADDITIONAL_EFFECT, 110, BUG, 85, 5 ; Struggle always goes last move STRUGGLE, RECOIL_EFFECT, 50, TYPELESS, 100, 10
electrum/src/main/resources/models/examples/case_studies/chord.als
haslab/Electrum
29
3929
<gh_stars>10-100 module examples/case_studies/chord /* * Models the chord distributed hash table lookup protocol. * * For a detailed description, see: * http://www.pdos.lcs.mit.edu/papers/chord:sigcomm01/ */ open util/relation as rel sig Id {next: Id} fact {all i: Id | Id in i.*next} /** * true iff i precedes j in the order starting at from */ pred less_than [from, i,j: Id] { let next1 = Id<:next - (Id->from) | j in i.^next1 // if from=j, returns true if # nodes > 1 } pred less_than_eq [from, i,j: Id] { let next1 = Id<:next - (Id->from) | j in i.*next1 } sig Node {id: Id} fact {all m,n: Node | m!=n => m.id != n.id} sig NodeData { prev, next: Node, finger: Id -> lone Node, closest_preceding_finger: Id -> one Node, find_predecessor: Id -> one Node, find_successor: Id -> one Node } sig State { active: set Node, data: active -> one NodeData } /** * node n's next node is defined to be the m where n's finger table maps the id * that follows n.id to m * next holds the first entry of the finger table */ fact {all s: State | all n: s.active | n.(s.data).next = n.(s.data).finger[n.id.next]} pred NextCorrect [s: State] { all n: s.active { -- no intervening node (ie, close enough) no n1: s.active - n | less_than [n.id, n1.id, n.(s.data).next.id] -- can reach all other active nodes (ie, far enough) -- need this because can't rule out case of next being node itself (because of 1-node ring) -- s.active in n.*(s.data.next) n.(s.data).next != n || #s.active = 1 } } pred NextCorrect1 [s: State] { -- next seems to be correct for 1,2,3 nodes all n: s.active | let nd = (s.data)[n] { let next1 = Id<:next - (Id -> nd.next.id) { no n1 : s.active { n1.id in n.id.^next1 } }} } // valid assert Same1 {all s: State | NextCorrect[s] => NextCorrect1[s]} check Same1 for 3 but 1 State expect 0 // valid unless active condition removed assert Same2 {all s: State | s.active = Node => (NextCorrect1[s] => NextCorrect[s])} check Same2 for 3 but 1 State expect 0 -- assert NextInFinger {all s: State | all n: s.active | some n.s.data.finger[n.id.next] } -- says that finger entry maps an id to a node so that there are no intervening nodes -- between the id and the node pred FingersCorrect [s: State] { all nd: s.active.(s.data) | all start:nd.finger.univ | nd.finger[start] in s.active && (no n1 : s.active | less_than [start, n1.id, nd.finger[start].id]) } pred FingersCorrect1 [s: State] { all n: s.active | let nd = (s.data)[n] | all start: Node.~(nd.finger) { nd.finger[start] in s.active && (let next1 = Id<:next - (nd.finger[start].id -> Id) { no n1 : s.active - nd.finger[start] { n1.id in start.*next1 } }) } } assert SameFC {all s: State | FingersCorrect [s] iff FingersCorrect1[s]} check SameFC for 3 but 1 State expect 0 pred ShowMeFC { all s : State | s.active = Node && FingersCorrect[s] } run ShowMeFC for 2 but 1 State expect 1 pred ClosestPrecedingFinger[s: State] { all n: s.active | let nd = n.(s.data) | all i: Id | let cpf = nd.closest_preceding_finger[i] { no n1: nd.finger[Id] + n - cpf | less_than [cpf.id, n1.id, i] cpf in nd.finger[Id] + n cpf.id != i || # s.active = 1 //less_than (n.id, cpf.id, i) } } pred ClosestPrecedingFinger1[s: State] { all n: s.active | let nd = (s.data)[n] | all i: Id { let next1 = Id<:next - (Id -> i) { nd.next.id in n.id.^next1 => // nd.closest_preceding_finger[i] = nd.next, (some n1: nd.finger[Id] { nd.closest_preceding_finger[i] = n1 //n1 in nd.finger[Id] n1.id in n.id.^next1 no n2: nd.finger[Id] | n2.id in n1.id.^next1 }) else nd.closest_preceding_finger[i] = n }} } assert SameCPF {all s: State | FingersCorrect[s] => (ClosestPrecedingFinger [s] iff ClosestPrecedingFinger1 [s])} assert SameCPF1 {all s: State | FingersCorrect[s] => (ClosestPrecedingFinger [s] => ClosestPrecedingFinger1 [s])} assert SameCPF2 { all s: State | ((s.active = Node && FingersCorrect[s] && ClosestPrecedingFinger1 [s]) => ClosestPrecedingFinger [s]) } check SameCPF for 3 but 1 State expect 0 check SameCPF1 for 2 but 1 State expect 0 check SameCPF2 for 3 but 1 State expect 0 pred ShowMeCPF { all s : State | s.active = Node && FingersCorrect[s] && // not ClosestPrecedingFinger(s) && ClosestPrecedingFinger1(s) ClosestPrecedingFinger[s] //all s : State | all nd : s.active.s.data | nd.finger[Id] = Node # Node = 2 # State = 1 } run ShowMeCPF for 2 but 1 State expect 1 pred FindPredecessor[s: State] { all n: s.active | let nd = n.(s.data) | all i: Id { nd.find_predecessor[i] = (less_than_eq [n.id, i, nd.next.id] && (n.id != i || # s.active = 1) => n else (nd.closest_preceding_finger[i].(s.data).find_predecessor)[i]) } } assert FPisActive { all s: State | FingersCorrect[s] && ClosestPrecedingFinger[s] && FindPredecessor[s] => (all n: s.active | all nd: n.(s.data) | nd.find_predecessor[Id] in s.active) } check FPisActive for 3 but 1 State expect 1 pred FindPredecessor1[s: State] { all n: s.active | let nd = (s.data)[n] | all i: Id { let next1 = Id<:next - (nd.next.id -> Id) { one s.active or i in n.id.^next1 => // *next1 -> ^next1 1/8/02 nd.find_predecessor[i] = n else nd.find_predecessor[i] = ((s.data)[nd.closest_preceding_finger[i]]).find_predecessor[i] }} } assert SameFP {all s: State | FingersCorrect[s] // && s.active = Node => (FindPredecessor [s] iff FindPredecessor1 [s])} assert SameFP1 { all s: State | FingersCorrect[s] && s.active = Node => (FindPredecessor [s] => FindPredecessor1 [s])} assert SameFP2 { all s: State | FingersCorrect[s] && s.active = Node => (FindPredecessor1 [s] => FindPredecessor [s])} check SameFP for 3 but 1 State expect 1 check SameFP1 for 3 but 1 State expect 0 check SameFP2 for 3 but 1 State expect 0 pred FindSuccessor[s: State] { all n: s.active | let nd = (s.data)[n] | all i: Id { nd.find_successor[i] = ((s.data)[nd.find_predecessor[i]]).next }} // should be able to check that closest_p_f, etc returns // only active nodes if FingersCorrect. pred ShowMe1Node { #Node = 1 all s : State | NextCorrect[s] State.active = Node } run ShowMe1Node for 2 but 1 State, 1 Node expect 1 pred ShowMe1 { #Node = 2 #State = 1 all s : State | NextCorrect[s] State.active = Node } pred ShowMe2 { #Node = 3 #State = 1 all s : State | NextCorrect[s] && FingersCorrect[s] State.active = Node //all n: NodeData | one n.finger[Id] } assert OK1 { #Node = 3 && #State = 1 && (all s : State | NextCorrect[s] && FingersCorrect[s]) && State.active = Node } run ShowMe1 for 3 expect 1 run ShowMe2 for 3 expect 1 assert InjectiveIds {all i, j: Id | i!=j => i.next != j.next} check InjectiveIds for 5 expect 0 assert FindSuccessorWorks { all s: State, i: Id | let nd = s.active.(s.data) | let succ = nd.find_successor [i] | FingersCorrect [s] // && s.active = Node => (no n1: s.active | less_than [i, n1.id, succ.id]) } check FindSuccessorWorks for 3 but 1 State expect 1
programs/oeis/021/A021036.asm
karttu/loda
1
3799
; A021036: Decimal expansion of 1/32. ; 0,3,1,2,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 add $$0,4 add $0,1 mov $1,$0 add $4,2 mov $3,$4 add $$4,3 sub $3,1 mov $$3,$$0
Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xa0_notsx.log_43_1444.asm
ljhsiun2/medusa
9
245210
<filename>Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xa0_notsx.log_43_1444.asm .global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %rax push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_normal_ht+0x1a59e, %rax sub %rdx, %rdx mov $0x6162636465666768, %rdi movq %rdi, (%rax) nop cmp $65324, %r11 lea addresses_WT_ht+0x1501e, %r12 nop nop nop nop sub $5653, %rsi movb (%r12), %r11b nop nop nop dec %r11 lea addresses_A_ht+0x90e, %rsi lea addresses_WC_ht+0xc3fe, %rdi nop nop nop nop cmp $17706, %rbp mov $46, %rcx rep movsq nop nop nop and $9225, %rdi lea addresses_normal_ht+0x1a02a, %rdi nop nop nop nop dec %rdx mov $0x6162636465666768, %rcx movq %rcx, %xmm7 vmovups %ymm7, (%rdi) nop nop nop xor $25228, %rsi lea addresses_A_ht+0x26fc, %rsi lea addresses_WT_ht+0x1090e, %rdi nop xor %r11, %r11 mov $34, %rcx rep movsq nop nop nop nop cmp %rbp, %rbp lea addresses_WC_ht+0x870, %r12 nop nop xor %rcx, %rcx movw $0x6162, (%r12) nop nop nop nop nop add %rdx, %rdx lea addresses_normal_ht+0x1745e, %rsi lea addresses_D_ht+0x6d8a, %rdi nop and %rdx, %rdx mov $8, %rcx rep movsl nop nop add $14872, %r12 lea addresses_UC_ht+0x1d9c2, %rsi lea addresses_D_ht+0x15a1e, %rdi nop nop inc %rdx mov $89, %rcx rep movsl nop nop dec %rbp lea addresses_WC_ht+0xe89e, %rcx nop nop nop nop nop xor $11263, %rax mov (%rcx), %edi cmp $50888, %rdi lea addresses_D_ht+0x19c1e, %rdi nop nop nop and $36705, %rbp mov $0x6162636465666768, %rcx movq %rcx, %xmm3 and $0xffffffffffffffc0, %rdi movaps %xmm3, (%rdi) nop nop nop nop and $56358, %rax lea addresses_WC_ht+0x1c29e, %rsi lea addresses_WT_ht+0xf3c4, %rdi nop xor $64957, %r11 mov $84, %rcx rep movsq and $62523, %rcx lea addresses_UC_ht+0x1dede, %rsi lea addresses_normal_ht+0xae5e, %rdi nop nop sub %rdx, %rdx mov $106, %rcx rep movsb nop cmp $39096, %rdi lea addresses_WC_ht+0x1c44c, %rdx nop nop nop xor $38104, %rcx movw $0x6162, (%rdx) xor $50700, %r12 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %rax pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r14 push %r15 push %rbx push %rdi push %rdx // Store lea addresses_RW+0x815e, %rbx add $41976, %r12 mov $0x5152535455565758, %rdx movq %rdx, %xmm0 vmovntdq %ymm0, (%rbx) nop add %rbx, %rbx // Store lea addresses_D+0x1109e, %r13 inc %r14 mov $0x5152535455565758, %rbx movq %rbx, (%r13) nop nop nop nop nop cmp $64975, %r15 // Store lea addresses_D+0xd09e, %r15 dec %r12 mov $0x5152535455565758, %rdi movq %rdi, %xmm2 vmovups %ymm2, (%r15) nop cmp $22678, %rdx // Load mov $0xa745f000000009e, %rbx nop nop nop nop nop sub $57115, %r12 movb (%rbx), %r13b inc %r12 // Load mov $0x497445000000029e, %rdi nop xor $64530, %r14 movups (%rdi), %xmm4 vpextrq $0, %xmm4, %r15 nop nop nop sub $47623, %r15 // Store mov $0x89e, %r13 nop and %rdx, %rdx mov $0x5152535455565758, %rdi movq %rdi, %xmm7 movups %xmm7, (%r13) sub %rbx, %rbx // Faulty Load lea addresses_D+0x1109e, %r13 cmp %rdi, %rdi movaps (%r13), %xmm4 vpextrq $1, %xmm4, %rbx lea oracles, %r15 and $0xff, %rbx shlq $12, %rbx mov (%r15,%rbx,1), %rbx pop %rdx pop %rdi pop %rbx pop %r15 pop %r14 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_D', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': False, 'size': 32, 'NT': True, 'same': False, 'congruent': 3}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'size': 8, 'NT': False, 'same': True, 'congruent': 0}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 10}} {'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 11}, 'OP': 'LOAD'} {'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 8}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_P', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 11}} [Faulty Load] {'src': {'type': 'addresses_D', 'AVXalign': True, 'size': 16, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 8}} {'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 7}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 1}} {'src': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 1}} {'src': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 2, 'same': True}} {'src': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 7, 'same': False}} {'src': {'type': 'addresses_WC_ht', 'AVXalign': True, 'size': 4, 'NT': False, 'same': True, 'congruent': 11}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': True, 'size': 16, 'NT': False, 'same': False, 'congruent': 5}} {'src': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}} {'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 1}} {'00': 43} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
alloy4fun_models/trashltl/models/5/GDiwgdAAZYNSCzYJG.als
Kaixi26/org.alloytools.alloy
0
4707
<filename>alloy4fun_models/trashltl/models/5/GDiwgdAAZYNSCzYJG.als open main pred idGDiwgdAAZYNSCzYJG_prop6 { always all f:Trash | f in Trash } pred __repair { idGDiwgdAAZYNSCzYJG_prop6 } check __repair { idGDiwgdAAZYNSCzYJG_prop6 <=> prop6o }
Document-Closers/Close-All-Un-Saved-Documents.applescript
boisy/AppleScripts
116
3782
<reponame>boisy/AppleScripts<filename>Document-Closers/Close-All-Un-Saved-Documents.applescript tell application "System Events" to set frontapp to name of first process whose frontmost is true tell application frontapp activate repeat with i from (count of documents) to 1 by -1 set thisDocument to document i try if path of (get properties of thisDocument) = missing value or name of thisDocument contains "Untitled" then close thisDocument without saving end if on error errMsg number errNum display alert "Error" message errMsg as critical buttons {"Cancel", "OK"} default button "OK" cancel button "Cancel" end try end repeat end tell
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_730_142.asm
ljhsiun2/medusa
9
89946
<reponame>ljhsiun2/medusa .global s_prepare_buffers s_prepare_buffers: push %r12 push %r15 push %rbp push %rcx push %rdi push %rsi lea addresses_WC_ht+0x1d6f1, %rsi lea addresses_D_ht+0x18631, %rdi nop nop nop sub %r12, %r12 mov $18, %rcx rep movsw nop inc %rbp lea addresses_D_ht+0x1b691, %rsi lea addresses_UC_ht+0x4bf1, %rdi nop cmp $47067, %rbp mov $68, %rcx rep movsl nop nop sub %rbp, %rbp lea addresses_D_ht+0x5e31, %r15 nop nop xor %r12, %r12 mov (%r15), %esi nop nop nop xor %r15, %r15 lea addresses_normal_ht+0x164b1, %rbp nop xor %rcx, %rcx movb $0x61, (%rbp) nop cmp $46154, %rdi pop %rsi pop %rdi pop %rcx pop %rbp pop %r15 pop %r12 ret .global s_faulty_load s_faulty_load: push %r15 push %rax push %rbp push %rcx push %rdi push %rdx push %rsi // Load lea addresses_D+0x11a6d, %rax nop nop nop nop nop add %rdx, %rdx vmovups (%rax), %ymm6 vextracti128 $0, %ymm6, %xmm6 vpextrq $1, %xmm6, %rdi nop cmp %rdi, %rdi // REPMOV lea addresses_WT+0x1ea31, %rsi lea addresses_WT+0xfe71, %rdi nop nop nop nop dec %r15 mov $47, %rcx rep movsl nop nop nop nop and $60321, %rsi // Store lea addresses_normal+0xce31, %rbp nop sub $33466, %rsi mov $0x5152535455565758, %r15 movq %r15, %xmm4 vmovups %ymm4, (%rbp) nop sub $35691, %rdx // Store lea addresses_PSE+0xd351, %rdi nop add %rdx, %rdx movl $0x51525354, (%rdi) nop nop add $13308, %rdi // Store lea addresses_RW+0x9ab9, %r15 nop nop nop nop nop xor $60384, %rax mov $0x5152535455565758, %rsi movq %rsi, (%r15) nop nop nop nop and %rdi, %rdi // Store lea addresses_A+0x13749, %rsi nop nop nop cmp %rax, %rax mov $0x5152535455565758, %rdi movq %rdi, %xmm4 movups %xmm4, (%rsi) nop nop add %rdx, %rdx // Faulty Load lea addresses_WT+0x16e31, %rsi nop sub $27691, %rdx mov (%rsi), %edi lea oracles, %rax and $0xff, %rdi shlq $12, %rdi mov (%rax,%rdi,1), %rdi pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %rax pop %r15 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_WT', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_D', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT', 'congruent': 9, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT', 'congruent': 6, 'same': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 9, 'NT': False, 'type': 'addresses_normal', 'size': 32, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_PSE', 'size': 4, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_RW', 'size': 8, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_A', 'size': 16, 'AVXalign': False}} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_WT', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}} {'src': {'type': 'addresses_D_ht', 'congruent': 4, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': False}} {'src': {'same': False, 'congruent': 11, 'NT': False, 'type': 'addresses_D_ht', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': False}} {'39': 730} 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 */
gfx/pokemon/meditite/anim.asm
Ebernacher90/pokecrystal-allworld
0
23655
frame 1, 08 frame 2, 18 frame 3, 12 frame 1, 08 endanim
programs/oeis/130/A130460.asm
neoneye/loda
22
97971
<filename>programs/oeis/130/A130460.asm<gh_stars>10-100 ; A130460: Infinite lower triangular matrix,(1,0,0,0,...) in the main diagonal and (1,2,3,...) in the subdiagonal. ; 1,1,0,0,2,0,0,0,3,0,0,0,0,4,0,0,0,0,0,5,0,0,0,0,0,0,6,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,11,0 sub $0,1 mov $1,2 lpb $0 add $1,1 sub $0,$1 lpe lpb $0 sub $0,1 mov $1,1 lpe sub $1,1 mov $0,$1
src/implementation/yaml-inspect.adb
persan/AdaYaml
32
16360
-- part of AdaYaml, (c) 2017 <NAME> -- released under the terms of the MIT license, see the file "copying.txt" with Ada.Exceptions; with Yaml.Events.Queue; with Yaml.Parser; With GNAT.Strings; procedure Yaml.Inspect (Input : String) is use GNAT.Strings; type Error_Kind is (None, From_Lexer, From_Parser); P : Parser.Instance; Cur_Pos : Positive := 1; Next_Pos : Positive; Cur_Event : Event; Read_Events : constant Events.Queue.Reference := Events.Queue.New_Queue; Occurred_Error : Error_Kind := None; Lexer_Token_Start, Lexer_Token_End : Mark; Exception_Message : String_Access; begin P.Set_Input (Input); Start_Emitting; Start_Parsed_Input; begin loop Cur_Event := P.Next; Read_Events.Value.Append (Cur_Event); if Cur_Event.Start_Position.Index > Cur_Pos then Next_Pos := Cur_Pos; while Next_Pos <= Input'Last and then Next_Pos < Cur_Event.Start_Position.Index loop if Input (Next_Pos) = '#' then if Cur_Pos < Next_Pos then Emit_Whitespace (Input (Cur_Pos .. Next_Pos - 1)); Cur_Pos := Next_Pos; end if; while Next_Pos < Cur_Event.Start_Position.Index and then Input (Next_Pos) /= Character'Val (10) loop Next_Pos := Next_Pos + 1; end loop; Emit_Comment (Input (Cur_Pos .. Next_Pos - 1)); end if; Next_Pos := Next_Pos + 1; end loop; if Cur_Pos < Next_Pos then Emit_Whitespace (Input (Cur_Pos .. Next_Pos - 1)); Cur_Pos := Next_Pos; end if; end if; Start_Rendered_Event (Cur_Event); declare Content : constant String := Input (Cur_Pos .. Cur_Event.End_Position.Index - 1); Cur : Positive := Content'First; Start : Positive; begin while Cur <= Content'Last loop if Content (Cur) in ' ' | Character'Val (10) then Start := Cur; loop Cur := Cur + 1; exit when Cur > Content'Last or else Content (Cur) in ' ' | Character'Val (10); end loop; Emit_Whitespace (Content (Start .. Cur - 1)); exit when Cur > Content'Last; end if; Start := Cur; case Content (Cur) is when '&' => loop Cur := Cur + 1; exit when Cur > Content'Last or else Content (Cur) in ' ' | Character'Val (10); end loop; Emit_Anchor (Content (Start .. Cur - 1)); when '!' => loop Cur := Cur + 1; exit when Cur > Content'Last or else Content (Cur) in ' ' | Character'Val (10); end loop; Emit_Tag (Content (Start .. Cur - 1)); when others => Emit_Event_Content (Content (Start .. Content'Last)); exit; end case; end loop; end; End_Rendered_Event; Cur_Pos := Cur_Event.End_Position.Index; exit when Cur_Event.Kind = Stream_End; end loop; exception when Error : Lexer_Error => Emit_Unparseable (Input (Cur_Pos .. Input'Last)); Occurred_Error := From_Lexer; Lexer_Token_Start := P.Current_Lexer_Token_Start; Lexer_Token_End := P.Current_Input_Character; Exception_Message := new String'(Ada.Exceptions.Exception_Message (Error)); when Error : Parser_Error => Emit_Unparseable (Input (Cur_Pos .. Input'Last)); Occurred_Error := From_Parser; Lexer_Token_Start := P.Recent_Lexer_Token_Start; Lexer_Token_End := P.Recent_Lexer_Token_End; Exception_Message := new String'(Ada.Exceptions.Exception_Message (Error)); end; End_Parsed_Input; Start_Parsed_Output; case Occurred_Error is when None => declare Iterator : constant Events.Queue.Stream_Reference := Events.Queue.As_Stream (Read_Events); begin loop Cur_Event := Iterator.Value.Next; Emit_Raw_Event (Cur_Event); exit when Cur_Event.Kind = Stream_End; end loop; end; when From_Lexer => Emit_Lexer_Error (Lexer_Token_Start, Lexer_Token_End, Exception_Message.all); when From_Parser => Emit_Parser_Error (Lexer_Token_Start, Lexer_Token_End, Exception_Message.all); end case; End_Parsed_Output; Finish_Emitting; end Yaml.Inspect;
oeis/142/A142647.asm
neoneye/loda-programs
11
99764
; A142647: Primes congruent to 15 mod 56. ; Submitted by <NAME> ; 71,127,239,463,631,743,911,967,1303,1471,1583,2087,2143,2311,2423,2591,2647,2927,3319,3767,3823,4159,4271,4327,4663,4831,4943,4999,5167,5279,5503,5783,5839,6007,6287,6343,6679,6791,6959,7127,7351,7687,8191,8527,8807,8863,9199,9311,9479,9871,10039,10151,10487,10711,11047,11159,11383,11551,11719,11831,11887,12391,12503,12671,13007,13063,13399,13567,13679,13903,14071,14407,14519,15359,15527,15583,15919,16087,16703,16759,16871,16927,17207,17431,17599,18047,18439,18719,19391,19447,19559,19727,20063 mov $1,14 mov $2,$0 add $2,2 pow $2,2 lpb $2 mov $3,$1 add $1,26 seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0. sub $0,$3 add $1,30 mov $4,$0 max $4,0 cmp $4,$0 mul $2,$4 sub $2,1 lpe mov $0,$1 add $0,1
src/main/fragment/mos6502-common/_deref_pwsz1=_deref_pwsz2.asm
jbrandwood/kickc
2
242431
<reponame>jbrandwood/kickc ldy #0 lda ({z2}),y sta ({z1}),y iny lda ({z2}),y sta ({z1}),y
Task/Sorting-algorithms-Merge-sort/Ada/sorting-algorithms-merge-sort-1.ada
LaudateCorpus1/RosettaCodeData
1
7322
generic type Element_Type is private; type Index_Type is (<>); type Collection_Type is array(Index_Type range <>) of Element_Type; with function "<"(Left, Right : Element_Type) return Boolean is <>; package Mergesort is function Sort(Item : Collection_Type) return Collection_Type; end MergeSort;
src/pcap_get_selectable_fd.ads
persan/a-libpcap
0
29725
<reponame>persan/a-libpcap function loop (Self : Pcap_T ; Arg2 : int; Arg3 : Pcap_Handler; Arg4 : access Unsigned_Char) return Integer; function Dispatch (Self : Pcap_T ; Arg2 : int; Arg3 : Pcap_Handler; Arg4 : access Unsigned_Char) return Integer; function Next (Self : Pcap_T ; Arg2 : access Pcap_Pkthdr) return access Unsigned_Char function Next_Ex (Self : Pcap_T ; Arg2 : System.Address; Arg3 : System.Address) return Integer; procedure Breakloop (Arg1 : access Pcap_T) function Stats (Self : Pcap_T ; Arg2 : access Pcap_Stat) return Integer; function Setfilter (Self : Pcap_T ; Arg2 : access Pcap_Bpf_H.Bpf_Program) return Integer; function Setdirection (Self : Pcap_T ; Arg2 : Pcap_Direction_T) return Integer; function Getnonblock (Self : Pcap_T ; Arg2 : String) return Integer; function Setnonblock (Self : Pcap_T ; Arg2 : int; Arg3 : String) return Integer; function Inject (Self : Pcap_T ; Arg2 : System.Address; Arg3 : Size_T) return Integer; function Sendpacket (Self : Pcap_T ; Arg2 : access Unsigned_Char; Arg3 : int) return Integer; function Statustostr (Arg1 : int) return String function Strerror (Arg1 : int) return String function Geterr (Arg1 : access Pcap_T) return String procedure Perror (Self : Pcap_T ; Arg2 : String) function Compile (Self : Pcap_T ; Arg2 : access Pcap_Bpf_H.Bpf_Program; Arg3 : String; Arg4 : int; Arg5 : Unsigned) return Integer; function Compile_Nopcap (Arg1 : int; Arg2 : int; Arg3 : access Pcap_Bpf_H.Bpf_Program; Arg4 : String; Arg5 : int; Arg6 : Unsigned) return Integer; procedure Freecode (Arg1 : access Pcap_Bpf_H.Bpf_Program) function Offline_Filter (Arg1 : access constant Pcap_Bpf_H.Bpf_Program; Arg2 : access constant Pcap_Pkthdr; Arg3 : access Unsigned_Char) return Integer; function Datalink (Arg1 : access Pcap_T) return Integer; function Datalink_Ext (Arg1 : access Pcap_T) return Integer; function List_Datalinks (Self : Pcap_T ; Arg2 : System.Address) return Integer; function Set_Datalink (Self : Pcap_T ; Arg2 : int) return Integer; procedure Free_Datalinks (Arg1 : access int) function Datalink_Name_To_Val (Arg1 : String) return Integer; function Datalink_Val_To_Name (Arg1 : int) return String function Datalink_Val_To_Description (Arg1 : int) return String function Snapshot (Arg1 : access Pcap_T) return Integer; function Is_Swapped (Arg1 : access Pcap_T) return Integer; function Major_Version (Arg1 : access Pcap_T) return Integer; function Minor_Version (Arg1 : access Pcap_T) return Integer; function File (Arg1 : access Pcap_T) return access Interfaces.C_Streams.FILEs function Fileno (Arg1 : access Pcap_T) return Integer; function Dump_Open (Self : Pcap_T ; Arg2 : String) return access Pcap_Dumper_T function Dump_Fopen (Self : Pcap_T ; Fp : access Interfaces.C_Streams.FILEs) return access Pcap_Dumper_T function Dump_File (Arg1 : access Pcap_Dumper_T) return access Interfaces.C_Streams.FILEs function Dump_Ftell (Arg1 : access Pcap_Dumper_T) return long function Dump_Flush (Arg1 : access Pcap_Dumper_T) return Integer; procedure Dump_Close (Arg1 : access Pcap_Dumper_T) procedure Dump (Arg1 : access Unsigned_Char; Arg2 : access constant Pcap_Pkthdr; Arg3 : access Unsigned_Char) function Findalldevs (Arg1 : System.Address; Arg2 : String) return Integer; procedure Freealldevs (Arg1 : access Pcap_If_T) function Lib_Version return String function Bpf_Filter (Arg1 : access constant Pcap_Bpf_H.Bpf_Insn; Arg2 : access Unsigned_Char; Arg3 : Unsigned; Arg4 : Unsigned) return Unsigned function Bpf_Validate (Arg1 : access constant Pcap_Bpf_H.Bpf_Insn; Arg2 : int) return Integer; function Bpf_Image (Arg1 : access constant Pcap_Bpf_H.Bpf_Insn; Arg2 : int) return String procedure Bpf_Dump (Arg1 : access constant Pcap_Bpf_H.Bpf_Program; Arg2 : int) function Get_Selectable_Fd (Arg1 : Pcap_T) return Integer; end PCAP.Low_Level.Pcap_Pcap_H;
test/Compiler/simple/Issue1632.agda
shlevy/agda
1,989
865
<filename>test/Compiler/simple/Issue1632.agda {-# OPTIONS --copatterns #-} open import Common.Prelude record R : Set where field f1 : Nat f2 : String r : R R.f1 r = 5 R.f2 r = "yes" main = putStrLn (R.f2 r)
src/main/resources/project-templates/aws_web_server_blocks/src/@[email protected]
WinterAlexander/Ada-IntelliJ
17
6722
<reponame>WinterAlexander/Ada-IntelliJ package @_Project_Name_@ is pragma Pure; Host : constant String := "@_HOST_@"; Port : constant := @_PORT_@; end @_Project_Name_@;
data/pokemon/dex_entries/torterra.asm
AtmaBuster/pokeplat-gen2
6
95312
db "CONTINENT@" ; species name db "Groups of this" next "#MON migrating" next "in search of water" page "are commonly" next "mistaken for" next "moving forests.@"
programs/oeis/187/A187012.asm
karttu/loda
0
20697
; A187012: Antidiagonal sums of A103516. ; 1,2,5,4,8,6,11,8,14,10,17,12,20,14,23,16,26,18,29,20,32,22,35,24,38,26,41,28,44,30,47,32,50,34,53,36,56,38,59,40,62,42,65,44,68,46,71,48,74,50,77,52,80,54,83,56,86,58,89,60,92,62,95,64,98,66,101,68,104,70,107,72,110,74,113,76,116,78,119,80,122,82,125,84,128,86,131,88,134,90,137,92,140,94,143,96,146,98,149,100,152,102,155,104,158,106,161,108,164,110,167,112,170,114,173,116,176,118,179,120,182,122,185,124,188,126,191,128,194,130,197,132,200,134,203,136,206,138,209,140,212,142,215,144,218,146,221,148,224,150,227,152,230,154,233,156,236,158,239,160,242,162,245,164,248,166,251,168,254,170,257,172,260,174,263,176,266,178,269,180,272,182,275,184,278,186,281,188,284,190,287,192,290,194,293,196,296,198,299,200,302,202,305,204,308,206,311,208,314,210,317,212,320,214,323,216,326,218,329,220,332,222,335,224,338,226,341,228,344,230,347,232,350,234,353,236,356,238,359,240,362,242,365,244,368,246,371,248,374,250 mov $2,$0 add $2,4 lpb $2,1 trn $1,$0 trn $0,1 add $0,1 sub $2,1 add $1,$2 sub $1,2 trn $2,1 add $1,$2 lpe
libsrc/math/genmath/dmul.asm
andydansby/z88dk-mk2
1
13344
; ; Z88dk Generic Floating Point Math Library ; ; ; ; $Id: dmul.asm,v 1.1 2008/07/27 21:44:57 aralbrec Exp $: XLIB dmul LIB fmul .dmul pop hl ;ret address pop de pop ix pop bc push hl jp fmul
programs/oeis/017/A017176.asm
karttu/loda
1
93866
; A017176: (9n+1)^4. ; 1,10000,130321,614656,1874161,4477456,9150625,16777216,28398241,45212176,68574961,100000000,141158161,193877776,260144641,342102016,442050625,562448656,705911761,875213056 mul $0,9 add $0,1 pow $0,4 mov $1,$0
src/css-core.ads
stcarrez/ada-css
3
30167
----------------------------------------------------------------------- -- css-core -- Core CSS API definition -- Copyright (C) 2017 <NAME> -- Written by <NAME> (<EMAIL>) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Strings; with Util.Refs; with Util.Log.Locations; private with CSS.Comments; private with Ada.Finalization; private with Ada.Strings.Unbounded; private with Ada.Containers.Hashed_Maps; -- The API implemented by the <tt>CSS.Core</tt> package and child packages try to -- follow the IDL specification defined in the W3C CSS Object Model (CSSOM) -- (See https://drafts.csswg.org/cssom/ or https://www.w3.org/TR/2016/WD-cssom-1-20160317/) package CSS.Core is type CSSProperty_Name is access all String; subtype CSSProperty_Value is CSSProperty_Name; subtype Location is Util.Log.Locations.Line_Info; use type Util.Log.Locations.Line_Info; -- Get the line number. function Get_Line (Loc : in Location) return Natural renames Util.Log.Locations.Line; -- Get a printable representation of the source file name and line number. function To_String (Loc : in Location) return String; -- The StyleSheet interface represents an abstract, base style sheet. -- See CSSOM: 5.1.1. The StyleSheet Interface type Stylesheet is tagged limited private; type Stylesheet_Access is access all Stylesheet'Class; -- Returns the CSS type ("text/css"). function Get_Type (Sheet : in Stylesheet) return String; -- Get the parent CSS stylesheet if there is one or return null. function Get_Parent (Sheet : in Stylesheet) return Stylesheet_Access; -- Get the source file information. function Get_File_Info (Sheet : in Stylesheet) return Util.Log.Locations.File_Info_Access; -- Get the href attribute (stylesheet location). function Get_Href (Sheet : in Stylesheet) return String; -- Set the href attribute representing the stylesheet location. procedure Set_Href (Sheet : in out Stylesheet; Href : in String); function Create_Property_Name (Sheet : in Stylesheet; Name : in String) return CSSProperty_Name; -- Create a location record to represent a CSS source position. function Create_Location (Sheet : in Stylesheet_Access; Line : in Natural; Column : in Natural) return Location; type CSSRule_Type is (STYLE_RULE, CHARSET_RULE, IMPORT_RULE, MEDIA_RULE, FONT_FACE_RULE, PAGE_RULE, MARGIN_RULE, NAMESPACE_RULE); -- The CSSRule interface represents an abstract, base CSS style rule. -- Each distinct CSS style rule type is represented by a distinct interface that inherits -- from this interface. -- See CSSOM: Section 5.4.2. The CSSRule Interface type CSSRule is abstract new Util.Refs.Ref_Entity with private; type CSSRule_Access is access all CSSRule'Class; -- Get the type that identifies the rule. function Get_Type (Rule : in CSSRule) return CSSRule_Type is abstract; -- Get the parent rule. Returns null when there is no parent. function Get_Parent (Rule : in CSSRule) return CSSRule_Access; -- Get the stylesheet. function Get_Stylesheet (Rule : in CSSRule) return Stylesheet_Access; -- Get the location of the rule. function Get_Location (Rule : in CSSRule) return Location; private type String_Access is access all String; package String_Map is new Ada.Containers.Hashed_Maps (Key_Type => Util.Strings.Name_Access, Element_Type => CSSProperty_Name, Hash => Util.Strings.Hash, Equivalent_Keys => Util.Strings.Equivalent_Keys); type String_Map_Access is access all String_Map.Map; type Stylesheet is new Ada.Finalization.Limited_Controlled with record Loc : Location; Parent : Stylesheet_Access; File : Util.Log.Locations.File_Info_Access; Href : Ada.Strings.Unbounded.Unbounded_String; Strings : String_Map_Access := new String_Map.Map; Comments : CSS.Comments.CSSComment_List; end record; overriding procedure Finalize (Sheet : in out Stylesheet); type CSSRule is abstract new Util.Refs.Ref_Entity with record Loc : Location; Sheet : Stylesheet_Access; Parent : CSSRule_Access; Comments : CSS.Comments.CSSComment_List; end record; -- Set the source code location. procedure Set_Location (Rule : in out CSSRule'Class; Line : in Natural; Column : in Natural; Sheet : in Stylesheet_Access); end CSS.Core;
programs/oeis/124/A124152.asm
karttu/loda
0
99607
; A124152: a(n) = Fibonacci(6, n). ; 0,8,70,360,1292,3640,8658,18200,34840,61992,104030,166408,255780,380120,548842,772920,1065008,1439560,1912950,2503592,3232060,4121208,5196290,6485080,8017992,9828200,11951758,14427720,17298260,20608792,24408090,28748408,33685600,39279240,45592742,52693480,60652908,69546680,79454770,90461592,102656120,116132008,130987710,147326600,165257092,184892760,206352458,229760440,255246480,282945992,313000150,345556008,380766620,418791160,459795042,503950040,551434408,602433000,657137390,715745992,778464180,845504408,917086330,993436920,1074790592,1161389320,1253482758,1351328360,1455191500,1565345592,1682072210,1805661208,1936410840,2074627880,2220627742,2374734600,2537281508,2708610520,2889072810,3079028792,3278848240,3488910408,3709604150,3941328040,4184490492,4439509880,4706814658,4986843480,5280045320,5586879592,5907816270,6243336008,6593930260,6960101400,7342362842,7741239160,8157266208,8590991240,9042973030,9513781992,10004000300,10514222008,11045053170,11597111960,12171028792,12767446440,13387020158,14030417800,14698319940,15391419992,16110424330,16856052408,17629036880,18430123720,19260072342,20119655720,21009660508,21930887160,22884150050,23870277592,24890112360,25944511208,27034345390,28160500680,29323877492,30525391000,31765971258,33046563320,34368127360,35731638792,37138088390,38588482408,40083842700,41625206840,43213628242,44850176280,46535936408,48272010280,50059515870,51899587592,53793376420,55742050008,57746792810,59808806200,61929308592,64109535560,66350739958,68654192040,71021179580,73453007992,75951000450,78516498008,81150859720,83855462760,86631702542,89480992840,92404765908,95404472600,98481582490,101637583992,104873984480,108192310408,111594107430,115080940520,118654394092,122316072120,126067598258,129910615960,133846788600,137877799592,142005352510,146231171208,150556999940,154984603480,159515767242,164152297400,168896021008,173748786120,178712461910,183788938792,188980128540,194287964408,199714401250,205261415640,210931005992,216725192680,222646018158,228695547080,234875866420,241189085592,247637336570,254222774008,260947575360,267813941000,274824094342,281980281960,289284773708,296739862840,304347866130,312111123992,320032000600,328112884008,336356186270,344764343560,353339816292,362085089240,371002671658,380095097400,389364925040,398814737992,408447144630,418264778408,428270297980,438466387320,448855755842,459441138520,470225296008,481211014760,492401107150,503798411592,515405792660,527226141208,539262374490,551517436280,563994296992,576695953800,589625430758,602785778920,616180076460,629811428792,643682968690,657797856408,672159279800,686770454440,701634623742,716755059080,732135059908,747777953880,763687096970,779865873592,796317696720,813046008008,830054277910,847346005800,864924720092,882793978360,900957367458,919418503640,938181032680,957248629992 mov $2,3 mov $5,$0 mov $6,$0 lpb $2,1 add $1,$5 sub $2,1 lpe mov $3,$6 lpb $3,1 sub $3,1 add $4,$5 lpe mov $3,$6 mov $5,$4 mov $4,0 lpb $3,1 sub $3,1 add $4,$5 lpe mov $2,4 mov $5,$4 lpb $2,1 add $1,$5 sub $2,1 lpe mov $3,$6 mov $4,0 lpb $3,1 sub $3,1 add $4,$5 lpe mov $3,$6 mov $5,$4 mov $4,0 lpb $3,1 sub $3,1 add $4,$5 lpe mov $2,1 mov $5,$4 lpb $2,1 add $1,$5 sub $2,1 lpe
Aurora/Aurora/x64/Debug/ioquery.asm
manaskamal/aurora-xeneva
8
11275
; Listing generated by Microsoft (R) Optimizing Compiler Version 17.00.50727.1 include listing.inc INCLUDELIB LIBCMT INCLUDELIB OLDNAMES PUBLIC ?ioquery@@YAXHHPEAX@Z ; ioquery EXTRN ?vfs_ioquery@@YAHPEAU_vfs_node_@@HPEAX@Z:PROC ; vfs_ioquery EXTRN x64_cli:PROC EXTRN ?get_current_thread@@YAPEAU_thread_@@XZ:PROC ; get_current_thread pdata SEGMENT $pdata$?ioquery@@YAXHHPEAX@Z DD imagerel $LN4 DD imagerel $LN4+77 DD imagerel $unwind$?ioquery@@YAXHHPEAX@Z pdata ENDS xdata SEGMENT $unwind$?ioquery@@YAXHHPEAX@Z DD 011101H DD 06211H xdata ENDS ; Function compile flags: /Odtpy ; File e:\xeneva project\xeneva\aurora\aurora\sysserv\ioquery.cpp _TEXT SEGMENT node$ = 32 device_id$ = 64 code$ = 72 arg$ = 80 ?ioquery@@YAXHHPEAX@Z PROC ; ioquery ; 22 : void ioquery (int device_id, int code, void* arg) { $LN4: mov QWORD PTR [rsp+24], r8 mov DWORD PTR [rsp+16], edx mov DWORD PTR [rsp+8], ecx sub rsp, 56 ; 00000038H ; 23 : x64_cli(); call x64_cli ; 24 : vfs_node_t *node = get_current_thread()->fd[device_id]; call ?get_current_thread@@YAPEAU_thread_@@XZ ; get_current_thread movsxd rcx, DWORD PTR device_id$[rsp] mov rax, QWORD PTR [rax+rcx*8+272] mov QWORD PTR node$[rsp], rax ; 25 : if (node) cmp QWORD PTR node$[rsp], 0 je SHORT $LN1@ioquery ; 26 : vfs_ioquery(node, code, arg); mov r8, QWORD PTR arg$[rsp] mov edx, DWORD PTR code$[rsp] mov rcx, QWORD PTR node$[rsp] call ?vfs_ioquery@@YAHPEAU_vfs_node_@@HPEAX@Z ; vfs_ioquery $LN1@ioquery: ; 27 : return; ; 28 : } add rsp, 56 ; 00000038H ret 0 ?ioquery@@YAXHHPEAX@Z ENDP ; ioquery _TEXT ENDS END
wof/lcs/123p/E.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
6
23463
copyright zengfr site:http://github.com/zengfr/romhack 0010D0 rts [123p+ C, 123p+ E, enemy+ C, enemy+ E] 007D44 move.b #$4, ($2a,A0) [123p+ C, 123p+ E, enemy+ C, enemy+ E] 011CEE clr.l ($c,A0) [123p+ 40, enemy+40] 011CF2 addq.b #2, ($2b,A0) [123p+ C, 123p+ E, enemy+ C, enemy+ E] 011D1E jsr $2470.w [123p+ C, 123p+ E, enemy+ C, enemy+ E] 012082 jsr $2470.w 01A74C dbra D7, $1a74a 01A75E dbra D4, $1a75c 01AC70 move.l #$1000000, ($c,A0) [123p+ B9] 01AC78 addq.b #2, ($2a,A0) [123p+ C, 123p+ E] 01ACDC move.b #$1e, ($1f,A0) [123p+ C, 123p+ E] 01AE5C move.b ($a0,A0), D6 01B1B8 move.b D0, ($1f,A0) 01B2CC move.w D0, ($94,A0) 01B96E bset #$7, (A0) 01BCF6 move.b ($a0,A0), D6 01BF6A move.w D0, ($94,A0) 01CD6A move.w D0, ($94,A0) 01CE34 move.l D0, ($c,A0) 01CE38 move.b #$4, ($2b,A0) 01CF1A move.b #$4, ($2b,A0) copyright zengfr site:http://github.com/zengfr/romhack
libsrc/_DEVELOPMENT/l/z80/longlong/l_neg_64_mhl.asm
jpoikela/z88dk
640
101211
<filename>libsrc/_DEVELOPMENT/l/z80/longlong/l_neg_64_mhl.asm SECTION code_clib SECTION code_l PUBLIC l_neg_64_mhl EXTERN l_cpl_64_mhl l_neg_64_mhl: ; negate 64-bit number at address hl ; ; enter : hl = longlong * ; ; exit : *longlong = -longlong ; ; uses : af, hl push hl call l_cpl_64_mhl pop hl inc (hl) ret nz inc hl inc (hl) ret nz inc hl inc (hl) ret nz inc hl inc (hl) ret nz inc hl inc (hl) ret nz inc hl inc (hl) ret nz inc hl inc (hl) ret nz inc hl inc (hl) ret
test/Succeed/RecursiveInstanceSearch.agda
shlevy/agda
1,989
6468
<filename>test/Succeed/RecursiveInstanceSearch.agda module RecursiveInstanceSearch where open import Common.Prelude open import Common.Product _&&_ : Bool β†’ Bool β†’ Bool true && b = b false && _ = false record Eq (A : Set) : Set where constructor eq field _==_ : A β†’ A β†’ Bool open Eq {{...}} public instance eq-Bool : Eq Bool eq-Bool = eq aux where aux : Bool β†’ Bool β†’ Bool aux true true = true aux false false = true aux _ _ = false eq-Nat : Eq Nat eq-Nat = eq aux where aux : Nat β†’ Nat β†’ Bool aux zero zero = true aux (suc n) (suc m) = aux n m aux _ _ = false eq-Maybe : {A : Set} {{_ : Eq A}} β†’ Eq (Maybe A) eq-Maybe {A} = eq aux where aux : Maybe A β†’ Maybe A β†’ Bool aux nothing nothing = true aux (just y) (just z) = (y == z) aux _ _ = false eq-List : {A : Set} {{_ : Eq A}} β†’ Eq (List A) eq-List {A} = eq aux where aux : List A β†’ List A β†’ Bool aux [] [] = true aux (x ∷ l) (y ∷ l') = (x == y) && (aux l l') aux _ _ = false eq-Γ— : {A B : Set} {{_ : Eq A}} {{_ : Eq B}} β†’ Eq (A Γ— B) eq-Γ— {A} {B} = eq (Ξ» x y β†’ (proj₁ x == proj₁ y) && (projβ‚‚ x == projβ‚‚ y)) testβ‚‚ : Bool testβ‚‚ = (3 == 4) test₃ : Bool test₃ = ((just 9) == nothing) test₃' : Bool test₃' = (nothing == just 6) testβ‚„ : Bool testβ‚„ = (true ∷ []) == (false ∷ []) testβ‚… : Bool testβ‚… = (just ((true ,β€² (1 ,β€² just 0)) ∷ []) == just ((true , (1 , just 0)) ∷ []))
tests/syntax_examples/src/basic_declaration-protected_body_stub_name.adb
TNO/Dependency_Graph_Extractor-Ada
1
4190
separate(Basic_Declaration) protected body Protected_Body_Stub_Name is end Protected_Body_Stub_Name;
programs/oeis/021/A021466.asm
neoneye/loda
22
104831
<gh_stars>10-100 ; A021466: Decimal expansion of 1/462. ; 0,0,2,1,6,4,5,0,2,1,6,4,5,0,2,1,6,4,5,0,2,1,6,4,5,0,2,1,6,4,5,0,2,1,6,4,5,0,2,1,6,4,5,0,2,1,6,4,5,0,2,1,6,4,5,0,2,1,6,4,5,0,2,1,6,4,5,0,2,1,6,4,5,0,2,1,6,4,5,0,2,1,6,4,5,0,2,1,6,4,5,0,2,1,6,4,5,0,2 add $0,1 mov $1,10 pow $1,$0 mul $1,8 div $1,3696 mod $1,10 mov $0,$1
utils/disk-tools/split/io.asm
vbmacher/qsOS
1
96398
; ; Extended Operating System Loader (XOSL) ; Copyright (c) 1999 by <NAME> ; ; This code is distributed under GNU General Public License (GPL) ; ; The full text of the license can be found in the GPL.TXT file, ; or at http://www.gnu.org ; .model compact .386p .code public _creat, _open, _close, _read, _write, _chmod ;int creat(const char *path); _creat proc push bp mov bp,sp push ds mov ah,3ch xor cx,cx lds dx,[bp + 4] int 21h jnc CreatOk mov ax,-1 CreatOk: pop ds pop bp ret _creat endp ;int open(const char *path, int access); _open proc push bp mov bp,sp push ds mov ah,3dh mov al,[bp + 8] lds dx,[bp + 4] xor cx,cx int 21h jnc OpenOk mov ax,-1 OpenOk: pop ds pop bp ret _open endp ;void close(int handle); _close proc push bp mov bp,sp mov ah,3eh mov bx,[bp + 4] int 21h pop bp ret _close endp ;unsigned short read(int handle, void *buf, unsigned short len); _read proc push bp mov bp,sp push ds mov ah,3fh mov bx,[bp + 4] mov cx,[bp + 10] lds dx,[bp + 6] int 21h jnc ReadOK xor ax,ax ReadOk: pop ds pop bp ret _read endp ;unsigned short write(int handle, void *buf, unsigned short len); _write proc push bp mov bp,sp push ds mov ah,40h mov bx,[bp + 4] mov cx,[bp + 10] lds dx,[bp + 6] int 21h jnc WriteOK xor ax,ax WriteOk: pop ds pop bp ret _write endp ;int chmod(const char *path, int amode) _chmod proc push bp mov bp,sp push ds mov ax,4301h mov cx,[bp + 8] lds dx,[bp + 4] int 21h sbb ax,ax pop ds pop bp ret _chmod endp end
CISP 310/M6 - Procedures and Macros/A7_Calculator.asm
gb-camera/college-hw
0
4310
<gh_stars>0 ; CISP 310 - <NAME> ; Assignment 7 - Calculator ; 11/08/2020 INCLUDE io.h .DATA ; data operator BYTE 11 DUP (?) ; program variables prompt1 BYTE "Enter first number.", 0 prompt2 BYTE "Enter operator.", 0 prompt3 BYTE "Enter second number." string BYTE 40 DUP (?) resultLb BYTE "Operation result is", 0 result BYTE 11 DUP (?) .CODE addition PROC mov eax, ebx add eax, ecx ret addition ENDP multiplication PROC mov eax, ebx mul ecx ret multiplication ENDP subtraction PROC mov eax, ebx sub eax, ecx ret subtraction ENDP division PROC mov eax, ebx div ecx ret division ENDP MainProc PROC ; reserve stack space sub rsp, 120 whileN: ; get first number input prompt1, string, 40 ; if user inputs e here, exit program cmp string, "e"; je endWhileN ; otherwise keep going atod string mov ebx, eax ; get the operator input prompt2, operator, 40 ; if user inputs e here, exit program cmp operator, "e"; je endWhileN ; otherwise keep going ; clear string for prompt mov string, 0 ; get second number input prompt3, string, 40 ; if user inputs e here, exit program cmp string, "e"; je endWhileN ; otherwise keep going atod string mov ecx, eax ; compare our user input operators and jump appropriately cmp operator, "+"; je addit cmp operator, "-"; je subtr cmp operator, "*"; je multi cmp operator, "/"; je divis addit: call addition ; add and go to result phase jmp display subtr: call subtraction ; sub and go to result phase jmp display multi: call multiplication ; multiply and go to result phase jmp display divis: call division ; divive, result phase follows display: ; now we need to output dtoa result, eax output resultLb, result jmp whileN ; loop again endWhileN: ; program end add rsp, 120 ; restore stack mov rax, 0 ; value to return (0) ret MainProc ENDP END