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
Cubical/HITs/Ints/IsoInt.agda
dan-iel-lee/cubical
0
328
<reponame>dan-iel-lee/cubical {-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.Ints.IsoInt where open import Cubical.HITs.Ints.IsoInt.Base public
unittests/ASM/X87/D9_06_2.asm
cobalt2727/FEX
628
11395
%ifdef CONFIG { "RegData": { "MM6": ["0x8000000000000000", "0x4000"], "MM7": ["0x8000000000000000", "0x3fff"] }, "MemoryRegions": { "0x100000000": "4096" } } %endif mov rdx, 0xe0000000 mov eax, 0x3f800000 ; 1.0 mov [rdx + 8 * 0], eax mov eax, 0x40000000 ; 2.0 mov [rdx + 8 * 1], eax mov eax, 0x40800000 ; 4.0 mov [rdx + 8 * 2], eax fld dword [rdx + 8 * 0] o32 fstenv [rdx + 8 * 3] fld dword [rdx + 8 * 2] o32 fldenv [rdx + 8 * 3] ; This will overwrite the previous load ; This is since the control word is stored and reloaded fld dword [rdx + 8 * 1] ; 14 bytes for 16bit ; 2 Bytes : FCW ; 2 Bytes : FSW ; 2 bytes : FTW ; 2 bytes : Instruction offset ; 2 bytes : Instruction CS selector ; 2 bytes : Data offset ; 2 bytes : Data selector ; 28 bytes for 32bit ; 4 bytes : FCW ; 4 bytes : FSW ; 4 bytes : FTW ; 4 bytes : Instruction pointer ; 2 bytes : instruction pointer selector ; 2 bytes : Opcode ; 4 bytes : data pointer offset ; 4 bytes : data pointer selector hlt
gcc-gcc-7_3_0-release/gcc/ada/s-pooloc.ads
best08618/asylo
7
11752
<filename>gcc-gcc-7_3_0-release/gcc/ada/s-pooloc.ads ------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S Y S T E M . P O O L _ L O C A L -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2011, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- Storage pool for use with local objects with automatic reclaim with System.Storage_Elements; with System.Pool_Global; package System.Pool_Local is pragma Elaborate_Body; -- Needed to ensure that library routines can execute allocators ---------------------------- -- Unbounded_Reclaim_Pool -- ---------------------------- -- Allocation strategy: -- Call to malloc/free for each Allocate/Deallocate -- No user specifiable size -- Space of allocated objects is reclaimed at pool finalization -- Manages a list of allocated objects type Unbounded_Reclaim_Pool is new System.Pool_Global.Unbounded_No_Reclaim_Pool with record First : System.Address := Null_Address; end record; -- function Storage_Size is inherited procedure Allocate (Pool : in out Unbounded_Reclaim_Pool; Address : out System.Address; Storage_Size : System.Storage_Elements.Storage_Count; Alignment : System.Storage_Elements.Storage_Count); procedure Deallocate (Pool : in out Unbounded_Reclaim_Pool; Address : System.Address; Storage_Size : System.Storage_Elements.Storage_Count; Alignment : System.Storage_Elements.Storage_Count); procedure Finalize (Pool : in out Unbounded_Reclaim_Pool); end System.Pool_Local;
BigNum/Mod/Io/bnToBytesEx.asm
FloydZ/Crypto-Hash
11
20908
<filename>BigNum/Mod/Io/bnToBytesEx.asm .686 .model flat,stdcall option casemap:none include .\bnlib.inc include .\bignum.inc .code ;; ;; converts bn to sequence of bytes bswap-ed ;; returns sign ;_a_ bnToBytesEx proc uses esi edi bn:dword,pBytes:dword mov esi,bn mov edi,pBytes mov ecx,[esi].BN.dwSize mov edx,[esi].BN.bSigned lea esi,[esi].BN.dwArray[ecx*4-4] .repeat mov eax,[esi] sub esi,4 bswap eax stosd dec ecx .until zero? mov eax,edx ret bnToBytesEx endp end
alloy4fun_models/trainstlt/models/4/fNZ5bNJg67dLRkDj5.als
Kaixi26/org.alloytools.alloy
0
4717
<gh_stars>0 open main pred idfNZ5bNJg67dLRkDj5_prop5 { always all t : Train | t.pos' in t.pos.prox || t.pos' = Exit } pred __repair { idfNZ5bNJg67dLRkDj5_prop5 } check __repair { idfNZ5bNJg67dLRkDj5_prop5 <=> prop5o }
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_18651_2466.asm
ljhsiun2/medusa
9
9747
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r15 push %r9 push %rbp push %rcx push %rdi push %rsi lea addresses_WT_ht+0xbb14, %rsi lea addresses_A_ht+0x4114, %rdi nop nop nop nop nop and %rbp, %rbp mov $68, %rcx rep movsl nop nop nop nop cmp %r11, %r11 lea addresses_D_ht+0x19314, %r11 nop sub %r15, %r15 vmovups (%r11), %ymm7 vextracti128 $0, %ymm7, %xmm7 vpextrq $0, %xmm7, %rbp nop nop nop and $9466, %rbp lea addresses_WT_ht+0x1eda4, %r11 nop nop nop inc %r9 mov $0x6162636465666768, %rcx movq %rcx, (%r11) nop and %r11, %r11 lea addresses_A_ht+0x1bc14, %r9 nop add $43314, %rsi mov $0x6162636465666768, %r15 movq %r15, %xmm6 movups %xmm6, (%r9) nop nop nop nop nop and %rsi, %rsi lea addresses_WC_ht+0x139e7, %rdi nop nop dec %rcx mov (%rdi), %r9 nop nop xor $16209, %r9 lea addresses_normal_ht+0x15914, %rsi nop inc %rdi mov (%rsi), %cx cmp %r11, %r11 pop %rsi pop %rdi pop %rcx pop %rbp pop %r9 pop %r15 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r14 push %r8 push %rbp push %rcx push %rdi push %rsi // Load lea addresses_WT+0xcb14, %r8 add $15097, %r10 mov (%r8), %r11 nop nop nop nop nop and $46441, %rsi // Store lea addresses_D+0x16314, %rcx and $46321, %rbp movw $0x5152, (%rcx) nop nop nop sub %r8, %r8 // Load lea addresses_D+0x138f4, %r10 nop nop nop add $44684, %rbp mov (%r10), %r14d sub %r10, %r10 // Store lea addresses_PSE+0xbc14, %rbp nop nop cmp %r14, %r14 mov $0x5152535455565758, %rsi movq %rsi, %xmm1 movups %xmm1, (%rbp) nop nop nop xor $22545, %r10 // REPMOV lea addresses_US+0x1ba8a, %rsi lea addresses_D+0x1c414, %rdi nop nop nop and %r14, %r14 mov $84, %rcx rep movsb nop nop and $55434, %rdi // Faulty Load lea addresses_D+0x16314, %r8 clflush (%r8) nop and %rbp, %rbp movups (%r8), %xmm4 vpextrq $1, %xmm4, %r14 lea oracles, %rdi and $0xff, %r14 shlq $12, %r14 mov (%rdi,%r14,1), %r14 pop %rsi pop %rdi pop %rcx pop %rbp pop %r8 pop %r14 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_D', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT', 'same': False, 'size': 8, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_D', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_D', 'same': False, 'size': 4, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_PSE', 'same': False, 'size': 16, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_US', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_D', 'congruent': 6, 'same': False}, 'OP': 'REPM'} [Faulty Load] {'src': {'type': 'addresses_D', 'same': True, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_D_ht', 'same': False, 'size': 32, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 8, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 16, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 2, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'36': 18651} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
src/gen/gstreamer-gst_low_level-gstreamer_0_10_gst_gstpipeline_h.ads
persan/A-gst
1
8515
pragma Ada_2005; pragma Style_Checks (Off); pragma Warnings (Off); with Interfaces.C; use Interfaces.C; with glib; with glib.Values; with System; with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbin_h; with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstclock_h; with System; with glib; limited with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstelement_h; limited with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbus_h; package GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstpipeline_h is -- unsupported macro: GST_TYPE_PIPELINE (gst_pipeline_get_type ()) -- arg-macro: function GST_PIPELINE (obj) -- return G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PIPELINE, GstPipeline); -- arg-macro: function GST_IS_PIPELINE (obj) -- return G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PIPELINE); -- arg-macro: function GST_PIPELINE_CLASS (klass) -- return G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PIPELINE, GstPipelineClass); -- arg-macro: function GST_IS_PIPELINE_CLASS (klass) -- return G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PIPELINE); -- arg-macro: function GST_PIPELINE_GET_CLASS (obj) -- return G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_PIPELINE, GstPipelineClass); -- arg-macro: function GST_PIPELINE_CAST (obj) -- return (GstPipeline*)(obj); -- GStreamer -- * Copyright (C) 1999,2000 <NAME> <<EMAIL>> -- * 2000 <NAME> <<EMAIL>> -- * -- * gstpipeline.h: Header for GstPipeline element -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Library General Public -- * License as published by the Free Software Foundation; either -- * version 2 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Library General Public License for more details. -- * -- * You should have received a copy of the GNU Library General Public -- * License along with this library; if not, write to the -- * Free Software Foundation, Inc., 59 Temple Place - Suite 330, -- * Boston, MA 02111-1307, USA. -- type GstPipeline; type u_GstPipeline_u_gst_reserved_array is array (0 .. 2) of System.Address; --subtype GstPipeline is u_GstPipeline; -- gst/gstpipeline.h:39 type GstPipelineClass; type u_GstPipelineClass_u_gst_reserved_array is array (0 .. 3) of System.Address; --subtype GstPipelineClass is u_GstPipelineClass; -- gst/gstpipeline.h:40 -- skipped empty struct u_GstPipelinePrivate -- skipped empty struct GstPipelinePrivate --* -- * GstPipelineFlags: -- * @GST_PIPELINE_FLAG_FIXED_CLOCK: this pipeline works with a fixed clock -- * @GST_PIPELINE_FLAG_LAST: offset to define more flags -- * -- * Pipeline flags -- -- padding subtype GstPipelineFlags is unsigned; GST_PIPELINE_FLAG_FIXED_CLOCK : constant GstPipelineFlags := 33554432; GST_PIPELINE_FLAG_LAST : constant GstPipelineFlags := 536870912; -- gst/gstpipeline.h:54 --* -- * GstPipeline: -- * @fixed_clock: The fixed clock of the pipeline, used when -- * GST_PIPELINE_FLAG_FIXED_CLOCK is set. -- * @stream_time: The stream time of the pipeline. A better name for this -- * property would be the running_time, the total time spent in the -- * PLAYING state without being flushed. (deprecated, use the start_time -- * on GstElement). -- * @delay: Extra delay added to base_time to compensate for computing delays -- * when setting elements to PLAYING. -- * -- * The #GstPipeline structure. -- type GstPipeline is record bin : aliased GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbin_h.GstBin; -- gst/gstpipeline.h:70 fixed_clock : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstclock_h.GstClock; -- gst/gstpipeline.h:73 stream_time : aliased GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstclock_h.GstClockTime; -- gst/gstpipeline.h:75 c_delay : aliased GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstclock_h.GstClockTime; -- gst/gstpipeline.h:76 priv : System.Address; -- gst/gstpipeline.h:79 u_gst_reserved : u_GstPipeline_u_gst_reserved_array; -- gst/gstpipeline.h:81 end record; pragma Convention (C_Pass_By_Copy, GstPipeline); -- gst/gstpipeline.h:69 --< public > -- with LOCK --< private > type GstPipelineClass is record parent_class : aliased GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbin_h.GstBinClass; -- gst/gstpipeline.h:85 u_gst_reserved : u_GstPipelineClass_u_gst_reserved_array; -- gst/gstpipeline.h:88 end record; pragma Convention (C_Pass_By_Copy, GstPipelineClass); -- gst/gstpipeline.h:84 --< private > function gst_pipeline_get_type return GLIB.GType; -- gst/gstpipeline.h:91 pragma Import (C, gst_pipeline_get_type, "gst_pipeline_get_type"); function gst_pipeline_new (name : access GLIB.gchar) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstelement_h.GstElement; -- gst/gstpipeline.h:92 pragma Import (C, gst_pipeline_new, "gst_pipeline_new"); function gst_pipeline_get_bus (pipeline : access GstPipeline) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbus_h.GstBus; -- gst/gstpipeline.h:94 pragma Import (C, gst_pipeline_get_bus, "gst_pipeline_get_bus"); procedure gst_pipeline_set_new_stream_time (pipeline : access GstPipeline; time : GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstclock_h.GstClockTime); -- gst/gstpipeline.h:97 pragma Import (C, gst_pipeline_set_new_stream_time, "gst_pipeline_set_new_stream_time"); function gst_pipeline_get_last_stream_time (pipeline : access GstPipeline) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstclock_h.GstClockTime; -- gst/gstpipeline.h:98 pragma Import (C, gst_pipeline_get_last_stream_time, "gst_pipeline_get_last_stream_time"); procedure gst_pipeline_use_clock (pipeline : access GstPipeline; clock : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstclock_h.GstClock); -- gst/gstpipeline.h:101 pragma Import (C, gst_pipeline_use_clock, "gst_pipeline_use_clock"); function gst_pipeline_set_clock (pipeline : access GstPipeline; clock : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstclock_h.GstClock) return GLIB.gboolean; -- gst/gstpipeline.h:102 pragma Import (C, gst_pipeline_set_clock, "gst_pipeline_set_clock"); function gst_pipeline_get_clock (pipeline : access GstPipeline) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstclock_h.GstClock; -- gst/gstpipeline.h:103 pragma Import (C, gst_pipeline_get_clock, "gst_pipeline_get_clock"); procedure gst_pipeline_auto_clock (pipeline : access GstPipeline); -- gst/gstpipeline.h:104 pragma Import (C, gst_pipeline_auto_clock, "gst_pipeline_auto_clock"); procedure gst_pipeline_set_delay (pipeline : access GstPipeline; c_delay : GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstclock_h.GstClockTime); -- gst/gstpipeline.h:106 pragma Import (C, gst_pipeline_set_delay, "gst_pipeline_set_delay"); function gst_pipeline_get_delay (pipeline : access GstPipeline) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstclock_h.GstClockTime; -- gst/gstpipeline.h:107 pragma Import (C, gst_pipeline_get_delay, "gst_pipeline_get_delay"); procedure gst_pipeline_set_auto_flush_bus (pipeline : access GstPipeline; auto_flush : GLIB.gboolean); -- gst/gstpipeline.h:109 pragma Import (C, gst_pipeline_set_auto_flush_bus, "gst_pipeline_set_auto_flush_bus"); function gst_pipeline_get_auto_flush_bus (pipeline : access GstPipeline) return GLIB.gboolean; -- gst/gstpipeline.h:110 pragma Import (C, gst_pipeline_get_auto_flush_bus, "gst_pipeline_get_auto_flush_bus"); end GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstpipeline_h;
func-trig.asm
cotarr/calc-pi-x86-64-asm
0
95807
<gh_stars>0 ;------------------------------------------------------------- ; ; SINGLE THREAD FLOATING POINT MULTI-PRECISION CALCULATOR ; ; Calculation of Trig functions ; ; File: func-trig.asm ; Module: func.asm, func.o ; Exec: calc-pi ; ; Created 11/13/2014 ; Last Edit 04/29/2020 ; ;-------------------------------------------------------------- ; MIT License ; ; Copyright 2014-2020 <NAME> ; ; Permission is hereby granted, free of charge, to any person obtaining a copy ; of this software and associated documentation files (the "Software"), to deal ; in the Software without restriction, including without limitation the rights ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ; copies of the Software, and to permit persons to whom the Software is ; furnished to do so, subject to the following conditions: ; The above copyright notice and this permission notice shall be included in all ; copies or substantial portions of the Software. ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ; SOFTWARE. ;------------------------------------------------------------- ; Function_cos_x: ; Function_sin_x: ; Function_arcsin_x: ;------------------------------------------------------------- ; ; Function: cos(x) ; ; Input: ; XREG = Input number (X) ; ; Program use: ; REG0 = Sum ; REG1 = Term (always positive, add sign on add) ; REG2 = n ; REG3 = x^2 ; ; Output: ; XREG = Cos(X) ; ; cos(x) = 1 - x^2/2! + x^4/4! - x^6/6! ... ; ;-------------------------------------------------------------- ; Function_cos_x: push rax push rbx push rcx push rdx push rbp push rsi push rdi push r8 ; Used as (-1)^n counter ; ; Check for zero. If zero, return arccos(0) = 1 ; mov rbx, FP_X_Reg ; Point RBX at Xreg variable mov rax, [rbx+MAN_MSW_OFST] ; Get MS word or rax, rax ; Check of ACC = 0 jnz .notZero ; Not zero, continue mov rsi, HAND_XREG call SetToOne ; If zero, set cosine to 1 jmp .exit ; then exit with result in X-Reg .notZero: ; ; ;^^^^^^^^^^^^^^^^^^^^^^ Watch Progress ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mov rbx, [iShowCalcStep] ; print each 100 term mov rax, 0x02000000 ; set skip counter from rbx call ShowCalcProgress ; initialize ;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ; ; Used to reduce accuracy during divisions ; call ClearGrabAccuracy ; initialize reduced accuracy variables ; ; Load 1 into Reg0 as initial sum ; mov rsi, HAND_REG0 call SetToOne ; Reg0 = 1 first term ; ; Load 1 into REG1 as first(previous) n=0 term ; mov rsi, HAND_REG1 call SetToOne ; REG1 (term) = 1 ; ; Set n counter in REG2 to 0, for 2,4,6 ... ; mov rsi, HAND_REG2 call ClearVariable ; REG2 = 0 (n counter) ; ; Load X*X int REG3 ; mov rsi, HAND_XREG mov rdi, HAND_ACC call CopyVariable ; ACC = X the number mov rdi, HAND_OPR call CopyVariable ; OPR = X the number call FP_Multiplication ; OPR = X * X mov rsi, HAND_ACC mov rdi, HAND_REG3 call CopyVariable ; REG3 = x*x ; ; Init sign counter for (-1)^n ; mov r8, 0 ; ; * * * * * * * * * * * * * * * * * * * * * * * * * * ; ; M A I N L O O P ; ; * * * * * * * * * * * * * * * * * * * * * * * * * * ; .loop1: ; ; Add 1 to n ; mov rsi, HAND_REG2 mov rdi, HAND_OPR call CopyVariable ; OPR = last n mov rsi, HAND_ACC call SetToOne ; ACC = 1 call FP_Addition ; ACC = n+1 mov rsi, HAND_ACC mov rdi, HAND_REG2 call CopyVariable ; REG2 = n+1 ; ; Move last term and divide by n+2 ; mov rsi, HAND_REG1 mov rdi, HAND_OPR call CopyVariable ; OPR = last term call ReduceSeriesAccuracy call FP_Division ; ACC = term / (n+1) call RestoreFullAccuracy mov rsi, HAND_ACC mov rdi, HAND_REG1 call CopyVariable ; [ REG1 = (last-term) / n+1 ; ; Add 1 to n ; mov rsi, HAND_REG2 mov rdi, HAND_OPR call CopyVariable ; OPR = last n mov rsi, HAND_ACC call SetToOne ; ACC = 1 call FP_Addition ; ACC = n+2 mov rsi, HAND_ACC mov rdi, HAND_REG2 call CopyVariable ; REG2 = n+2 ; ; Move last term and divide by n+2 ; mov rsi, HAND_REG1 mov rdi, HAND_OPR call CopyVariable ; OPR = last term call ReduceSeriesAccuracy call FP_Division ; ACC = term / (n+2) call RestoreFullAccuracy ; ; Get X*X and multiply ; mov rsi, HAND_REG3 mov rdi, HAND_OPR call CopyVariable ; OPR = X*X call ReduceSeriesAccuracy call FP_Multiplication ; ACC = term / (n+2) call RestoreFullAccuracy mov rsi, HAND_ACC mov rdi, HAND_REG1 call CopyVariable ; REG1 is term, save for next ; ; If odd term change sign ; inc r8 ; sign counter test r8, 1 ; is bit 1 positive jz .skip1 mov rsi, HAND_ACC call FP_TwosCompliment ; Change sign ; ; get sum and add term ; .skip1: mov rsi, HAND_REG0 mov rdi, HAND_OPR call CopyVariable call FP_Addition call GrabSeriesAccuracy mov rsi, HAND_ACC mov rdi, HAND_REG0 call CopyVariable ; ;^^^^^^^^^^^^^^^^^^^^^^ Watch Progress ^^^^^^^^^^^^^^^^^^^ ; -Print-- Inc/Rset -Format- mov rax, (0x01110101 | 0x00000404 | 0x60000000 ) call ShowCalcProgress ;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ; ; Check if last term was not significant ; mov rax, [Nearly_Zero] ; Check for done or rax, rax jnz .done1 ; Done go exit jmp .loop1 ; Else loop back ;------------------------------------------------------------------ ; ; E X I T L O O P 1 ; ;------------------------------------------------------------------ .done1: ; ; Copy result to XREG ; mov rsi, HAND_REG0 mov rdi, HAND_XREG call CopyVariable ; ;^^^^^^^^^^^^^^^^^^^^^^ Watch Progress ^^^^^^^^^^^^^^^^^^^ ; -Print-- Inc/Rset -Format- mov rax, (0x00030303 | 0x00008000 | 0x30000000 ) call ShowCalcProgress ;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ; ; Clear temporary variables ; ; mov rsi, HAND_REG0 ; call ClearVariable ; mov rsi, HAND_REG1 ; call ClearVariable ; mov rsi, HAND_REG2 ; call ClearVariable ; mov rsi, HAND_REG3 ; call ClearVariable ; ;^^^^^^^^^^^^^^^^^^^^^^ Watch Progress ^^^^^^^^^^^^^^^^^^^ ; -Print-- Inc/Rset -Format- mov rax, (0x00033003 | 0x00000000 | 0x30000000 ) call ShowCalcProgress ;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .exit: pop r8 pop rdi pop rsi pop rbp pop rdx pop rcx pop rbx pop rax ret ;-------------------------------------------------------------- ; ; Function: sin(x) ; ; Input: ; XREG = Input number = X ; ; Program use: ; REG0 = Sum ; REG1 = Term (always positive, apply sin during add) ; REG2 = n ; REG3 = x^2 ; ; Output: ; XREG = Sin(X) ; ; sin(x) = x - x^3/3! + x^5/5! - x^7/7! .... ; ;-------------------------------------------------------------- ; Function_sin_x: push rax push rbx push rcx push rdx push rbp push rsi push rdi push r8 ; Used as (-1)^n counter ; ; Check for zero. If zero, return arcsin(0) = 0 ; mov rbx, FP_X_Reg ; Point RBX at Xreg variable mov rax, [rbx+MAN_MSW_OFST] ; Get MS word or rax, rax ; Check of ACC = 0 jnz .notZero ; Not zero, continue jmp .exit ; then exit with result in X-Reg .notZero: ; ; ;^^^^^^^^^^^^^^^^^^^^^^ Watch Progress ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mov rbx, [iShowCalcStep] ; print each 100 term mov rax, 0x02000000 ; set skip counter from rbx call ShowCalcProgress ; initialize ;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ; ; Used to reduce accuracy during divisions ; call ClearGrabAccuracy ; initialize reduced accuracy variables ; ; Load X into Reg0 as initial sum ; mov rsi, HAND_XREG mov rdi, HAND_REG0 call CopyVariable ; REG0 = X the first term ; ; Load x into REG1 as first n=0 term ; mov rsi, HAND_XREG mov rdi, HAND_REG1 call CopyVariable ; REG1 (term) = x ; ; Set n counter in REG2 to 1, for 1,3,5 ... ; mov rsi, HAND_REG2 call SetToOne ; REG2 = 1 (n counter) ; ; Load X*X int REG3 ; mov rsi, HAND_XREG mov rdi, HAND_ACC call CopyVariable ; ACC = X the number mov rdi, HAND_OPR call CopyVariable ; OPR = X the number call FP_Multiplication ; OPR = X * X mov rsi, HAND_ACC mov rdi, HAND_REG3 call CopyVariable ; REG3 = x*x ; ; Init sign counter for (-1)^n ; mov r8, 0 ; ; * * * * * * * * * * * * * * * * * * * * * * * * * * ; ; M A I N L O O P ; ; * * * * * * * * * * * * * * * * * * * * * * * * * * ; .loop1: ; ; Add 1 to n ; mov rsi, HAND_REG2 mov rdi, HAND_OPR call CopyVariable ; OPR = last n mov rsi, HAND_ACC call SetToOne ; ACC = 1 call FP_Addition ; ACC = n+1 mov rsi, HAND_ACC mov rdi, HAND_REG2 call CopyVariable ; REG2 = n+1 ; ; Move last term and divide by n+2 ; mov rsi, HAND_REG1 mov rdi, HAND_OPR call CopyVariable ; OPR = last term call ReduceSeriesAccuracy call FP_Division ; ACC = term / (n+1) call RestoreFullAccuracy mov rsi, HAND_ACC mov rdi, HAND_REG1 call CopyVariable ; [ REG1 = (last-term) / n+1 ; ; Add 1 to n ; mov rsi, HAND_REG2 mov rdi, HAND_OPR call CopyVariable ; OPR = last n mov rsi, HAND_ACC call SetToOne ; ACC = 1 call FP_Addition ; ACC = n+2 mov rsi, HAND_ACC mov rdi, HAND_REG2 call CopyVariable ; REG2 = n+2 ; ; Move last term and divide by n+2 ; mov rsi, HAND_REG1 mov rdi, HAND_OPR call CopyVariable ; OPR = last term call ReduceSeriesAccuracy call FP_Division ; ACC = term / (n+2) call RestoreFullAccuracy ; ; Get X*X and multiply ; mov rsi, HAND_REG3 mov rdi, HAND_OPR call CopyVariable ; OPR = X*X call ReduceSeriesAccuracy call FP_Multiplication ; ACC = term / (n+2) call RestoreFullAccuracy mov rsi, HAND_ACC mov rdi, HAND_REG1 call CopyVariable ; REG1 is term, save for next ; ; If odd term change sign ; inc r8 ; sign counter test r8, 1 ; is bit 1 positive jz .skip1 mov rsi, HAND_ACC call FP_TwosCompliment ; Change sign ; ; get sum and add term ; .skip1: mov rsi, HAND_REG0 mov rdi, HAND_OPR call CopyVariable call FP_Addition call GrabSeriesAccuracy mov rsi, HAND_ACC mov rdi, HAND_REG0 call CopyVariable ; ;^^^^^^^^^^^^^^^^^^^^^^ Watch Progress ^^^^^^^^^^^^^^^^^^^ ; -Print-- Inc/Rset -Format- mov rax, (0x01110101 | 0x00000404 | 0x60000000 ) call ShowCalcProgress ;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ; ; Check if last term was not significant ; mov rax, [Nearly_Zero] ; Check for done or rax, rax jnz .done1 ; Done go exit jmp .loop1 ; Else loop back ;------------------------------------------------------------------ ; ; E X I T L O O P 1 ; ;------------------------------------------------------------------ .done1: ; ; Copy result to XREG ; mov rsi, HAND_REG0 mov rdi, HAND_XREG call CopyVariable ; ;^^^^^^^^^^^^^^^^^^^^^^ Watch Progress ^^^^^^^^^^^^^^^^^^^ ; -Print-- Inc/Rset -Format- mov rax, (0x00030303 | 0x00008000 | 0x30000000 ) call ShowCalcProgress ;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ; ; Clear temporary variables ; mov rsi, HAND_REG0 call ClearVariable mov rsi, HAND_REG1 call ClearVariable mov rsi, HAND_REG2 call ClearVariable mov rsi, HAND_REG3 call ClearVariable ; ;^^^^^^^^^^^^^^^^^^^^^^ Watch Progress ^^^^^^^^^^^^^^^^^^^ ; -Print-- Inc/Rset -Format- mov rax, (0x00033003 | 0x00000000 | 0x30000000 ) call ShowCalcProgress ;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .exit: pop r8 pop rdi pop rsi pop rbp pop rdx pop rcx pop rbx pop rax ret ;-------------------------------------------------------------- ; ; Function: arcsin(x) ; ; Input: ; XREG = Input number = X ; ; Program use: ; REG0 = Sum ; REG1 = Term (always positive, apply sin during add) ; REG2 = n ; REG3 = x^2 ; ; Output: ; XREG = arcsin(X) ; 1 x^3 1*3 x^5 1*3*5 x^7 ; arcsin(x) = x + ( - )*- + ( --- )*- + ( ----- )*- + .... ; 2 3 2*4 5 2*4*6 7 ; ;-------------------------------------------------------------- ; Function_arcsin_x: push rax push rbx push rcx push rdx push rbp push rsi push rdi ; ; Check for zero. If zero, return arcsin(0) = 0 ; mov rbx, FP_X_Reg ; Point RBX at Xreg variable mov rax, [rbx+MAN_MSW_OFST] ; Get MS word or rax, rax ; Check of ACC = 0 jnz .notZero ; Not zero, continue jmp .exit ; then exit with result in X-reg .notZero: ; ; ;^^^^^^^^^^^^^^^^^^^^^^ Watch Progress ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mov rbx, [iShowCalcStep] ; print each 100 term mov rax, 0x02000000 ; set skip counter from rbx call ShowCalcProgress ; initialize ;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ; ; Used to reduce accuracy during divisions ; call ClearGrabAccuracy ; initialize reduced accuracy variables ; ; Load X into Reg0 as initial sum ; mov rsi, HAND_XREG mov rdi, HAND_REG0 call CopyVariable ; REG0 = X the first term ; ; Load x into REG1 as first n=0 term ; mov rsi, HAND_XREG mov rdi, HAND_REG1 call CopyVariable ; REG1 (term) = x ; ; Set n counter in REG2 to 0 ; mov rsi, HAND_REG2 call SetToOne ; REG2 = 1 (n counter) ; ; Load X*X int REG3 ; mov rsi, HAND_XREG mov rdi, HAND_ACC call CopyVariable ; ACC = X the number mov rdi, HAND_OPR call CopyVariable ; OPR = X the number call FP_Multiplication ; OPR = X * X mov rsi, HAND_ACC mov rdi, HAND_REG3 call CopyVariable ; REG3 = x*x ; ; * * * * * * * * * * * * * * * * * * * * * * * * * * ; ; M A I N L O O P ; ; * * * * * * * * * * * * * * * * * * * * * * * * * * ; .loop1: ; ; Move last term and multiply by n ; mov rsi, HAND_REG2 mov rdi, HAND_ACC call CopyVariable ; ACC = last n value mov rsi, HAND_REG1 mov rdi, HAND_OPR call CopyVariable ; OPR = last term ; call ReduceSeriesAccuracy call FP_Multiplication ; ACC = term * n ; call RestoreFullAccuracy mov rsi, HAND_ACC mov rdi, HAND_REG1 call CopyVariable ; [ REG1 = (last-term) * n ; ; Add 1 to n ; mov rsi, HAND_REG2 mov rdi, HAND_OPR call CopyVariable ; OPR = last n mov rsi, HAND_ACC call SetToOne ; ACC = 1 call FP_Addition ; ACC = n+1 mov rsi, HAND_ACC mov rdi, HAND_REG2 call CopyVariable ; REG2 = n+1 ; ; Move last term and divide by n+1 ; mov rsi, HAND_REG1 mov rdi, HAND_OPR call CopyVariable ; OPR = last term ; call ReduceSeriesAccuracy call FP_Division ; ACC = term / (n+1) ; call RestoreFullAccuracy mov rsi, HAND_ACC mov rdi, HAND_REG1 call CopyVariable ; [ REG1 = (last-term) / n+1 ; ; Get X*X and multiply ; mov rsi, HAND_REG3 mov rdi, HAND_OPR call CopyVariable ; OPR = X*X ; call ReduceSeriesAccuracy call FP_Multiplication ; ACC = term * x^2 ; call RestoreFullAccuracy mov rsi, HAND_ACC mov rdi, HAND_REG1 call CopyVariable ; REG1 is term, save for next ; ; Add 1 to n ; mov rsi, HAND_REG2 mov rdi, HAND_OPR call CopyVariable ; OPR = last n mov rsi, HAND_ACC call SetToOne ; ACC = 1 call FP_Addition ; ACC = n+2 mov rsi, HAND_ACC mov rdi, HAND_REG2 call CopyVariable ; REG2 = n+2 ; ; Move last term and divide by n+2, But... do not save result as next Reg1 term ; mov rsi, HAND_REG1 mov rdi, HAND_OPR call CopyVariable ; OPR = last term ; call ReduceSeriesAccuracy call FP_Division ; ACC = term / (n+2) ; call RestoreFullAccuracy ; ; get sum and add term ; mov rsi, HAND_REG0 mov rdi, HAND_OPR call CopyVariable call FP_Addition call GrabSeriesAccuracy mov rsi, HAND_ACC mov rdi, HAND_REG0 call CopyVariable ; ;^^^^^^^^^^^^^^^^^^^^^^ Watch Progress ^^^^^^^^^^^^^^^^^^^ ; -Print-- Inc/Rset -Format- mov rax, (0x01110101 | 0x00000404 | 0x60000000 ) call ShowCalcProgress ;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ; ; Check if last term was not significant ; ;www mov rax, [Nearly_Zero] ; Check for done or rax, rax jnz .done1 ; Done go exit jmp .loop1 ; Else loop back ;------------------------------------------------------------------ ; ; E X I T L O O P 1 ; ;------------------------------------------------------------------ .done1: ; ; Copy result to XREG ; mov rsi, HAND_REG0 mov rdi, HAND_XREG call CopyVariable ; ;^^^^^^^^^^^^^^^^^^^^^^ Watch Progress ^^^^^^^^^^^^^^^^^^^ ; -Print-- Inc/Rset -Format- mov rax, (0x00030303 | 0x00008000 | 0x30000000 ) call ShowCalcProgress ;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ; ; Clear temporary variables ; ; mov rsi, HAND_REG0 ; call ClearVariable ; mov rsi, HAND_REG1 ; call ClearVariable ; mov rsi, HAND_REG2 ; call ClearVariable ; mov rsi, HAND_REG3 ; call ClearVariable ; ;^^^^^^^^^^^^^^^^^^^^^^ Watch Progress ^^^^^^^^^^^^^^^^^^^ ; -Print-- Inc/Rset -Format- mov rax, (0x00033003 | 0x00000000 | 0x30000000 ) call ShowCalcProgress ;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .exit: pop rdi pop rsi pop rbp pop rdx pop rcx pop rbx pop rax ret ;------------------ ; End func-trig.asm ;------------------
QuantitativeAlloy/models/alloy/contracts/measureContracts.als
pf7/QAlloy
0
2086
abstract sig A{ f : one B } abstract sig B{} one sig Unit{ delta : one A } one sig a1, a2, a3 extends A{} one sig b1, b2 extends B{} // Probabilistic function at hand fact PF{ #(a1.f :> b1) = div[7, 10] #(a2.f :> b1) = div[1, 100] one a3.f :> b1 } // Known delta fact Delta{ #(Unit.delta :> a1) = div[1, 10] #(Unit.delta :> a2) = div[2, 10] -- #(Unit.delta :> a3) = div[7, 10] } -- [[q <- f - p]](delta) = (f.q x p) . delta / delta.p fun measureContract[p' : A, q' : B] : Int { let p = drop p', q = drop q' | #delta.(f.q fun/mul p) fun/div #delta.p } /** - Examples: measureContract[a1 + a2, b2] = 0.76 measureContract[a3, b2] = 0 measureContract[A, b2] = 0.228 measureContract[a1 + a2, B] = 1 */
data/baseStats/ivysaur.asm
adhi-thirumala/EvoYellow
16
10004
db DEX_IVYSAUR ; pokedex id db 60 ; base hp db 62 ; base attack db 63 ; base defense db 60 ; base speed db 80 ; base special db GRASS ; species type 1 db POISON ; species type 2 db 35 ; catch rate db 141 ; base exp yield INCBIN "pic/ymon/ivysaur.pic",0,1 ; 66, sprite dimensions dw IvysaurPicFront dw IvysaurPicBack ; attacks known at lvl 0 db TACKLE db GROWL db LEECH_SEED db 0 db 3 ; growth rate ; learnset tmlearn 3,6,8 tmlearn 9,10 tmlearn 20,21,22 tmlearn 31,32 tmlearn 33,34 tmlearn 44 tmlearn 50,51 db BANK(IvysaurPicFront)
libsrc/_DEVELOPMENT/math/float/math48/z80/am48_dmul10a.asm
jpoikela/z88dk
640
100348
<reponame>jpoikela/z88dk<gh_stars>100-1000 SECTION code_clib SECTION code_fp_math48 PUBLIC am48_dmul10a EXTERN mm48_mul10 ; multiply AC' by 10 and make positive ; ; enter : AC'= double x ; ; exit : success ; ; AC'= abs(x) * 10 ; carry reset ; ; fail if overflow ; ; AC'= +inf ; carry set, errno set ; ; uses : af, bc', de', hl' defc am48_dmul10a = mm48_mul10
alloy4fun_models/trashltl/models/4/AWF7csWAowdJi49mt.als
Kaixi26/org.alloytools.alloy
0
2735
open main pred idAWF7csWAowdJi49mt_prop5 { no Trash and (eventually (some Trash)) } pred __repair { idAWF7csWAowdJi49mt_prop5 } check __repair { idAWF7csWAowdJi49mt_prop5 <=> prop5o }
Transynther/x86/_processed/AVXALIGN/_st_zr_un_/i7-7700_9_0xca.log_21829_1197.asm
ljhsiun2/medusa
9
11331
<reponame>ljhsiun2/medusa<filename>Transynther/x86/_processed/AVXALIGN/_st_zr_un_/i7-7700_9_0xca.log_21829_1197.asm .global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r13 push %r9 push %rbx push %rcx push %rdi push %rsi lea addresses_normal_ht+0x12999, %r13 nop nop nop inc %r12 mov $0x6162636465666768, %r11 movq %r11, (%r13) nop nop nop cmp $21756, %rcx lea addresses_D_ht+0x14f09, %rsi lea addresses_WC_ht+0xc489, %rdi clflush (%rdi) nop nop nop nop dec %rbx mov $80, %rcx rep movsb nop nop nop nop xor $46417, %rdi lea addresses_normal_ht+0xb789, %rsi clflush (%rsi) xor $10874, %r12 movw $0x6162, (%rsi) nop nop nop and $10290, %rsi lea addresses_normal_ht+0xab89, %rdi nop nop nop nop xor %rcx, %rcx movb $0x61, (%rdi) nop nop nop cmp %r13, %r13 lea addresses_D_ht+0x14751, %rsi lea addresses_normal_ht+0x6d19, %rdi nop nop xor %r9, %r9 mov $39, %rcx rep movsw xor $51619, %r9 lea addresses_WT_ht+0x7f89, %rdi nop nop nop nop xor %rsi, %rsi mov $0x6162636465666768, %r11 movq %r11, %xmm7 vmovups %ymm7, (%rdi) nop cmp %r11, %r11 pop %rsi pop %rdi pop %rcx pop %rbx pop %r9 pop %r13 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r15 push %r9 push %rbp push %rcx push %rdi push %rdx push %rsi // Load lea addresses_D+0x14389, %rbp nop nop sub %r9, %r9 mov (%rbp), %r15d nop nop nop nop nop sub %r9, %r9 // REPMOV lea addresses_RW+0xeb89, %rsi lea addresses_PSE+0xbb89, %rdi nop nop add %rdx, %rdx mov $82, %rcx rep movsb nop nop sub %rcx, %rcx // Faulty Load mov $0x3d99d60000000b89, %rsi nop nop nop nop sub $6533, %rdx mov (%rsi), %r15d lea oracles, %rdx and $0xff, %r15 shlq $12, %r15 mov (%rdx,%r15,1), %r15 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %r9 pop %r15 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': True, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'} {'src': {'congruent': 2, 'AVXalign': True, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_D'}, 'OP': 'LOAD'} {'src': {'congruent': 11, 'same': False, 'type': 'addresses_RW'}, 'OP': 'REPM', 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_PSE'}} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 4, 'NT': True, 'type': 'addresses_NC'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 8, 'NT': True, 'type': 'addresses_normal_ht'}} {'src': {'congruent': 6, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 7, 'same': True, 'type': 'addresses_WC_ht'}} {'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': True, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_normal_ht'}} {'OP': 'STOR', 'dst': {'congruent': 9, 'AVXalign': True, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_normal_ht'}} {'src': {'congruent': 3, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 4, 'same': False, 'type': 'addresses_normal_ht'}} {'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_WT_ht'}} {'32': 21323, '00': 492, '90': 14} 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 32 32 32 32 32 32 32 32 32 32 32 32 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 32 32 32 32 32 32 32 32 32 32 32 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 32 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 32 32 32 32 00 32 32 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 32 32 32 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 */
Validation/pyFrame3DD-master/gcc-master/gcc/ada/sa_messages.ads
djamal2727/Main-Bearing-Analytical-Model
0
29281
<gh_stars>0 ------------------------------------------------------------------------------ -- C O D E P E E R / S P A R K -- -- -- -- Copyright (C) 2015-2020, AdaCore -- -- -- -- This is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. This software is distributed in the hope that it will be useful, -- -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- -- License for more details. You should have received a copy of the GNU -- -- General Public License distributed with this software; see file -- -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- -- of the license. -- -- -- ------------------------------------------------------------------------------ pragma Ada_2012; with Ada.Containers; use Ada.Containers; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; package SA_Messages is -- This package can be used for reading/writing a file containing a -- sequence of static anaysis results. Each element can describe a runtime -- check whose outcome has been statically determined, or it might be a -- warning or diagnostic message. It is expected that typically CodePeer -- will do the writing and SPARK will do the reading; this will allow SPARK -- to get the benefit of CodePeer's analysis. -- -- Each item is represented as a pair consisting of a message and an -- associated source location. Source locations may refer to a location -- within the expansion of an instance of a generic; this is represented -- by combining the corresponding location within the generic with the -- location of the instance (repeated if the instance itself occurs within -- a generic). In addition, the type Iteration_Id is intended for use in -- distinguishing messages which refer to a specific iteration of a loop -- (this case can arise, for example, if CodePeer chooses to unroll a -- for-loop). This data structure is only general enough to support the -- kinds of unrolling that are currently planned for CodePeer. For -- example, an Iteration_Id can only identify an iteration of the nearest -- enclosing loop of the associated File/Line/Column source location. -- This is not a problem because CodePeer doesn't unroll loops which -- contain other loops. type Message_Kind is ( -- Check kinds Array_Index_Check, Divide_By_Zero_Check, Tag_Check, Discriminant_Check, Range_Check, Overflow_Check, Assertion_Check, -- Warning kinds Suspicious_Range_Precondition_Warning, Suspicious_First_Precondition_Warning, Suspicious_Input_Warning, Suspicious_Constant_Operation_Warning, Unread_In_Out_Parameter_Warning, Unassigned_In_Out_Parameter_Warning, Non_Analyzed_Call_Warning, Procedure_Does_Not_Return_Warning, Check_Fails_On_Every_Call_Warning, Unknown_Call_Warning, Dead_Store_Warning, Dead_Outparam_Store_Warning, Potentially_Dead_Store_Warning, Same_Value_Dead_Store_Warning, Dead_Block_Warning, Infinite_Loop_Warning, Dead_Edge_Warning, Plain_Dead_Edge_Warning, True_Dead_Edge_Warning, False_Dead_Edge_Warning, True_Condition_Dead_Edge_Warning, False_Condition_Dead_Edge_Warning, Unrepeatable_While_Loop_Warning, Dead_Block_Continuation_Warning, Local_Lock_Of_Global_Object_Warning, Analyzed_Module_Warning, Non_Analyzed_Module_Warning, Non_Analyzed_Procedure_Warning, Incompletely_Analyzed_Procedure_Warning); -- Assertion_Check includes checks for user-defined PPCs (both specific -- and class-wide), Assert pragma checks, subtype predicate checks, -- type invariant checks (specific and class-wide), and checks for -- implementation-defined assertions such as Assert_And_Cut, Assume, -- Contract_Cases, Default_Initial_Condition, Initial_Condition, -- Loop_Invariant, Loop_Variant, and Refined_Post. -- -- TBD: it might be nice to distinguish these different kinds of assertions -- as is done in SPARK's VC_Kind enumeration type, but any distinction -- which isn't already present in CP's BE_Message_Subkind enumeration type -- would require more work on the CP side. -- -- The warning kinds are pretty much a copy of the set of -- Be_Message_Subkind values for which CP's Is_Warning predicate returns -- True; see descriptive comment for each in CP's message_kinds.ads . subtype Check_Kind is Message_Kind range Array_Index_Check .. Assertion_Check; subtype Warning_Kind is Message_Kind range Message_Kind'Succ (Check_Kind'Last) .. Message_Kind'Last; -- Possible outcomes of the static analysis of a runtime check -- -- Not_Statically_Known_With_Low_Severity could be used instead of of -- Not_Statically_Known if there is some reason to believe that (although -- the tool couldn't prove it) the check is likely to always pass (in CP -- terms, if the corresponding CP message has severity Low as opposed to -- Medium). It's not clear yet whether SPARK will care about this -- distinction. type SA_Check_Result is (Statically_Known_Success, Not_Statically_Known_With_Low_Severity, Not_Statically_Known, Statically_Known_Failure); type SA_Message (Kind : Message_Kind := Message_Kind'Last) is record case Kind is when Check_Kind => Check_Result : SA_Check_Result; when Warning_Kind => null; end case; end record; type Source_Location_Or_Null (<>) is private; Null_Location : constant Source_Location_Or_Null; subtype Source_Location is Source_Location_Or_Null with Dynamic_Predicate => Source_Location /= Null_Location; type Line_Number is new Positive; type Column_Number is new Positive; function File_Name (Location : Source_Location) return String; function File_Name (Location : Source_Location) return Unbounded_String; function Line (Location : Source_Location) return Line_Number; function Column (Location : Source_Location) return Column_Number; type Iteration_Kind is (None, Initial, Subsequent, Numbered); -- None is for the usual no-unrolling case. -- Initial and Subsequent are for use in the case where only the first -- iteration of a loop (or some part thereof, such as the termination -- test of a while-loop) is unrolled. -- Numbered is for use in the case where a for-loop with a statically -- known number of iterations is fully unrolled. subtype Iteration_Number is Integer range 1 .. 255; subtype Iteration_Total is Integer range 2 .. 255; type Iteration_Id (Kind : Iteration_Kind := None) is record case Kind is when Numbered => Number : Iteration_Number; Of_Total : Iteration_Total; when others => null; end case; end record; function Iteration (Location : Source_Location) return Iteration_Id; function Enclosing_Instance (Location : Source_Location) return Source_Location_Or_Null; -- For a source location occurring within the expansion of an instance of a -- generic unit, the Line, Column, and File_Name selectors will indicate a -- location within the generic; the Enclosing_Instance selector yields the -- location of the declaration of the instance. function Make (File_Name : String; Line : Line_Number; Column : Column_Number; Iteration : Iteration_Id; Enclosing_Instance : Source_Location_Or_Null) return Source_Location; -- Constructor type Message_And_Location (<>) is private; function Location (Item : Message_And_Location) return Source_Location; function Message (Item : Message_And_Location) return SA_Message; function Make_Msg_Loc (Msg : SA_Message; Loc : Source_Location) return Message_And_Location; -- Selectors function "<" (Left, Right : Message_And_Location) return Boolean; function Hash (Key : Message_And_Location) return Hash_Type; -- Actuals for container instances File_Extension : constant String; -- ".json" (but could change in future) -- Clients may wish to use File_Extension in constructing -- File_Name parameters for calls to Open. package Writing is function Is_Open return Boolean; procedure Open (File_Name : String) with Precondition => not Is_Open, Postcondition => Is_Open; -- Behaves like Text_IO.Create with respect to error cases procedure Write (Message : SA_Message; Location : Source_Location); procedure Close with Precondition => Is_Open, Postcondition => not Is_Open; -- Behaves like Text_IO.Close with respect to error cases end Writing; package Reading is function Is_Open return Boolean; procedure Open (File_Name : String; Full_Path : Boolean := True) with Precondition => not Is_Open, Postcondition => Is_Open; -- Behaves like Text_IO.Open with respect to error cases function Done return Boolean with Precondition => Is_Open; function Get return Message_And_Location with Precondition => not Done; procedure Close with Precondition => Is_Open, Postcondition => not Is_Open; -- Behaves like Text_IO.Close with respect to error cases end Reading; private type Simple_Source_Location is record File_Name : Unbounded_String := Null_Unbounded_String; Line : Line_Number := Line_Number'Last; Column : Column_Number := Column_Number'Last; Iteration : Iteration_Id := (Kind => None); end record; type Source_Locations is array (Natural range <>) of Simple_Source_Location; type Source_Location_Or_Null (Count : Natural) is record Locations : Source_Locations (1 .. Count); end record; Null_Location : constant Source_Location_Or_Null := (Count => 0, Locations => (others => <>)); type Message_And_Location (Count : Positive) is record Message : SA_Message; Location : Source_Location (Count => Count); end record; File_Extension : constant String := ".json"; end SA_Messages;
compiler/antlr/calculator/src/grammar/Calculator.g4
marked42/learning-notes
3
7491
grammar Calculator; prog: stat+; stat: expr | assignment ; assignment: ID '=' expr; expr : Number #numberExpr | ID #variableExpr | '(' expr ')' #parenExpr | '-' expr #minusExpr | expr ('^' expr)+ #powerExpr | expr ('*' | '/') expr #mulDivExpr | expr ('+' | '-') expr #addSubExpr ; ID: [a-zA-Z] [a-zA-Z0-9]*; WS: [\t \r\n]+ -> skip; Number: '0' | [1-9][0-9]*;
tests/nonsmoke/functional/CompileTests/experimental_ada_tests/tests/procedure_instantiation.adb
ouankou/rose
488
20322
<reponame>ouankou/rose procedure procedure_instantiation is begin begin declare generic procedure proc(pfp:in integer); procedure proc(pfp:in integer) is begin null; end proc; begin declare procedure p is new proc; begin null; end; end; end; end procedure_instantiation;
custom_roms/extensions/version.asm
daitangio/vic20book
0
14987
<filename>custom_roms/extensions/version.asm<gh_stars>0 BASMSG .byte $93,"**** CBM BASIC V2 ****",$0D,$00
Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xca_notsx.log_21829_27.asm
ljhsiun2/medusa
9
98623
<reponame>ljhsiun2/medusa<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r13 push %r8 push %rbp push %rdx lea addresses_D_ht+0x1bac3, %r13 cmp $28772, %r8 movw $0x6162, (%r13) nop nop nop and %rbp, %rbp pop %rdx pop %rbp pop %r8 pop %r13 ret .global s_faulty_load s_faulty_load: push %r10 push %r15 push %r8 push %rbp push %rbx push %rcx // Faulty Load lea addresses_RW+0x182c3, %rbp nop nop add $19733, %rbx mov (%rbp), %r8d lea oracles, %r10 and $0xff, %r8 shlq $12, %r8 mov (%r10,%r8,1), %r8 pop %rcx pop %rbx pop %rbp pop %r8 pop %r15 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_RW', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_RW', 'NT': False, 'AVXalign': True, 'size': 4, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 11}} {'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 */
pwnlib/shellcraft/templates/thumb/push.asm
DrKeineLust/pwntools
2
84543
<% from pwnlib.util import packing from pwnlib.shellcraft import thumb, registers from pwnlib import constants from pwnlib.context import context as ctx # Ugly hack, mako will not let it be called context import six import re %> <%page args="value"/> <%docstring> Pushes a value onto the stack without using null bytes or newline characters. If src is a string, then we try to evaluate with `context.arch = 'thumb'` using :func:`pwnlib.constants.eval` before determining how to push it. Note that this means that this shellcode can change behavior depending on the value of `context.os`. Args: value (int,str): The value or register to push Example: >>> print(pwnlib.shellcraft.thumb.push('r0').rstrip()) push {r0} >>> print(pwnlib.shellcraft.thumb.push(0).rstrip()) /* push 0 */ eor r7, r7 push {r7} >>> print(pwnlib.shellcraft.thumb.push(1).rstrip()) /* push 1 */ mov r7, #1 push {r7} >>> print(pwnlib.shellcraft.thumb.push(256).rstrip()) /* push 256 */ mov r7, #0x100 push {r7} >>> print(pwnlib.shellcraft.thumb.push('SYS_execve').rstrip()) /* push 'SYS_execve' */ mov r7, #0xb push {r7} >>> with context.local(os = 'freebsd'): ... print(pwnlib.shellcraft.thumb.push('SYS_execve').rstrip()) /* push 'SYS_execve' */ mov r7, #0x3b push {r7} </%docstring> <% value_orig = value is_register = value in registers.arm if not is_register and isinstance(value, (six.binary_type, six.text_type)): try: with ctx.local(arch = 'thumb'): value = constants.eval(value) except (ValueError, AttributeError, NameError): pass %> % if is_register: push {${value}} % elif isinstance(value, six.integer_types): /* push ${repr(value_orig)} */ ${re.sub(r'^\s*/.*\n', '', thumb.pushstr(packing.pack(value), False), 1)} % else: push ${value} % endif
examples/7.dpd-with-dynamic-options.applescript
doekman/ASPashua
1
511
use script "ASPashua" use framework "Foundation" use scripting additions -- This script demonstrates form validation and re-displays the entered -- data, so the user doesn't have to re-enter the data. -- The form definition. -- See the documentation for more options: http://www.bluem.net/pashua-docs-latest.html set config_text to "# Pashua dialog config message.type = text message.default = Select a country from the list (or enter one below to add it to the list. country.type = popup country.label = Country country_to_add.type = textfield country_to_add.label = Country to add cb.type = cancelbutton db.type = defaultbutton" set landenlijst to {"UK", "US", "USSR"} set selected_country to item 1 of landenlijst try repeat set val_rec to {|country.option|:landenlijst, country:selected_country} set entered_data to display pashua dialog config_text dynamic values val_rec set country_to_add to country_to_add of entered_data if length of country_to_add > 0 then set landenlijst to landenlijst & country_to_add set selected_country to country_to_add else set destination to country of entered_data display alert "Hi there!" message "You are going to «" & destination & "»." exit repeat end if end repeat on error number -128 display notification "You did not complete the form, and thus will not share in the advantages of our generous offers." with title "Hi there!" end try
source/slim-messages-meta.ads
reznikmm/slimp
0
15253
<filename>source/slim-messages-meta.ads -- Copyright (c) 2019 <NAME> <<EMAIL>> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with League.Strings; package Slim.Messages.META is type META_Message is new Message with private; not overriding function Value (Self : META_Message) return League.Strings.Universal_String; private subtype Byte is Ada.Streams.Stream_Element; type META_Message is new Message with record Value : League.Strings.Universal_String; end record; overriding function Read (Data : not null access League.Stream_Element_Vectors.Stream_Element_Vector) return META_Message; overriding procedure Write (Self : META_Message; Tag : out Message_Tag; Data : out League.Stream_Element_Vectors.Stream_Element_Vector); overriding procedure Visit (Self : not null access META_Message; Visiter : in out Slim.Message_Visiters.Visiter'Class); end Slim.Messages.META;
source/libgela/gela-embeded_links-double_lists.ads
faelys/gela-asis
4
4679
------------------------------------------------------------------------------ -- G E L A A S I S -- -- ASIS implementation for Gela project, a portable Ada compiler -- -- http://gela.ada-ru.org -- -- - - - - - - - - - - - - - - - -- -- Read copyright and license at the end of this file -- ------------------------------------------------------------------------------ -- $Revision: 209 $ $Date: 2013-11-30 21:03:24 +0200 (Сб., 30 нояб. 2013) $ -- Purpose: -- This is effective implementation of double linked list container. -- Item of the list contains embeded link to next and prev elements, so -- + no memory allocation required -- + limited undefinite types allowed as items of list -- - it can't be in more then one list at once. -- - easy to break list if pass element to wrong list with Gela.Embeded_Links.Lists; generic type Element_Type (<>) is limited private; type Element_Access is access all Element_Type; -- get embeded link of element with function Get_Next (Item : Element_Access) return Element_Access is <>; with function Get_Prev (Item : Element_Access) return Element_Access is <>; -- set embeded link of element with procedure Set_Next (Item, Next : Element_Access) is <>; with procedure Set_Prev (Item, Prev : Element_Access) is <>; package Gela.Embeded_Links.Double_Lists is package Simple_Lists is new Gela.Embeded_Links.Lists (Element_Type, Element_Access); type List is new Simple_Lists.List; -- Empty_List : List renames List (Simple_Lists.Empty_List); ??? procedure Clear (Container : in out List); procedure Insert_After (Container : in out List; After : in Element_Access; New_Item : in Element_Access); procedure Insert (Container : in out List; Before : in Element_Access; New_Item : in Element_Access); procedure Append (Container : in out List; New_Item : in Element_Access); procedure Prepend (Container : in out List; New_Item : in Element_Access); procedure Delete (Container : in out List; Item : in Element_Access); procedure Delete_Next (Container : in out List; After : in Element_Access; Removed : out Element_Access); procedure Delete_First (Container : in out List; Removed : out Element_Access); procedure Delete_Last (Container : in out List; Removed : out Element_Access); procedure Splice_After (Target : in out List; Source : in out List; After : in Element_Access := null); generic package Generic_Search renames Simple_Lists.Generic_Search; generic procedure For_Each renames Simple_Lists.For_Each; generic procedure For_Each_With_Param renames Simple_Lists.For_Each_With_Param; generic function To_Array renames Simple_Lists.To_Array; generic function Agreed_To_Array renames Simple_Lists.Agreed_To_Array; generic function Agreed_To_Array_With_Param renames Simple_Lists.Agreed_To_Array_With_Param; private -- Empty_List : constant List := (Tail => null); pragma Inline (Insert); pragma Inline (Insert_After); pragma Inline (Append); pragma Inline (Prepend); pragma Inline (Delete); pragma Inline (Delete_Next); pragma Inline (Delete_First); pragma Inline (Delete_Last); pragma Inline (Splice_After); end Gela.Embeded_Links.Double_Lists; ------------------------------------------------------------------------------ -- Copyright (c) 2006, <NAME> -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- * Redistributions of source code must retain the above copyright notice, -- this list of conditions and the following disclaimer. -- * Redistributions in binary form must reproduce the above copyright -- notice, this list of conditions and the following disclaimer in the -- documentation and/or other materials provided with the distribution. -- * Neither the name of the <NAME>, IE nor the names of its -- contributors may be used to endorse or promote products derived from -- this software without specific prior written permission. -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -- POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------------
presentation/examples/asm-so/ex2/main.asm
sayon/dynamic-libraries-course
4
165794
<reponame>sayon/dynamic-libraries-course extern _GLOBAL_OFFSET_TABLE_ global _start extern sofun global msg:data (msg.end - msg) section .rodata msg: db "SO function called -- message is stored in 'main'", 10 .end: section .text _start: call sofun wrt ..plt mov rdi, 0 mov rax, 60 syscall
s3/music/Title.asm
Cancer52/flamedriver
9
10701
Snd_Title_Header: smpsHeaderStartSong 3 smpsHeaderVoice Snd_Title_Voices smpsHeaderChan $06, $03 smpsHeaderTempo $01, $02 smpsHeaderDAC Snd_Title_DAC smpsHeaderFM Snd_Title_FM1, $18, $10 smpsHeaderFM Snd_Title_FM2, $18, $1B smpsHeaderFM Snd_Title_FM3, $00, $05 smpsHeaderFM Snd_Title_FM4, $18, $18 smpsHeaderFM Snd_Title_FM5, $18, $13 smpsHeaderPSG Snd_Title_PSG1, $00, $01, $00, $00 smpsHeaderPSG Snd_Title_PSG2, $00, $01, $00, $00 smpsHeaderPSG Snd_Title_PSG3, $00, $04, $00, $00 ; FM1 Data Snd_Title_FM1: smpsSetvoice $00 smpsModSet $14, $01, $06, $06 dc.b nRst, $60, nB3, $06, nRst, nB3, $0C, nC4, $06, nRst, nC4, $0C dc.b nD4, $0C, nRst, nD4, $06, nRst, nBb3, $04, smpsNoAttack, nB3, $0E, nRst dc.b $06, nB3, $0C, nC4, $06, nRst, nD4, $12, nRst, $06, nD4, nRst dc.b nD4, $12, nRst, $06 smpsFMAlterVol $01 dc.b nC4, $0C, nRst, nC4, nRst, nC4, nB3, nC4, $06, nRst smpsFMAlterVol $01 dc.b nAb3, $04, smpsNoAttack, nA3, $5C, nRst, $0C smpsFMAlterVol $FE dc.b nB3, $06, nRst, nB3, $0C, nC4, $06, nRst, nC4, $0C, nD4, $0C dc.b nRst, nD4, $06, nRst, nBb3, $04, smpsNoAttack, nB3, $0E, nRst, $06, nB3 dc.b $0C, nC4, $06, nRst, nD4, $12, nRst, $06, nD4, nRst, nD4, $12 dc.b nRst, $06 smpsFMAlterVol $FE dc.b nF4, $0C, nRst, nF4, nRst, nF4, nE4, nF4, $06, nRst smpsFMAlterVol $FE dc.b nFs4, $04, smpsNoAttack, nG4, $5C, nRst, $0C smpsStop ; FM2 Data Snd_Title_FM2: smpsSetvoice $00 smpsModSet $15, $01, $06, $06 dc.b nRst, $60, nRst, $03 smpsAlterNote $03 dc.b nG3, $06, nRst, nG3, $0C, nA3, $06, nRst, nA3, $0C, nB3, $0C dc.b nRst, nB3, $06, nRst, nFs3, $04, smpsNoAttack, nG3, $0E, nRst, $06, nG3 dc.b $0C, nA3, $06, nRst, nB3, $12, nRst, $06, nB3, nRst, nB3, $12 dc.b nRst, $06 smpsFMAlterVol $01 dc.b nA3, $0C, nRst, nA3, nRst, nA3, nG3, nA3, $06, nRst smpsFMAlterVol $01 dc.b nF3, $04, smpsNoAttack, nFs3, $5C, nRst, $0C smpsFMAlterVol $FE dc.b nG3, $06, nRst, nG3, $0C, nA3, $06, nRst, nA3, $0C, nB3, $0C dc.b nRst, nB3, $06, nRst, nFs3, $04, smpsNoAttack, nG3, $0E, nRst, $06, nG3 dc.b $0C, nA3, $06, nRst, nB3, $12, nRst, $06, nB3, nRst, nB3, $12 dc.b nRst, $06 smpsFMAlterVol $FE dc.b nC4, $0C, nRst, nC4, nRst, nC4, nB3, nC4, $06, nRst smpsFMAlterVol $FE dc.b nBb3, $04, smpsNoAttack, nB3, $5C, nRst, $0C smpsSetvoice $03 smpsFMAlterVol $03 dc.b nRst, $02 smpsPan panRight, $00 Snd_Title_Loop07: smpsCall Snd_Title_Call03 smpsLoop $00, $04, Snd_Title_Loop07 smpsStop ; FM3 Data Snd_Title_FM3: smpsSetvoice $01 dc.b nRst, $06, nD2, $05, nRst, $01, nD2, $05, nRst, $01, nRst, $06 dc.b nD2, $05, nRst, $0D, nD2, $05, nRst, $01, nD2, $05, nRst, $07 dc.b nD2, $05, nRst, $07, nD2, $05, nRst, $01, nD2, $05, nRst, $01 dc.b nD2, $05, nRst, $01, nD2, $05, nRst, $01 smpsCall Snd_Title_Call04 smpsCall Snd_Title_Call05 dc.b nE2, $05, nRst, $01, nRst, $06 smpsCall Snd_Title_Call06 dc.b nF2, $05, nRst, $01, nRst, $06 smpsCall Snd_Title_Call05 dc.b nD2, $05, nRst, $01, nRst, $06 smpsCall Snd_Title_Call04 smpsCall Snd_Title_Call05 dc.b nE2, $05, nRst, $01, nRst, $06 smpsCall Snd_Title_Call06 dc.b nA2, $05, nRst, $01, nRst, $06, nG2, $05, nRst, $01, nG2, $05 dc.b nRst, $01, nG2, $05, nRst, $01, nRst, $06, nG2, $05, nRst, $01 dc.b nRst, $06, nG2, $05, nRst, $01, nG2, $05, nRst, $01, nRst, $06 dc.b nG2, $05, nRst, $01, nG2, $05, nRst, $01, nRst, $06, nG2, $18 smpsStop Snd_Title_Call04: dc.b nG2, $05, nRst, $01, nG2, $05, nRst, $01, nG2, $05, nRst, $01 dc.b nRst, $06, nG2, $05, nRst, $01, nRst, $06, nG2, $05, nRst, $01 dc.b nG2, $05, nRst, $01, nRst, $06, nG2, $05, nRst, $01, nG2, $05 dc.b nRst, $01, nRst, $06, nG2, $05, nRst, $01, nRst, $06, nG2, $05 dc.b nRst, $01, nRst, $06 smpsReturn Snd_Title_Call05: dc.b nD2, $05, nRst, $01, nD2, $05, nRst, $01, nD2, $05, nRst, $01 dc.b nRst, $06, nD2, $05, nRst, $01, nRst, $06, nD2, $05, nRst, $01 dc.b nD2, $05, nRst, $01, nRst, $06, nD2, $05, nRst, $01, nD2, $05 dc.b nRst, $01, nRst, $06, nD2, $05, nRst, $01, nRst, $06 smpsReturn Snd_Title_Call06: dc.b nF2, $05, nRst, $01, nF2, $05, nRst, $01, nF2, $05, nRst, $01 dc.b nRst, $06, nF2, $05, nRst, $01, nRst, $06, nF2, $05, nRst, $01 dc.b nF2, $05, nRst, $01, nRst, $06, nF2, $05, nRst, $01, nF2, $05 dc.b nRst, $01, nRst, $06, nF2, $05, nRst, $01, nRst, $06 smpsReturn ; FM4 Data Snd_Title_FM4: smpsSetvoice $03 dc.b nRst, $60 Snd_Title_Loop00: smpsCall Snd_Title_Call00 smpsLoop $00, $08, Snd_Title_Loop00 Snd_Title_Loop01: smpsCall Snd_Title_Call01 smpsLoop $00, $04, Snd_Title_Loop01 Snd_Title_Loop02: smpsCall Snd_Title_Call02 smpsLoop $00, $04, Snd_Title_Loop02 Snd_Title_Loop03: smpsCall Snd_Title_Call00 smpsLoop $00, $08, Snd_Title_Loop03 Snd_Title_Loop04: smpsCall Snd_Title_Call01 smpsLoop $00, $04, Snd_Title_Loop04 Snd_Title_Loop05: smpsCall Snd_Title_Call00 smpsLoop $00, $04, Snd_Title_Loop05 smpsPan panLeft, $00 Snd_Title_Loop06: smpsCall Snd_Title_Call03 smpsLoop $00, $04, Snd_Title_Loop06 smpsStop Snd_Title_Call00: dc.b nG4, $06, nF4, nD4, nF4 smpsReturn Snd_Title_Call01: dc.b nA4, $06, nG4, nE4, nG4 smpsReturn Snd_Title_Call02: dc.b nD4, $06, nC4, nA3, nC4 smpsReturn Snd_Title_Call03: dc.b nG4, $06 smpsFMAlterVol $04 dc.b nF4 smpsFMAlterVol $04 dc.b nD4 smpsFMAlterVol $04 dc.b nF4 smpsFMAlterVol $04 smpsReturn ; FM5 Data Snd_Title_FM5: dc.b nRst, $08 smpsFMAlterVol $05 smpsJump Snd_Title_FM1 ; PSG1 Data Snd_Title_PSG1: smpsPSGvoice sTone_0A dc.b nRst, $60, nG3, $60, nA3, nE3, nD3, nG3, nA3, nC4, nD4 smpsStop ; PSG2 Data Snd_Title_PSG2: smpsPSGvoice sTone_0A dc.b nRst, $60, nD3, $60, nF3, nC3, nFs3, nD3, nF3, nA3, nB3 smpsStop ; PSG3 Data Snd_Title_PSG3: smpsPSGform $E7 smpsPSGvoice sTone_02 Snd_Title_Loop08: dc.b nMaxPSG2, $06, nMaxPSG2 smpsPSGAlterVol $FC dc.b nMaxPSG2, $06, nMaxPSG2 smpsPSGAlterVol $04 dc.b nMaxPSG2, $06, nMaxPSG2 smpsPSGAlterVol $FC dc.b nMaxPSG2, $06, nMaxPSG2 smpsPSGAlterVol $04 dc.b nMaxPSG2, $06, nMaxPSG2 smpsPSGAlterVol $FC dc.b nMaxPSG2, $06, nMaxPSG2 smpsPSGAlterVol $04 dc.b nMaxPSG2, $06, nMaxPSG2 smpsPSGAlterVol $FC dc.b nMaxPSG2, $06, nMaxPSG2 smpsPSGAlterVol $04 smpsLoop $00, $08, Snd_Title_Loop08 dc.b nMaxPSG2, $06, nMaxPSG2 smpsPSGAlterVol $FC dc.b nMaxPSG2, $06, nMaxPSG2 smpsPSGAlterVol $04 dc.b nMaxPSG2, $06, nMaxPSG2 smpsPSGAlterVol $FC dc.b nMaxPSG2, $06, nMaxPSG2 smpsPSGAlterVol $04 dc.b nMaxPSG2, $06, nMaxPSG2 smpsPSGAlterVol $FC dc.b nMaxPSG2, $06, nMaxPSG2, nMaxPSG2, nMaxPSG2, nMaxPSG2, nMaxPSG2 smpsStop ; DAC Data Snd_Title_DAC: dc.b dKickS3, $06, dSnareS3, dSnareS3, nRst, dSnareS3, nRst, $0C, dSnareS3, $06, dSnareS3, nRst dc.b dSnareS3, nRst, dSnareS3, dSnareS3, dSnareS3, dSnareS3, dKickS3, $18, dSnareS3, dKickS3, dSnareS3, dKickS3 dc.b dSnareS3, dKickS3, dSnareS3, $06, nRst, $0C, dSnareS3, $06, dKickS3, $18, dSnareS3, dKickS3 dc.b dSnareS3, dKickS3, dSnareS3, $06, nRst, $12, dKickS3, $06, nRst, dSnareS3, nRst, dSnareS3 dc.b $06, dSnareS3, nRst, dSnareS3, dKickS3, $18, dSnareS3, dKickS3, dSnareS3, dKickS3, dSnareS3, dKickS3 dc.b dSnareS3, $06, nRst, $0C, dSnareS3, $06, dKickS3, $18, dSnareS3, dKickS3, dSnareS3, dSnareS3 dc.b $06, dSnareS3, dSnareS3, nRst, dSnareS3, nRst, dSnareS3, dSnareS3, nRst, dSnareS3, dSnareS3, dSnareS3 dc.b dSnareS3, dSnareS3, dSnareS3, dSnareS3 smpsStop Snd_Title_Voices: ; Voice $00 ; $3D ; $01, $00, $04, $03, $1F, $1F, $1F, $1F, $10, $06, $06, $06 ; $01, $06, $06, $06, $35, $1A, $18, $1A, $12, $82, $82, $80 smpsVcAlgorithm $05 smpsVcFeedback $07 smpsVcUnusedBits $00 smpsVcDetune $00, $00, $00, $00 smpsVcCoarseFreq $03, $04, $00, $01 smpsVcRateScale $00, $00, $00, $00 smpsVcAttackRate $1F, $1F, $1F, $1F smpsVcAmpMod $00, $00, $00, $00 smpsVcDecayRate1 $06, $06, $06, $10 smpsVcDecayRate2 $06, $06, $06, $01 smpsVcDecayLevel $01, $01, $01, $03 smpsVcReleaseRate $0A, $08, $0A, $05 smpsVcTotalLevel $00, $02, $02, $12 ; Voice $01 ; $3A ; $01, $02, $01, $01, $1F, $5F, $5F, $5F, $10, $11, $09, $09 ; $07, $00, $00, $00, $CF, $FF, $FF, $FF, $1C, $22, $18, $80 smpsVcAlgorithm $02 smpsVcFeedback $07 smpsVcUnusedBits $00 smpsVcDetune $00, $00, $00, $00 smpsVcCoarseFreq $01, $01, $02, $01 smpsVcRateScale $01, $01, $01, $00 smpsVcAttackRate $1F, $1F, $1F, $1F smpsVcAmpMod $00, $00, $00, $00 smpsVcDecayRate1 $09, $09, $11, $10 smpsVcDecayRate2 $00, $00, $00, $07 smpsVcDecayLevel $0F, $0F, $0F, $0C smpsVcReleaseRate $0F, $0F, $0F, $0F smpsVcTotalLevel $00, $18, $22, $1C ; Voice $02 ; $3C ; $71, $31, $12, $11, $17, $1F, $19, $2F, $04, $01, $07, $01 ; $00, $00, $00, $00, $F7, $F8, $F7, $F8, $1D, $84, $19, $84 smpsVcAlgorithm $04 smpsVcFeedback $07 smpsVcUnusedBits $00 smpsVcDetune $01, $01, $03, $07 smpsVcCoarseFreq $01, $02, $01, $01 smpsVcRateScale $00, $00, $00, $00 smpsVcAttackRate $2F, $19, $1F, $17 smpsVcAmpMod $00, $00, $00, $00 smpsVcDecayRate1 $01, $07, $01, $04 smpsVcDecayRate2 $00, $00, $00, $00 smpsVcDecayLevel $0F, $0F, $0F, $0F smpsVcReleaseRate $08, $07, $08, $07 smpsVcTotalLevel $04, $19, $04, $1D ; Voice $03 ; $3D ; $01, $01, $01, $01, $94, $19, $19, $19, $0F, $0D, $0D, $0D ; $07, $04, $04, $04, $25, $1A, $1A, $1A, $15, $80, $80, $80 smpsVcAlgorithm $05 smpsVcFeedback $07 smpsVcUnusedBits $00 smpsVcDetune $00, $00, $00, $00 smpsVcCoarseFreq $01, $01, $01, $01 smpsVcRateScale $00, $00, $00, $02 smpsVcAttackRate $19, $19, $19, $14 smpsVcAmpMod $00, $00, $00, $00 smpsVcDecayRate1 $0D, $0D, $0D, $0F smpsVcDecayRate2 $04, $04, $04, $07 smpsVcDecayLevel $01, $01, $01, $02 smpsVcReleaseRate $0A, $0A, $0A, $05 smpsVcTotalLevel $00, $00, $00, $15
gnat-sockets-connection_state_machine-terminated_strings.adb
jrcarter/Ada_GUI
19
27512
<filename>gnat-sockets-connection_state_machine-terminated_strings.adb -- -- -- package Copyright (c) <NAME> -- -- GNAT.Sockets.Connection_State_Machine. Luebeck -- -- Terminated_Strings Winter, 2012 -- -- Implementation -- -- Last revision : 16:04 08 Jun 2019 -- -- -- -- This library is free software; you can redistribute it and/or -- -- modify it under the terms of the GNU General Public License as -- -- published by the Free Software Foundation; either version 2 of -- -- the License, or (at your option) any later version. This library -- -- is distributed in the hope that it will be useful, but WITHOUT -- -- ANY WARRANTY; without even the implied warranty of -- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- -- General Public License for more details. You should have -- -- received a copy of the GNU General Public License along with -- -- this library; if not, write to the Free Software Foundation, -- -- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- -- -- -- As a special exception, if other files instantiate generics from -- -- this unit, or you link this unit with other files to produce an -- -- executable, this unit does not by itself cause the resulting -- -- executable to be covered by the GNU General Public License. This -- -- exception does not however invalidate any other reasons why the -- -- executable file might be covered by the GNU Public License. -- --____________________________________________________________________-- with Ada.Exceptions; use Ada.Exceptions; with Ada.IO_Exceptions; use Ada.IO_Exceptions; with Strings_Edit.Integers; use Strings_Edit.Integers; with Ada.Unchecked_Deallocation; package body GNAT.Sockets.Connection_State_Machine.Terminated_Strings is procedure Free is new Ada.Unchecked_Deallocation (String, String_Ptr); procedure Feed ( Item : in out String_Data_Item; Data : Stream_Element_Array; Pointer : in out Stream_Element_Offset; Client : in out State_Machine'Class; State : in out Stream_Element_Offset ) is This : Character; begin if State = 0 then Item.Last := 0; State := 1; end if; while Pointer <= Data'Last loop This := Character'Val (Data (Pointer)); if This = Item.Terminator then Pointer := Pointer + 1; State := 0; return; elsif Item.Last = Item.Value'Last then Raise_Exception ( Data_Error'Identity, ( "Terminated string length exceeds " & Image (Item.Size) & " characters" ) ); else Item.Last := Item.Last + 1; Item.Value (Item.Last) := This; Pointer := Pointer + 1; end if; end loop; end Feed; procedure Feed ( Item : in out Dynamic_String_Data_Item; Data : Stream_Element_Array; Pointer : in out Stream_Element_Offset; Client : in out State_Machine'Class; State : in out Stream_Element_Offset ) is This : Character; begin if Item.Value = null then Raise_Exception ( Data_Error'Identity, "Terminated string length exceeds 0 characters" ); end if; if State = 0 then Item.Last := 0; State := 1; end if; while Pointer <= Data'Last loop This := Character'Val (Data (Pointer)); if This = Item.Terminator then Pointer := Pointer + 1; State := 0; return; elsif Item.Last = Item.Value'Last then Raise_Exception ( Data_Error'Identity, ( "Terminated string length exceeds " & Image (Integer'(Item.Value'Length)) & " characters" ) ); else Item.Last := Item.Last + 1; Item.Value (Item.Last) := This; Pointer := Pointer + 1; end if; end loop; end Feed; procedure Finalize (Item : in out Dynamic_String_Data_Item) is begin Finalize (Data_Item (Item)); Free (Item.Value); end Finalize; function Get ( Data : Stream_Element_Array; Pointer : access Stream_Element_Offset; Terminator : Character ) return String is Next : Stream_Element_Offset := Pointer.all; begin if ( Next < Data'First or else ( Next > Data'Last and then Next > Data'Last + 1 ) ) then Raise_Exception (Layout_Error'Identity, Out_Of_Bounds); end if; while Next <= Data'Last loop if Character'Val (Data (Next)) = Terminator then declare Result : String (1..Natural (Next - Pointer.all)); begin Next := Pointer.all; for Index in Result'Range loop Result (Index) := Character'Val (Data (Next)); Next := Next + 1; end loop; Pointer.all := Next + 1; return Result; end; else Next := Next + 1; end if; end loop; Raise_Exception ( End_Error'Identity, "Missing string terminator" ); end Get; function Get_Maximum_Size ( Item : Dynamic_String_Data_Item ) return Natural is begin if Item.Value = null then return 0; else return Item.Value'Length; end if; end Get_Maximum_Size; function Get_Value (Item : String_Data_Item) return String is begin return Item.Value (1..Item.Last); end Get_Value; function Get_Value ( Item : Dynamic_String_Data_Item ) return String is begin if Item.Value = null then return ""; else return Item.Value (1..Item.Last); end if; end Get_Value; procedure Put ( Data : in out Stream_Element_Array; Pointer : in out Stream_Element_Offset; Value : String; Terminator : Character ) is begin if ( Pointer < Data'First or else ( Pointer > Data'Last and then Pointer - 1 > Data'Last ) ) then Raise_Exception (Layout_Error'Identity, Out_Of_Bounds); elsif Data'Last - Pointer < Value'Length then Raise_Exception (End_Error'Identity, No_Room); end if; for Index in Value'Range loop if Value (Index) = Terminator then Raise_Exception ( Data_Error'Identity, "The string body contains the terminator" ); end if; end loop; for Index in Value'Range loop Data (Pointer) := Character'Pos (Value (Index)); Pointer := Pointer + 1; end loop; Data (Pointer) := Character'Pos (Terminator); Pointer := Pointer + 1; end Put; procedure Set_Maximum_Size ( Item : in out Dynamic_String_Data_Item; Size : Positive ) is begin if Item.Value = null then Item.Value := new String (1..Size); Item.Last := 0; elsif Item.Value'Length < Size then Free (Item.Value); Item.Value := new String (1..Size); Item.Last := 0; end if; end Set_Maximum_Size; end GNAT.Sockets.Connection_State_Machine.Terminated_Strings;
kernel/src/arch/riscv32/boot/entry.asm
jiegec/RustOS
0
5590
.section .text.entry .globl _start _start: add t0, a0, 1 slli t0, t0, 16 lui sp, %hi(bootstack) addi sp, sp, %lo(bootstack) add sp, sp, t0 call rust_main .section .bss.stack .align 12 #PGSHIFT .global bootstack bootstack: .space 4096 * 16 * 8 .global bootstacktop bootstacktop:
Data/ships/CobraMk3.asm
TinfoilAsteroid/EliteNext
9
11642
; Corrected pointers ; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ; Scp Missile Edge Lin Gun Exp Vtx Edg Bounty Face Face Vertices ; Deb Lock Lo Hi x4 Vtx Cnt x6 X1 lo hi x4 Dot Erg Spd Lo Hi Q Laser Lo hi CobraMk3 DB $03 DW $2341 DW CobraMk3Edges DB CobraMkEdgesSize DB $54,$2A DB CobraMkVertSize /6 DB CobraMkVertSize DB CobraMkEdgesCnt DB $00,$00 DB CobraMk3NormalsSize DB $32,$96,$1C DW CobraMk3Normals DB $01,$13 DW CobraMk3Vertices DB 0,0 ; Type and Tactics DB ShipCanAnger ; missiles = 3 CobraMk3Vertices DB $20,$00,$4C,$1F,$FF,$FF DB $20,$00,$4C,$9F,$FF,$FF DB $00,$1A,$18,$1F,$FF,$FF DB $78,$03,$08,$FF,$73,$AA DB $78,$03,$08,$7F,$84,$CC DB $58,$10,$28,$BF,$FF,$FF DB $58,$10,$28,$3F,$FF,$FF DB $80,$08,$28,$7F,$98,$CC DB $80,$08,$28,$FF,$97,$AA DB $00,$1A,$28,$3F,$65,$99 DB $20,$18,$28,$FF,$A9,$BB DB $20,$18,$28,$7F,$B9,$CC DB $24,$08,$28,$B4,$99,$99 DB $08,$0C,$28,$B4,$99,$99 DB $08,$0C,$28,$34,$99,$99 DB $24,$08,$28,$34,$99,$99 DB $24,$0C,$28,$74,$99,$99 DB $08,$10,$28,$74,$99,$99 DB $08,$10,$28,$F4,$99,$99 DB $24,$0C,$28,$F4,$99,$99 DB $00,$00,$4C,$06,$B0,$BB DB $00,$00,$5A,$1F,$B0,$BB DB $50,$06,$28,$E8,$99,$99 DB $50,$06,$28,$A8,$99,$99 DB $58,$00,$28,$A6,$99,$99 DB $50,$06,$28,$28,$99,$99 DB $58,$00,$28,$26,$99,$99 DB $50,$06,$28,$68,$99,$99 CobraMkVertSize equ $ - CobraMk3Vertices CobraMk3Edges DB $1F,$B0,$00,$04,$1F,$C4,$00,$10 DB $1F,$A3,$04,$0C,$1F,$A7,$0C,$20 DB $1F,$C8,$10,$1C,$1F,$98,$18,$1C DB $1F,$96,$18,$24,$1F,$95,$14,$24 DB $1F,$97,$14,$20,$1F,$51,$08,$14 DB $1F,$62,$08,$18,$1F,$73,$0C,$14 DB $1F,$84,$10,$18,$1F,$10,$04,$08 DB $1F,$20,$00,$08,$1F,$A9,$20,$28 DB $1F,$B9,$28,$2C,$1F,$C9,$1C,$2C DB $1F,$BA,$04,$28,$1F,$CB,$00,$2C DB $1D,$31,$04,$14,$1D,$42,$00,$18 DB $06,$B0,$50,$54,$14,$99,$30,$34 DB $14,$99,$48,$4C,$14,$99,$38,$3C DB $14,$99,$40,$44,$13,$99,$3C,$40 DB $11,$99,$38,$44,$13,$99,$34,$48 DB $13,$99,$30,$4C,$1E,$65,$08,$24 DB $06,$99,$58,$60,$06,$99,$5C,$60 DB $08,$99,$58,$5C,$06,$99,$64,$68 DB $06,$99,$68,$6C,$08,$99,$64,$6C CobraMkEdgesSize equ $ - CobraMk3Edges CobraMkEdgesCnt equ CobraMkEdgesSize/4 ; start normals #0 = top f,$on,$ p,$at,$ o,$ C,$br,$ Mk III CobraMk3Normals DB $1F,$00,$3E,$1F DB $9F,$12,$37,$10 DB $1F,$12,$37,$10 DB $9F,$10,$34,$0E DB $1F,$10,$34,$0E DB $9F,$0E,$2F,$00 DB $1F,$0E,$2F,$00 DB $9F,$3D,$66,$00 DB $1F,$3D,$66,$00 DB $3F,$00,$00,$50 DB $DF,$07,$2A,$09 DB $5F,$00,$1E,$06 DB $5F,$07,$2A,$09 ;end of Cobra Mk III CobraMk3NormalsSize equ $ - CobraMk3Normals CobraMk3Len equ $ - CobraMk3
oeis/021/A021666.asm
neoneye/loda-programs
11
160898
; A021666: Decimal expansion of 1/662. ; Submitted by Jon Maiga ; 0,0,1,5,1,0,5,7,4,0,1,8,1,2,6,8,8,8,2,1,7,5,2,2,6,5,8,6,1,0,2,7,1,9,0,3,3,2,3,2,6,2,8,3,9,8,7,9,1,5,4,0,7,8,5,4,9,8,4,8,9,4,2,5,9,8,1,8,7,3,1,1,1,7,8,2,4,7,7,3,4,1,3,8,9,7,2,8,0,9,6,6,7,6,7,3,7,1,6 seq $0,199685 ; a(n) = 5*10^n+1. div $0,331 mod $0,10
lib/crt0.asm
cppchriscpp/ld38
4
7537
<reponame>cppchriscpp/ld38 ; Startup code for cc65 and Shiru's NES library ; based on code by Groepaz/Hitmen <<EMAIL>>, <NAME> <<EMAIL>> FT_DPCM_OFF = $c000 ;$c000..$ffc0, 64-byte steps FT_SFX_STREAMS = 4 ;number of sound effects played at once, 1..4 .define FT_DPCM_ENABLE 1 ;undefine to exclude all DMC code .define FT_SFX_ENABLE 1 ;undefine to exclude all sound effects code .include "lib/mmc1_macros.asm" .export _exit,__STARTUP__:absolute=1 .export _FRAME_COUNTER .import initlib,push0,popa,popax,_main,zerobss,copydata ; Linker generated symbols .import __RAM_START__ ,__RAM_SIZE__ .import __ROM0_START__ ,__ROM0_SIZE__ .import __STARTUP_LOAD__,__STARTUP_RUN__,__STARTUP_SIZE__ .import __CODE_LOAD__ ,__CODE_RUN__ ,__CODE_SIZE__ .import __RODATA_LOAD__ ,__RODATA_RUN__ ,__RODATA_SIZE__ .import NES_MAPPER,NES_PRG_BANKS,NES_CHR_BANKS,NES_MIRRORING .include "tools/cc65/asminc/zeropage.inc" FT_BASE_ADR =$0100 ;page in RAM, should be $xx00 .define FT_THREAD 1 ;undefine if you call sound effects in the same thread as sound update .define FT_PAL_SUPPORT 1 ;undefine to exclude PAL support .define FT_NTSC_SUPPORT 1 ;undefine to exclude NTSC support PPU_CTRL =$2000 PPU_MASK =$2001 PPU_STATUS =$2002 PPU_OAM_ADDR=$2003 PPU_OAM_DATA=$2004 PPU_SCROLL =$2005 PPU_ADDR =$2006 PPU_DATA =$2007 PPU_OAM_DMA =$4014 PPU_FRAMECNT=$4017 DMC_FREQ =$4010 CTRL_PORT1 =$4016 CTRL_PORT2 =$4017 OAM_BUF =$0200 PAL_BUF =$01c0 .segment "ZEROPAGE" NTSC_MODE: .res 1 _FRAME_COUNTER: FRAME_CNT1: .res 1 FRAME_CNT2: .res 1 VRAM_UPDATE: .res 1 NAME_UPD_ADR: .res 2 NAME_UPD_ENABLE: .res 1 PAL_UPDATE: .res 1 PAL_BG_PTR: .res 2 PAL_SPR_PTR: .res 2 SCROLL_X: .res 1 SCROLL_Y: .res 1 SCROLL_X1: .res 1 SCROLL_Y1: .res 1 PAD_STATE: .res 2 ;one byte per controller PAD_STATEP: .res 2 PAD_STATET: .res 2 PPU_CTRL_VAR: .res 1 PPU_CTRL_VAR1: .res 1 PPU_MASK_VAR: .res 1 RAND_SEED: .res 2 BP_BANK: .res 1 BP_BANK_TEMP: .res 1 FT_TEMP: .res 3 TEMP: .res 11 PAD_BUF =TEMP+1 PTR =TEMP ;word LEN =TEMP+2 ;word NEXTSPR =TEMP+4 SCRX =TEMP+5 SCRY =TEMP+6 SRC =TEMP+7 ;word DST =TEMP+9 ;word RLE_LOW =TEMP RLE_HIGH =TEMP+1 RLE_TAG =TEMP+2 RLE_BYTE =TEMP+3 .segment "HEADER" .byte "NES",$1a .byte <NES_PRG_BANKS .byte <NES_CHR_BANKS .byte $12 .byte 0 .res 8,0 .segment "STARTUP" start: _exit: sei ldx #$ff txs inx stx PPU_MASK stx DMC_FREQ stx PPU_CTRL ;no NMI initPPU: bit PPU_STATUS @1: bit PPU_STATUS bpl @1 @2: bit PPU_STATUS bpl @2 clearPalette: lda #$3f sta PPU_ADDR stx PPU_ADDR lda #$0f ldx #$20 @1: sta PPU_DATA dex bne @1 clearVRAM: txa ldy #$20 sty PPU_ADDR sta PPU_ADDR ldy #$10 @1: sta PPU_DATA inx bne @1 dey bne @1 clearRAM: txa @1: sta $000,x sta $100,x sta $200,x sta $300,x sta $400,x sta $500,x sta $600,x sta $700,x inx bne @1 lda #4 jsr _pal_bright jsr _pal_clear jsr _oam_clear jsr zerobss jsr copydata lda #<(__RAM_START__+__RAM_SIZE__) sta sp lda #>(__RAM_START__+__RAM_SIZE__) sta sp+1 ; Set argument stack ptr jsr initlib lda #%10000000 sta <PPU_CTRL_VAR sta PPU_CTRL ;enable NMI lda #%00000110 sta <PPU_MASK_VAR waitSync3: lda <FRAME_CNT1 @1: cmp <FRAME_CNT1 beq @1 detectNTSC: ldx #52 ;blargg's code ldy #24 @1: dex bne @1 dey bne @1 lda PPU_STATUS and #$80 sta <NTSC_MODE jsr _ppu_off lda #0 ldx #0 jsr _set_vram_update ldx #<music_data ldy #>music_data lda <NTSC_MODE jsr FamiToneInit .if(FT_SFX_ENABLE) ldx #<sounds_data ldy #>sounds_data jsr FamiToneSfxInit .endif lda #$fd sta <RAND_SEED sta <RAND_SEED+1 lda #0 sta PPU_SCROLL sta PPU_SCROLL lda #%11111 mmc1_register_write MMC1_CTRL lda #0 mmc1_register_write MMC1_PRG mmc1_register_write MMC1_CHR0 jmp _main ;no parameters .include "lib/neslib.asm" .include "lib/boilerplate.asm" .include "graphics/palettes.asm" .include "levels/all.asm" .segment "RODATA" music_data: .include "sound/music.s" .if(FT_SFX_ENABLE) sounds_data: .include "sound/sfx.s" .endif .segment "SAMPLES" ;.incbin "music_dpcm.bin" .segment "CHR_0" .incbin "graphics/ascii.chr" .segment "CHR_1" .incbin "graphics/main.chr" ; MMC1 needs a reset stub in every bank that will put us into a known state. This defines it for all banks. .repeat $0f, I resetstub_in .concat("STUB_", .sprintf("%02X", I)) .endrepeat resetstub_in "STUB_PRG" ; Throw a single jmp to reset in every bank other than the main PRG bank. This accomplishes 2 things: ; 1) Puts something in the bank, so we avoid warnings ; 2) If we somehow end up here by accident, we'll reset correctly. .macro first_byte_reset_in segname .segment segname jmp start .endmacro .repeat $0f, I first_byte_reset_in .concat("ROM_", .sprintf("%02X", I)) .endrepeat
oeis/143/A143959.asm
neoneye/loda-programs
11
88777
; A143959: Final digit of n^(n+1)-(n+1)^n for n>2 ; 7,9,9,7,9,7,1,9,3,1,5,9,9,5,1,1,1,9,9,9,7,9,9,7,9,7,1,9,3,1,5,9,9,5,1,1,1,9,9,9,7,9,9,7,9,7,1,9,3,1,5,9,9,5,1,1,1,9,9,9,7,9,9,7,9,7,1,9,3,1,5,9,9,5,1,1,1,9,9,9,7,9,9,7,9,7,1,9,3,1,5,9,9,5,1,1,1,9,9,9 add $0,3 seq $0,111454 ; a(n) = (n-4)^(n-3) - (n-3)^(n-4) + 1. add $0,9 mod $0,10
libsrc/games/z88/beeper.asm
andydansby/z88dk-mk2
1
28839
; $Id: beeper.asm,v 1.3 2009/06/22 21:44:16 dom Exp $ ; ; Z88 1 bit sound functions ; XLIB beeper INCLUDE "interrpt.def" ; ; Entry as for Spectrum beeper routine!! ; ; Ported by <NAME> ; Direct transfer, of code..no point commenting really ; .beeper call oz_di push af ld a,l srl l srl l cpl and 3 ld c,a ld b,0 ld ix,beixp3 add ix,bc ;OZ stuff here.. ld a,($4B0) and 63 ld ($4B0),a out ($B0),a .beixp3 nop nop nop inc b inc c .behllp dec c jr nz,behllp ld c,$3F dec b jp nz,behllp xor 64 out ($B0),a ld b,h ld c,a bit 6,a ;if o/p go again! jr nz,be_again ld a,d or e jr z,be_end ld a,c ld c,l dec de jp (ix) .be_again ld c,l inc c jp (ix) .be_end pop af jp oz_ei
tests/devices/misc_device_directives.asm
fengjixuchui/sjasmplus
220
10000
; various syntax errors and minor things, to increase code coverage in tests ; (but too minor to get precisely named dedicated test) DEVICE none LABELSLIST "misc_device_directives.lbl" DEVICE zxspectrum48 LABELSLIST CSPECTMAP ; default map file name (just coverage, not truly verified by this test)
programs/oeis/266/A266662.asm
neoneye/loda
22
241184
; A266662: Number of ON (black) cells in the n-th iteration of the "Rule 47" elementary cellular automaton starting with a single ON (black) cell. ; 1,2,2,5,2,9,2,13,2,17,2,21,2,25,2,29,2,33,2,37,2,41,2,45,2,49,2,53,2,57,2,61,2,65,2,69,2,73,2,77,2,81,2,85,2,89,2,93,2,97,2,101,2,105,2,109,2,113,2,117,2,121,2,125,2,129,2,133,2,137,2,141,2,145,2,149,2,153,2,157,2,161,2,165,2,169,2,173,2,177,2,181,2,185,2,189,2,193,2,197 lpb $0 sub $0,1 mov $1,$0 mod $0,2 mul $1,2 mov $2,$1 cmp $2,0 add $1,$2 lpe add $1,1 mov $0,$1
oeis/335/A335691.asm
neoneye/loda-programs
11
96928
<filename>oeis/335/A335691.asm ; A335691: A000166(n)^2. ; Submitted by <NAME>(s1) ; 1,0,1,4,81,1936,70225,3437316,220017889,17821182016,1782120871521,215636596084900,31051670188655281,5247732257301156624,1028555522495168900401,231424992560450869558756,59244798095490816735545025,17121746649596584336387952896 add $0,6 mov $2,5 lpb $0 sub $0,1 mul $1,$2 sub $1,1 sub $2,1 lpe pow $1,2 mov $0,$1
tests/src/test_utils-abstract_encoder-cobs_simple.ads
Fabien-Chouteau/COBS
0
17645
<reponame>Fabien-Chouteau/COBS package Test_Utils.Abstract_Encoder.COBS_Simple is subtype Parent is Abstract_Encoder.Instance; type Instance is new Parent with private; type Acc is access all Instance; type Any_Acc is access all Instance'Class; overriding procedure Receive (This : in out Instance; Data : Storage_Element); overriding procedure End_Of_Frame (This : in out Instance); overriding procedure Update (This : in out Instance); overriding procedure End_Of_Test (This : in out Instance); private type Instance is new Parent with record Input : Data_Frame; end record; end Test_Utils.Abstract_Encoder.COBS_Simple;
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_1354_755.asm
ljhsiun2/medusa
9
83727
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r12 push %r13 push %r15 push %rcx push %rdi push %rsi lea addresses_normal_ht+0xa5eb, %r11 clflush (%r11) nop dec %rcx movups (%r11), %xmm2 vpextrq $1, %xmm2, %r13 nop dec %r10 lea addresses_normal_ht+0xdca7, %rsi clflush (%rsi) cmp %r15, %r15 mov (%rsi), %r12w nop nop nop cmp $55666, %rsi lea addresses_D_ht+0x12e27, %rsi nop nop nop sub $13775, %rcx mov $0x6162636465666768, %r13 movq %r13, %xmm6 and $0xffffffffffffffc0, %rsi movntdq %xmm6, (%rsi) nop nop nop nop cmp $29044, %r15 lea addresses_normal_ht+0xd9ef, %rsi lea addresses_WT_ht+0x1588f, %rdi nop nop add $62309, %r13 mov $76, %rcx rep movsq nop nop nop nop cmp %r12, %r12 lea addresses_D_ht+0x15727, %r12 nop nop xor %rsi, %rsi mov (%r12), %r11d nop nop nop nop cmp %rdi, %rdi lea addresses_normal_ht+0x1e127, %rsi lea addresses_A_ht+0x10cd3, %rdi nop nop nop cmp $47640, %r11 mov $67, %rcx rep movsw nop nop nop nop xor $32412, %rsi lea addresses_A_ht+0x1927, %rsi lea addresses_A_ht+0x1044b, %rdi nop nop xor $25979, %r12 mov $122, %rcx rep movsb xor %r13, %r13 lea addresses_UC_ht+0x3207, %r12 nop nop nop dec %r15 mov (%r12), %esi nop nop nop nop nop xor %rsi, %rsi lea addresses_WT_ht+0xcb27, %r13 nop nop nop add %r10, %r10 mov $0x6162636465666768, %r12 movq %r12, (%r13) nop nop nop dec %rsi lea addresses_UC_ht+0x192a7, %r13 nop nop dec %r11 movl $0x61626364, (%r13) nop nop nop nop xor $62092, %rcx lea addresses_UC_ht+0x555b, %rsi clflush (%rsi) nop nop nop sub %r11, %r11 movups (%rsi), %xmm0 vpextrq $1, %xmm0, %r13 nop nop nop cmp $48313, %rdi pop %rsi pop %rdi pop %rcx pop %r15 pop %r13 pop %r12 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r13 push %r9 push %rax push %rbx push %rcx push %rdi push %rsi // REPMOV mov $0x327, %rsi lea addresses_normal+0x17f27, %rdi nop nop nop cmp %rax, %rax mov $62, %rcx rep movsb nop nop nop nop nop cmp %rax, %rax // Store lea addresses_WT+0xf65f, %r9 nop nop xor $26816, %rbx mov $0x5152535455565758, %rax movq %rax, (%r9) sub $37450, %rbx // Store lea addresses_RW+0x5947, %rcx nop inc %rsi movb $0x51, (%rcx) nop dec %rsi // Faulty Load lea addresses_RW+0x7327, %r13 nop nop add %rbx, %rbx mov (%r13), %rsi lea oracles, %r13 and $0xff, %rsi shlq $12, %rsi mov (%r13,%rsi,1), %rsi pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r9 pop %r13 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_P', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_normal', 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 16, 'AVXalign': False, 'NT': True, 'congruent': 6, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 4, 'AVXalign': False, 'NT': True, 'congruent': 10, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': True, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'32': 1354} 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 */
src/test/resources/data/searchtests/opt-test10-expected.asm
cpcitor/mdlz80optimizer
0
14189
org #4000 execute: ld hl, v1 ld (hl), 5 ld iy, v2 ld (iy + 0), 1 ld (iy + 1), 2 ld (iy + 2), 3 ld (iy + 3), 4 ld l, v3 ld (hl), 11 inc l ld (hl), 12 loop: jr loop org #c000 v1: org $ + 1 v2: org $ + 4 v3: org $ + 2
alloy4fun_models/trashltl/models/1/TmzFntZFh6AGFxBwx.als
Kaixi26/org.alloytools.alloy
0
1022
open main pred idTmzFntZFh6AGFxBwx_prop2 { no File } pred __repair { idTmzFntZFh6AGFxBwx_prop2 } check __repair { idTmzFntZFh6AGFxBwx_prop2 <=> prop2o }
scripts/mtmoon3_2.asm
adhi-thirumala/EvoYellow
16
99169
MtMoon3Script_4a325: ; pikachu-related function? ld a, [wd472] bit 7, a ret z ld a, [wWalkBikeSurfState] and a ret nz push hl push bc callab GetPikachuFacingDirectionAndReturnToE pop bc pop hl ld a, b cp e ret nz push hl ld a, [wUpdateSpritesEnabled] push af ld a, $ff ld [wUpdateSpritesEnabled], a callab LoadPikachuShadowIntoVRAM pop af ld [wUpdateSpritesEnabled], a pop hl call ApplyPikachuMovementData ret
programs/oeis/157/A157796.asm
karttu/loda
1
27100
<gh_stars>1-10 ; A157796: a(n) = 27225*n^2 - 12098*n + 1344. ; 16471,86048,210075,388552,621479,908856,1250683,1646960,2097687,2602864,3162491,3776568,4445095,5168072,5945499,6777376,7663703,8604480,9599707,10649384,11753511,12912088,14125115,15392592,16714519,18090896,19521723,21007000,22546727,24140904,25789531,27492608,29250135,31062112,32928539,34849416,36824743,38854520,40938747,43077424,45270551,47518128,49820155,52176632,54587559,57052936,59572763,62147040,64775767,67458944,70196571,72988648,75835175,78736152,81691579,84701456,87765783,90884560,94057787,97285464,100567591,103904168,107295195,110740672,114240599,117794976,121403803,125067080,128784807,132556984,136383611,140264688,144200215,148190192,152234619,156333496,160486823,164694600,168956827,173273504,177644631,182070208,186550235,191084712,195673639,200317016,205014843,209767120,214573847,219435024,224350651,229320728,234345255,239424232,244557659,249745536,254987863,260284640,265635867,271041544,276501671,282016248,287585275,293208752,298886679,304619056,310405883,316247160,322142887,328093064,334097691,340156768,346270295,352438272,358660699,364937576,371268903,377654680,384094907,390589584,397138711,403742288,410400315,417112792,423879719,430701096,437576923,444507200,451491927,458531104,465624731,472772808,479975335,487232312,494543739,501909616,509329943,516804720,524333947,531917624,539555751,547248328,554995355,562796832,570652759,578563136,586527963,594547240,602620967,610749144,618931771,627168848,635460375,643806352,652206779,660661656,669170983,677734760,686352987,695025664,703752791,712534368,721370395,730260872,739205799,748205176,757259003,766367280,775530007,784747184,794018811,803344888,812725415,822160392,831649819,841193696,850792023,860444800,870152027,879913704,889729831,899600408,909525435,919504912,929538839,939627216,949770043,959967320,970219047,980525224,990885851,1001300928,1011770455,1022294432,1032872859,1043505736,1054193063,1064934840,1075731067,1086581744,1097486871,1108446448,1119460475,1130528952,1141651879,1152829256,1164061083,1175347360,1186688087,1198083264,1209532891,1221036968,1232595495,1244208472,1255875899,1267597776,1279374103,1291204880,1303090107,1315029784,1327023911,1339072488,1351175515,1363332992,1375544919,1387811296,1400132123,1412507400,1424937127,1437421304,1449959931,1462553008,1475200535,1487902512,1500658939,1513469816,1526335143,1539254920,1552229147,1565257824,1578340951,1591478528,1604670555,1617917032,1631217959,1644573336,1657983163,1671447440,1684966167,1698539344 cal $0,157797 ; a(n) = 8984250*n - 1996170. mov $1,$0 pow $1,2 sub $1,48833262086400 div $1,2964802500 add $1,16471
hashes/rmd256.asm
FloydZ/Crypto-Hash
11
18645
<reponame>FloydZ/Crypto-Hash .const pushad_size equ 8*4 pushad_eax equ 7*4 pushad_ecx equ 6*4 pushad_edx equ 5*4 pushad_ebx equ 4*4 pushad_esp equ 3*4 pushad_ebp equ 2*4 pushad_esi equ 1*4 pushad_edi equ 0*4 .data? RMD256HashBuf db 64 dup(?) RMD256Len dd ? RMD256Index dd ? RMD256Digest dd 8 dup(?) .code RMD256FF macro dwA, dwB, dwC, dwD, locX, rolS mov edi,dwB xor edi,dwC xor edi,dwD add dwA,locX add dwA,edi rol dwA,rolS endm RMD256GG macro dwA, dwB, dwC, dwD, locX, rolS, constAC mov edi,dwC xor edi,dwD and edi,dwB xor edi,dwD add dwA,[locX] lea dwA,[dwA+edi+constAC] rol dwA,rolS ENDM RMD256HH macro dwA, dwB, dwC, dwD, locX, rolS, constAC mov edi,dwC xor edi,-1 or edi,dwB xor edi,dwD add dwA,[locX] lea dwA,[dwA+edi+constAC] rol dwA,rolS endm RMD256II macro dwA, dwB, dwC, dwD, locX, rolS, constAC mov edi,dwC xor edi,dwB and edi,dwD xor edi,dwC add dwA,[locX] lea dwA,[dwA+edi+constAC] rol dwA,rolS endm align dword RMD256Transform proc pushad mov esi,offset RMD256Digest mov ebp,offset RMD256HashBuf mov eax,[esi+0*4];a1 mov ebx,[esi+1*4];b1 mov ecx,[esi+2*4];c1 mov edx,[esi+3*4];d1 ;===================================================== RMD256FF eax, ebx, ecx, edx, dword ptr [ebp+ 0*4], 11 RMD256FF edx, eax, ebx, ecx, dword ptr [ebp+ 1*4], 14 RMD256FF ecx, edx, eax, ebx, dword ptr [ebp+ 2*4], 15 RMD256FF ebx, ecx, edx, eax, dword ptr [ebp+ 3*4], 12 RMD256FF eax, ebx, ecx, edx, dword ptr [ebp+ 4*4], 5 RMD256FF edx, eax, ebx, ecx, dword ptr [ebp+ 5*4], 8 RMD256FF ecx, edx, eax, ebx, dword ptr [ebp+ 6*4], 7 RMD256FF ebx, ecx, edx, eax, dword ptr [ebp+ 7*4], 9 RMD256FF eax, ebx, ecx, edx, dword ptr [ebp+ 8*4], 11 RMD256FF edx, eax, ebx, ecx, dword ptr [ebp+ 9*4], 13 RMD256FF ecx, edx, eax, ebx, dword ptr [ebp+10*4], 14 RMD256FF ebx, ecx, edx, eax, dword ptr [ebp+11*4], 15 RMD256FF eax, ebx, ecx, edx, dword ptr [ebp+12*4], 6 RMD256FF edx, eax, ebx, ecx, dword ptr [ebp+13*4], 7 RMD256FF ecx, edx, eax, ebx, dword ptr [ebp+14*4], 9 RMD256FF ebx, ecx, edx, eax, dword ptr [ebp+15*4], 8 ;===================================================== pushad; store a..d 1 mov eax,[esi+4*4];a2 mov ebx,[esi+5*4];b2 mov ecx,[esi+6*4];c2 mov edx,[esi+7*4];d2 ;================================================================= RMD256II eax, ebx, ecx, edx, dword ptr [ebp+ 5*4], 8, 050A28BE6H RMD256II edx, eax, ebx, ecx, dword ptr [ebp+14*4], 9, 050A28BE6H RMD256II ecx, edx, eax, ebx, dword ptr [ebp+ 7*4], 9, 050A28BE6H RMD256II ebx, ecx, edx, eax, dword ptr [ebp+ 0*4], 11, 050A28BE6H RMD256II eax, ebx, ecx, edx, dword ptr [ebp+ 9*4], 13, 050A28BE6H RMD256II edx, eax, ebx, ecx, dword ptr [ebp+ 2*4], 15, 050A28BE6H RMD256II ecx, edx, eax, ebx, dword ptr [ebp+11*4], 15, 050A28BE6H RMD256II ebx, ecx, edx, eax, dword ptr [ebp+ 4*4], 5, 050A28BE6H RMD256II eax, ebx, ecx, edx, dword ptr [ebp+13*4], 7, 050A28BE6H RMD256II edx, eax, ebx, ecx, dword ptr [ebp+ 6*4], 7, 050A28BE6H RMD256II ecx, edx, eax, ebx, dword ptr [ebp+15*4], 8, 050A28BE6H RMD256II ebx, ecx, edx, eax, dword ptr [ebp+ 8*4], 11, 050A28BE6H RMD256II eax, ebx, ecx, edx, dword ptr [ebp+ 1*4], 14, 050A28BE6H RMD256II edx, eax, ebx, ecx, dword ptr [ebp+10*4], 14, 050A28BE6H RMD256II ecx, edx, eax, ebx, dword ptr [ebp+ 3*4], 12, 050A28BE6H RMD256II ebx, ecx, edx, eax, dword ptr [ebp+12*4], 6, 050A28BE6H ;================================================================= mov edi,[esp+pushad_eax] mov [esp+pushad_eax],eax mov eax,edi ; xchg eax,[esp+pushad_eax] pushad;store a..d 2 mov eax,[esp+pushad_size+pushad_eax];a1 mov ebx,[esp+pushad_size+pushad_ebx];b1 mov ecx,[esp+pushad_size+pushad_ecx];c1 mov edx,[esp+pushad_size+pushad_edx];d1 ;================================================================= RMD256GG eax, ebx, ecx, edx, dword ptr [ebp+ 7*4], 7, 05A827999H RMD256GG edx, eax, ebx, ecx, dword ptr [ebp+ 4*4], 6, 05A827999H RMD256GG ecx, edx, eax, ebx, dword ptr [ebp+13*4], 8, 05A827999H RMD256GG ebx, ecx, edx, eax, dword ptr [ebp+ 1*4], 13, 05A827999H RMD256GG eax, ebx, ecx, edx, dword ptr [ebp+10*4], 11, 05A827999H RMD256GG edx, eax, ebx, ecx, dword ptr [ebp+ 6*4], 9, 05A827999H RMD256GG ecx, edx, eax, ebx, dword ptr [ebp+15*4], 7, 05A827999H RMD256GG ebx, ecx, edx, eax, dword ptr [ebp+ 3*4], 15, 05A827999H RMD256GG eax, ebx, ecx, edx, dword ptr [ebp+12*4], 7, 05A827999H RMD256GG edx, eax, ebx, ecx, dword ptr [ebp+ 0*4], 12, 05A827999H RMD256GG ecx, edx, eax, ebx, dword ptr [ebp+ 9*4], 15, 05A827999H RMD256GG ebx, ecx, edx, eax, dword ptr [ebp+ 5*4], 9, 05A827999H RMD256GG eax, ebx, ecx, edx, dword ptr [ebp+ 2*4], 11, 05A827999H RMD256GG edx, eax, ebx, ecx, dword ptr [ebp+14*4], 7, 05A827999H RMD256GG ecx, edx, eax, ebx, dword ptr [ebp+11*4], 13, 05A827999H RMD256GG ebx, ecx, edx, eax, dword ptr [ebp+ 8*4], 12, 05A827999H ;================================================================= mov [esp+pushad_size+pushad_eax],eax;a1 mov [esp+pushad_size+pushad_ebx],ebx;b1 mov [esp+pushad_size+pushad_ecx],ecx;c1 mov [esp+pushad_size+pushad_edx],edx;d1 mov eax,[esp+pushad_eax];a2 mov ebx,[esp+pushad_ebx];b2 mov ecx,[esp+pushad_ecx];c2 mov edx,[esp+pushad_edx];d2 ;================================================================= RMD256HH eax, ebx, ecx, edx, dword ptr [ebp+ 6*4], 9, 05C4DD124H RMD256HH edx, eax, ebx, ecx, dword ptr [ebp+11*4], 13, 05C4DD124H RMD256HH ecx, edx, eax, ebx, dword ptr [ebp+ 3*4], 15, 05C4DD124H RMD256HH ebx, ecx, edx, eax, dword ptr [ebp+ 7*4], 7, 05C4DD124H RMD256HH eax, ebx, ecx, edx, dword ptr [ebp+ 0*4], 12, 05C4DD124H RMD256HH edx, eax, ebx, ecx, dword ptr [ebp+13*4], 8, 05C4DD124H RMD256HH ecx, edx, eax, ebx, dword ptr [ebp+ 5*4], 9, 05C4DD124H RMD256HH ebx, ecx, edx, eax, dword ptr [ebp+10*4], 11, 05C4DD124H RMD256HH eax, ebx, ecx, edx, dword ptr [ebp+14*4], 7, 05C4DD124H RMD256HH edx, eax, ebx, ecx, dword ptr [ebp+15*4], 7, 05C4DD124H RMD256HH ecx, edx, eax, ebx, dword ptr [ebp+ 8*4], 12, 05C4DD124H RMD256HH ebx, ecx, edx, eax, dword ptr [ebp+12*4], 7, 05C4DD124H RMD256HH eax, ebx, ecx, edx, dword ptr [ebp+ 4*4], 6, 05C4DD124H RMD256HH edx, eax, ebx, ecx, dword ptr [ebp+ 9*4], 15, 05C4DD124H RMD256HH ecx, edx, eax, ebx, dword ptr [ebp+ 1*4], 13, 05C4DD124H RMD256HH ebx, ecx, edx, eax, dword ptr [ebp+ 2*4], 11, 05C4DD124H ;================================================================= mov edi,[esp+pushad_size+pushad_ebx] mov [esp+pushad_size+pushad_ebx],ebx mov ebx,edi ; xchg ebx,[esp+pushad_size+pushad_ebx] mov [esp+pushad_eax],eax;a2 mov [esp+pushad_ebx],ebx;b2 mov [esp+pushad_ecx],ecx;c2 mov [esp+pushad_edx],edx;d2 mov eax,[esp+pushad_size+pushad_eax];a1 mov ebx,[esp+pushad_size+pushad_ebx];b1 mov ecx,[esp+pushad_size+pushad_ecx];c1 mov edx,[esp+pushad_size+pushad_edx];d1 ;================================================================= RMD256HH eax, ebx, ecx, edx, dword ptr [ebp+ 3*4], 11, 06ED9EBA1H RMD256HH edx, eax, ebx, ecx, dword ptr [ebp+10*4], 13, 06ED9EBA1H RMD256HH ecx, edx, eax, ebx, dword ptr [ebp+14*4], 6, 06ED9EBA1H RMD256HH ebx, ecx, edx, eax, dword ptr [ebp+ 4*4], 7, 06ED9EBA1H RMD256HH eax, ebx, ecx, edx, dword ptr [ebp+ 9*4], 14, 06ED9EBA1H RMD256HH edx, eax, ebx, ecx, dword ptr [ebp+15*4], 9, 06ED9EBA1H RMD256HH ecx, edx, eax, ebx, dword ptr [ebp+ 8*4], 13, 06ED9EBA1H RMD256HH ebx, ecx, edx, eax, dword ptr [ebp+ 1*4], 15, 06ED9EBA1H RMD256HH eax, ebx, ecx, edx, dword ptr [ebp+ 2*4], 14, 06ED9EBA1H RMD256HH edx, eax, ebx, ecx, dword ptr [ebp+ 7*4], 8, 06ED9EBA1H RMD256HH ecx, edx, eax, ebx, dword ptr [ebp+ 0*4], 13, 06ED9EBA1H RMD256HH ebx, ecx, edx, eax, dword ptr [ebp+ 6*4], 6, 06ED9EBA1H RMD256HH eax, ebx, ecx, edx, dword ptr [ebp+13*4], 5, 06ED9EBA1H RMD256HH edx, eax, ebx, ecx, dword ptr [ebp+11*4], 12, 06ED9EBA1H RMD256HH ecx, edx, eax, ebx, dword ptr [ebp+ 5*4], 7, 06ED9EBA1H RMD256HH ebx, ecx, edx, eax, dword ptr [ebp+12*4], 5, 06ED9EBA1H ;================================================================= mov [esp+pushad_size+pushad_eax],eax;a1 mov [esp+pushad_size+pushad_ebx],ebx;b1 mov [esp+pushad_size+pushad_ecx],ecx;c1 mov [esp+pushad_size+pushad_edx],edx;d1 mov eax,[esp+pushad_eax];a2 mov ebx,[esp+pushad_ebx];b2 mov ecx,[esp+pushad_ecx];c2 mov edx,[esp+pushad_edx];d2 ;================================================================= RMD256GG eax, ebx, ecx, edx, dword ptr [ebp+15*4], 9, 06D703EF3H RMD256GG edx, eax, ebx, ecx, dword ptr [ebp+ 5*4], 7, 06D703EF3H RMD256GG ecx, edx, eax, ebx, dword ptr [ebp+ 1*4], 15, 06D703EF3H RMD256GG ebx, ecx, edx, eax, dword ptr [ebp+ 3*4], 11, 06D703EF3H RMD256GG eax, ebx, ecx, edx, dword ptr [ebp+ 7*4], 8, 06D703EF3H RMD256GG edx, eax, ebx, ecx, dword ptr [ebp+14*4], 6, 06D703EF3H RMD256GG ecx, edx, eax, ebx, dword ptr [ebp+ 6*4], 6, 06D703EF3H RMD256GG ebx, ecx, edx, eax, dword ptr [ebp+ 9*4], 14, 06D703EF3H RMD256GG eax, ebx, ecx, edx, dword ptr [ebp+11*4], 12, 06D703EF3H RMD256GG edx, eax, ebx, ecx, dword ptr [ebp+ 8*4], 13, 06D703EF3H RMD256GG ecx, edx, eax, ebx, dword ptr [ebp+12*4], 5, 06D703EF3H RMD256GG ebx, ecx, edx, eax, dword ptr [ebp+ 2*4], 14, 06D703EF3H RMD256GG eax, ebx, ecx, edx, dword ptr [ebp+10*4], 13, 06D703EF3H RMD256GG edx, eax, ebx, ecx, dword ptr [ebp+ 0*4], 13, 06D703EF3H RMD256GG ecx, edx, eax, ebx, dword ptr [ebp+ 4*4], 7, 06D703EF3H RMD256GG ebx, ecx, edx, eax, dword ptr [ebp+13*4], 5, 06D703EF3H ;================================================================= mov edi,[esp+pushad_size+pushad_ecx] mov [esp+pushad_size+pushad_ecx],ecx mov ecx,edi ; xchg ecx,[esp+pushad_size+pushad_ecx] mov [esp+pushad_eax],eax;a2 mov [esp+pushad_ebx],ebx;b2 mov [esp+pushad_ecx],ecx;c2 mov [esp+pushad_edx],edx;d2 mov eax,[esp+pushad_size+pushad_eax];a1 mov ebx,[esp+pushad_size+pushad_ebx];b1 mov ecx,[esp+pushad_size+pushad_ecx];c1 mov edx,[esp+pushad_size+pushad_edx];d1 ;================================================================= RMD256II eax, ebx, ecx, edx, dword ptr [ebp+ 1*4], 11, 08F1BBCDCH RMD256II edx, eax, ebx, ecx, dword ptr [ebp+ 9*4], 12, 08F1BBCDCH RMD256II ecx, edx, eax, ebx, dword ptr [ebp+11*4], 14, 08F1BBCDCH RMD256II ebx, ecx, edx, eax, dword ptr [ebp+10*4], 15, 08F1BBCDCH RMD256II eax, ebx, ecx, edx, dword ptr [ebp+ 0*4], 14, 08F1BBCDCH RMD256II edx, eax, ebx, ecx, dword ptr [ebp+ 8*4], 15, 08F1BBCDCH RMD256II ecx, edx, eax, ebx, dword ptr [ebp+12*4], 9, 08F1BBCDCH RMD256II ebx, ecx, edx, eax, dword ptr [ebp+ 4*4], 8, 08F1BBCDCH RMD256II eax, ebx, ecx, edx, dword ptr [ebp+13*4], 9, 08F1BBCDCH RMD256II edx, eax, ebx, ecx, dword ptr [ebp+ 3*4], 14, 08F1BBCDCH RMD256II ecx, edx, eax, ebx, dword ptr [ebp+ 7*4], 5, 08F1BBCDCH RMD256II ebx, ecx, edx, eax, dword ptr [ebp+15*4], 6, 08F1BBCDCH RMD256II eax, ebx, ecx, edx, dword ptr [ebp+14*4], 8, 08F1BBCDCH RMD256II edx, eax, ebx, ecx, dword ptr [ebp+ 5*4], 6, 08F1BBCDCH RMD256II ecx, edx, eax, ebx, dword ptr [ebp+ 6*4], 5, 08F1BBCDCH RMD256II ebx, ecx, edx, eax, dword ptr [ebp+ 2*4], 12, 08F1BBCDCH ;================================================================= mov [esp+pushad_size+pushad_eax],eax;a1 mov [esp+pushad_size+pushad_ebx],ebx;b1 mov [esp+pushad_size+pushad_ecx],ecx;c1 mov [esp+pushad_size+pushad_edx],edx;d1 mov eax,[esp+pushad_eax];a2 mov ebx,[esp+pushad_ebx];b2 mov ecx,[esp+pushad_ecx];c2 mov edx,[esp+pushad_edx];d2 ;===================================================== RMD256FF eax, ebx, ecx, edx, dword ptr [ebp+ 8*4], 15 RMD256FF edx, eax, ebx, ecx, dword ptr [ebp+ 6*4], 5 RMD256FF ecx, edx, eax, ebx, dword ptr [ebp+ 4*4], 8 RMD256FF ebx, ecx, edx, eax, dword ptr [ebp+ 1*4], 11 RMD256FF eax, ebx, ecx, edx, dword ptr [ebp+ 3*4], 14 RMD256FF edx, eax, ebx, ecx, dword ptr [ebp+11*4], 14 RMD256FF ecx, edx, eax, ebx, dword ptr [ebp+15*4], 6 RMD256FF ebx, ecx, edx, eax, dword ptr [ebp+ 0*4], 14 RMD256FF eax, ebx, ecx, edx, dword ptr [ebp+ 5*4], 6 RMD256FF edx, eax, ebx, ecx, dword ptr [ebp+12*4], 9 RMD256FF ecx, edx, eax, ebx, dword ptr [ebp+ 2*4], 12 RMD256FF ebx, ecx, edx, eax, dword ptr [ebp+13*4], 9 RMD256FF eax, ebx, ecx, edx, dword ptr [ebp+ 9*4], 12 RMD256FF edx, eax, ebx, ecx, dword ptr [ebp+ 7*4], 5 RMD256FF ecx, edx, eax, ebx, dword ptr [ebp+10*4], 15 RMD256FF ebx, ecx, edx, eax, dword ptr [ebp+14*4], 8 ;===================================================== mov edi,[esp+pushad_size+pushad_edx] mov [esp+pushad_size+pushad_edx],edx mov edx,edi ; xchg edx,[esp+pushad_size+pushad_edx];b1<-->b2 add [esi+4*4],eax;a2 add [esi+5*4],ebx;... add [esi+6*4],ecx add [esi+7*4],edx popad popad add [esi+0*4],eax;a1 add [esi+1*4],ebx;... add [esi+2*4],ecx add [esi+3*4],edx popad ret RMD256Transform endp RMD256BURN macro xor eax,eax mov RMD256Index,eax mov edi,Offset RMD256HashBuf mov ecx,(sizeof RMD256HashBuf)/4 rep stosd endm align dword RMD256Init proc uses edi xor eax, eax mov RMD256Len,eax RMD256BURN mov eax,offset RMD256Digest mov dword ptr [eax+0*4],067452301h mov dword ptr [eax+1*4],0efcdab89h mov dword ptr [eax+2*4],098badcfeh mov dword ptr [eax+3*4],010325476h mov dword ptr [eax+4*4],076543210h mov dword ptr [eax+5*4],0FEDCBA98h mov dword ptr [eax+6*4],089ABCDEFh mov dword ptr [eax+7*4],001234567h ret RMD256Init endp align dword RMD256Update proc uses esi edi ebx lpBuffer:dword, dwBufLen:dword mov ebx,dwBufLen add RMD256Len,ebx .while ebx mov eax,RMD256Index mov edx,64 sub edx,eax .if edx <= ebx lea edi, [RMD256HashBuf+eax] mov esi, lpBuffer mov ecx, edx rep movsb sub ebx, edx add lpBuffer, edx call RMD256Transform RMD256BURN .else lea edi, [RMD256HashBuf+eax] mov esi, lpBuffer mov ecx, ebx rep movsb mov eax, RMD256Index add eax, ebx mov RMD256Index,eax .break .endif .endw ret RMD256Update endp align dword RMD256Final proc uses esi edi mov ecx, RMD256Index mov byte ptr [RMD256HashBuf+ecx],80h .if ecx >= 56 call RMD256Transform RMD256BURN .endif mov eax,RMD256Len xor edx,edx shld edx,eax,3 shl eax,3 mov dword ptr [RMD256HashBuf+56],eax mov dword ptr [RMD256HashBuf+60],edx call RMD256Transform mov eax,offset RMD256Digest ret RMD256Final endp
source/nodes/program-nodes-explicit_dereferences.adb
reznikmm/gela
0
18272
-- SPDX-FileCopyrightText: 2019 <NAME> <<EMAIL>> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- package body Program.Nodes.Explicit_Dereferences is function Create (Prefix : not null Program.Elements.Expressions.Expression_Access; Dot_Token : not null Program.Lexical_Elements.Lexical_Element_Access; All_Token : not null Program.Lexical_Elements.Lexical_Element_Access) return Explicit_Dereference is begin return Result : Explicit_Dereference := (Prefix => Prefix, Dot_Token => Dot_Token, All_Token => All_Token, Enclosing_Element => null) do Initialize (Result); end return; end Create; function Create (Prefix : not null Program.Elements.Expressions .Expression_Access; Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False) return Implicit_Explicit_Dereference is begin return Result : Implicit_Explicit_Dereference := (Prefix => Prefix, Is_Part_Of_Implicit => Is_Part_Of_Implicit, Is_Part_Of_Inherited => Is_Part_Of_Inherited, Is_Part_Of_Instance => Is_Part_Of_Instance, Enclosing_Element => null) do Initialize (Result); end return; end Create; overriding function Prefix (Self : Base_Explicit_Dereference) return not null Program.Elements.Expressions.Expression_Access is begin return Self.Prefix; end Prefix; overriding function Dot_Token (Self : Explicit_Dereference) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Dot_Token; end Dot_Token; overriding function All_Token (Self : Explicit_Dereference) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.All_Token; end All_Token; overriding function Is_Part_Of_Implicit (Self : Implicit_Explicit_Dereference) return Boolean is begin return Self.Is_Part_Of_Implicit; end Is_Part_Of_Implicit; overriding function Is_Part_Of_Inherited (Self : Implicit_Explicit_Dereference) return Boolean is begin return Self.Is_Part_Of_Inherited; end Is_Part_Of_Inherited; overriding function Is_Part_Of_Instance (Self : Implicit_Explicit_Dereference) return Boolean is begin return Self.Is_Part_Of_Instance; end Is_Part_Of_Instance; procedure Initialize (Self : in out Base_Explicit_Dereference'Class) is begin Set_Enclosing_Element (Self.Prefix, Self'Unchecked_Access); null; end Initialize; overriding function Is_Explicit_Dereference (Self : Base_Explicit_Dereference) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Explicit_Dereference; overriding function Is_Expression (Self : Base_Explicit_Dereference) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Expression; overriding procedure Visit (Self : not null access Base_Explicit_Dereference; Visitor : in out Program.Element_Visitors.Element_Visitor'Class) is begin Visitor.Explicit_Dereference (Self); end Visit; overriding function To_Explicit_Dereference_Text (Self : in out Explicit_Dereference) return Program.Elements.Explicit_Dereferences .Explicit_Dereference_Text_Access is begin return Self'Unchecked_Access; end To_Explicit_Dereference_Text; overriding function To_Explicit_Dereference_Text (Self : in out Implicit_Explicit_Dereference) return Program.Elements.Explicit_Dereferences .Explicit_Dereference_Text_Access is pragma Unreferenced (Self); begin return null; end To_Explicit_Dereference_Text; end Program.Nodes.Explicit_Dereferences;
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xca.log_21829_537.asm
ljhsiun2/medusa
9
7195
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r14 push %r15 push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_WT_ht+0x28bf, %r15 nop nop xor %rdx, %rdx movb (%r15), %r12b nop nop nop add $48808, %r12 lea addresses_WC_ht+0x1d71b, %rcx xor %rdx, %rdx mov $0x6162636465666768, %rbp movq %rbp, %xmm1 movups %xmm1, (%rcx) nop nop nop add $10513, %rcx lea addresses_WC_ht+0xcc0b, %r14 nop cmp %r15, %r15 movw $0x6162, (%r14) sub $43660, %r14 lea addresses_UC_ht+0x5ddb, %rcx nop nop nop nop xor $690, %rdi mov (%rcx), %ebp nop nop nop and $54298, %r12 lea addresses_UC_ht+0x1be9b, %r12 nop nop nop nop inc %rcx mov (%r12), %rbp nop add $5272, %r15 lea addresses_WT_ht+0xc5a5, %r12 nop nop nop xor %rbp, %rbp movb (%r12), %r15b add $64678, %r15 lea addresses_D_ht+0x1e5d3, %r15 nop sub $62, %rbp mov $0x6162636465666768, %r14 movq %r14, (%r15) nop nop nop sub %r15, %r15 lea addresses_UC_ht+0x13ac4, %rbp nop add $59549, %rdx mov $0x6162636465666768, %rcx movq %rcx, (%rbp) nop nop nop nop xor %rdi, %rdi lea addresses_WC_ht+0x185db, %rsi lea addresses_WC_ht+0x1be9b, %rdi and $39348, %r12 mov $45, %rcx rep movsq and $12164, %rsi pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %r15 pop %r14 pop %r12 ret .global s_faulty_load s_faulty_load: push %r11 push %r13 push %r9 push %rbx push %rcx push %rdx // Store lea addresses_US+0x193db, %rcx xor %r11, %r11 movw $0x5152, (%rcx) nop nop sub $13256, %rbx // Store lea addresses_D+0x10065, %rcx nop nop nop xor %r9, %r9 movl $0x51525354, (%rcx) nop nop and %r13, %r13 // Faulty Load mov $0x7b805f00000005db, %rdx nop nop nop dec %r11 movb (%rdx), %r13b lea oracles, %rdx and $0xff, %r13 shlq $12, %r13 mov (%rdx,%r13,1), %r13 pop %rdx pop %rcx pop %rbx pop %r9 pop %r13 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_NC', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_US', 'same': False, 'AVXalign': False, 'congruent': 9}} {'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_D', 'same': False, 'AVXalign': True, 'congruent': 1}} [Faulty Load] {'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_NC', 'same': True, 'AVXalign': False, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'size': 1, 'NT': True, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': True, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 4}} {'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 2}} {'OP': 'LOAD', 'src': {'size': 4, 'NT': True, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 11}} {'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 2}} {'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': True, 'congruent': 3}} {'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 9}, 'dst': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 6}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
scripts/exchange_sort_1024.asm
yashadhikari/ELISA
0
98155
<gh_stars>0 .text main: # load length value and array address # r1 = passes remaining # r2 = iterations remaining in current pass # r3 = address of left element to compare; # the adjacent right element is 1(r3) lw $r1 length lw $r2 length la $r3 array loop: beq $r1 $zero exit # If no swaps occured, the array is sorted. addi $r1 $r1 -1 # Decrement counter addi $r2 $r2 -1 # Decrement counter blez $r2 reset # Once a pass is complete, reset to start lw $r4 0($r3) # load left lw $r5 1($r3) # load right slt $r6 $r5 $r4 # check if swap needed bgtz $r6 yes_swap # if swap needed, branch beq $r4 $r5 no_swap # if left > right, swap addi $r3 $r3 4 # Increment position by 0x4 j loop yes_swap: sw $r5 0($r3) # place right word left sw $r4 1($r3) # place left word right addi $r3 $r3 4 # increment array position lw $r1 length # $r1 back to length j loop no_swap: addi $r3 $r3 4 j loop exit: syscall syscall syscall reset: la $r3 array # reset to start of word lw $r2 length # Reset counter to word length j loop .data array: [292, 932, 137, 652, 281, 35, 947, 866, 737, 339, 1019, 987, 289, 545, 813, 300, 1012, 350, 172, 279, 249, 6, 960, 883, 649, 24, 1001, 934, 49, 644, 258, 198, 291, 769, 479, 230, 850, 927, 537, 602, 802, 294, 464, 225, 602, 514, 399, 793, 542, 817, 936, 117, 948, 314, 666, 251, 440, 147, 844, 108, 966, 850, 534, 335, 42, 218, 888, 440, 50, 383, 980, 729, 158, 1008, 686, 148, 404, 612, 332, 342, 111, 963, 394, 689, 956, 202, 627, 774, 661, 912, 252, 814, 435, 6, 349, 486, 144, 493, 956, 914, 912, 571, 740, 720, 757, 797, 121, 1000, 847, 338, 116, 367, 668, 700, 478, 884, 673, 455, 146, 435, 778, 941, 278, 780, 552, 1001, 291, 372, 557, 982, 901, 735, 971, 925, 342, 338, 926, 46, 300, 794, 258, 386, 724, 719, 521, 552, 811, 945, 180, 819, 152, 382, 99, 741, 860, 479, 360, 949, 578, 301, 828, 664, 788, 352, 972, 573, 84, 996, 28, 797, 319, 821, 561, 556, 888, 21, 605, 417, 1002, 115, 999, 328, 253, 564, 779, 722, 397, 825, 692, 889, 361, 6, 1013, 713, 598, 774, 242, 512, 5, 80, 899, 606, 929, 391, 608, 954, 146, 118, 1011, 822, 668, 721, 429, 387, 499, 288, 533, 971, 440, 999, 292, 987, 392, 267, 279, 239, 329, 777, 190, 378, 627, 484, 1022, 244, 959, 748, 643, 600, 92, 518, 140, 834, 341, 525, 332, 634, 938, 103, 748, 356, 245, 941, 727, 912, 397, 685, 621, 111, 132, 836, 614, 451, 538, 1014, 688, 939, 527, 590, 347, 1023, 189, 79, 987, 462, 433, 357, 528, 565, 242, 9, 350, 546, 409, 311, 9, 51, 643, 988, 957, 374, 797, 848, 440, 441, 105, 353, 820, 603, 499, 704, 144, 143, 14, 735, 326, 913, 528, 269, 689, 787, 1011, 681, 134, 373, 147, 732, 257, 737, 245, 563, 227, 711, 677, 123, 25, 823, 519, 705, 122, 818, 979, 278, 750, 557, 277, 779, 284, 34, 560, 917, 701, 170, 658, 863, 469, 601, 233, 540, 313, 415, 905, 319, 13, 443, 148, 58, 490, 395, 273, 236, 577, 378, 932, 162, 267, 93, 327, 906, 390, 343, 72, 238, 828, 191, 374, 468, 398, 35, 317, 139, 712, 302, 555, 415, 162, 729, 974, 137, 677, 186, 686, 938, 272, 610, 725, 1002, 626, 384, 381, 522, 219, 612, 756, 402, 95, 835, 435, 749, 87, 346, 206, 590, 687, 522, 954, 372, 616, 386, 616, 336, 598, 401, 392, 644, 940, 382, 276, 888, 1007, 177, 631, 99, 202, 865, 776, 138, 607, 644, 57, 474, 192, 284, 501, 864, 857, 641, 853, 586, 240, 756, 704, 37, 56, 782, 876, 616, 533, 623, 80, 120, 434, 345, 399, 217, 929, 940, 572, 74, 91, 331, 885, 767, 17, 266, 697, 276, 116, 209, 118, 732, 917, 829, 342, 329, 610, 504, 595, 245, 874, 590, 96, 721, 189, 324, 992, 87, 320, 13, 970, 13, 12, 629, 205, 383, 811, 113, 484, 219, 37, 795, 678, 6, 500, 587, 997, 863, 870, 658, 289, 835, 222, 539, 541, 955, 794, 191, 701, 893, 863, 688, 548, 911, 558, 466, 989, 369, 612, 834, 334, 525, 920, 792, 347, 108, 457, 507, 92, 203, 401, 978, 331, 994, 10, 593, 921, 103, 233, 348, 325, 469, 955, 879, 369, 758, 887, 901, 943, 626, 576, 845, 502, 830, 466, 256, 997, 792, 14, 12, 866, 889, 343, 423, 592, 999, 401, 604, 255, 941, 734, 244, 995, 611, 109, 40, 356, 2, 769, 223, 626, 865, 428, 923, 617, 588, 645, 6, 805, 980, 653, 381, 509, 325, 88, 725, 420, 287, 997, 856, 662, 300, 766, 749, 93, 593, 127, 33, 1003, 553, 426, 496, 92, 713, 1011, 133, 83, 57, 897, 548, 837, 636, 69, 702, 160, 116, 297, 137, 428, 42, 516, 363, 468, 559, 336, 280, 44, 90, 588, 531, 575, 272, 710, 437, 633, 171, 72, 851, 243, 705, 297, 663, 468, 115, 158, 227, 345, 341, 961, 231, 336, 444, 877, 881, 556, 25, 804, 771, 786, 751, 548, 94, 886, 110, 610, 832, 859, 713, 757, 905, 311, 704, 521, 961, 286, 698, 332, 375, 468, 298, 769, 303, 631, 71, 605, 41, 925, 676, 920, 636, 421, 346, 983, 834, 809, 451, 435, 737, 179, 515, 186, 479, 985, 131, 468, 954, 337, 635, 853, 368, 934, 772, 218, 34, 945, 187, 238, 677, 800, 814, 209, 590, 405, 599, 556, 565, 805, 334, 412, 238, 552, 1005, 266, 666, 959, 64, 274, 193, 315, 65, 241, 742, 422, 555, 164, 563, 157, 543, 869, 1009, 935, 361, 578, 982, 853, 461, 823, 762, 125, 857, 672, 378, 601, 413, 662, 824, 88, 373, 952, 27, 655, 512, 595, 228, 655, 501, 862, 663, 494, 198, 272, 992, 706, 654, 843, 830, 178, 73, 50, 898, 227, 740, 594, 20, 509, 351, 118, 882, 535, 160, 20, 513, 476, 178, 468, 67, 679, 5, 655, 262, 385, 472, 439, 196, 429, 256, 873, 235, 516, 171, 49, 797, 75, 474, 497, 133, 378, 85, 838, 583, 659, 46, 97, 266, 109, 678, 154, 899, 287, 642, 277, 705, 1015, 47, 303, 544, 811, 94, 782, 213, 843, 879, 514, 611, 828, 53, 44, 586, 853, 686, 238, 1016, 658, 510, 702, 866, 588, 592, 477, 346, 844, 127, 190, 437, 922, 500, 873, 168, 112, 850, 165, 620, 914, 157, 926, 253, 360, 2, 121, 67, 827, 241, 795, 276, 1001, 296, 280, 720, 753, 473, 898, 145, 281, 118, 86, 751, 741, 575, 324, 5, 93, 967, 943, 645, 53, 202, 1004, 767, 855, 613, 452, 996, 665, 304, 385, 946, 977, 781, 303, 654, 178, 67, 266, 968, 959, 541, 1019, 695, 785, 256, 463, 566, 1004, 807, 967, 71, 526, 554, 1009, 215, 90, 481, 646, 616, 228, 259, 577, 875, 727, 103, 607, 13, 122, 446, 383, 897, 396, 600, 884, 237, 348, 77, 116, 434, 376, 466, 454, 633, 629, 236, 217, 743, 763, 276, 650, 798, 830, 605, 360, 717, 366, 806, 753, 703, 556, 415] length: 1024
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0_notsx.log_21829_12.asm
ljhsiun2/medusa
9
173635
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r9 push %rax push %rcx push %rdi push %rsi lea addresses_A_ht+0xbef2, %r9 nop nop nop nop nop sub %r12, %r12 movw $0x6162, (%r9) nop nop nop nop add %r12, %r12 lea addresses_D_ht+0x1b872, %rsi lea addresses_normal_ht+0x15532, %rdi nop nop nop nop sub $39330, %rax mov $55, %rcx rep movsl nop nop nop dec %r12 pop %rsi pop %rdi pop %rcx pop %rax pop %r9 pop %r12 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r14 push %rax push %rdx push %rsi // Faulty Load mov $0x3ef6d0000000132, %rdx clflush (%rdx) nop nop nop nop nop cmp %r12, %r12 movups (%rdx), %xmm1 vpextrq $0, %xmm1, %r14 lea oracles, %r11 and $0xff, %r14 shlq $12, %r14 mov (%r11,%r14,1), %r14 pop %rsi pop %rdx pop %rax pop %r14 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} [Faulty Load] {'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 16, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 6}} {'src': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': True}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
code/8/3.asm
GeekHades1/AssemblyCode
1
105241
; div 除法指令 ; 1、除数:分为8位和16位,在一个reg或者内存单元中 ; 2、被除数:默认放在AX或DX和AX中,如果除数是8位那么被除数 ; 则放在AX中,如果除数是16位,那么被除数的高16位放在DX中,低 ; 16位则放在AX中 ; 结果:如果除数是8位,那么AL中存放商,AH中存放余数,如果除数 ; 是16位,那么AX中存放商,DX中存放余数。 assume cs:code code segment start: ; 计算100001 / 100 ,100001大于65535,所以必须存放在32位中 ; 100001 = 186A1H, 所以需要DX存放1,AX存放86A1H ; 所以除数使用16位寄存器 mov dx, 1H mov ax, 86A1H mov bx, 100 div bx ; 计算 1001 / 100 ,因为 1001 16位寄存器完全可以处理 ; 所以除数100只需要放在 8 位寄存器即可 mov ax, 1001 mov bl, 100 div bl mov ax, 4c00H int 21H code ends end start
programs/oeis/214/A214411.asm
karttu/loda
0
246143
<reponame>karttu/loda ; A214411: The maximum exponent k of 7 such that 7^k divides n. ; 0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,2,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,2,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,2,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,2,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,2,0,0,0,0,0 add $0,1 mov $2,$0 lpb $2,1 add $1,362880 mov $3,$2 bin $3,7 gcd $2,$3 lpe div $1,362880
src/main/antlr4/tmp/PlayPlus.g4
alexisdegraeve/compilatorpils
0
7808
grammar PlayPlus; import PlayPlusWords; root: programmemonde | programmestrat; programmemonde: DECLARE AND RETAIN (vardecl POINTVIRGULE| fctdecl)* (instruction)* clausedefault; programmestrat: DECLARE AND RETAIN impdecl? (vardecl POINTVIRGULE| fctdecl | impdecl)* WHEN YOUR TURN (clausewhen)* clausedefault; clausewhen: WHEN clausewhencond ( DECLARE LOCAL (vardecl POINTVIRGULE)+)? DO clausewhenins DONE #insideClauseWHEN; clausewhencond: exprD #insideClauseWHENCond; clausewhenins: (instruction)+ #insideClauseWHENIns; clausedefault: BY DEFAULT ( DECLARE LOCAL (vardecl POINTVIRGULE)+ )? DO ( instruction)+ endprog #insideClauseDefault; endprog: DONE #insideEndProg; vardecl: ID AS type #identification; type: SCALAR | array; array: SCALAR LCRO ( NUMBER)+ ( COMMA (NUMBER)+ )? RCRO #arrayDeclaration; exprD: exprEnt #exprDEntiere |(PLUS | MINUS) exprD #exprPlusMinus |NOT exprD #exprDNot |TRUE #exprDTrue |FALSE #exprDFalse |ENNEMI IS (NORTH | SOUTH | EAST | WEST) #exprDEnnemIs |GRAAL IS (NORTH | SOUTH | EAST | WEST) #exprDGraalIs |exprCase #exprDexprCase |ID #exprDVarDecl |ID LCRO exprD (COMMA exprD)? RCRO #exprDVarDeclCro |exprG #exprDExprG | ID LPAR (exprD (COMMA exprD)*)? RPAR #exprDLPARExprDRPAR | LPAR exprD RPAR #exprDLPARPAR |exprD TIMES exprD #exprDTimes |exprD DIVIDE exprD #exprDDivide |exprD MODULO exprD #exprDModulo |exprD PLUS exprD #exprDPlus |exprD MINUS exprD #exprDMinus |exprD EQUAL exprD #exprDEqual |exprD INF exprD #exprDInf |exprD SUP exprD #exprDSup |exprD AND exprD #exprDAnd |exprD OR exprD #exprDOr; exprG : ID #exprGID | (ID LCRO exprD (COMMA exprD)? RCRO) #exprGArray; exprEnt: NUMBER #exprEntNumber |LATITUDE #exprEntLatitude |LONGITUDE #exprEntLongitude |GRIDSIZE #exprEntGridSize |(MAP|RADIO|RADAR|AMMO|FRUITS|SODA) COUNT #exprEntCount |LIFE #exprEntLife; exprCase: DIRT #exprCaseDirt |ROCK #exprCaseRock |VINES #exprCaseVines |ZOMBIE #exprCaseZombie |PLAYER #exprCasePlayer |ENNEMI #exprCaseEnnemi |MAP #exprCaseMap |RADIO #exprCaseRadio |RADAR #exprCaseRadar |AMMO #exprCaseAmmo |FRUITS #exprCaseFruits |SODA #exprCaseSoda |GRAAL #exprCaseGraal |NEARBY LCRO exprD COMMA exprD RCRO #exprCaseNearby; instruction: SKIPCODE #skipInstr | IF condblock THEN truecondblock DONE #ifThenInstr | IF condblock THEN truecondblock ELSE elsecondblock DONE #ifThenElseInstr | WHILE exprD DO instruction+ donewhile #whileInstr | SET exprG TO exprD #affectInstr | COMPUTE exprD #computeInstr | NEXT action #nextInstr; donewhile: DONE #insideDoneWhile; condblock: exprD #ifcondblock; truecondblock: instruction+ #iftruecondblock; elsecondblock: instruction+ #ifelsecondblock; action: MOVE (NORTH | SOUTH | EAST | WEST) #actionMove | SHOOT (NORTH | SOUTH | EAST | WEST) #actionShoot | USE (MAP|RADIO| RADAR|FRUITS|SODA) #actionUse | DO NOTHING #actionDoNothing; fctdecl: ID AS FUNCTION LPAR (vardecl( COMMA vardecl)*)? RPAR DOUBLEPOINT (SCALAR|VOID) (DECLARE LOCAL (vardecl POINTVIRGULE)+)? DO(instruction)+ fdeclreturn DONE #fctdeclInstr; fdeclreturn: RETURN(exprD|VOID) #fctdeclreturn; impdecl: IMPORT filedecl #importInstr; filedecl: filename EXTWLD; filename: ID;
base/mvdm/dos/v86/cmd/debug/debcom3.asm
npocmaka/Windows-Server-2003
17
176305
<filename>base/mvdm/dos/v86/cmd/debug/debcom3.asm PAGE 80,132 ; TITLE DEBCOM3.ASM - PART3 DEBUGGER COMMANDS ;/* ; * Microsoft Confidential ; * Copyright (C) Microsoft Corporation 1991 ; * All Rights Reserved. ; */ ; ROUTINES TO PERFORM DEBUGGER COMMANDS IF1 %OUT COMPONENT=DEBUG, MODULE=DEBCOM3 ENDIF .XLIST .XCREF include mi.inc ; cas -- missing equates include version.inc ; cas -- missing equates include syscall.inc ; cas -- missing equates INCLUDE DOSSYM.INC INCLUDE debug.inc INCLUDE DPL.ASM .CREF .LIST CODE SEGMENT PUBLIC BYTE CODE ENDS CONST SEGMENT PUBLIC BYTE EXTRN USER_PROC_PDB:WORD,RSTACK:WORD,STACK:BYTE EXTRN DSSAVE:WORD,CSSAVE:WORD,IPSAVE:WORD,axSAVE:WORD,dxSAVE:WORD EXTRN SSSAVE:WORD,SPSAVE:WORD,FLSAVE:WORD EXTRN NEXTCS:WORD,NEXTIP:WORD, RSETFLAG:BYTE CONST ENDS CSTACK SEGMENT STACK CSTACK ENDS DATA SEGMENT PUBLIC BYTE EXTRN BRKCNT:WORD,TCOUNT:WORD,SWITCHAR:BYTE,BPTAB:BYTE EXTRN BP_ERROR:BYTE,COMP_ARG1:WORD,COMP_ARG2:WORD,COMP_ARG3:WORD EXTRN COMP_ARG4:WORD,COMP_ARG5:WORD,COMP_ARG6:WORD,COMP_PTR:BYTE EXTRN ARG_BUF:BYTE,ARG_BUF_PTR:BYTE EXTRN FZTRACE:BYTE, SYNERR_PTR:BYTE EXTRN BEGSEG:WORD IF IBMVER EXTRN cpu_not_8088:byte EXTRN OLD_MASK:BYTE ENDIF EXTRN SAVESTATE:BYTE DATA ENDS DG GROUP CODE,CONST,CSTACK,DATA CODE SEGMENT PUBLIC BYTE ASSUME CS:DG,DS:DG,ES:DG,SS:DG PUBLIC COMPARE,INPUT,OUTPUT,GO PUBLIC TRACE,ZTRACE,SKIP_FILE EXTRN GETHEX:NEAR,GETEOL:NEAR,CRLF:NEAR,ERR:NEAR, PERR:NEAR EXTRN HEX:NEAR,DIGIT:NEAR,SCANP:NEAR,DISPREG:NEAR EXTRN COMMAND:NEAR,DABORT:NEAR,DELIM1:NEAR,DELIM2:NEAR EXTRN NMIINT:NEAR,NMIINTEND:NEAR,PRINTF_CRLF:NEAR EXTRN ADDRESS:NEAR,HEXIN:NEAR,DSRANGE:NEAR ; just like trace except skips OVER next INT or CALL. DEBCOM3: ZTRACE: MOV FZTRACE,-1 CALL SETADD CALL SCANP CALL HEXIN MOV DX,1 JC ZSTOCNT MOV CX,4 CALL GETHEX CALL CHECKNONE ZSTOCNT: MOV [TCOUNT],DX CALL GETEOL MOV DX,NEXTCS MOV CSSAVE,DX MOV DX,NEXTIP MOV IPSAVE,DX ZSTEP: MOV ES,[CSSAVE] ; point to instruction to execute MOV DI,[IPSAVE] ; include offset in segment XOR DX,DX ; where to place breakpoint get_opcode: MOV AL,ES:[DI] ; get the opcode cmp al,0f0h ; lock je is_override cmp al,26h ; es: je is_override cmp al,2eh ; cs: je is_override cmp al,36h ; ss: je is_override cmp al,3eh ; ds: jne not_override Is_override: ; inc dx ; this seemed to put us in an endless inc di ; loop, try this. jmp get_opcode Not_override: CMP AL,11101000B ; direct intra call JZ ZTRACE3 ; yes, 3 bytes CMP AL,10011010B ; direct inter call JZ ZTRACE5 ; yes, 5 bytes CMP AL,11111111B ; indirect? JZ ZTRACEMODRM ; yes, go figure length CMP AL,11001100B ; short interrupt? JZ ZTRACE1 ; yes, 1 byte CMP AL,11001101B ; long interrupt? JZ ZTRACE2 ; yes, 2 bytes CMP AL,11100010B ; loop JZ ZTRACE2 ; 2 byter CMP AL,11100001B ; loopz/loope JZ ZTRACE2 ; 2 byter CMP AL,11100000B ; loopnz/loopne JZ ZTRACE2 ; 2 byter AND AL,11111110B ; check for rep CMP AL,11110010B ; perhaps? JZ FOO1 JMP STEP ; can't do anything special, step FOO1: MOV AL,ES:[DI+1] ; next instruction AND AL,11111110B ; ignore w bit CMP AL,10100100B ; MOVS JZ ZTRACE2 ; two byte CMP AL,10100110B ; CMPS JZ ZTRACE2 ; two byte CMP AL,10101110B ; SCAS JZ ZTRACE2 ; two byte CMP AL,10101100B ; LODS JZ ZTRACE2 ; two byte CMP AL,10101010B ; STOS JZ ZTRACE2 ; two byte JMP short STEP ; bogus, do single step ZTRACEMODRM: MOV AL,ES:[DI+1] ; get next byte AND AL,11111000B ; get mod and type CMP AL,01010000B ; indirect intra 8 bit offset? JZ ZTRACE3 ; yes, three byte whammy CMP AL,01011000B ; indirect inter 8 bit offset JZ ZTRACE3 ; yes, three byte guy CMP AL,10010000B ; indirect intra 16 bit offset? JZ ZTRACE4 ; four byte offset CMP AL,10011000B ; indirect inter 16 bit offset? JZ ZTRACE4 ; four bytes CMP AL,11010000B ; indirect through reg? JZ ZTRACE2 ; two byte instruction JMP short STEP ; can't figger out what this is! ZTRACE5: INC DX ZTRACE4: INC DX ZTRACE3: INC DX ZTRACE2: INC DX ZTRACE1: INC DX ADD DI,DX ; offset to breakpoint instruction MOV WORD PTR [BPTAB],DI ; save offset MOV WORD PTR [BPTAB+2],ES ; save segment MOV AL,ES:[DI] ; get next opcode byte MOV BYTE PTR [BPTAB+4],AL ; save it MOV BYTE PTR ES:[DI],0CCH ; break point it MOV [BRKCNT],1 ; only this breakpoint JMP DEXIT ; start the operation! ; Trace 1 instruction or the number of instruction specified ; by the parameter using 8086 trace mode. Registers are all ; set according to values in save area TRACE: MOV FZTRACE,0 CALL SETADD CALL SCANP CALL HEXIN MOV DX,1 JC STOCNT MOV CX,4 CALL GETHEX CALL CHECKNONE STOCNT: MOV [TCOUNT],DX CALL GETEOL MOV DX,NEXTCS MOV CSSAVE,DX MOV DX,NEXTIP MOV IPSAVE,DX STEP: MOV [BRKCNT],0 ; The 286 has a problem with trace mode and software interrupt instructions; ; it treats them as atomic operations. We simulate the operation in software. MOV ES,[CSSAVE] ; Get next instruction pointer MOV DI,[IPSAVE] MOV AL,ES:[DI] ; get next opcode cmp al,0e4h ; check for 'IN' opcode jne not_inal_op cmp es:byte ptr[di+1],21h jne not_mask_op add [ipsave],2 JMP short SETalmask not_inal_op: cmp al,0ech ; in al,DX ? jne not_mask_op cmp dxsave,21h jne not_mask_op add [ipsave],1 SETalmask: mov ax,[axsave] in al,21h mov [axsave],ax JMP SETENVIRON not_mask_op: CMP AL,0CDH ; trace over an interrupt? JZ DOINT ; no, check for other special cases CMP AL,0CEH ; how about int overflow JNZ CHECKCC TEST FLSAVE,F_OVERFLOW ; see it overflow is present JZ CHECKOP MOV BX,4 ; INTO = INT 4 DEC IPSAVE ; INTO is a singel byte JMP SHORT DOVAL CHECKCC: CMP AL,0CCH JNZ CHECKOP MOV BX,3 ; INT 3 = CC DEC IPSAVE JMP SHORT DOVAL DOINT: ; We have a software interrupt. Get destination vector MOV BL,BYTE PTR ES:[DI+1] ; get vector number XOR BH,BH ; clear out upper DOVAL: SHL BX,1 ; word index SHL BX,1 ; dword index XOR DI,DI ; interrupt table MOV ES,DI MOV AX,ES:[BX] ; point to vector MOV BX,ES:[BX+2] ; point to vector ; AX:BX is the vector. Swap it with currect CS:IP XCHG AX,IPSAVE ; new CS:IP XCHG BX,CSSAVE ; AX:BX is old CS:IP. We 'PUSH' flags, oldCS and oldIP, reset flags (ifl) and ; set CS:IP to point to interrupt instruction. MOV ES,SSSAVE ; point to user stack MOV DI,SPSAVE ; Take old flags and PUSH the flags. MOV CX,FLSAVE ; get flags SUB DI,2 ; PUSHF MOV ES:[DI],CX ; rest of push ; Push the old CS SUB DI,2 ; PUSH CS MOV ES:[DI],BX ; rest of push ; Push the old IP SUB DI,2 ; PUSH IP ADD AX,2 ; increment IP MOV ES:[DI],AX ; rest of push ; Update stack MOV SPSAVE,DI ; store ; Take flags and turn interrupts off and trace mode off AND CX,NOT F_INTERRUPT ; CLI AND CX,NOT F_TRACE ; no trace MOV FLSAVE,CX ; rest of CLI ; Set up correct process and go to normal reentry code. IF NOT SYSVER MOV BX,[USER_PROC_PDB] MOV AH,SET_CURRENT_PDB INT 21H ENDIF JMP SETENVIRON ; We need to special case the following instructions that may push a TRACE bit ; on the stack: PUSHF (9C) ; Save the opcode in A Special place CHECKOP: MOV RSETFLAG,AL ; no bits to turn off SETTRACE: OR FLSAVE,F_TRACE ; Turn on trace bit IF IBMVER ; ; the following stuff can be inhibited on 286/386/etc CPUs. The ; designers of the later chips added logic to enhance trace ; mode operation. The reason why we just don't run it all of ; the time is that it can cause a system crash if the instruction ; being traced causes an overflow condition because nobody will ; turn interrupts back on. test cpu_not_8088,1 ; see if 8088/8086 jnz no_fix_8088 CLI IN AL,MASK_PORT ; Get current mask JMP SHORT FOO FOO: MOV [OLD_MASK],AL ; Save it MOV AL,INT_MASK ; New mask OUT MASK_PORT,AL ; Set it STI no_fix_8088: ENDIF DEXIT: IF NOT SYSVER MOV BX,[USER_PROC_PDB] MOV AH,SET_CURRENT_PDB INT 21H ENDIF ; Unfortunately, any system call we issue will muck with the current extended ; errors. Here we must restore the extended error state so that if the user ; program gets it, we do not interfere. MOV AX,(SERVERCALL SHL 8) + 10 MOV DX,OFFSET DG:SAVESTATE INT 21H PUSH DS XOR AX,AX MOV DS,AX MOV WORD PTR DS:[12],OFFSET DG:BREAKFIX ; Set vector 3--breakpoint instruction MOV WORD PTR DS:[14],CS MOV WORD PTR DS:[4],OFFSET DG:REENTER ; Set vector 1--Single step MOV WORD PTR DS:[6],CS CLI IF SETCNTC MOV WORD PTR DS:[8CH],OFFSET DG:CONTC ; Set vector 23H (CTRL-C) MOV WORD PTR DS:[8EH],CS ENDIF POP DS MOV SP,OFFSET DG:STACK POP AX POP BX POP CX POP DX POP BP POP BP POP SI POP DI POP ES POP ES POP SS MOV SP,[SPSAVE] PUSH [FLSAVE] PUSH [CSSAVE] PUSH [IPSAVE] MOV DS,[DSSAVE] IRET STEP1: CALL CRLF CALL DISPREG TEST FZTRACE,-1 JNZ STEPZ JMP STEP STEPZ: JMP ZSTEP ; Re-entry point from CTRL-C. Top of stack has address in 86-DOS for ; continuing, so we must pop that off. CONTC: ADD SP,6 JMP SHORT REENTERREAL ; Re-entry point from breakpoint. Need to decrement instruction ; pointer so it points to location where breakpoint actually ; occured. BREAKFIX: PUSH BP MOV BP,SP DEC WORD PTR [BP].OLDIP POP BP JMP short REENTERREAL ; Re-entry point from trace mode or interrupt during execution. All registers ; are saved so they can be displayed or modified. INTERRUPT_FRAME STRUC OLDBP DW ? OLDIP DW ? OLDCS DW ? OLDF DW ? OLDERIP DW ? OLDERCS DW ? OLDERF DW ? INTERRUPT_FRAME ENDS ASSUME CS:DG,DS:NOTHING,ES:NOTHING,SS:NOTHING ; ReEnter is the main entry point for breakpoint interrupts and for trace mode ; interrupts. We treat both of these cases identically: save state, display ; registers and go for another command. If we get NMI's, we skip them or if ; it turns out that we are debugging ourselves, we skip them. ; Due to bogosities in the 808x chip, Consider tracing over an interrupt and ; then setting a breakpoint to where the interrupt returns. You get the INT 3 ; and then trace mode gets invoked! This is why we ignore interrupts within ; ourselves. REENTER: PUSH BP MOV BP,SP ; get a frame to address from PUSH AX ; MOV AX,CS ; CMP AX,[BP].OLDCS ; Did we interrupt ourselves? ; JNZ GOREENTER ; no, go reenter IF IBMJAPAN MOV AX,[BP].OLDIP CMP AX,OFFSET DG:NMIINT ; interrupt below NMI interrupt? JB GOREENTER ; yes, go reenter CMP [BP].OLDIP,OFFSET DG:NMIINTEND JAE GOREENTER ; interrupt above NMI interrupt? POP AX ; restore state POP BP SUB SP,6 ; switch TRACE and NMI stack frames PUSH BP MOV BP,SP ; set up frame PUSH AX ; get temp variable MOV AX,[BP].OLDERIP ; get NMI Vector MOV [BP].OLDIP,AX ; stuff in new NMI vector MOV AX,[BP].OLDERCS ; get NMI Vector MOV [BP].OLDCS,AX ; stuff in new NMI vector MOV AX,[BP].OLDERF ; get NMI Vector AND AH,0FEH ; turn off Trace if present MOV [BP].OLDF,AX ; stuff in new NMI vector MOV [BP].OLDERF,AX MOV [BP].OLDERIP,OFFSET DG:REENTER ; offset of routine MOV [BP].OLDERCS,CS ; and CS POP AX POP BP IRET ; go try again ENDIF GOREENTER: IF IBMVER test cpu_not_8088,1 jnz no_restore_pic_mask MOV AL,CS:[OLD_MASK] ; Recover Old mask OUT MASK_PORT,AL ; Restore it no_restore_pic_mask: ENDIF MOV AL,CS:[RSETFLAG] ; Determine, based on the previous instruction, what we are supposed to do ; to flags on the users stack. CMP AL,09CH ; PUSHF JNZ NOFIX ; OlderIP = flags. Turn off trace bit AND [BP].OLDERIP,NOT F_TRACE NOFIX: POP AX POP BP REENTERREAL: MOV CS:[SPSAVE+SEGDIF],SP MOV CS:[SSSAVE+SEGDIF],SS MOV CS:[FLSAVE],CS MOV SS,CS:[FLSAVE] MOV SP,OFFSET DG:RSTACK ASSUME SS:DG PUSH ES PUSH DS PUSH DI PUSH SI PUSH BP DEC SP DEC SP PUSH DX PUSH CX PUSH BX PUSH AX PUSH SS POP DS ASSUME DS:DG MOV SS,[SSSAVE] MOV SP,[SPSAVE] ASSUME SS:NOTHING POP [IPSAVE] POP [CSSAVE] POP AX AND AX,NOT F_TRACE ; TURN OFf trace mode bit MOV [FLSAVE],AX MOV [SPSAVE],SP SETENVIRON: PUSH DS POP ES ASSUME ES:DG PUSH DS POP SS ASSUME SS:DG MOV SP,OFFSET DG:STACK PUSH DS XOR AX,AX MOV DS,AX ASSUME DS:NOTHING IF SETCNTC MOV WORD PTR DS:[8CH],OFFSET DG:DABORT ; Set Ctrl-C vector MOV WORD PTR DS:[8EH],CS ENDIF POP DS ASSUME DS:DG STI CLD ; Since we are about to issue system calls, let's grab the current user's ; extended error info. MOV AH,GETEXTENDEDERROR INT 21H ASSUME DS:NOTHING,ES:NOTHING MOV SAVESTATE.DPL_AX,AX MOV SAVESTATE.DPL_BX,BX MOV SAVESTATE.DPL_CX,CX MOV SAVESTATE.DPL_DX,DX MOV SAVESTATE.DPL_SI,SI MOV SAVESTATE.DPL_DI,DI MOV SAVESTATE.DPL_DS,DS MOV SAVESTATE.DPL_ES,ES MOV AX,CS MOV DS,AX MOV ES,AX ASSUME DS:DG,ES:DG IF NOT SYSVER MOV AH,GET_CURRENT_PDB INT 21H MOV [USER_PROC_PDB],BX MOV BX,BEGSEG MOV AH,SET_CURRENT_PDB INT 21H ENDIF MOV SI,OFFSET DG:BPTAB MOV CX,[BRKCNT] JCXZ SHOREG PUSH ES CLEARBP: LES DI,DWORD PTR [SI] ADD SI,4 MOVSB LOOP CLEARBP POP ES SHOREG: DEC [TCOUNT] JZ CHECKDISP JMP STEP1 CHECKDISP: CALL CRLF CALL DISPREG JMP COMMAND ; Input from the specified port and display result INPUT: MOV CX,4 ; Port may have 4 digits CALL GETHEX ; Get port number in DX CALL GETEOL IN AL,DX ; Variable port input PUSH CS POP ES MOV DI,OFFSET DG:ARG_BUF CALL HEX ; And display XOR AL,AL STOSB MOV DX,OFFSET DG:ARG_BUF_PTR JMP PRINTF_CRLF ; Output a value to specified port. OUTPUT: MOV CX,4 ; Port may have 4 digits CALL GETHEX ; Get port number PUSH DX ; Save while we get data MOV CX,2 ; Byte output only CALL GETHEX ; Get data to output CALL GETEOL XCHG AX,DX ; Output data in AL POP DX ; Port in DX OUT DX,AL ; Variable port output RETURN SETADD: MOV DX,CSSAVE ; set up start addresses MOV NEXTCS,DX MOV DX,IPSAVE MOV NEXTIP,DX MOV BP,[CSSAVE] CALL SCANP CMP BYTE PTR [SI],"=" RETNZ INC SI CALL ADDRESS MOV NEXTCS,AX MOV NEXTIP,DX RETURN ; Jump to program, setting up registers according to the ; save area. up to 10 breakpoint addresses may be specified. GO: MOV RSETFLAG,0 CALL SETADD XOR BX,BX MOV DI,OFFSET DG:BPTAB GO1: CALL SCANP JZ DEXEC MOV BP,[CSSAVE] PUSH DI PUSH BX ;AN000; DMS;SAVE BX - ADDRESS KILLS IT CALL ADDRESS POP BX ;AN000; DMS;RESTORE BX POP DI MOV [DI],DX ; Save offset MOV [DI+2],AX ; Save segment ADD DI,5 ; Leave a little room INC BX CMP BX,1+BPMAX JNZ GO1 MOV DX,OFFSET DG:BP_ERROR ; BP ERROR JMP ERR DEXEC: MOV [BRKCNT],BX MOV CX,BX JCXZ NOBP MOV DI,OFFSET DG:BPTAB PUSH DS SETBP: LDS SI,ES:DWORD PTR [DI] ADD DI,4 MOVSB MOV BYTE PTR [SI-1],0CCH LOOP SETBP POP DS NOBP: MOV DX,NEXTCS MOV CSSAVE,DX MOV DX,NEXTIP MOV IPSAVE,DX MOV [TCOUNT],1 JMP DEXIT SKIP_FILE: MOV AH,CHAR_OPER XOR AL,AL ; Get switch char subfunction INT 21H MOV CS:[SWITCHAR],DL ; GET THE CURRENT SWITCH CHARACTER FIND_DELIM: LODSB CALL DELIM1 JZ GOTDELIM CALL DELIM2 JNZ FIND_DELIM GOTDELIM: DEC SI RETURN COMPARE: CALL DSRANGE PUSH CX PUSH AX PUSH DX CALL ADDRESS ; Same segment CALL GETEOL POP SI MOV DI,DX MOV ES,AX POP DS POP CX ; Length DEC CX CALL COMP ; Do one less than total INC CX ; CX=1 (do last one) COMP: REPE CMPSB RETZ ; Compare error. Print address, value; value, address. DEC SI MOV CS:COMP_ARG1,DS MOV CS:COMP_ARG2,SI XOR AH,AH LODSB MOV CS:COMP_ARG3,AX DEC DI MOV AL,ES:[DI] MOV CS:COMP_ARG4,AX MOV CS:COMP_ARG5,ES MOV CS:COMP_ARG6,DI INC DI PUSH DS PUSH CS POP DS MOV DX,OFFSET DG:COMP_PTR CALL PRINTF_CRLF POP DS XOR AL,AL JMP SHORT COMP PROCEDURE CHECKNONE,NEAR OR DX,DX RETNZ MOV DX,OFFSET DG:SYNERR_PTR ; ERROR MESSAGE JMP PERR ENDPROC CHECKNONE CODE ENDS END DEBCOM3 
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_5.asm
ljhsiun2/medusa
9
81168
<reponame>ljhsiun2/medusa<filename>Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_5.asm .global s_prepare_buffers s_prepare_buffers: push %r11 push %r14 push %r8 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_WC_ht+0x1bda2, %rsi lea addresses_UC_ht+0x56c2, %rdi nop nop nop nop nop dec %rbx mov $90, %rcx rep movsl nop nop nop nop nop xor $38057, %rcx lea addresses_UC_ht+0x1d0a2, %r11 nop nop nop nop nop sub %r14, %r14 mov $0x6162636465666768, %rdi movq %rdi, %xmm4 and $0xffffffffffffffc0, %r11 vmovaps %ymm4, (%r11) nop nop nop nop nop add %rbx, %rbx lea addresses_A_ht+0x12aa2, %r11 nop nop nop nop nop and %rdx, %rdx movw $0x6162, (%r11) nop nop xor $63332, %rdx lea addresses_D_ht+0x199e2, %rsi nop add $1922, %r11 movb $0x61, (%rsi) nop nop nop inc %r11 lea addresses_WT_ht+0x1579c, %rbx nop nop and $12212, %r11 movb $0x61, (%rbx) nop dec %rcx lea addresses_WT_ht+0x1b6a2, %rdi nop nop nop add $23040, %r11 movl $0x61626364, (%rdi) add $28285, %rdi lea addresses_normal_ht+0x1b0a2, %rsi lea addresses_WT_ht+0xcc52, %rdi nop nop inc %r8 mov $113, %rcx rep movsb nop sub %rsi, %rsi lea addresses_A_ht+0x1b3a2, %rsi and %rcx, %rcx mov (%rsi), %rbx nop and %rcx, %rcx lea addresses_UC_ht+0x10ea2, %rsi lea addresses_WC_ht+0x7ca2, %rdi nop nop nop add %r11, %r11 mov $73, %rcx rep movsq nop nop nop nop inc %rdx lea addresses_WC_ht+0xf6a2, %r14 clflush (%r14) nop nop cmp $4021, %rcx movb (%r14), %r11b add $24704, %rbx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r8 pop %r14 pop %r11 ret .global s_faulty_load s_faulty_load: push %r15 push %r8 push %rbp push %rbx push %rcx push %rdi push %rsi // Store lea addresses_UC+0x3a42, %rbx nop cmp $64040, %rsi movw $0x5152, (%rbx) nop mfence // REPMOV lea addresses_D+0x138c0, %rsi lea addresses_D+0xcda2, %rdi nop nop nop nop nop xor %r8, %r8 mov $65, %rcx rep movsl nop nop nop xor $33075, %rcx // Faulty Load lea addresses_PSE+0x136a2, %r8 nop add $26389, %rbp vmovups (%r8), %ymm7 vextracti128 $0, %ymm7, %xmm7 vpextrq $1, %xmm7, %rbx lea oracles, %r8 and $0xff, %rbx shlq $12, %rbx mov (%r8,%rbx,1), %rbx pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %r8 pop %r15 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 0, 'type': 'addresses_D'}, 'dst': {'same': False, 'congruent': 8, 'type': 'addresses_D'}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_UC_ht'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': True, 'AVXalign': True, 'size': 32, 'congruent': 7}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 10}} {'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_D_ht', 'NT': True, 'AVXalign': True, 'size': 1, 'congruent': 6}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 1}} {'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 8}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 7, 'type': 'addresses_normal_ht'}, 'dst': {'same': False, 'congruent': 1, 'type': 'addresses_WT_ht'}} {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 5}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 11, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 7, 'type': 'addresses_WC_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 10}} {'33': 21829} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
oeis/002/A002580.asm
neoneye/loda-programs
11
95928
; A002580: Decimal expansion of cube root of 2. ; Submitted by <NAME> ; 1,2,5,9,9,2,1,0,4,9,8,9,4,8,7,3,1,6,4,7,6,7,2,1,0,6,0,7,2,7,8,2,2,8,3,5,0,5,7,0,2,5,1,4,6,4,7,0,1,5,0,7,9,8,0,0,8,1,9,7,5,1,1,2,1,5,5,2,9,9,6,7,6,5,1,3,9,5,9,4,8,3,7,2,9,3,9,6,5,6,2,4,3,6,2,5,5,0,9,4 mov $3,$0 mul $3,3 lpb $3 add $1,728 add $2,$6 add $1,$2 add $2,$1 add $6,$1 mul $1,2 sub $3,1 add $5,$2 lpe mov $1,$5 add $2,10 mov $4,10 pow $4,$0 div $2,$4 div $1,$2 mov $0,$1 add $0,$4 mod $0,10
tots.asm
TheSos/dos256
0
165998
<filename>tots.asm<gh_stars>0 Dism /online /enable-feature /featurename:NetFx3 /All /Source:e:\sources\sxs /LimitAccess
source/libgela/gela-source_buffers-portable.adb
faelys/gela-asis
4
30392
------------------------------------------------------------------------------ -- <NAME> A S I S -- -- ASIS implementation for Gela project, a portable Ada compiler -- -- http://gela.ada-ru.org -- -- - - - - - - - - - - - - - - - -- -- Read copyright and license at the end of this file -- ------------------------------------------------------------------------------ -- $Revision: 209 $ $Date: 2013-11-30 21:03:24 +0200 (Сб., 30 нояб. 2013) $ with Ada.Streams.Stream_IO; with Ada.Unchecked_Conversion; with Ada.Unchecked_Deallocation; package body Gela.Source_Buffers.Portable is type Stream_Element_Access is access all Ada.Streams.Stream_Element; function Convert is new Ada.Unchecked_Conversion (Stream_Element_Access, Cursor); ---------- -- Open -- ---------- procedure Open (Object : in out Source_Buffer; File_Name : in String) is use Ada.Streams; use Ada.Streams.Stream_IO; subtype IO_Count is Ada.Streams.Stream_IO.Count; Input : File_Type; File_Size : IO_Count; Upper : Stream_Element_Offset; Last : Stream_Element_Offset; End_Of_File : constant Stream_Element := Stream_Element'Val (Code_Unit'Pos (Source_Buffers.End_Of_File)); begin Open (Input, In_File, File_Name); File_Size := Size (Input); -- Reserve a few bytes for End_Of_File marker. Upper := Stream_Element_Offset (File_Size + 2); Object.Internal_Array := new Stream_Element_Array (1 .. Upper); Read (Input, Object.Internal_Array.all, Last); Object.Internal_Array (Last + 1 .. Upper) := (others => End_Of_File); Close (Input); end Open; ----------- -- Close -- ----------- procedure Close (Object : in out Source_Buffer) is procedure Deallocate is new Ada.Unchecked_Deallocation (Ada.Streams.Stream_Element_Array, Array_Access); begin Deallocate (Object.Internal_Array); end Close; ------------------ -- Buffer_Start -- ------------------ function Buffer_Start (Object : Source_Buffer) return Cursor is begin return Convert (Object.Internal_Array (1)'Access); end Buffer_Start; end Gela.Source_Buffers.Portable; ------------------------------------------------------------------------------ -- Copyright (c) 2008, <NAME> -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- * Redistributions of source code must retain the above copyright notice, -- this list of conditions and the following disclaimer. -- * Redistributions in binary form must reproduce the above copyright -- notice, this list of conditions and the following disclaimer in the -- documentation and/or other materials provided with the distribution. -- * Neither the name of the Maxim Reznik, IE nor the names of its -- contributors may be used to endorse or promote products derived from -- this software without specific prior written permission. -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -- POSSIBILITY OF SUCH DAMAGE. -- -- Authors: -- <NAME> -- <NAME> -- <NAME> ------------------------------------------------------------------------------
oeis/000/A000295.asm
neoneye/loda-programs
11
28838
<filename>oeis/000/A000295.asm ; A000295: Eulerian numbers (Euler's triangle: column k=2 of A008292, column k=1 of A173018). ; 0,0,1,4,11,26,57,120,247,502,1013,2036,4083,8178,16369,32752,65519,131054,262125,524268,1048555,2097130,4194281,8388584,16777191,33554406,67108837,134217700,268435427,536870882,1073741793,2147483616,4294967263,8589934558,17179869149,34359738332,68719476699,137438953434,274877906905,549755813848,1099511627735,2199023255510,4398046511061,8796093022164,17592186044371,35184372088786,70368744177617,140737488355280,281474976710607,562949953421262,1125899906842573,2251799813685196,4503599627370443 mov $1,2 pow $1,$0 sub $1,$0 sub $1,1 mov $0,$1
main/Coequalizers/EdgeCoproduct.agda
awswan/nielsenschreier-hott
0
8154
{-# OPTIONS --without-K --exact-split --rewriting #-} open import Coequalizers.Definition open import lib.Basics open import lib.types.Paths open import Graphs.Definition module Coequalizers.EdgeCoproduct where module CoeqCoprodEquiv {i j k : ULevel} (V : Type i) (E₁ : Type j) (E₂ : Type k) ⦃ gph : Graph (E₁ ⊔ E₂) V ⦄ where instance gph1 : Graph E₁ V gph1 = record { π₀ = (Graph.π₀ gph) ∘ inl ; π₁ = (Graph.π₁ gph) ∘ inl } instance gph2 : Graph E₂ (V / E₁) gph2 = record { π₀ = c[_] ∘ (Graph.π₀ gph) ∘ inr ; π₁ = c[_] ∘ (Graph.π₁ gph) ∘ inr } edge-coproduct-expand : (V / (E₁ ⊔ E₂)) ≃ ((V / E₁) / E₂) edge-coproduct-expand = equiv f g f-g g-f where f : V / (E₁ ⊔ E₂) → (V / E₁) / E₂ f = Coeq-rec (c[_] ∘ c[_]) λ { (inl x) → ap c[_] (quot x) ; (inr x) → quot x} g : (V / E₁) / E₂ → V / (E₁ ⊔ E₂) g = Coeq-rec (Coeq-rec c[_] (λ e → quot (inl e))) (λ e → quot (inr e)) f-g : (x : (V / E₁) / E₂) → (f (g x) == x) f-g = Coeq-elim (λ x' → f (g x') == x') (Coeq-elim (λ x' → f (g (c[ x' ])) == c[ x' ]) (λ v → idp) (λ e → ↓-='-in (lemma1 e))) λ e → ↓-app=idf-in $ idp ∙' quot e =⟨ ∙'-unit-l _ ⟩ quot e =⟨ ! (Coeq-rec-β= _ _ _) ⟩ ap f (quot (inr e)) =⟨ ap (ap f) (! (Coeq-rec-β= _ _ _)) ⟩ ap f (ap g (quot e)) =⟨ ! (ap-∘ f g (quot e)) ⟩ ap (f ∘ g) (quot e) =⟨ ! (∙-unit-r _) ⟩ ap (f ∘ g) (quot e) ∙ idp =∎ where lemma1 : (e : E₁) → idp ∙' ap (λ z → c[ z ]) (quot e) == ap (λ z → f (g c[ z ])) (quot e) ∙ idp lemma1 e = idp ∙' ap c[_] (quot e) =⟨ ∙'-unit-l _ ⟩ ap c[_] (quot e) =⟨ ! (Coeq-rec-β= _ _ _) ⟩ ap f (quot (inl e)) =⟨ ap (ap f) (! (Coeq-rec-β= _ _ _)) ⟩ ap f (ap (Coeq-rec c[_] (λ e → quot (inl e))) (quot e)) =⟨ idp ⟩ ap f (ap (g ∘ c[_]) (quot e)) =⟨ ! (ap-∘ f (g ∘ c[_]) (quot e)) ⟩ ap (f ∘ g ∘ c[_]) (quot e) =⟨ ! (∙-unit-r _) ⟩ ap (f ∘ g ∘ c[_]) (quot e) ∙ idp =∎ g-f : (x : V / (E₁ ⊔ E₂)) → (g (f x) == x) g-f = Coeq-elim (λ x → g (f x) == x) (λ v → idp) (λ { (inl e) → ↓-app=idf-in (! (lemma1 e)) ; (inr e) → ↓-app=idf-in (! (lemma2 e))}) where lemma1 : (e : E₁) → ap (λ z → g (f z)) (quot (inl e)) ∙ idp == idp ∙' quot (inl e) lemma1 e = ap (g ∘ f) (quot (inl e)) ∙ idp =⟨ ∙-unit-r _ ⟩ ap (g ∘ f) (quot (inl e)) =⟨ ap-∘ g f (quot (inl e)) ⟩ ap g (ap f (quot (inl e))) =⟨ ap (ap g) (Coeq-rec-β= _ _ _) ⟩ ap g (ap c[_] (quot e)) =⟨ ! (ap-∘ g c[_] (quot e)) ⟩ ap (g ∘ c[_]) (quot e) =⟨ idp ⟩ ap (Coeq-rec c[_] (λ e' → quot (inl e'))) (quot e) =⟨ Coeq-rec-β= _ _ _ ⟩ quot (inl e) =⟨ ! (∙'-unit-l _) ⟩ idp ∙' quot (inl e) =∎ lemma2 : (e : E₂) → ap (λ z → g (f z)) (quot (inr e)) ∙ idp == idp ∙' quot (inr e) lemma2 e = ap (g ∘ f) (quot (inr e)) ∙ idp =⟨ ∙-unit-r _ ⟩ ap (g ∘ f) (quot (inr e)) =⟨ ap-∘ g f (quot (inr e)) ⟩ ap g (ap f (quot (inr e))) =⟨ ap (ap g) (Coeq-rec-β= _ _ _) ⟩ ap g (quot e) =⟨ Coeq-rec-β= _ _ _ ⟩ quot (inr e) =⟨ ! (∙'-unit-l _) ⟩ idp ∙' quot (inr e) =∎
main.adb
vfinotti/cortex-m0-blinky-ada
0
27236
<reponame>vfinotti/cortex-m0-blinky-ada<filename>main.adb ------------------------------------------------------------------------------- -- Title : Blinky example for Cortex-M0 -- -- File : main.adb -- Author : <NAME> -- Created on : 2019-04-24 19:46:32 -- Description : -- -- -- ------------------------------------------------------------------------------- pragma Restrictions (No_Exceptions); -- avoid __gnat_last_chance_handler being used package body Main is procedure Run is -- Period : constant Integer := 1000000; -- Synthesis period Period : constant Integer := 200; -- Simulation period type Period_Range is range 0 .. Period; type Uint32 is mod 2**32; Led_Toggle : constant := 16#f0f0f0f0#; Counter : Integer := 0; Dummy : Uint32 := 0; begin loop Counter := 0; for I in Period_Range loop Counter := Counter + 1; end loop; Dummy := Led_Toggle; Dummy := Dummy + 1; -- force toggle parameter to change end loop; end Run; end Main;
paste_single_item.applescript
teake/pasterrr
3
895
<filename>paste_single_item.applescript use AppleScript version "2.4" -- The ability to use ASObjC in running scripts was introduced in Mac OS 10.10. use framework "Foundation" use framework "AppKit" -- NSEvent is an AppKit class. use scripting additions on run argv set theQuery to item 1 of argv set paragraphList to paragraphs of theQuery set paragraphCount to count of paragraphList repeat with i from 1 to paragraphCount repeat with char in characters of item i of paragraphList my keystrokeWithDelay(char) end repeat if i is not paragraphCount then my keystrokeWithDelay(return) end if end repeat end run on keystrokeWithDelay(char) if my isModifierKeyDown() then error "Aborted because modifier key press detected." number -128 end if tell application "System Events" keystroke char end tell set delayAverage to (system attribute "delay_average") as number set delayVariation to (system attribute "delay_variation") as number delay (delayAverage + (random number from 0.0 to delayVariation) - (delayVariation / 2)) end keystrokeWithDelay on isModifierKeyDown() set mf to current application's class "NSEvent"'s modifierFlags() return (mf div 524288 mod 2 is 1) or (mf div 1048576 mod 2 is 1) or (mf div 131072 mod 2 is 1) or (mf div 262144 mod 2 is 1) end isModifierKeyDown
oeis/232/A232713.asm
neoneye/loda-programs
11
103466
; A232713: Doubly pentagonal numbers: a(n) = n*(3*n-2)*(3*n-1)*(3*n+1)/8. ; 0,1,35,210,715,1820,3876,7315,12650,20475,31465,46376,66045,91390,123410,163185,211876,270725,341055,424270,521855,635376,766480,916895,1088430,1282975,1502501,1749060,2024785,2331890,2672670,3049501,3464840,3921225,4421275,4967690,5563251,6210820,6913340,7673835,8495410,9381251,10334625,11358880,12457445,13633830,14891626,16234505,17666220,19190605,20811575,22533126,24359335,26294360,28342440,30507895,32795126,35208615,37752925,40432700,43252665,46217626,49332470,52602165,56031760,59626385 mul $0,3 add $0,1 bin $0,4
agda/implication.agda
anqurvanillapy/fpl
1
15556
data ⊥ : Set where p0 : Set → Set p0 A = A p1 : ⊥ → Set p1 () p2 : ⊥ → ⊥ p2 () p3 : Set → ⊥ p3 = ?
src/string/string_append/test/_start.asm
nikAizuddin/lib80386
4
89642
<reponame>nikAizuddin/lib80386 ; 1 2 3 4 5 6 7 ;234567890123456789012345678901234567890123456789012345678901234567890 ;===================================================================== ; ; *** TEST *** ; ;--------------------------------------------------------------------- ; ; AUTHOR: <NAME> <NAME> ; DATE CREATED: 26-DEC-2014 ; ; TEST PURPOSE: Make sure the string_append have no errors. ; ; LANGUAGE: x86 Assembly Language ; SYNTAX: Intel ; ASSEMBLER: NASM ; ARCHITECTURE: i386 ; KERNEL: Linux 32-bit ; FORMAT: elf32 ; ; EXTERNAL FILES: string_append.asm ; ;--------------------------------------------------------------------- ; ; TERM ABBREVIATIONS USED IN THIS SOURCE CODE: ; ; ==================================================== ; Term | Abbreviation ; ---------------------------------------------------- ; src | source. ; dst | destination. ; strlen | string length. ; t0001 | test 0001. ; s01 | string 01. ; beg | begin. ; outstr | output string. ; t0001_s04_beg | begin of test 0001 string 04. ; ==================================================== ; ;===================================================================== extern string_append global _start section .bss t0001_outstr: resd 192 t0001_outlen: resd 1 section .data t0001_s01_beg: db \ "For humans, written communication is crucial.",\ 0x0a,\ "Unfortunately, computers were not specifically",\ 0x0a,\ "designed for ease of communication with",\ 0x0a,\ "humans. Most high-level languages provide",\ 0x0a,\ "specific functions for helping programmers",\ 0x0a,\ "write programs to interact with humans.",\ 0x0a, 0x0a t0001_s01_end: t0001_s02_beg: db \ "As an assembly language programmer, you do not",\ 0x0a,\ "have the luxury of these functions. It is up",\ 0x0a,\ "to you to code your programs to interact with",\ 0x0a,\ "humans in their own language.",\ 0x0a, 0x0a t0001_s02_end: t0001_s03_beg: db \ "The use of strings helps programs communicate",\ 0x0a,\ "with humans in their own language. While using",\ 0x0a,\ "strings is not a simple matter in assembly",\ 0x0a,\ "language programming, it is not impossible.",\ 0x0a, 0x0a t0001_s03_end: t0001_s04_beg: db \ "~Professional Assembly Language,",\ 0x0a,\ " by <NAME>. Page 273",\ 0x0a, 0x0a t0001_s04_end: section .text _start: ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; *** TEST 0001 begin *** ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; append t0001_s01_beg to t0001_outstr. ; ; string_append( @t0001_outstr, ; @t0001_outlen, ; @t0001_s01_beg, ; @t0001_s01_end - @t0001_s01_beg ); ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - sub esp, 16 ;reserve 16 bytes mov eax, t0001_outstr ;get addr dst string mov ebx, t0001_outlen ;get addr dst strlen mov ecx, t0001_s01_beg ;get addr src string mov edx, (t0001_s01_end - t0001_s01_beg) ;get src strlen mov [esp ], eax ;arg1: addr dst string mov [esp + 4], ebx ;arg2: addr dst strlen mov [esp + 8], ecx ;arg3: addr src string mov [esp + 12], edx ;arg4: src strlen call string_append add esp, 16 ;restore 16 bytes ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; append t0001_s02_beg to t0001_outstr. ; ; string_append( @t0001_outstr, ; @t0001_outlen, ; @t0001_s02_beg, ; @t0001_s02_end - @t0001_s02_beg ); ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - sub esp, 16 ;reserve 16 bytes mov eax, t0001_outstr ;get addr dst string mov ebx, t0001_outlen ;get addr dst strlen mov ecx, t0001_s02_beg ;get addr src string mov edx, (t0001_s02_end - t0001_s02_beg) ;get src strlen mov [esp ], eax ;arg1: addr dst string mov [esp + 4], ebx ;arg2: addr dst strlen mov [esp + 8], ecx ;arg3: addr src string mov [esp + 12], edx ;arg4: src strlen call string_append add esp, 16 ;restore 16 bytes ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; append t0001_s03_beg to t0001_outstr. ; ; string_append( @t0001_outstr, ; @t0001_outlen, ; @t0001_s03_beg, ; @t0001_s03_end - @t0001_s03_beg ); ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - sub esp, 16 ;reserve 16 bytes mov eax, t0001_outstr ;get addr dst string mov ebx, t0001_outlen ;get addr dst strlen mov ecx, t0001_s03_beg ;get addr src string mov edx, (t0001_s03_end - t0001_s03_beg) ;get src strlen mov [esp ], eax ;arg1: addr dst string mov [esp + 4], ebx ;arg2: addr dst strlen mov [esp + 8], ecx ;arg3: addr src string mov [esp + 12], edx ;arg4: src strlen call string_append add esp, 16 ;restore 16 bytes ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; append t0001_s04_beg to t0001_outstr. ; ; string_append( @t0001_outstr, ; @t0001_outlen, ; @t0001_s04_beg, ; @t0001_s04_end - @t0001_s04_beg ); ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - sub esp, 16 ;reserve 16 bytes mov eax, t0001_outstr ;get addr dst string mov ebx, t0001_outlen ;get addr dst strlen mov ecx, t0001_s04_beg ;get addr src string mov edx, (t0001_s04_end - t0001_s04_beg) ;get src strlen mov [esp ], eax ;arg1: addr dst string mov [esp + 4], ebx ;arg2: addr dst strlen mov [esp + 8], ecx ;arg3: addr src string mov [esp + 12], edx ;arg4: src strlen call string_append add esp, 16 ;restore 16 bytes ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; systemcall write t0001_outstr to stdout. ; ; write( stdout, @t0001_outstr, t0001_outlen ); ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - mov eax, 0x04 ;systemcall write mov ebx, 0x01 ;to stdout mov ecx, t0001_outstr ;source string mov edx, [t0001_outlen] ;strlen int 0x80 ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; *** TEST 0001 end *** ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - .exit: mov eax, 0x01 ;systemcall exit xor ebx, ebx ;return 0 int 0x80
src/boot/boot.asm
Tamim365/os
0
89997
; ; A boot sector that prints a string using our function. ; [org 0x7c00] ; Tell the assembler where this code will be loaded mov bx, msg call print_string jmp $ ; Hang %include "src/boot/io.asm" ; Data msg: db "Hello World!" ; Padding and magic number. times 510-($-$$) db 0 dw 0xaa55
Graph/Walk/Proofs.agda
Lolirofle/stuff-in-agda
6
5647
open import Type module Graph.Walk.Proofs {ℓ₁ ℓ₂} {V : Type{ℓ₁}} where open import Lang.Instance open import Logic import Lvl open import Graph{ℓ₁}{ℓ₂}(V) open import Graph.Walk{ℓ₁}{ℓ₂}{V} open import Relator.Equals.Proofs.Equiv import Structure.Relator.Names as Names open import Structure.Relator.Properties open import Type.Properties.Singleton private variable ℓ : Lvl.Level private variable _⟶_ : Graph private variable a b : V private variable _▫_ : V → V → Type{ℓ} -- There is a walk between two vertices when there is one edge between them. instance Walk-super : (_⟶_) ⊆₂ (Walk(_⟶_)) _⊆₂_.proof Walk-super p = prepend p at -- Walk is a "smallest" reflexive-transitive closure Walk-sub : ⦃ _ : Reflexivity(_▫_) ⦄ → ⦃ _ : Transitivity(_▫_) ⦄ → ⦃ _ : (_⟶_) ⊆₂ (_▫_) ⦄ → (Walk(_⟶_)) ⊆₂ (_▫_) Walk-sub {_▫_ = _▫_}{_⟶_ = _⟶_} = intro proof where proof : Names.Subrelation(Walk(_⟶_))(_▫_) proof at = transitivity(_▫_) (reflexivity(_▫_)) (reflexivity(_▫_)) proof (prepend ab1 walkb1b) = transitivity(_▫_) (sub₂(_⟶_)(_▫_) ab1) (proof walkb1b) Walk-transitivity-raw : Names.Transitivity(Walk(_⟶_)) Walk-transitivity-raw at xz = xz Walk-transitivity-raw (prepend xb by) yz = prepend xb (Walk-transitivity-raw by yz) instance -- A walk can be joined/concatenated to form a new walk. Walk-transitivity : Transitivity(Walk(_⟶_)) Transitivity.proof Walk-transitivity = Walk-transitivity-raw instance Walk-reflexivity : Reflexivity(Walk(_⟶_)) Walk-reflexivity = intro at
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_21829_273.asm
ljhsiun2/medusa
9
12456
<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r13 push %r14 push %r15 push %rcx push %rdi push %rsi lea addresses_WC_ht+0xc885, %rsi lea addresses_WT_ht+0xaa65, %rdi nop nop sub $57973, %r10 mov $53, %rcx rep movsb nop nop nop nop nop inc %r15 lea addresses_WT_ht+0x1a865, %rsi lea addresses_UC_ht+0x18e5, %rdi sub $25639, %r13 mov $82, %rcx rep movsw nop sub $45610, %r15 lea addresses_A_ht+0x1b465, %rsi lea addresses_D_ht+0xd1a4, %rdi nop nop nop nop add $28493, %r13 mov $127, %rcx rep movsl nop nop nop nop nop and $13423, %rsi lea addresses_WC_ht+0x12751, %r10 nop nop nop nop inc %r11 movb $0x61, (%r10) nop nop nop nop and $24614, %r10 lea addresses_A_ht+0xd965, %rsi lea addresses_A_ht+0x1cde5, %rdi nop cmp $11420, %r14 mov $120, %rcx rep movsq nop add $35167, %r15 lea addresses_normal_ht+0x32e5, %rsi lea addresses_D_ht+0x19731, %rdi sub %r13, %r13 mov $102, %rcx rep movsq xor $60923, %r11 lea addresses_WC_ht+0x6d65, %r13 nop nop nop xor %r11, %r11 movw $0x6162, (%r13) and $30097, %r15 pop %rsi pop %rdi pop %rcx pop %r15 pop %r14 pop %r13 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r8 push %rbx push %rcx push %rdx // Faulty Load lea addresses_PSE+0x1d865, %r12 nop nop nop nop nop xor %rbx, %rbx mov (%r12), %r10 lea oracles, %rdx and $0xff, %r10 shlq $12, %r10 mov (%rdx,%r10,1), %r10 pop %rdx pop %rcx pop %rbx pop %r8 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 16, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 7, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}} {'33': 21829} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
src/neuralnet-io.ads
sebsgit/textproc
0
27827
with NeuralNet; package NeuralNet.IO is procedure save(nn: in NeuralNet.Net; path: in String); function load(path: in String; status: out Boolean) return NeuralNet.Net; end NeuralNet.IO;
Transynther/x86/_processed/US/_zr_/i9-9900K_12_0xca.log_30_283.asm
ljhsiun2/medusa
9
176061
.global s_prepare_buffers s_prepare_buffers: ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r14 push %r8 push %rbp push %rbx // Load mov $0xad6, %r11 clflush (%r11) nop nop nop nop add %r12, %r12 mov (%r11), %bp nop nop nop nop nop add %r10, %r10 // Store lea addresses_D+0x13996, %r12 clflush (%r12) nop nop nop nop xor $31076, %r10 mov $0x5152535455565758, %r14 movq %r14, (%r12) nop nop nop xor $27605, %r12 // Store lea addresses_WT+0x73d6, %r8 nop nop nop xor %rbx, %rbx mov $0x5152535455565758, %r12 movq %r12, %xmm0 vmovaps %ymm0, (%r8) nop and $37363, %r12 // Store lea addresses_normal+0x1e456, %r14 nop nop nop nop nop inc %r11 mov $0x5152535455565758, %r12 movq %r12, %xmm6 movups %xmm6, (%r14) nop nop inc %r8 // Faulty Load lea addresses_US+0x18056, %r14 nop dec %r10 mov (%r14), %r11 lea oracles, %r8 and $0xff, %r11 shlq $12, %r11 mov (%r8,%r11,1), %r11 pop %rbx pop %rbp pop %r8 pop %r14 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_US', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'LOAD', 'src': {'size': 2, 'NT': True, 'type': 'addresses_P', 'same': False, 'AVXalign': False, 'congruent': 3}} {'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_D', 'same': False, 'AVXalign': False, 'congruent': 6}} {'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_WT', 'same': False, 'AVXalign': True, 'congruent': 7}} {'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_normal', 'same': False, 'AVXalign': False, 'congruent': 8}} [Faulty Load] {'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_US', 'same': True, 'AVXalign': False, 'congruent': 0}} <gen_prepare_buffer> {'00': 30} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
programs/oeis/168/A168185.asm
karttu/loda
1
161074
<reponame>karttu/loda ; A168185: Characteristic function of numbers that are not multiples of 12. ; 0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1 mov $2,12 gcd $2,$0 div $2,8 pow $1,$2
libsrc/_DEVELOPMENT/arch/zx/bifrost2/z80/asm_BIFROST2_getAnimGroup.asm
jpoikela/z88dk
640
96041
; ---------------------------------------------------------------- ; Z88DK INTERFACE LIBRARY FOR THE BIFROST*2 ENGINE ; ; See "bifrost2.h" for further details ; ---------------------------------------------------------------- SECTION code_clib SECTION code_bifrost2 PUBLIC asm_BIFROST2_getAnimGroup asm_BIFROST2_getAnimGroup: ; L=tile bit 7,l ; compare with BIFROST_STATIC ret nz ; if (static tile) return tile srl l ld a,(51708) and a ret z ; if (2 frames per animation) return tile/2 srl l ret ; if (4 frames per animation) return tile/4
test/Compiler/simple/Issue2486/Haskell.agda
cruhland/agda
1,989
15070
<filename>test/Compiler/simple/Issue2486/Haskell.agda module Issue2486.Haskell where {-# FOREIGN GHC data MyList a = Nil | Cons a (MyList a) #-}
ga_lib/src/c3ga_draw.ads
rogermc2/GA_Ada
3
6663
with GL.Objects.Programs; with Multivector_Analyze; with Multivectors; with Palet; package C3GA_Draw is procedure Draw (Render_Program : GL.Objects.Programs.Program; MV : Multivectors.Multivector; Palet_Type : Palet.Colour_Palet := Palet.Is_Null); -- Method : GA_Draw.Method_Type := -- GA_Draw.Draw_Method_Undefined); procedure Draw_Point (Render_Program : GL.Objects.Programs.Program; Analysis : Multivector_Analyze.MV_Analysis; Palet_Type : Palet.Colour_Palet := Palet.Is_Null); end C3GA_Draw;
other.7z/SFC.7z/SFC/ソースデータ/ゼルダの伝説神々のトライフォース/フランス_NES/N_F_asm/zel_label.asm
prismotizm/gigaleak
0
163743
<filename>other.7z/SFC.7z/SFC/ソースデータ/ゼルダの伝説神々のトライフォース/フランス_NES/N_F_asm/zel_label.asm Name: zel_label.asm Type: file Size: 17552 Last-Modified: '2016-05-13T04:22:15Z' SHA-1: DA6B386FA2AEF90FC5EF53611E3D15599F27120C Description: null
buildTools/win32-x64/gbdk/libc/isspace.asm
asiekierka/gb-studio
6,433
86558
<gh_stars>1000+ ;-------------------------------------------------------- ; File Created by SDCC : FreeWare ANSI-C Compiler ; Version 2.3.1 Wed Sep 04 21:56:16 2019 ;-------------------------------------------------------- .module isspace ;-------------------------------------------------------- ; Public variables in this module ;-------------------------------------------------------- .globl _isspace ;-------------------------------------------------------- ; special function registers ;-------------------------------------------------------- ;-------------------------------------------------------- ; special function bits ;-------------------------------------------------------- ;-------------------------------------------------------- ; internal ram data ;-------------------------------------------------------- .area _DATA ;-------------------------------------------------------- ; overlayable items in internal ram ;-------------------------------------------------------- .area _OVERLAY ;-------------------------------------------------------- ; indirectly addressable internal ram data ;-------------------------------------------------------- .area _ISEG ;-------------------------------------------------------- ; bit data ;-------------------------------------------------------- .area _BSEG ;-------------------------------------------------------- ; external ram data ;-------------------------------------------------------- .area _XSEG ;-------------------------------------------------------- ; global & static initialisations ;-------------------------------------------------------- .area _GSINIT .area _GSFINAL .area _GSINIT ;-------------------------------------------------------- ; Home ;-------------------------------------------------------- .area _HOME .area _CODE ;-------------------------------------------------------- ; code ;-------------------------------------------------------- .area _CODE ; isspace.c 3 ; genLabel ; genFunction ; --------------------------------- ; Function isspace ; --------------------------------- ___isspace_start: _isspace: ; isspace.c 5 ; genCmpEq ; AOP_STK for ; genCmpEq: left 1, right 1, result 0 lda hl,2(sp) ld a,(hl) cp a,#0x20 jp z,00101$ 00110$: ; genCmpEq ; AOP_STK for ; genCmpEq: left 1, right 1, result 0 lda hl,2(sp) ld a,(hl) cp a,#0x09 jp z,00101$ 00111$: ; genCmpEq ; AOP_STK for ; genCmpEq: left 1, right 1, result 0 lda hl,2(sp) ld a,(hl) cp a,#0x0A jp nz,00102$ jr 00113$ 00112$: jp 00102$ 00113$: ; genLabel 00101$: ; isspace.c 6 ; genRet ld e,#0x01 jp 00106$ ; genLabel 00102$: ; isspace.c 8 ; genRet ld e,#0x00 ; genLabel 00106$: ; genEndFunction ret ___isspace_end: .area _CODE
Transynther/x86/_processed/NONE/_un_/i9-9900K_12_0xa0.log_1_754.asm
ljhsiun2/medusa
9
173175
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r8 push %r9 push %rax push %rcx push %rdi push %rsi lea addresses_A_ht+0x11231, %rsi lea addresses_UC_ht+0x1ad5, %rdi nop nop cmp $35514, %rax mov $6, %rcx rep movsb nop nop nop xor $42667, %r10 lea addresses_normal_ht+0x14415, %rsi lea addresses_WT_ht+0x5565, %rdi nop nop nop nop cmp $51440, %r11 mov $69, %rcx rep movsb nop nop nop nop and $1606, %r11 lea addresses_UC_ht+0x19815, %rcx nop nop nop nop cmp %r11, %r11 and $0xffffffffffffffc0, %rcx vmovntdqa (%rcx), %ymm5 vextracti128 $1, %ymm5, %xmm5 vpextrq $0, %xmm5, %rdi nop add $12101, %r11 lea addresses_normal_ht+0xf581, %rax nop nop dec %r9 mov (%rax), %r11w nop nop nop nop nop add %r10, %r10 lea addresses_UC_ht+0x10015, %rax nop sub $48553, %rcx mov (%rax), %r11d nop nop and %rcx, %rcx lea addresses_D_ht+0x5a15, %rsi nop nop nop nop xor $43511, %rcx movb (%rsi), %r10b dec %rsi lea addresses_WC_ht+0xcef5, %rsi lea addresses_D_ht+0x2215, %rdi dec %r8 mov $87, %rcx rep movsl nop nop nop nop nop sub $22160, %r8 lea addresses_UC_ht+0x798d, %r10 nop nop nop nop nop and %r8, %r8 movl $0x61626364, (%r10) nop nop nop nop nop add %r11, %r11 lea addresses_WT_ht+0xade7, %rsi lea addresses_WC_ht+0xc075, %rdi nop nop nop xor %r10, %r10 mov $122, %rcx rep movsq cmp %rcx, %rcx lea addresses_A_ht+0xf155, %rsi nop nop nop nop nop xor $30983, %r8 movl $0x61626364, (%rsi) nop nop and %rcx, %rcx pop %rsi pop %rdi pop %rcx pop %rax pop %r9 pop %r8 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r14 push %r8 push %rbp push %rcx push %rdi push %rsi // Load lea addresses_US+0x6e79, %r12 nop nop nop nop and $29558, %r8 movb (%r12), %r10b nop nop nop nop nop inc %rbp // REPMOV lea addresses_A+0x1ce15, %rsi lea addresses_normal+0x1815, %rdi nop nop nop sub %r12, %r12 mov $40, %rcx rep movsl nop nop nop sub %r12, %r12 // Load lea addresses_UC+0xca15, %r12 nop nop add $52534, %rdi mov (%r12), %r10w nop nop nop nop add $35799, %r12 // Faulty Load lea addresses_normal+0x1815, %rsi clflush (%rsi) nop nop inc %rcx mov (%rsi), %r10w lea oracles, %rsi and $0xff, %r10 shlq $12, %r10 mov (%rsi,%r10,1), %r10 pop %rsi pop %rdi pop %rcx pop %rbp pop %r8 pop %r14 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_normal', 'AVXalign': True, 'size': 16}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_US', 'AVXalign': True, 'size': 1}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 9, 'type': 'addresses_A'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 0, 'type': 'addresses_normal'}} {'src': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_UC', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_normal', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'same': False, 'congruent': 2, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_UC_ht'}} {'src': {'same': True, 'congruent': 10, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_WT_ht'}} {'src': {'NT': True, 'same': False, 'congruent': 11, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'} {'src': {'NT': True, 'same': False, 'congruent': 1, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'} {'src': {'NT': True, 'same': False, 'congruent': 3, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 4, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_D_ht'}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 4}} {'src': {'same': False, 'congruent': 1, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 5, 'type': 'addresses_WC_ht'}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 4}} {'b0': 1} b0 */
oeis/100/A100156.asm
neoneye/loda-programs
11
103431
; A100156: Structured truncated tetrahedral numbers. ; Submitted by <NAME>(l1) ; 1,12,44,108,215,376,602,904,1293,1780,2376,3092,3939,4928,6070,7376,8857,10524,12388,14460,16751,19272,22034,25048,28325,31876,35712,39844,44283,49040,54126,59552,65329,71468,77980,84876,92167,99864,107978,116520,125501,134932,144824,155188,166035,177376,189222,201584,214473,227900,241876,256412,271519,287208,303490,320376,337877,356004,374768,394180,414251,434992,456414,478528,501345,524876,549132,574124,599863,626360,653626,681672,710509,740148,770600,801876,833987,866944,900758,935440,971001 mov $1,$0 add $1,1 sub $2,$1 pow $1,3 mul $1,2 bin $2,3 add $1,$2 mov $0,$1
programs/oeis/258/A258597.asm
neoneye/loda
22
167484
; A258597: a(n) = 13*3^n. ; 13,39,117,351,1053,3159,9477,28431,85293,255879,767637,2302911,6908733,20726199,62178597,186535791,559607373,1678822119,5036466357,15109399071,45328197213,135984591639,407953774917,1223861324751,3671583974253,11014751922759 mov $1,3 pow $1,$0 mul $1,13 mov $0,$1
src/main/ada/2019/aoc-aoc_2019-day01.adb
wooky/aoc.kt
0
15559
with Ada.Text_IO; package body AOC.AOC_2019.Day01 is function Create return Day.Access_Day is begin return new Day_01' (others => <>); end Create; procedure Init (D : in out Day_01; Root : String) is use Ada.Text_IO; File : File_Type; begin Open (File => File, Mode => In_File, Name => Root & "/input/2019/day01.txt"); while not End_Of_File (File) loop declare Current_Mass : Mass := Mass (Integer'Value (Get_Line (File))); begin D.Total_Fuel := D.Total_Fuel + Calc_Fuel (Current_Mass); D.Abhorrent_Total_Fuel := D.Abhorrent_Total_Fuel + Calc_Abhorrent_Fuel (Current_Mass); end; end loop; Close (File); end Init; function Part_1 (D : Day_01) return String is begin return D.Total_Fuel'Image; end Part_1; function Part_2 (D : Day_01) return String is begin return D.Abhorrent_Total_Fuel'Image; end Part_2; function Calc_Fuel (M : Mass) return Fuel is Result : Integer; begin Result := Integer (M) / 3 - 2; return Fuel (if Result < 0 then 0 else Result); end Calc_Fuel; function Calc_Abhorrent_Fuel (M : Mass) return Fuel is Abhorrent_Current_Fuel : Fuel := Calc_Fuel (M); Abhorrent_Total_Fuel : Fuel := 0; begin while Abhorrent_Current_Fuel > 0 loop Abhorrent_Total_Fuel := Abhorrent_Total_Fuel + Abhorrent_Current_Fuel; Abhorrent_Current_Fuel := Calc_Fuel (Abhorrent_Current_Fuel); end loop; return Abhorrent_Total_Fuel; end Calc_Abhorrent_Fuel; end AOC.AOC_2019.Day01;
script/NumScript.g4
numary/machine
14
7255
grammar NumScript; NEWLINE: [\r\n]+; WHITESPACE: [ \t]+ -> skip; MULTILINE_COMMENT: '/*' (MULTILINE_COMMENT|.)*? '*/' -> skip; LINE_COMMENT: '//' .*? NEWLINE -> skip; VARS: 'vars'; META: 'meta'; PRINT: 'print'; FAIL: 'fail'; SEND: 'send'; SOURCE: 'source'; FROM: 'from'; MAX: 'max'; DESTINATION: 'destination'; TO: 'to'; ALLOCATE: 'allocate'; OP_ADD: '+'; OP_SUB: '-'; LPAREN: '('; RPAREN: ')'; LBRACK: '['; RBRACK: ']'; LBRACE: '{'; RBRACE: '}'; EQ: '='; TY_ACCOUNT: 'account'; TY_ASSET: 'asset'; TY_NUMBER: 'number'; TY_MONETARY: 'monetary'; TY_PORTION: 'portion'; STRING: '"' [a-zA-Z0-9]* '"'; PORTION: ( [0-9]+ [ ]? '/' [ ]? [0-9]+ | [0-9]+ ('.' [0-9]+)? '%' ); PORTION_REMAINING: 'remaining'; NUMBER: [0-9]+; PERCENT: '%'; VARIABLE_NAME: '$' [a-z_]+ [a-z0-9_]*; ACCOUNT: '@' [a-z_]+ [a-z0-9_:]*; ASSET: [A-Z/0-9]+; monetary: LBRACK asset=ASSET amt=NUMBER RBRACK; monetaryAll: LBRACK asset=ASSET '*' RBRACK; literal : ACCOUNT # LitAccount | ASSET # LitAsset | NUMBER # LitNumber | monetary # LitMonetary ; variable: VARIABLE_NAME; expression : lhs=expression op=(OP_ADD|OP_SUB) rhs=expression # ExprAddSub | lit=literal # ExprLiteral | var_=variable # ExprVariable ; allotmentPortion : PORTION # allotmentPortionConst | por=variable # allotmentPortionVar | PORTION_REMAINING # allotmentPortionRemaining ; destinationInOrder: LBRACE NEWLINE (dests+=destination NEWLINE)+ RBRACE; destinationMaxed: MAX max=expression TO dest=destination; destinationAllotment: LBRACE NEWLINE (portions+=allotmentPortion TO dests+=destination NEWLINE)+ RBRACE; destination : expression # DestAccount | destinationMaxed # DestMaxed | destinationInOrder # DestInOrder | destinationAllotment # DestAllotment ; sourceInOrder: LBRACE NEWLINE (sources+=source NEWLINE)+ RBRACE; sourceMaxed: MAX max=expression FROM src=source; source : expression # SrcAccount | sourceMaxed # SrcMaxed | sourceInOrder # SrcInOrder ; sourceAllotment: LBRACE NEWLINE (portions+=allotmentPortion FROM sources+=source NEWLINE)+ RBRACE; valueAwareSource : source # Src | sourceAllotment # SrcAllotment ; statement : PRINT expr=expression # Print | FAIL # Fail | SEND (mon=expression | monAll=monetaryAll) LPAREN NEWLINE ( SOURCE '=' src=valueAwareSource NEWLINE DESTINATION '=' dest=destination | DESTINATION '=' dest=destination NEWLINE SOURCE '=' src=valueAwareSource) NEWLINE RPAREN # Send ; type_: TY_ACCOUNT | TY_ASSET | TY_NUMBER | TY_MONETARY | TY_PORTION; origin : META '(' acc=expression ',' key=STRING ')' ; varDecl: ty=type_ name=variable (EQ orig=origin)?; varListDecl: VARS LBRACE NEWLINE (v+=varDecl NEWLINE+)+ RBRACE NEWLINE; script: NEWLINE* vars=varListDecl? stmts+=statement (NEWLINE stmts+=statement)* NEWLINE* EOF ;
programs/oeis/250/A250761.asm
neoneye/loda
22
2810
; A250761: Number of (6+1) X (n+1) 0..2 arrays with nondecreasing x(i,j)-x(i,j-1) in the i direction and nondecreasing x(i,j)+x(i-1,j) in the j direction. ; 9585,22197,40023,63063,91317,124785,163467,207363,256473,310797,370335,435087,505053,580233,660627,746235,837057,933093,1034343,1140807,1252485,1369377,1491483,1618803,1751337,1889085,2032047,2180223,2333613,2492217,2656035,2825067,2999313,3178773,3363447,3553335,3748437,3948753,4154283,4365027,4580985,4802157,5028543,5260143,5496957,5738985,5986227,6238683,6496353,6759237,7027335,7300647,7579173,7862913,8151867,8446035,8745417,9050013,9359823,9674847,9995085,10320537,10651203,10987083,11328177,11674485,12026007,12382743,12744693,13111857,13484235,13861827,14244633,14632653,15025887,15424335,15827997,16236873,16650963,17070267,17494785,17924517,18359463,18799623,19244997,19695585,20151387,20612403,21078633,21550077,22026735,22508607,22995693,23487993,23985507,24488235,24996177,25509333,26027703,26551287 mov $2,$0 add $2,1 mov $4,$0 lpb $2 mov $0,$4 sub $2,1 sub $0,$2 mov $5,$0 add $5,1 mov $6,0 mov $11,$0 lpb $5 mov $0,$11 sub $5,1 sub $0,$5 mov $7,$0 mov $9,2 lpb $9 sub $9,1 add $0,$9 sub $0,1 mov $3,2 add $3,$0 trn $3,3 add $3,3 mul $3,729 sub $3,1 mov $10,$9 lpb $10 mov $8,$3 sub $10,1 lpe lpe lpb $7 mov $7,0 sub $8,$3 lpe mov $3,$8 mul $3,3 add $3,3027 add $6,$3 lpe add $1,$6 lpe mov $0,$1
libsrc/input/spectrum/in_MouseAMX_callee.asm
meesokim/z88dk
0
177635
; void __CALLEE__ in_MouseAMX_callee(uchar *buttons, uint *xcoord, uint *ycoord) ; 09.2005 aralbrec PUBLIC in_MouseAMX_callee EXTERN INMouseAMX .in_MouseAMX_callee call INMouseAMX pop de pop hl ld (hl),a inc hl xor a ld (hl),a pop hl ld (hl),b inc hl ld (hl),a pop hl ld (hl),c ex de,hl jp (hl)
agda-stdlib-0.9/src/Data/Covec.agda
qwe2/try-agda
1
15452
<reponame>qwe2/try-agda<gh_stars>1-10 ------------------------------------------------------------------------ -- The Agda standard library -- -- Coinductive vectors ------------------------------------------------------------------------ module Data.Covec where open import Coinduction open import Data.Nat using (ℕ; zero; suc) open import Data.Conat as Coℕ using (Coℕ; zero; suc; _+_) open import Data.Cofin using (Cofin; zero; suc) open import Data.Vec using (Vec; []; _∷_) open import Data.Colist as Colist using (Colist; []; _∷_) open import Data.Product using (_,_) open import Relation.Binary ------------------------------------------------------------------------ -- The type infixr 5 _∷_ data Covec (A : Set) : Coℕ → Set where [] : Covec A zero _∷_ : ∀ {n} (x : A) (xs : ∞ (Covec A (♭ n))) → Covec A (suc n) ------------------------------------------------------------------------ -- Some operations map : ∀ {A B n} → (A → B) → Covec A n → Covec B n map f [] = [] map f (x ∷ xs) = f x ∷ ♯ map f (♭ xs) fromVec : ∀ {A n} → Vec A n → Covec A (Coℕ.fromℕ n) fromVec [] = [] fromVec (x ∷ xs) = x ∷ ♯ fromVec xs fromColist : ∀ {A} (xs : Colist A) → Covec A (Colist.length xs) fromColist [] = [] fromColist (x ∷ xs) = x ∷ ♯ fromColist (♭ xs) take : ∀ {A} m {n} → Covec A (m + n) → Covec A m take zero xs = [] take (suc n) (x ∷ xs) = x ∷ ♯ take (♭ n) (♭ xs) drop : ∀ {A} m {n} → Covec A (Coℕ.fromℕ m + n) → Covec A n drop zero xs = xs drop (suc n) (x ∷ xs) = drop n (♭ xs) replicate : ∀ {A} n → A → Covec A n replicate zero x = [] replicate (suc n) x = x ∷ ♯ replicate (♭ n) x lookup : ∀ {A n} → Cofin n → Covec A n → A lookup zero (x ∷ xs) = x lookup (suc n) (x ∷ xs) = lookup n (♭ xs) infixr 5 _++_ _++_ : ∀ {A m n} → Covec A m → Covec A n → Covec A (m + n) [] ++ ys = ys (x ∷ xs) ++ ys = x ∷ ♯ (♭ xs ++ ys) [_] : ∀ {A} → A → Covec A (suc (♯ zero)) [ x ] = x ∷ ♯ [] ------------------------------------------------------------------------ -- Equality and other relations -- xs ≈ ys means that xs and ys are equal. infix 4 _≈_ data _≈_ {A} : ∀ {n} (xs ys : Covec A n) → Set where [] : [] ≈ [] _∷_ : ∀ {n} x {xs ys} (xs≈ : ∞ (♭ xs ≈ ♭ ys)) → _≈_ {n = suc n} (x ∷ xs) (x ∷ ys) -- x ∈ xs means that x is a member of xs. infix 4 _∈_ data _∈_ {A} : ∀ {n} → A → Covec A n → Set where here : ∀ {n x } {xs} → _∈_ {n = suc n} x (x ∷ xs) there : ∀ {n x y} {xs} (x∈xs : x ∈ ♭ xs) → _∈_ {n = suc n} x (y ∷ xs) -- xs ⊑ ys means that xs is a prefix of ys. infix 4 _⊑_ data _⊑_ {A} : ∀ {m n} → Covec A m → Covec A n → Set where [] : ∀ {n} {ys : Covec A n} → [] ⊑ ys _∷_ : ∀ {m n} x {xs ys} (p : ∞ (♭ xs ⊑ ♭ ys)) → _⊑_ {m = suc m} {suc n} (x ∷ xs) (x ∷ ys) ------------------------------------------------------------------------ -- Some proofs setoid : Set → Coℕ → Setoid _ _ setoid A n = record { Carrier = Covec A n ; _≈_ = _≈_ ; isEquivalence = record { refl = refl ; sym = sym ; trans = trans } } where refl : ∀ {A n} → Reflexive (_≈_ {A} {n}) refl {x = []} = [] refl {x = x ∷ xs} = x ∷ ♯ refl sym : ∀ {A n} → Symmetric (_≈_ {A} {n}) sym [] = [] sym (x ∷ xs≈) = x ∷ ♯ sym (♭ xs≈) trans : ∀ {A n} → Transitive (_≈_ {A} {n}) trans [] [] = [] trans (x ∷ xs≈) (.x ∷ ys≈) = x ∷ ♯ trans (♭ xs≈) (♭ ys≈) poset : Set → Coℕ → Poset _ _ _ poset A n = record { Carrier = Covec A n ; _≈_ = _≈_ ; _≤_ = _⊑_ ; isPartialOrder = record { isPreorder = record { isEquivalence = Setoid.isEquivalence (setoid A n) ; reflexive = reflexive ; trans = trans } ; antisym = antisym } } where reflexive : ∀ {A n} → _≈_ {A} {n} ⇒ _⊑_ reflexive [] = [] reflexive (x ∷ xs≈) = x ∷ ♯ reflexive (♭ xs≈) trans : ∀ {A n} → Transitive (_⊑_ {A} {n}) trans [] _ = [] trans (x ∷ xs≈) (.x ∷ ys≈) = x ∷ ♯ trans (♭ xs≈) (♭ ys≈) antisym : ∀ {A n} → Antisymmetric (_≈_ {A} {n}) _⊑_ antisym [] [] = [] antisym (x ∷ p₁) (.x ∷ p₂) = x ∷ ♯ antisym (♭ p₁) (♭ p₂) map-cong : ∀ {A B n} (f : A → B) → _≈_ {n = n} =[ map f ]⇒ _≈_ map-cong f [] = [] map-cong f (x ∷ xs≈) = f x ∷ ♯ map-cong f (♭ xs≈) take-⊑ : ∀ {A} m {n} (xs : Covec A (m + n)) → take m xs ⊑ xs take-⊑ zero xs = [] take-⊑ (suc n) (x ∷ xs) = x ∷ ♯ take-⊑ (♭ n) (♭ xs)
Examples/basics/hello.asm
agguro/linux-nasm
6
28855
;name: hello.asm ; ;build: nasm -felf64 hello.asm -o hello.o ; ld -melf_x86_64 -o hello hello.o ; ;description: writes 'Hello world!" to stdout [list -] %include "unistd.inc" [list +] bits 64 section .data message: db "Hello world!",10 .len: equ $-message section .text global _start _start: syscall write,stdout,message,message.len syscall exit,0
kernel/asmfunc.asm
wkiino/my-mikanos
0
19696
<gh_stars>0 ; asmfunc.asm ; ; System V AMD64 Calling Convention ; Registers: RDI, RSI, RDX, RCX, R8, R9 bits 64 section .text global IoOut32 ; void IoOut32(uint16_t addr, uint32_t data); IoOut32: mov dx, di ; dx = addr mov eax, esi ; eax = data out dx, eax ret global IoIn32 ; uint32_t IoIn32(uint16_t addr); IoIn32: mov dx, di ; dx = addr in eax, dx ret global GetCS ; uint16_t GetCS(void); GetCS: xor eax, eax ; alse clears upper 32bits of rax mov ax, cs ;ax is lower 16 bit of eax. ret global LoadIDT ; void LoadIDT(uint16_t limit, uint64_t offset); LoadIDT: push rbp mov rbp, rsp sub rsp, 10 ; amaunt size of limit and offset is 10 byte.So sub 10. mov [rsp], di ; limit mov [rsp+2],rsi ; offset lidt [rsp] mov rsp, rbp pop rbp ret extern kernel_main_stack extern KernelMainNewStack global KernelMain KernelMain: mov rsp, kernel_main_stack + 1024*1024 call KernelMainNewStack .fin: hlt jmp .fin global LoadGDT ; void LoadGDT(uint16_t limit, uint64_t offset); LoadGDT: push rbp mov rbp, rsp sub rsp, 10 mov [rsp], di ; limit mov [rsp + 2], rsi ; offset lgdt [rsp] mov rsp, rbp pop rbp ret global SetDSAll ; void SetDSAll(uint16_t value); SetDSAll: mov ds, di mov es, di mov fs, di mov gs, di ret global SetCSSS ; void SetCSSS(uint16_t cs, uint16_t ss); SetCSSS: push rbp mov rbp, rsp mov ss, si mov rax, .next push rdi ; CS push rax ; RIP o64 retf .next: mov rsp, rbp pop rbp ret global SetCR3 ; void SetCR3(uint64_t value); SetCR3: mov cr3, rdi ret global GetCR3 ; uint64_t GetCR3(); GetCR3: mov rax, cr3 ret global SwitchContext SwitchContext: ;void SwitchContext(void *next_ctx, void *current_ctx); mov [rsi + 0x40], rax mov [rsi + 0x48], rbx mov [rsi + 0x50], rcx mov [rsi + 0x58], rdx mov [rsi + 0x60], rdi mov [rsi + 0x68], rsi lea rax, [rsp + 8] mov [rsi + 0x70], rax ; RSP mov [rsi + 0x78], rbp mov [rsi + 0x80], r8 mov [rsi + 0x88], r9 mov [rsi + 0x90], r10 mov [rsi + 0x98], r11 mov [rsi + 0xa0], r12 mov [rsi + 0xa8], r13 mov [rsi + 0xb0], r14 mov [rsi + 0xb8], r15 mov rax, cr3 mov [rsi + 0x00], rax ; CR3 ; Why can I do like following ; mov [rsi + 0x00], cr3 mov rax, [rsp] mov [rsi + 0x08], rax ; RIP pushfq pop qword [rsi + 0x10] ; RFLAGS mov ax, cs mov [rsi + 0x20], rax mov bx, ss mov [rsi + 0x28], rbx mov cx, fs mov [rsi + 0x30], rcx mov dx, gs mov [rsi + 0x38], rdx fxsave [rsi + 0xc0] ;fall through to RestoreContext global RestoreContext RestoreContext: ; void RestoreContext(void* task_context); ; stack frame for iret push qword [rdi + 0x28] ; SS push qword [rdi + 0x70] ; RSP push qword [rdi + 0x10] ; RFLAGS push qword [rdi + 0x20] ; CS push qword [rdi + 0x08] ; RIP ; return of context fxrstor [rdi + 0xc0] mov rax, [rdi + 0x00] mov cr3, rax mov rax, [rdi + 0x30] mov fs, ax mov rax, [rdi + 0x38] mov gs, ax mov rax, [rdi + 0x40] mov rbx, [rdi + 0x48] mov rcx, [rdi + 0x50] mov rdx, [rdi + 0x58] ; Why offset difference is 10, instead of 8. ; Because 0x60 is setted rdi, and if load it, ; then we cannnot load registers such as r8. mov rsi, [rdi + 0x68] ; 0x70 is used for RSP. Why we skip? ; Because RSP value in stack is returned to by iret mov rbp, [rdi + 0x78] mov r8, [rdi + 0x80] mov r9, [rdi + 0x88] mov r10, [rdi + 0x90] mov r11, [rdi + 0x98] mov r12, [rdi + 0xa0] mov r13, [rdi + 0xa8] mov r14, [rdi + 0xb0] mov r15, [rdi + 0xb8] mov rdi, [rdi + 0x60] o64 iret global CallApp CallApp: ; void CallApp(int argc, char** argv, uint16_t ss, ; uint64_t rip, uint64_t rsp, uint64_t* os_stack_ptr); push rbx push rbp push r12 push r13 push r14 push r15 mov [r9], rsp ; save stack pointer for os push rdx ;SS push r8 ;RSP add rdx, 8 push rdx ;CS push rcx ;RIP o64 retf ; Don't come here when the application is closed extern LAPICTimerOnInterrupt ; void LAPICTimerOnInterrupt(const TaskCOntext& ctx_stack); global IntHandlerLAPICTimer IntHandlerLAPICTimer: ; void IntHandlerLAPICTimer(); push rbp mov rbp, rsp ; build TaskContext type structure on stack sub rsp, 512 fxsave [rsp] push r15 push r14 push r13 push r12 push r11 push r10 push r9 push r8 push qword [rbp] ;RBP push qword [rbp + 0x20] ;RSP push rsi push rdi push rdx push rcx push rbx push rax ;push gs ;push fs mov ax, fs mov bx, gs mov rcx, cr3 push rbx push rax push qword [rbp + 0x28] ; SS push qword [rbp +0x10] ; CS push rbp ; reserved1 push qword [rbp + 0x18] ; RFLAGS push qword [rbp + 0x08] ; RIP push rcx ; CR3 ; set argument register for LAPICTimerOnInterrupt mov rdi, rsp call LAPICTimerOnInterrupt add rsp, 8*8 ; ignore registers from CR3 to GS pop rax pop rbx pop rcx pop rdx pop rdi pop rsi ; ignore RSP and RBP because we can obtain them from InterruptFrame add rsp, 16 pop r8 pop r9 pop r10 pop r11 pop r12 pop r13 pop r14 pop r15 fxrstor [rsp] mov rsp, rbp pop rbp iretq global LoadTR LoadTR: ; void LoadTR(uint16_t sel); ltr di ret global WriteMSR WriteMSR: ; void WriteMSR(uint32_t msr, uint64_t value); mov rdx, rsi shr rdx, 32 mov eax, esi mov ecx, edi wrmsr ret extern GetCurrentTaskOSStackPointer extern syscall_table global SyscallEntry SyscallEntry: ; void SyscallEntry(); push rbp push rcx ; original RIP push r11 ; original RFLAGS push rax ; save system call id mov rcx, r10 and eax, 0x7fffffff mov rbp, rsp ; prepare to execute system call on stack for OS and rsp, 0xfffffffffffffff0 push rax push rdx cli call GetCurrentTaskOSStackPointer sti mov rdx, [rsp + 0] ; RDX mov [rax - 16], rdx mov rdx, [rsp + 8] ; RAX mov [rax - 8], rdx lea rsp, [rax - 16] pop rdx pop rax and rsp, 0xfffffffffffffff0 call [syscall_table + 8 * eax] ; rbx, r12-15 is calee-saved, so caller doesn't save them ; rax is for return value so caller doesn't save it. mov rsp, rbp pop rsi ; resotre system call id to rsi cmp esi, 0x80000002 je .exit pop r11 pop rcx pop rbp o64 sysret .exit: mov rsp, rax mov eax, edx ; these registers are saved stack in callee pop r15 pop r14 pop r13 pop r12 pop rbp pop rbx ret ; jump to next line of CallApp
testc/cputest/bitshift.asm
krismuad/TOWNSEMU
124
241659
.386p ASSUME CS:CODE PUBLIC C0_BITSHIFT_R8_I8 PUBLIC C1_BITSHIFT_R_I8 PUBLIC D3_BITSHIFT_R_CL ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EFLAGS_CF EQU 000000001H EFLAGS_PF EQU 000000004H EFLAGS_AF EQU 000000010H EFLAGS_ZF EQU 000000040H EFLAGS_SF EQU 000000080H EFLAGS_TF EQU 000000100H EFLAGS_DF EQU 000000400H EFLAGS_OF EQU 000000800H EFLAGS_NF EQU 000004000H EFLAGS_RF EQU 000010000H EFLAGS_VF EQU 000020000H BITSHIFT1_EFLAGS_MASK EQU EFLAGS_OF+EFLAGS_CF BITSHIFTN_EFLAGS_MASK EQU EFLAGS_CF ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; CODE SEGMENT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; BITSHIFT MACRO INST,VAL,AL_AX_OR_EAX,CTR MOV EAX,VAL INST AL_AX_OR_EAX,CTR PUSHFD POP EBX AND EBX,BITSHIFTN_EFLAGS_MASK MOV [EDI],EAX MOV [EDI+4],EBX LEA EDI,[EDI+8] ENDM BITSHIFT_R8_I8_X8 MACRO INST,VAL BITSHIFT INST,VAL,AL,0 MOV EAX,VAL INST AL,1 PUSHFD POP EBX AND EBX,BITSHIFT1_EFLAGS_MASK MOV [EDI],EAX MOV [EDI+4],EBX LEA EDI,[EDI+8] BITSHIFT INST,VAL,AL,2 BITSHIFT INST,VAL,AL,3 BITSHIFT INST,VAL,AL,4 BITSHIFT INST,VAL,AL,5 BITSHIFT INST,VAL,AL,6 BITSHIFT INST,VAL,AL,7 ENDM BITSHIFT_R32_I8_X8 MACRO INST,VAL BITSHIFT INST,VAL,EAX,0 MOV EAX,VAL INST EAX,1 PUSHFD POP EBX AND EBX,BITSHIFT1_EFLAGS_MASK MOV [EDI],EAX MOV [EDI+4],EBX LEA EDI,[EDI+8] BITSHIFT INST,VAL,EAX,2 BITSHIFT INST,VAL,EAX,7 BITSHIFT INST,VAL,EAX,15 BITSHIFT INST,VAL,EAX,16 BITSHIFT INST,VAL,EAX,30 BITSHIFT INST,VAL,EAX,63 ; Should be ANDed with 31 ENDM BITSHIFT_R32_CL_X8 MACRO INST,VAL XOR CL,CL BITSHIFT INST,VAL,EAX,CL MOV CL,1 MOV EAX,VAL INST EAX,CL PUSHFD POP EBX AND EBX,BITSHIFT1_EFLAGS_MASK MOV [EDI],EAX MOV [EDI+4],EBX LEA EDI,[EDI+8] INC CL MOV CL,2 BITSHIFT INST,VAL,EAX,CL MOV CL,6 BITSHIFT INST,VAL,EAX,CL MOV CL,16 BITSHIFT INST,VAL,EAX,CL MOV CL,17 BITSHIFT INST,VAL,EAX,CL MOV CL,31 BITSHIFT INST,VAL,EAX,CL MOV CL,63 ; Should be ANDed with 31 BITSHIFT INST,VAL,EAX,CL ENDM DEBUG_BREAK_TOWNS_VM MACRO MOV DX,2386H MOV AL,0002H OUT DX,AL ENDM ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;extern C0_BITSHIFT_R8_I8(unsigned int res[128],unsigned int v0); C0_BITSHIFT_R8_I8 PROC PUSH EBP MOV EBP,ESP SUB ESP,4 PUSHAD MOV EDI,[EBP+8] MOV EDX,[EBP+12] BITSHIFT_R8_I8_X8 ROL,EDX BITSHIFT_R8_I8_X8 ROR,EDX BITSHIFT_R8_I8_X8 RCL,EDX BITSHIFT_R8_I8_X8 RCR,EDX BITSHIFT_R8_I8_X8 SAL,EDX BITSHIFT_R8_I8_X8 SAR,EDX BITSHIFT_R8_I8_X8 SHL,EDX BITSHIFT_R8_I8_X8 SHR,EDX POPAD ADD ESP,4 POP EBP RET C0_BITSHIFT_R8_I8 ENDP ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;extern C1_BITSHIFT_R8_I88(unsigned int res[16],unsigned int v0); C1_BITSHIFT_R_I8 PROC PUSH EBP MOV EBP,ESP SUB ESP,4 PUSHAD MOV EDI,[EBP+8] MOV EDX,[EBP+12] BITSHIFT_R32_I8_X8 ROL,EDX BITSHIFT_R32_I8_X8 ROR,EDX BITSHIFT_R32_I8_X8 RCL,EDX BITSHIFT_R32_I8_X8 RCR,EDX BITSHIFT_R32_I8_X8 SAL,EDX BITSHIFT_R32_I8_X8 SAR,EDX BITSHIFT_R32_I8_X8 SHL,EDX BITSHIFT_R32_I8_X8 SHR,EDX POPAD ADD ESP,4 POP EBP RET C1_BITSHIFT_R_I8 ENDP ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;extern D3_BITSHIFT_R_CL(unsigned int res[16],unsigned int v0,unsigned int CL); D3_BITSHIFT_R_CL PROC PUSH EBP MOV EBP,ESP SUB ESP,4 PUSHAD MOV EDI,[EBP+8] MOV EDX,[EBP+12] BITSHIFT_R32_CL_X8 ROL,EDX BITSHIFT_R32_CL_X8 ROR,EDX BITSHIFT_R32_CL_X8 RCL,EDX BITSHIFT_R32_CL_X8 RCR,EDX BITSHIFT_R32_CL_X8 SAL,EDX BITSHIFT_R32_CL_X8 SAR,EDX BITSHIFT_R32_CL_X8 SHL,EDX BITSHIFT_R32_CL_X8 SHR,EDX POPAD ADD ESP,4 POP EBP RET D3_BITSHIFT_R_CL ENDP ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; CODE ENDS END
programs/oeis/026/A026915.asm
karttu/loda
0
8784
; A026915: a(n) = T(n,0) + T(n,1) + ... + T(n,n), T given by A026907. ; 1,26,100,272,640,1400,2944,6056,12304,24824,49888,100040,200368,401048,802432,1605224,3210832,6422072,12844576,25689608,51379696,102759896,205520320,411041192,822082960,1644166520,3288333664,6576667976,13153336624,26306673944,52613348608,105226697960,210453396688,420906794168,841813589152,1683627179144,3367254359152,6734508719192,13469017439296,26938034879528,53876069760016,107752139521016,215504279043040,431008558087112,862017116175280,1724034232351640,3448068464704384,6896136929409896 lpb $0,1 sub $0,1 add $2,6 add $1,$2 add $1,$2 mul $1,2 add $1,1 lpe add $1,1
oeis/346/A346232.asm
neoneye/loda-programs
11
81144
; A346232: Maximum number of squares in a square grid whose interiors can be touched by a (possibly skew) line segment of length n. ; 3,5,7,8,9,11,12,14,15,17,18,19,21,22,24,25,27,28,29,31,32,34,35,36,38,39,41,42,43,45,46,48,49,51,52,53,55,56,58,59,60,62,63,65,66,68,69,70,72,73,75,76,77,79,80,82,83,85,86,87,89,90,92,93,94,96,97 add $0,1 pow $0,2 div $0,4 mul $0,8 mov $1,1 lpb $0 add $1,2 trn $0,$1 lpe mov $0,$1 div $0,2 add $0,3
grammar/src/main/antlr4/com/yafred/asn1/grammar/ASN.g4
zhongweijun/asn1-tool
0
788
/******************************************************************************* * Copyright (C) 2021 <NAME> (https://github.com/yafred) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. ******************************************************************************/ /* Built with Antlr 4.7.1 : java org.antlr.v4.Tool ASN.g Tested with Antlr 4.7.1 : java org.antlr.v4.gui.TestRig Credits: http://www.antlr.org/ Guidance: Rec. ITU-T X.680 (08/2015) */ grammar ASN; /*--------------------- Specification (content of an asn.1 specification file) ------*/ specification: moduleDefinition* ; /*--------------------- Module definition -------------------------------------------*/ /* ModuleDefinition (see 13 in ITU-T X.680 (08/2015) */ moduleDefinition: moduleIdentifier DEFINITIONS_LITERAL // encodingReferenceDefault? tagDefault? extensionDefault? ASSIGN BEGIN_LITERAL ( exports? imports? assignment assignment* )? // moduleBody // encodingControlSections? END_LITERAL ; moduleIdentifier: UCASE_ID // modulereference ( definitiveOID /* iRIValue? */ )? // DefinitiveIdentification ; definitiveOID: LCURLY definitiveObjIdComponent definitiveObjIdComponent* RCURLY ; definitiveObjIdComponent: LCASE_ID | NUMBER | ( LCASE_ID LPAREN NUMBER RPAREN ) ; tagDefault: ( EXPLICIT_LITERAL | IMPLICIT_LITERAL | AUTOMATIC_LITERAL ) TAGS_LITERAL ; extensionDefault: EXTENSIBILITY_LITERAL IMPLIED_LITERAL ; exports: EXPORTS_LITERAL ( symbolList? | ALL_LITERAL ) SEMI ; imports: IMPORTS_LITERAL symbolsFromModuleList? SEMI ; symbolsFromModuleList: symbolsFromModule symbolsFromModule* ; symbolsFromModule: symbolList FROM_LITERAL globalModuleReference ; globalModuleReference: UCASE_ID assignedIdentifier? ; assignedIdentifier: definitiveOID | LCASE_ID // definedValue ; symbolList: symbol ( COMMA symbol )* ; symbol: // reference | parameterizedReference (we simplify) UCASE_ID | LCASE_ID ; assignment: typeAssignment | valueAssignment // | xMLValueAssignment // | valueSetTypeAssignment // | objectClassAssignment // | objectAssignment // | objectSetAssignment // | parameterizedAssignment ; /*--------------------- Types -------------------------------------------------------*/ /* TypeAssignment (see 16.1 in ITU-T X.680 (08/2015) */ typeAssignment: UCASE_ID // typereference ASSIGN type ; /* BuiltinType (see 17.1 in ITU-T X.680 (08/2015) */ type: builtinType constraint? | referencedType constraint? //| constrainedType ; builtinType: bitStringType | BOOLEAN_LITERAL // BooleanType | characterStringType | choiceType | DATE_LITERAL // DateType | DATE_TIME_LITERAL // DateTimeType | DURATION_LITERAL // DurationType | EMBEDDED_LITERAL PDV_LITERAL // EmbeddedPDVType | enumeratedType | EXTERNAL_LITERAL // ExternalType // | InstanceOfType (Rec. ITU-T X.681 | ISO/IEC 8824-2, Annex C) | integerType | OID_IRI_LITERAL // IRIType | NULL_LITERAL // NullType // | ObjectClassFieldType (Rec. ITU-T X.681 | ISO/IEC 8824-2, 14.1) | OBJECT_LITERAL IDENTIFIER_LITERAL // ObjectIdentifierType | OCTET_LITERAL STRING_LITERAL // OctetStringType | REAL_LITERAL // RealType | RELATIVE_OID_IRI_LITERAL // RelativeIRIType | RELATIVE_OID_LITERAL // RelativeOIDType | sequenceType | sequenceOfType | setType | setOfType | prefixedType | TIME_LITERAL // TimeType | TIME_OF_DAY_LITERAL // TimeOfDayType ; /* ReferencedType (see 17.3 in ITU-T X.680 (08/2015) */ referencedType: usefulType | definedType | selectionType // | TypeFromObject // | ValueSetFromObjects ; definedType: UCASE_ID // typereference | ( UCASE_ID DOT UCASE_ID ) // modulereference.typereference ; usefulType: GeneralizedTime_LITERAL | UTCTime_LITERAL | ObjectDescriptor_LITERAL ; /* SelectionType (see 30 in ITU-T X.680 (08/2015) */ selectionType: LCASE_ID LESS_THAN type ; /* BitStringType (see 22.1 in ITU-T X.680 (08/2015) */ bitStringType: BIT_LITERAL STRING_LITERAL ( LCURLY namedBitList RCURLY )? ; namedBitList: namedBit ( COMMA namedBit )* ; namedBit: LCASE_ID LPAREN NUMBER RPAREN | LCASE_ID LPAREN LCASE_ID RPAREN ; /* EnumeratedType (see 20.1 in ITU-T X.680 (08/2015) */ enumeratedType: ENUMERATED_LITERAL LCURLY enumeration ( COMMA ELLIPSIS /* exceptionSpec? */ ( COMMA enumeration )? )? RCURLY ; enumeration: enumerationItem ( COMMA enumerationItem )* ; enumerationItem: LCASE_ID | namedNumber ; /* IntegerType (see 19.1 in ITU-T X.680 (08/2015) */ integerType: INTEGER_LITERAL ( LCURLY namedNumberList RCURLY )? ; namedNumberList: namedNumber ( COMMA namedNumber )* ; namedNumber: LCASE_ID LPAREN signedNumber RPAREN | LCASE_ID LPAREN LCASE_ID RPAREN // definedValue ; signedNumber: MINUS? NUMBER ; /* CharacterStringType (see 40.1 in ITU-T X.680 (08/2015) */ characterStringType: // RestrictedCharacterString types BMPString_LITERAL | GeneralString_LITERAL | GraphicString_LITERAL | IA5String_LITERAL | ISO646String_LITERAL | NumericString_LITERAL | PrintableString_LITERAL | TeletexString_LITERAL | T61String_LITERAL | UniversalString_LITERAL | UTF8String_LITERAL | VideotexString_LITERAL | VisibleString_LITERAL // UnrestrictedCharacterString type | CHARACTER_LITERAL STRING_LITERAL ; /* ChoiceType (see 29.1 in ITU-T X.680 (08/2015) */ choiceType: CHOICE_LITERAL LCURLY alternativeTypeList ( COMMA extensionAndException extensionAdditionAlternatives? extensionMarker? )? RCURLY ; extensionAdditionAlternatives: COMMA extensionAdditionAlternativesList ; extensionAdditionAlternativesList: extensionAdditionAlternative ( COMMA extensionAdditionAlternative )* ; extensionAdditionAlternative: extensionAdditionAlternativesGroup | namedType ; extensionAdditionAlternativesGroup: DOUBLE_LBRACKET ( NUMBER COLON )? alternativeTypeList DOUBLE_RBRACKET ; alternativeTypeList: namedType ( COMMA namedType )* ; namedType: LCASE_ID type ; /* SequenceType (see 25 in ITU-T X.680 (08/2015) */ sequenceType: SEQUENCE_LITERAL LCURLY componentTypeLists? RCURLY ; /* SetType (see 27 in ITU-T X.680 (08/2015) */ setType: SET_LITERAL LCURLY componentTypeLists? RCURLY ; componentTypeLists: componentTypeList # rootComponentOnly | componentTypeList COMMA extensionAndException extensionAdditions? extensionMarker? # rootComponentsAndExtensions | componentTypeList COMMA extensionAndException extensionAdditions? extensionMarker COMMA componentTypeList # rootComponentsAndExtensionsAndAdditions | extensionAndException extensionAdditions? extensionMarker COMMA componentTypeList # extensionsAndAdditions | extensionAndException extensionAdditions? extensionMarker? # extensionsOnly ; extensionAndException: ELLIPSIS exceptionSpec? ; exceptionSpec: EXCLAMATION exceptionIdentification ; exceptionIdentification: signedNumber | LCASE_ID // definedValue | type COLON value ; extensionMarker: COMMA ELLIPSIS ; extensionAdditions: COMMA extensionAdditionList ; extensionAdditionList: extensionAddition ( COMMA extensionAddition )* ; extensionAddition: componentType | extensionAdditionGroup ; extensionAdditionGroup: DOUBLE_LBRACKET ( NUMBER COLON )? componentTypeList DOUBLE_RBRACKET ; componentTypeList: componentType ( COMMA componentType )* ; componentType: namedType | namedType OPTIONAL_LITERAL | namedType DEFAULT_LITERAL value | COMPONENTS_LITERAL OF_LITERAL type ; /* SequenceOfType (see 26 in ITU-T X.680 (08/2015) */ sequenceOfType: SEQUENCE_LITERAL ( SIZE_LITERAL? constraint )? OF_LITERAL ( namedType | type ) ; /* SetOfType (see 28 in ITU-T X.680 (08/2015) */ setOfType: SET_LITERAL ( SIZE_LITERAL? constraint )? OF_LITERAL ( namedType | type ) ; /* PrefixedType (see 31 in ITU-T X.680 (08/2015) */ prefixedType: taggedType // | encodingPrefixedType ; taggedType: LBRACKET ( UCASE_ID COLON )? /* encodingreference (see 12.25 in ITU-T X.680 (08/2015) should be all uppercase but it creates ambiguities */ ( UNIVERSAL_LITERAL | APPLICATION_LITERAL | PRIVATE_LITERAL )? // Class ( NUMBER | LCASE_ID ) // ClassNumber RBRACKET ( IMPLICIT_LITERAL | EXPLICIT_LITERAL )? type ; /*--------------------- Values ------------------------------------------------------*/ valueAssignment: LCASE_ID type ASSIGN value ; /* For values, we can only recognize patterns. Validation can only be done in context */ value: CSTRING # value_CSTRING | BSTRING # value_BSTRING | HSTRING # value_HSTRING | LCURLY RCURLY # value_EmptyList | (TRUE_LITERAL | FALSE_LITERAL) # value_BOOLEAN | LCASE_ID COLON value # value_Choice | LCURLY namedValue ( COMMA namedValue )* RCURLY # value_NamedValueList | LCURLY objIdComponents objIdComponents* RCURLY # value_ObjectIdentifier | LCURLY value ( COMMA value )* RCURLY # value_ValueList | MINUS? ( NUMBER | NUMBER_WITH_DECIMALS ) # value_Number | NULL_LITERAL # value_NULL | valueReference # value_ReferencedValue ; namedValue: LCASE_ID value ; valueReference: LCASE_ID // valuereference | ( UCASE_ID DOT LCASE_ID ) // modulereference.valuereference ; objIdComponents: LCASE_ID | NUMBER | LCASE_ID LPAREN NUMBER RPAREN ; /*--------------------- Constraints -------------------------------------------------*/ /* Constraint (see 49.6 in ITU-T X.680 (08/2015) */ /* Constraint ::= "(" ConstraintSpec ExceptionSpec ")" */ constraint: LPAREN subtypeConstraint // ( EXCLAMATION exceptionIdentification )? RPAREN ; subtypeConstraint: elementSetSpec ( COMMA ELLIPSIS elementSetSpec? )? ; elementSetSpec: unions | ALL_LITERAL EXCEPT_LITERAL elements // exclusions ; unions: intersections ( ( PIPE | UNION_LITERAL ) intersections )* ; intersections: intersectionElements ( ( POWER | INTERSECTION_LITERAL ) intersectionElements)* ; intersectionElements: elements ( EXCEPT_LITERAL elements)? ; elements: subtypeElements | LPAREN elementSetSpec RPAREN ; /* Subtype elements (see 51 in ITU-T X.680 (08/2015) */ subtypeElements: value # singleValue | INCLUDES_LITERAL? type # containedSubType | valueRange # range // including DurationRange, TimePointRange, RecurrenceRange | SIZE_LITERAL constraint # size | type # typeConstraint | FROM_LITERAL constraint # permittedAlphabet | WITH_LITERAL COMPONENT_LITERAL constraint # innerType | WITH_LITERAL COMPONENTS_LITERAL LCURLY ( ELLIPSIS COMMA )? typeConstraints RCURLY # innerTypeMultiple | PATTERN_LITERAL CSTRING # pattern // | SETTINGS_LITERAL propertyAndSettingPair propertyAndSettingPair* ; valueRange: ( value | MIN_LITERAL ) RANGE ( value | MAX_LITERAL ) # closedRange | value LESS_THAN # lowerEndPoint | LESS_THAN value # upperEndPoint ; typeConstraints: namedConstraint (COMMA namedConstraint)* ; namedConstraint: LCASE_ID constraint? ( PRESENT_LITERAL | ABSENT_LITERAL | OPTIONAL_LITERAL )? ; /*--------------------- LITERAL -----------------------------------------------------*/ DEFINITIONS_LITERAL: 'DEFINITIONS' ; BEGIN_LITERAL: 'BEGIN' ; END_LITERAL: 'END' ; INTEGER_LITERAL: 'INTEGER' ; EXPLICIT_LITERAL: 'EXPLICIT' ; IMPLICIT_LITERAL: 'IMPLICIT' ; AUTOMATIC_LITERAL: 'AUTOMATIC' ; TAGS_LITERAL: 'TAGS' ; EXTENSIBILITY_LITERAL: 'EXTENSIBILITY' ; IMPLIED_LITERAL: 'IMPLIED' ; EXPORTS_LITERAL: 'EXPORTS' ; IMPORTS_LITERAL: 'IMPORTS' ; FROM_LITERAL: 'FROM' ; ALL_LITERAL: 'ALL' ; BOOLEAN_LITERAL: 'BOOLEAN' ; NULL_LITERAL: 'NULL' ; BMPString_LITERAL: 'BMPString' ; GeneralString_LITERAL: 'GeneralString' ; GraphicString_LITERAL: 'GraphicString' ; IA5String_LITERAL: 'IA5String' ; ISO646String_LITERAL: 'ISO646String' ; NumericString_LITERAL: 'NumericString' ; PrintableString_LITERAL: 'PrintableString' ; TeletexString_LITERAL: 'TeletexString' ; T61String_LITERAL: 'T61String' ; UniversalString_LITERAL: 'UniversalString' ; UTF8String_LITERAL: 'UTF8String' ; VideotexString_LITERAL: 'VideotexString' ; VisibleString_LITERAL: 'VisibleString' ; CHARACTER_LITERAL: 'CHARACTER' ; OCTET_LITERAL: 'OCTET' ; STRING_LITERAL: 'STRING' ; REAL_LITERAL: 'REAL' ; BIT_LITERAL: 'BIT' ; DATE_LITERAL: 'DATE' ; DATE_TIME_LITERAL: 'DATE-TIME' ; DURATION_LITERAL: 'DURATION' ; TIME_LITERAL: 'TIME' ; TIME_OF_DAY_LITERAL: 'TIME-OF-DAY' ; ENUMERATED_LITERAL: 'ENUMERATED' ; EMBEDDED_LITERAL: 'EMBEDDED' ; PDV_LITERAL: 'PDV' ; EXTERNAL_LITERAL: 'EXTERNAL' ; OID_IRI_LITERAL: 'OID-IRI' ; OBJECT_LITERAL: 'OBJECT' ; IDENTIFIER_LITERAL: 'IDENTIFIER' ; RELATIVE_OID_IRI_LITERAL: 'RELATIVE-OID-IRI' ; RELATIVE_OID_LITERAL: 'RELATIVE-OID' ; CHOICE_LITERAL: 'CHOICE' ; SEQUENCE_LITERAL: 'SEQUENCE' ; SET_LITERAL: 'SET' ; OF_LITERAL: 'OF' ; UNIVERSAL_LITERAL: 'UNIVERSAL' ; APPLICATION_LITERAL: 'APPLICATION' ; PRIVATE_LITERAL: 'PRIVATE' ; OPTIONAL_LITERAL: 'OPTIONAL' ; COMPONENTS_LITERAL: 'COMPONENTS' ; PATTERN_LITERAL: 'PATTERN' ; TRUE_LITERAL: 'TRUE' ; FALSE_LITERAL: 'FALSE' ; SIZE_LITERAL: 'SIZE' ; EXCEPT_LITERAL: 'EXCEPT' ; UNION_LITERAL: 'UNION' ; INTERSECTION_LITERAL: 'INTERSECTION' ; MIN_LITERAL: 'MIN' ; MAX_LITERAL: 'MAX' ; INCLUDES_LITERAL: 'INCLUDES' ; WITH_LITERAL: 'WITH' ; COMPONENT_LITERAL: 'COMPONENT' ; PRESENT_LITERAL: 'PRESENT' ; ABSENT_LITERAL: 'ABSENT' ; DEFAULT_LITERAL: 'DEFAULT' ; GeneralizedTime_LITERAL: 'GeneralizedTime' ; UTCTime_LITERAL: 'UTCTime' ; ObjectDescriptor_LITERAL: 'ObjectDescriptor' ; /*--------------------- Lexical Items -----------------------------------------------*/ ASSIGN: '::=' ; LCURLY: '{' ; RCURLY: '}' ; LBRACKET: '[' ; RBRACKET: ']' ; DOUBLE_LBRACKET: '[[' ; DOUBLE_RBRACKET: ']]' ; LPAREN: '(' ; RPAREN: ')' ; SEMI: ';' ; COMMA: ',' ; MINUS: '-' ; DOT: '.' ; LESS_THAN: '<' ; COLON: ':' ; APOSTROPHE: '\'' ; ELLIPSIS: '...' ; RANGE: '..' ; POWER: '^' ; PIPE: '|' ; EXCLAMATION: '!' ; BSTRING: APOSTROPHE ('0'..'1')* '\'B' ; HSTRING: APOSTROPHE ('0'..'9'|'a'..'f'|'A'..'F')* '\'H' ; CSTRING: '"' ( EscapeSequence | ~('\\'|'"') )* '"' ; fragment EscapeSequence: '\\' ('b'|'t'|'n'|'f'|'r'|'"'|APOSTROPHE|'\\') ; /* typereference (see 12.2 in ITU-T X.680 (08/2015) */ UCASE_ID: ('A'..'Z') ('-'('a'..'z'|'A'..'Z'|'0'..'9')|('a'..'z'|'A'..'Z'|'0'..'9'))* ; LCASE_ID: ('a'..'z') ('-'('a'..'z'|'A'..'Z'|'0'..'9')|('a'..'z'|'A'..'Z'|'0'..'9'))* ; /* comment (see 12.6 in ITU-T X.680 (08/2015) */ LINE_COMMENT: '--' ~('\n'|'\r')* '\r'? '\n' ->skip ; /* white-space (see 12.1.6 in ITU-T X.680 (08/2015) */ WS: (' '|'\r'|'\t'|'\n') -> skip ; /* number (see 12.8 in ITU-T X.680 (08/2015) */ NUMBER: '0' | ('1'..'9')('0'..'9')* ; NUMBER_WITH_DECIMALS: ('0'..'9')('0'..'9')* '.' ('0'..'9')('0'..'9')* ; OTHER: . ;
oeis/074/A074558.asm
neoneye/loda-programs
11
175753
<filename>oeis/074/A074558.asm ; A074558: a(n) = 3^n + 7^n + 8^n. ; Submitted by <NAME> ; 3,18,122,882,6578,49818,380522,2922882,22548578,174591018,1356276122,10567438482,82561295378,646646418618,5076274366922,39931947947682,314707950326978,2484430456812618,19642812494812922,155514084423490482,1232713774391243378,9781917911398413018,77696797374802254122,617664557792929746882,4913947714532641164578,39120000483468415219818,311618935243846913810522,2483564001600418227036882,19802799650401683548730578,157962410666554344466593018,1260479379576278424119082122,10061295696318505679204320482 mov $3,$0 seq $0,74523 ; a(n) = 1^n + 7^n + 8^n. sub $0,1 mov $2,3 pow $2,$3 add $0,$2
programs/oeis/152/A152746.asm
karttu/loda
1
18603
<reponame>karttu/loda<gh_stars>1-10 ; A152746: Six times hexagonal numbers: 6*n*(2*n-1). ; 0,6,36,90,168,270,396,546,720,918,1140,1386,1656,1950,2268,2610,2976,3366,3780,4218,4680,5166,5676,6210,6768,7350,7956,8586,9240,9918,10620,11346,12096,12870,13668,14490,15336,16206,17100,18018,18960,19926,20916,21930,22968,24030,25116,26226,27360,28518,29700,30906,32136,33390,34668,35970,37296,38646,40020,41418,42840,44286,45756,47250,48768,50310,51876,53466,55080,56718,58380,60066,61776,63510,65268,67050,68856,70686,72540,74418,76320,78246,80196,82170,84168,86190,88236,90306,92400,94518,96660,98826,101016,103230,105468,107730,110016,112326,114660,117018,119400,121806,124236,126690,129168,131670,134196,136746,139320,141918,144540,147186,149856,152550,155268,158010,160776,163566,166380,169218,172080,174966,177876,180810,183768,186750,189756,192786,195840,198918,202020,205146,208296,211470,214668,217890,221136,224406,227700,231018,234360,237726,241116,244530,247968,251430,254916,258426,261960,265518,269100,272706,276336,279990,283668,287370,291096,294846,298620,302418,306240,310086,313956,317850,321768,325710,329676,333666,337680,341718,345780,349866,353976,358110,362268,366450,370656,374886,379140,383418,387720,392046,396396,400770,405168,409590,414036,418506,423000,427518,432060,436626,441216,445830,450468,455130,459816,464526,469260,474018,478800,483606,488436,493290,498168,503070,507996,512946,517920,522918,527940,532986,538056,543150,548268,553410,558576,563766,568980,574218,579480,584766,590076,595410,600768,606150,611556,616986,622440,627918,633420,638946,644496,650070,655668,661290,666936,672606,678300,684018,689760,695526,701316,707130,712968,718830,724716,730626,736560,742518 mul $0,2 bin $0,2 mov $1,$0 mul $1,6
programs/oeis/115/A115113.asm
neoneye/loda
22
2148
<gh_stars>10-100 ; A115113: a(n) = 3*a(n-1) + 4*a(n-2), with a(0) = 2, a(1) = 6. ; 2,6,10,54,202,822,3274,13110,52426,209718,838858,3355446,13421770,53687094,214748362,858993462,3435973834,13743895350,54975581386,219902325558,879609302218,3518437208886,14073748835530,56294995342134,225179981368522,900719925474102,3602879701896394,14411518807585590,57646075230342346,230584300921369398,922337203685477578,3689348814741910326,14757395258967641290,59029581035870565174,236118324143482260682,944473296573929042742,3777893186295716170954,15111572745182864683830,60446290980731458735306,241785163922925834941238,967140655691703339764938,3868562622766813359059766,15474250491067253436239050,61897001964269013744956214,247588007857076054979824842,990352031428304219919299382,3961408125713216879677197514,15845632502852867518708790070,63382530011411470074835160266,253530120045645880299340641078,1014120480182583521197362564298,4056481920730334084789450257206,16225927682921336339157801028810,64903710731685345356631204115254,259614842926741381426524816461002,1038459371706965525706099265844022,4153837486827862102824397063376074,16615349947311448411297588253504310,66461399789245793645190353014017226,265845599156983174580761412056068918 mul $0,2 trn $0,1 seq $0,133190 ; a(n) = 2*a(n-1) - a(n-2) + 2*a(n-3). mul $0,2
src/gen/gstreamer-gst_low_level-gstreamer_0_10_gst_rtsp_gstrtspconnection_h.ads
persan/A-gst
1
28242
<gh_stars>1-10 pragma Ada_2005; pragma Style_Checks (Off); pragma Warnings (Off); with Interfaces.C; use Interfaces.C; limited with GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspurl_h; with System; with GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h; with glib; with glib.Values; with System; with GLIB; -- with GStreamer.GST_Low_Level.glibconfig_h; limited with GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspmessage_h; package GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspconnection_h is -- GStreamer -- * Copyright (C) <2005,2009> <NAME> <<EMAIL>> -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Library General Public -- * License as published by the Free Software Foundation; either -- * version 2 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Library General Public License for more details. -- * -- * You should have received a copy of the GNU Library General Public -- * License along with this library; if not, write to the -- * Free Software Foundation, Inc., 59 Temple Place - Suite 330, -- * Boston, MA 02111-1307, USA. -- -- * Unless otherwise indicated, Source Code is licensed under MIT license. -- * See further explanation attached in License Statement (distributed in the file -- * LICENSE). -- * -- * Permission is hereby granted, free of charge, to any person obtaining a copy of -- * this software and associated documentation files (the "Software"), to deal in -- * the Software without restriction, including without limitation the rights to -- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -- * of the Software, and to permit persons to whom the Software is furnished to do -- * so, subject to the following conditions: -- * -- * The above copyright notice and this permission notice shall be included in all -- * copies or substantial portions of the Software. -- * -- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -- * SOFTWARE. -- --* -- * GstRTSPConnection: -- * -- * Opaque RTSP connection object. -- -- skipped empty struct u_GstRTSPConnection -- skipped empty struct GstRTSPConnection -- opening/closing a connection function gst_rtsp_connection_create (url : access constant GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspurl_h.GstRTSPUrl; conn : System.Address) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:63 pragma Import (C, gst_rtsp_connection_create, "gst_rtsp_connection_create"); function gst_rtsp_connection_create_from_fd (fd : GLIB.gint; ip : access GLIB.gchar; port : GLIB.guint16; initial_buffer : access GLIB.gchar; conn : System.Address) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:64 pragma Import (C, gst_rtsp_connection_create_from_fd, "gst_rtsp_connection_create_from_fd"); function gst_rtsp_connection_accept (sock : GLIB.gint; conn : System.Address) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:69 pragma Import (C, gst_rtsp_connection_accept, "gst_rtsp_connection_accept"); function gst_rtsp_connection_connect (conn : System.Address; timeout : access GStreamer.GST_Low_Level.glib_2_0_glib_gtypes_h.GTimeVal) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:70 pragma Import (C, gst_rtsp_connection_connect, "gst_rtsp_connection_connect"); function gst_rtsp_connection_close (conn : System.Address) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:71 pragma Import (C, gst_rtsp_connection_close, "gst_rtsp_connection_close"); function gst_rtsp_connection_free (conn : System.Address) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:72 pragma Import (C, gst_rtsp_connection_free, "gst_rtsp_connection_free"); -- sending/receiving raw bytes function gst_rtsp_connection_read (conn : System.Address; data : access GLIB.guint8; size : GLIB.guint; timeout : access GStreamer.GST_Low_Level.glib_2_0_glib_gtypes_h.GTimeVal) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:76 pragma Import (C, gst_rtsp_connection_read, "gst_rtsp_connection_read"); function gst_rtsp_connection_write (conn : System.Address; data : access GLIB.guint8; size : GLIB.guint; timeout : access GStreamer.GST_Low_Level.glib_2_0_glib_gtypes_h.GTimeVal) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:78 pragma Import (C, gst_rtsp_connection_write, "gst_rtsp_connection_write"); -- sending/receiving messages function gst_rtsp_connection_send (conn : System.Address; message : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspmessage_h.GstRTSPMessage; timeout : access GStreamer.GST_Low_Level.glib_2_0_glib_gtypes_h.GTimeVal) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:82 pragma Import (C, gst_rtsp_connection_send, "gst_rtsp_connection_send"); function gst_rtsp_connection_receive (conn : System.Address; message : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspmessage_h.GstRTSPMessage; timeout : access GStreamer.GST_Low_Level.glib_2_0_glib_gtypes_h.GTimeVal) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:84 pragma Import (C, gst_rtsp_connection_receive, "gst_rtsp_connection_receive"); -- status management function gst_rtsp_connection_poll (conn : System.Address; events : GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPEvent; revents : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPEvent; timeout : access GStreamer.GST_Low_Level.glib_2_0_glib_gtypes_h.GTimeVal) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:88 pragma Import (C, gst_rtsp_connection_poll, "gst_rtsp_connection_poll"); -- reset the timeout function gst_rtsp_connection_next_timeout (conn : System.Address; timeout : access GStreamer.GST_Low_Level.glib_2_0_glib_gtypes_h.GTimeVal) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:92 pragma Import (C, gst_rtsp_connection_next_timeout, "gst_rtsp_connection_next_timeout"); function gst_rtsp_connection_reset_timeout (conn : System.Address) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:93 pragma Import (C, gst_rtsp_connection_reset_timeout, "gst_rtsp_connection_reset_timeout"); -- flushing state function gst_rtsp_connection_flush (conn : System.Address; flush : GLIB.gboolean) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:96 pragma Import (C, gst_rtsp_connection_flush, "gst_rtsp_connection_flush"); -- HTTP proxy support function gst_rtsp_connection_set_proxy (conn : System.Address; host : access GLIB.gchar; port : GLIB.guint) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:99 pragma Import (C, gst_rtsp_connection_set_proxy, "gst_rtsp_connection_set_proxy"); -- configure authentication data function gst_rtsp_connection_set_auth (conn : System.Address; method : GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPAuthMethod; user : access GLIB.gchar; pass : access GLIB.gchar) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:103 pragma Import (C, gst_rtsp_connection_set_auth, "gst_rtsp_connection_set_auth"); procedure gst_rtsp_connection_set_auth_param (conn : System.Address; param : access GLIB.gchar; value : access GLIB.gchar); -- gst/rtsp/gstrtspconnection.h:106 pragma Import (C, gst_rtsp_connection_set_auth_param, "gst_rtsp_connection_set_auth_param"); procedure gst_rtsp_connection_clear_auth_params (conn : System.Address); -- gst/rtsp/gstrtspconnection.h:109 pragma Import (C, gst_rtsp_connection_clear_auth_params, "gst_rtsp_connection_clear_auth_params"); -- configure DSCP function gst_rtsp_connection_set_qos_dscp (conn : System.Address; qos_dscp : GLIB.guint) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:112 pragma Import (C, gst_rtsp_connection_set_qos_dscp, "gst_rtsp_connection_set_qos_dscp"); -- accessors function gst_rtsp_connection_get_url (conn : System.Address) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspurl_h.GstRTSPUrl; -- gst/rtsp/gstrtspconnection.h:116 pragma Import (C, gst_rtsp_connection_get_url, "gst_rtsp_connection_get_url"); function gst_rtsp_connection_get_ip (conn : System.Address) return access GLIB.gchar; -- gst/rtsp/gstrtspconnection.h:117 pragma Import (C, gst_rtsp_connection_get_ip, "gst_rtsp_connection_get_ip"); procedure gst_rtsp_connection_set_ip (conn : System.Address; ip : access GLIB.gchar); -- gst/rtsp/gstrtspconnection.h:118 pragma Import (C, gst_rtsp_connection_set_ip, "gst_rtsp_connection_set_ip"); function gst_rtsp_connection_get_readfd (conn : System.Address) return GLIB.gint; -- gst/rtsp/gstrtspconnection.h:120 pragma Import (C, gst_rtsp_connection_get_readfd, "gst_rtsp_connection_get_readfd"); function gst_rtsp_connection_get_writefd (conn : System.Address) return GLIB.gint; -- gst/rtsp/gstrtspconnection.h:121 pragma Import (C, gst_rtsp_connection_get_writefd, "gst_rtsp_connection_get_writefd"); procedure gst_rtsp_connection_set_http_mode (conn : System.Address; enable : GLIB.gboolean); -- gst/rtsp/gstrtspconnection.h:123 pragma Import (C, gst_rtsp_connection_set_http_mode, "gst_rtsp_connection_set_http_mode"); -- tunneling procedure gst_rtsp_connection_set_tunneled (conn : System.Address; tunneled : GLIB.gboolean); -- gst/rtsp/gstrtspconnection.h:127 pragma Import (C, gst_rtsp_connection_set_tunneled, "gst_rtsp_connection_set_tunneled"); function gst_rtsp_connection_is_tunneled (conn : System.Address) return GLIB.gboolean; -- gst/rtsp/gstrtspconnection.h:128 pragma Import (C, gst_rtsp_connection_is_tunneled, "gst_rtsp_connection_is_tunneled"); function gst_rtsp_connection_get_tunnelid (conn : System.Address) return access GLIB.gchar; -- gst/rtsp/gstrtspconnection.h:130 pragma Import (C, gst_rtsp_connection_get_tunnelid, "gst_rtsp_connection_get_tunnelid"); function gst_rtsp_connection_do_tunnel (conn : System.Address; conn2 : System.Address) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:131 pragma Import (C, gst_rtsp_connection_do_tunnel, "gst_rtsp_connection_do_tunnel"); -- async IO --* -- * GstRTSPWatch: -- * -- * Opaque RTSP watch object that can be used for asynchronous RTSP -- * operations. -- -- skipped empty struct u_GstRTSPWatch -- skipped empty struct GstRTSPWatch --* -- * GstRTSPWatchFuncs: -- * @message_received: callback when a message was received -- * @message_sent: callback when a message was sent -- * @closed: callback when the connection is closed -- * @error: callback when an error occured -- * @tunnel_start: a client started a tunneled connection. The tunnelid of the -- * connection must be saved. -- * @tunnel_complete: a client finished a tunneled connection. In this callback -- * you usually pair the tunnelid of this connection with the saved one using -- * gst_rtsp_connection_do_tunnel(). -- * @error_full: callback when an error occured with more information than -- * the @error callback. Since 0.10.25 -- * @tunnel_lost: callback when the post connection of a tunnel is closed. -- * Since 0.10.29 -- * -- * Callback functions from a #GstRTSPWatch. -- * -- * Since: 0.10.23 -- type GstRTSPWatchFuncs_u_gst_reserved_array is array (0 .. 1) of System.Address; type GstRTSPWatchFuncs is record message_received : access function (arg1 : System.Address; arg2 : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspmessage_h.GstRTSPMessage; arg3 : System.Address) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:165 message_sent : access function (arg1 : System.Address; arg2 : GLIB.guint; arg3 : System.Address) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:167 closed : access function (arg1 : System.Address; arg2 : System.Address) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:168 error : access function (arg1 : System.Address; arg2 : GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; arg3 : System.Address) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:170 tunnel_start : access function (arg1 : System.Address; arg2 : System.Address) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPStatusCode; -- gst/rtsp/gstrtspconnection.h:171 tunnel_complete : access function (arg1 : System.Address; arg2 : System.Address) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:172 error_full : access function (arg1 : System.Address; arg2 : GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; arg3 : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspmessage_h.GstRTSPMessage; arg4 : GLIB.guint; arg5 : System.Address) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:175 tunnel_lost : access function (arg1 : System.Address; arg2 : System.Address) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:176 u_gst_reserved : GstRTSPWatchFuncs_u_gst_reserved_array; -- gst/rtsp/gstrtspconnection.h:179 end record; pragma Convention (C_Pass_By_Copy, GstRTSPWatchFuncs); -- gst/rtsp/gstrtspconnection.h:180 -- skipped anonymous struct anon_414 --< private > function gst_rtsp_watch_new (conn : System.Address; funcs : access GstRTSPWatchFuncs; user_data : System.Address; notify : GStreamer.GST_Low_Level.glib_2_0_glib_gtypes_h.GDestroyNotify) return System.Address; -- gst/rtsp/gstrtspconnection.h:182 pragma Import (C, gst_rtsp_watch_new, "gst_rtsp_watch_new"); procedure gst_rtsp_watch_reset (watch : System.Address); -- gst/rtsp/gstrtspconnection.h:186 pragma Import (C, gst_rtsp_watch_reset, "gst_rtsp_watch_reset"); procedure gst_rtsp_watch_unref (watch : System.Address); -- gst/rtsp/gstrtspconnection.h:187 pragma Import (C, gst_rtsp_watch_unref, "gst_rtsp_watch_unref"); function gst_rtsp_watch_attach (watch : System.Address; context : System.Address) return GLIB.guint; -- gst/rtsp/gstrtspconnection.h:189 pragma Import (C, gst_rtsp_watch_attach, "gst_rtsp_watch_attach"); function gst_rtsp_watch_write_data (watch : System.Address; data : access GLIB.guint8; size : GLIB.guint; id : access GLIB.guint) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:192 pragma Import (C, gst_rtsp_watch_write_data, "gst_rtsp_watch_write_data"); function gst_rtsp_watch_send_message (watch : System.Address; message : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspmessage_h.GstRTSPMessage; id : access GLIB.guint) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspconnection.h:195 pragma Import (C, gst_rtsp_watch_send_message, "gst_rtsp_watch_send_message"); function gst_rtsp_watch_queue_data (watch : System.Address; data : access GLIB.guint8; size : GLIB.guint) return GLIB.guint; -- gst/rtsp/gstrtspconnection.h:200 pragma Import (C, gst_rtsp_watch_queue_data, "gst_rtsp_watch_queue_data"); function gst_rtsp_watch_queue_message (watch : System.Address; message : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspmessage_h.GstRTSPMessage) return GLIB.guint; -- gst/rtsp/gstrtspconnection.h:203 pragma Import (C, gst_rtsp_watch_queue_message, "gst_rtsp_watch_queue_message"); end GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspconnection_h;
third_party/virtualbox/src/VBox/Runtime/common/string/strcpy.asm
Fimbure/icebox-1
521
6365
<filename>third_party/virtualbox/src/VBox/Runtime/common/string/strcpy.asm ; $Id: strcpy.asm $ ;; @file ; IPRT - No-CRT strcpy - AMD64 & X86. ; ; ; Copyright (C) 2006-2017 Oracle Corporation ; ; This file is part of VirtualBox Open Source Edition (OSE), as ; available from http://www.virtualbox.org. This file is free software; ; you can redistribute it and/or modify it under the terms of the GNU ; General Public License (GPL) as published by the Free Software ; Foundation, in version 2 as it comes in the "COPYING" file of the ; VirtualBox OSE distribution. VirtualBox OSE is distributed in the ; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. ; ; The contents of this file may alternatively be used under the terms ; of the Common Development and Distribution License Version 1.0 ; (CDDL) only, as it comes in the "COPYING.CDDL" file of the ; VirtualBox OSE distribution, in which case the provisions of the ; CDDL are applicable instead of those of the GPL. ; ; You may elect to license modified versions of this file under the ; terms and conditions of either the GPL or the CDDL or both. ; %include "iprt/asmdefs.mac" BEGINCODE ;; ; @param pszDst gcc: rdi msc: rcx x86:[esp+4] ; @param pszSrc gcc: rsi msc: rdx x86:[esp+8] RT_NOCRT_BEGINPROC strcpy ; input %ifdef RT_ARCH_AMD64 %ifdef ASM_CALL64_MSC %define pszDst rcx %define pszSrc rdx %else %define pszDst rdi %define pszSrc rsi %endif mov r8, pszDst %else mov ecx, [esp + 4] mov edx, [esp + 8] %define pszDst ecx %define pszSrc edx push pszDst %endif ; ; The loop. ; .next: mov al, [pszSrc] mov [pszDst], al test al, al jz .done mov al, [pszSrc + 1] mov [pszDst + 1], al test al, al jz .done mov al, [pszSrc + 2] mov [pszDst + 2], al test al, al jz .done mov al, [pszSrc + 3] mov [pszDst + 3], al test al, al jz .done add pszDst, 4 add pszSrc, 4 jmp .next .done: %ifdef RT_ARCH_AMD64 mov rax, r8 %else pop eax %endif ret ENDPROC RT_NOCRT(strcpy)
c_projects/project1/boot/disk_load.asm
darbinreyes/subparprogrammer
0
170409
; Section 3.6.4 Putting it all Together. ; load DH sectors to ES:BX from drive DL. disk_load: push dx ; Push DX on the stack so we can use DH for error checking after ; int 0x13 returns. mov ah, 0x02 ; Specify the BIOS read sector function. mov al, dh ; Specify the number of sectors to read. ; DL contains the drive number to read from, below, we specify the ; starting cylinder-head-sector address. mov ch, 0x00 ; Select cylinder 0. mov dh, 0x00 ; Select head (= track) 0. mov cl, 0x02 ; Select 2nd sector. (This is a 1 based index). ; (If DL is set to the boot disk drive, this sector is the one ; after our boot sector.) int 0x13 ; BIOS interrupt for disk device access. jc disk_error ; Carry flag set means general fault (= error) occurred. pop dx ; Restore DX register value, DH = requested number of sectors ; DL = disk drive number. (DX is set by caller of this function.) cmp dh, al ; AL = number of sectors actually read, if these aren't equal an ; error occurred. jne disk_error_al ret ; DONE! disk_error: mov bx, DISK_ERROR_MSG call print_string jmp $ ; Infinite loop. disk_error_al: mov bx, DISK_ERROR_MSG_AL call print_string jmp $ ; Infinite loop. ; Variables. DISK_ERROR_MSG: db "CF set. Disk read error!", 0 ; NEED ":" HERE? ANS: No. Works the same. Assembler doesn't report an error . DISK_ERROR_MSG_AL: db "DH != AL. Disk read error!", 0
courses/spark_for_ada_programmers/labs/answers/130_state_abstractions/globals/reverser.adb
AdaCore/training_material
15
17810
package body Reverser with SPARK_Mode is procedure Reverse_Array (A : in out Array_Of_Items) is begin for I in A'Range loop exit when Is_Full; Push (A (I)); end loop; for J in A'Range loop exit when Is_Empty; Pop (A (J)); end loop; end Reverse_Array; end Reverser;
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_1399.asm
ljhsiun2/medusa
9
21031
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r13 push %r8 push %rax push %rcx push %rdi push %rdx push %rsi lea addresses_WC_ht+0x149a5, %r8 clflush (%r8) nop nop cmp %r10, %r10 mov (%r8), %rax nop nop nop nop nop cmp %r13, %r13 lea addresses_WT_ht+0x5165, %rdi nop nop nop xor %rdx, %rdx mov (%rdi), %r10 nop nop dec %rdx lea addresses_A_ht+0x10afd, %rdx nop nop nop nop and $47029, %rsi mov $0x6162636465666768, %rax movq %rax, %xmm7 movups %xmm7, (%rdx) nop nop nop xor %r10, %r10 lea addresses_WT_ht+0xc965, %rsi lea addresses_A_ht+0xd565, %rdi clflush (%rsi) clflush (%rdi) nop add $23023, %r8 mov $68, %rcx rep movsl nop nop nop nop sub $54067, %rsi lea addresses_A_ht+0x4de5, %rdi clflush (%rdi) nop nop nop sub $22875, %r10 mov (%rdi), %r13 cmp %r8, %r8 pop %rsi pop %rdx pop %rdi pop %rcx pop %rax pop %r8 pop %r13 pop %r10 ret .global s_faulty_load s_faulty_load: push %rax push %rbp push %rbx push %rdi push %rdx // Faulty Load lea addresses_WC+0x10d65, %rdx nop add %rdi, %rdi mov (%rdx), %bp lea oracles, %rax and $0xff, %rbp shlq $12, %rbp mov (%rax,%rbp,1), %rbp pop %rdx pop %rdi pop %rbx pop %rbp pop %rax ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_WC', 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_WC', 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WC_ht', 'congruent': 5}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WT_ht', 'congruent': 10}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_A_ht', 'congruent': 2}, 'OP': 'STOR'} {'dst': {'same': False, 'congruent': 7, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_WT_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_A_ht', 'congruent': 7}} {'38': 21829} 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 */
Projects/SchoolProjects/Project 2/ReverseArray.asm
Mani9723/X86-MASM-Assembly
0
26526
INCLUDE Irvine32.inc .data array DWORD 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 introduction BYTE "ORIGINIAL ARRAY: ", 0 NewArray BYTE "REVERSED ARRAY: " ,0 space BYTE " ", 0 .code main PROC mov edx, OFFSET introduction ; The OFFSET of intro is moved to edx call writestring ; print the edx register mov ecx, [LENGTHOF array] - 1 ; initialize the the loop counter mov esi, OFFSET array ; move to esi the address of the firt value mov eax, [esi] ; move to eax the value at [esi] call writedec mov al, space ; print the value call writechar L1: add esi, TYPE array ; the to esi the type of value of array (4) mov eax, [esi] ; mov to eax the value at that address call writedec ; print, decrement ecx and loop again mov al, space call writechar loop L1 call crlf mov edx, OFFSET NewArray ; move to edx the OFFSET of newArray call writestring ; print the newArray mov ecx, [LENGTHOF array] - 1 ; initialize the second loop counter mov eax, [esi] ; move to eax the value at the OFFSET [esi] call writedec ; print mov al, space call writechar L2: sub esi, TYPE array ; subtract 4 from the last OFFSET of the array mov eax, [esi] ; mov to eax the value at [esi] call writedec ; print decrement to the begining of the array/loop mov al, space call writechar loop L2 call crlf exit main endp end main
src/gnat/lib.adb
My-Colaborations/dynamo
15
9699
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- L I B -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2015, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ pragma Style_Checks (All_Checks); -- Subprogram ordering not enforced in this unit -- (because of some logical groupings). with Atree; use Atree; with Csets; use Csets; with Einfo; use Einfo; with Fname; use Fname; with Nlists; use Nlists; with Output; use Output; with Sinfo; use Sinfo; with Sinput; use Sinput; with Stand; use Stand; with Stringt; use Stringt; with Tree_IO; use Tree_IO; with Uname; use Uname; with Widechar; use Widechar; package body Lib is Switch_Storing_Enabled : Boolean := True; -- Controlled by Enable_Switch_Storing/Disable_Switch_Storing ----------------------- -- Local Subprograms -- ----------------------- type SEU_Result is ( Yes_Before, -- S1 is in same extended unit as S2 and appears before it Yes_Same, -- S1 is in same extended unit as S2, Slocs are the same Yes_After, -- S1 is in same extended unit as S2, and appears after it No); -- S2 is not in same extended unit as S2 function Check_Same_Extended_Unit (S1, S2 : Source_Ptr) return SEU_Result; -- Used by In_Same_Extended_Unit and Earlier_In_Extended_Unit. Returns -- value as described above. function Get_Code_Or_Source_Unit (S : Source_Ptr; Unwind_Instances : Boolean) return Unit_Number_Type; -- Common code for Get_Code_Unit (get unit of instantiation for location) -- and Get_Source_Unit (get unit of template for location). -------------------------------------------- -- Access Functions for Unit Table Fields -- -------------------------------------------- function Cunit (U : Unit_Number_Type) return Node_Id is begin return Units.Table (U).Cunit; end Cunit; function Cunit_Entity (U : Unit_Number_Type) return Entity_Id is begin return Units.Table (U).Cunit_Entity; end Cunit_Entity; function Dependency_Num (U : Unit_Number_Type) return Nat is begin return Units.Table (U).Dependency_Num; end Dependency_Num; function Dynamic_Elab (U : Unit_Number_Type) return Boolean is begin return Units.Table (U).Dynamic_Elab; end Dynamic_Elab; function Error_Location (U : Unit_Number_Type) return Source_Ptr is begin return Units.Table (U).Error_Location; end Error_Location; function Expected_Unit (U : Unit_Number_Type) return Unit_Name_Type is begin return Units.Table (U).Expected_Unit; end Expected_Unit; function Fatal_Error (U : Unit_Number_Type) return Fatal_Type is begin return Units.Table (U).Fatal_Error; end Fatal_Error; function Generate_Code (U : Unit_Number_Type) return Boolean is begin return Units.Table (U).Generate_Code; end Generate_Code; function Has_RACW (U : Unit_Number_Type) return Boolean is begin return Units.Table (U).Has_RACW; end Has_RACW; function Ident_String (U : Unit_Number_Type) return Node_Id is begin return Units.Table (U).Ident_String; end Ident_String; function Loading (U : Unit_Number_Type) return Boolean is begin return Units.Table (U).Loading; end Loading; function Main_CPU (U : Unit_Number_Type) return Int is begin return Units.Table (U).Main_CPU; end Main_CPU; function Main_Priority (U : Unit_Number_Type) return Int is begin return Units.Table (U).Main_Priority; end Main_Priority; function Munit_Index (U : Unit_Number_Type) return Nat is begin return Units.Table (U).Munit_Index; end Munit_Index; function No_Elab_Code_All (U : Unit_Number_Type) return Boolean is begin return Units.Table (U).No_Elab_Code_All; end No_Elab_Code_All; function OA_Setting (U : Unit_Number_Type) return Character is begin return Units.Table (U).OA_Setting; end OA_Setting; function Source_Index (U : Unit_Number_Type) return Source_File_Index is begin return Units.Table (U).Source_Index; end Source_Index; function Unit_File_Name (U : Unit_Number_Type) return File_Name_Type is begin return Units.Table (U).Unit_File_Name; end Unit_File_Name; function Unit_Name (U : Unit_Number_Type) return Unit_Name_Type is begin return Units.Table (U).Unit_Name; end Unit_Name; ------------------------------------------ -- Subprograms to Set Unit Table Fields -- ------------------------------------------ procedure Set_Cunit (U : Unit_Number_Type; N : Node_Id) is begin Units.Table (U).Cunit := N; end Set_Cunit; procedure Set_Cunit_Entity (U : Unit_Number_Type; E : Entity_Id) is begin Units.Table (U).Cunit_Entity := E; Set_Is_Compilation_Unit (E); end Set_Cunit_Entity; procedure Set_Dynamic_Elab (U : Unit_Number_Type; B : Boolean := True) is begin Units.Table (U).Dynamic_Elab := B; end Set_Dynamic_Elab; procedure Set_Error_Location (U : Unit_Number_Type; W : Source_Ptr) is begin Units.Table (U).Error_Location := W; end Set_Error_Location; procedure Set_Fatal_Error (U : Unit_Number_Type; V : Fatal_Type) is begin Units.Table (U).Fatal_Error := V; end Set_Fatal_Error; procedure Set_Generate_Code (U : Unit_Number_Type; B : Boolean := True) is begin Units.Table (U).Generate_Code := B; end Set_Generate_Code; procedure Set_Has_RACW (U : Unit_Number_Type; B : Boolean := True) is begin Units.Table (U).Has_RACW := B; end Set_Has_RACW; procedure Set_Ident_String (U : Unit_Number_Type; N : Node_Id) is begin Units.Table (U).Ident_String := N; end Set_Ident_String; procedure Set_Loading (U : Unit_Number_Type; B : Boolean := True) is begin Units.Table (U).Loading := B; end Set_Loading; procedure Set_Main_CPU (U : Unit_Number_Type; P : Int) is begin Units.Table (U).Main_CPU := P; end Set_Main_CPU; procedure Set_Main_Priority (U : Unit_Number_Type; P : Int) is begin Units.Table (U).Main_Priority := P; end Set_Main_Priority; procedure Set_No_Elab_Code_All (U : Unit_Number_Type; B : Boolean := True) is begin Units.Table (U).No_Elab_Code_All := B; end Set_No_Elab_Code_All; procedure Set_OA_Setting (U : Unit_Number_Type; C : Character) is begin Units.Table (U).OA_Setting := C; end Set_OA_Setting; procedure Set_Unit_Name (U : Unit_Number_Type; N : Unit_Name_Type) is begin Units.Table (U).Unit_Name := N; end Set_Unit_Name; ------------------------------ -- Check_Same_Extended_Unit -- ------------------------------ function Check_Same_Extended_Unit (S1, S2 : Source_Ptr) return SEU_Result is Sloc1 : Source_Ptr; Sloc2 : Source_Ptr; Sind1 : Source_File_Index; Sind2 : Source_File_Index; Inst1 : Source_Ptr; Inst2 : Source_Ptr; Unum1 : Unit_Number_Type; Unum2 : Unit_Number_Type; Unit1 : Node_Id; Unit2 : Node_Id; Depth1 : Nat; Depth2 : Nat; begin if S1 = No_Location or else S2 = No_Location then return No; elsif S1 = Standard_Location then if S2 = Standard_Location then return Yes_Same; else return No; end if; elsif S2 = Standard_Location then return No; end if; Sloc1 := S1; Sloc2 := S2; Unum1 := Get_Source_Unit (Sloc1); Unum2 := Get_Source_Unit (Sloc2); loop -- Step 1: Check whether the two locations are in the same source -- file. Sind1 := Get_Source_File_Index (Sloc1); Sind2 := Get_Source_File_Index (Sloc2); if Sind1 = Sind2 then if Sloc1 < Sloc2 then return Yes_Before; elsif Sloc1 > Sloc2 then return Yes_After; else return Yes_Same; end if; end if; -- Step 2: Check subunits. If a subunit is instantiated, follow the -- instantiation chain rather than the stub chain. Unit1 := Unit (Cunit (Unum1)); Unit2 := Unit (Cunit (Unum2)); Inst1 := Instantiation (Sind1); Inst2 := Instantiation (Sind2); if Nkind (Unit1) = N_Subunit and then Present (Corresponding_Stub (Unit1)) and then Inst1 = No_Location then if Nkind (Unit2) = N_Subunit and then Present (Corresponding_Stub (Unit2)) and then Inst2 = No_Location then -- Both locations refer to subunits which may have a common -- ancestor. If they do, the deeper subunit must have a longer -- unit name. Replace the deeper one with its corresponding -- stub in order to find the nearest ancestor. if Length_Of_Name (Unit_Name (Unum1)) < Length_Of_Name (Unit_Name (Unum2)) then Sloc2 := Sloc (Corresponding_Stub (Unit2)); Unum2 := Get_Source_Unit (Sloc2); goto Continue; else Sloc1 := Sloc (Corresponding_Stub (Unit1)); Unum1 := Get_Source_Unit (Sloc1); goto Continue; end if; -- Sloc1 in subunit, Sloc2 not else Sloc1 := Sloc (Corresponding_Stub (Unit1)); Unum1 := Get_Source_Unit (Sloc1); goto Continue; end if; -- Sloc2 in subunit, Sloc1 not elsif Nkind (Unit2) = N_Subunit and then Present (Corresponding_Stub (Unit2)) and then Inst2 = No_Location then Sloc2 := Sloc (Corresponding_Stub (Unit2)); Unum2 := Get_Source_Unit (Sloc2); goto Continue; end if; -- Step 3: Check instances. The two locations may yield a common -- ancestor. if Inst1 /= No_Location then if Inst2 /= No_Location then -- Both locations denote instantiations Depth1 := Instantiation_Depth (Sloc1); Depth2 := Instantiation_Depth (Sloc2); if Depth1 < Depth2 then Sloc2 := Inst2; Unum2 := Get_Source_Unit (Sloc2); goto Continue; elsif Depth1 > Depth2 then Sloc1 := Inst1; Unum1 := Get_Source_Unit (Sloc1); goto Continue; else Sloc1 := Inst1; Sloc2 := Inst2; Unum1 := Get_Source_Unit (Sloc1); Unum2 := Get_Source_Unit (Sloc2); goto Continue; end if; -- Sloc1 is an instantiation else Sloc1 := Inst1; Unum1 := Get_Source_Unit (Sloc1); goto Continue; end if; -- Sloc2 is an instantiation elsif Inst2 /= No_Location then Sloc2 := Inst2; Unum2 := Get_Source_Unit (Sloc2); goto Continue; end if; -- Step 4: One location in the spec, the other in the corresponding -- body of the same unit. The location in the spec is considered -- earlier. if Nkind (Unit1) = N_Subprogram_Body or else Nkind (Unit1) = N_Package_Body then if Library_Unit (Cunit (Unum1)) = Cunit (Unum2) then return Yes_After; end if; elsif Nkind (Unit2) = N_Subprogram_Body or else Nkind (Unit2) = N_Package_Body then if Library_Unit (Cunit (Unum2)) = Cunit (Unum1) then return Yes_Before; end if; end if; -- At this point it is certain that the two locations denote two -- entirely separate units. return No; <<Continue>> null; end loop; end Check_Same_Extended_Unit; ------------------------------- -- Compilation_Switches_Last -- ------------------------------- function Compilation_Switches_Last return Nat is begin return Compilation_Switches.Last; end Compilation_Switches_Last; --------------------------- -- Enable_Switch_Storing -- --------------------------- procedure Enable_Switch_Storing is begin Switch_Storing_Enabled := True; end Enable_Switch_Storing; ---------------------------- -- Disable_Switch_Storing -- ---------------------------- procedure Disable_Switch_Storing is begin Switch_Storing_Enabled := False; end Disable_Switch_Storing; ------------------------------ -- Earlier_In_Extended_Unit -- ------------------------------ function Earlier_In_Extended_Unit (S1, S2 : Source_Ptr) return Boolean is begin return Check_Same_Extended_Unit (S1, S2) = Yes_Before; end Earlier_In_Extended_Unit; ----------------------- -- Exact_Source_Name -- ----------------------- function Exact_Source_Name (Loc : Source_Ptr) return String is U : constant Unit_Number_Type := Get_Source_Unit (Loc); Buf : constant Source_Buffer_Ptr := Source_Text (Source_Index (U)); Orig : constant Source_Ptr := Original_Location (Loc); P : Source_Ptr; WC : Char_Code; Err : Boolean; pragma Warnings (Off, WC); pragma Warnings (Off, Err); begin -- Entity is character literal if Buf (Orig) = ''' then return String (Buf (Orig .. Orig + 2)); -- Entity is operator symbol elsif Buf (Orig) = '"' or else Buf (Orig) = '%' then P := Orig; loop P := P + 1; exit when Buf (P) = Buf (Orig); end loop; return String (Buf (Orig .. P)); -- Entity is identifier else P := Orig; loop if Is_Start_Of_Wide_Char (Buf, P) then Scan_Wide (Buf, P, WC, Err); elsif not Identifier_Char (Buf (P)) then exit; else P := P + 1; end if; end loop; -- Write out the identifier by copying the exact source characters -- used in its declaration. Note that this means wide characters will -- be in their original encoded form. return String (Buf (Orig .. P - 1)); end if; end Exact_Source_Name; ---------------------------- -- Entity_Is_In_Main_Unit -- ---------------------------- function Entity_Is_In_Main_Unit (E : Entity_Id) return Boolean is S : Entity_Id; begin S := Scope (E); while S /= Standard_Standard loop if S = Main_Unit_Entity then return True; elsif Ekind (S) = E_Package and then Is_Child_Unit (S) then return False; else S := Scope (S); end if; end loop; return False; end Entity_Is_In_Main_Unit; -------------------------- -- Generic_May_Lack_ALI -- -------------------------- function Generic_May_Lack_ALI (Sfile : File_Name_Type) return Boolean is begin -- We allow internal generic units to be used without having a -- corresponding ALI files to help bootstrapping with older compilers -- that did not support generating ALIs for such generics. It is safe -- to do so because the only thing the generated code would contain -- is the elaboration boolean, and we are careful to elaborate all -- predefined units first anyway. return Is_Internal_File_Name (Fname => Sfile, Renamings_Included => True); end Generic_May_Lack_ALI; ----------------------------- -- Get_Code_Or_Source_Unit -- ----------------------------- function Get_Code_Or_Source_Unit (S : Source_Ptr; Unwind_Instances : Boolean) return Unit_Number_Type is begin -- Search table unless we have No_Location, which can happen if the -- relevant location has not been set yet. Happens for example when -- we obtain Sloc (Cunit (Main_Unit)) before it is set. if S /= No_Location then declare Source_File : Source_File_Index; Source_Unit : Unit_Number_Type; begin Source_File := Get_Source_File_Index (S); if Unwind_Instances then while Template (Source_File) /= No_Source_File loop Source_File := Template (Source_File); end loop; end if; Source_Unit := Unit (Source_File); if Source_Unit /= No_Unit then return Source_Unit; end if; end; end if; -- If S was No_Location, or was not in the table, we must be in the main -- source unit (and the value has not been placed in the table yet), -- or in one of the configuration pragma files. return Main_Unit; end Get_Code_Or_Source_Unit; ------------------- -- Get_Code_Unit -- ------------------- function Get_Code_Unit (S : Source_Ptr) return Unit_Number_Type is begin return Get_Code_Or_Source_Unit (Top_Level_Location (S), Unwind_Instances => False); end Get_Code_Unit; function Get_Code_Unit (N : Node_Or_Entity_Id) return Unit_Number_Type is begin return Get_Code_Unit (Sloc (N)); end Get_Code_Unit; ---------------------------- -- Get_Compilation_Switch -- ---------------------------- function Get_Compilation_Switch (N : Pos) return String_Ptr is begin if N <= Compilation_Switches.Last then return Compilation_Switches.Table (N); else return null; end if; end Get_Compilation_Switch; ---------------------------------- -- Get_Cunit_Entity_Unit_Number -- ---------------------------------- function Get_Cunit_Entity_Unit_Number (E : Entity_Id) return Unit_Number_Type is begin for U in Units.First .. Units.Last loop if Cunit_Entity (U) = E then return U; end if; end loop; -- If not in the table, must be the main source unit, and we just -- have not got it put into the table yet. return Main_Unit; end Get_Cunit_Entity_Unit_Number; --------------------------- -- Get_Cunit_Unit_Number -- --------------------------- function Get_Cunit_Unit_Number (N : Node_Id) return Unit_Number_Type is begin for U in Units.First .. Units.Last loop if Cunit (U) = N then return U; end if; end loop; -- If not in the table, must be a spec created for a main unit that is a -- child subprogram body which we have not inserted into the table yet. if N = Library_Unit (Cunit (Main_Unit)) then return Main_Unit; -- If it is anything else, something is seriously wrong, and we really -- don't want to proceed, even if assertions are off, so we explicitly -- raise an exception in this case to terminate compilation. else raise Program_Error; end if; end Get_Cunit_Unit_Number; --------------------- -- Get_Source_Unit -- --------------------- function Get_Source_Unit (S : Source_Ptr) return Unit_Number_Type is begin return Get_Code_Or_Source_Unit (S, Unwind_Instances => True); end Get_Source_Unit; function Get_Source_Unit (N : Node_Or_Entity_Id) return Unit_Number_Type is begin return Get_Source_Unit (Sloc (N)); end Get_Source_Unit; -------------------------------- -- In_Extended_Main_Code_Unit -- -------------------------------- function In_Extended_Main_Code_Unit (N : Node_Or_Entity_Id) return Boolean is begin if Sloc (N) = Standard_Location then return False; elsif Sloc (N) = No_Location then return False; -- Special case Itypes to test the Sloc of the associated node. The -- reason we do this is for possible calls from gigi after -gnatD -- processing is complete in sprint. This processing updates the -- sloc fields of all nodes in the tree, but itypes are not in the -- tree so their slocs do not get updated. elsif Nkind (N) = N_Defining_Identifier and then Is_Itype (N) then return In_Extended_Main_Code_Unit (Associated_Node_For_Itype (N)); -- Otherwise see if we are in the main unit elsif Get_Code_Unit (Sloc (N)) = Get_Code_Unit (Cunit (Main_Unit)) then return True; -- Node may be in spec (or subunit etc) of main unit else return In_Same_Extended_Unit (N, Cunit (Main_Unit)); end if; end In_Extended_Main_Code_Unit; function In_Extended_Main_Code_Unit (Loc : Source_Ptr) return Boolean is begin if Loc = Standard_Location then return False; elsif Loc = No_Location then return False; -- Otherwise see if we are in the main unit elsif Get_Code_Unit (Loc) = Get_Code_Unit (Cunit (Main_Unit)) then return True; -- Location may be in spec (or subunit etc) of main unit else return In_Same_Extended_Unit (Loc, Sloc (Cunit (Main_Unit))); end if; end In_Extended_Main_Code_Unit; ---------------------------------- -- In_Extended_Main_Source_Unit -- ---------------------------------- function In_Extended_Main_Source_Unit (N : Node_Or_Entity_Id) return Boolean is Nloc : constant Source_Ptr := Sloc (N); Mloc : constant Source_Ptr := Sloc (Cunit (Main_Unit)); begin -- If parsing, then use the global flag to indicate result if Compiler_State = Parsing then return Parsing_Main_Extended_Source; -- Special value cases elsif Nloc = Standard_Location then return False; elsif Nloc = No_Location then return False; -- Special case Itypes to test the Sloc of the associated node. The -- reason we do this is for possible calls from gigi after -gnatD -- processing is complete in sprint. This processing updates the -- sloc fields of all nodes in the tree, but itypes are not in the -- tree so their slocs do not get updated. elsif Nkind (N) = N_Defining_Identifier and then Is_Itype (N) then return In_Extended_Main_Source_Unit (Associated_Node_For_Itype (N)); -- Otherwise compare original locations to see if in same unit else return In_Same_Extended_Unit (Original_Location (Nloc), Original_Location (Mloc)); end if; end In_Extended_Main_Source_Unit; function In_Extended_Main_Source_Unit (Loc : Source_Ptr) return Boolean is Mloc : constant Source_Ptr := Sloc (Cunit (Main_Unit)); begin -- If parsing, then use the global flag to indicate result if Compiler_State = Parsing then return Parsing_Main_Extended_Source; -- Special value cases elsif Loc = Standard_Location then return False; elsif Loc = No_Location then return False; -- Otherwise compare original locations to see if in same unit else return In_Same_Extended_Unit (Original_Location (Loc), Original_Location (Mloc)); end if; end In_Extended_Main_Source_Unit; ------------------------ -- In_Predefined_Unit -- ------------------------ function In_Predefined_Unit (N : Node_Or_Entity_Id) return Boolean is begin return In_Predefined_Unit (Sloc (N)); end In_Predefined_Unit; function In_Predefined_Unit (S : Source_Ptr) return Boolean is Unit : constant Unit_Number_Type := Get_Source_Unit (S); File : constant File_Name_Type := Unit_File_Name (Unit); begin return Is_Predefined_File_Name (File); end In_Predefined_Unit; ----------------------- -- In_Same_Code_Unit -- ----------------------- function In_Same_Code_Unit (N1, N2 : Node_Or_Entity_Id) return Boolean is S1 : constant Source_Ptr := Sloc (N1); S2 : constant Source_Ptr := Sloc (N2); begin if S1 = No_Location or else S2 = No_Location then return False; elsif S1 = Standard_Location then return S2 = Standard_Location; elsif S2 = Standard_Location then return False; end if; return Get_Code_Unit (N1) = Get_Code_Unit (N2); end In_Same_Code_Unit; --------------------------- -- In_Same_Extended_Unit -- --------------------------- function In_Same_Extended_Unit (N1, N2 : Node_Or_Entity_Id) return Boolean is begin return Check_Same_Extended_Unit (Sloc (N1), Sloc (N2)) /= No; end In_Same_Extended_Unit; function In_Same_Extended_Unit (S1, S2 : Source_Ptr) return Boolean is begin return Check_Same_Extended_Unit (S1, S2) /= No; end In_Same_Extended_Unit; ------------------------- -- In_Same_Source_Unit -- ------------------------- function In_Same_Source_Unit (N1, N2 : Node_Or_Entity_Id) return Boolean is S1 : constant Source_Ptr := Sloc (N1); S2 : constant Source_Ptr := Sloc (N2); begin if S1 = No_Location or else S2 = No_Location then return False; elsif S1 = Standard_Location then return S2 = Standard_Location; elsif S2 = Standard_Location then return False; end if; return Get_Source_Unit (N1) = Get_Source_Unit (N2); end In_Same_Source_Unit; ----------------------------- -- Increment_Serial_Number -- ----------------------------- function Increment_Serial_Number return Nat is TSN : Int renames Units.Table (Current_Sem_Unit).Serial_Number; begin TSN := TSN + 1; return TSN; end Increment_Serial_Number; ---------------- -- Initialize -- ---------------- procedure Initialize is begin Linker_Option_Lines.Init; Notes.Init; Load_Stack.Init; Units.Init; Compilation_Switches.Init; end Initialize; --------------- -- Is_Loaded -- --------------- function Is_Loaded (Uname : Unit_Name_Type) return Boolean is begin for Unum in Units.First .. Units.Last loop if Uname = Unit_Name (Unum) then return True; end if; end loop; return False; end Is_Loaded; --------------- -- Last_Unit -- --------------- function Last_Unit return Unit_Number_Type is begin return Units.Last; end Last_Unit; ---------- -- List -- ---------- procedure List (File_Names_Only : Boolean := False) is separate; ---------- -- Lock -- ---------- procedure Lock is begin Linker_Option_Lines.Locked := True; Load_Stack.Locked := True; Units.Locked := True; Linker_Option_Lines.Release; Load_Stack.Release; Units.Release; end Lock; --------------- -- Num_Units -- --------------- function Num_Units return Nat is begin return Int (Units.Last) - Int (Main_Unit) + 1; end Num_Units; ----------------- -- Remove_Unit -- ----------------- procedure Remove_Unit (U : Unit_Number_Type) is begin if U = Units.Last then Units.Decrement_Last; end if; end Remove_Unit; ---------------------------------- -- Replace_Linker_Option_String -- ---------------------------------- procedure Replace_Linker_Option_String (S : String_Id; Match_String : String) is begin if Match_String'Length > 0 then for J in 1 .. Linker_Option_Lines.Last loop String_To_Name_Buffer (Linker_Option_Lines.Table (J).Option); if Match_String = Name_Buffer (1 .. Match_String'Length) then Linker_Option_Lines.Table (J).Option := S; return; end if; end loop; end if; Store_Linker_Option_String (S); end Replace_Linker_Option_String; ---------- -- Sort -- ---------- procedure Sort (Tbl : in out Unit_Ref_Table) is separate; ------------------------------ -- Store_Compilation_Switch -- ------------------------------ procedure Store_Compilation_Switch (Switch : String) is begin if Switch_Storing_Enabled then Compilation_Switches.Increment_Last; Compilation_Switches.Table (Compilation_Switches.Last) := new String'(Switch); -- Fix up --RTS flag which has been transformed by the gcc driver -- into -fRTS if Switch'Last >= Switch'First + 4 and then Switch (Switch'First .. Switch'First + 4) = "-fRTS" then Compilation_Switches.Table (Compilation_Switches.Last) (Switch'First + 1) := '-'; end if; end if; end Store_Compilation_Switch; -------------------------------- -- Store_Linker_Option_String -- -------------------------------- procedure Store_Linker_Option_String (S : String_Id) is begin Linker_Option_Lines.Append ((Option => S, Unit => Current_Sem_Unit)); end Store_Linker_Option_String; ---------------- -- Store_Note -- ---------------- procedure Store_Note (N : Node_Id) is Sfile : constant Source_File_Index := Get_Source_File_Index (Sloc (N)); begin -- Notes for a generic are emitted when processing the template, never -- in instances. if In_Extended_Main_Code_Unit (N) and then Instance (Sfile) = No_Instance_Id then Notes.Append (N); end if; end Store_Note; ------------------------------- -- Synchronize_Serial_Number -- ------------------------------- procedure Synchronize_Serial_Number is TSN : Int renames Units.Table (Current_Sem_Unit).Serial_Number; begin TSN := TSN + 1; end Synchronize_Serial_Number; --------------- -- Tree_Read -- --------------- procedure Tree_Read is N : Nat; S : String_Ptr; begin Units.Tree_Read; -- Read Compilation_Switches table. First release the memory occupied -- by the previously loaded switches. for J in Compilation_Switches.First .. Compilation_Switches.Last loop Free (Compilation_Switches.Table (J)); end loop; Tree_Read_Int (N); Compilation_Switches.Set_Last (N); for J in 1 .. N loop Tree_Read_Str (S); Compilation_Switches.Table (J) := S; end loop; end Tree_Read; ---------------- -- Tree_Write -- ---------------- procedure Tree_Write is begin Units.Tree_Write; -- Write Compilation_Switches table Tree_Write_Int (Compilation_Switches.Last); for J in 1 .. Compilation_Switches.Last loop Tree_Write_Str (Compilation_Switches.Table (J)); end loop; end Tree_Write; ------------ -- Unlock -- ------------ procedure Unlock is begin Linker_Option_Lines.Locked := False; Load_Stack.Locked := False; Units.Locked := False; end Unlock; ----------------- -- Version_Get -- ----------------- function Version_Get (U : Unit_Number_Type) return Word_Hex_String is begin return Get_Hex_String (Units.Table (U).Version); end Version_Get; ------------------------ -- Version_Referenced -- ------------------------ procedure Version_Referenced (S : String_Id) is begin Version_Ref.Append (S); end Version_Referenced; --------------------- -- Write_Unit_Info -- --------------------- procedure Write_Unit_Info (Unit_Num : Unit_Number_Type; Item : Node_Id; Prefix : String := ""; Withs : Boolean := False) is begin Write_Str (Prefix); Write_Unit_Name (Unit_Name (Unit_Num)); Write_Str (", unit "); Write_Int (Int (Unit_Num)); Write_Str (", "); Write_Int (Int (Item)); Write_Str ("="); Write_Str (Node_Kind'Image (Nkind (Item))); if Item /= Original_Node (Item) then Write_Str (", orig = "); Write_Int (Int (Original_Node (Item))); Write_Str ("="); Write_Str (Node_Kind'Image (Nkind (Original_Node (Item)))); end if; Write_Eol; -- Skip the rest if we're not supposed to print the withs if not Withs then return; end if; declare Context_Item : Node_Id; begin Context_Item := First (Context_Items (Cunit (Unit_Num))); while Present (Context_Item) and then (Nkind (Context_Item) /= N_With_Clause or else Limited_Present (Context_Item)) loop Context_Item := Next (Context_Item); end loop; if Present (Context_Item) then Indent; Write_Line ("withs:"); Indent; while Present (Context_Item) loop if Nkind (Context_Item) = N_With_Clause and then not Limited_Present (Context_Item) then pragma Assert (Present (Library_Unit (Context_Item))); Write_Unit_Name (Unit_Name (Get_Cunit_Unit_Number (Library_Unit (Context_Item)))); if Implicit_With (Context_Item) then Write_Str (" -- implicit"); end if; Write_Eol; end if; Context_Item := Next (Context_Item); end loop; Outdent; Write_Line ("end withs"); Outdent; end if; end; end Write_Unit_Info; end Lib;
libsrc/graphics/spc1000/getmaxx.asm
Toysoft/z88dk
0
170097
<filename>libsrc/graphics/spc1000/getmaxx.asm INCLUDE "graphics/grafix.inc" SECTION code_clib PUBLIC getmaxx PUBLIC _getmaxx EXTERN __spc1000_mode .getmaxx ._getmaxx ld a,(__spc1000_mode) and a ld hl, +63 ret z ld hl,255 dec a ret z ld hl,127 ret
programs/oeis/050/A050484.asm
karttu/loda
0
14897
<filename>programs/oeis/050/A050484.asm ; A050484: Partial sums of A051946. ; 1,12,68,264,810,2112,4884,10296,20163,37180,65208,109616,177684,279072,426360,635664,927333,1326732,1865116,2580600,3519230,4736160,6296940,8278920,10772775,13884156,17735472,22467808,28242984,35245760,43686192,53802144,65861961,80167308,97056180,116906088,140137426,167217024,198661892,235043160,276990219,325195068,380416872,443486736,515312700,596884960,689281320,793672880,911329965,1043628300,1192055436,1358217432,1543845798,1750804704,1981098460,2236879272,2520455279,2834298876,3181055328,3563551680,3984805968,4448036736,4956672864,5514363712,6124989585,6792672524,7521787428,8316973512,9183146106,10125508800,11149565940,12261135480,13466362195,14771731260,16184082200,17710623216,19358945892,21137040288,23053310424,25116590160,27336159477,29721761164,32283617916,35032449848,37979492430,41136514848,44515838796,48130357704,51993556407,56119531260,60523010704,65219376288,70224684152,75555686976,81229856400,87265405920,93681314265,100497349260,107734092180,115412962600,123556243746,132187108352,141329645028,151008885144,161250830235,172082479932,183531860424,195628053456,208401225868,221882659680,236104782728,251101199856,266906724669,283557411852,301090590060,319544895384,338960305398,359378173792,380841265596,403393793000,427081451775,451951458300,478052587200,505435209600,534151332000,564254635776,595800517312,628846128768,663450419489,699674178060,737580075012,777232706184,818698636746,862046445888,907346772180,954672359608,1004098104291,1055701101884,1109560695672,1165758525360,1224378576564,1285507231008,1349233317432,1415648163216,1484845646725,1556922250380,1631977114460,1710112091640,1791431802270,1876043690400,1964058080556,2055588235272,2150750413383,2249663929084,2352451211760,2459237866592,2570152735944,2685327961536,2804899047408,2929004923680,3057788011113,3191394286476,3329973348724,3473678485992,3622666743410,3777098991744,3937139996868,4102958490072,4274727239211,4452623120700,4636827192360,4827524767120,5024905487580,5229163401440,5440497037800,5659109484336,5885208465357,6119006420748,6360720585804,6610573071960,6868790948422,7135606324704,7411256434076,7695983717928,7990035911055,8293666127868,8607132949536,8930700512064,9264638595312,9609222712960,9964734203424,10331460321728,10709694332337,11099735602956,11501889699300,11916468480840,12343790197530,12784179587520,13237967975860,13705493374200,14187100581491,14683141285692,15193974166488,15719964999024,16261486758660,16818919726752,17392651597464,17983077585616,18590600535573,19215631031180,19858587506748,20519896359096,21199992060654,21899317273632,22618322965260,23357468524104,24117221877463,24898059609852,25700467082576,26524938554400,27371977303320,28242095749440,29135815578960,30053667869280,30996193215225,31963941856396,32957473805652,33977358978728,35024177324994,36098518959360,37200984295332,38332184179224,39492740025531,40683283953468,41904458924680,43156918882128,44441328890156,45758365275744,47108715770952,48493079656560,49912167906909,51366703335948,52857420744492,54385067068696,55950401529750,57554195784800,59197234079100,60880313399400,62604243628575,64369847701500 lpb $0,1 mov $2,$0 cal $2,51946 ; Expansion of g.f.: (1+4*x)/(1-x)^7. sub $0,1 mul $2,2 add $3,$2 mov $1,$3 lpe div $1,2 add $1,1
Dark soft/Tinba/source/-RootKit/HideReg.asm
ExaByt3s/hack_scripts
3
242437
.data nHdnCount dd 0 ; Hidden records counter (for delta) .code ;; -------------------------------------------------------------------------------- ;; NewRegEnumValue proc p1:dword, p2:dword, p3:dword, p4:dword, p5:dword, p6:dword, p7:dword, p8:dword local RealRegEnumValue : dword mov RealRegEnumValue, eax ; Init counter if search from begining .if p2==0 mov nHdnCount, 0 ; else add delta to dwIndex .else mov eax, nHdnCount add p2, eax .endif @RealRegEnumValue: push p8 ; lpcbData push p7 ; lpData push p6 ; lpType push p5 ; lpReserved push p4 ; lpcchValueName push p3 ; lpValueName push p2 ; dwIndex push p1 ; hKey call RealRegEnumValue ; Real RegEnumValue .if eax!=ERROR_SUCCESS ret .endif pushad ; Decision: to hide or not to hide mov ebx, p3 call IsHiddenRegValue .if ebx==0 popad ret .endif ; Hide Value (replace by next) inc p2 ; Next dwIndex inc nHdnCount ; Increase counter (for delta) popad jmp @RealRegEnumValue NewRegEnumValue endp
oeis/081/A081126.asm
neoneye/loda-programs
11
788
; A081126: Duplicate of A018191. ; Submitted by <NAME>(s2) ; 1,2,5,16,53,206,817,3620,16361,80218,401501,2139512,11641885,66599846,388962953,2367284236,14700573137,94523836850,619674301621,4186249123808,28809504493061,203556335785342,1463877667140065 mul $0,2 mov $1,1 mov $3,2 lpb $0 mul $1,$0 sub $0,2 mov $2,$1 mov $1,$3 add $3,$2 lpe mov $0,$3 div $0,2
STM32F4/ToyOBDH/src/housekeeping.ads
AntonioRamosNieto/TFG-STM32F429
0
26371
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2018, Universidad Politécnica de Madrid -- -- -- -- This is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. This software is distributed in the hope that it will be useful, -- -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -- -- License for more details. You should have received a copy of the GNU -- -- General Public License distributed with this software; see file -- -- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy -- -- of the license. -- -- -- ------------------------------------------------------------------------------ -- Housekeeping subsystem. This package contains a task that reads -- a sensor periodically. The value read is put into the storage subsystem. with System; package Housekeeping is -- cyclic Period : Natural := 1000; -- ms Deadline : Natural := 100; -- ms WCET : Natural; -- TBC after WCET analysis Start_Delay : Natural := 1000; -- ms private task Housekeeping_Task with Priority => System.Default_Priority; -- replace with DMS priority when available end Housekeeping;