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 |
|---|---|---|---|---|
src/main/antlr/SHRDataElementLexer.g4 | AmartC/shr-grammar | 0 | 4818 | lexer grammar SHRDataElementLexer;
import PrimitivesLexer, PatternsLexer, IgnoredTokensLexer;
// KEYWORDS for SHR Data Elements
KW_GRAMMAR: 'Grammar:';
KW_G_DATA_ELEMENT: 'DataElement';
KW_NAMESPACE: 'Namespace:';
KW_USES: 'Uses:';
KW_PATH: 'Path:';
KW_VOCABULARY: 'CodeSystem:';
//KW_VOCAB_VERSION: 'Version:';
KW_ABSTRACT: 'Abstract:';
KW_ELEMENT: 'Element:';
KW_ENTRY: 'Entry:';
KW_PARENT: 'Parent:';
KW_VALUE: 'Value';
KW_CONCEPT: 'Concept:';
KW_DESCRIPTION: 'Description:';
KW_PROPERTY: 'Property:';
KW_OR: 'or';
KW_WITH: 'with';
KW_REQUIRED: 'required';
KW_PREFERRED: 'preferred';
KW_EXAMPLE: 'example';
KW_EXTENSIBLE: 'extensible';
KW_FROM: 'from';
KW_IS: 'is';
KW_SUBSTITUTE: 'substitute';
KW_INCLUDES: 'includes';
KW_TRUE: 'true';
KW_FALSE: 'false';
KW_TBD: 'TBD';
KW_TBD_CODE: 'TBD#TBD';
KW_ONLY: 'only';
// KEYWORDS for special constrainable items
KW_BAR_ENTRY: '_Entry';
KW_BAR_VALUE: '_Value';
// SYMBOLS
DOT: '.';
EQUAL: '=';
COMMA: ',';
STAR: '*';
OPEN_PAREN: '(';
CLOSE_PAREN: ')';
RANGE: '..';
PLUS: '+';
COLON: ':';
OPEN_BRACKET: '[';
CLOSE_BRACKET: ']';
// PATTERNS
URL: [a-z]+ '://' [a-zA-Z][0-9a-zA-Z_%#=\\?\\-\\.\\/]*;
PATH_URL: [A-Z][A-Z0-9]* '/' [0-9a-zA-Z][0-9a-zA-Z_%#=\\?\\-\\.\\/]*;
URN_OID: 'urn:oid:' [0-2]'.'[0-9]+('.'[0-9]+)*;
URN: 'urn' (':'[0-9a-zA-Z\\.]+)+;
CODE: '#' ~[, \r\t\n]+;
|
oeis/342/A342983.asm | neoneye/loda-programs | 11 | 96572 | <reponame>neoneye/loda-programs
; A342983: Number of tree-rooted planar maps with n+1 vertices and n+1 faces.
; Submitted by <NAME>(s1)
; 1,6,280,23100,2522520,325909584,47117214144,7383099180600,1229149289511000,214527522662653200,38887279926227853120,7271332144993605081120,1395321310426879365566400,273697641660657106322640000,54708248601655917595233984000,11115690336195201406896634911600,2291082243636579462297260911632600,478232221705491673818519755868234000,100954247946730846231200356958998760000,21527165029272632816089907695757025060000,4632235873060817769968908328361278325768000,1004992831765527739132262729913016797756528000
mov $2,1
add $2,$0
seq $0,8977 ; a(n) = (4*n)!/(n!)^4.
pow $2,2
div $0,$2
|
tools/scitools/conf/understand/ada/ada05/s-imgllu.ads | brucegua/moocos | 1 | 10167 | <reponame>brucegua/moocos
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . I M G _ L L U --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2005 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
--
--
--
--
--
--
--
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains the routines for supporting the Image attribute for
-- unsigned (modular) integer types larger than Size Unsigned'Size, and also
-- for conversion operations required in Text_IO.Modular_IO for such types.
with System.Unsigned_Types;
package System.Img_LLU is
pragma Pure;
function Image_Long_Long_Unsigned
(V : System.Unsigned_Types.Long_Long_Unsigned)
return String;
-- Computes Long_Long_Unsigned'Image (V) and returns the result.
procedure Set_Image_Long_Long_Unsigned
(V : System.Unsigned_Types.Long_Long_Unsigned;
S : out String;
P : in out Natural);
-- Sets the image of V starting at S (P + 1) with no leading spaces (i.e.
-- Text_IO format where Width = 0), starting at S (P + 1), updating P
-- to point to the last character stored. The caller promises that the
-- buffer is large enough and no check is made for this (Constraint_Error
-- will not be necessarily raised if this is violated since it is perfectly
-- valid to compile this unit with checks off).
end System.Img_LLU;
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_1866.asm | ljhsiun2/medusa | 9 | 169665 | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r14
push %r9
push %rax
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0x105e, %rdi
nop
nop
nop
nop
xor $17925, %r9
mov (%rdi), %bx
nop
nop
nop
nop
nop
sub %rdx, %rdx
lea addresses_WC_ht+0x729e, %r11
nop
nop
nop
cmp $63239, %r14
mov $0x6162636465666768, %rax
movq %rax, %xmm1
and $0xffffffffffffffc0, %r11
movaps %xmm1, (%r11)
nop
nop
nop
nop
nop
dec %r11
lea addresses_WT_ht+0x123fb, %rbx
nop
nop
add %rdi, %rdi
movups (%rbx), %xmm0
vpextrq $0, %xmm0, %r9
nop
dec %rdi
lea addresses_UC_ht+0x7636, %rbx
nop
nop
nop
nop
and $52673, %rdi
movb (%rbx), %dl
nop
sub $7444, %rax
lea addresses_normal_ht+0xaa5e, %rsi
lea addresses_UC_ht+0x190a0, %rdi
nop
xor $62725, %rax
mov $32, %rcx
rep movsb
nop
nop
nop
add %rsi, %rsi
lea addresses_UC_ht+0x444d, %r11
nop
nop
nop
nop
sub $35153, %rsi
mov (%r11), %ecx
xor $18994, %rcx
lea addresses_D_ht+0x529e, %r14
nop
nop
nop
xor %rcx, %rcx
movb $0x61, (%r14)
nop
sub $28274, %r14
lea addresses_WT_ht+0xdb5e, %rbx
nop
nop
nop
nop
xor $44290, %rdx
and $0xffffffffffffffc0, %rbx
vmovntdqa (%rbx), %ymm4
vextracti128 $0, %ymm4, %xmm4
vpextrq $0, %xmm4, %r9
nop
nop
add $33756, %rsi
lea addresses_WC_ht+0x137be, %rax
nop
xor $7501, %rdx
mov (%rax), %rsi
dec %rdx
lea addresses_WT_ht+0xf2c6, %rsi
lea addresses_WC_ht+0x2c1e, %rdi
nop
add %rdx, %rdx
mov $81, %rcx
rep movsq
nop
nop
nop
nop
add $14800, %rdx
lea addresses_normal_ht+0x565e, %rdi
nop
inc %rsi
movups (%rdi), %xmm1
vpextrq $0, %xmm1, %rdx
nop
nop
nop
nop
add $21469, %r9
lea addresses_A_ht+0x801a, %r14
and $51859, %rdx
mov (%r14), %di
nop
nop
cmp %r11, %r11
lea addresses_WT_ht+0x1985e, %rbx
clflush (%rbx)
nop
sub $39084, %r9
mov $0x6162636465666768, %rax
movq %rax, %xmm5
and $0xffffffffffffffc0, %rbx
vmovntdq %ymm5, (%rbx)
nop
nop
nop
sub %r14, %r14
lea addresses_WC_ht+0x1685e, %rbx
nop
nop
nop
cmp %r9, %r9
mov $0x6162636465666768, %rcx
movq %rcx, %xmm1
vmovups %ymm1, (%rbx)
nop
inc %rdi
lea addresses_WC_ht+0x400e, %rsi
lea addresses_WC_ht+0x1705e, %rdi
clflush (%rsi)
nop
nop
nop
nop
cmp %rax, %rax
mov $84, %rcx
rep movsl
nop
nop
nop
add $23139, %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r9
pop %r14
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r13
push %r8
push %r9
push %rcx
push %rdx
// Store
mov $0xb4c, %r13
nop
nop
nop
nop
add $52498, %rcx
movw $0x5152, (%r13)
nop
nop
nop
add %rcx, %rcx
// Faulty Load
lea addresses_PSE+0x885e, %r10
nop
nop
nop
xor $64880, %r8
movb (%r10), %r9b
lea oracles, %r13
and $0xff, %r9
shlq $12, %r9
mov (%r13,%r9,1), %r9
pop %rdx
pop %rcx
pop %r9
pop %r8
pop %r13
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_PSE', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 0, 'NT': True, 'type': 'addresses_P', 'size': 2, 'AVXalign': False}}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_PSE', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'same': False, 'congruent': 11, 'NT': False, 'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_WC_ht', 'size': 16, 'AVXalign': True}}
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_WT_ht', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_UC_ht', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}}
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False}}
{'src': {'same': False, 'congruent': 5, 'NT': True, 'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_WC_ht', 'size': 8, 'AVXalign': True}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}}
{'src': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_A_ht', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 10, 'NT': True, 'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 11, 'NT': False, 'type': 'addresses_WC_ht', 'size': 32, 'AVXalign': False}}
{'src': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 10, '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/ewok-devices.ads | vdh-anssi/ewok-kernel | 0 | 22717 | <filename>src/ewok-devices.ads<gh_stars>0
--
-- Copyright 2018 The wookey project team <<EMAIL>>
-- - <NAME>
-- - <NAME>
-- - <NAME>
-- - <NAME>
-- - <NAME>
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
--
with ewok.tasks_shared; use ewok.tasks_shared;
with ewok.devices_shared; use ewok.devices_shared;
with ewok.exported.devices;
with ewok.exported.interrupts;
with soc.interrupts;
with soc.devmap;
package ewok.devices
with spark_mode => off
is
type t_device_type is (DEV_TYPE_USER, DEV_TYPE_KERNEL);
type t_device_state is -- FIXME
(DEV_STATE_UNUSED,
DEV_STATE_RESERVED,
DEV_STATE_REGISTERED,
DEV_STATE_ENABLED);
type t_checked_user_device is new ewok.exported.devices.t_user_device;
type t_checked_user_device_access is access all t_checked_user_device;
type t_device is record
udev : aliased t_checked_user_device;
task_id : t_task_id := ID_UNUSED;
periph_id : soc.devmap.t_periph_id := soc.devmap.NO_PERIPH;
status : t_device_state := DEV_STATE_UNUSED;
end record;
registered_device : array (t_registered_device_id) of t_device;
procedure get_registered_device_entry
(dev_id : out t_device_id;
success : out boolean);
procedure release_registered_device_entry (dev_id : t_registered_device_id);
function get_task_from_id(dev_id : t_registered_device_id)
return t_task_id;
function get_user_device (dev_id : t_registered_device_id)
return t_checked_user_device_access
with inline_always;
function get_device_size (dev_id : t_registered_device_id)
return unsigned_32;
function get_device_addr (dev_id : t_registered_device_id)
return system_address;
function is_device_region_ro (dev_id : t_registered_device_id)
return boolean;
function get_device_subregions_mask (dev_id : t_registered_device_id)
return unsigned_8;
function get_interrupt_config_from_interrupt
(interrupt : soc.interrupts.t_interrupt)
return ewok.exported.interrupts.t_interrupt_config_access;
procedure register_device
(task_id : in t_task_id;
udev : in ewok.exported.devices.t_user_device_access;
dev_id : out t_device_id;
success : out boolean);
procedure release_device
(task_id : in t_task_id;
dev_id : in t_registered_device_id;
success : out boolean);
procedure enable_device
(dev_id : in t_registered_device_id;
success : out boolean);
function sanitize_user_defined_device
(udev : in ewok.exported.devices.t_user_device_access;
task_id : in t_task_id)
return boolean;
end ewok.devices;
|
Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xca.log_21829_1483.asm | ljhsiun2/medusa | 9 | 168398 | <gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r14
push %r15
push %rbp
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0x1d645, %rsi
lea addresses_normal_ht+0xa0a5, %rdi
nop
and $13686, %rbp
mov $33, %rcx
rep movsq
inc %rdx
lea addresses_A_ht+0x94a5, %r15
nop
nop
nop
nop
nop
xor $56464, %r14
mov $0x6162636465666768, %rcx
movq %rcx, %xmm3
vmovups %ymm3, (%r15)
nop
nop
nop
dec %rdx
lea addresses_A_ht+0xb25d, %rsi
lea addresses_WC_ht+0xc0a5, %rdi
add %r14, %r14
mov $17, %rcx
rep movsw
nop
nop
nop
nop
cmp %rbp, %rbp
lea addresses_A_ht+0x69a5, %rcx
nop
nop
sub %rsi, %rsi
mov $0x6162636465666768, %rdi
movq %rdi, %xmm7
and $0xffffffffffffffc0, %rcx
vmovntdq %ymm7, (%rcx)
nop
nop
nop
nop
and %rbp, %rbp
lea addresses_WT_ht+0x1ba5, %rsi
lea addresses_normal_ht+0x16f29, %rdi
clflush (%rsi)
clflush (%rdi)
nop
and %rbx, %rbx
mov $20, %rcx
rep movsb
nop
nop
nop
add %rdi, %rdi
lea addresses_WC_ht+0x168a5, %rsi
lea addresses_D_ht+0x1b975, %rdi
nop
nop
and %r15, %r15
mov $107, %rcx
rep movsl
nop
nop
inc %r14
lea addresses_A_ht+0x19f69, %rsi
lea addresses_D_ht+0x98a5, %rdi
clflush (%rsi)
nop
nop
nop
nop
nop
xor %r15, %r15
mov $46, %rcx
rep movsl
nop
xor %rcx, %rcx
lea addresses_normal_ht+0xd8a5, %rsi
nop
nop
inc %r14
mov (%rsi), %rbx
nop
nop
nop
nop
nop
add $49296, %rdi
lea addresses_WC_ht+0x65a5, %rsi
nop
nop
nop
nop
nop
xor $63615, %rdi
movl $0x61626364, (%rsi)
nop
nop
nop
nop
nop
cmp $33919, %r15
lea addresses_A_ht+0x4a39, %rsi
lea addresses_normal_ht+0xcea5, %rdi
clflush (%rdi)
nop
and %r15, %r15
mov $63, %rcx
rep movsl
nop
nop
sub %rdx, %rdx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r15
pop %r14
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r15
push %r9
push %rbp
push %rsi
// Faulty Load
mov $0x31e0f700000000a5, %r9
nop
nop
nop
nop
nop
xor $44153, %rbp
mov (%r9), %rsi
lea oracles, %rbp
and $0xff, %rsi
shlq $12, %rsi
mov (%rbp,%rsi,1), %rsi
pop %rsi
pop %rbp
pop %r9
pop %r15
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_NC', 'same': False, 'AVXalign': False, 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_NC', 'same': True, 'AVXalign': True, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 5}, 'dst': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 11}}
{'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 8}}
{'OP': 'REPM', 'src': {'same': True, 'type': 'addresses_A_ht', 'congruent': 2}, 'dst': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 10}}
{'OP': 'STOR', 'dst': {'size': 32, 'NT': True, 'type': 'addresses_A_ht', 'same': True, 'AVXalign': False, 'congruent': 7}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 8}, 'dst': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 2}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 10}, 'dst': {'same': False, 'type': 'addresses_D_ht', 'congruent': 4}}
{'OP': 'REPM', 'src': {'same': True, 'type': 'addresses_A_ht', 'congruent': 2}, 'dst': {'same': False, 'type': 'addresses_D_ht', 'congruent': 11}}
{'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 11}}
{'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': True, 'congruent': 8}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_A_ht', 'congruent': 2}, 'dst': {'same': False, 'type': 'addresses_normal_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
*/
|
libsrc/_DEVELOPMENT/adt/p_forward_list_alt/c/sdcc_iy/p_forward_list_alt_remove_callee.asm | meesokim/z88dk | 0 | 169797 | <reponame>meesokim/z88dk
; void *p_forward_list_alt_remove_callee(p_forward_list_alt_t *list, void *item)
SECTION code_adt_p_forward_list_alt
PUBLIC _p_forward_list_alt_remove_callee
_p_forward_list_alt_remove_callee:
pop af
pop hl
pop bc
push af
INCLUDE "adt/p_forward_list_alt/z80/asm_p_forward_list_alt_remove.asm"
|
Data.asm | sidebog7/ZXWargame | 1 | 105214 | <gh_stars>1-10
gfx
gfxblnk DEFB 0,0,0,0,0,0,0,0
gfxhse DEFB 16,16,60,126,255,189,231,231
gfxtree DEFB 16,56,84,16,56,84,146,16
gfxhil1 DEFB 8,20,34,65,6,8,16,224
gfxhil2 DEFB 0,48,72,132,2,0,0,0
gfxflag DEFB 128,240,255,252,143,128,128,128
gfxmace DEFB 64,240,72,68,68,68,78,68
gfxshld DEFB 255,231,231,129,129,231,102,60
gfxbow DEFB 249,70,38,25,9,5,3,1
gfxswd DEFB 1,2,4,8,16,160,64,160
char_blank: EQU 0
char_hse: EQU 1
char_tree: EQU 2
char_hill1: EQU 3
char_hill2: EQU 4
char_flag: EQU 5
char_mace: EQU 6
char_shld: EQU 7
char_bow: EQU 8
char_swd: EQU 9
terrain_blank EQU 0
terrain_house EQU 1
terrain_tree EQU 2
terrain_hill1 EQU 3
terrain_hill2 EQU 4
terrain_colours:
; FBPPPIII
terrain_colour_blank DEFB %00111000
terrain_colour_house DEFB %00111011
terrain_colour_tree DEFB %00111100
terrain_colour_hill1 DEFB %00111101
terrain_colour_hill2 DEFB %00111101
colscr EQU 56
colbdr EQU 0
map:
DEFS 30*16,0
trooplen EQU 12
troopdata_order EQU 0
troopdata_dir EQU 1
troopdata_weapon EQU 2
troopdata_armour EQU 3
troopdata_morale EQU 4
troopdata_str_orig EQU 5
troopdata_str EQU 7
troopdata_ypos EQU 9
troopdata_xpos EQU 10
troopdata_type EQU 11
troops:
user_troops:
DEFS trooplen*8,0
comp_troops:
DEFS trooplen*8,0
troop_type_knight EQU 0
troop_type_sergeant EQU 1
troop_type_menatarms EQU 2
troop_type_archers EQU 3
troop_type_peasants EQU 4
troop_min_xpos EQU 0
troop_max_xpos EQU 29
troop_min_ypos EQU 0
troop_max_ypos EQU 15
troop_types:
DEFB troop_type_knight
DEFB troop_type_sergeant
DEFB troop_type_menatarms
DEFB troop_type_menatarms
DEFB troop_type_archers
DEFB troop_type_archers
DEFB troop_type_peasants
DEFB troop_type_peasants
; troops 0-7 Blue
; troops 8-15 Red
; troops structure
; 0 - current order - byte - 1
; 1 - current direction - byte - 2
; 2 - weaponry - byte - 3
; 3 - armour - byte - 4
; 4 - morale - byte - 5
; 5 - initial strength - word - 6
; 7 - current strength - word - 7
; 9 - Y Position - byte - 8
; 10 - X Position - byte - 9
; 11 - Type - byte
troop_data:
DEFB 4,3,2
DEFB 4,2,2
DEFB 3,2,1
DEFB 2,2,0
DEFB 1,1,0
DEFB 1,2,1
DEFB 2,1,-1
DEFB 2,0,-1
direction_north EQU 1
direction_west EQU 2
direction_south EQU 3
direction_east EQU 4
troop_chars:
DEFB char_flag,char_mace,char_shld,char_shld
DEFB char_bow,char_bow,char_swd,char_swd
troop_old:
DEFS trooplen,0
troop_old_terrain:
DEFB 0
text_row1 EQU 18
text_row2 EQU 19
text_row3 EQU 20
text_row4 EQU 21
text_unit_number:
DEFB "Unit number ",0
text_current_orders:
DEFB "Current orders are to ",0
text_change_orders:
DEFB "Do you want to change (Y/N)?",0
text_options_are:
DEFB "Options are:",0
text_which_way:
DEFB "Which way (NSEW)?",0
text_decides_to_act:
DEFB " decides to act",0
text_nothing_in_range:
DEFB "Nothing in range",0
text_fires:
DEFB " fires",0
text_that_causes:
DEFB "That causes ",0
text_casualties:
DEFB " casualties on unit ",0
text_unit_word:
DEFB "Unit ",0
text_unit_weapon:
DEFB "Weapon: ",0
text_unit_armour:
DEFB "Armour: ",0
text_unit_strength:
DEFB "Strngth: ",0
text_unit_attitude:
DEFB "Attitude:",0
text_unit_location:
DEFB "Location: ",0
text_order:
text_order_fire:
DEFB "fire",0
text_order_halt:
DEFB "halt",0
text_order_move:
DEFB "move",0
text_order_status:
DEFB "status",0
text_order_rout:
DEFB "rout",0
text_weapon:
text_weapon_length EQU 5
text_weapon_none:
DEFB "none "
text_weapon_bow:
DEFB "bow "
text_weapon_sword:
DEFB "sword"
text_weapon_axe:
DEFB "axe "
text_weapon_lance:
DEFB "lance"
text_morale:
text_morale_length EQU 9
text_morale_cowardly:
DEFB "cowardly "
text_morale_unwilling:
DEFB "unwilling"
text_morale_willing:
DEFB "willing "
text_morale_brave:
DEFB "brave "
text_morale_valiant:
DEFB "valiant "
text_unit:
text_unit_knights:
DEFB "knights",0
text_unit_sergeants:
DEFB "sergeants",0
text_unit_menatarms:
DEFB "men-at-arms",0
text_unit_archers:
DEFB "archers",0
text_unit_peasants:
DEFB "peasants",0
text_armour:
text_armour_length EQU 9
text_armour_none:
DEFB "none "
text_armour_jerkin:
DEFB "jerkin "
text_armour_chainmail:
DEFB "chainmail"
text_armour_plate:
DEFB "plate "
text_terrain:
text_terrain_length EQU 7
text_terrain_plains:
DEFB "plains "
text_terrain_village:
DEFB "village"
text_terrain_woods:
DEFB "woods "
text_terrain_hills:
DEFB "hills "
text_direction:
text_direction_north:
DEFB "north"
text_direction_west:
DEFB "west "
text_direction_south:
DEFB "south"
text_direction_east:
DEFB "east "
text_press_enter:
DEFB "(PRESS ENTER)",0
text_press_enter_length EQU $-text_press_enter-1
troop_type_offsets:
troop_type_0:
DEFW text_unit_knights-text_unit
troop_type_1:
DEFW text_unit_sergeants-text_unit
troop_type_2:
DEFW text_unit_menatarms-text_unit
troop_type_3:
DEFW text_unit_archers-text_unit
troop_type_4:
DEFW text_unit_peasants-text_unit
troop_order_offsets:
troop_order_0:
DEFW text_order_fire-text_order
troop_order_1:
DEFW text_order_halt-text_order
troop_order_2:
DEFW text_order_move-text_order
troop_order_3:
DEFW text_order_status-text_order
troop_order_4:
DEFW text_order_rout-text_order
key_fire EQU 0
key_halt EQU 1
key_move EQU 2
key_status EQU 3
key_rout EQU 4
debug:
DEFW 0
debugseed:
DEFW 0
|
2020/2/Password_Philosophy_p2.asm | ped7g/adventofcode | 2 | 174936 | ; https://adventofcode.com/2020/day/2 (part 2)
OPT listoff : DEVICE ZXSPECTRUMNEXT : MMU 0 7, 0, $0000
inputFile: ; load the input.txt into virtual device memory for processing
INCBIN "input.txt"
DB 10 ; fake <EOL> to make sure there's one
inputEnd:
PHASE_NUM1 EQU 0 ; reading policy number1
PHASE_NUM2 EQU 1 ; reading policy number2
PHASE_LETTER EQU 2 ; reading policy letter
PHASE_CHECKING EQU 3 ; checking the password against the policy
; init variables
inPtr = inputFile
valid = 0
phase = PHASE_NUM1
number = -1
num1 = -1
num2 = -1
count = -1
letter = -1
letter1 = -2
; parse the input
DUP (inputEnd - inputFile) ; read+process whole input file
inByte = {b inPtr}
inPtr = inPtr + 1
IF phase == PHASE_NUM1 || phase == PHASE_NUM2
IF number < 0
; was outside of number, keep skipping bytes until new digit is found
IF '0' <= inByte && inByte <= '9'
number = inByte - '0' ; start of new number
ENDIF
ELSE
; was inside number, keep adding digits or process it
IF '0' <= inByte && inByte <= '9' ; another digit
number = 10*number + inByte - '0'
ELSE ; not a digit, set num1 or num2, and switch to next phase
IF phase == PHASE_NUM1
num1 = number
ELSE
num2 = number
ENDIF
phase = phase + 1
number = -1 ; reinit for next number parsing
ENDIF
ENDIF
ELSEIF phase == PHASE_LETTER
IF ' ' != inByte
letter = inByte
phase = phase + 1
count = 0 ;: DISPLAY "Checking policy letter ",letter," ",/B,letter," ",/D,num1,"-",/D,num2
letter1 = -2
ENDIF
ELSE
ASSERT phase == PHASE_CHECKING
IF inByte < ' ' ; EOL (or other garbage character)
phase = PHASE_NUM1
ELSE
IF 'a' <= inByte && inByte <= 'z'
count = count + 1 ; any small letter advances position counter
IF num1 == count
letter1 = inByte ; remember first letter
ENDIF
IF num2 == count && letter1 != inByte && (letter == letter1 || letter == inByte)
valid = valid + 1 ; check against second letter (if only one is equal to policy letter -> ++valid)
ENDIF
ENDIF
ENDIF
ENDIF
EDUP
DISPLAY "Valid passwords: ",/D,valid
|
gcc-gcc-7_3_0-release/gcc/ada/s-sopco4.ads | best08618/asylo | 7 | 11700 | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . S T R I N G _ O P S _ C O N C A T _ 4 --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2013, 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. --
-- --
------------------------------------------------------------------------------
-- This package contains the function for concatenating four strings
-- NOTE: This package is obsolescent. It is no longer used by the compiler
-- which now generates concatenation inline. It is retained only because
-- it may be used during bootstrapping using old versions of the compiler.
pragma Compiler_Unit_Warning;
package System.String_Ops_Concat_4 is
pragma Pure;
function Str_Concat_4 (S1, S2, S3, S4 : String) return String;
-- Concatenate four strings and return resulting string
end System.String_Ops_Concat_4;
|
test/Fail/Issue1639.agda | shlevy/agda | 1,989 | 9933 | -- Andreas, 2015-09-07 Issue reported by identicalsnowflake
data D : Set1 where
field
A : Set
-- WAS: Internal error (on master)
-- NOW:
-- Illegal declaration in data type definition
-- field A : Set
-- when scope checking the declaration
-- data D where
-- field A : Set
|
3-mid/physics/implement/c_math/source/c_math_c-conversion.adb | charlie5/lace | 20 | 18597 | package body c_math_c.Conversion
is
function "+" (Self : in Integer) return C.int
is
begin
return C.int (Self);
end "+";
function "+" (Self : in C.int) return Integer
is
begin
return Integer (Self);
end "+";
function "+" (Self : in math.Real) return c_math_c.Real
is
begin
return c_math_c.Real (Self);
end "+";
function "+" (Self : in c_math_c.Real) return math.Real
is
begin
return math.Real (Self);
end "+";
function "+" (Self : in math.Vector_2) return c_math_c.Vector_2.item
is
Result : c_math_c.Vector_2.item;
begin
begin
Result.x := c_math_c.Real (Self (1));
exception
when constraint_Error =>
if Self (1) > 0.0
then Result.x := c_math_c.Real'Last;
else Result.x := c_math_c.Real'First;
end if;
end;
begin
Result.y := c_math_c.Real (Self (2));
exception
when constraint_Error =>
if Self (2) > 0.0
then Result.x := c_math_c.Real'Last;
else Result.x := c_math_c.Real'First;
end if;
end;
return Result;
end "+";
function "+" (Self : in c_math_c.Vector_2.item) return math.Vector_2
is
begin
return (math.Real (Self.x),
math.Real (Self.y));
end "+";
function "+" (Self : in math.Vector_3) return c_math_c.Vector_3.item
is
Result : c_math_c.Vector_3.item;
begin
begin
Result.x := c_math_c.Real (Self (1));
exception
when constraint_Error =>
if Self (1) > 0.0
then Result.x := c_math_c.Real'Last;
else Result.x := c_math_c.Real'First;
end if;
end;
begin
Result.y := c_math_c.Real (Self (2));
exception
when constraint_Error =>
if Self (2) > 0.0
then Result.x := c_math_c.Real'Last;
else Result.x := c_math_c.Real'First;
end if;
end;
begin
Result.z := c_math_c.Real (Self (3));
exception
when constraint_Error =>
if Self (3) > 0.0
then Result.x := c_math_c.Real'Last;
else Result.x := c_math_c.Real'First;
end if;
end;
return Result;
end "+";
function "+" (Self : in c_math_c.Vector_3.item) return math.Vector_3
is
begin
return (math.Real (Self.x), math.Real (Self.y), math.Real (Self.z));
end "+";
function "+" (Self : in math.Matrix_3x3) return c_math_c.Matrix_3x3.item
is
begin
return (Real (Self (1,1)), Real (Self (1,2)), Real (Self (1,3)),
Real (Self (2,1)), Real (Self (2,2)), Real (Self (2,3)),
Real (Self (3,1)), Real (Self (3,2)), Real (Self (3,3)));
end "+";
function "+" (Self : in c_math_c.Matrix_3x3.item) return math.Matrix_3x3
is
begin
return (1 => (math.Real (Self.m00), math.Real (Self.m01), math.Real (Self.m02)),
2 => (math.Real (Self.m10), math.Real (Self.m11), math.Real (Self.m12)),
3 => (math.Real (Self.m20), math.Real (Self.m21), math.Real (Self.m22)));
end "+";
function "+" (Self : in math .Matrix_4x4 ) return c_math_c.Matrix_4x4.item
is
begin
return (Real (Self (1,1)), Real (Self (1,2)), Real (Self (1,3)), Real (Self (1,4)),
Real (Self (2,1)), Real (Self (2,2)), Real (Self (2,3)), Real (Self (2,4)),
Real (Self (3,1)), Real (Self (3,2)), Real (Self (3,3)), Real (Self (3,4)),
Real (Self (4,1)), Real (Self (4,2)), Real (Self (4,3)), Real (Self (4,4)));
end "+";
function "+" (Self : in c_math_c.Matrix_4x4.item) return math.Matrix_4x4
is
begin
return (1 => (math.Real (Self.m00), math.Real (Self.m01), math.Real (Self.m02), math.Real (Self.m03)),
2 => (math.Real (Self.m10), math.Real (Self.m11), math.Real (Self.m12), math.Real (Self.m13)),
3 => (math.Real (Self.m20), math.Real (Self.m21), math.Real (Self.m22), math.Real (Self.m23)),
4 => (math.Real (Self.m30), math.Real (Self.m31), math.Real (Self.m32), math.Real (Self.m33)));
end "+";
end c_math_c.Conversion;
|
Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xa0.log_21829_1012.asm | ljhsiun2/medusa | 9 | 168022 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r15
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WC_ht+0x6744, %rsi
lea addresses_UC_ht+0xcb04, %rdi
clflush (%rdi)
nop
and $23657, %r13
mov $84, %rcx
rep movsb
nop
and $14346, %rbp
lea addresses_WT_ht+0x19f7c, %rdi
nop
cmp $47907, %rdx
movl $0x61626364, (%rdi)
nop
nop
nop
nop
nop
cmp $41933, %rdi
lea addresses_normal_ht+0xb780, %rsi
lea addresses_D_ht+0x4ec4, %rdi
nop
nop
and %rbp, %rbp
mov $78, %rcx
rep movsb
nop
nop
nop
nop
nop
sub %rcx, %rcx
lea addresses_WC_ht+0x7be4, %rsi
lea addresses_WC_ht+0x5d6c, %rdi
nop
nop
nop
nop
nop
sub $59875, %r15
mov $84, %rcx
rep movsw
and %rdx, %rdx
lea addresses_normal_ht+0x43c4, %r13
nop
nop
nop
nop
add %rsi, %rsi
vmovups (%r13), %ymm3
vextracti128 $1, %ymm3, %xmm3
vpextrq $1, %xmm3, %rbp
nop
nop
nop
xor %rdi, %rdi
lea addresses_WT_ht+0x6ad1, %rdi
add %rdx, %rdx
movb (%rdi), %r13b
dec %rsi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r15
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %r14
push %r15
push %r8
push %rbx
push %rdi
// Store
lea addresses_PSE+0x1fb44, %rbx
sub $53643, %r12
movl $0x51525354, (%rbx)
nop
nop
sub $38240, %r14
// Load
lea addresses_RW+0x8344, %r8
nop
nop
sub %rdi, %rdi
mov (%r8), %r15
add $47960, %r8
// Store
lea addresses_normal+0x1f744, %r8
mfence
mov $0x5152535455565758, %r12
movq %r12, %xmm4
movups %xmm4, (%r8)
nop
nop
nop
nop
cmp %rbx, %rbx
// Store
lea addresses_D+0x2144, %rbx
add %r12, %r12
mov $0x5152535455565758, %rdi
movq %rdi, %xmm3
vmovups %ymm3, (%rbx)
nop
nop
nop
nop
nop
add %rdi, %rdi
// Store
lea addresses_D+0x13744, %rbx
xor $29801, %r13
mov $0x5152535455565758, %rdi
movq %rdi, (%rbx)
nop
nop
nop
nop
nop
inc %r15
// Store
lea addresses_US+0xf25c, %rbx
nop
nop
sub %rdi, %rdi
mov $0x5152535455565758, %r12
movq %r12, %xmm2
vmovups %ymm2, (%rbx)
nop
nop
nop
add %r15, %r15
// Faulty Load
lea addresses_PSE+0x1fb44, %r13
nop
nop
cmp %r12, %r12
mov (%r13), %r15d
lea oracles, %r12
and $0xff, %r15
shlq $12, %r15
mov (%r12,%r15,1), %r15
pop %rdi
pop %rbx
pop %r8
pop %r15
pop %r14
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_PSE', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_PSE', 'AVXalign': False, 'size': 4}}
{'src': {'NT': True, 'same': False, 'congruent': 11, 'type': 'addresses_RW', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_normal', 'AVXalign': False, 'size': 16}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_D', 'AVXalign': False, 'size': 32}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_D', 'AVXalign': True, 'size': 8}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_US', 'AVXalign': False, 'size': 32}}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_PSE', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'same': False, 'congruent': 10, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 6, 'type': 'addresses_UC_ht'}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 4}}
{'src': {'same': False, 'congruent': 0, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 7, 'type': 'addresses_D_ht'}}
{'src': {'same': False, 'congruent': 4, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 3, 'type': 'addresses_WC_ht'}}
{'src': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}
{'54': 21829}
54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54
*/
|
programs/oeis/193/A193253.asm | karttu/loda | 1 | 11806 | ; A193253: Great rhombicosidodecahedron with faces of centered polygons.
; 1,183,905,2527,5409,9911,16393,25215,36737,51319,69321,91103,117025,147447,182729,223231,269313,321335,379657,444639,516641,596023,683145,778367,882049,994551,1116233,1247455,1388577,1539959,1701961,1874943,2059265,2255287,2463369,2683871,2917153,3163575,3423497,3697279,3985281,4287863,4605385,4938207,5286689,5651191,6032073,6429695,6844417,7276599,7726601,8194783,8681505,9187127,9712009,10256511,10820993,11405815,12011337,12637919,13285921,13955703,14647625,15362047,16099329,16859831,17643913,18451935,19284257,20141239,21023241,21930623,22863745,23822967,24808649,25821151,26860833,27928055,29023177,30146559,31298561,32479543,33689865,34929887,36199969,37500471,38831753,40194175,41588097,43013879,44471881,45962463,47485985,49042807,50633289,52257791,53916673,55610295,57339017,59103199,60903201,62739383,64612105,66521727,68468609,70453111,72475593,74536415,76635937,78774519,80952521,83170303,85428225,87726647,90065929,92446431,94868513,97332535,99838857,102387839,104979841,107615223,110294345,113017567,115785249,118597751,121455433,124358655,127307777,130303159,133345161,136434143,139570465,142754487,145986569,149267071,152596353,155974775,159402697,162880479,166408481,169987063,173616585,177297407,181029889,184814391,188651273,192540895,196483617,200479799,204529801,208633983,212792705,217006327,221275209,225599711,229980193,234417015,238910537,243461119,248069121,252734903,257458825,262241247,267082529,271983031,276943113,281963135,287043457,292184439,297386441,302649823,307974945,313362167,318811849,324324351,329900033,335539255,341242377,347009759,352841761,358738743,364701065,370729087,376823169,382983671,389210953,395505375,401867297,408297079,414795081,421361663,427997185,434702007,441476489,448320991,455235873,462221495,469278217,476406399,483606401,490878583,498223305,505640927,513131809,520696311,528334793,536047615,543835137,551697719,559635721,567649503,575739425,583905847,592149129,600469631,608867713,617343735,625898057,634531039,643243041,652034423,660905545,669856767,678888449,688000951,697194633,706469855,715826977,725266359,734788361,744393343,754081665,763853687,773709769,783650271,793675553,803785975,813981897,824263679,834631681,845086263,855627785,866256607,876973089,887777591,898670473,909652095,920722817,931882999
mov $4,$0
pow $0,2
mul $0,18
mov $1,$0
mul $1,5
add $1,1
mov $2,$4
mul $2,32
add $1,$2
mov $3,$4
mul $3,$4
mul $3,$4
mov $2,$3
mul $2,60
add $1,$2
|
ProgrammingLanguages/Ada/Concurrency/hw1.adb | adithyap/coursework | 2 | 1738 | with Text_Io;
-- ------------------
procedure hw1 is
-- Package usage declarations
use Text_Io;
package Int_Io is new Integer_Io(Integer);
use Int_Io;
-- Task declarations
task T1 is
entry start;
end T1;
task T2 is
entry start;
end T2;
-- Task definitions
-- -----------------
task body T1 is
begin
for i in 1..500 loop
-- if i > 1 and ((i - 1) mod 50) = 0 then
if ((i - 1) mod 50) = 0 then
accept start do
null;
end start;
end if;
Int_Io.Put(i);
if i mod 50 = 0 then
T2.start;
end if;
end loop;
end T1;
-- -----------------
-- -----------------
task body T2 is
begin
T1.start;
for i in 501..1000 loop
if ((i - 1) mod 50) = 0 then
accept start do
null;
end start;
end if;
Int_Io.Put(i);
if i mod 50 = 0 then
T1.start;
end if;
end loop;
end T2;
-- -----------------
begin
null;
end hw1;
-- ------------------
|
programs/oeis/108/A108766.asm | karttu/loda | 1 | 13510 | <reponame>karttu/loda
; A108766: a(n) = A007290(n+2) - 1 = 2*C(n+2,3) - 1.
; -1,1,7,19,39,69,111,167,239,329,439,571,727,909,1119,1359,1631,1937,2279,2659,3079,3541,4047,4599,5199,5849,6551,7307,8119,8989,9919,10911,11967,13089,14279,15539,16871,18277,19759,21319,22959,24681,26487,28379,30359,32429,34591,36847,39199,41649
add $0,2
mov $1,$0
bin $1,3
mul $1,2
sub $1,1
|
8051/14arith/div.asm | iamvk1437k/mpmc | 1 | 6031 | <filename>8051/14arith/div.asm<gh_stars>1-10
MOV A,#05 ;Move 1st data in accumulator
MOV B,#05 ;Move 2nd data in accumulator
DIV AB ;Divide content of A by B
MOV dptr,#4150 ;Load the address of data pointer
MOVX @dptr,A ;Store quotient in memory
INC dptr ;Increment data pointer
MOV A,B ;Move content of B to A
MOVX @dptr,A ;Store remainder in memory
HERE:SJMP HERE ;Stop the program |
programs/oeis/250/A250654.asm | neoneye/loda | 22 | 28905 | ; A250654: Number of (n+1) X (6+1) 0..1 arrays with nondecreasing x(i,j)-x(i,j-1) in the i direction and nondecreasing min(x(i,j),x(i-1,j)) in the j direction.
; 64,134,274,554,1114,2234,4474,8954,17914,35834,71674,143354,286714,573434,1146874,2293754,4587514,9175034,18350074,36700154,73400314,146800634,293601274,587202554,1174405114,2348810234,4697620474,9395240954,18790481914,37580963834,75161927674,150323855354,300647710714,601295421434,1202590842874,2405181685754,4810363371514,9620726743034,19241453486074,38482906972154,76965813944314,153931627888634,307863255777274,615726511554554,1231453023109114,2462906046218234,4925812092436474,9851624184872954,19703248369745914,39406496739491834,78812993478983674,157625986957967354,315251973915934714,630503947831869434,1261007895663738874,2522015791327477754,5044031582654955514,10088063165309911034,20176126330619822074,40352252661239644154,80704505322479288314,161409010644958576634,322818021289917153274,645636042579834306554,1291272085159668613114,2582544170319337226234,5165088340638674452474,10330176681277348904954,20660353362554697809914,41320706725109395619834,82641413450218791239674,165282826900437582479354,330565653800875164958714,661131307601750329917434,1322262615203500659834874,2644525230407001319669754,5289050460814002639339514,10578100921628005278679034,21156201843256010557358074,42312403686512021114716154,84624807373024042229432314,169249614746048084458864634,338499229492096168917729274,676998458984192337835458554,1353996917968384675670917114,2707993835936769351341834234,5415987671873538702683668474,10831975343747077405367336954,21663950687494154810734673914,43327901374988309621469347834,86655802749976619242938695674,173311605499953238485877391354,346623210999906476971754782714,693246421999812953943509565434,1386492843999625907887019130874,2772985687999251815774038261754,5545971375998503631548076523514,11091942751997007263096153047034,22183885503994014526192306094074,44367771007988029052384612188154
mov $1,2
pow $1,$0
sub $1,1
mul $1,70
add $1,64
mov $0,$1
|
oeis/007/A007486.asm | neoneye/loda-programs | 11 | 88459 | ; A007486: a(n) = a(n-1) + a(n-2) + a(n-3).
; Submitted by <NAME>(s2)
; 1,3,4,8,15,27,50,92,169,311,572,1052,1935,3559,6546,12040,22145,40731,74916,137792,253439,466147,857378,1576964,2900489,5334831,9812284,18047604,33194719,61054607,112296930,206546256,379897793,698740979,1285185028,2363823800,4347749807,7996758635,14708332242,27052840684,49757931561,91519104487,168329876732,309606912780,569455893999,1047392683511,1926455490290,3543304067800,6517152241601,11986911799691,22047368109092,40551432150384,74585712059167,137184512318643,252321656528194,464091880906004
mov $1,1
mov $2,1
lpb $0
sub $0,1
add $1,$2
add $1,$3
sub $3,$1
add $1,$3
add $1,$3
sub $2,$3
add $3,$2
lpe
mov $0,$2
|
test/asset/agda-stdlib-1.0/Data/List/Membership/DecSetoid.agda | omega12345/agda-mode | 5 | 9792 | <filename>test/asset/agda-stdlib-1.0/Data/List/Membership/DecSetoid.agda
------------------------------------------------------------------------
-- The Agda standard library
--
-- Decidable setoid membership over lists
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary using (Decidable; DecSetoid)
module Data.List.Membership.DecSetoid {a ℓ} (DS : DecSetoid a ℓ) where
open import Data.List.Relation.Unary.Any using (any)
open DecSetoid DS
------------------------------------------------------------------------
-- Re-export contents of propositional membership
open import Data.List.Membership.Setoid (DecSetoid.setoid DS) public
------------------------------------------------------------------------
-- Other operations
infix 4 _∈?_
_∈?_ : Decidable _∈_
x ∈? xs = any (x ≟_) xs
|
libsrc/_DEVELOPMENT/l/sccz80/8-8080/l_rlde.asm | ahjelm/z88dk | 640 | 22784 | <gh_stars>100-1000
; sccz80 crt0 library - 8080 version
SECTION code_clib
SECTION code_l_sccz80
PUBLIC l_rlde
; {DE <r<r 1}
.l_rlde
ld a,e
rla
ld e,a
ld a,d
rla
ld d,a
ret
|
Basic programming exercises and solutions in C/12- C program to find square root of a number/project.asm | MahmoudFawzy01/C-solutions-Code4win- | 0 | 10697 | <filename>Basic programming exercises and solutions in C/12- C program to find square root of a number/project.asm
.file "project.c"
.def __main; .scl 2; .type 32; .endef
.section .rdata,"dr"
.align 8
.LC0:
.ascii "\12Please Enter any number to find the square root : \0"
.LC1:
.ascii "%lf\0"
.align 8
.LC3:
.ascii "Square root of %.2lf = %.2lf \12 \12\0"
.LC4:
.ascii "Enter valid value. \12 \0"
.text
.globl main
.def main; .scl 2; .type 32; .endef
.seh_proc main
main:
pushq %rbp
.seh_pushreg %rbp
movq %rsp, %rbp
.seh_setframe %rbp, 0
subq $48, %rsp
.seh_stackalloc 48
.seh_endprologue
call __main
leaq .LC0(%rip), %rcx
call printf
leaq -8(%rbp), %rax
movq %rax, %rdx
leaq .LC1(%rip), %rcx
call scanf
movsd -8(%rbp), %xmm0
pxor %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe .L7
movq -8(%rbp), %rax
movq %rax, %xmm0
call sqrt
movq %xmm0, %rax
movsd -8(%rbp), %xmm0
movq %rax, %rdx
movq %rdx, %rcx
movq %rax, %xmm1
movq %xmm0, %rax
movq %rax, %rdx
movq %rcx, %xmm2
movq %xmm1, %r8
movq %rdx, %xmm1
movq %rax, %rdx
leaq .LC3(%rip), %rcx
call printf
jmp .L4
.L7:
leaq .LC4(%rip), %rcx
call puts
.L4:
movl $0, %eax
addq $48, %rsp
popq %rbp
ret
.seh_endproc
.ident "GCC: (x86_64-posix-seh-rev1, Built by MinGW-W64 project) 6.2.0"
.def printf; .scl 2; .type 32; .endef
.def scanf; .scl 2; .type 32; .endef
.def sqrt; .scl 2; .type 32; .endef
.def puts; .scl 2; .type 32; .endef
|
oeis/109/A109803.asm | neoneye/loda-programs | 11 | 85629 | ; A109803: Expansion of (x^2+1)*(x+1)^2 / ((x-1)*(x^2+x+1)*(x^2+2*x-1)).
; Submitted by <NAME>(s3)
; 1,4,11,29,72,175,425,1028,2483,5997,14480,34959,84401,203764,491931,1187629,2867192,6922015,16711225,40344468,97400163,235144797,567689760,1370524319,3308738401,7988001124,19284740651,46557482429,112399705512,271356893455,655113492425,1581583878308,3818281249043,9218146376397,22254574001840,53727294380079,129709162762001,313145619904084,756000402570171,1825146425044429,4406293252659032,10637732930362495,25681759113384025,62001251157130548,149684261427645123,361369774012420797,872423809452486720
lpb $0
sub $0,1
sub $1,1
add $3,2
mov $2,$3
mod $3,2
add $3,$1
mov $1,$2
add $3,1
add $3,$2
add $1,$3
sub $1,1
lpe
mov $0,$1
add $0,1
|
oeis/118/A118416.asm | neoneye/loda-programs | 11 | 16554 | ; A118416: Triangle read by rows: T(n,k) = (2*k-1)*2^(n-1), 0<k<=n.
; Submitted by <NAME>
; 1,2,6,4,12,20,8,24,40,56,16,48,80,112,144,32,96,160,224,288,352,64,192,320,448,576,704,832,128,384,640,896,1152,1408,1664,1920,256,768,1280,1792,2304,2816,3328,3840,4352,512,1536,2560,3584,4608,5632,6656,7680,8704,9728,1024,3072,5120,7168,9216,11264,13312,15360,17408,19456,21504,2048,6144,10240,14336,18432,22528,26624,30720,34816,38912,43008,47104,4096,12288,20480,28672,36864,45056,53248,61440,69632,77824,86016,94208,102400,8192,24576,40960,57344,73728,90112,106496,122880,139264
lpb $0
add $1,1
sub $0,$1
lpe
mov $2,2
pow $2,$1
mul $2,2
mul $0,$2
add $2,$0
add $2,$0
mov $0,$2
div $0,2
|
extern/gnat_sdl/gnat_sdl2/src/sdl_filesystem_h.ads | AdaCore/training_material | 15 | 24746 | pragma Ada_2005;
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
with Interfaces.C.Strings;
package SDL_filesystem_h is
-- Simple DirectMedia Layer
-- Copyright (C) 1997-2018 <NAME> <<EMAIL>>
-- This software is provided 'as-is', without any express or implied
-- warranty. In no event will the authors be held liable for any damages
-- arising from the use of this software.
-- Permission is granted to anyone to use this software for any purpose,
-- including commercial applications, and to alter it and redistribute it
-- freely, subject to the following restrictions:
-- 1. The origin of this software must not be misrepresented; you must not
-- claim that you wrote the original software. If you use this software
-- in a product, an acknowledgment in the product documentation would be
-- appreciated but is not required.
-- 2. Altered source versions must be plainly marked as such, and must not be
-- misrepresented as being the original software.
-- 3. This notice may not be removed or altered from any source distribution.
--
--*
-- * \file SDL_filesystem.h
-- *
-- * \brief Include file for filesystem SDL API functions
--
-- Set up for C function definitions, even when using C++
--*
-- * \brief Get the path where the application resides.
-- *
-- * Get the "base path". This is the directory where the application was run
-- * from, which is probably the installation directory, and may or may not
-- * be the process's current working directory.
-- *
-- * This returns an absolute path in UTF-8 encoding, and is guaranteed to
-- * end with a path separator ('\\' on Windows, '/' most other places).
-- *
-- * The pointer returned by this function is owned by you. Please call
-- * SDL_free() on the pointer when you are done with it, or it will be a
-- * memory leak. This is not necessarily a fast call, though, so you should
-- * call this once near startup and save the string if you need it.
-- *
-- * Some platforms can't determine the application's path, and on other
-- * platforms, this might be meaningless. In such cases, this function will
-- * return NULL.
-- *
-- * \return String of base dir in UTF-8 encoding, or NULL on error.
-- *
-- * \sa SDL_GetPrefPath
--
function SDL_GetBasePath return Interfaces.C.Strings.chars_ptr; -- ..\SDL2_tmp\SDL_filesystem.h:63
pragma Import (C, SDL_GetBasePath, "SDL_GetBasePath");
--*
-- * \brief Get the user-and-app-specific path where files can be written.
-- *
-- * Get the "pref dir". This is meant to be where users can write personal
-- * files (preferences and save games, etc) that are specific to your
-- * application. This directory is unique per user, per application.
-- *
-- * This function will decide the appropriate location in the native filesystem,
-- * create the directory if necessary, and return a string of the absolute
-- * path to the directory in UTF-8 encoding.
-- *
-- * On Windows, the string might look like:
-- * "C:\\Users\\bob\\AppData\\Roaming\\My Company\\My Program Name\\"
-- *
-- * On Linux, the string might look like:
-- * "/home/bob/.local/share/My Program Name/"
-- *
-- * On Mac OS X, the string might look like:
-- * "/Users/bob/Library/Application Support/My Program Name/"
-- *
-- * (etc.)
-- *
-- * You specify the name of your organization (if it's not a real organization,
-- * your name or an Internet domain you own might do) and the name of your
-- * application. These should be untranslated proper names.
-- *
-- * Both the org and app strings may become part of a directory name, so
-- * please follow these rules:
-- *
-- * - Try to use the same org string (including case-sensitivity) for
-- * all your applications that use this function.
-- * - Always use a unique app string for each one, and make sure it never
-- * changes for an app once you've decided on it.
-- * - Unicode characters are legal, as long as it's UTF-8 encoded, but...
-- * - ...only use letters, numbers, and spaces. Avoid punctuation like
-- * "Game Name 2: Bad Guy's Revenge!" ... "Game Name 2" is sufficient.
-- *
-- * This returns an absolute path in UTF-8 encoding, and is guaranteed to
-- * end with a path separator ('\\' on Windows, '/' most other places).
-- *
-- * The pointer returned by this function is owned by you. Please call
-- * SDL_free() on the pointer when you are done with it, or it will be a
-- * memory leak. This is not necessarily a fast call, though, so you should
-- * call this once near startup and save the string if you need it.
-- *
-- * You should assume the path returned by this function is the only safe
-- * place to write files (and that SDL_GetBasePath(), while it might be
-- * writable, or even the parent of the returned path, aren't where you
-- * should be writing things).
-- *
-- * Some platforms can't determine the pref path, and on other
-- * platforms, this might be meaningless. In such cases, this function will
-- * return NULL.
-- *
-- * \param org The name of your organization.
-- * \param app The name of your application.
-- * \return UTF-8 string of user dir in platform-dependent notation. NULL
-- * if there's a problem (creating directory failed, etc).
-- *
-- * \sa SDL_GetBasePath
--
function SDL_GetPrefPath (org : Interfaces.C.Strings.chars_ptr; app : Interfaces.C.Strings.chars_ptr) return Interfaces.C.Strings.chars_ptr; -- ..\SDL2_tmp\SDL_filesystem.h:126
pragma Import (C, SDL_GetPrefPath, "SDL_GetPrefPath");
-- Ends C function definitions when using C++
-- vi: set ts=4 sw=4 expandtab:
end SDL_filesystem_h;
|
programs/oeis/028/A028913.asm | neoneye/loda | 22 | 244036 | ; A028913: First differences of A007952.
; 1,2,2,4,2,6,4,8,4,8,6,10,2,18,4,20,6,10,14,18,4,20,18,18,4,26,18,16,8,40,8,30,12,30,16,24,12,44,12,30,30,42,10,26,24,46,14,48,22,38,30,48,12,60,12,52,14,54,52,26,12,66,54,60,10,26,60,60,10,74,30,52,56,64,14,34,50,108,18,60,42,82,50,22,26,94,60,86,22,60,56,42,58,104,18,114,18,30,132,48
mov $3,2
mov $5,$0
lpb $3
mov $0,$5
sub $3,1
add $0,$3
trn $0,1
seq $0,104738 ; Positions of records in A104706.
mul $0,2
sub $0,1
mov $2,$3
mul $2,$0
add $1,$2
mov $4,$0
lpe
min $5,1
mul $5,$4
sub $1,$5
mov $0,$1
|
test/succeed/Issue482.agda | asr/agda-kanso | 1 | 2743 | <reponame>asr/agda-kanso<gh_stars>1-10
module Issue482 where
open import Common.Level using (_⊔_)
postulate
P : ∀ a b → Set a → Set b → Set (a ⊔ b)
F : ∀ ℓ → Set ℓ
p : ∀ a (A : Set a) → P a a A (F a)
Q : ∀ a → Set a → ∀ b → Set (a ⊔ b)
P-to-Q : ∀ a b (A : Set a) (B : Set b) → P a b A B → Q a A b
q : ∀ a (A : Set a) → Q a A _
q a A = P-to-Q _ _ _ _ (p _ _)
{-
There was a bug in the level constraint solver that looks
at pairs of constraints.
-} |
bb-runtimes/arm/smartfusion2/s-sf2gpi.ads | JCGobbi/Nucleo-STM32G474RE | 0 | 6910 | <reponame>JCGobbi/Nucleo-STM32G474RE<gh_stars>0
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- Copyright (C) 2016, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Ada.Interrupts.Names;
package System.SF2.GPIO is
subtype GPIO_Num is Integer range 0 .. 31;
type GPIO_Mode is
(Input_Mode,
Output_Mode,
In_Out_Mode);
type GPIO_Interrupt_Mode is
(IRQ_Level_High,
IRQ_Level_Low,
IRQ_Edge_Positive,
IRQ_Edge_Negative,
IRQ_Edge_Both);
procedure GPIO_Init;
procedure GPIO_Config
(Num : GPIO_Num;
Mode : GPIO_Mode);
procedure GPIO_Config_Interrupt
(Num : GPIO_Num;
Event : GPIO_Interrupt_Mode;
Mode : GPIO_Mode := Input_Mode);
procedure Set (Num : GPIO_Num)
with Inline_Always;
procedure Clear (Num : GPIO_Num)
with Inline_Always;
function Set (Num : GPIO_Num) return Boolean
with Inline_Always;
function Interrupt_Name
(Num : GPIO_Num) return Ada.Interrupts.Interrupt_ID;
private
function Interrupt_Name
(Num : GPIO_Num) return Ada.Interrupts.Interrupt_ID
is (case Num is
when 0 => Ada.Interrupts.Names.GPIO_INT_0_Interrupt,
when 1 => Ada.Interrupts.Names.GPIO_INT_1_Interrupt,
when 2 => Ada.Interrupts.Names.GPIO_INT_2_Interrupt,
when 3 => Ada.Interrupts.Names.GPIO_INT_3_Interrupt,
when 4 => Ada.Interrupts.Names.GPIO_INT_4_Interrupt,
when 5 => Ada.Interrupts.Names.GPIO_INT_5_Interrupt,
when 6 => Ada.Interrupts.Names.GPIO_INT_6_Interrupt,
when 7 => Ada.Interrupts.Names.GPIO_INT_7_Interrupt,
when 8 => Ada.Interrupts.Names.GPIO_INT_8_Interrupt,
when 9 => Ada.Interrupts.Names.GPIO_INT_9_Interrupt,
when 10 => Ada.Interrupts.Names.GPIO_INT_10_Interrupt,
when 11 => Ada.Interrupts.Names.GPIO_INT_11_Interrupt,
when 12 => Ada.Interrupts.Names.GPIO_INT_12_Interrupt,
when 13 => Ada.Interrupts.Names.GPIO_INT_13_Interrupt,
when 14 => Ada.Interrupts.Names.GPIO_INT_14_Interrupt,
when 15 => Ada.Interrupts.Names.GPIO_INT_15_Interrupt,
when 16 => Ada.Interrupts.Names.GPIO_INT_16_Interrupt,
when 17 => Ada.Interrupts.Names.GPIO_INT_17_Interrupt,
when 18 => Ada.Interrupts.Names.GPIO_INT_18_Interrupt,
when 19 => Ada.Interrupts.Names.GPIO_INT_19_Interrupt,
when 20 => Ada.Interrupts.Names.GPIO_INT_20_Interrupt,
when 21 => Ada.Interrupts.Names.GPIO_INT_21_Interrupt,
when 22 => Ada.Interrupts.Names.GPIO_INT_22_Interrupt,
when 23 => Ada.Interrupts.Names.GPIO_INT_23_Interrupt,
when 24 => Ada.Interrupts.Names.GPIO_INT_24_Interrupt,
when 25 => Ada.Interrupts.Names.GPIO_INT_25_Interrupt,
when 26 => Ada.Interrupts.Names.GPIO_INT_26_Interrupt,
when 27 => Ada.Interrupts.Names.GPIO_INT_27_Interrupt,
when 28 => Ada.Interrupts.Names.GPIO_INT_28_Interrupt,
when 29 => Ada.Interrupts.Names.GPIO_INT_29_Interrupt,
when 30 => Ada.Interrupts.Names.GPIO_INT_30_Interrupt,
when 31 => Ada.Interrupts.Names.GPIO_INT_31_Interrupt);
end System.SF2.GPIO;
|
programs/oeis/178/A178242.asm | neoneye/loda | 22 | 103706 | ; A178242: Numerator of n*(5+n)/((n+1)*(n+4)).
; 0,3,7,6,9,25,33,21,26,63,75,44,51,117,133,75,84,187,207,114,125,273,297,161,174,375,403,216,231,493,525,279,296,627,663,350,369,777,817,429,450,943,987,516,539,1125,1173,611,636,1323,1375,714,741,1537,1593,825,854,1767,1827,944,975,2013,2077,1071,1104,2275,2343,1206,1241,2553,2625,1349,1386,2847,2923,1500,1539,3157,3237,1659,1700,3483,3567,1826,1869,3825,3913,2001,2046,4183,4275,2184,2231,4557,4653,2375,2424,4947,5047,2574
mov $1,$0
add $1,5
mul $0,$1
div $0,2
dif $0,2
|
antlr4-formatter/src/test/resources/lasttoken.formatted.g4 | quantrpeter/Antlr4Formatter | 28 | 660 | <filename>antlr4-formatter/src/test/resources/lasttoken.formatted.g4<gh_stars>10-100
grammar Hello;
WS
: [ \t\r\n]+ -> skip
; // skip spaces, tabs, newlines
|
maps/MoveDeletersHouse.asm | Dev727/ancientplatinum | 28 | 168582 | <reponame>Dev727/ancientplatinum
object_const_def ; object_event constants
const MOVEDELETERSHOUSE_SUPER_NERD
MoveDeletersHouse_MapScripts:
db 0 ; scene scripts
db 0 ; callbacks
MoveDeleter:
faceplayer
opentext
special MoveDeletion
waitbutton
closetext
end
MoveDeletersHouseBookshelf:
jumpstd difficultbookshelf
MoveDeletersHouse_MapEvents:
db 0, 0 ; filler
db 2 ; warp events
warp_event 2, 7, BLACKTHORN_CITY, 6
warp_event 3, 7, BLACKTHORN_CITY, 6
db 0 ; coord events
db 2 ; bg events
bg_event 0, 1, BGEVENT_READ, MoveDeletersHouseBookshelf
bg_event 1, 1, BGEVENT_READ, MoveDeletersHouseBookshelf
db 1 ; object events
object_event 2, 3, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MoveDeleter, -1
|
repositories-cache.adb | annexi-strayline/AURA | 13 | 10284 | ------------------------------------------------------------------------------
-- --
-- Ada User Repository Annex (AURA) --
-- Reference Implementation --
-- --
-- ------------------------------------------------------------------------ --
-- --
-- Copyright (C) 2020, ANNEXI-STRAYLINE Trans-Human Ltd. --
-- All rights reserved. --
-- --
-- Original Contributors: --
-- * <NAME> (ANNEXI-STRAYLINE) --
-- --
-- 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 copyright holder 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. --
-- --
------------------------------------------------------------------------------
with Ada.Directories;
with Workers;
with Workers.Reporting;
package body Repositories.Cache is
-- Configuration
Cache_Root: constant String
:= Ada.Directories.Current_Directory & "/.aura/cache";
-- Useful things
New_Line: Character renames Workers.Reporting.New_Line;
--
-- Validate_Local_Or_System
--
-- Validate_Local_Or_System validates a Local or System repo.
--
-- The first step is to verify that Location is accessible, followed by
-- a collective hash of all non-hidden files contained therein (recursively)
--
-- For existing repos, the calculated hash is verified. If there is a hash
-- mismatch, the use is notified interactively, and is given the option
-- to accept the changes or abort the process.
--
-- Changes to System repositories imply potential global changes to all
-- subsystems already checked-out from that repository
--
-- If the user choses to accept changes on a repository, the repository
-- unit's Snapshot property is updated with the hash
--
-- If Snapshot of the dispatched repo is empty, the repo is assumed to be
-- new.
--
-- If Location is not accessible, validation fails
--
-- Finally, if the local repo is validated, it's path is used to set
-- Cache_Path
package Validate_Local_Or_System is
procedure Dispatch (Repo: in Repository; Index: in Repository_Index);
-- Dispatch submits a work order to validate a local repository
-- identified by Repo/Index. The process is attached to the
-- Caching_Progress tracker
end Validate_Local_Or_System;
package body Validate_Local_Or_System is separate;
--
-- Checkout_Git
--
-- Checkout_Git ensures that the cache for a given Git repo is both
-- present and valid.
--
-- If the cache is not present, an attempt is made to clone and checkout
-- the repo. If the cache is present, it is verified to be of the correct
-- snapshot (commit), and tracking branch. If these are not the expected
-- value, the existing cache is expunged, and a new cache is checked-out
package Checkout_Git is
procedure Dispatch (Repo: in Repository; Index: in Repository_Index);
-- Dispatch submits a work order to substantiate a git repository
-- identified by Repo/Index. The process is attached to the
-- Caching_Progress tracker
end Checkout_Git;
package body Checkout_Git is separate;
------------------------
-- Cache_Repositories --
------------------------
procedure Cache_Repositories is
Repo_Vec: constant Repository_Vectors.Vector := Extract_All;
begin
-- The Root Repository is special, and should never be "cached". In fact,
-- it always has a cache state of "Available", So let's not waste time
-- iterating over it
for I in Root_Repository + 1 .. Repository_Index(Repo_Vec.Length) loop
if Repo_Vec(I).Cache_State = Requested then
Caching_Progress.Increment_Total_Items;
case Repo_Vec(I).Format is
when System | Local =>
Validate_Local_Or_System.Dispatch
(Repo => Repo_Vec(I), Index => I);
when Git =>
Checkout_Git.Dispatch (Repo => Repo_Vec(I), Index => I);
end case;
end if;
end loop;
end Cache_Repositories;
end Repositories.Cache;
|
LPS/Esercizi/26.04.2022_compito/es2.asm | Giacomix02/esercitazioni-java | 3 | 9783 | <reponame>Giacomix02/esercitazioni-java
#specifica 1 MIPS
.text
li $s0,0x12345678
li $s1,0x8010001
or $s0,$s0,$s1
#GIUSTO! |
MSDOS/Virus.MSDOS.Unknown.trash.asm | fengjixuchui/Family | 3 | 26140 | <reponame>fengjixuchui/Family
page ,132
title Trash - smashes the boot record on the first hard disk
name TRASH
.radix 16
code segment
assume cs:code,ds:code
org 100
CODEX equ 0C000 ; Or use 0300 when tracing DOS
CR equ 0Dh
LF equ 0A
start:
jmp do_it
oldint1 dd ?
newintx dd ?
oldintx dd ?
trace db 1
found db 0
buffer db 200 dup (0)
message db CR,LF,'********** W A R N I N G ! ! ! **********',CR,LF,CR,LF
db 'This program, when run, will zero (DESTROY!) the',CR,LF
db 'master boot record of your first hard disk.',CR,LF,CR,LF
db 'The purpose of this is to test the antivirus software,',CR,LF
db 'so be sure you have installed your favourite',CR,LF
db 'protecting program before running this one!',CR,LF
db "(It's almost sure it will fail to protect you anyway!)",CR,LF
db CR,LF,'Press any key to abort, or',CR,LF
db 'press Ctrl-Alt-RightShift-F5 to proceed (at your own risk!) $'
warned db CR,LF,CR,LF,'Allright, you were warned!',CR,LF,'$'
do_it:
mov ax,600 ; Clear the screen by scrolling it up
mov bh,7
mov dx,1950
xor cx,cx
int 10
mov ah,0F ; Get the current video mode
int 10 ; (the video page, more exactly)
mov ah,2 ; Home the cursor
xor dx,dx
int 10
mov ah,9 ; Print a warning message
mov dx,offset message
int 21
mov ax,0C08 ; Flush the keyboard and get a char
int 21
cmp al,0 ; Extendet ASCII?
jne quit1 ; Exit if not
mov ah,8 ; Get the key code
int 21
cmp al,6C ; Shift-F5?
jne quit1 ; Exit if not
mov ah,2 ; Get keyboard shift status
int 16
and al,1101b ; Ctrl-Alt-RightShift?
jnz proceed ; Proceed if so
quit1:
jmp quit ; Otherwise exit
proceed:
mov ah,9 ; Print the last message
mov dx,offset warned
int 21
mov ax,3501 ; Get interrupt vector 1 (single steping)
int 21
mov word ptr oldint1,bx
mov word ptr oldint1+2,es
mov ax,2501 ; Set new INT 1 handler
mov dx,offset newint1
int 21
mov ax,3513 ; Get interrupt vector 13
int 21
mov word ptr oldintx,bx
mov word ptr oldintx+2,es
mov word ptr newintx,bx
mov word ptr newintx+2,es
; The following code is sacred in it's present form.
; To change it would cause volcanos to errupt,
; the ground to shake, and program not to run!
mov ax,200
push ax
push cs
mov ax,offset done
push ax
mov ax,100
push ax
push cs
mov ax,offset faddr
push ax
mov ah,55
iret
assume ds:nothing
faddr:
jmp oldintx
newint1:
push bp
mov bp,sp
cmp trace,0
jne search
exit:
and [bp+6],not 100
exit1:
pop bp
iret
search:
cmp [bp+4],CODEX
jb exit1
;Or use ja if you want to trace DOS-owned interrupt
push ax
mov ax,[bp+4]
mov word ptr newintx+2,ax
mov ax,[bp+2]
mov word ptr newintx,ax
pop ax
mov found,1
mov trace,0
jmp exit
assume ds:code
done:
mov trace,0
push ds
mov ax,word ptr oldint1+2
mov dx,word ptr oldint1
mov ds,ax
mov ax,2501 ; Restore old INT 1 handler
int 21
pop ds
; Code beyong this point is not sacred...
; It may be perverted in any manner by any pervert.
cmp found,1 ; See if original INT 13 handler found
jne quit ; Exit if not
push ds
pop es ; Restore ES
mov ax,301 ; Write 1 sector
mov cx,1 ; Cylinder 0, sector 1
mov dx,80 ; Head 0, drive 80h
mov bx,offset buffer
pushf ; Simulate INT 13
call newintx ; Do it
quit:
mov ax,4C00 ; Exit program
int 21
code ends
end start
|
libtool/src/gmp-6.1.2/mpn/x86/pentium4/sse2/sub_n.asm | kroggen/aergo | 1,602 | 104315 | dnl Intel Pentium-4 mpn_sub_n -- mpn subtraction.
dnl Copyright 2001, 2002 Free Software Foundation, Inc.
dnl This file is part of the GNU MP Library.
dnl
dnl The GNU MP Library is free software; you can redistribute it and/or modify
dnl it under the terms of either:
dnl
dnl * the GNU Lesser General Public License as published by the Free
dnl Software Foundation; either version 3 of the License, or (at your
dnl option) any later version.
dnl
dnl or
dnl
dnl * the GNU General Public License as published by the Free Software
dnl Foundation; either version 2 of the License, or (at your option) any
dnl later version.
dnl
dnl or both in parallel, as here.
dnl
dnl The GNU MP Library is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
dnl for more details.
dnl
dnl You should have received copies of the GNU General Public License and the
dnl GNU Lesser General Public License along with the GNU MP Library. If not,
dnl see https://www.gnu.org/licenses/.
include(`../config.m4')
C cycles/limb
C dst!=src1,2 dst==src1 dst==src2
C P6 model 0-8,10-12 -
C P6 model 9 (Banias) ?
C P6 model 13 (Dothan) ?
C P4 model 0-1 (Willamette) ?
C P4 model 2 (Northwood) 4 6 6
C P4 model 3-4 (Prescott) 4.25 7.5 7.5
defframe(PARAM_CARRY,20)
defframe(PARAM_SIZE, 16)
defframe(PARAM_SRC2, 12)
defframe(PARAM_SRC1, 8)
defframe(PARAM_DST, 4)
dnl re-use parameter space
define(SAVE_EBX,`PARAM_SRC1')
TEXT
ALIGN(8)
PROLOGUE(mpn_sub_nc)
deflit(`FRAME',0)
movd PARAM_CARRY, %mm0
jmp L(start_nc)
EPILOGUE()
ALIGN(8)
PROLOGUE(mpn_sub_n)
deflit(`FRAME',0)
pxor %mm0, %mm0
L(start_nc):
mov PARAM_SRC1, %eax
mov %ebx, SAVE_EBX
mov PARAM_SRC2, %ebx
mov PARAM_DST, %edx
mov PARAM_SIZE, %ecx
lea (%eax,%ecx,4), %eax C src1 end
lea (%ebx,%ecx,4), %ebx C src2 end
lea (%edx,%ecx,4), %edx C dst end
neg %ecx C -size
L(top):
C eax src1 end
C ebx src2 end
C ecx counter, limbs, negative
C edx dst end
C mm0 carry bit
movd (%eax,%ecx,4), %mm1
movd (%ebx,%ecx,4), %mm2
psubq %mm2, %mm1
psubq %mm0, %mm1
movd %mm1, (%edx,%ecx,4)
psrlq $63, %mm1
add $1, %ecx
jz L(done_mm1)
movd (%eax,%ecx,4), %mm0
movd (%ebx,%ecx,4), %mm2
psubq %mm2, %mm0
psubq %mm1, %mm0
movd %mm0, (%edx,%ecx,4)
psrlq $63, %mm0
add $1, %ecx
jnz L(top)
movd %mm0, %eax
mov SAVE_EBX, %ebx
emms
ret
L(done_mm1):
movd %mm1, %eax
mov SAVE_EBX, %ebx
emms
ret
EPILOGUE()
|
Categories/Monad/Strong.agda | copumpkin/categories | 98 | 5311 | {-# OPTIONS --universe-polymorphism #-}
module Categories.Monad.Strong where
open import Categories.Category
open import Categories.Monoidal
open import Categories.Functor
renaming (id to idF; _∘_ to _∘F_; _≡_ to _≡F_)
open import Categories.Functor.Constant
open import Categories.NaturalTransformation
renaming (id to idN; _≡_ to _≡N_)
open import Categories.NaturalIsomorphism
using (module NaturalIsomorphism)
open import Categories.Monad
open import Categories.Product
open import Data.Fin using (Fin)
open import Function using (flip)
open import Data.Nat using ()
open import Data.Product using (_,_)
open import Data.Vec
using (Vec; _∷_; []; [_]; lookup)
open import Level
record Strength
{o ℓ e}(C : Category o ℓ e)
(monoidal : Monoidal C)
(M : Monad C)
: Set (o ⊔ ℓ ⊔ e) where
open Category C
open Monoidal monoidal
using (⊗)
renaming (id to idObj)
open NaturalIsomorphism (Monoidal.identityˡ monoidal) using () renaming (F⇒G to υˡ)
open NaturalIsomorphism (Monoidal.identityʳ monoidal) using () renaming (F⇒G to υʳ)
open NaturalIsomorphism (Monoidal.assoc monoidal) using ()
renaming (F⇒G to αʳ; F⇐G to αˡ)
module υˡ = NaturalTransformation υˡ
open Functor ⊗
using ()
renaming (F₀ to ⊗₀; F₁ to ⊗₁)
unitorˡ : ∀ A → ⊗₀ (idObj , A) ⇒ A
unitorˡ A = υˡ.η (flip lookup [ A ])
associatorʳ : ∀ A B C → ⊗₀ (⊗₀ (A , B) , C) ⇒ ⊗₀ (A , ⊗₀ (B , C))
associatorʳ A B C = NaturalTransformation.η αʳ (flip lookup (A ∷ B ∷ C ∷ []))
associatorˡ : ∀ A B C → ⊗₀ (A , ⊗₀ (B , C)) ⇒ ⊗₀ (⊗₀ (A , B) , C)
associatorˡ A B C = NaturalTransformation.η αˡ (flip lookup (A ∷ B ∷ C ∷ []))
module M = Monad M
open M using (F)
open Functor F
using (F₀; F₁)
open NaturalTransformation M.η
using (η)
open NaturalTransformation M.μ
using ()
renaming (η to μ)
field
σ : NaturalTransformation (⊗ ∘F (idF {C = C} ⁂ F)) (F ∘F ⊗)
module σ = NaturalTransformation σ
field
.identity₁ : ∀ {A}
→ F₁ (unitorˡ A) ∘ σ.η (idObj , A)
≡ unitorˡ (F₀ A)
.identity₂ : ∀ {A B}
→ σ.η (A , B) ∘ ⊗₁ (id , η B)
≡ η (⊗₀ (A , B))
α-assoc : ∀ {A B C}
→ F₁ (associatorʳ A B C) ∘ σ.η (⊗₀ (A , B) , C)
≡ σ.η (A , ⊗₀ (B , C)) ∘ ⊗₁ (id , σ.η (B , C)) ∘ associatorʳ A B (F₀ C)
μ-assoc : ∀ {A B}
→ μ (⊗₀ (A , B)) ∘ F₁ (σ.η (A , B)) ∘ σ.η (A , F₀ B)
≡ σ.η (A , B) ∘ ⊗₁ (id , μ B)
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_1625.asm | ljhsiun2/medusa | 9 | 101453 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r14
push %r8
push %rax
push %rbx
push %rcx
lea addresses_WC_ht+0xc6ed, %r14
nop
nop
nop
sub %rcx, %rcx
mov $0x6162636465666768, %rax
movq %rax, (%r14)
nop
nop
nop
nop
nop
add $51112, %rbx
lea addresses_normal_ht+0xe725, %r10
nop
nop
xor %rax, %rax
movb $0x61, (%r10)
nop
nop
nop
nop
nop
cmp %rax, %rax
lea addresses_WC_ht+0x1eaed, %r10
nop
xor %r13, %r13
mov $0x6162636465666768, %r14
movq %r14, %xmm7
vmovups %ymm7, (%r10)
nop
and %r13, %r13
lea addresses_WT_ht+0x18eed, %r8
nop
nop
nop
nop
add %rax, %rax
movups (%r8), %xmm5
vpextrq $0, %xmm5, %r10
nop
nop
nop
nop
xor $22127, %rbx
lea addresses_A_ht+0x17d3, %rbx
nop
cmp $37902, %rcx
mov $0x6162636465666768, %r14
movq %r14, %xmm6
movups %xmm6, (%rbx)
and $58919, %rcx
lea addresses_WT_ht+0x111c7, %r14
sub $58836, %rcx
mov $0x6162636465666768, %r8
movq %r8, %xmm2
vmovups %ymm2, (%r14)
nop
inc %rbx
lea addresses_UC_ht+0xaeed, %r8
nop
nop
sub $24581, %r13
mov $0x6162636465666768, %r10
movq %r10, %xmm2
movups %xmm2, (%r8)
nop
nop
nop
xor %r8, %r8
lea addresses_UC_ht+0x5be9, %rcx
nop
sub %r10, %r10
mov $0x6162636465666768, %r8
movq %r8, %xmm7
vmovups %ymm7, (%rcx)
sub $59538, %r10
lea addresses_UC_ht+0x12eed, %r14
nop
inc %r13
movw $0x6162, (%r14)
nop
sub %r13, %r13
lea addresses_D_ht+0xd3ad, %r8
nop
nop
nop
nop
inc %r10
movb $0x61, (%r8)
nop
nop
nop
xor %rbx, %rbx
pop %rcx
pop %rbx
pop %rax
pop %r8
pop %r14
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r13
push %r8
push %r9
push %rbx
push %rsi
// Store
mov $0x7deb000000046e, %r11
nop
nop
nop
nop
nop
inc %rsi
mov $0x5152535455565758, %rbx
movq %rbx, %xmm2
movups %xmm2, (%r11)
nop
nop
nop
nop
nop
add $43255, %r8
// Load
mov $0x25336b0000000eed, %r9
nop
cmp %r12, %r12
movb (%r9), %r8b
nop
nop
nop
nop
cmp $32657, %rsi
// Store
lea addresses_US+0x12bd5, %r8
nop
nop
nop
cmp %r11, %r11
mov $0x5152535455565758, %r9
movq %r9, %xmm6
movups %xmm6, (%r8)
nop
nop
nop
nop
nop
cmp $62864, %rbx
// Faulty Load
lea addresses_D+0x9eed, %rsi
nop
dec %rbx
mov (%rsi), %r12
lea oracles, %r9
and $0xff, %r12
shlq $12, %r12
mov (%r9,%r12,1), %r12
pop %rsi
pop %rbx
pop %r9
pop %r8
pop %r13
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_D', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 8, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 3, 'size': 16, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_D', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 8, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 2, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 10, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 11, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 1, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 1, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 8, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 11, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': True, 'congruent': 5, 'size': 1, 'same': True, 'NT': False}}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
|
src/common/_pm_imp.asm | OS2World/DEV-UTIL-ScitechOS_PML | 0 | 241634 | ;****************************************************************************
;*
;* SciTech OS Portability Manager Library
;*
;* Copyright (C) 1991-1998 SciTech Software, Inc.
;* All rights reserved.
;*
;* ======================================================================
;* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
;* | |
;* |This copyrighted computer code contains proprietary technology |
;* |owned by SciTech Software, Inc., located at 505 Wall Street, |
;* |Chico, CA 95928 USA (http://www.scitechsoft.com). |
;* | |
;* |The contents of this file are subject to the SciTech Nucleus |
;* |License; you may *not* use this file or related software except in |
;* |compliance with the License. You may obtain a copy of the License |
;* |at http://www.scitechsoft.com/nucleus-license.txt |
;* | |
;* |Software distributed under the License is distributed on an |
;* |"AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or |
;* |implied. See the License for the specific language governing |
;* |rights and limitations under the License. |
;* | |
;* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
;* ======================================================================
;*
;* Language: TASM 4.0 or NASM
;* Environment: IBM PC 32 bit Protected Mode.
;*
;* Description: Module to implement the import stubs for all the PM
;* API functions for Intel binary portable drivers.
;*
;****************************************************************************
IDEAL
include "scitech.mac" ; Memory model macros
BEGIN_IMPORTS_DEF _PM_imports
DECLARE_IMP PM_getModeType,0
DECLARE_IMP PM_getBIOSPointer,0
DECLARE_IMP PM_getA0000Pointer,0
DECLARE_IMP PM_mapPhysicalAddr,0
DECLARE_IMP PM_mallocShared,0
SKIP_IMP _PM_reserved1,0
DECLARE_IMP PM_freeShared,0
DECLARE_IMP PM_mapToProcess,0
DECLARE_IMP PM_mapRealPointer,0
DECLARE_IMP PM_allocRealSeg,0
DECLARE_IMP PM_freeRealSeg,0
DECLARE_IMP PM_allocLockedMem,0
DECLARE_IMP PM_freeLockedMem,0
DECLARE_IMP PM_callRealMode,0
DECLARE_IMP PM_int86,0
DECLARE_IMP PM_int86x,0
DECLARE_IMP DPMI_int86,0
DECLARE_IMP PM_availableMemory,0
DECLARE_IMP PM_getVESABuf,0
DECLARE_IMP PM_getOSType,0
DECLARE_IMP PM_fatalError,0
DECLARE_IMP PM_setBankA,0
DECLARE_IMP PM_setBankAB,0
DECLARE_IMP PM_setCRTStart,0
DECLARE_IMP PM_getCurrentPat,0
DECLARE_IMP PM_getVBEAFPath,0
DECLARE_IMP PM_getNucleusPath,0
DECLARE_IMP PM_getNucleusConfigPath,0
DECLARE_IMP PM_getUniqueID,0
DECLARE_IMP PM_getMachineName,0
DECLARE_IMP VF_available,0
DECLARE_IMP VF_init,0
DECLARE_IMP VF_exit,0
DECLARE_IMP PM_openConsole,0
DECLARE_IMP PM_getConsoleStateSize,0
DECLARE_IMP PM_saveConsoleState,0
DECLARE_IMP PM_restoreConsoleState,0
DECLARE_IMP PM_closeConsole,0
DECLARE_IMP PM_setOSCursorLocation,0
DECLARE_IMP PM_setOSScreenWidth,0
DECLARE_IMP PM_enableWriteCombine,0
DECLARE_IMP PM_backslash,0
DECLARE_IMP PM_lockDataPages,0
DECLARE_IMP PM_unlockDataPages,0
DECLARE_IMP PM_lockCodePages,0
DECLARE_IMP PM_unlockCodePages,0
DECLARE_IMP PM_setRealTimeClockHandler,0
DECLARE_IMP PM_setRealTimeClockFrequency,0
DECLARE_IMP PM_restoreRealTimeClockHandler,0
DECLARE_IMP PM_doBIOSPOST,0
DECLARE_IMP PM_getBootDrive,0
DECLARE_IMP PM_freePhysicalAddr,0
DECLARE_IMP PM_inpb,0
DECLARE_IMP PM_inpw,0
DECLARE_IMP PM_inpd,0
DECLARE_IMP PM_outpb,0
DECLARE_IMP PM_outpw,0
DECLARE_IMP PM_outpd,0
SKIP_IMP _PM_reserved2,0
DECLARE_IMP PM_setSuspendAppCallback,0
DECLARE_IMP PM_haveBIOSAccess,0
DECLARE_IMP PM_kbhit,0
DECLARE_IMP PM_getch,0
DECLARE_IMP PM_findBPD,0
DECLARE_IMP PM_getPhysicalAddr,0
DECLARE_IMP PM_sleep,0
DECLARE_IMP PM_getCOMPort,0
DECLARE_IMP PM_getLPTPort,0
DECLARE_IMP PM_loadLibrary,0
DECLARE_IMP PM_getProcAddress,0
DECLARE_IMP PM_freeLibrary,0
DECLARE_IMP PCI_enumerate,0
DECLARE_IMP PCI_accessReg,0
DECLARE_IMP PCI_setHardwareIRQ,0
DECLARE_IMP PCI_generateSpecialCyle,0
SKIP_IMP _PM_reserved3,0
DECLARE_IMP PCIBIOS_getEntry,0
DECLARE_IMP CPU_getProcessorType,0
DECLARE_IMP CPU_haveMMX,0
DECLARE_IMP CPU_have3DNow,0
DECLARE_IMP CPU_haveSSE,0
DECLARE_IMP CPU_haveRDTSC,0
DECLARE_IMP CPU_getProcessorSpeed,0
DECLARE_IMP ZTimerInit,0
DECLARE_IMP LZTimerOn,0
DECLARE_IMP LZTimerLap,0
DECLARE_IMP LZTimerOff,0
DECLARE_IMP LZTimerCount,0
DECLARE_IMP LZTimerOnExt,0
DECLARE_IMP LZTimerLapExt,0
DECLARE_IMP LZTimerOffExt,0
DECLARE_IMP LZTimerCountExt,0
DECLARE_IMP ULZTimerOn,0
DECLARE_IMP ULZTimerLap,0
DECLARE_IMP ULZTimerOff,0
DECLARE_IMP ULZTimerCount,0
DECLARE_IMP ULZReadTime,0
DECLARE_IMP ULZElapsedTime,0
DECLARE_IMP ULZTimerResolution,0
DECLARE_IMP PM_findFirstFile,0
DECLARE_IMP PM_findNextFile,0
DECLARE_IMP PM_findClose,0
DECLARE_IMP PM_makepath,0
DECLARE_IMP PM_splitpath,0
DECLARE_IMP PM_driveValid,0
DECLARE_IMP PM_getdcwd,0
DECLARE_IMP PM_setFileAttr,0
DECLARE_IMP PM_mkdir,0
DECLARE_IMP PM_rmdir,0
DECLARE_IMP PM_getFileAttr,0
DECLARE_IMP PM_getFileTime,0
DECLARE_IMP PM_setFileTime,0
DECLARE_IMP CPU_getProcessorName,0
DECLARE_IMP PM_getVGAStateSize,0
DECLARE_IMP PM_saveVGAState,0
DECLARE_IMP PM_restoreVGAState,0
DECLARE_IMP PM_vgaBlankDisplay,0
DECLARE_IMP PM_vgaUnblankDisplay,0
DECLARE_IMP PM_blockUntilTimeout,0
DECLARE_IMP _PM_add64,0
DECLARE_IMP _PM_sub64,0
DECLARE_IMP _PM_mul64,0
DECLARE_IMP _PM_div64,0
DECLARE_IMP _PM_shr64,0
DECLARE_IMP _PM_sar64,0
DECLARE_IMP _PM_shl64,0
DECLARE_IMP _PM_neg64,0
DECLARE_IMP PCI_findBARSize,0
DECLARE_IMP PCI_readRegBlock,0
DECLARE_IMP PCI_writeRegBlock,0
DECLARE_IMP PM_flushTLB,0
DECLARE_IMP PM_useLocalMalloc,0
DECLARE_IMP PM_malloc,0
DECLARE_IMP PM_calloc,0
DECLARE_IMP PM_realloc,0
DECLARE_IMP PM_free,0
DECLARE_IMP PM_getPhysicalAddrRange,0
DECLARE_IMP PM_allocPage,0
DECLARE_IMP PM_freePage,0
DECLARE_IMP PM_agpInit,0
DECLARE_IMP PM_agpExit,0
DECLARE_IMP PM_agpReservePhysical,0
DECLARE_IMP PM_agpReleasePhysical,0
DECLARE_IMP PM_agpCommitPhysical,0
DECLARE_IMP PM_agpFreePhysical,0
DECLARE_IMP PCI_getNumDevices,0
DECLARE_IMP PM_setLocalBPDPath,0
DECLARE_IMP PM_loadDirectDraw,0
DECLARE_IMP PM_unloadDirectDraw,0
DECLARE_IMP PM_getDirectDrawWindow,0
DECLARE_IMP PM_doSuspendApp,0
END_IMPORTS_DEF
END
|
construct xml.applescript | AlexanderGalen/applescripts | 3 | 517 | set r to 2
set FIPAutomation to "Merge Central:FIP AUTOMATION:"
set pdfBasePath to FIPAutomation & "Found Image Press Calendars:"
set excelDoc to FIPAutomation & "pdfconstructor:test.xlsx"
set theXML to FIPAutomation & "pdfconstructor:FIP_Construct.pdfc"
set finishedXML to ""
tell application "Microsoft Excel"
open file excelDoc
tell row 2
set orderNumber to string value of cell 1
set clientName to string value of cell 2
end tell
end tell
set coverText to "FIP_" & orderNumber & " " & clientName
set finishedPDF to FIPAutomation & "~~~Orders:FIP_" & orderNumber & "." & clientName & ".pdf"
set finishedXML to finishedXML & "<?xml version='1.0' encoding='UTF-8'?>
<docasm linearized='true' version='1.4'>
<resources>
<frame id='f1' rect='0 0 432 450'/>
</resources>
<pages>
<page>
<boxes>
<MediaBox width='432' height='450' x='0' y='0'/>
</boxes>
<elements>
<text font='Helvetica' font-size='18' color='[.4 .3 .3 1]' x='Center' y='Center' style='text-align:center' frame='#f1'>" & coverText & "</text>
</elements>
</page>" & return
repeat while r < 7
tell application "Microsoft Excel"
tell row r
set thisPDF to string value of column 4
set qty to (value of column 3/6)
end tell
end tell
set thisPDF to pdfBasePath & "FIP_" & thisPDF as string
set thisPDF to POSIX path of thisPDF
repeat qty times
set finishedXML to finishedXML & " <insert href='" & thisPDF & "' range='0-13'/>" & return
end repeat
set r to r + 1
end repeat
tell application "Microsoft Excel"
close active workbook saving no
end tell
set finishedXML to finishedXML & " </pages>
</docasm>"
set fileToEdit to open for access file theXML with write permission
set eof fileToEdit to 0
write finishedXML to fileToEdit starting at eof
close access file theXML
|
scripts/silvercave.asm | adhi-thirumala/EvoYellow | 0 | 19074 | SilverCaveScript:
call EnableAutoTextBoxDrawing
ld hl, SilverCaveTrainerHeaders
ld de, SilverCaveScriptPointers
ld a, [wRoute4CurScript]
call ExecuteCurMapScriptInTable
ld [wRoute4CurScript], a
ret
;this is all pretty much just terrible junk coding. >_> however, I did eventually get it to work.
SilverCaveScriptPointers:
dw CheckFightingMapTrainers
dw DisplayEnemyTrainerTextAndStartBattle
dw EndTrainerBattle
SilverCaveTextPointers:
dw SilverCaveText1
dw SilverCaveText2
SilverCaveTrainerHeaders:
SilverCaveTrainerHeader1:
dbEventFlagBit EVENT_BEAT_ROUTE_4_TRAINER_1 ;actually this one already exists elsewhere >_> don't feel like risking having it not work due to being on the 'wrong' spote or whatevs though, annoying thing. not that it worked well...
db ($2 << 4) ; trainer's view range, 4 << 4 for instance.
dwEventFlagAddress EVENT_BEAT_ROUTE_4_TRAINER_1
dw SilverCaveBattleText1 ; TextBeforeBattle
dw SilverCaveAfterBattleText1 ; TextAfterBattle
dw SilverCaveEndBattleText1 ; TextEndBattle
dw SilverCaveEndBattleText1 ; TextEndBattle
SilverCaveTrainerHeader2:
dbEventFlagBit EVENT_BEAT_ROUTE_4_TRAINER_0
db ($0 << 4) ; trainer's view range
dwEventFlagAddress EVENT_BEAT_ROUTE_4_TRAINER_0
dw SilverCaveBattleText2 ; TextBeforeBattle
dw SilverCaveAfterBattleText2 ; TextAfterBattle
dw SilverCaveEndBattleText2 ; TextEndBattle
dw SilverCaveEndBattleText2 ; TextEndBattle
db $ff
SilverCaveText1:
TX_ASM
ld hl, SilverCaveTrainerHeader1
jr SilverCaveTalkToTrainer2
SilverCaveText2:
TX_ASM
ld hl, SilverCaveTrainerHeader2
SilverCaveTalkToTrainer:
call TalkToTrainer
SetEvent EVENT_BEAT_ROUTE_4_TRAINER_0
jp TextScriptEnd
SilverCaveTalkToTrainer2:
call TalkToTrainer
SetEvent EVENT_BEAT_ROUTE_4_TRAINER_1
jp TextScriptEnd
SilverCaveBattleText1:
TX_FAR _SilverCaveBattleText1
db "@"
SilverCaveEndBattleText1:
;SetEvent EVENT_BEAT_ROUTE_4_TRAINER_0
TX_FAR _SilverCaveEndBattleText1
db "@"
SilverCaveAfterBattleText1:
;SetEvent EVENT_BEAT_ROUTE_4_TRAINER_0
TX_FAR _SilverCaveAfterBattleText1
db "@"
SilverCaveBattleText2:
TX_FAR _SilverCaveBattleText2
db "@"
SilverCaveEndBattleText2:
; SetEvent EVENT_BEAT_ROUTE_4_TRAINER_1
TX_FAR _SilverCaveEndBattleText2
db "@"
SilverCaveAfterBattleText2:
; SetEvent EVENT_BEAT_ROUTE_4_TRAINER_1
TX_FAR _SilverCaveAfterBattleText2
db "@"
|
asm/fib.asm | nobodywasishere/EccCPU | 3 | 81413 | <gh_stars>1-10
main:
LDI 0 1
LDI 1 1
LDI 2 fib
LDI 3 0
STR 0 3
STD 0 14
INC 3
STR 1 3
STD 1 14
DEC 3
fib:
LDR 0 3
INC 3
LDR 1 3
ADD 1 0
LDI 2 end
JMP 2 3
; break
INC 3
STR 1 3
STD 1 14
DEC 3
LDI 2 fib
JMP 2
end:
JMP 2
|
oeis/142/A142239.asm | neoneye/loda-programs | 11 | 20598 | <filename>oeis/142/A142239.asm
; A142239: Denominators of continued fraction convergents to sqrt(3/2).
; Submitted by <NAME>
; 1,4,9,40,89,396,881,3920,8721,38804,86329,384120,854569,3802396,8459361,37639840,83739041,372596004,828931049,3688320200,8205571449,36510605996,81226783441,361417739760,804062262961,3577666791604,7959395846169,35415250176280,78789896198729,350574834971196,779939566141121,3470333099535680,7720605765212481,34352756160385604,76426118085983689,340057228504320360,756540575094624409,3366219528882817996,7488979632860260401,33322138060323859600,74133255753507979601,329855161074355778004
add $0,1
mov $3,1
lpb $0
sub $0,1
add $2,$3
mov $3,$1
mov $1,$2
dif $2,2
mul $2,2
add $3,$2
lpe
mov $0,$1
|
Transynther/x86/_processed/AVXALIGN/_st_sm_/i9-9900K_12_0xa0_notsx.log_21829_1028.asm | ljhsiun2/medusa | 9 | 21502 | <filename>Transynther/x86/_processed/AVXALIGN/_st_sm_/i9-9900K_12_0xa0_notsx.log_21829_1028.asm
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r14
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0x18fd0, %r12
nop
nop
nop
nop
and $54015, %rbx
mov (%r12), %r14w
nop
nop
add $11702, %r12
lea addresses_WC_ht+0x45d0, %rsi
lea addresses_WC_ht+0xcc2c, %rdi
nop
nop
nop
nop
and %rdx, %rdx
mov $92, %rcx
rep movsq
nop
nop
nop
nop
xor $39883, %r14
lea addresses_WC_ht+0x163bc, %rsi
nop
nop
nop
nop
nop
inc %rdi
movl $0x61626364, (%rsi)
and %rsi, %rsi
lea addresses_WC_ht+0x1ae84, %rdi
nop
nop
nop
nop
and %r14, %r14
and $0xffffffffffffffc0, %rdi
vmovntdqa (%rdi), %ymm6
vextracti128 $1, %ymm6, %xmm6
vpextrq $0, %xmm6, %rcx
add $56135, %rsi
lea addresses_WC_ht+0x197ba, %rcx
nop
nop
nop
dec %rbx
mov (%rcx), %dx
nop
nop
add $3624, %r12
lea addresses_A_ht+0x1cdd0, %rbx
nop
add $31001, %rdi
vmovups (%rbx), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $0, %xmm6, %r14
nop
nop
nop
nop
xor %rsi, %rsi
lea addresses_normal_ht+0x4390, %rsi
nop
nop
nop
and $3321, %rdi
movb $0x61, (%rsi)
nop
nop
nop
xor $49727, %r14
lea addresses_WT_ht+0x657c, %rdx
add $51955, %rcx
mov $0x6162636465666768, %rbx
movq %rbx, %xmm7
vmovups %ymm7, (%rdx)
and %rcx, %rcx
lea addresses_D_ht+0x196d0, %rsi
nop
nop
nop
nop
nop
xor %rbx, %rbx
mov $0x6162636465666768, %rcx
movq %rcx, (%rsi)
nop
nop
nop
nop
nop
sub %r14, %r14
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r14
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r14
push %r15
push %r8
push %r9
push %rax
push %rsi
// Store
lea addresses_RW+0x1a9d0, %r8
nop
nop
nop
nop
nop
inc %rax
mov $0x5152535455565758, %rsi
movq %rsi, (%r8)
nop
nop
nop
nop
nop
sub $22599, %r8
// Store
mov $0xed0, %r14
nop
nop
nop
nop
add %rsi, %rsi
movl $0x51525354, (%r14)
nop
nop
nop
nop
cmp $58823, %r8
// Store
lea addresses_normal+0x1aed0, %r14
clflush (%r14)
nop
nop
nop
inc %r8
mov $0x5152535455565758, %r9
movq %r9, (%r14)
and %rax, %rax
// Load
mov $0xdf0, %r9
xor %rsi, %rsi
vmovups (%r9), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $0, %xmm6, %r8
nop
nop
xor %r15, %r15
// Store
lea addresses_UC+0x12bd0, %r15
nop
nop
nop
inc %r10
movl $0x51525354, (%r15)
nop
nop
and $17469, %r9
// Store
lea addresses_UC+0xe4d0, %r15
nop
nop
nop
sub %r8, %r8
mov $0x5152535455565758, %r10
movq %r10, (%r15)
nop
nop
dec %rax
// Faulty Load
lea addresses_normal+0x1aed0, %r14
xor $35676, %r10
mov (%r14), %r8w
lea oracles, %rsi
and $0xff, %r8
shlq $12, %r8
mov (%rsi,%r8,1), %r8
pop %rsi
pop %rax
pop %r9
pop %r8
pop %r15
pop %r14
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_normal', 'AVXalign': False, 'size': 4, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 7}}
{'OP': 'STOR', 'dst': {'type': 'addresses_P', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 10}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'size': 8, 'NT': False, 'same': True, 'congruent': 0}}
{'src': {'type': 'addresses_P', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 5}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 7}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': True, 'size': 8, 'NT': False, 'same': False, 'congruent': 7}}
[Faulty Load]
{'src': {'type': 'addresses_normal', 'AVXalign': True, 'size': 2, 'NT': True, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 8}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 2}}
{'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32, 'NT': True, 'same': False, 'congruent': 1}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 1}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 8}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 6}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 2}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 11}}
{'58': 21829}
58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58
*/
|
toggle_dnd.scpt | ketan0/dotfiles | 0 | 4331 | <filename>toggle_dnd.scpt
my setDoNoDisturbTo()
-- https://github.com/sindresorhus/do-not-disturb/issues/9
on setDoNoDisturbTo()
set checkDNDstatusCMD to ¬
{"defaults read", space, ¬
"com.apple.ncprefs.plist", ¬
space, "dnd_status"} as string
set statusOfDND to ¬
(do shell script checkDNDstatusCMD) ¬
as boolean
if not statusOfDND
display notification "Turning on Do Not Disturb..."
set OnOffData to "62706C6973743030D60102030405060708080A08085B646E644D6972726F7265645F100F646E64446973706C6179536C6565705F101E72657065617465644661636574696D6543616C6C73427265616B73444E445875736572507265665E646E64446973706C61794C6F636B5F10136661636574696D6543616E427265616B444E44090808D30B0C0D070F1057656E61626C6564546461746556726561736F6E093341C2B41C4FC9D3891001080808152133545D6C828384858C9499A0A1AAACAD00000000000001010000000000000013000000000000000000000000000000AE"
else
set OnOffData to "62706C6973743030D5010203040506070707075B646E644D6972726F7265645F100F646E64446973706C6179536C6565705F101E72657065617465644661636574696D6543616C6C73427265616B73444E445E646E64446973706C61794C6F636B5F10136661636574696D6543616E427265616B444E44090808080808131F3152617778797A7B0000000000000101000000000000000B0000000000000000000000000000007C"
end if
set changeDNDstatusCMD to ¬
{"defaults write", space, ¬
"com.apple.ncprefs.plist", ¬
space, "dnd_prefs -data", space, OnOffData, ¬
space, "&&", ¬
"defaults write", space, ¬
"com.apple.ncprefs.plist", ¬
space, "dnd_status ", not statusOfDND, space, ¬
"&& killall usernoted && killall ControlCenter"} as string
do shell script changeDNDstatusCMD
if statusOfDND
display notification "Turned off Do Not Disturb."
end if
end setDoNoDisturbTo
|
oeis/266/A266872.asm | neoneye/loda-programs | 11 | 169140 | ; A266872: Binary representation of the n-th iteration of the "Rule 77" elementary cellular automaton starting with a single ON (black) cell.
; Submitted by <NAME>
; 1,10,10101,101010,101010101,1010101010,1010101010101,10101010101010,10101010101010101,101010101010101010,101010101010101010101,1010101010101010101010,1010101010101010101010101,10101010101010101010101010,10101010101010101010101010101,101010101010101010101010101010,101010101010101010101010101010101,1010101010101010101010101010101010,1010101010101010101010101010101010101,10101010101010101010101010101010101010,10101010101010101010101010101010101010101,101010101010101010101010101010101010101010
seq $0,266873 ; Decimal representation of the n-th iteration of the "Rule 77" elementary cellular automaton starting with a single ON (black) cell.
seq $0,7088 ; The binary numbers (or binary words, or binary vectors, or binary expansion of n): numbers written in base 2.
|
Transynther/x86/_processed/AVXALIGN/_st_4k_/i9-9900K_12_0xa0.log_4_810.asm | ljhsiun2/medusa | 9 | 15095 | <filename>Transynther/x86/_processed/AVXALIGN/_st_4k_/i9-9900K_12_0xa0.log_4_810.asm
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r13
push %r15
push %rax
push %rbx
push %rcx
push %rdx
lea addresses_UC_ht+0x10c92, %r13
nop
nop
dec %rbx
mov $0x6162636465666768, %rdx
movq %rdx, %xmm2
and $0xffffffffffffffc0, %r13
movntdq %xmm2, (%r13)
nop
nop
xor $52644, %rcx
lea addresses_WT_ht+0xfdd2, %r15
nop
nop
nop
xor %r12, %r12
movb $0x61, (%r15)
nop
nop
nop
nop
xor %rcx, %rcx
lea addresses_normal_ht+0xadf2, %rdx
clflush (%rdx)
nop
nop
cmp $49602, %rbx
movb $0x61, (%rdx)
nop
cmp %rbx, %rbx
lea addresses_normal_ht+0x1ef62, %r15
nop
nop
and %rdx, %rdx
movw $0x6162, (%r15)
nop
and %rdx, %rdx
lea addresses_A_ht+0xc75c, %rax
nop
nop
and %rbx, %rbx
movw $0x6162, (%rax)
and %rax, %rax
pop %rdx
pop %rcx
pop %rbx
pop %rax
pop %r15
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r8
push %rbp
push %rcx
push %rdx
// Store
lea addresses_UC+0x11492, %r11
nop
nop
nop
nop
nop
xor $11070, %rdx
movl $0x51525354, (%r11)
nop
nop
nop
nop
sub %rbp, %rbp
// Store
lea addresses_normal+0xbc92, %rcx
nop
nop
sub %r8, %r8
mov $0x5152535455565758, %r10
movq %r10, %xmm3
movups %xmm3, (%rcx)
nop
nop
nop
inc %rcx
// Load
lea addresses_RW+0x1506f, %rcx
nop
nop
sub %r8, %r8
mov (%rcx), %r11w
nop
nop
and %rcx, %rcx
// Faulty Load
lea addresses_A+0x17c92, %rbp
nop
cmp $22656, %rcx
vmovntdqa (%rbp), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $0, %xmm1, %rdx
lea oracles, %rbp
and $0xff, %rdx
shlq $12, %rdx
mov (%rbp,%rdx,1), %rdx
pop %rdx
pop %rcx
pop %rbp
pop %r8
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_A', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_UC', 'AVXalign': False, 'size': 4}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_normal', 'AVXalign': False, 'size': 16}}
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_RW', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': True, 'same': True, 'congruent': 0, 'type': 'addresses_A', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 8, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 16}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 1}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': True, 'congruent': 3, 'type': 'addresses_normal_ht', 'AVXalign': True, 'size': 1}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 2}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 2}}
{'58': 4}
58 58 58 58
*/
|
day23/app/crack6.asm | ghosind/HariboteOS | 11 | 177914 | [BITS 32]
MOV EDX, 123456789
INT 0x40
MOV EDX, 4
INT 0x40
|
07/test.asm | InversionSpaces/nand2tetrisSolutions | 0 | 17383 | <filename>07/test.asm<gh_stars>0
@256
D=A
@SP
M=D
@111
D=A
@SP
A=M
M=D
@SP
M=M+1
@333
D=A
@SP
A=M
M=D
@SP
M=M+1
@888
D=A
@SP
A=M
M=D
@SP
M=M+1
@STATIC8
D=A
@R13
M=D
@SP
M=M-1
A=M
D=M
@R13
A=M
M=D
@STATIC3
D=A
@R13
M=D
@SP
M=M-1
A=M
D=M
@R13
A=M
M=D
@STATIC1
D=A
@R13
M=D
@SP
M=M-1
A=M
D=M
@R13
A=M
M=D
@STATIC3
D=M
@SP
A=M
M=D
@SP
M=M+1
@STATIC1
D=M
@SP
A=M
M=D
@SP
M=M+1
@SP
M=M-1
A=M
D=M
@SP
A=M
A=A-1
M=M-D
@STATIC8
D=M
@SP
A=M
M=D
@SP
M=M+1
@SP
M=M-1
A=M
D=M
@SP
A=M
A=A-1
M=D+M
|
unittests/ASM/PrimaryGroup/1_81_00.asm | cobalt2727/FEX | 628 | 166725 | %ifdef CONFIG
{
"RegData": {
"RAX": "0x41424344A6A84748",
"RBX": "0x51525354B6B8BABC",
"RCX": "0x61626364C6C8CACC",
"RDX": "0x6162636465666668"
},
"MemoryRegions": {
"0x100000000": "4096"
}
}
%endif
mov rdx, 0xe0000000
mov rax, 0x4142434445464748
mov [rdx + 8 * 0], rax
mov rax, 0x5152535455565758
mov [rdx + 8 * 1], rax
mov rax, 0x6162636465666768
mov [rdx + 8 * 2], rax
mov rax, 0x6162636465666768
mov [rdx + 8 * 3], rax
add word [rdx + 8 * 0 + 2], 0x6162
add dword [rdx + 8 * 1 + 0], 0x61626364
add qword [rdx + 8 * 2 + 0], 0x61626364
add qword [rdx + 8 * 3 + 0], -256
mov rax, [rdx + 8 * 0]
mov rbx, [rdx + 8 * 1]
mov rcx, [rdx + 8 * 2]
mov rdx, [rdx + 8 * 3]
hlt
|
demos/src/calculatorcommands.ads | thindil/tashy2 | 2 | 13626 | -- Copyright (c) 2021 <NAME> <<EMAIL>>
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
with Tcl; use Tcl;
-- ****h* CalculatorCommands/CalculatorCommands
-- FUNCTION
-- Provide various Tcl commands related to the calculator demo
-- SOURCE
package CalculatorCommands with
SPARK_Mode
is
-- ****
private
-- ****f* CalculatorCommands/CalculatorCommands.Click_Action
-- FUNCTION
-- Update display with the pressed button text or count its expression if
-- button equal was pressed. It is moved from On_Click function so it can
-- be checked by SPARK
-- PARAMETERS
-- ButtonName - The Tk path name of the button which was clicked
-- LabelName - The Tk path name of the display label
-- Interpreter - The Tcl interpreter on which the button was clicked
-- RESULT
-- This function always return TCL_OK
-- SOURCE
function Click_Action
(ButtonName, LabelName: String; Interpreter: Tcl_Interpreter)
return Tcl_Results;
-- ****
-- ****f* CalculatorCommands/CalculatorCommands.Clear_Action
-- FUNCTION
-- Reset the calculator's display to it inital state. Show just zero
-- number. It is moved from On_Click function so it can be checked by SPARK
-- PARAMETERS
-- LabelName - The name of display label to clear
-- Interpreter - The Tcl interpreter on which the button was clicked
-- RESULT
-- This function always return TCL_OK
-- SOURCE
function Clear_Action
(LabelName: String; Interpreter: Tcl_Interpreter) return Tcl_Results;
-- ****
end CalculatorCommands;
|
Lezioni/Assembly/ISA/2.asm | FoxySeta/unibo-11925-architettura-degli-elaboratori | 2 | 27145 | <gh_stars>1-10
/*
Università di Bologna
Corso di laurea in Informatica
11925 - Architettura degli elaboratori
<NAME> #969766
28/10/2020
2.asm
RAM[RAM[0],…,RAM[1]] = 1,…,1
assumendo RAM[1] > RAM[0]
*/
(LOOP) // do
@1
D = M // D = RAM[1]
A = D
M = 1 // RAM[D] = 1
@1
M = M - 1 // --RAM[1]
@0
D = M // D = RAM[0]
@1
D = D - M // D = D - RAM[1]
@LOOP
D;JLE // while (D < 0) |
programs/oeis/026/A026351.asm | neoneye/loda | 22 | 103460 | ; A026351: Floor(n*phi) + 1, where phi = (1+sqrt(5))/2.
; 1,2,4,5,7,9,10,12,13,15,17,18,20,22,23,25,26,28,30,31,33,34,36,38,39,41,43,44,46,47,49,51,52,54,56,57,59,60,62,64,65,67,68,70,72,73,75,77,78,80,81,83,85,86,88,89,91,93,94,96,98,99,101,102,104,106,107,109,111,112,114,115,117,119,120,122,123,125,127,128,130,132,133,135,136,138,140,141,143,145,146,148,149,151,153,154,156,157,159,161
mov $1,$0
seq $1,276886 ; Sums-complement of the Beatty sequence for 2 + phi.
add $0,$1
div $0,2
add $0,1
|
source/context/adam-with_clause.ads | charlie5/aIDE | 3 | 6559 | with
AdaM.context_Item,
Ada.Containers.Vectors,
Ada.Streams;
private
with
AdaM.Declaration.of_package;
package AdaM.with_Clause
is
type Item is new context_Item.item with private;
-- View
--
type View is access all Item'Class;
procedure View_write (Stream : not null access Ada.Streams.Root_Stream_Type'Class;
Self : in View);
procedure View_read (Stream : not null access Ada.Streams.Root_Stream_Type'Class;
Self : out View);
for View'write use View_write;
for View'read use View_read;
-- Vector
--
package Vectors is new ada.Containers.Vectors (Positive, View);
subtype Vector is Vectors.Vector;
-- Forge
--
function new_Subprogram return with_Clause.view;
procedure free (Self : in out with_Clause.view);
overriding
procedure destruct (Self : in out with_Clause.item);
-- Attributes
--
overriding
function Id (Self : access Item) return AdaM.Id;
private
type Item is new context_Item.item with
record
is_Limited : Boolean;
is_Private : Boolean;
Packages : Declaration.of_package.vector;
end record;
end AdaM.with_Clause;
|
maps/OlivineCity.asm | Dev727/ancientplatinum | 28 | 103899 | object_const_def ; object_event constants
const OLIVINECITY_SAILOR1
const OLIVINECITY_STANDING_YOUNGSTER
const OLIVINECITY_SAILOR2
const OLIVINECITY_OLIVINE_RIVAL
OlivineCity_MapScripts:
db 2 ; scene scripts
scene_script .DummyScene0 ; SCENE_DEFAULT
scene_script .DummyScene1 ; SCENE_FINISHED
db 1 ; callbacks
callback MAPCALLBACK_NEWMAP, .FlyPoint
.DummyScene0:
end
.DummyScene1:
end
.FlyPoint:
setflag ENGINE_FLYPOINT_OLIVINE
return
OlivineCityRivalSceneTop:
turnobject PLAYER, LEFT
showemote EMOTE_SHOCK, PLAYER, 15
special FadeOutMusic
pause 15
playsound SFX_ENTER_DOOR
appear OLIVINECITY_OLIVINE_RIVAL
waitsfx
applymovement OLIVINECITY_OLIVINE_RIVAL, MovementData_0x1a88d2
playmusic MUSIC_RIVAL_ENCOUNTER
opentext
writetext OlivineCityRivalText
waitbutton
closetext
applymovement PLAYER, MovementData_0x1a88f4
turnobject PLAYER, RIGHT
applymovement OLIVINECITY_OLIVINE_RIVAL, MovementData_0x1a88db
setscene SCENE_FINISHED
disappear OLIVINECITY_OLIVINE_RIVAL
special RestartMapMusic
variablesprite SPRITE_OLIVINE_RIVAL, SPRITE_SWIMMER_GUY
special LoadUsedSpritesGFX
end
OlivineCityRivalSceneBottom:
turnobject PLAYER, LEFT
showemote EMOTE_SHOCK, PLAYER, 15
special FadeOutMusic
pause 15
playsound SFX_ENTER_DOOR
appear OLIVINECITY_OLIVINE_RIVAL
waitsfx
applymovement OLIVINECITY_OLIVINE_RIVAL, MovementData_0x1a88d6
playmusic MUSIC_RIVAL_ENCOUNTER
opentext
writetext OlivineCityRivalText
waitbutton
closetext
applymovement PLAYER, MovementData_0x1a88f7
turnobject PLAYER, RIGHT
applymovement OLIVINECITY_OLIVINE_RIVAL, MovementData_0x1a88e8
disappear OLIVINECITY_OLIVINE_RIVAL
setscene SCENE_FINISHED
special RestartMapMusic
variablesprite SPRITE_OLIVINE_RIVAL, SPRITE_SWIMMER_GUY
special LoadUsedSpritesGFX
end
OlivineCitySailor1Script:
jumptextfaceplayer OlivineCitySailor1Text
OlivineCityStandingYoungsterScript:
faceplayer
opentext
random 2
ifequal 0, .FiftyFifty
writetext OlivineCityStandingYoungsterPokegearText
waitbutton
closetext
end
.FiftyFifty:
writetext OlivineCityStandingYoungsterPokedexText
waitbutton
closetext
end
OlivineCitySailor2Script:
jumptextfaceplayer OlivineCitySailor2Text
OlivineCitySign:
jumptext OlivineCitySignText
OlivineCityPortSign:
jumptext OlivineCityPortSignText
OlivineGymSign:
jumptext OlivineGymSignText
OlivineLighthouseSign:
jumptext OlivineLighthouseSignText
OlivineCityBattleTowerSign:
jumptext OlivineCityBattleTowerSignText
OlivineCityPokecenterSign:
jumpstd pokecentersign
OlivineCityMartSign:
jumpstd martsign
MovementData_0x1a88d2:
step DOWN
step RIGHT
step RIGHT
step_end
MovementData_0x1a88d6:
step DOWN
step DOWN
step RIGHT
step RIGHT
step_end
MovementData_0x1a88db:
step RIGHT
step RIGHT
step RIGHT
step RIGHT
step RIGHT
step RIGHT
step UP
step UP
step UP
step UP
step UP
step UP
step_end
MovementData_0x1a88e8:
step RIGHT
step RIGHT
step RIGHT
step RIGHT
step RIGHT
step RIGHT
step UP
step UP
step UP
step UP
step UP
step_end
MovementData_0x1a88f4:
step DOWN
turn_head UP
step_end
MovementData_0x1a88f7:
step UP
turn_head DOWN
step_end
OlivineCityRivalText:
text "…"
para "You again?"
para "There's no need to"
line "panic. I don't"
para "bother with wimps"
line "like you."
para "Speaking of weak-"
line "lings, the city's"
para "GYM LEADER isn't"
line "here."
para "Supposedly taking"
line "care of a sick"
para "#MON at the"
line "LIGHTHOUSE."
para "Humph! Boo-hoo!"
line "Just let sick"
cont "#MON go!"
para "A #MON that"
line "can't battle is"
cont "worthless!"
para "Why don't you go"
line "train at the"
cont "LIGHTHOUSE?"
para "Who knows. It may"
line "make you a bit"
cont "less weak!"
done
OlivineCitySailor1Text:
text "Dark roads are"
line "dangerous at"
cont "night."
para "But in the pitch-"
line "black of night,"
para "the sea is even"
line "more treacherous!"
para "Without the beacon"
line "of the LIGHTHOUSE"
para "to guide it, no"
line "ship can sail."
done
OlivineCityStandingYoungsterPokegearText:
text "That thing you"
line "have--it's a #-"
cont "GEAR, right? Wow,"
cont "that's cool."
done
OlivineCityStandingYoungsterPokedexText:
text "Wow, you have a"
line "#DEX!"
para "That is just so"
line "awesome."
done
OlivineCitySailor2Text:
text "The sea is sweet!"
para "Sunsets on the sea"
line "are marvelous!"
para "Sing with me! "
line "Yo-ho! Blow the"
cont "man down!…"
done
OlivineCitySignText:
text "OLIVINE CITY"
para "The Port Closest"
line "to Foreign Lands"
done
OlivineCityPortSignText:
text "OLIVINE PORT"
line "FAST SHIP PIER"
done
OlivineGymSignText:
text "OLIVINE CITY"
line "#MON GYM"
cont "LEADER: JASMINE"
para "The Steel-Clad"
line "Defense Girl"
done
OlivineLighthouseSignText:
text "OLIVINE LIGHTHOUSE"
line "Also known as the"
cont "GLITTER LIGHTHOUSE"
done
OlivineCityBattleTowerSignText:
text "BATTLE TOWER AHEAD"
line "Opening Now!"
done
OlivineCityBattleTowerSignText_NotYetOpen:
; unused; originally shown when the Battle Tower was closed
text "BATTLE TOWER AHEAD"
done
OlivineCity_MapEvents:
db 0, 0 ; filler
db 11 ; warp events
warp_event 13, 21, OLIVINE_POKECENTER_1F, 1
warp_event 10, 11, OLIVINE_GYM, 1
warp_event 25, 11, OLIVINE_TIMS_HOUSE, 1
warp_event 0, 0, OLIVINE_HOUSE_BETA, 1 ; inaccessible
warp_event 29, 11, OLIVINE_PUNISHMENT_SPEECH_HOUSE, 1
warp_event 13, 15, OLIVINE_GOOD_ROD_HOUSE, 1
warp_event 7, 21, OLIVINE_CAFE, 1
warp_event 19, 17, OLIVINE_MART, 2
warp_event 29, 27, OLIVINE_LIGHTHOUSE_1F, 1
warp_event 19, 27, OLIVINE_PORT_PASSAGE, 1
warp_event 20, 27, OLIVINE_PORT_PASSAGE, 2
db 2 ; coord events
coord_event 13, 12, SCENE_DEFAULT, OlivineCityRivalSceneTop
coord_event 13, 13, SCENE_DEFAULT, OlivineCityRivalSceneBottom
db 7 ; bg events
bg_event 17, 11, BGEVENT_READ, OlivineCitySign
bg_event 20, 24, BGEVENT_READ, OlivineCityPortSign
bg_event 7, 11, BGEVENT_READ, OlivineGymSign
bg_event 30, 28, BGEVENT_READ, OlivineLighthouseSign
bg_event 3, 23, BGEVENT_READ, OlivineCityBattleTowerSign
bg_event 14, 21, BGEVENT_READ, OlivineCityPokecenterSign
bg_event 20, 17, BGEVENT_READ, OlivineCityMartSign
db 4 ; object events
object_event 26, 27, SPRITE_SAILOR, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivineCitySailor1Script, -1
object_event 20, 13, SPRITE_STANDING_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, OlivineCityStandingYoungsterScript, -1
object_event 17, 21, SPRITE_SAILOR, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivineCitySailor2Script, -1
object_event 10, 11, SPRITE_OLIVINE_RIVAL, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_OLIVINE_CITY
|
programs/oeis/014/A014033.asm | karttu/loda | 0 | 179928 | ; A014033: Inverse of 24th cyclotomic polynomial.
; 1,0,0,0,1,0,0,0,0,0,0,0,-1,0,0,0,-1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,-1,0,0,0,-1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,-1,0,0,0,-1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,-1,0,0,0,-1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,-1,0,0,0,-1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,-1,0,0,0,-1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,-1,0,0,0,-1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,-1,0,0,0,-1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,-1,0,0,0,-1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,-1,0,0,0,-1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0
mov $1,2
mov $2,2
lpb $0,1
sub $0,4
sub $2,$1
add $1,$2
lpe
lpb $0,1
mul $0,$3
mov $1,$0
lpe
div $1,2
|
Sources/Globe_3d/glut-devices.ads | ForYouEyesOnly/Space-Convoy | 1 | 27437 | <filename>Sources/Globe_3d/glut-devices.ads
------------------------------------------------------------------------------
-- File : Game_control.ads
-- Description : Command set for games, based on GLUT
-- Copyright (c) <NAME>/<NAME> 2007
------------------------------------------------------------------------------
-- with GLOBE_3D;
-- with GL;
-- with Game_control;
package GLUT.Devices is
procedure Initialize;
--
-- Sets up the GLUT mouse and keybaord devices.
-- Keyboard
--
type Key_set is array (Character) of Boolean;
type Modifier_set is array (GLUT.Active_Shift .. GLUT.Active_Alt) of Boolean;
type Special_set is array (1 .. 200) of Boolean;
type Special_key_set is array (1 .. 128) of Boolean;
type Keyboard is
record
normal_set : Key_set := (others => False);
normal_set_mem : Key_set := (others => False);
modif_set : Devices.Modifier_set := (others => False);
special_set : Devices.Special_set := (others => False);
special_set_mem : Devices.Special_key_set := (others => False);
end record;
type p_Keyboard is access all Keyboard;
default_Keyboard : aliased Keyboard;
function Strike_once (c : Character;
kb : access Keyboard := default_Keyboard'Access) return Boolean;
function Strike_once (special : Integer;
kb : access Keyboard := default_Keyboard'Access) return Boolean;
-- Mouse
--
type mouse_button_Set is array (GLUT.LEFT_BUTTON .. GLUT.RIGHT_BUTTON) of Boolean;
type Mouse is
record
oldx, oldy, mx, my : Integer := 0;
button_state : mouse_button_Set := (others => False);
end record;
type p_Mouse is access all Mouse;
default_Mouse : aliased Mouse;
end GLUT.Devices;
|
tests/vice-tests/VIC20/vic_9000test/testcase.asm | PhylumChordata/chips-test | 330 | 87805 | *=$1201
!byte $0b,$12,$00,$00,$9e,$34,$36,$32,$31,$00,$00,$00
; setup test-screen (2 x Char 0-255)
ldx #$00
ldy #$00
loop tya
sta $1000,y
sta $1100,y
lda #$00
sta $9400,y
sta $9500,y
iny
bne loop
;synchronize with the screen
sei
ldx #$2e ; make sure next command really STARTS at line #$0b and not SOMEWHERE in it
raster0 cpx $9004
bne raster0
start ldx #$30 ; wait for this raster line (times 2)
raster1 cpx $9004
bne raster1 ; 3 cycles - at this stage, the inaccuracy is 7 clock cycles
; the processor is in this place 2 to 9 cycles
; after $9004 has changed
ldy #9 ; 2 cycles
bit $24 ; 3 cycles
raster2
ldx $9004 ; 4 cycles
txa ; 2 cycles
bit $24 ; 3 cycles
ldx #24 ; 2 cycles
minus11 dex ; 2 cycles * 24 = 48 cycles
bne minus11 ; 3 cycles * 24 - 1 = 71 cycles - first spend some time (so that the whole
cmp $9004 ; 4 cycles loop will be 2 raster lines)
bcs plus21 ; 3 cycles (-1 on when carry clear) save one cycle if $9004 changed too late
plus21 dey ; 2 cycles
bne raster2 ; 3 cycles (2 beim letzten)
; now it is fully synchronized
; 6 cycles have passed since last $9004 change
!byte $a9 ; lda #
test
!byte $00 ; value to test at $9000
sta $9000 ; set $9000 at cycle 13
sta $1000 ; show on screen
ldy #$00 ; wait loop (about 1285 cycles)
branch iny
bne branch
lda #$0c ; reset $9000 at cycle 26
sta $9000 ; to original value (decimal 12)
lda #$ef ; check for SPACE-key
sta $9120
lda $9121
cmp #$fe
bne start ; continue display-loop until SPACE pressed
inc test ; incease value $9000 is going to be set to
bmi end ; If value has reached 128 exit
ldy #$00 ; wait about second to avoid next keypress registering too fast
waity ldx #$00
waitx inx
bne waitx
iny
bne waity
jmp start
end lda #$00
sta test
rts
|
src/vulkan-math/vulkan-math-vec4.ads | zrmyers/VulkanAda | 1 | 3830 | --------------------------------------------------------------------------------
-- MIT License
--
-- Copyright (c) 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.
--------------------------------------------------------------------------------
with Vulkan.Math.GenFType;
with Vulkan.Math.Vec3;
with Vulkan.Math.Vec2;
use Vulkan.Math.GenFType;
use Vulkan.Math.Vec3;
use Vulkan.Math.Vec2;
--------------------------------------------------------------------------------
--< @group Vulkan Math Basic Types
--------------------------------------------------------------------------------
--< @summary
--< This package provides a single precision floating point vector type with
--< 4 components.
--------------------------------------------------------------------------------
package Vulkan.Math.Vec4 is
pragma Preelaborate;
pragma Pure;
--< A 4-component single precision floating point vector.
subtype Vkm_Vec4 is Vkm_GenFType(Last_Index => 3);
----------------------------------------------------------------------------
-- Ada does not have the concept of constructors in the sense that they exist
-- in C++. For this reason, we will instead define multiple methods for
-- instantiating a vec4 here.
----------------------------------------------------------------------------
-- The following are explicit constructors for Vec4:
----------------------------------------------------------------------------
--< @summary
--< Constructor for Vkm_Vec4 type.
--<
--< @description
--< Produce a default vector with all components set to 0.0.
--<
--< @return
--< A Vec4 with all components set to 0.0.
----------------------------------------------------------------------------
function Make_Vec4 return Vkm_Vec4 is
(GFT.Make_GenType(Last_Index => 3, value => 0.0)) with Inline;
----------------------------------------------------------------------------
--< @summary
--< Constructor for Vkm_Vec4 type.
--<
--< @description
--< Produce a vector with all components set to the same value.
--<
--< @param scalar_value
--< The value to set all components to.
--<
--< @return
--< A Vec4 with all components set to scalar_value.
----------------------------------------------------------------------------
function Make_Vec4 (scalar_value : in Vkm_Float) return Vkm_Vec4 is
(GFT.Make_GenType(Last_Index => 3, value => scalar_value)) with Inline;
----------------------------------------------------------------------------
--< @summary
--< Constructor for Vkm_Vec4 type.
--<
--< @description
--< Produce a vector by copying components from an existing vector.
--<
--< @param vec4_value
--< The vec4 to copy components from.
--<
--< @return
--< A vec4 with all of its components set equal to the corresponding
--< components of vec4_value.
----------------------------------------------------------------------------
function Make_Vec4 (vec4_value : in Vkm_Vec4) return Vkm_Vec4 is
(GFT.Make_GenType(vec4_value.data(0),vec4_value.data(1),
vec4_value.data(2),vec4_value.data(3))) with Inline;
----------------------------------------------------------------------------
--< @summary
--< Constructor for Vkm_Vec4 type.
--<
--< @description
--< Produce a vector by specifying the values for each of its components.
--<
--< @param value1
--< Value for component 1.
--<
--< @param value2
--< Value for component 2.
--<
--< @param value3
--< Value for componetn 3.
--<
--< @param value4
--< Value for component 4.
--<
--< @return
--< A Vec4 with all components set as specified.
----------------------------------------------------------------------------
function Make_Vec4 (value1, value2, value3, value4 : in Vkm_Float) return Vkm_Vec4
renames GFT.Make_GenType;
----------------------------------------------------------------------------
--< @summary
--< Constructor for Vkm_Vec4 type.
--<
--< @description
--< Produce a vector by concatenating a scalar value with a vec3.
--<
--< vec4 = [scalar_value, vec3_value ]
--<
--< @param scalar_value
--< The scalar value to concatenate with the vec3.
--<
--< @param vec3_value
--< The vec3 to concatenate to the scalar value.
--<
--< @return
--< The instance of Vec4.
----------------------------------------------------------------------------
function Make_Vec4 (scalar_value : in Vkm_Float;
vec3_value : in Vkm_Vec3) return Vkm_Vec3 is
(Make_Vec4(scalar_value,
vec3_value.data(0),
vec3_value.data(1),
vec3_value.data(2))) with Inline;
----------------------------------------------------------------------------
--< @summary
--< Constructor for Vkm_Vec4 type.
--<
--< @description
--< Produce a vector by concatenating a vec3 with a scalar value.
--<
--< vec4 = [vec3_value, scalar_value]
--<
--< @param vec3_value
--< The vec3 to concatenate to the scalar value.
--<
--< @param scalar_value
--< The scalar value to concatenate to the vec3.
--<
--< @return
--< The instance of Vec4.
----------------------------------------------------------------------------
function Make_Vec4 (vec3_value : in Vkm_Vec3;
scalar_value : in Vkm_Float) return Vkm_Vec4 is
(Make_Vec4(vec3_value.data(0),
vec3_value.data(1),
vec3_value.data(2),
scalar_value )) with Inline;
----------------------------------------------------------------------------
--< @summary
--< Constructor for Vkm_Vec4 type.
--<
--< @description
--< Produce a vector by concatenating a vec2 with a vec2.
--<
--< vec4 = [vec2_value1, vec2_value2]
--<
--< @param vec2_value1
--< The first vec2.
--<
--< @param vec2_value2
--< The second vec2.
--<
--< @return
--< The instance of Vec4.
----------------------------------------------------------------------------
function Make_Vec4 (vec2_value1, vec2_value2 : in Vkm_Vec2) return Vkm_Vec4 is
(Make_Vec4(vec2_value1.data(0),vec2_value1.data(1),
vec2_value2.data(0),vec2_value2.data(1)));
----------------------------------------------------------------------------
--< @summary
--< Constructor for Vkm_Vec4 type.
--<
--< @description
--< Produce a vector by concatenating two scalar values with a vec2.
--<
--< vec4 = [scalar1, scalar2, vec2_value]
--<
--< @param scalar1
--< First scalar value.
--<
--< @param scalar2
--< Second scalar value.
--<
--< @param vec2_value
--< The Vec2 value.
--<
--< @return
--< The instance of Vec4.
----------------------------------------------------------------------------
function Make_Vec4 (scalar1, scalar2 : in Vkm_Float;
vec2_value : in Vkm_Vec2) return Vkm_Vec4 is
(Make_Vec4(scalar1, scalar2, vec2_value.data(0),vec2_value.data(1)));
----------------------------------------------------------------------------
--< @summary
--< Constructor for Vkm_Vec4 type.
--<
--< @description
--< Produce a vector by concatenating two scalar values with a vec2.
--<
--< vec4 = [scalar1, vec2_value, scalar2]
--<
--< @param scalar1
--< First scalar value.
--<
--< @param vec2_value
--< The Vec2 value.
--<
--< @param scalar2
--< Second scalar value.
--<
--< @return
--< The instance of Vec4.
----------------------------------------------------------------------------
function Make_Vec4 (scalar1 : in Vkm_Float;
vec2_value : in Vkm_Vec2 ;
scalar2 : in Vkm_Float) return Vkm_Vec4 is
(Make_Vec4(scalar1, vec2_value.data(0),vec2_value.data(1), scalar2));
----------------------------------------------------------------------------
--< @summary
--< Constructor for Vkm_Vec4 type.
--<
--< @description
--< Produce a vector by concatenating two scalar values with a vec2.
--<
--< vec4 = [vec2_value, scalar1, scalar2]
--<
--< @param vec2_value
--< The Vec2 value.
--<
--< @param scalar1
--< First scalar value.
--<
--< @param scalar2
--< Second scalar value.
--<
--< @return
--< The instance of Vec4.
----------------------------------------------------------------------------
function Make_Vec4 (vec2_value : in Vkm_Vec2 ;
scalar1 : in Vkm_Float;
scalar2 : in Vkm_Float) return Vkm_Vec4 is
(Make_Vec4(vec2_value.data(0),vec2_value.data(1), scalar1, scalar2));
end Vulkan.Math.Vec4;
|
tools-src/gnu/gcc/gcc/ada/s-secsta.adb | enfoTek/tomato.linksys.e2000.nvram-mod | 80 | 16427 | <gh_stars>10-100
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . S E C O N D A R Y _ S T A C K --
-- --
-- B o d y --
-- --
-- $Revision$
-- --
-- Copyright (C) 1992-2001 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with System.Soft_Links;
with System.Parameters;
with Unchecked_Conversion;
with Unchecked_Deallocation;
package body System.Secondary_Stack is
package SSL renames System.Soft_Links;
use type SSE.Storage_Offset;
use type System.Parameters.Size_Type;
SS_Ratio_Dynamic : constant Boolean :=
Parameters.Sec_Stack_Ratio = Parameters.Dynamic;
-- +------------------+
-- | Next |
-- +------------------+
-- | | Last (200)
-- | |
-- | |
-- | |
-- | |
-- | |
-- | | First (101)
-- +------------------+
-- +----------> | | |
-- | +----------+-------+
-- | | |
-- | ^ V
-- | | |
-- | +-------+----------+
-- | | | |
-- | +------------------+
-- | | | Last (100)
-- | | C |
-- | | H |
-- +-----------------+ | +-------->| U |
-- | Current_Chunk -|--+ | | N |
-- +-----------------+ | | K |
-- | Top -|-----+ | | First (1)
-- +-----------------+ +------------------+
-- | Default_Size | | Prev |
-- +-----------------+ +------------------+
--
--
type Memory is array (Mark_Id range <>) of SSE.Storage_Element;
type Chunk_Id (First, Last : Mark_Id);
type Chunk_Ptr is access all Chunk_Id;
type Chunk_Id (First, Last : Mark_Id) is record
Prev, Next : Chunk_Ptr;
Mem : Memory (First .. Last);
end record;
type Stack_Id is record
Top : Mark_Id;
Default_Size : SSE.Storage_Count;
Current_Chunk : Chunk_Ptr;
end record;
type Fixed_Stack_Id is record
Top : Mark_Id;
Last : Mark_Id;
Mem : Memory (1 .. Mark_Id'Last / 2 - 1);
-- This should really be 1 .. Mark_Id'Last, but there is a bug in gigi
-- with this type, introduced Sep 2001, that causes gigi to reject this
-- type because its size in bytes overflows ???
end record;
type Stack_Ptr is access Stack_Id;
type Fixed_Stack_Ptr is access Fixed_Stack_Id;
function From_Addr is new Unchecked_Conversion (Address, Stack_Ptr);
function To_Addr is new Unchecked_Conversion (Stack_Ptr, System.Address);
function To_Stack is new Unchecked_Conversion (Fixed_Stack_Ptr, Stack_Ptr);
function To_Fixed is new Unchecked_Conversion (Stack_Ptr, Fixed_Stack_Ptr);
procedure Free is new Unchecked_Deallocation (Chunk_Id, Chunk_Ptr);
--------------
-- Allocate --
--------------
procedure SS_Allocate
(Address : out System.Address;
Storage_Size : SSE.Storage_Count)
is
Stack : constant Stack_Ptr :=
From_Addr (SSL.Get_Sec_Stack_Addr.all);
Fixed_Stack : Fixed_Stack_Ptr;
Chunk : Chunk_Ptr;
Max_Align : constant Mark_Id := Mark_Id (Standard'Maximum_Alignment);
Max_Size : constant Mark_Id :=
((Mark_Id (Storage_Size) + Max_Align - 1) / Max_Align)
* Max_Align;
Count_Unreleased_Chunks : Natural;
To_Be_Released_Chunk : Chunk_Ptr;
begin
-- If the secondary stack is fixed in the primary stack, then the
-- handling becomes simple
if not SS_Ratio_Dynamic then
Fixed_Stack := To_Fixed (Stack);
if Fixed_Stack.Top + Max_Size > Fixed_Stack.Last then
raise Storage_Error;
end if;
Address := Fixed_Stack.Mem (Fixed_Stack.Top)'Address;
Fixed_Stack.Top := Fixed_Stack.Top + Mark_Id (Max_Size);
return;
end if;
Chunk := Stack.Current_Chunk;
-- The Current_Chunk may not be the good one if a lot of release
-- operations have taken place. So go down the stack if necessary
while Chunk.First > Stack.Top loop
Chunk := Chunk.Prev;
end loop;
-- Find out if the available memory in the current chunk is sufficient.
-- if not, go to the next one and eventally create the necessary room
Count_Unreleased_Chunks := 0;
while Chunk.Last - Stack.Top + 1 < Max_Size loop
if Chunk.Next /= null then
-- Release unused non-first empty chunk
if Chunk.Prev /= null and then Chunk.First = Stack.Top then
To_Be_Released_Chunk := Chunk;
Chunk := Chunk.Prev;
Chunk.Next := To_Be_Released_Chunk.Next;
To_Be_Released_Chunk.Next.Prev := Chunk;
Free (To_Be_Released_Chunk);
end if;
-- Create new chunk of the default size unless it is not sufficient
elsif SSE.Storage_Count (Max_Size) <= Stack.Default_Size then
Chunk.Next := new Chunk_Id (
First => Chunk.Last + 1,
Last => Chunk.Last + Mark_Id (Stack.Default_Size));
Chunk.Next.Prev := Chunk;
else
Chunk.Next := new Chunk_Id (
First => Chunk.Last + 1,
Last => Chunk.Last + Max_Size);
Chunk.Next.Prev := Chunk;
end if;
Chunk := Chunk.Next;
Stack.Top := Chunk.First;
end loop;
-- Resulting address is the address pointed by Stack.Top
Address := Chunk.Mem (Stack.Top)'Address;
Stack.Top := Stack.Top + Max_Size;
Stack.Current_Chunk := Chunk;
end SS_Allocate;
-------------
-- SS_Free --
-------------
procedure SS_Free (Stk : in out System.Address) is
Stack : Stack_Ptr;
Chunk : Chunk_Ptr;
procedure Free is new Unchecked_Deallocation (Stack_Id, Stack_Ptr);
begin
if not SS_Ratio_Dynamic then
return;
end if;
Stack := From_Addr (Stk);
Chunk := Stack.Current_Chunk;
while Chunk.Prev /= null loop
Chunk := Chunk.Prev;
end loop;
while Chunk.Next /= null loop
Chunk := Chunk.Next;
Free (Chunk.Prev);
end loop;
Free (Chunk);
Free (Stack);
Stk := Null_Address;
end SS_Free;
-------------
-- SS_Info --
-------------
procedure SS_Info is
Stack : constant Stack_Ptr :=
From_Addr (SSL.Get_Sec_Stack_Addr.all);
Fixed_Stack : Fixed_Stack_Ptr;
Nb_Chunks : Integer := 1;
Chunk : Chunk_Ptr := Stack.Current_Chunk;
begin
Put_Line ("Secondary Stack information:");
if not SS_Ratio_Dynamic then
Fixed_Stack := To_Fixed (Stack);
Put_Line (
" Total size : "
& Mark_Id'Image (Fixed_Stack.Last)
& " bytes");
Put_Line (
" Current allocated space : "
& Mark_Id'Image (Fixed_Stack.Top - 1)
& " bytes");
return;
end if;
while Chunk.Prev /= null loop
Chunk := Chunk.Prev;
end loop;
while Chunk.Next /= null loop
Nb_Chunks := Nb_Chunks + 1;
Chunk := Chunk.Next;
end loop;
-- Current Chunk information
Put_Line (
" Total size : "
& Mark_Id'Image (Chunk.Last)
& " bytes");
Put_Line (
" Current allocated space : "
& Mark_Id'Image (Stack.Top - 1)
& " bytes");
Put_Line (
" Number of Chunks : "
& Integer'Image (Nb_Chunks));
Put_Line (
" Default size of Chunks : "
& SSE.Storage_Count'Image (Stack.Default_Size));
end SS_Info;
-------------
-- SS_Init --
-------------
procedure SS_Init
(Stk : in out System.Address;
Size : Natural := Default_Secondary_Stack_Size)
is
Stack : Stack_Ptr;
Fixed_Stack : Fixed_Stack_Ptr;
begin
if not SS_Ratio_Dynamic then
Fixed_Stack := To_Fixed (From_Addr (Stk));
Fixed_Stack.Top := Fixed_Stack.Mem'First;
if Size < 2 * Mark_Id'Max_Size_In_Storage_Elements then
Fixed_Stack.Last := 0;
else
Fixed_Stack.Last := Mark_Id (Size) -
2 * Mark_Id'Max_Size_In_Storage_Elements;
end if;
return;
end if;
Stack := new Stack_Id;
Stack.Current_Chunk := new Chunk_Id (1, Mark_Id (Size));
Stack.Top := 1;
Stack.Default_Size := SSE.Storage_Count (Size);
Stk := To_Addr (Stack);
end SS_Init;
-------------
-- SS_Mark --
-------------
function SS_Mark return Mark_Id is
begin
return From_Addr (SSL.Get_Sec_Stack_Addr.all).Top;
end SS_Mark;
----------------
-- SS_Release --
----------------
procedure SS_Release (M : Mark_Id) is
begin
From_Addr (SSL.Get_Sec_Stack_Addr.all).Top := M;
end SS_Release;
-------------------------
-- Package Elaboration --
-------------------------
-- Allocate a secondary stack for the main program to use.
-- We make sure that the stack has maximum alignment. Some systems require
-- this (e.g. Sun), and in any case it is a good idea for efficiency.
Stack : aliased Stack_Id;
for Stack'Alignment use Standard'Maximum_Alignment;
Chunk : aliased Chunk_Id (1, Default_Secondary_Stack_Size);
for Chunk'Alignment use Standard'Maximum_Alignment;
Chunk_Address : System.Address;
begin
if SS_Ratio_Dynamic then
Stack.Top := 1;
Stack.Current_Chunk := Chunk'Access;
Stack.Default_Size := Default_Secondary_Stack_Size;
System.Soft_Links.Set_Sec_Stack_Addr_NT (Stack'Address);
else
Chunk_Address := Chunk'Address;
SS_Init (Chunk_Address, Default_Secondary_Stack_Size);
System.Soft_Links.Set_Sec_Stack_Addr_NT (Chunk_Address);
end if;
end System.Secondary_Stack;
|
programs/oeis/071/A071187.asm | neoneye/loda | 22 | 246645 | ; A071187: Smallest prime factor of number of divisors of n.
; 1,2,2,3,2,2,2,2,3,2,2,2,2,2,2,5,2,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,7,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,5,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3
seq $0,52409 ; a(n) = largest integer power m for which a representation of the form n = k^m exists (for some k).
seq $0,20639 ; Lpf(n): least prime dividing n (when n > 1); a(1) = 1. Or, smallest prime factor of n, or smallest prime divisor of n.
|
RcloneWrapper_Src/RcloneWrapper.asm | DeviousMalcontent/galaxy-integration-rclone | 0 | 14209 | <reponame>DeviousMalcontent/galaxy-integration-rclone
; #########################################################################
;
; Program: RcloneWrapper
; Purpose: Adds a GUI readout to the command line based Rclone.org client,
; Lists and executes simple commands such as -AddGame,
; handles parsing of -RunGame FileToExecute.exe from GOG galaxy as a
; command line switch,
; handles the adding, editing and updating of Cloud Storage Providers
; i.e OneDriveGames:\Games,
; interfaces and updates GameLibrary.db3 (SQLlite file).
; Author: <NAME>
; Date: 30 May 2020
; Version: 1.0
; Release: 1
; Language: x86 Assembly / Microsoft Macro Assembler
; Compiler: MASM32 SDK
;
; #########################################################################
.386
.model flat, stdcall
option casemap :none ; case sensitive
; #########################################################################
include \masm32\include\masm32rt.inc
; #########################################################################
;=================
; local prototypes
;=================
WndProc PROTO :DWORD,:DWORD,:DWORD,:DWORD
WinMain PROTO :DWORD,:DWORD,:DWORD,:DWORD
CatProc PROTO strBase:DWORD, strAdd:DWORD
StrCmpProc PROTO strOne:DWORD, strTwo:DWORD
.const
IDR_MAINMENU equ 101
IDM_ADDGAME equ 40001
.data
ClassName db "RcloneWrapperWinClass",0
AppName db "Rclone.org Wrapper",0
EditClass db "EDIT",0
CreatePipeError db "Error during pipe creation",0
CreateProcessError db "Error during process creation",0
CommandLine db "rclone.exe version",0
;For debug purposes comparing strings...
msgStrEqual db 'The strings are equal.',0
msgStrNotEqual db 'The strings are not equal.',0
.data?
hInstance HINSTANCE ?
inCommandLine LPSTR ?
hwndEdit dd ?
CMDbuffer db MAX_PATH dup(?)
AppPathbuffer db MAX_PATH dup(?)
.code
start:
; #########################################################################
;print "I am just a simple wrapper, waiting for my developer to finish me...",13,10
mov esi, OffSet AppPathbuffer
invoke GetModuleFileName, rv(GetModuleHandle, 0), esi, SizeOf AppPathbuffer
;Check command line and see if any arguments were sent to the program...
call main
invoke GetModuleHandle, NULL
mov hInstance,eax
invoke GetCommandLine
mov inCommandLine,eax
; -------------------------------------------
; Call the applications main window
; -------------------------------------------
invoke WinMain, hInstance,NULL,inCommandLine, SW_SHOWDEFAULT
invoke ExitProcess,eax
; #########################################################################
main proc uses esi edi ebx
local argc:DWORD
invoke GetCommandLineW
lea ecx,argc
invoke CommandLineToArgvW,eax,ecx
mov esi,eax
mov ebx,argc
xor edi,edi
@@:
inc edi
; Convert UNICODE string to ANSI
invoke WideCharToMultiByte,CP_ACP,0,DWORD PTR [esi],-1, ADDR CMDbuffer,256,0,0
; For debug purposes tell me what was sent to the command line...
invoke MessageBox, NULL, ADDR CMDbuffer, ADDR CMDbuffer, MB_OK
add esi,4
dec ebx
jnz @b
; Test to see if strings were actually parsed to the command line or the first argument is just the programs start path, in which case we can ignore it...
invoke lstrcmpi, ADDR AppPathbuffer, ADDR CMDbuffer
.if eax == 0
invoke MessageBox, NULL, ADDR msgStrEqual, ADDR msgStrEqual, MB_OK
.else
; Do nothing...
;invoke MessageBox, NULL, ADDR msgStrNotEqual, ADDR msgStrNotEqual, MB_OK
.endif
ret
main endp
; -------------------------------------------
; Applications Main Window
; -------------------------------------------
WinMain proc hInst:DWORD,hPrevInst:DWORD,CmdLine:DWORD,CmdShow:DWORD
local wc:WNDCLASSEX
local msg:MSG
local hwnd:HWND
mov wc.cbSize,SizeOf WNDCLASSEX
mov wc.style, CS_HREDRAW or CS_VREDRAW
mov wc.lpfnWndProc, OffSet WndProc
mov wc.cbClsExtra,NULL
mov wc.cbWndExtra,NULL
push hInst
pop wc.hInstance
mov wc.hbrBackground,COLOR_APPWORKSPACE
mov wc.lpszMenuName,IDR_MAINMENU
mov wc.lpszClassName,OffSet ClassName
invoke LoadIcon,NULL,IDI_APPLICATION
mov wc.hIcon,eax
mov wc.hIconSm,eax
invoke LoadCursor,NULL,IDC_ARROW
mov wc.hCursor,eax
invoke RegisterClassEx, ADDR wc
invoke CreateWindowEx,WS_EX_CLIENTEDGE, ADDR ClassName, ADDR AppName,\
WS_OVERLAPPEDWINDOW+WS_VISIBLE,CW_USEDEFAULT,\
CW_USEDEFAULT,920,512,NULL,NULL,\
hInst,NULL
mov hwnd,eax
.while TRUE
invoke GetMessage, ADDR msg,NULL,0,0
.BREAK .IF (!eax)
invoke TranslateMessage, ADDR msg
invoke DispatchMessage, ADDR msg
.endw
mov eax,msg.wParam
ret
WinMain endp
; -------------------------------------------
; Main window loop
; -------------------------------------------
WndProc proc hWnd:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM
local rect:RECT
local hRead:DWORD
local hWrite:DWORD
local startupinfo:STARTUPINFO
local pinfo:PROCESS_INFORMATION
local buffer[1024]:byte
local bytesRead:DWORD
local hdc:DWORD
local sat:SECURITY_ATTRIBUTES
.if uMsg==WM_CREATE
invoke CreateWindowEx,NULL, ADDR EditClass,NULL,WS_CHILD+WS_VISIBLE+ES_MULTILINE+ES_AUTOHSCROLL+ES_AUTOVSCROLL,0,0,0,0,hWnd,NULL,hInstance,NULL
mov hwndEdit,eax
.elseif uMsg==WM_CTLCOLOREDIT
invoke SetTextColor,wParam,Green
invoke SetBkColor,wParam,Black
invoke GetStockObject,BLACK_BRUSH
ret
.elseif uMsg==WM_SIZE
mov edx,lParam
mov ecx,edx
shr ecx,16
and edx,0ffffh
invoke MoveWindow,hwndEdit,0,0,edx,ecx,TRUE
.elseif uMsg==WM_COMMAND
.if lParam==0
mov eax,wParam
.if ax==IDM_ADDGAME
mov sat.nLength,SizeOf SECURITY_ATTRIBUTES
mov sat.lpSecurityDescriptor,NULL
mov sat.bInheritHandle,TRUE
invoke CreatePipe, ADDR hRead, ADDR hWrite, ADDR sat,NULL
.if eax==NULL
invoke MessageBox,hWnd, ADDR CreatePipeError, ADDR AppName,MB_ICONERROR+MB_OK
.else
mov startupinfo.cb,SizeOf STARTUPINFO
invoke GetStartupInfo, ADDR startupinfo
mov eax,hWrite
mov startupinfo.hStdOutput,eax
mov startupinfo.hStdError,eax
mov startupinfo.dwFlags,STARTF_USESHOWWINDOW+STARTF_USESTDHANDLES
mov startupinfo.wShowWindow,SW_HIDE
;-------------------------------------------------
; Create process
;-------------------------------------------------
invoke CreateProcess,NULL, ADDR CommandLine,NULL,NULL,TRUE,NULL,NULL,NULL, ADDR startupinfo, ADDR pinfo
.if eax==NULL
invoke MessageBox,hWnd, ADDR CreateProcessError, ADDR AppName,MB_ICONERROR+MB_OK
.else
invoke CloseHandle,hWrite
.while TRUE
invoke RtlZeroMemory, ADDR buffer,1024
invoke ReadFile,hRead, ADDR buffer,1023, ADDR bytesRead,NULL
.if eax==NULL
.break
.else
invoke SendMessage,hwndEdit,EM_SETSEL,-1,0
invoke SendMessage,hwndEdit,EM_REPLACESEL,FALSE, ADDR buffer
.endif
.endw
.endif
invoke CloseHandle,hRead
invoke CloseHandle,pinfo.hProcess
invoke CloseHandle,pinfo.hThread
.endif
.endif
.endif
.elseif uMsg==WM_DESTROY
invoke PostQuitMessage,NULL
.else
invoke DefWindowProc,hWnd,uMsg,wParam,lParam
ret
.endif
xor eax,eax
ret
WndProc endp
; -------------------------------------------
; Procedure for string concatenation.
; -------------------------------------------
CatProc proc strBase:DWORD, strAdd:DWORD
mov edi, strBase
mov al, 0
repne scasb
dec edi
mov esi, strAdd
@@:
mov al, [esi]
mov [edi], al
inc esi
inc edi
test al, al
jnz @B
ret
CatProc endp
;; -------------------------------------------
;; Procedure for string compare.
;; -------------------------------------------
;StrCmpProc proc strOne:DWORD, strTwo:DWORD
; invoke lstrcmp, ADDR strOne, ADDR strTwo
; cmp eax,0
; jne @f
; invoke MessageBox, NULL, ADDR msg1, ADDR msg1, MB_OK
; jmp strnotequal
;@@:
; invoke MessageBox, NULL, ADDR msg2, ADDR msg2, MB_OK
;strnotequal:
; jnz @B
; ret
;StrCmpProc endp
end start |
programs/oeis/021/A021172.asm | neoneye/loda | 22 | 103529 | <filename>programs/oeis/021/A021172.asm
; A021172: Decimal expansion of 1/168.
; 0,0,5,9,5,2,3,8,0,9,5,2,3,8,0,9,5,2,3,8,0,9,5,2,3,8,0,9,5,2,3,8,0,9,5,2,3,8,0,9,5,2,3,8,0,9,5,2,3,8,0,9,5,2,3,8,0,9,5,2,3,8,0,9,5,2,3,8,0,9,5,2,3,8,0,9,5,2,3,8,0,9,5,2,3,8,0,9,5,2,3,8,0,9,5,2,3,8,0
add $0,1
mov $1,10
pow $1,$0
mul $1,9
div $1,1512
mod $1,10
mov $0,$1
|
source/amf/uml/amf-uml-template_parameter_substitutions.ads | svn2github/matreshka | 24 | 13023 | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, <NAME> <<EMAIL>> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
-- A template parameter substitution relates the actual parameter to a formal
-- template parameter as part of a template binding.
------------------------------------------------------------------------------
with AMF.UML.Elements;
limited with AMF.UML.Parameterable_Elements;
limited with AMF.UML.Template_Bindings;
limited with AMF.UML.Template_Parameters;
package AMF.UML.Template_Parameter_Substitutions is
pragma Preelaborate;
type UML_Template_Parameter_Substitution is limited interface
and AMF.UML.Elements.UML_Element;
type UML_Template_Parameter_Substitution_Access is
access all UML_Template_Parameter_Substitution'Class;
for UML_Template_Parameter_Substitution_Access'Storage_Size use 0;
not overriding function Get_Actual
(Self : not null access constant UML_Template_Parameter_Substitution)
return AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access is abstract;
-- Getter of TemplateParameterSubstitution::actual.
--
-- The element that is the actual parameter for this substitution.
not overriding procedure Set_Actual
(Self : not null access UML_Template_Parameter_Substitution;
To : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access) is abstract;
-- Setter of TemplateParameterSubstitution::actual.
--
-- The element that is the actual parameter for this substitution.
not overriding function Get_Formal
(Self : not null access constant UML_Template_Parameter_Substitution)
return AMF.UML.Template_Parameters.UML_Template_Parameter_Access is abstract;
-- Getter of TemplateParameterSubstitution::formal.
--
-- The formal template parameter that is associated with this substitution.
not overriding procedure Set_Formal
(Self : not null access UML_Template_Parameter_Substitution;
To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access) is abstract;
-- Setter of TemplateParameterSubstitution::formal.
--
-- The formal template parameter that is associated with this substitution.
not overriding function Get_Owned_Actual
(Self : not null access constant UML_Template_Parameter_Substitution)
return AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access is abstract;
-- Getter of TemplateParameterSubstitution::ownedActual.
--
-- The actual parameter that is owned by this substitution.
not overriding procedure Set_Owned_Actual
(Self : not null access UML_Template_Parameter_Substitution;
To : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access) is abstract;
-- Setter of TemplateParameterSubstitution::ownedActual.
--
-- The actual parameter that is owned by this substitution.
not overriding function Get_Template_Binding
(Self : not null access constant UML_Template_Parameter_Substitution)
return AMF.UML.Template_Bindings.UML_Template_Binding_Access is abstract;
-- Getter of TemplateParameterSubstitution::templateBinding.
--
-- The optional bindings from this element to templates.
not overriding procedure Set_Template_Binding
(Self : not null access UML_Template_Parameter_Substitution;
To : AMF.UML.Template_Bindings.UML_Template_Binding_Access) is abstract;
-- Setter of TemplateParameterSubstitution::templateBinding.
--
-- The optional bindings from this element to templates.
end AMF.UML.Template_Parameter_Substitutions;
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_741.asm | ljhsiun2/medusa | 9 | 28629 | .global s_prepare_buffers
s_prepare_buffers:
push %r15
push %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0xf85c, %rsi
lea addresses_WC_ht+0x1611c, %rdi
add %rax, %rax
mov $45, %rcx
rep movsb
nop
nop
nop
and %r15, %r15
lea addresses_D_ht+0x1365c, %rsi
lea addresses_D_ht+0xadc, %rdi
nop
and %rbp, %rbp
mov $71, %rcx
rep movsq
nop
cmp %rax, %rax
lea addresses_D_ht+0x1241c, %rcx
nop
nop
nop
nop
cmp $61321, %rbp
and $0xffffffffffffffc0, %rcx
movaps (%rcx), %xmm3
vpextrq $0, %xmm3, %r15
nop
cmp $15985, %rax
lea addresses_WT_ht+0xc65c, %r15
xor $699, %rbx
movb $0x61, (%r15)
nop
nop
nop
nop
nop
add $9043, %rbp
lea addresses_WC_ht+0x4dc, %rbx
nop
nop
and $1087, %r15
mov $0x6162636465666768, %rsi
movq %rsi, (%rbx)
nop
nop
xor $271, %r15
lea addresses_normal_ht+0x1a5c, %rcx
nop
nop
nop
sub $39320, %rax
mov $0x6162636465666768, %rdi
movq %rdi, %xmm4
movups %xmm4, (%rcx)
nop
nop
nop
cmp $2083, %r15
lea addresses_D_ht+0x1365c, %rbx
add %rbp, %rbp
mov (%rbx), %cx
nop
nop
nop
cmp %rax, %rax
lea addresses_A_ht+0x17a5c, %rax
clflush (%rax)
nop
nop
nop
and %rbx, %rbx
movl $0x61626364, (%rax)
nop
add $25306, %rcx
lea addresses_A_ht+0x688b, %rdi
nop
nop
nop
nop
nop
cmp %rax, %rax
mov (%rdi), %ecx
nop
nop
nop
sub %rbx, %rbx
lea addresses_normal_ht+0xdf46, %rbx
nop
xor %rcx, %rcx
movups (%rbx), %xmm4
vpextrq $1, %xmm4, %rbp
nop
and $34211, %rax
lea addresses_normal_ht+0x1965c, %rsi
lea addresses_UC_ht+0x74dc, %rdi
nop
nop
nop
nop
add $24694, %rax
mov $12, %rcx
rep movsl
nop
nop
nop
nop
cmp %rax, %rax
lea addresses_WT_ht+0x1d31c, %rsi
nop
inc %rcx
movups (%rsi), %xmm7
vpextrq $1, %xmm7, %rbp
nop
nop
nop
nop
nop
dec %rbp
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r15
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %rbx
push %rcx
push %rdi
// Faulty Load
lea addresses_WT+0x9e5c, %rcx
clflush (%rcx)
nop
nop
nop
nop
cmp %rbx, %rbx
mov (%rcx), %r12d
lea oracles, %rbx
and $0xff, %r12
shlq $12, %r12
mov (%rbx,%r12,1), %r12
pop %rdi
pop %rcx
pop %rbx
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': True, 'type': 'addresses_WT'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 9, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'}
{'src': {'congruent': 9, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': True, 'size': 16, 'congruent': 3, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 11, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 3, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 9, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'STOR'}
{'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 9, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': True, 'size': 4, 'congruent': 10, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'}
{'src': {'NT': True, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 1, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 11, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 7, 'same': True, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 3, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'}
{'39': 21829}
39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39
*/
|
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c4/c46052a.ada | best08618/asylo | 7 | 29160 | <gh_stars>1-10
-- C46052A.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- CHECK THAT CONSTRAINT_ERROR IS RAISED FOR CONVERSION TO AN
-- ENUMERATION TYPE IF THE VALUE OF THE OPERAND DOES NOT BELONG TO THE
-- RANGE OF ENUMERATION VALUES FOR THE TARGET SUBTYPE.
-- R.WILLIAMS 9/9/86
WITH REPORT; USE REPORT;
PROCEDURE C46052A IS
TYPE ENUM IS (A, AB, ABC, ABCD);
E : ENUM := ENUM'VAL (IDENT_INT (0));
FUNCTION IDENT (E : ENUM) RETURN ENUM IS
BEGIN
RETURN ENUM'VAL (IDENT_INT (ENUM'POS (E)));
END IDENT;
BEGIN
TEST ( "C46052A", "CHECK THAT CONSTRAINT_ERROR IS RAISED FOR " &
"CONVERSION TO AN ENUMERATION TYPE IF THE " &
"VALUE OF THE OPERAND DOES NOT BELONG TO " &
"THE RANGE OF ENUMERATION VALUES FOR THE " &
"TARGET SUBTYPE" );
DECLARE
SUBTYPE SENUM IS ENUM RANGE AB .. ABCD;
BEGIN
E := IDENT (SENUM (E));
FAILED ( "NO EXCEPTION RAISED FOR 'SENUM (E)'" );
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ( "WRONG EXCEPTION RAISED FOR 'SENUM (E)'" );
END;
DECLARE
SUBTYPE NOENUM IS ENUM RANGE ABCD .. AB;
BEGIN
E := IDENT (NOENUM (E));
FAILED ( "NO EXCEPTION RAISED FOR 'NOENUM (E)'" );
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ( "WRONG EXCEPTION RAISED FOR 'NOENUM (E)'" );
END;
DECLARE
SUBTYPE SCHAR IS CHARACTER RANGE 'C' .. 'R';
A : CHARACTER := IDENT_CHAR ('A');
BEGIN
A := IDENT_CHAR (SCHAR (A));
FAILED ( "NO EXCEPTION RAISED FOR 'SCHAR (A)'" );
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ( "WRONG EXCEPTION RAISED FOR 'SCHAR (A)'" );
END;
DECLARE
SUBTYPE FRANGE IS BOOLEAN RANGE FALSE .. FALSE;
T : BOOLEAN := IDENT_BOOL (TRUE);
BEGIN
T := IDENT_BOOL (FRANGE (T));
FAILED ( "NO EXCEPTION RAISED FOR 'FRANGE (T)'" );
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ( "WRONG EXCEPTION RAISED FOR 'FRANGE (T)'" );
END;
RESULT;
END C46052A;
|
libsrc/_DEVELOPMENT/threads/context/__thread_critical_section_end.asm | teknoplop/z88dk | 0 | 14893 | <reponame>teknoplop/z88dk<gh_stars>0
SECTION code_clib
SECTION code_threads
PUBLIC __thread_critical_section_end
EXTERN asm_z80_pop_ei
defc __thread_critical_section_end = asm_z80_pop_ei
|
programs/oeis/314/A314668.asm | karttu/loda | 0 | 243725 | ; A314668: Coordination sequence Gal.6.115.6 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings.
; 1,5,9,13,17,21,25,29,33,37,41,45,50,55,59,63,67,71,75,79,83,87,91,95,100,105,109,113,117,121,125,129,133,137,141,145,150,155,159,163,167,171,175,179,183,187,191,195,200,205
mov $1,1
mov $2,$0
mov $3,$0
lpb $2,1
trn $1,$2
trn $2,11
mov $4,1
add $4,$2
add $1,$4
sub $2,1
lpe
lpb $3,1
add $1,4
sub $3,1
lpe
|
base/ntos/ke/amd64/trap.asm | 987432340/wrk-v1.2 | 1 | 105016 | title "Trap Processing"
;++
;
; Copyright (c) Microsoft Corporation. All rights reserved.
;
; You may only use this code if you agree to the terms of the Windows Research Kernel Source Code License agreement (see License.txt).
; If you do not agree to the terms, do not use the code.
;
;
; Module Name:
;
; trap.asm
;
; Abstract:
;
; This module implements the code necessary to field and process AMD64
; trap conditions.
;
;--
include ksamd64.inc
altentry KiExceptionExit
altentry KiSystemServiceCopyEnd
altentry KiSystemServiceCopyStart
altentry KiSystemServiceExit
altentry KiSystemServiceGdiTebAccess
altentry KiSystemServiceRepeat
altentry KiSystemServiceStart
extern ExpInterlockedPopEntrySListEnd:proc
extern ExpInterlockedPopEntrySListFault:byte
extern ExpInterlockedPopEntrySListResume:proc
extern KdpOweBreakpoint:byte
extern KdSetOwedBreakpoints:proc
extern KeBugCheckEx:proc
extern KeGdiFlushUserBatch:qword
extern KeServiceDescriptorTableShadow:qword
extern KiCheckForSListAddress:proc
extern KiCodePatchCycle:dword
extern KiConvertToGuiThread:proc
extern KiDispatchException:proc
extern KiDpcInterruptBypass:proc
extern KiIdleSummary:qword
extern KiInitiateUserApc:proc
extern KiPrefetchRetry:byte
extern KiPreprocessInvalidOpcodeFault:proc
extern KiPreprocessKernelAccessFault:proc
extern KiProcessNMI:proc
extern KiProcessorBlock:qword
extern KiRestoreDebugRegisterState:proc
extern KiSaveDebugRegisterState:proc
extern KiSaveProcessorState:proc
extern MmAccessFault:proc
extern MmUserProbeAddress:qword
extern RtlUnwindEx:proc
extern PsWatchEnabled:byte
extern PsWatchWorkingSet:proc
extern __imp_HalHandleMcheck:qword
extern __imp_HalRequestSoftwareInterrupt:qword
;
; Define special macros to align trap entry points on cache line boundaries.
;
; N.B. This will only work if all functions in this module are declared with
; these macros.
;
TRAP_ENTRY macro Name, Handler
_TEXT$10 segment page 'CODE'
align 64
public Name
ifb <Handler>
Name proc frame
else
Name proc frame:Handler
endif
endm
TRAP_END macro Name
Name endp
_TEXT$10 ends
endm
subttl "Divide Error Fault"
;++
;
; Routine Description:
;
; This routine is entered as the result of an attempted division by zero
; or the result of an attempted division does not fit in the destination
; operand (i.e., the largest negative number divided by minus one).
;
; N.B. The two possible conditions that can cause this exception are not
; separated and the exception is reported as a divide by zero.
;
; Arguments:
;
; The standard exception frame is pushed by hardware on the kernel stack.
; There is no error code for this exception.
;
; Disposition:
;
; A standard trap frame is constructed on the kernel stack, the exception
; parameters are loaded into registers, and the exception is dispatched via
; common code.
;
;--
TRAP_ENTRY KiDivideErrorFault
GENERATE_TRAP_FRAME <>, <PatchCycle> ; generate trap frame
mov ecx, KI_EXCEPTION_INTEGER_DIVIDE_BY_ZERO ; set exception code
xor edx, edx ; set number of parameters
mov r8, TrRip[rbp] ; set exception address
call KiExceptionDispatch ; dispatch exception - no return
nop ; fill - do not remove
TRAP_END KiDivideErrorFault
subttl "Debug Trap Or Fault"
;++
;
; Routine Description:
;
; This routine is entered as the result of a debug trap or fault. The
; following conditions cause entry to this routine:
;
; 1. Instruction fetch breakpoint fault.
; 2. Data read or write breakpoint trap.
; 3. I/O read or write breakpoint trap.
; 4. General detect condition fault (in-circuit emulator).
; 5. Single step trap (TF set).
; 6. Task switch trap (not possible on this system).
; 7. Execution of an int 1 instruction.
;
; Arguments:
;
; The standard exception frame is pushed by hardware on the kernel stack.
; There is no error code for this exception.
;
; Disposition:
;
; A standard trap frame is constructed on the kernel stack, the exception
; parameters are loaded into registers, and the exception is dispatched via
; common code.
;
;--
TRAP_ENTRY KiDebugTrapOrFault
GENERATE_TRAP_FRAME ; generate trap frame
xor edx, edx ; set number of parameters
test dword ptr TrEflags[rbp], EFLAGS_TF_MASK ; test if TF is set
jz short KiDT30 ; if z, TF not set
cmp byte ptr gs:[PcCpuVendor], CPU_AMD ; check if AMD processor
jne short KiDT30 ; if ne, not authentic AMD processor
;
; The host processor is an authentic AMD processor.
;
; Check if branch tracing and last branch capture is enabled.
;
test byte ptr TrSegCs[rbp], MODE_MASK ; test if previous mode user
jnz short KiDT10 ; if nz, previous mode user
;
; Previous mode was kernel - the debug registers have not yet been saved.
;
mov rax, dr7 ; get debug control register
test ax, DR7_TRACE_BRANCH ; test if trace branch set
jz short KiDT30 ; if z, trace branch not set
test ax, DR7_LAST_BRANCH ; test if last branch set
jz short KiDT30 ; if z, last branch not set
mov ecx, MSR_LAST_BRANCH_FROM ; get last branch information
rdmsr ;
mov r9d, eax ;
shl rdx, 32 ;
or r9, rdx ;
mov ecx, MSR_LAST_BRANCH_TO ;
rdmsr ;
mov r10d, eax ;
shl rdx, 32 ;
or r10, rdx ;
jmp short KiDT20 ; finish in common code
;
; Previous mode was user - the debug registers are saved in the trap frame.
;
KiDT10: test word ptr TrDr7[rbp], DR7_TRACE_BRANCH ; test if trace branch set
jz short KiDT30 ; if z, trace branch not set
test word ptr TrDr7[rbp], DR7_LAST_BRANCH ; test if last branch set
jz short KiDT30 ; if z, last branch not set
mov r9, TrLastBranchFromRip[rbp] ; set last RIP parameters
mov r10, TrLastBranchToRip[rbp] ;
KiDT20: mov edx, 2 ; set number of parameters
KiDT30: mov ecx, STATUS_SINGLE_STEP ; set exception code
and dword ptr TrEflags[rbp], NOT EFLAGS_TF_MASK ; reset the TF bit
mov r8, TrRip[rbp] ; set exception address
call KiExceptionDispatch ; dispatch exception - no return
nop ; fill - do not remove
TRAP_END KiDebugTrapOrFault
subttl "Nonmaskable Interrupt"
;++
;
; Routine Description:
;
; This routine is entered as the result of a nonmaskable interrupt. A
; switch to the panic stack occurs before the exception frame is pushed
; on the stack.
;
; N.B. This routine executes on the panic stack.
;
; Arguments:
;
; The standard exception frame is pushed by hardware on the kernel stack.
; There is no error code for this exception.
;
; Disposition:
;
; A standard trap frame is constructed on the kernel stack and the NMI is
; processed. If a return to this routine occurs, then the NMI was handled.
;
;--
TRAP_ENTRY KiNmiInterrupt
.pushframe ; mark machine frame
alloc_stack 8 ; allocate dummy vector
push_reg rbp ; save nonvolatile register
GENERATE_INTERRUPT_FRAME <>, <Direct>, <Nmi> ; generate interrupt frame
mov ecx, HIGH_LEVEL ; set IRQL value
ENTER_INTERRUPT <NoEOI>, <NoCount>, <Nmi> ; enter interrupt
;
; Check to determine if a recursive non-maskable interrupt has occured. This
; can happen when an SMI interrupts an NMI in progress, unmasking NMIs, and a
; second NMI is pending.
;
lea rax, KTRAP_FRAME_LENGTH[rsp] ; get base stack address
cmp rax, TrRsp[rbp] ; check if within range
jbe KiNi10 ; if be, old stack above base
sub rax, NMI_STACK_SIZE ; compute stack limit
cmp rax, TrRsp[rbp] ; check if within range
jbe KiNi20 ; if be, old stack in range
KiNi10: call KxNmiInterrupt ; call secondary routine
EXIT_INTERRUPT <NoEOI>, <NoCount>, <Direct>, <Nmi> ; restore trap state and exit
;
; A recursive non-maskable interrupt has occured.
;
KiNi20: xor r10, r10 ; clear bugcheck parameters
xor r9, r9 ;
xor r8, r8 ;
xor edx, edx ;
mov ecx, RECURSIVE_NMI ; set bugcheck code
call KiBugCheckDispatch ; bugcheck system - no return
nop ; fill - do not remove
TRAP_END KiNmiInterrupt
;
; This routine generates an exception frame, then processes the NMI.
;
TRAP_ENTRY KxNmiInterrupt
GENERATE_EXCEPTION_FRAME ; generate exception frame
lea rcx, (-128)[rbp] ; set trap frame address
mov rdx, rsp ; set exception frame address
call KiSaveProcessorState ; save processor state
lea rcx, (-128)[rbp] ; set trap frame address
mov rdx, rsp ; set exception frame address
call KiProcessNMI ; process NMI
RESTORE_EXCEPTION_STATE ; restore exception state/deallocate
ret ; return
TRAP_END KxNmiInterrupt
subttl "Breakpoint Trap"
;++
;
; Routine Description:
;
; This routine is entered as the result of the execution of an int 3
; instruction.
;
; Arguments:
;
; The standard exception frame is pushed by hardware on the kernel stack.
; There is no error code for this exception.
;
; Disposition:
;
; A standard trap frame is constructed on the kernel stack, the exception
; parameters are loaded into registers, and the exception is dispatched via
; common code.
;
;--
TRAP_ENTRY KiBreakpointTrap
GENERATE_TRAP_FRAME ; generate trap frame
mov ecx, STATUS_BREAKPOINT ; set exception code
mov edx, 1 ; set number of parameters
mov r8, TrRip[rbp] ; set exception address
dec r8 ;
mov r9d, BREAKPOINT_BREAK ; set parameter 1 value
call KiExceptionDispatch ; dispatch exception - no return
nop ; fill - do not remove
TRAP_END KiBreakpointTrap
subttl "Overflow Trap"
;++
;
; Routine Description:
;
; This routine is entered as the result of the execution of an into
; instruction when the OF flag is set.
;
; Arguments:
;
; The standard exception frame is pushed by hardware on the kernel stack.
; There is no error code for this exception.
;
; Disposition:
;
; A standard trap frame is constructed on the kernel stack, the exception
; parameters are loaded into registers, and the exception is dispatched via
; common code.
;
;--
TRAP_ENTRY KiOverflowTrap
GENERATE_TRAP_FRAME ; generate trap frame
mov ecx, STATUS_INTEGER_OVERFLOW ; set exception code
xor edx, edx ; set number of parameters
mov r8, TrRip[rbp] ; set exception address
dec r8 ;
call KiExceptionDispatch ; dispatch exception - no return
nop ; fill - do not remove
TRAP_END KiOverflowTrap
subttl "Bound Fault"
;++
;
; Routine Description:
;
; This routine is entered as the result of the execution of a bound
; instruction and when the bound range is exceeded.
;
; Arguments:
;
; The standard exception frame is pushed by hardware on the kernel stack.
; There is no error code for this exception.
;
; Disposition:
;
; A standard trap frame is constructed on the kernel stack, the exception
; parameters are loaded into registers, and the exception is dispatched via
; common code.
;
;--
TRAP_ENTRY KiBoundFault
GENERATE_TRAP_FRAME ; generate trap frame
mov ecx, STATUS_ARRAY_BOUNDS_EXCEEDED ; set exception code
xor edx, edx ; set number of parameters
mov r8, TrRip[rbp] ; set exception address
call KiExceptionDispatch ; dispatch exception - no return
nop ; fill - do not remove
TRAP_END KiBoundFault
subttl "Invalid Opcode Fault"
;++
;
; Routine Description:
;
; This routine is entered as the result of the execution of an invalid
; instruction.
;
; Arguments:
;
; The standard exception frame is pushed by hardware on the kernel stack.
; There is no error code for this exception.
;
; Disposition:
;
; A standard trap frame is constructed on the kernel stack, the exception
; parameters are loaded into registers, and the exception is dispatched via
; common code.
;
;--
TRAP_ENTRY KiInvalidOpcodeFault
GENERATE_TRAP_FRAME <>, <PatchCycle> ; generate trap frame
mov rcx, rsp ; set trap frame address
call KiPreprocessInvalidOpcodeFault ; check for opcode emulation
or eax, eax ; test if opcode emulated
jnz short KiIO10 ; if nz, opcode emulated
mov ecx, KI_EXCEPTION_INVALID_OP ; set exception code
xor edx, edx ; set number of parameters
mov r8, TrRip[rbp] ; set exception address
call KiExceptionDispatch ; dispatch exception - no return
nop ; fill - do not remove
KiIO10: RESTORE_TRAP_STATE <Volatile> ; restore trap state and exit
TRAP_END KiInvalidOpcodeFault
subttl "NPX Not Available Fault"
;++
;
; Routine Description:
;
; This routine is entered as the result of the numeric coprocessor not
; being available for one of the following conditions:
;
; 1. A floating point instruction was executed and EM is set in CR0 -
; this condition should never happen since EM will never be set.
;
; 2. A floating point instruction was executed and the TS flag is set
; in CR0 - this condition should never happen since TS will never
; be set.
;
; 3. A WAIT of FWAIT instruction was executed and the MP and TS flags
; are set in CR0 - this condition should never occur since neither
; TS nor MP will ever be set.
;
; N.B. The NPX state should always be available.
;
; Arguments:
;
; The standard exception frame is pushed by hardware on the kernel stack.
; There is no error code for this exception.
;
; Disposition:
;
; A standard trap frame is constructed on the kernel stack and bugcheck
; is called.
;
;--
TRAP_ENTRY KiNpxNotAvailableFault
GENERATE_TRAP_FRAME ; generate trap frame
mov r10, TrRip[rbp] ; set parameter 5 to exception address
mov r9, cr4 ; set parameter 4 to control register 4
mov r8, cr0 ; set parameter 3 to control register 0
mov edx, EXCEPTION_NPX_NOT_AVAILABLE ; set unexpected trap number
mov ecx, UNEXPECTED_KERNEL_MODE_TRAP ; set bugcheck code
call KiBugCheckDispatch ; bugcheck system - no return
nop ; fill - do not remove
TRAP_END KiNpxNotAvailableFault
subttl "Double Fault Abort"
;++
;
; Routine Description:
;
; This routine is entered as the result of the generation of a second
; exception while another exception is being generated. A switch to the
; panic stack occurs before the exception frame is pushed on the stack.
;
; N.B. This routine executes on the panic stack.
;
; Arguments:
;
; The standard exception frame is pushed by hardware on the new stack.
; There is no error code for this exception.
;
; Disposition:
;
; A standard trap frame is constructed on the kernel stack and bugcheck
; is called.
;
;--
TRAP_ENTRY KiDoubleFaultAbort
GENERATE_TRAP_FRAME <ErrorCode> ; generate trap frame
mov r10, TrRip[rbp] ; set parameter 5 to exception address
mov r9, cr4 ; set parameter 4 to control register 4
mov r8, cr0 ; set parameter 3 to control register 0
mov edx, EXCEPTION_DOUBLE_FAULT ; set unexpected trap number
mov ecx, UNEXPECTED_KERNEL_MODE_TRAP ; set bugcheck code
call KiBugCheckDispatch ; bugcheck system - no return
nop ; fill - do not remove
TRAP_END KiDoubleFaultAbort
subttl "NPX Segment Overrrun Abort"
;++
;
; Routine Description:
;
; This routine is entered as the result of a hardware failure since this
; vector is obsolete.
;
; Arguments:
;
; The standard exception frame is pushed by hardware on the new stack.
; There is no error code for this exception.
;
; Disposition:
;
; This trap should never occur and the system is shutdown via a call to
; bugcheck.
;
;--
TRAP_ENTRY KiNpxSegmentOverrunAbort
GENERATE_TRAP_FRAME ; generate trap frame
mov r10, TrRip[rbp] ; set parameter 5 to exception address
mov r9, cr4 ; set parameter 4 to control register 4
mov r8, cr0 ; set parameter 3 to control register 0
mov edx, EXCEPTION_NPX_OVERRUN ; set unexpected trap number
mov ecx, UNEXPECTED_KERNEL_MODE_TRAP ; set bugcheck code
call KiBugCheckDispatch ; bugcheck system - no return
nop ; fill - do not remove
TRAP_END KiNpxSegmentOverrunAbort
subttl "Invalid TSS Fault"
;++
;
; Routine Description:
;
; This routine is entered as the result of a hardware or software failure
; since there is no task switching in 64-bit mode and 32-bit code does not
; have any task state segments.
;
; Arguments:
;
; The standard exception frame is pushed by hardware on the new stack.
; The segment selector index for the segment descriptor that caused the
; violation is pushed as the error code.
;
; Disposition:
;
; A standard trap frame is constructed on the kernel stack and bugcheck
; is called.
;
;--
TRAP_ENTRY KiInvalidTssFault
GENERATE_TRAP_FRAME <ErrorCode> ; generate trap frame
mov r10, TrRip[rbp] ; set parameter 5 to exception address
mov r9d, TrErrorCode[rbp] ; set parameter 4 to selector index
mov r8, cr0 ; set parameter 3 to control register 0
mov edx, EXCEPTION_INVALID_TSS ; set unexpected trap number
mov ecx, UNEXPECTED_KERNEL_MODE_TRAP ; set bugcheck code
call KiBugCheckDispatch ; bugcheck system - no return
nop ; fill - do not remove
TRAP_END KiInvalidTssFault
subttl "Segment Not Present Fault"
;++
;
; Routine Description:
;
; This routine is entered as the result of a segment not present (P bit 0)
; fault. This fault can only occur in legacy 32-bit code.
;
; Arguments:
;
; The standard exception frame is pushed by hardware on the new stack.
; The segment selector index for the segment descriptor that is not
; present is pushed as the error code.
;
; Disposition:
;
; A standard trap frame is constructed. If the previous mode is user,
; then the exception parameters are loaded into registers and the exception
; is dispatched via common code. Otherwise, bugcheck is called.
;
;--
TRAP_ENTRY KiSegmentNotPresentFault
GENERATE_TRAP_FRAME <ErrorCode> ; generate trap frame
mov r8, TrRip[rbp] ; get exception address
test byte ptr TrSegCs[rbp], MODE_MASK ; test if previous mode user
jz short KiSN10 ; if z, previous mode not user
;
; The previous mode was user.
;
mov ecx, STATUS_ACCESS_VIOLATION ; set exception code
mov edx, 2 ; set number of parameters
mov r9d, TrErrorCode[rbp] ; set parameter 1 value
or r9d, RPL_MASK ;
and r9d, 0ffffh ;
xor r10, r10 ; set parameter 2 value
call KiExceptionDispatch ; dispatch exception - no return
;
; The previous mode was kernel.
;
KiSN10: mov r10, r8 ; set parameter 5 to exception address
mov r9d, TrErrorCode[rbp] ; set parameter 4 to selector index
mov r8, cr0 ; set parameter 3 to control register 0
mov edx, EXCEPTION_SEGMENT_NOT_PRESENT ; set unexpected trap number
mov ecx, UNEXPECTED_KERNEL_MODE_TRAP ; set bugcheck code
call KiBugCheckDispatch ; bugcheck system - no return
nop ; fill - do not remove
TRAP_END KiSegmentNotPresentFault
subttl "Stack Fault"
;++
;
; Routine Description:
;
; This routine is entered as the result of a stack fault. This fault can
; only occur in legacy 32-bit code.
;
; Arguments:
;
; The standard exception frame is pushed by hardware on the new stack.
; The segment selector index for the segment descriptor that caused the
; exception is pushed as the error code.
;
; Disposition:
;
; A standard trap frame is constructed. If the previous mode is user,
; then the exception parameters are loaded into registers and the exception
; is dispatched via common code. Otherwise, bugcheck is called.
;
;--
TRAP_ENTRY KiStackFault
GENERATE_TRAP_FRAME <ErrorCode> ; generate trap frame
mov r8, TrRip[rbp] ; get exception address
test byte ptr TrSegCs[rbp], MODE_MASK ; test if previous mode user
jz short KiSF10 ; if z, previous mode not user
;
; The previous mode was user.
;
mov ecx, STATUS_ACCESS_VIOLATION ; set exception code
mov edx, 2 ; set number of parameters
mov r9d, TrErrorCode[rbp] ; set parameter 1 value
or r9d, RPL_MASK ;
and r9d, 0ffffh ;
xor r10, r10 ; set parameter 2 value
call KiExceptionDispatch ; dispatch exception - no return
;
; The previous mode was kernel.
;
KiSF10: mov r10, r8 ; set parameter 5 to exception address
mov r9d, TrErrorCode[rbp] ; set parameter 4 to selector index
mov r8, cr0 ; set parameter 3 to control register 0
mov edx, EXCEPTION_STACK_FAULT ; set unexpected trap number
mov ecx, UNEXPECTED_KERNEL_MODE_TRAP ; set bugcheck code
call KiBugCheckDispatch ; bugcheck system - no return
nop ; fill - do not remove
TRAP_END KiStackFault
subttl "General Protection Fault"
;++
;
; Routine Description:
;
; This routine is entered as the result of a general protection violation.
;
; Arguments:
;
; The standard exception frame is pushed by hardware on the kernel stack.
; The segment selector index for the segment descriptor that caused the
; exception, the IDT vector number for the descriptor that caused the
; exception, or zero is pushed as the error code.
;
; Disposition:
;
; A standard trap frame is constructed on the kernel stack, the exception
; parameters are loaded into registers, and the exception is dispatched via
; common code.
;
;--
TRAP_ENTRY KiGeneralProtectionFault
GENERATE_TRAP_FRAME <ErrorCode>, <PatchCycle> ; generate trap frame
mov ecx, KI_EXCEPTION_GP_FAULT ; set GP fault internal code
mov edx, 2 ; set number of parameters
mov r9d, TrErrorCode[rbp] ; set parameter 1 to error code
and r9d, 0ffffh ;
xor r10, r10 ; set parameter 2 value
mov r8, TrRip[rbp] ; set exception address
call KiExceptionDispatch ; dispatch exception - no return
nop ; fill - do not remove
TRAP_END KiGeneralProtectionFault
subttl "Page Fault"
;++
;
; Routine Description:
;
; This routine is entered as the result of a page fault which can occur
; because of the following reasons:
;
; 1. The referenced page is not present.
;
; 2. The referenced page does not allow the requested access.
;
; Arguments:
;
; A standard exception frame is pushed by hardware on the kernel stack.
; A special format error code is pushed which specifies the cause of the
; page fault as not present, read/write access denied, from user/kernel
; mode, and attempting to set reserved bits.
;
; Disposition:
;
; A standard trap frame is constructed on the kernel stack and memory
; management is called to resolve the page fault. If memory management
; successfully resolves the page fault, then working set information is
; recorded, owed breakpoints are inserted, and execution is continued.
;
; If the page fault occurred at an IRQL greater than APC_LEVEL, then the
; system is shut down via a call to bugcheck. Otherwise, an appropriate
; exception is raised.
;
;--
TRAP_ENTRY KiPageFault
GENERATE_TRAP_FRAME <Virtual>, <PatchCycle>, <SaveGSSwap> ; generate trap frame
;
; The registers eax and rcx are loaded with the error code and the virtual
; address of the fault respectively when the trap frame is generated.
;
shr eax, 1 ; isolate load/store and i/d indicators
and eax, 09h ;
;
; Save the load/store indicator and the faulting virtual address in the
; exception record in case an exception is raised.
;
mov TrFaultIndicator[rbp], al ; save load/store indicator
mov TrFaultAddress[rbp], rcx ; save fault address
lea r9, (-128)[rbp] ; set trap frame address
mov r8b, TrSegCs[rbp] ; isolate previous mode
and r8b, MODE_MASK ;
mov rdx, rcx ; set faulting virtual address
movzx ecx, al ; set load/store indicator
jnz short KiPF05 ; if nz, previous mode user
cmp KiPrefetchRetry, 0 ; check if prefetch retry required
je short KiPF05 ; if e, prefetch retry not required
test al, EXCEPTION_EXECUTE_FAULT ; test is execution fault
jnz short KiPF05 ; if nz, execution fault
call KiPreprocessKernelAccessFault ; preprocess fault
test eax, eax ; check for instruction retry
jge KiPF60 ; if ge, retry instruction
lea r9, (-128)[rbp] ; set trap frame address
mov r8b, TrSegCs[rbp] ; isolate previous mode
and r8b, MODE_MASK ;
mov rdx, TrFaultAddress[rbp]; set faulting virtual address
movzx ecx, BYTE PTR TrFaultIndicator[rbp] ; set load/store indicator
KiPF05: call MmAccessFault ; attempt to resolve page fault
test eax, eax ; test for successful completion
jl short KiPF20 ; if l, not successful completion
;
; If watch working set is enabled, then record working set information.
;
cmp PsWatchEnabled, 0 ; check if working set watch enabled
je short KiPF10 ; if e, working set watch not enabled
mov r8, TrFaultAddress[rbp] ; set fault address
mov rdx, TrRip[rbp] ; set exception address
mov ecx, eax ; set completion status
call PsWatchWorkingSet ; record working set information
;
; If the debugger has any breakpoints that should be inserted, then attempt
; to insert them now.
;
KiPF10: cmp KdpOweBreakPoint, 0 ; check if breakpoints are owed
je KiPF60 ; if e, no owed breakpoints
call KdSetOwedBreakpoints ; notify the debugger of new page
jmp KiPF60 ; finish in common code
;
; Check if a 32-bit user mode program reloaded the segment register GS and
; wiped out the GS base address.
;
KiPF20: test byte ptr TrSegCs[rbp], MODE_MASK ; test if previous mode user
jz short KiPF25 ; if z, previous mode not user
cmp word ptr TrSegCs[rbp], (KGDT64_R3_CODE or RPL_MASK) ; check for 64-bit mode
jne short KiPF23 ; if ne, not running in 64-bit mode
mov r8, gs:[PcTeb] ; get current TEB address
cmp r8, TrGsSwap[rbp] ; check for user TEB address match
je short KiPF25 ; if e, user TEB address match
mov ecx, MSR_GS_SWAP ; set GS swap MSR number
mov eax, r8d ; set low user TEB address
shr r8, 32 ; set high user TEB address
mov edx, r8d ;
wrmsr ; write user TEB base address
jmp KiPF60 ; finish is common code
;
; Check if the 32-bit program attempted a reference outside the 32-bit address
; space.
;
KiPF23: mov rcx, TrFaultAddress[rbp] ; get fault address
shr rcx, 32 ; isolate upper address bits
jnz KiPF60 ; if nz, high address bits set
;
; Memory management failed to resolve the fault.
;
; STATUS_IN_PAGE_ERROR | 0x10000000 is a special status that indicates a
; page fault at IRQL greater than APC level. This status causes a
; bugcheck.
;
; The following status values can be raised:
;
; STATUS_ACCESS_VIOLATION
; STATUS_GUARD_PAGE_VIOLATION
; STATUS_STACK_OVERFLOW
;
; All other status values are sconverted to:
;
; STATUS_IN_PAGE_ERROR
;
KiPF25: mov ecx, eax ; set status code
mov edx, 2 ; set number of parameters
cmp ecx, STATUS_IN_PAGE_ERROR or 10000000h ; check for bugcheck code
je short KiPF40 ; if e, bugcheck code returned
cmp ecx, STATUS_ACCESS_VIOLATION ; check for status values
je short KiPF28 ; if e, raise exception with internal code
cmp ecx, STATUS_GUARD_PAGE_VIOLATION ; check for status code
je short KiPF30 ; if e, raise exception with code
cmp ecx, STATUS_STACK_OVERFLOW ; check for status code
je short KiPF30 ; if e, raise exception with code
mov ecx, STATUS_IN_PAGE_ERROR ; convert all other status codes
mov edx, 3 ; set number of parameters
mov r11d, eax ; set parameter 3 to real status value
jmp KiPF30
KiPF28: mov ecx, KI_EXCEPTION_ACCESS_VIOLATION ; set internal code
;
; Set virtual address, load/store and i/d indicators, exception address, and
; dispatch the exception.
;
KiPF30: mov r10, TrFaultAddress[rbp] ; set fault address
movzx r9, byte ptr TrFaultIndicator[rbp] ; set load/store indicator
mov r8, TrRip[rbp] ; set exception address
call KiExceptionDispatch ; dispatch exception - no return
;
; A page fault occurred at an IRQL that was greater than APC_LEVEL. Set bugcheck
; parameters and join common code.
;
KiPF40: CurrentIrql ; get current IRQL
mov r10, TrRip[rbp] ; set parameter 5 to exception address
movzx r9, byte ptr TrFaultIndicator[rbp] ; set load/store indicator
and eax, 0ffh ; isolate current IRQL
mov r8, rax ;
mov rdx, TrFaultAddress[rbp] ; set fault address
mov ecx, IRQL_NOT_LESS_OR_EQUAL ; set bugcheck code
call KiBugCheckDispatch ; bugcheck system - no return
;
; If the page fault occured within the kernel pop entry SLIST code, then reset
; RIP if necessary to avoid an SLIST sequence wrap attack.
;
; Make sure that IRQL is greater than passive level to block a set context
; operations.
;
KiPF60: lea rax, ExpInterlockedPopEntrySListResume ; get SLIST resume address
cmp rax, TrRip[rbp] ; check resume address is above RIP
jae KiPF70 ; if ae, resume address above RIP
lea rax, ExpInterlockedPopEntrySListEnd ; get SLIST end address
cmp rax, TrRip[rbp] ; check end address is below RIP
jb short KiPF70 ; if b, end address below RIP
CurrentIrql ; get Current IRQL
or eax, eax ; test is IRQL is passive level
mov TrP5[rbp], eax ; save current IRQL
jne short KiPF65 ; if ne, IRQL is above passive level
mov ecx, APC_LEVEL ; get APC level
SetIrql ; set IRQL to APC level
KiPF65: lea rcx, (-128)[rbp] ; set trap frame address
call KiCheckForSListAddress ; check RIP and reset if necessary
mov ecx, TrP5[rbp] ; get previous IRQL value
or ecx, ecx ; test if IRQL was raised
jne short KiPF70 ; if nz, IRQL was not raised
SetIrql ; set IRQL to previous value
;
; Test if a user APC should be delivered and exit exception.
;
KiPF70: RESTORE_TRAP_STATE <Volatile> ; restore trap state and exit
TRAP_END KiPageFault
subttl "Legacy Floating Error"
;++
;
; Routine Description:
;
; This routine is entered as the result of a legacy floating point fault.
;
; Arguments:
;
; The standard exception frame is pushed by hardware on the kernel stack.
; There is no error code for this exception.
;
; Disposition:
;
; A standard trap frame is constructed on the kernel stack. If the previous
; mode is user, then reason for the exception is determine, the exception
; parameters are loaded into registers, and the exception is dispatched via
; common code. Otherwise, bugcheck is called.
;
;--
TRAP_ENTRY KiFloatingErrorFault
GENERATE_TRAP_FRAME ; generate trap frame
test byte ptr TrSegCs[rbp], MODE_MASK ; check if previous mode user
jz KiFE30 ; if z, previous mode not user
;
; The previous mode was user mode.
;
fnstcw TrErrorCode[rbp] ; store floating control word
fnstsw ax ; store floating status word
mov cx, TrErrorCode[rbp] ; get control word
and cx, FSW_ERROR_MASK ; isolate masked exceptions
not cx ; compute enabled exceptions
and ax, cx ; isolate exceptions
mov ecx, STATUS_FLOAT_INVALID_OPERATION ; set exception code
xor r9, r9 ; set first exception parameter
mov edx, 1 ; set number of parameters
mov r8, TrRip[rbp] ; set exception address
test al, FSW_INVALID_OPERATION ; test for invalid operation
jz short KiFE10 ; if z, non invalid operation
test al, FSW_STACK_FAULT ; test is caused by stack fault
jz short KiFE20 ; if z, not caused by stack fault
mov ecx, STATUS_FLOAT_STACK_CHECK ; set exception code
jmp short KiFE20 ; finish in common code
KiFE10: mov ecx, STATUS_FLOAT_DIVIDE_BY_ZERO ; set exception code
test al, FSW_ZERO_DIVIDE ; test for divide by zero
jnz short KiFE20 ; if nz, divide by zero
mov ecx, STATUS_FLOAT_INVALID_OPERATION ; set exception code
test al, FSW_DENORMAL ; test if denormal operand
jnz short KiFE20 ; if nz, denormal operand
mov ecx, STATUS_FLOAT_OVERFLOW ; set exception code
test al, FSW_OVERFLOW ; test if overflow
jnz short KiFE20 ; if nz, overflow
mov ecx, STATUS_FLOAT_UNDERFLOW ; set exception code
test al, FSW_UNDERFLOW ; test if underflow
jnz short KiFE20 ; if nz, underflow
mov ecx, STATUS_FLOAT_INEXACT_RESULT ; set exception code
test al, FSW_PRECISION ; test for inexact result
jz short KiFE30 ; if z, not inexact result
KiFE20: call KiExceptionDispatch ; dispatch exception - no return
;
; The previous mode was kernel mode or the cause of the exception is unknown.
;
KiFE30: mov edx, EXCEPTION_NPX_ERROR; set unexpected trap number
mov r10, TrRip[rbp] ; set parameter 5 to exception address
mov r9, cr4 ; set parameter 4 to control register 4
mov r8, cr0 ; set parameter 3 to control register 0
mov ecx, UNEXPECTED_KERNEL_MODE_TRAP ; set bugcheck code
call KiBugCheckDispatch ; bugcheck system - no return
nop ; fill - do not remove
TRAP_END KiFloatingErrorFault
subttl "Alignment Fault"
;++
;
; Routine Description:
;
; This routine is entered as the result of an attempted access to unaligned
; data.
;
; Arguments:
;
; The standard exception frame is pushed by hardware on the kernel stack.
; An error error code of zero is pushed on the stack.
;
; Disposition:
;
; A standard trap frame is constructed on the kernel stack, the exception
; parameters are loaded into registers, and the exception is dispatched via
; common code.
;
;--
TRAP_ENTRY KiAlignmentFault
GENERATE_TRAP_FRAME <ErrorCode> ; generate trap frame
mov ecx, STATUS_DATATYPE_MISALIGNMENT ; set exception code
xor edx, edx ; set number of parameters
mov r8, TrRip[rbp] ; set exception address
call KiExceptionDispatch ; dispatch exception - no return
nop ; fill - do not remove
TRAP_END KiAlignmentFault
subttl "Machine Check Abort"
;++
;
; Routine Description:
;
; This routine is entered as the result of a machine check. A switch to
; the machine check stack occurs before the exception frame is pushed on
; the stack.
;
; Arguments:
;
; The standard exception frame is pushed by hardware on the kernel stack.
; There is no error code for this exception.
;
; Disposition:
;
; A standard trap and exception frame are constructed on the kernel stack
; and the HAL is called to determine if the machine check abort is fatal.
; If the HAL call returns, then system operation is continued.
;
;--
TRAP_ENTRY KiMcheckAbort
.pushframe ; mark machine frame
alloc_stack 8 ; allocate dummy vector
push_reg rbp ; save nonvolatile register
GENERATE_INTERRUPT_FRAME <>, <Direct> ; generate interrupt frame
mov ecx, HIGH_LEVEL ; set IRQL value
ENTER_INTERRUPT <NoEoi>, <NoCount> ; raise IRQL and enable interrupts
;
; Check to determine if a recursive machine check has occurred. This can
; happen when machine check in progress is cleared and another machine
; check exception occurs before a complete exit from the below code can
; be performed.
;
lea rax, KTRAP_FRAME_LENGTH[rsp] ; get base stack address
cmp rax, TrRsp[rbp] ; check if with range
jbe short KiMC10 ; if be, old stack above base
sub rax, KERNEL_MCA_EXCEPTION_STACK_SIZE ; compute limit stack address
cmp rax, TrRsp[rbp] ; check if with range
jbe KiMC20 ; if be, old stack in range
KiMC10: call KxMcheckAbort ; call secondary routine
;
; Clear machine check in progress.
;
; N.B. This is done very late to ensure that the window whereby a recursive
; machine can occur is as small as possible. A recursive machine check
; reloads the machine stack pointer from the TSS and overwrites any
; information previously on the stack.
;
xor eax, eax ; clear machine check in progress
xor edx, edx ;
mov ecx, MSR_MCG_STATUS ;
wrmsr ;
EXIT_INTERRUPT <NoEoi>, <NoCount>, <Direct> ; lower IRQL and restore state
;
; A recursive machine check exception has occurred.
;
;
KiMC20: xor r10,r10 ; clear bugcheck parameters
xor r9, r9 ;
xor r8, r8 ;
xor edx, edx ;
mov ecx, RECURSIVE_MACHINE_CHECK ; set bugcheck code
call KiBugCheckDispatch ; bugcheck system - no return
nop ; fill - do not remove
TRAP_END KiMcheckAbort
;
; This routine generates an exception frame, then calls the HAL to process
; the machine check.
;
TRAP_ENTRY KxMcheckAbort
GENERATE_EXCEPTION_FRAME ; generate exception frame
lea rcx, (-128)[rbp] ; set trap frame address
mov rdx, rsp ; set exception frame address
call __imp_HalHandleMcheck ; give HAL a chance to handle mcheck
RESTORE_EXCEPTION_STATE ; restore exception state/deallocate
ret ; return
TRAP_END KxMcheckAbort
subttl "XMM Floating Error"
;++
;
; Routine Description:
;
; This routine is entered as the result of a XMM floating point fault.
;
; Arguments:
;
; The standard exception frame is pushed by hardware on the kernel stack.
; There is no error code for this exception.
;
; Disposition:
;
; A standard trap frame is constructed on the kernel stack, mode is user,
; then reason for the exception is determine, the exception parameters are
; loaded into registers, and the exception is dispatched via common code.
; If no reason can be determined for the exception, then bugcheck is called.
;
;--
TRAP_ENTRY KiXmmException
GENERATE_TRAP_FRAME <MxCsr> ; generate trap frame
mov cx, ax ; shift enables into position
shr cx, XSW_ERROR_SHIFT ;
and cx, XSW_ERROR_MASK ; isolate masked exceptions
not cx ; compute enabled exceptions
movzx r10d, ax ; set second exception parameter
and ax, cx ; isolate exceptions
mov edx, 2 ; set number of parameters
mov r8, TrRip[rbp] ; set exception address
xor r9, r9 ; set first exception parameter
cmp word ptr TrSegCs[rbp], KGDT64_R3_CMCODE or RPL_MASK ; legacy code?
je short KiXE15 ; if e, legacy code
;
; The XMM exception occurred in 64-bit code.
;
mov ecx, STATUS_FLOAT_INVALID_OPERATION ; set exception code
test al, XSW_INVALID_OPERATION ; test for invalid operation
jnz short KiXE10 ; if z, invalid operation
mov ecx, STATUS_FLOAT_DIVIDE_BY_ZERO ; set exception code
test al, XSW_ZERO_DIVIDE ; test for divide by zero
jnz short KiXE10 ; if nz, divide by zero
mov ecx, STATUS_FLOAT_INVALID_OPERATION ; set exception code
test al, XSW_DENORMAL ; test if denormal operand
jnz short KiXE10 ; if nz, denormal operand
mov ecx, STATUS_FLOAT_OVERFLOW ; set exception code
test al, XSW_OVERFLOW ; test if overflow
jnz short KiXE10 ; if nz, overflow
mov ecx, STATUS_FLOAT_UNDERFLOW ; set exception code
test al, XSW_UNDERFLOW ; test if underflow
jnz short KiXE10 ; if nz, underflow
mov ecx, STATUS_FLOAT_INEXACT_RESULT ; set exception code
test al, XSW_PRECISION ; test for inexact result
jz short KiXE20 ; if z, not inexact result
KiXE10: call KiExceptionDispatch ; dispatch exception - no return
;
; The XMM exception occurred in legacy 32-bit code
;
KiXE15: mov ecx, STATUS_FLOAT_MULTIPLE_TRAPS ; set exception code
test al, XSW_INVALID_OPERATION ; test for invalid operation
jnz short KiXE10 ; if z, invalid operation
test al, XSW_ZERO_DIVIDE ; test for divide by zero
jnz short KiXE10 ; if nz, divide by zero
test al, XSW_DENORMAL ; test if denormal operand
jnz short KiXE10 ; if nz, denormal operand
mov ecx, STATUS_FLOAT_MULTIPLE_FAULTS ; set exception code
test al, XSW_OVERFLOW ; test if overflow
jnz short KiXE10 ; if nz, overflow
test al, XSW_UNDERFLOW ; test if underflow
jnz short KiXE10 ; if nz, underflow
test al, XSW_PRECISION ; test for inexact result
jnz short KiXE10 ; if nz, inexact result
;
; The cause of the exception is unknown.
;
KiXE20: mov r10, TrRip[rbp] ; set parameter 5 to exception address
mov r9, cr4 ; set parameter 4 to control register 4
mov r8, cr0 ; set parameter 3 to control register 0
mov edx, EXCEPTION_NPX_OVERRUN ; set unexpected trap number
mov ecx, UNEXPECTED_KERNEL_MODE_TRAP ; set bugcheck code
call KiBugCheckDispatch ; bugcheck system - no return
nop ; fill - do not remove
TRAP_END KiXmmException
subttl "Raise Assertion Trap"
;++
;
; Routine Description:
;
; This routine is entered as the result of the execution of an int 2c
; instruction.
;
; Arguments:
;
; None.
;
; Disposition:
;
; A standard trap frame is constructed on the kernel stack, the exception
; arguments are loaded into registers, and the exception is dispatched via
; common code.
;
;--
TRAP_ENTRY KiRaiseAssertion
sub qword ptr MfRip[rsp], 2 ; convert trap to fault
GENERATE_TRAP_FRAME ; generate trap frame
mov ecx, STATUS_ASSERTION_FAILURE ; set exception code
xor edx, edx ; set number of parameters
mov r8, TrRip[rbp] ; set exception address
call KiExceptionDispatch ; dispatch exception - no return
nop ; fill - do not remove
TRAP_END KiRaiseAssertion
subttl "Debug Service Trap"
;++
;
; Routine Description:
;
; This routine is entered as the result of the execution of an int 2d
; instruction.
;
; Arguments:
;
; The standard exception frame is pushed by hardware on the kernel stack.
; There is no error code for this exception.
;
; Disposition:
;
; A standard trap frame is constructed on the kernel stack, the exception
; arguments are loaded into registers, and the exception is dispatched via
; common code.
;
;--
TRAP_ENTRY KiDebugServiceTrap
inc qword ptr MfRip[rsp] ; increment past int 3 instruction
GENERATE_TRAP_FRAME ; generate trap frame
mov ecx, STATUS_BREAKPOINT ; set exception code
mov edx, 1 ; set number of parameters
mov r9, TrRax[rbp] ; set parameter 1 value
mov r8, TrRip[rbp] ; set exception address
call KiExceptionDispatch ; dispatch exception - no return
nop ; fill - do not remove
TRAP_END KiDebugServiceTrap
subttl "System Service Call 32-bit"
;++
;
; Routine Description:
;
; This routine gains control when a system call instruction is executed
; from 32-bit mode. System service calls from 32-bit code are not supported
; and this exception is turned into an invalid opcode fault.
;
; N.B. This routine is never entered from kernel mode and it executed with
; interrupts disabled.
;
; Arguments:
;
; The standard exception frame is pushed on the stack.
;
; Return Value:
;
; A standard trap frame is constructed on the kernel stack, the exception
; parameters are loaded into registers, and the exception is dispatched via
; common code.
;
;--
TRAP_ENTRY KiSystemCall32
swapgs ; swap GS base to kernel PCR
mov gs:[PcUserRsp], rsp ; save user stack pointer
mov rsp, gs:[PcRspBase] ; set kernel stack pointer
push KGDT64_R3_DATA or RPL_MASK ; push 32-bit SS selector
push gs:[PcUserRsp] ; push user stack pointer
push r11 ; push previous EFLAGS
push KGDT64_R3_CMCODE or RPL_MASK ; push dummy 32-bit CS selector
push rcx ; push return address
swapgs ; swap GS base to user TEB
GENERATE_TRAP_FRAME ; generate trap frame
mov ecx, STATUS_ILLEGAL_INSTRUCTION ; set exception code
xor edx, edx ; set number of parameters
mov r8, TrRip[rbp] ; set exception address
call KiExceptionDispatch ; dispatch exception - no return
nop ; fill - do not remove
TRAP_END KiSystemCall32
subttl "System Service Exception Handler"
;++
;
; EXCEPTION_DISPOSITION
; KiSystemServiceHandler (
; IN PEXCEPTION_RECORD ExceptionRecord,
; IN PVOID EstablisherFrame,
; IN OUT PCONTEXT ContextRecord,
; IN OUT PDISPATCHER_CONTEXT DispatcherContext
; )
;
; Routine Description:
;
; This routine is the exception handler for the system service dispatcher.
;
; If an unwind is being performed and the system service dispatcher is
; the target of the unwind, then an exception occured while attempting
; to copy the user's in-memory argument list. Control is transferred to
; the system service exit by return a continue execution disposition
; value.
;
; If an unwind is being performed and the previous mode is user, then
; bugcheck is called to crash the system. It is not valid to unwind
; out of a system service into user mode.
;
; If an unwind is being performed and the previous mode is kernel, then
; the previous mode field from the trap frame is restored to the thread
; object.
;
; If an exception is being raised and the exception PC is the address
; of the system service dispatcher in-memory argument copy code, then an
; unwind to the system service exit code is initiated.
;
; If an exception is being raised and the exception PC is not within
; the range of the system service dispatcher, and the previous mode is
; not user, then a continue search disposition value is returned. Otherwise,
; a system service has failed to handle an exception and bugcheck is
; called. It is invalid for a system service not to handle all exceptions
; that can be raised in the service.
;
; Arguments:
;
; ExceptionRecord (rcx) - Supplies a pointer to an exception record.
;
; EstablisherFrame (rdx) - Supplies the frame pointer of the establisher
; of this exception handler.
;
; ContextRecord (r8) - Supplies a pointer to a context record.
;
; DispatcherContext (r9) - Supplies a pointer to the dispatcher context
; record.
;
; Return Value:
;
; If bugcheck is called, there is no return from this routine and the
; system is crashed. If an exception occured while attempting to copy
; the user in-memory argument list, then there is no return from this
; routine, and unwind is called. Otherwise, ExceptionContinueSearch is
; returned as the function value.
;
;--
ShFrame struct
P1Home dq ? ; parameter home addresses
P2Home dq ? ;
P3Home dq ? ;
P4Home dq ? ;
P5Home dq ? ;
P6Home dq ? ;
Fill dq ? ;
ShFrame ends
TRAP_ENTRY KiSystemServiceHandler
alloc_stack (sizeof ShFrame) ; allocate stack frame
END_PROLOGUE
test dword ptr ErExceptionFlags[rcx], EXCEPTION_UNWIND ; test for unwind
jnz KiSH30 ; if nz, unwind in progress
;
; An exception is in progress.
;
; If the exception PC is the address of the GDI TEB access, then call unwind
; to transfer control to the system service exit code. Otherwise, check if
; the exception PC is the address of the in memory argument copy code for
; the system service dispatcher. If the exception PC is within the range of
; the in memory copy code, then call unwind to transfer control to the
; system service exit code. Otherwise, check if the previous mode is user
; or kernel mode.
;
lea rax, KiSystemServiceGdiTebAccess ; get GDI TEB access address
cmp rax, ErExceptionAddress[rcx] ; check if address match
je short KiSH05 ; if e, address match
lea rax, KiSystemServiceCopyStart ; get copy code start address
cmp rax, ErExceptionAddress[rcx] ; check if address in range
ja short KiSH10 ; if a, address not is range
lea rax, KiSystemServiceCopyEnd ; get copy code end address
cmp rax, ErExceptionAddress[rcx] ; check if address match
jbe short KiSH10 ; if be, address not in range
;
; The exception was raised by the system service dispatcher GDI TEB access
; code or the argument copy code. Unwind to the system service exit with the
; exception status code as the return value.
;
KiSH05: and ShFrame.P6Home[rsp], 0 ; clear address of history table
mov ShFrame.P5Home[rsp], r8 ; set address of context record
mov r9d, ErExceptionCode[rcx] ; set return value
mov r8, rcx ; set address of exception record
mov rcx, rdx ; set target frame address
lea rdx, KiSystemServiceExit ; set target IP address
call RtlUnwindEx ; unwind - no return
;
; If the previous mode was kernel mode, then the continue the search for an
; exception handler. Otherwise, bugcheck the system.
;
KiSH10: mov rax, gs:[PcCurrentThread] ; get current thread address
cmp byte ptr ThPreviousMode[rax], KernelMode ; check for kernel mode
je short KiSH20 ; if e, previous mode kernel
;
; Previous mode is user mode - bugcheck the system.
;
xor r10, r10 ; zero parameter 5
mov r9, r8 ; set context record address
mov r8, ErExceptionAddress[rcx] ; set exception address
mov edx, ErExceptionCode[rcx] ; set exception code
mov ecx, SYSTEM_SERVICE_EXCEPTION ; set bugcheck code
call KiBugCheckDispatch ; bugcheck system - no return
;
; Previous mode is kernel mode - continue search for a handler.
;
KiSH20: mov eax, ExceptionContinueSearch ; set return value
add rsp, sizeof ShFrame ; deallocate stack frame
ret ; return
;
; An unwind is in progress.
;
; If a target unwind is being performed, then continue the unwind operation.
; Otherwise, check if the previous mode is user or kernel mode.
;
KiSH30: test dword ptr ErExceptionFlags[rcx], EXCEPTION_TARGET_UNWIND ; test for target unwind
jnz short KiSH20 ; if nz, target unwind in progress
;
; If the previous mode was kernel mode, then restore the previous mode and
; continue the unwind operation. Otherwise, bugcheck the system.
;
mov rax, gs:[PcCurrentThread] ; get current thread address
cmp byte ptr ThPreviousMode[rax], KernelMode ; check for kernel mode
je short KiSH40 ; if e, previous mode kernel
;
; Previous mode was user mode - bugcheck the system.
;
mov ecx, SYSTEM_UNWIND_PREVIOUS_USER ; set bugcheck code
call KiBugCheckDispatch ; bugcheck system - no return
;
; Previous mode is kernel mode - restore previous mode and continue unwind
; operation.
;
KiSH40: mov rcx, ThTrapFrame[rax] ; get current trap frame address
mov rdx, TrTrapFrame + 128[rcx] ; restore previous trap frame address
mov ThTrapFrame[rax], rdx ;
mov dl, TrPreviousMode + 128[rcx] ; restore previous mode
mov ThPreviousMode[rax], dl ;
jmp short KiSH20 ; finish in common code
TRAP_END KiSystemServiceHandler
subttl "System Service Internal"
;++
;
; VOID
; KiServiceInternal (
; VOID
; )
;
; Routine Description:
;
; This function is called to provide the linkage between an internally
; called system service and the system service dispatcher.
;
; N.B. It is known that the previous mode was kernel and interrupts are
; disabled.
;
; Arguments:
;
; eax - Supplies the system service number.
;
; rcx, rdx, r8, and r9 supply the service register arguments.
;
; Return value:
;
; None.
;
;--
TRAP_ENTRY KiServiceInternal
push_frame ; mark machine frame
alloc_stack 8 ; allocate dummy error code
push_reg rbp ; save standard register
alloc_stack (KTRAP_FRAME_LENGTH - (7 * 8)) ; allocate fixed frame
set_frame rbp, 128 ; set frame pointer
mov TrRbx[rbp], rbx ; save nonvolatile registers
.savereg rbx, (TrRbx + 128) ;
mov TrRdi[rbp], rdi ;
.savereg rdi, (TrRdi + 128) ;
mov TrRsi[rbp], rsi ;
.savereg rsi, (TrRsi + 128) ;
END_PROLOGUE
sti ; enable interrupts
mov rbx, gs:[PcCurrentThread] ; get current thread address
prefetchw ThTrapFrame[rbx] ; prefetch with write intent
movzx edi, byte ptr ThPreviousMode[rbx] ; save previous mode in trap frame
mov TrPreviousMode[rbp], dil ;
mov byte ptr ThPreviousMode[rbx], KernelMode ; set thread previous mode
mov r10, ThTrapFrame[rbx] ; save previous frame pointer address
mov TrTrapFrame[rbp], r10 ;
;
; N.B. The below code uses an unusual sequence to transfer control. This
; instruction sequence is required to avoid detection as an epilogue.
;
lea r11, KiSystemServiceStart ; get address of service start
jmp r11 ; finish in common code
TRAP_END KiServiceInternal
subttl "System Service Call 64-bit"
;++
;
; Routine Description:
;
; This routine gains control when a system call instruction is executed
; from 64-bit mode. The specified system service is executed by locating
; its routine address in system service dispatch table and calling the
; specified function.
;
; N.B. This routine is never entered from kernel mode and it executed with
; interrupts disabled.
;
; Arguments:
;
; eax - Supplies the system service number.
;
; Return Value:
;
; eax - System service status code.
;
; r10, rdx, r8, and r9 - Supply the first four system call arguments.
;
; rcx - Supplies the RIP of the system call.
;
; r11 - Supplies the previous EFLAGS.
;
;--
TRAP_ENTRY KiSystemCall64, KiSystemServiceHandler
swapgs ; swap GS base to kernel PCR
mov gs:[PcUserRsp], rsp ; save user stack pointer
mov rsp, gs:[PcRspBase] ; set kernel stack pointer
push KGDT64_R3_DATA or RPL_MASK ; push dummy SS selector
push gs:[PcUserRsp] ; push user stack pointer
push r11 ; push previous EFLAGS
push KGDT64_R3_CODE or RPL_MASK ; push dummy 64-bit CS selector
push rcx ; push return address
mov rcx, r10 ; set first argument value
push_frame ; mark machine frame
alloc_stack 8 ; allocate dummy error code
push_reg rbp ; save standard register
alloc_stack (KTRAP_FRAME_LENGTH - (7 * 8)) ; allocate fixed frame
set_frame rbp, 128 ; set frame pointer
mov TrRbx[rbp], rbx ; save nonvolatile registers
.savereg rbx, (TrRbx + 128) ;
mov TrRdi[rbp], rdi ;
.savereg rdi, (TrRdi + 128) ;
mov TrRsi[rbp], rsi ;
.savereg rsi, (TrRsi + 128) ;
END_PROLOGUE
mov byte ptr TrExceptionActive[rbp], 2 ; set service active
mov rbx, gs:[PcCurrentThread] ; get current thread address
prefetchw ThTrapFrame[rbx] ; prefetch with write intent
stmxcsr TrMxCsr[rbp] ; save current MXCSR
ldmxcsr gs:[PcMxCsr] ; set default MXCSR
test byte ptr ThDebugActive[rbx], TRUE ; test if debug enabled
mov word ptr TrDr7[rbp], 0 ; assume debug not enabled
jz short KiSS05 ; if z, debug not enabled
mov TrRax[rbp], rax ; save service argument registers
mov TrRcx[rbp], rcx ;
mov TrRdx[rbp], rdx ;
mov TrR8[rbp], r8 ;
mov TrR9[rbp], r9 ;
call KiSaveDebugRegisterState ; save user debug registers
mov rax, TrRax[rbp] ; restore service argument registers
mov rcx, TrRcx[rbp] ;
mov rdx, TrRdx[rbp] ;
mov r8, TrR8[rbp] ;
mov r9, TrR9[rbp] ;
align 16
KiSS05: sti ; enable interrupts
if DBG
cmp byte ptr ThPreviousMode[rbx], UserMode ; check previous mode
je short @f ; if e, previous mode set to user
int 3 ;
@@: ;
endif
;
; Dispatch system service.
;
; eax - Supplies the system service number.
; rbx - Supplies the current thread address.
; rcx - Supplies the first argument if present.
; rdx - Supplies the second argument if present.
; r8 - Supplies the third argument if present.
; r9 - Supplies the fourth argument if present.
;
ALTERNATE_ENTRY KiSystemServiceStart
mov ThTrapFrame[rbx], rsp ; set current frame pointer address
mov edi, eax ; copy system service number
shr edi, SERVICE_TABLE_SHIFT ; isolate service table number
and edi, SERVICE_TABLE_MASK ;
and eax, SERVICE_NUMBER_MASK ; isolate service table offset
;
; Repeat system service after attempt to convert to GUI thread.
;
ALTERNATE_ENTRY KiSystemServiceRepeat
;
; If the specified system service number is not within range, then attempt
; to convert the thread to a GUI thread and retry the service dispatch.
;
mov r10, ThServiceTable + ThBase[rbx + rdi] ; get table base address
cmp eax, ThServiceTable + ThLimit[rbx + rdi] ; check if valid service
jae KiSS50 ; if ae, not valid service
movsxd r11, dword ptr [r10 + rax * 4] ; get system service offset
add r10, r11 ; add table base to
;
; If the service is a GUI service and the GDI user batch queue is not empty,
; then flush the GDI user batch queue.
;
cmp edi, SERVICE_TABLE_TEST ; check if GUI service
jne short KiSS10 ; if ne, not GUI service
mov r11, ThTeb[rbx] ; get user TEB address
ALTERNATE_ENTRY KiSystemServiceGdiTebAccess
cmp dword ptr TeGdiBatchCount[r11], 0 ; check batch queue depth
je short KiSS10 ; if e, batch queue empty
mov TrRcx[rbp], rcx ; save system service arguments
mov TrRdx[rbp], rdx ;
mov rbx, r8 ;
mov rdi, r9 ;
mov rsi, r10 ; save system service address
call KeGdiFlushUserBatch ; call flush GDI user batch routine
mov rcx, TrRcx[rbp] ; restore system service arguments
mov rdx, TrRdx[rbp] ;
mov r8, rbx ;
mov r9, rdi ;
mov r10, rsi ; restore system service address
;
; Check if system service has any in memory arguments.
;
align 16
KiSS10: mov eax, r10d ; isolate number of in memory arguments
and eax, 15 ;
jz KiSS30 ; if z, no in memory arguments
sub r10, rax ; compute actual function address
shl eax, 3 ; compute argument bytes for dispatch
lea rsp, (-14 * 8)[rsp] ; allocate stack argument area
lea rdi, (3 * 8)[rsp] ; compute copy destination address
mov rsi, TrRsp[rbp] ; get previous stack address
lea rsi, (4 * 8)[rsi] ; compute copy source address
test byte ptr TrSegCs[rbp], MODE_MASK ; check if previous mode user
jz short KiSS20 ; if z, previous mode kernel
cmp rsi, MmUserProbeAddress ; check if source address in range
cmovae rsi, MmUserProbeAddress ; if ae, reset copy source address
;
; The following code is very carefully optimized so there is exactly 8 bytes
; of code for each argument move.
;
; N.B. The source and destination registers are biased by 8 bytes.
;
; N.B. Four additional arguments are specified in registers.
;
align 16
KiSS20: lea r11, KiSystemServiceCopyEnd ; get copy ending address
sub r11, rax ; substract number of bytes to copy
jmp r11 ;
align 16
ALTERNATE_ENTRY KiSystemServiceCopyStart
mov rax, 112[rsi] ; copy fourteenth argument
mov 112[rdi], rax ;
mov rax, 104[rsi] ; copy thirteenth argument
mov 104[rdi], rax ;
mov rax, 96[rsi] ; copy twelfth argument
mov 96[rdi], rax ;
mov rax, 88[rsi] ; copy eleventh argument
mov 88[rdi], rax ;
mov rax, 80[rsi] ; copy tenth argument
mov 80[rdi], rax ;
mov rax, 72[rsi] ; copy nineth argument
mov 72[rdi], rax ;
mov rax, 64[rsi] ; copy eighth argument
mov 64[rdi], rax ;
mov rax, 56[rsi] ; copy seventh argument
mov 56[rdi], rax ;
mov rax, 48[rsi] ; copy sixth argument
mov 48[rdi], rax ;
mov rax, 40[rsi] ; copy fifth argument
mov 40[rdi], rax ;
mov rax, 32[rsi] ; copy fourth argument
mov 32[rdi], rax ;
mov rax, 24[rsi] ; copy third argument
mov 24[rdi], rax ;
mov rax, 16[rsi] ; copy second argument
mov 16[rdi], rax ;
mov rax, 8[rsi] ; copy first argument
mov 8[rdi], rax ;
ALTERNATE_ENTRY KiSystemServiceCopyEnd
;
; Call system service.
;
KiSS30: ;
call r10 ; call system service
inc dword ptr gs:[PcSystemCalls] ; increment number of system calls
;
; System service exit.
;
; eax - Supplies the system service status.
;
; rbp - Supplies the address of the trap frame.
;
; N.B. It is possible that the values of rsi, rdi, and rbx have been destroyed
; and, therefore, they cannot be used in the system service exit sequence.
; This can happen on a failed attempt to raise an exception via a system
; service.
;
ALTERNATE_ENTRY KiSystemServiceExit
mov rbx, TrRbx[rbp] ; restore extra registers
mov rdi, TrRdi[rbp] ;
mov rsi, TrRsi[rbp] ;
test byte ptr TrSegCs[rbp], MODE_MASK ; test if previous mode user
jz KiSS40 ; if z, previous mode not user
;
; Check if the current IRQL is above passive level.
;
if DBG
xor r9, r9 ; clear parameter value
mov r8, cr8 ; get current IRQL
or r8, r8 ; check if IRQL is passive level
mov ecx, IRQL_GT_ZERO_AT_SYSTEM_SERVICE ; set bugcheck code
jnz short KiSS33 ; if nz, IRQL not passive level
;
; Check if kernel APCs are disabled or a process is attached.
;
mov rcx, gs:[PcCurrentThread] ; get current thread address
movzx r8d, byte ptr ThApcStateIndex[rcx] ; get APC state index
mov r9d, ThCombinedApcDisable[rcx] ; get kernel APC disable
or r9d, r9d ; check if kernel APCs disabled
jnz short KiSS32 ; if nz, Kernel APCs disabled
or r8d, r8d ; check if process attached
jz short KiSS37 ; if z, process not attached
KiSS32: mov ecx, APC_INDEX_MISMATCH ; set bugcheck code
KiSS33: mov rdx, TrRip[rbp] ; set system call address
mov r10, rbp ; set trap frame address
call KiBugCheckDispatch ; bugcheck system - no return
endif
KiSS37: RESTORE_TRAP_STATE <Service> ; restore trap state/exit to user mode
KiSS40: mov rcx, gs:[PcCurrentThread] ; get current thread address
mov rdx, TrTrapFrame[rbp] ; restore previous trap frame address
mov ThTrapFrame[rcx], rdx ;
mov dl, TrPreviousMode[rbp] ; restore previous mode
mov ThPreviousMode[rcx], dl ;
RESTORE_TRAP_STATE <Kernel> ; restore trap state/exit to kernel mode
;
; The specified system service number is not within range. Attempt to convert
; the thread to a GUI thread if the specified system service is a GUI service
; and the thread has not already been converted to a GUI thread.
;
; N.B. Convert to GUI thread will not overwrite the parameter home area.
;
KiSS50: cmp edi, SERVICE_TABLE_TEST ; check if GUI service
jne KiSS60 ; if ne, not GUI service
mov TrP1Home[rbp], eax ; save system service number
mov TrP2Home[rbp], rcx ; save system service arguments
mov TrP3Home[rbp], rdx ;
mov TrP4Home[rbp], r8 ;
mov TrP5[rbp], r9 ;
call KiConvertToGuiThread ; attempt to convert to GUI thread
or eax, eax ; check if service was successful
mov eax, TrP1Home[rbp] ; restore system service number
mov rcx, TrP2Home[rbp] ; restore system service arguments
mov rdx, TrP3Home[rbp] ;
mov r8, TrP4Home[rbp] ;
mov r9, TrP5[rbp] ;
mov ThTrapFrame[rbx], rsp ; set current frame pointer address
jz KiSystemServiceRepeat ; if z, successful conversion to GUI
;
; The conversion to a GUI thread failed. The correct return value is encoded
; in a byte table indexed by the service number that is at the end of the
; service address table. The encoding is as follows:
;
; 0 - return 0.
; -1 - return -1.
; 1 - return status code.
;
lea rdi, KeServiceDescriptorTableShadow + SdLength ;
mov esi, SdLimit[rdi] ; get service table limit
mov rdi, SdBase[rdi] ; get service table base
lea rdi, [rdi + rsi * 4] ; get ending service table address
movsx eax, byte ptr [rdi + rax] ; get status byte value
or eax, eax ; check for 0 or - 1
jle KiSystemServiceExit ; if le, return status byte value
KiSS60: mov eax, STATUS_INVALID_SYSTEM_SERVICE ; set return status
jmp KiSystemServiceExit ; finish in common code
TRAP_END KiSystemCall64
subttl "Common Bugcheck Dispatch"
;++
;
; Routine Description:
;
; This routine allocates an exception frame on stack, saves nonvolatile
; machine state, and calls the system bugcheck code.
;
; N.B. It is the responsibility of the caller to initialize the exception
; record.
;
; Arguments:
;
; ecx - Supplies the bugcheck code.
;
; rdx to r10 - Supplies the bugcheck parameters.
;
; Return Value:
;
; There is no return from this function.
;
;--
TRAP_ENTRY KiBugCheckDispatch
GENERATE_EXCEPTION_FRAME ; generate exception frame
mov ExP5[rsp], r10 ; save parameter 5
call KeBugCheckEx ; bugcheck system - not return
nop ; fill - do not remove
TRAP_END KiBugCheckDispatch
subttl "Common Exception Dispatch"
;++
;
; Routine Description:
;
; This routine allocates an exception frame on stack, saves nonvolatile
; machine state, and calls the system exception dispatcher.
;
; N.B. It is the responsibility of the caller to initialize the exception
; record.
;
; Arguments:
;
; ecx - Supplies the exception code.
;
; edx - Supplies the number of parameters.
;
; r8 - Supplies the exception address.
;
; r9 - r11 - Supply the exception parameters.
;
; rbp - Supplies a pointer to the trap frame.
;
; rsp - Supplies a pointer to the trap frame.
;
; Return Value:
;
; There is no return from this function.
;
;--
TRAP_ENTRY KiExceptionDispatch
GENERATE_EXCEPTION_FRAME ; generate exception frame
lea rax, ExExceptionRecord[rsp] ; get exception record address
mov ErExceptionCode[rax], ecx ; set exception code
xor ecx, ecx ;
mov dword ptr ErExceptionFlags[rax], ecx ; clear exception flags
mov ErExceptionRecord[rax], rcx ; clear exception record address
mov ErExceptionAddress[rax], r8 ; set exception address
mov ErNumberParameters[rax], edx ; set number of parameters
mov ErExceptionInformation[rax], r9 ; set exception parameters
mov ErExceptionInformation + 8[rax], r10 ;
mov ErExceptionInformation + 16[rax], r11 ;
mov r9b, TrSegCs[rbp] ; isolate previous mode
and r9b, MODE_MASK ;
mov byte ptr ExP5[rsp], TRUE ; set first chance parameter
lea r8, (-128)[rbp] ; set trap frame address
mov rdx, rsp ; set exception frame address
mov rcx, rax ; set exception record address
call KiDispatchException ; dispatch exception
subttl "Common Exception Exit"
;++
;
; Routine Description:
;
; This routine is called to exit an exception.
;
; N.B. This transfer of control occurs from:
;
; 1. a fall through from above.
; 2. the exit from a continue system service.
; 3. the exit form a raise exception system service.
; 4. the exit into user mode from thread startup.
;
; N.B. Control is transferred to this code via a jump.
;
; Arguments:
;
; rbp - Supplies the address of the trap frame.
;
; rsp - Supplies the address of the exception frame.
;
; Return Value:
;
; Function does not return.
;
;--
ALTERNATE_ENTRY KiExceptionExit
RESTORE_EXCEPTION_STATE <NoPop> ; restore exception state/deallocate
RESTORE_TRAP_STATE <Volatile> ; restore trap state and exit
TRAP_END KiExceptionDispatch
subttl "System Service Linkage"
;++
;
; VOID
; KiServiceLinkage (
; VOID
; )
;
; Routine Description:
;
; This is a dummay function that only exists to make trace back through
; a kernel mode to kernel mode system call work.
; Arguments:
;
; None.
;
; Return value:
;
; None.
;
;--
TRAP_ENTRY KiServiceLinkage
.allocstack 0
END_PROLOGUE
ret ;
TRAP_END KiServiceLinkage
end
|
programs/oeis/142/A142994.asm | neoneye/loda | 22 | 99698 | ; A142994: Crystal ball sequence for the lattice C_5.
; 1,51,501,2471,8361,22363,50973,103503,192593,334723,550725,866295,1312505,1926315,2751085,3837087,5242017,7031507,9279637,12069447,15493449,19654139,24664509,30648559,37741809,46091811,55858661,67215511,80349081,95460171,112764173,132491583,154888513,180217203,208756533,240802535,276668905,316687515,361208925,410602895,465258897,525586627,592016517,665000247,745011257,832545259,928120749,1032279519,1145587169,1268633619,1402033621,1546427271,1702480521,1870885691,2052361981,2247655983,2457542193,2682823523,2924331813,3182928343,3459504345,3754981515,4070312525,4406481535,4764504705,5145430707,5550341237,5980351527,6436610857,6920303067,7432647069,7974897359,8548344529,9154315779,9794175429,10469325431,11181205881,11931295531,12721112301,13552213791,14426197793,15344702803,16309408533,17322036423,18384350153,19498156155,20665304125,21887687535,23167244145,24505956515,25905852517,27369005847,28897536537,30493611467,32159444877,33897298879,35709483969,37598359539,39566334389,41615867239
mul $0,2
add $0,1
seq $0,69038 ; Expansion of x*(1+x)^4/(1-x)^6.
|
libsrc/_DEVELOPMENT/adt/b_vector/c/sccz80/b_vector_insert_n.asm | RC2014Z80/z88dk | 8 | 166414 |
; size_t b_vector_insert_n(b_vector_t *v, size_t idx, size_t n, int c)
SECTION code_clib
SECTION code_adt_b_vector
PUBLIC b_vector_insert_n
EXTERN asm_b_vector_insert_n
b_vector_insert_n:
pop ix
pop de
ld a,e
pop de
pop bc
pop hl
push hl
push bc
push de
push de
push ix
jp asm_b_vector_insert_n
|
model/dsl/src/main/antlr4/MetaModel.g4 | LudovicThesis/PTMART | 0 | 353 | /**
* Copyright 2017 <NAME>. All rights reserved.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
grammar MetaModel;
fragment ESC : '\\' (["\\/bfnrt] | UNICODE) ;
fragment UNICODE : 'u' HEX HEX HEX HEX ;
fragment HEX : [0-9a-fA-F] ;
STRING : '"' (ESC | ~["\\])* '"' | '\'' (ESC | ~["\\])* '\'' ;
IDENT : [a-zA-Z_][a-zA-Z_0-9]*;
TYPE_NAME : [a-zA-Z_][.a-zA-Z_0-9]*;
NUMBER : [\-]?[0-9]+'.'?[0-9]*;
WS : ([ \t\r\n]+ | SL_COMMENT) -> skip ; // skip spaces, tabs, newlines
SL_COMMENT : '//' ~('\r' | '\n')* ;
metamodel: (enumDeclr | classDeclr | indexDeclr)*;
indexDeclr : 'index' IDENT ':' (TYPE_NAME|IDENT) '{' indexLiterals '}';
indexLiterals : IDENT (',' IDENT)*;
enumDeclr : 'enum' (TYPE_NAME|IDENT) '{' enumLiterals '}';
enumLiterals : IDENT (',' IDENT)*;
classDeclr : 'class' (TYPE_NAME|IDENT) parentsDeclr? '{' (attributeDeclaration | relationDeclaration)* '}';
parentsDeclr : 'extends' (TYPE_NAME|IDENT);
//semanticDeclr : '{' (semanticUsing | semanticFrom | semanticWith )* '}' ;
//semanticWith : 'with' IDENT (STRING|NUMBER);
//semanticUsing : 'using' STRING;
//semanticFrom : 'from' STRING;
//annotation : ('learned' | 'derived' | 'global');
annotation: ('continuous' | 'monitorSeparation'); // put as with
attributeType : 'String' | 'Double' | 'Long' | 'Integer' | 'Boolean' | TYPE_NAME;
attributeDeclaration : /*annotation**/ 'att' IDENT ':' attributeType /*semanticDeclr?*/ ('{' (annotation (',' annotation)*)? '}')?;
relationDeclaration : /*annotation**/ 'rel' IDENT ':' (TYPE_NAME|IDENT) /*semanticDeclr?*/ ;
|
audio/Venus.asm | AleffCorrea/BrickBreaker | 4 | 2126 | <filename>audio/Venus.asm
;this file for FamiTone2 library generated by text2data tool
Venus_music_data:
.db 1
.dw .instruments
.dw .samples-3
.dw .song0ch0,.song0ch1,.song0ch2,.song0ch3,.song0ch4,409,341
.instruments:
.db $30 ;instrument $00
.dw .env3,.env0,.env0
.db $00
.db $30 ;instrument $02
.dw .env1,.env0,.env0
.db $00
.db $30 ;instrument $04
.dw .env2,.env6,.env0
.db $00
.db $30 ;instrument $08
.dw .env4,.env7,.env0
.db $00
.db $30 ;instrument $0d
.dw .env3,.env0,.env0
.db $00
.db $30 ;instrument $12
.dw .env5,.env0,.env0
.db $00
.samples:
.db $00+FT_DPCM_PTR,$00,$00 ;1
.db $00+FT_DPCM_PTR,$00,$00 ;2
.db $00+FT_DPCM_PTR,$00,$00 ;3
.db $00+FT_DPCM_PTR,$00,$00 ;4
.db $00+FT_DPCM_PTR,$00,$00 ;5
.db $00+FT_DPCM_PTR,$00,$00 ;6
.db $00+FT_DPCM_PTR,$00,$00 ;7
.db $00+FT_DPCM_PTR,$00,$00 ;8
.db $00+FT_DPCM_PTR,$00,$00 ;9
.db $00+FT_DPCM_PTR,$00,$00 ;10
.db $00+FT_DPCM_PTR,$00,$00 ;11
.db $00+FT_DPCM_PTR,$00,$00 ;12
.db $00+FT_DPCM_PTR,$00,$00 ;13
.db $00+FT_DPCM_PTR,$00,$00 ;14
.db $00+FT_DPCM_PTR,$00,$00 ;15
.db $00+FT_DPCM_PTR,$00,$00 ;16
.db $00+FT_DPCM_PTR,$00,$00 ;17
.db $00+FT_DPCM_PTR,$00,$00 ;18
.db $00+FT_DPCM_PTR,$00,$00 ;19
.db $00+FT_DPCM_PTR,$00,$00 ;20
.db $00+FT_DPCM_PTR,$00,$00 ;21
.db $00+FT_DPCM_PTR,$00,$00 ;22
.db $00+FT_DPCM_PTR,$00,$00 ;23
.db $00+FT_DPCM_PTR,$00,$00 ;24
.db $00+FT_DPCM_PTR,$27,$0f ;25
.db $00+FT_DPCM_PTR,$00,$00 ;26
.db $0a+FT_DPCM_PTR,$4c,$0f ;27
.db $00+FT_DPCM_PTR,$00,$00 ;28
.db $1e+FT_DPCM_PTR,$2d,$0f ;29
.db $2a+FT_DPCM_PTR,$77,$0f ;30
.db $00+FT_DPCM_PTR,$00,$00 ;31
.db $00+FT_DPCM_PTR,$00,$00 ;32
.db $00+FT_DPCM_PTR,$00,$00 ;33
.db $00+FT_DPCM_PTR,$00,$00 ;34
.db $00+FT_DPCM_PTR,$00,$00 ;35
.db $00+FT_DPCM_PTR,$00,$00 ;36
.db $00+FT_DPCM_PTR,$00,$00 ;37
.db $00+FT_DPCM_PTR,$00,$00 ;38
.db $00+FT_DPCM_PTR,$00,$00 ;39
.db $00+FT_DPCM_PTR,$00,$00 ;40
.db $00+FT_DPCM_PTR,$00,$00 ;41
.db $00+FT_DPCM_PTR,$00,$00 ;42
.db $00+FT_DPCM_PTR,$00,$00 ;43
.db $00+FT_DPCM_PTR,$00,$00 ;44
.db $00+FT_DPCM_PTR,$00,$00 ;45
.db $00+FT_DPCM_PTR,$00,$00 ;46
.db $00+FT_DPCM_PTR,$00,$00 ;47
.db $00+FT_DPCM_PTR,$00,$00 ;48
.db $00+FT_DPCM_PTR,$00,$00 ;49
.db $00+FT_DPCM_PTR,$00,$00 ;50
.db $00+FT_DPCM_PTR,$00,$00 ;51
.db $00+FT_DPCM_PTR,$00,$00 ;52
.db $00+FT_DPCM_PTR,$00,$00 ;53
.db $00+FT_DPCM_PTR,$00,$00 ;54
.db $00+FT_DPCM_PTR,$00,$00 ;55
.db $00+FT_DPCM_PTR,$00,$00 ;56
.db $00+FT_DPCM_PTR,$00,$00 ;57
.db $00+FT_DPCM_PTR,$00,$00 ;58
.db $00+FT_DPCM_PTR,$00,$00 ;59
.db $00+FT_DPCM_PTR,$00,$00 ;60
.db $00+FT_DPCM_PTR,$00,$00 ;61
.db $00+FT_DPCM_PTR,$00,$00 ;62
.db $00+FT_DPCM_PTR,$00,$00 ;63
.env0:
.db $c0,$00,$00
.env1:
.db $cc,$c9,$c6,$c4,$c2,$c0,$00,$05
.env2:
.db $cc,$c9,$c9,$c8,$02,$c6,$c5,$c5,$c4,$c4,$c3,$c2,$c1,$c1,$c0,$00
.db $0e
.env3:
.db $cf,$00,$00
.env4:
.db $cc,$03,$cb,$02,$ca,$ca,$c9,$c6,$04,$c5,$05,$c4,$05,$c3,$05,$c2
.db $05,$c1,$04,$c0,$00,$13
.env5:
.db $cf,$ce,$cd,$cd,$cc,$cb,$ca,$ca,$c9,$02,$c8,$c7,$c6,$c6,$c5,$02
.db $c4,$c3,$c2,$02,$c1,$04,$c0,$00,$16
.env6:
.db $c0,$02,$c1,$02,$c2,$00,$04
.env7:
.db $c0,$c0,$c4,$00,$02
.song0ch0:
.db $fb,$08
.song0ch0loop:
.ref0:
.db $8a,$4a,$40,$38,$32,$4a,$40,$38,$32,$4a,$40,$38,$32,$4a,$40,$38
.db $32,$40,$36,$2e,$28,$40,$36,$2e,$28,$40,$36,$2e,$28,$40,$36,$2e
.db $28
.ref1:
.db $42,$38,$2e,$2a,$42,$38,$2e,$2a,$42,$38,$2e,$2a,$42,$38,$2e,$2a
.db $3c,$32,$2a,$24,$3c,$32,$2a,$24,$3c,$32,$2a,$24,$3c,$32,$2a,$24
.ref2:
.db $4a,$40,$38,$32,$4a,$40,$38,$32,$4a,$40,$38,$32,$4a,$40,$38,$32
.db $40,$36,$2e,$28,$40,$36,$2e,$28,$40,$36,$2e,$28,$40,$36,$2e,$28
.db $ff,$20
.dw .ref1
.ref4:
.db $4a,$85,$4f,$50,$85,$4f,$4b,$47,$40,$85,$47,$36,$85,$47,$36,$85
.ref5:
.db $39,$3d,$43,$42,$85,$41,$43,$47,$4a,$8d,$48,$8d
.db $ff,$10
.dw .ref4
.ref7:
.db $39,$3d,$43,$42,$85,$41,$43,$47,$50,$8d,$54,$8d
.db $fd
.dw .song0ch0loop
.song0ch1:
.song0ch1loop:
.ref8:
.db $bf
.ref9:
.db $bf
.ref10:
.db $bf
.ref11:
.db $bf
.ref12:
.db $bf
.ref13:
.db $bf
.ref14:
.db $bf
.ref15:
.db $bf
.db $fd
.dw .song0ch1loop
.song0ch2:
.song0ch2loop:
.ref16:
.db $bf
.ref17:
.db $bf
.ref18:
.db $bf
.ref19:
.db $bf
.ref20:
.db $bf
.ref21:
.db $bf
.ref22:
.db $bf
.ref23:
.db $bf
.db $fd
.dw .song0ch2loop
.song0ch3:
.song0ch3loop:
.ref24:
.db $86,$11,$84,$17,$82,$09,$84,$16,$85,$17,$82,$09,$84,$16,$1a,$83
.db $17,$82,$09,$84,$16,$85,$17,$82,$09,$84,$16,$1a
.db $ff,$12
.dw .ref24
.db $ff,$12
.dw .ref24
.db $ff,$12
.dw .ref24
.db $ff,$12
.dw .ref24
.db $ff,$12
.dw .ref24
.db $ff,$12
.dw .ref24
.db $ff,$12
.dw .ref24
.db $fd
.dw .song0ch3loop
.song0ch4:
.song0ch4loop:
.ref32:
.db $32,$85,$3a,$85,$32,$85,$3a,$85,$32,$85,$3a,$85,$32,$85,$3a,$85
.db $ff,$10
.dw .ref32
.db $ff,$10
.dw .ref32
.db $ff,$10
.dw .ref32
.db $ff,$10
.dw .ref32
.db $ff,$10
.dw .ref32
.db $ff,$10
.dw .ref32
.db $ff,$10
.dw .ref32
.db $fd
.dw .song0ch4loop
|
Transynther/x86/_processed/AVXALIGN/_st_zr_un_sm_/i7-7700_9_0x48.log_21829_2419.asm | ljhsiun2/medusa | 9 | 18637 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r13
push %r15
push %r9
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x139d, %r9
nop
nop
nop
nop
nop
mfence
mov (%r9), %r15d
nop
nop
nop
add $42339, %rsi
lea addresses_WT_ht+0x1e01d, %rcx
clflush (%rcx)
add $7526, %rsi
movups (%rcx), %xmm4
vpextrq $1, %xmm4, %r10
nop
nop
and $9041, %rsi
lea addresses_D_ht+0x749d, %rsi
lea addresses_A_ht+0x1badd, %rdi
clflush (%rsi)
nop
dec %r13
mov $74, %rcx
rep movsl
nop
add %r10, %r10
lea addresses_A_ht+0x1ad65, %rsi
lea addresses_UC_ht+0x6a89, %rdi
nop
nop
nop
nop
cmp %r12, %r12
mov $37, %rcx
rep movsb
nop
nop
nop
nop
nop
cmp $54713, %r13
lea addresses_WT_ht+0x49b1, %rsi
nop
nop
nop
add $2483, %rcx
movw $0x6162, (%rsi)
nop
nop
nop
nop
nop
sub $33273, %rdi
lea addresses_D_ht+0x14fbd, %r9
sub $1477, %r15
mov $0x6162636465666768, %rdi
movq %rdi, (%r9)
sub $65113, %rdi
lea addresses_A_ht+0xcccd, %r12
nop
nop
inc %rcx
movl $0x61626364, (%r12)
sub %rsi, %rsi
lea addresses_UC_ht+0x8e15, %rsi
lea addresses_UC_ht+0x385d, %rdi
clflush (%rdi)
nop
nop
nop
nop
nop
cmp $52039, %r15
mov $25, %rcx
rep movsb
nop
nop
add %r13, %r13
lea addresses_D_ht+0x559d, %r13
cmp $48282, %rdi
movb (%r13), %r9b
nop
and %r10, %r10
lea addresses_WC_ht+0x1b89d, %r10
nop
nop
nop
nop
nop
xor %r12, %r12
movl $0x61626364, (%r10)
nop
nop
nop
xor $14674, %rcx
lea addresses_D_ht+0x78bd, %r10
nop
sub $8945, %rcx
movb $0x61, (%r10)
and $62956, %r12
lea addresses_D_ht+0x105d5, %r13
nop
nop
nop
nop
sub $17925, %rdi
mov (%r13), %r15w
nop
nop
nop
nop
nop
add %r9, %r9
lea addresses_normal_ht+0x1159d, %rcx
nop
nop
nop
add $2516, %r15
vmovups (%rcx), %ymm7
vextracti128 $0, %ymm7, %xmm7
vpextrq $0, %xmm7, %rsi
nop
nop
nop
xor $2481, %r12
lea addresses_D_ht+0x1da5d, %r13
sub $59300, %r9
vmovups (%r13), %ymm5
vextracti128 $1, %ymm5, %xmm5
vpextrq $0, %xmm5, %r15
nop
nop
dec %r15
lea addresses_WT_ht+0x424d, %rcx
nop
nop
nop
nop
dec %r10
movb $0x61, (%rcx)
nop
nop
nop
nop
xor $10678, %r13
pop %rsi
pop %rdi
pop %rcx
pop %r9
pop %r15
pop %r13
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r14
push %r8
push %r9
push %rbp
push %rcx
// Store
mov $0x227632000000039d, %rcx
nop
nop
sub %r12, %r12
mov $0x5152535455565758, %r8
movq %r8, %xmm2
movups %xmm2, (%rcx)
// Exception!!!
nop
nop
mov (0), %r9
nop
sub $13047, %r8
// Store
mov $0x20ce5100000007ef, %rcx
nop
nop
sub %r11, %r11
movl $0x51525354, (%rcx)
nop
nop
nop
nop
nop
and %r14, %r14
// Faulty Load
mov $0x227632000000039d, %r9
nop
sub $25063, %r12
movaps (%r9), %xmm3
vpextrq $0, %xmm3, %rcx
lea oracles, %r8
and $0xff, %rcx
shlq $12, %rcx
mov (%r8,%rcx,1), %rcx
pop %rcx
pop %rbp
pop %r9
pop %r8
pop %r14
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': True, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': True, 'congruent': 0, 'size': 16, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 11, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 6, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 6, 'same': True}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 2, 'size': 2, 'same': True, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 5, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 4, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 9, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 7, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 5, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 3, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 7, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 3, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 4, 'size': 1, 'same': False, 'NT': False}}
{'58': 21649, '5f': 67, '00': 113}
58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 5f 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 5f 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 5f 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 5f 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 5f 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 5f 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58
*/
|
programs/oeis/013/A013761.asm | neoneye/loda | 22 | 28077 | <reponame>neoneye/loda
; A013761: a(n) = 17^(3*n + 2).
; 289,1419857,6975757441,34271896307633,168377826559400929,827240261886336764177,4064231406647572522401601,19967568900859523802559065713,98100666009922840441972689847969,481968572106750915091411825223071697
mov $1,4913
pow $1,$0
mul $1,196
div $1,962752
mul $1,1419568
add $1,289
mov $0,$1
|
Lab Assessment Submission/Lab Assessment 1/LA1_1813355042.asm | 1813355042-Kamal/CSE331L-Section-1-Fall20-NSU | 0 | 99330 | <reponame>1813355042-Kamal/CSE331L-Section-1-Fall20-NSU<gh_stars>0
org 100h
; 02 --- 02H;
; int main () {
MOV AX, 02
MOV BX, 02
ADD AX, BX
; AX = AX+BX int a=7, b=1, c=0;
; c = a+b;
; printf (c);
; return 0;
;
ret
|
rom_src/input.asm | Yftul/zx-sizif-512 | 85 | 171183 | <reponame>Yftul/zx-sizif-512
; OUT - A - 0 - no key, 32 - exit, 16 - action, 8 - up, 4 - down, 2 - left, 1 - right
input_key_get:
ld a, (var_input_key)
ret
; OUT - B - {0, action, up, down, left, right}
; OUT - AF - garbage
; OUT - C - garbage
input_read:
ld b, 0
.kempston:
ld a, #ff ; read kempston
in a, (#1f) ; ...
bit 7, a ; detect presence by 7th bit
jr nz, .enter ; ...
and #3f ; mask useless bits
ld b, a ; ...
.enter:
ld a, #bf ; read keys
in a, (#fe) ; ...
bit 0, a ; handle Enter (ACTION) key
jr nz, .qwert ; ...
set 4, b ; ...
ret
.qwert:
ld a, #fb ; read keys
in a, (#fe) ; ...
bit 0, a ; handle Q (UP) key
jr nz, .asdfg ; ...
set 3, b ; ...
ret
.asdfg:
ld a, #fd ; read keys
in a, (#fe) ; ...
bit 0, a ; handle A (DOWN) key
jr nz, .poiuy ; ...
set 2, b ; ...
ret
.poiuy:
ld a, #df ; read keys
in a, (#fe) ; ...
bit 0, a ; handle P (RIGHT) key
jr nz, .poiuy1 ; ...
set 0, b ; ...
ret
.poiuy1:
bit 1, a ; handle O (LEFT) key
jr nz, .cszxcv ; ...
set 1, b ; ...
ret
.cszxcv:
ld a, #fe ; read keys
in a, (#fe) ; ...
bit 0, a ; handle CS key. if pressed - assume cursor key. else - assume sinclair joystick
jr z, .space_break ; ...
.space:
ld a, #7f ; read keys
in a, (#fe) ; ...
bit 0, a ; handle Space (ACTION) key
jr nz, .sinclair_09876 ; ...
set 4, b ; ...
ret
.sinclair_09876:
ld a, #ef ; read keys
in a, (#fe) ; ...
bit 0, a ; handle 0 (ACTION) key
jr nz, .sinclair_09876_9 ; ...
set 4, b ; ...
ret
.sinclair_09876_9:
bit 1, a ; handle 9 (UP) key
jr nz, .sinclair_09876_8 ; ...
set 3, b ; ...
ret
.sinclair_09876_8:
bit 2, a ; handle 8 (DOWN) key
jr nz, .sinclair_09876_7 ; ...
set 2, b ; ...
ret
.sinclair_09876_7:
bit 3, a ; handle 7 (RIGHT) key
jr nz, .sinclair_09876_6 ; ...
set 0, b ; ...
ret
.sinclair_09876_6:
bit 4, a ; handle 6 (LEFT) key
jr nz, .sinclair_ssmnb ; ...
set 1, b ; ...
ret
.sinclair_ssmnb:
ld a, #7f ; read keys
in a, (#fe) ; ...
bit 2, a ; handle M (EXIT) key (in Sinclair mode sega C button is mapped to M)
jr nz, .return ; ...
set 5, b ; ...
ret
.space_break:
ld a, #7f ; read keys
in a, (#fe) ; ...
bit 0, a ; handle Space (EXIT) key
jr nz, .cursor_09876_7 ; ...
set 5, b ; ...
ret
.cursor_09876_7:
ld a, #ef ; read keys
in a, (#fe) ; ...
bit 3, a ; handle 7 (UP) key
jr nz, .cursor_09876_6 ; ...
set 3, b ; ...
ret
.cursor_09876_6:
bit 4, a ; handle 6 (DOWN) key
jr nz, .cursor_09876_8 ; ...
set 2, b ; ...
ret
.cursor_09876_8:
bit 2, a ; handle 8 (RIGHT) key
jr nz, .cursor_12345_5 ; ...
set 0, b ; ...
ret
.cursor_12345_5:
ld a, #f7 ; read keys
in a, (#fe) ; ...
bit 4, a ; handle 5 (LEFT) key
jr nz, .return ; ...
set 1, b ; ...
ret
.return:
ret
; IN - A - current pressed key
; OUT - AF - garbage
; OUT - BC - garbage
input_beep:
or a
ret z
IFDEF TEST_BUILD
ld a, #10 ; blink border
out (#fe), a ; ...
ENDIF
xor a ; blink border
ld bc, #01ff ; ...
out (c), a ; ...
ld b, INPUT_BEEP_DELAY
.loop:
djnz .loop
ld a, 1 ; blink border back
ld bc, #01ff ; ...
out (c), a ; ...
ret
; OUT - B - current pressed key mask
; OUT - AF - garbage
; OUT - C - garbage
input_process:
call input_read ; read keys
ld a, (var_input_key_last) ;
cp b ; if (current_pressed_key == last_pressed_key) {input_key = current_pressed_key; timer = X}
jr z, .repeat ; ...
ld a, b ;
ld (var_input_key), a ; input_key = current_pressed_key
ld (var_input_key_last), a ; last_pressed_ley = current_pressed_key
call input_beep
ld a, INPUT_REPEAT_FIRST ; timer = INPUT_REPEAT_FIRST
ld (var_input_key_hold_timer), a ; ...
ret
.repeat:
ld a, (var_input_key_hold_timer) ; ...
dec a ; timer--
jr nz, .repeat_wait ; if (timer == 0) input_key = current_pressed_key
ld a, (var_input_key_last) ; ...
ld (var_input_key), a ; ...
call input_beep
ld a, INPUT_REPEAT ; timer = INPUT_REPEAT
ld (var_input_key_hold_timer), a ; ...
ret
.repeat_wait:
ld (var_input_key_hold_timer), a ; timer--
xor a ; input_key = none
ld (var_input_key), a ; ...
ret
;var_input_key: DB 0
;var_input_key_last: DB 0
;var_input_key_hold_timer: DB 0
|
oeis/031/A031369.asm | neoneye/loda-programs | 11 | 243196 | <reponame>neoneye/loda-programs
; A031369: a(n) = prime(3n-1).
; Submitted by <NAME>
; 3,11,19,31,43,59,71,83,101,109,131,149,163,179,193,211,229,241,263,277,293,313,337,353,373,389,409,431,443,461,479,499,521,547,569,587,601,617,641,653,673,691,719,739,757,773,809,823,839,859,881,907,929,947,971,991,1013,1031,1049,1063,1091,1103,1123,1153,1181,1201,1223,1237,1277,1289,1301,1319,1361,1381,1423,1433,1451,1471,1487,1499,1531,1553,1571,1597,1609,1621,1657,1669,1699,1723,1747,1777,1789,1823,1861,1873,1889,1913,1949,1979
mov $2,36
mul $2,$0
mul $0,3
mov $4,2
lpb $2
mov $3,$4
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
mov $1,$0
max $1,0
cmp $1,$0
mul $2,$1
sub $2,1
add $4,2
lpe
mov $0,$4
add $0,1
|
modules/utils.asm | formicant/Cuboid | 1 | 29125 | <gh_stars>1-10
MODULE Utils
; requires: Op, Scr, Stack
; Sets attrs of all charcells of the screen
; < a: attribute
; spoils: b, de
setScreenAttr IFUSED
Stack.store
ld sp, Scr.end
ld b, Scr.ccHeight
ld d, a
ld e, a
.loop
.(Scr.ccWidth / 2) push de
djnz .loop
Stack.restore
ret
ENDIF
; Sets all pixels of the screen
; < a: pixel byte
; spoils: b, de
setScreenPixels IFUSED
Stack.store
ld sp, Scr.attrStart
ld b, Scr.height
ld d, a
ld e, a
.loop
.(Scr.ccWidth / 2) push de
djnz .loop
Stack.restore
ret
ENDIF
; spoils: b, de
drawBrightGrid IFUSED
Stack.store
ld sp, Scr.end
ld b, Scr.ccHeight / 2
.loop
ld de, (Scr.inkWht | Scr.bright) _hl_ Scr.inkWht
.(Scr.ccWidth / 2) push de
ld de, Scr.inkWht _hl_ (Scr.inkWht | Scr.bright)
.(Scr.ccWidth / 2) push de
djnz .loop
Stack.restore
ret
ENDIF
; spoils: bc, de, hl
drawBackground IFUSED
Stack.store
ld sp, Scr.attrStart
ld de, %0101010110101010
ld hl, %1010101001010101
ld c, 12
.outerLoop
ld b, 4
.loop1
.16 push de
.16 push hl
djnz .loop1
ld b, 4
.loop2
.16 push hl
.16 push de
djnz .loop2
dec c
jr nz, .outerLoop
Stack.restore
ret
ENDIF
ENDMODULE
|
data/maps/headers/CopycatsHouse2F.asm | opiter09/ASM-Machina | 1 | 16973 | <reponame>opiter09/ASM-Machina<filename>data/maps/headers/CopycatsHouse2F.asm
map_header CopycatsHouse2F, COPYCATS_HOUSE_2F, REDS_HOUSE_2, 0
end_map_header
|
Working Disassembly/General/Sprites/Tails/Map - SStage Tails tails.asm | TeamASM-Blur/Sonic-3-Blue-Balls-Edition | 5 | 7506 | Map_SStageTailstails_:dc.w word_91124-Map_SStageTailstails_
dc.w word_91126-Map_SStageTailstails_
dc.w word_9112E-Map_SStageTailstails_
dc.w word_91136-Map_SStageTailstails_
dc.w word_9113E-Map_SStageTailstails_
dc.w word_91146-Map_SStageTailstails_
dc.w word_9114E-Map_SStageTailstails_
dc.w word_91156-Map_SStageTailstails_
dc.w word_9115E-Map_SStageTailstails_
dc.w word_91166-Map_SStageTailstails_
dc.w word_9116E-Map_SStageTailstails_
dc.w word_91176-Map_SStageTailstails_
dc.w word_9117E-Map_SStageTailstails_
dc.w word_91186-Map_SStageTailstails_
dc.w word_9118E-Map_SStageTailstails_
PLC_SStageTailstails:dc.w word_91124-PLC_SStageTailstails
dc.w word_91196-PLC_SStageTailstails
dc.w word_9119A-PLC_SStageTailstails
dc.w word_9119E-PLC_SStageTailstails
dc.w word_911A2-PLC_SStageTailstails
dc.w word_911A6-PLC_SStageTailstails
dc.w word_911AA-PLC_SStageTailstails
dc.w word_911AE-PLC_SStageTailstails
dc.w word_911B2-PLC_SStageTailstails
dc.w word_911B6-PLC_SStageTailstails
dc.w word_911BA-PLC_SStageTailstails
dc.w word_911BE-PLC_SStageTailstails
dc.w word_911C2-PLC_SStageTailstails
dc.w word_911C6-PLC_SStageTailstails
dc.w word_911CA-PLC_SStageTailstails
word_91124: dc.w 0
word_91126: dc.w 1
dc.b $EA, 6, 0, 0,$FF,$F8
word_9112E: dc.w 1
dc.b $F2, $A, 0, 0,$FF,$F8
word_91136: dc.w 1
dc.b $FA, 9, 0, 0,$FF,$F8
word_9113E: dc.w 1
dc.b $F2, 6, 0, 0,$FF,$F8
word_91146: dc.w 1
dc.b $EA, 7, 0, 0,$FF,$F8
word_9114E: dc.w 1
dc.b $EA, $A, 0, 0,$FF,$F0
word_91156: dc.w 1
dc.b $EA, 6, 0, 0,$FF,$F8
word_9115E: dc.w 1
dc.b $EA, 6, 8, 0,$FF,$F8
word_91166: dc.w 1
dc.b $F2, $A, 8, 0,$FF,$F0
word_9116E: dc.w 1
dc.b $FA, 9, 0, 0,$FF,$F0
word_91176: dc.w 1
dc.b $F2, 6, 8, 0,$FF,$F8
word_9117E: dc.w 1
dc.b $EA, 7, 8, 0,$FF,$F8
word_91186: dc.w 1
dc.b $EA, $A, 8, 0,$FF,$F8
word_9118E: dc.w 1
dc.b $EA, 6, 8, 0,$FF,$F8
word_91196: dc.w 1
dc.w $5000
word_9119A: dc.w 1
dc.w $8006
word_9119E: dc.w 1
dc.w $500F
word_911A2: dc.w 1
dc.w $5015
word_911A6: dc.w 1
dc.w $701B
word_911AA: dc.w 1
dc.w $8023
word_911AE: dc.w 1
dc.w $502C
word_911B2: dc.w 1
dc.w $5000
word_911B6: dc.w 1
dc.w $8006
word_911BA: dc.w 1
dc.w $5032
word_911BE: dc.w 1
dc.w $5015
word_911C2: dc.w 1
dc.w $701B
word_911C6: dc.w 1
dc.w $8023
word_911CA: dc.w 1
dc.w $502C
|
maps/LancesRoom.asm | Dev727/ancientplatinum | 28 | 240371 | <reponame>Dev727/ancientplatinum
object_const_def ; object_event constants
const LANCESROOM_LANCE
const LANCESROOM_MARY
const LANCESROOM_OAK
LancesRoom_MapScripts:
db 2 ; scene scripts
scene_script .LockDoor ; SCENE_DEFAULT
scene_script .DummyScene ; SCENE_LANCESROOM_APPROACH_LANCE
db 1 ; callbacks
callback MAPCALLBACK_TILES, .LancesRoomDoors
.LockDoor:
prioritysjump .LancesDoorLocksBehindYou
end
.DummyScene:
end
.LancesRoomDoors:
checkevent EVENT_LANCES_ROOM_ENTRANCE_CLOSED
iffalse .KeepEntranceOpen
changeblock 4, 22, $34 ; wall
.KeepEntranceOpen:
checkevent EVENT_LANCES_ROOM_EXIT_OPEN
iffalse .KeepExitClosed
changeblock 4, 0, $0b ; open door
.KeepExitClosed:
return
.LancesDoorLocksBehindYou:
applymovement PLAYER, LancesRoom_EnterMovement
refreshscreen $86
playsound SFX_STRENGTH
earthquake 80
changeblock 4, 22, $34 ; wall
reloadmappart
closetext
setscene SCENE_LANCESROOM_APPROACH_LANCE
setevent EVENT_LANCES_ROOM_ENTRANCE_CLOSED
end
Script_ApproachLanceFromLeft:
special FadeOutMusic
applymovement PLAYER, MovementData_ApproachLanceFromLeft
sjump LancesRoomLanceScript
Script_ApproachLanceFromRight:
special FadeOutMusic
applymovement PLAYER, MovementData_ApproachLanceFromRight
LancesRoomLanceScript:
turnobject LANCESROOM_LANCE, LEFT
opentext
writetext LanceBattleIntroText
waitbutton
closetext
winlosstext LanceBattleWinText, 0
setlasttalked LANCESROOM_LANCE
loadtrainer CHAMPION, LANCE
startbattle
dontrestartmapmusic
reloadmapafterbattle
setevent EVENT_BEAT_CHAMPION_LANCE
opentext
writetext LanceBattleAfterText
waitbutton
closetext
playsound SFX_ENTER_DOOR
changeblock 4, 0, $0b ; open door
reloadmappart
closetext
setevent EVENT_LANCES_ROOM_ENTRANCE_CLOSED
musicfadeout MUSIC_BEAUTY_ENCOUNTER, 16
pause 30
showemote EMOTE_SHOCK, LANCESROOM_LANCE, 15
turnobject LANCESROOM_LANCE, DOWN
pause 10
turnobject PLAYER, DOWN
appear LANCESROOM_MARY
applymovement LANCESROOM_MARY, LancesRoomMovementData_MaryRushesIn
opentext
writetext UnknownText_0x1811dd
waitbutton
closetext
appear LANCESROOM_OAK
applymovement LANCESROOM_OAK, LancesRoomMovementData_OakWalksIn
follow LANCESROOM_MARY, LANCESROOM_OAK
applymovement LANCESROOM_MARY, LancesRoomMovementData_MaryYieldsToOak
stopfollow
turnobject LANCESROOM_OAK, UP
turnobject LANCESROOM_LANCE, LEFT
opentext
writetext UnknownText_0x18121b
waitbutton
closetext
applymovement LANCESROOM_MARY, LancesRoomMovementData_MaryInterviewChampion
turnobject PLAYER, LEFT
opentext
writetext UnknownText_0x18134b
waitbutton
closetext
applymovement LANCESROOM_LANCE, LancesRoomMovementData_LancePositionsSelfToGuidePlayerAway
turnobject PLAYER, UP
opentext
writetext UnknownText_0x18137b
waitbutton
closetext
follow LANCESROOM_LANCE, PLAYER
turnobject LANCESROOM_MARY, UP
turnobject LANCESROOM_OAK, UP
applymovement LANCESROOM_LANCE, LancesRoomMovementData_LanceLeadsPlayerToHallOfFame
stopfollow
playsound SFX_EXIT_BUILDING
disappear LANCESROOM_LANCE
applymovement PLAYER, LancesRoomMovementData_PlayerExits
playsound SFX_EXIT_BUILDING
disappear PLAYER
applymovement LANCESROOM_MARY, LancesRoomMovementData_MaryTriesToFollow
showemote EMOTE_SHOCK, LANCESROOM_MARY, 15
opentext
writetext UnknownText_0x1813c5
pause 30
closetext
applymovement LANCESROOM_MARY, LancesRoomMovementData_MaryRunsBackAndForth
special FadeOutPalettes
pause 15
warpfacing UP, HALL_OF_FAME, 4, 13
end
LancesRoom_EnterMovement:
step UP
step UP
step UP
step UP
step_end
MovementData_ApproachLanceFromLeft:
step UP
step UP
turn_head RIGHT
step_end
MovementData_ApproachLanceFromRight:
step UP
step LEFT
step UP
turn_head RIGHT
step_end
LancesRoomMovementData_MaryRushesIn:
big_step UP
big_step UP
big_step UP
turn_head DOWN
step_end
LancesRoomMovementData_OakWalksIn:
step UP
step UP
step_end
LancesRoomMovementData_MaryYieldsToOak:
step LEFT
turn_head RIGHT
step_end
LancesRoomMovementData_MaryInterviewChampion:
big_step UP
turn_head RIGHT
step_end
LancesRoomMovementData_LancePositionsSelfToGuidePlayerAway:
step UP
step LEFT
turn_head DOWN
step_end
LancesRoomMovementData_LanceLeadsPlayerToHallOfFame:
step UP
step_end
LancesRoomMovementData_PlayerExits:
step UP
step_end
LancesRoomMovementData_MaryTriesToFollow:
step UP
step RIGHT
turn_head UP
step_end
LancesRoomMovementData_MaryRunsBackAndForth:
big_step RIGHT
big_step RIGHT
big_step LEFT
big_step LEFT
big_step LEFT
big_step RIGHT
big_step RIGHT
big_step RIGHT
big_step LEFT
big_step LEFT
turn_head UP
step_end
LanceBattleIntroText:
text "LANCE: I've been"
line "waiting for you."
para "<PLAY_G>!"
para "I knew that you,"
line "with your skills,"
para "would eventually"
line "reach me here."
para "There's no need"
line "for words now."
para "We will battle to"
line "determine who is"
para "the stronger of"
line "the two of us."
para "As the most power-"
line "ful trainer and as"
para "the #MON LEAGUE"
line "CHAMPION…"
para "I, LANCE the drag-"
line "on master, accept"
cont "your challenge!"
done
LanceBattleWinText:
text "…It's over."
para "But it's an odd"
line "feeling."
para "I'm not angry that"
line "I lost. In fact, I"
cont "feel happy."
para "Happy that I"
line "witnessed the rise"
para "of a great new"
line "CHAMPION!"
done
LanceBattleAfterText:
text "…Whew."
para "You have become"
line "truly powerful,"
cont "<PLAY_G>."
para "Your #MON have"
line "responded to your"
para "strong and up-"
line "standing nature."
para "As a trainer, you"
line "will continue to"
para "grow strong with"
line "your #MON."
done
UnknownText_0x1811dd:
text "MARY: Oh, no!"
line "It's all over!"
para "PROF.OAK, if you"
line "weren't so slow…"
done
UnknownText_0x18121b:
text "PROF.OAK: Ah,"
line "<PLAY_G>!"
para "It's been a long"
line "while."
para "You certainly look"
line "more impressive."
para "Your conquest of"
line "the LEAGUE is just"
cont "fantastic!"
para "Your dedication,"
line "trust and love for"
para "your #MON made"
line "this happen."
para "Your #MON were"
line "outstanding too."
para "Because they be-"
line "lieved in you as a"
para "trainer, they per-"
line "severed."
para "Congratulations,"
line "<PLAY_G>!"
done
UnknownText_0x18134b:
text "MARY: Let's inter-"
line "view the brand new"
cont "CHAMPION!"
done
UnknownText_0x18137b:
text "LANCE: This is"
line "getting to be a"
cont "bit too noisy…"
para "<PLAY_G>, could you"
line "come with me?"
done
UnknownText_0x1813c5:
text "MARY: Oh, wait!"
line "We haven't done"
cont "the interview!"
done
LancesRoom_MapEvents:
db 0, 0 ; filler
db 4 ; warp events
warp_event 4, 23, KARENS_ROOM, 3
warp_event 5, 23, KARENS_ROOM, 4
warp_event 4, 1, HALL_OF_FAME, 1
warp_event 5, 1, HALL_OF_FAME, 2
db 2 ; coord events
coord_event 4, 5, SCENE_LANCESROOM_APPROACH_LANCE, Script_ApproachLanceFromLeft
coord_event 5, 5, SCENE_LANCESROOM_APPROACH_LANCE, Script_ApproachLanceFromRight
db 0 ; bg events
db 3 ; object events
object_event 5, 3, SPRITE_LANCE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, LancesRoomLanceScript, -1
object_event 4, 7, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_LANCES_ROOM_OAK_AND_MARY
object_event 4, 7, SPRITE_OAK, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_LANCES_ROOM_OAK_AND_MARY
|
oeis/070/A070801.asm | neoneye/loda-programs | 11 | 84005 | <reponame>neoneye/loda-programs<gh_stars>10-100
; A070801: Largest prime <= sigma(n): a(n) = prevprime(sigma(n)), where prevprime(n) = A007917(n), the largest prime less than or equal to n.
; 3,3,7,5,11,7,13,13,17,11,23,13,23,23,31,17,37,19,41,31,31,23,59,31,41,37,53,29,71,31,61,47,53,47,89,37,59,53,89,41,89,43,83,73,71,47,113,53,89,71,97,53,113,71,113,79,89,59,167,61,89,103,127,83,139,67,113,89,139,71,193,73,113,113,139,89,167,79,181,113,113,83,223,107,131,113,179,89,233,109,167,127,139,113,251,97,167,151,211,101
add $0,1
seq $0,203 ; a(n) = sigma(n), the sum of the divisors of n. Also called sigma_1(n).
seq $0,136548 ; a(n) = max {k >= 1 | sigma(k) <= n}.
|
Transynther/x86/_processed/US/_zr_/i7-8650U_0xd2.log_17659_441.asm | ljhsiun2/medusa | 9 | 100050 | <filename>Transynther/x86/_processed/US/_zr_/i7-8650U_0xd2.log_17659_441.asm
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r8
push %rax
lea addresses_A_ht+0x19ee, %r10
nop
nop
and %r8, %r8
mov (%r10), %rax
nop
nop
nop
nop
nop
mfence
pop %rax
pop %r8
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r13
push %rax
push %rbx
push %rsi
// Store
lea addresses_WC+0x17166, %r12
inc %r10
movw $0x5152, (%r12)
sub $29975, %rax
// Load
lea addresses_US+0x1a966, %r10
nop
nop
nop
nop
nop
cmp %rax, %rax
mov (%r10), %r13
nop
and %rax, %rax
// Store
mov $0xe06, %r12
nop
nop
nop
nop
nop
add %r11, %r11
mov $0x5152535455565758, %r13
movq %r13, %xmm1
vmovups %ymm1, (%r12)
nop
nop
nop
nop
sub %r11, %r11
// Store
lea addresses_D+0xb0e6, %rsi
cmp %r10, %r10
movw $0x5152, (%rsi)
nop
nop
nop
sub $55699, %rsi
// Load
lea addresses_US+0x1679f, %r11
nop
dec %rax
vmovups (%r11), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $1, %xmm3, %rbx
xor $63327, %r12
// Store
lea addresses_WC+0x17366, %r13
nop
nop
nop
nop
nop
and %r12, %r12
movw $0x5152, (%r13)
nop
nop
sub %r11, %r11
// Faulty Load
lea addresses_US+0x12b66, %r10
nop
nop
nop
nop
nop
xor $31401, %rsi
movb (%r10), %r12b
lea oracles, %rbx
and $0xff, %r12
shlq $12, %r12
mov (%rbx,%r12,1), %r12
pop %rsi
pop %rbx
pop %rax
pop %r13
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 2, 'AVXalign': True, 'NT': True, 'congruent': 0, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 8, 'AVXalign': False, 'NT': True, 'congruent': 9, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_P', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 2, 'AVXalign': True, 'NT': False, 'congruent': 6, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 2, 'AVXalign': True, 'NT': False, 'congruent': 9, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 8, 'AVXalign': True, 'NT': False, 'congruent': 3, 'same': False}}
{'00': 17659}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 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/A168125.asm | karttu/loda | 1 | 101858 | ; A168125: a(n) = n^2*(n^7+1)/2.
; 0,1,258,9846,131080,976575,5038866,20176828,67108896,193710285,500000050,1178973906,2579890248,5302249771,10330523490,19221679800,34359738496,59293938393,99179645346,161343849070,256000000200,397140023511,603634609138,900576330996,1320903770400,1907348633125,2714751839826,3812798742858,5289227977096,7253572988355,9841500000450,13219811080816,17592186044928,23205742201521,30358496383810,39407819336550,50779978334856,64980869898223,82608050632146,104364180580140,131072000000800,163690967197821,203335691925618,251296305969346,309060919755720,378340321290075,461095081335586,559565236552488,676302730298496,814206798956425,976562500001250,1167082586546526,1389952941819208,1649881795902471,1952152956158130,2302683291993700,2708084724074016,3175730977693653,3713829369824146,4331497909329210,5038848000001800,5847073046418931,6768543273133698,7816907078428896,9007199254743040
mov $1,$0
pow $0,9
pow $1,2
add $1,$0
div $1,2
|
kernel/16bit/a20.asm | bubach/BOS | 16 | 85645 | <reponame>bubach/BOS
;----------------------------------------------------------;
; BOS 0.05 <NAME>, 2005. ;
;----------------------------------------------------------;
; ;
; Realmode functions to set a20-gate. ;
; ;
;----------------------------------------------------------;
;----------------------;
; enable a20 gate ;
;----------------------;
enable_a20:
in al, 0x64 ; first try..
test al, 2
jnz enable_a20
mov al, 0xD1
out 0x64, al
.d6:
in al, 0x64
and ax, 2
jnz .d6
mov al, 0xDF
out 0x60, al
call a20_test
jz .ok
in al, 0x92 ; try again, diffrent method.
or al, 0x02
out 0x92, al
call a20_test
jz .ok
; ERROR!
; a20-gate not set! Do something about it here... ;)
.ok:
ret
;------------------------;
; test if A20 is set ;
;------------------------;
a20_test:
mov al, byte [fs:0]
mov ah, al
not al
xchg al, byte [gs:0x10]
cmp ah, byte [fs:0]
mov [gs:0x10], al
ret |
common/obj_mod.asm | DigitalMars/optlink | 28 | 17661 | <filename>common/obj_mod.asm
TITLE OBJ_MOD - Copyright (c) SLR Systems 1994
INCLUDE MACROS
INCLUDE IO_STRUC
INCLUDE SECTS
INCLUDE MODULES
INCLUDE CDDATA
INCLUDE FIXTEMPS
if fg_td
INCLUDE TDBG
endif
PUBLIC OBJ_MOD,MODEND_RETURN,DO_DEFINE_MODULE,VERBOSE_MODULENAME
PUBLIC LAST_MODULE_GINDEX_EXT
.DATA
EXTERNDEF MODULE_NAME:BYTE,OUTBUF:BYTE,OVR_EXTRN:BYTE,BYTES:BYTE,TEMP_RECORD:BYTE,CACHE_BYTE:BYTE
EXTERNDEF MOD_PLTYPE:BYTE,DEBUG_TYPES_SELECTED:BYTE,SYMBOL_TEXT:BYTE
EXTERNDEF SYMBOL_LENGTH:DWORD,OVR_EXTRN_TABLE:DWORD,OBJ_DEVICE:DWORD,RECORD_LENGTH:DWORD,SRC_COUNT:DWORD
EXTERNDEF END_OF_RECORD:DWORD,FILE_FLAGS:DWORD,SECTION_NUMBER:DWORD,CURNLIB_NUMBER:DWORD,LIB_PAGE_SIZE:DWORD
EXTERNDEF TYPDEF_ANDER:DWORD,LINNUM_DELTA:DWORD,EXTDEF_DELTA:DWORD,DEFAULT_SIZE:DWORD,CURNMOD_GINDEX:DWORD
EXTERNDEF TD_N_LSCOPES:DWORD,LDATA_SEGMOD_GINDEX:DWORD,MOD_FIRST_PUBLIC_GINDEX:DWORD
EXTERNDEF CURN_FILE_LIST_GINDEX:DWORD,XR_CURNMOD_GINDEX:DWORD,LAST_MYCOMDAT_LINDEX:DWORD
EXTERNDEF MOD_FIRST_SRC_GINDEX:DWORD,MOD_PREV_CSEGS:DWORD,N_MDB_STRUCTS:DWORD,MOD_CSEG_COUNT:DWORD
EXTERNDEF MOD_FIRST_CSEGMOD_GINDEX:DWORD,MOD_TD_LOCALS_INDEX32:DWORD,MOD_TD_LOCALS_COUNT:DWORD
EXTERNDEF MOD_TD_COMP_PARAMS:DWORD,TD_OPTIMIZATIONS_FLAG:DWORD,LAST_EXTDEF_GINDEX:DWORD
EXTERNDEF LAST_PUBDEF_GINDEX:DWORD,STACK_AREA1:DWORD,MYSTACK:DWORD,MATCHED_COUNT:DWORD,MATCHED_BUFFER:DWORD
EXTERNDEF MOD_CV_TYPES_SEGMOD:DWORD,MOD_CV_SYMBOLS_SEGMOD:DWORD,RECORD_TYPE:DWORD,OVR_INIT_ADDR:DWORD
EXTERNDEF MOD_SECTION:DWORD,FILE_SECTION:DWORD,VIRDEF_MCD_HASH_TABLE_PTR:DWORD,MOD_TD_OPTFLAGS:DWORD
EXTERNDEF MOD_TD_FIRST_LOCAL:DWORD,MATCHED_PTR:DWORD,LAST_TD_MATCHED:DWORD,LOCAL_HASH_TABLE_PTR:DWORD
EXTERNDEF MOD_LAST_SRC_GINDEX:DWORD,MDB_STRUCT_SIZE:DWORD,LAST_MDB_GINDEX:DWORD,FIRST_MDB_GINDEX:DWORD
EXTERNDEF SYMBOL_LARRAY:LARRAY_STRUCT,GROUP_LARRAY:LARRAY_STRUCT,LNAME_LARRAY:LARRAY_STRUCT
EXTERNDEF SEGMOD_LARRAY:LARRAY_STRUCT
EXTERNDEF LNAME_STUFF:ALLOCS_STRUCT,MODULE_GARRAY:STD_PTR_S,_FILE_LIST_GARRAY:STD_PTR_S,CSEG_GARRAY:STD_PTR_S
EXTERNDEF FILNAM:NFN_STRUCT,PRE_THREADS:THREAD_STUFF_STRUCT,SYMBOL_TPTR:TPTR_STRUCT
EXTERNDEF OPTI_MOVE:DWORD
EXTERNDEF LAST_MODULE_GINDEX_EXT:DWORD
.CODE PASS1_TEXT
EXTERNDEF GET_RECORD:PROC,FORREF:PROC,FORREF32:PROC,_check_checksum:proc
EXTERNDEF PROCESS_EXTERNALS:PROC,BAD_RECORD:PROC,THEADR:PROC,COMENT:PROC,MODEND:PROC,MODEND32:PROC
EXTERNDEF EXTDEF:PROC,RHEADR:PROC,PUBDEF:PROC,PUBDEF32:PROC,LINNUM:PROC,LINNUM32:PROC,LNAMES:PROC,SEGDEF:PROC
EXTERNDEF SEGDEF32:PROC,GRPDEF:PROC,FIXUPP:PROC,FIXUPP32:PROC,LEDATA:PROC,LEDATA32:PROC
EXTERNDEF LIDATA:PROC,LIDATA32:PROC,COMDEF:PROC,_err_abort:proc,LEXTDF:PROC,LPUBDF:PROC,LPUBDF32:PROC
EXTERNDEF RELEASE_ARRAYS:PROC,INIT_ARRAYS:PROC,RIDATA:PROC,RIDATA32:PROC,REDATA32:PROC,REDATA:PROC
EXTERNDEF PEDATA:PROC,PEDATA32:PROC,PIDATA:PROC,PIDATA32:PROC,LCOMDF:PROC,INSTALL_MODULE:PROC
EXTERNDEF ALLOC_MODULE:PROC,MOVE_ESI_EDI_STG:PROC,MOVE_ASCIZ_ESI_EDI:PROC,FLUSH_OUTBUF:PROC,ALIASS:PROC,CEXTDEF:PROC
EXTERNDEF COMDAT:PROC,COMDAT32:PROC,LINSYM:PROC,LINSYM32:PROC,FLUSH_COMDAT:PROC,HEXWOUT:PROC,NBKPAT:PROC
EXTERNDEF NBKPAT32:PROC,LLNAMES:PROC,LNAME_INSTALL:PROC
EXTERNDEF INIT_LOCAL_STORAGE:PROC,RELEASE_LOCAL_STORAGE:PROC,_move_file_list_gindex_path_prim_ext:proc
EXTERNDEF INIT_PARALLEL_ARRAY:PROC,PROCESS_MODEND_TD:PROC,RELEASE_PARALLEL_ARRAY:PROC,SAY_VERBOSE:PROC
EXTERNDEF GET_FIRST_RECORD:PROC
EXTERNDEF TOO_COMPLEX_ERR:ABS,OVR_EXTRN_COUNT:ABS,CEXTDEF_ERR:ABS
public _obj_mod
_obj_mod proc
push EBX
push ESI
push EDI
call OBJ_MOD
pop EDI
pop ESI
pop EBX
ret
_obj_mod endp
OBJ_MOD PROC
;
;WELL, FIRST WE WILL CLEAR OUT THE THREAD ARRAYS
;
CALL GET_FIRST_RECORD
MOV EAX,RECORD_TYPE
MOV ECX,RECORD_LENGTH
CMP AL,0F0H
JNZ OBJ_NORM
;
;MUST BE A LIBRARY FILE
;
MOV AL,-1
ADD ECX,3
SETT LIB_OR_NOT,AL
MOV LIB_PAGE_SIZE,ECX ;FOR ROUNDING ADDRESSES...
if fgh_inthreads
BITT _HOST_THREADED
JNZ OS_1
endif
MOV EAX,OBJ_DEVICE ;ADJUST MAX FILE SIZE TO READ
MOV ECX,[ESI]
MOV EAX,[EAX].MYI_STRUCT.MYI_FILE_LIST_GINDEX
CONVERT EAX,EAX,_FILE_LIST_GARRAY
MOV [EAX].FILE_LIST_STRUCT.FILE_LIST_NFN.NFN_FILE_LENGTH,ECX
OS_1:
LIB_LOOP LABEL PROC
CALL GET_RECORD
CMP RECORD_TYPE,0F1H
JZ LIB_DONE
CALL OBJ_NORM ;HANDLE LIKE STANDARD MODULE
;
;NOW, ROUND POINTER AND COUNTER
;
MOV EBX,OBJ_DEVICE
ASSUME EBX:PTR MYI_STRUCT
MOV ECX,LIB_PAGE_SIZE
MOV EAX,[EBX].MYI_PTRA
DEC ECX
MOV EDX,EAX
ADD EAX,ECX
NOT ECX
AND EAX,ECX
SUB EAX,EDX
SUB [EBX].MYI_COUNT,EAX
JC FAIL
ADD EAX,EDX
MOV [EBX].MYI_PTRA,EAX
JMP LIB_LOOP
FAIL LABEL PROC
MOV [EBX].MYI_COUNT,0 ;UNEXPECTED EOF NEXT
JMP LIB_LOOP
LIB_DONE LABEL PROC
XOR AL,AL
RESS REC_TYPE_VALID,AL
RESS LIB_OR_NOT,AL
RET
OBJ_NORM LABEL PROC
MOV EAX,0FFH
PUSH ESI
RESS FOUND_THEADR,AH
GETT CL,DEBUG_ALL
SETT DEBUGGING_THIS,AL
GETT CH,FANCY_DEBUG
MOV DEBUG_TYPES_SELECTED,AL ;SELECT ALL TYPES TO KEEP
TEST CL,CL
JNZ L19$
TEST CH,CH
JZ L19$
MOV EAX,CURN_FILE_LIST_GINDEX ;HANDLE DEBUG SELECTION BY FILE
RESS DEBUGGING_THIS,CL
if fg_winpack
TEST EAX,EAX
JZ L1$
endif
CONVERT EAX,EAX,_FILE_LIST_GARRAY
MOV AL,[EAX].FILE_LIST_STRUCT.FILE_LIST_PLINK_FLAGS
TEST AL,MASK FL_DEBUG_TYPES+MASK FL_DEBUG_LINNUMS+MASK FL_DEBUG_LOCALS+MASK FL_DEBUG_PUBLICS+MASK FL_DEBUG_COVERAGES+MASK FL_DEBUG_BROWSERDEFS+MASK FL_DEBUG_BROWSERREFS
JZ L1$
SETT DEBUGGING_THIS,CH
L1$:
MOV DEBUG_TYPES_SELECTED,AL
L19$:
;
;INITIALIZE FIXUPP THREADS
;
MOV EDI,OFF PRE_THREADS.FS_FILLER
XOR EAX,EAX
MOV ECX,8
MOV LDATA_SEGMOD_GINDEX,EAX
L2$:
MOV [EDI],EAX
ADD EDI,SIZE THREAD_STUFF_STRUCT
DEC ECX
JNZ L2$
;
;IF ARRAYS HAVE BEEN EXPANDED, RELEASE ANY EXCESS... GO BACK
;TO SINGLE SEGMENT STUFF
;
;
;INITIALIZE LNAME_STUFF
;
CALL INIT_LOCAL_STORAGE ;DOES INIT_ARRAYS TOO
XOR EAX,EAX
MOV MOD_FIRST_PUBLIC_GINDEX,EAX
MOV TYPDEF_ANDER,EAX ;IGNORE TYPES...
MOV LINNUM_DELTA,EAX
MOV EXTDEF_DELTA,EAX
MOV LOCAL_HASH_TABLE_PTR,EAX ;NEED TO CLEAR OUT LOCAL HASH TABLE BEFORE USING
MOV LAST_MYCOMDAT_LINDEX,EAX
RESS ANY_LNAMES,AL
if fg_td
MOV LAST_EXTDEF_GINDEX,EAX
MOV LAST_PUBDEF_GINDEX,EAX
RESS KEEPING_THIS_TDBG,AL
MOV LAST_TD_MATCHED,EAX
MOV MATCHED_PTR,OFF MATCHED_BUFFER
MOV MATCHED_COUNT,16
endif
POP ESI
RESS LAST_DATA_KEEP,AL
BITT DO_CHECKSUMING
JNZ DO_LOOP1
JMP DONT_LOOP1
;start processing records
DO_LOOP:
SUB AL,6EH
CMP AL,0D0H-6EH
JNC DO_FAIL
DO_LOOP2:
CALL REC_TABLE[EAX*4]
CALL GET_RECORD
DO_LOOP1:
push ESI
call _check_checksum
add ESP,4
MOV EAX,RECORD_TYPE
JMP DO_LOOP
DO_FAIL:
MOV AL,0CFH-6EH ;FORCE BAD_RECORD
JMP DO_LOOP2
;start processing records
DONT_LOOP:
SUB AL,6EH
CMP AL,0D0H-6EH
JNC DONT_FAIL
DONT_LOOP2:
CALL REC_TABLE[EAX*4]
; MOV EAX,OFF SAY_OMF_RET_MSG
; CALL SAY_OMF_VERBOSE
CALL GET_RECORD
DONT_LOOP1:
; CALL SAY_OMF_TYPE
MOV EAX,RECORD_TYPE
JMP DONT_LOOP
DONT_FAIL:
MOV AL,0CFH-6EH
JMP DONT_LOOP2
OBJ_MOD ENDP
DO_DEFINE_MODULE PROC
;
;build list of modules
;
PUSHM EDI,ESI
MOV EAX,DPTR MODULE_NAME
MOV ESI,OFF MODULE_NAME+4
MOV EDI,OFF SYMBOL_TEXT
MOV SYMBOL_LENGTH,EAX
CALL OPTI_MOVE
;
;FIRST DETERMINE IF THERE ARE ANY FIXUPPS
;
MOV EAX,OFF SYMBOL_TPTR
CALL INSTALL_MODULE
ASSUME ECX:PTR MODULE_STRUCT
PUSH EBX
MOV CURNMOD_GINDEX,EAX
if fg_xref
MOV XR_CURNMOD_GINDEX,EAX
endif
;
;SEE IF THAT MODULE RECORD ALREADY USED (DUPLICATE MOD NAME..)
;
;
;HANDLE DEBUG BY MODULE NAME
;
MOV AL,[ECX]._M_FLAGS
MOV DL,-1
TEST AL,MASK M_DEBUG_GLOBAL
JZ L1$
SETT DEBUGGING_THIS,DL
MOV DEBUG_TYPES_SELECTED,DL ;SELECT ALL DEBUGGING TYPES...
L1$:
OR AL,MASK M_USED
MOV EDX,CURNLIB_NUMBER
MOV [ECX]._M_FLAGS,AL
MOV EAX,CURN_FILE_LIST_GINDEX
MOV [ECX]._M_LIBNUM,EDX
MOV [ECX]._M_FILE_LIST_GINDEX,EAX
if fg_plink
MOV EAX,[ECX]._M_SECTION_GINDEX
MOV DL,[ECX]._M_PLTYPE
MOV MOD_SECTION_GINDEX,EAX
MOV MOD_PLTYPE,DL
endif
if any_overlays
TEST FILE_FLAGS,MASK SECT_AUTOSECT
JZ L8$
CALL CLONE_SECTION
L8$:
endif
CALL VERBOSE_MODULENAME
; CMP DPTR MODULE_NAME+4,'gniw'
; JNZ L2$
; SETT VERBOSE_OMF
;L2$:
;
;KEEP TYPES IF TYPES ARE SELECTED FOR THIS MODULE, AND WE ARE DOING CODEVIEW INFORMATION
;
GETT CL,CODEVIEW_FLAG
MOV AL,DEBUG_TYPES_SELECTED
OR CL,CL
JZ L5$
TEST AL,MASK FL_DEBUG_TYPES
JZ L5$
MOV TYPDEF_ANDER,-1 ;KEEP TYPES NOW...
L5$:
if fg_td
BITT TD_FLAG
JZ 9$
BITT DEBUGGING_THIS
JZ 9$
SETT KEEPING_THIS_TDBG
LEA SI,TD_LSCOPE_PARRAY
MOV AX,SIZE TD_LSCOPES_STRUCT
CALL INIT_PARALLEL_ARRAY
LEA SI,TD_LSRC_PARRAY
MOV AX,SIZE TD_LSRC_STRUCT
CALL INIT_PARALLEL_ARRAY
; LEA SI,TD_LTYPES_PARRAY
; MOV AX,4
; CALL INIT_PARALLEL_ARRAY
; LEA SI,TD_LCLASS_PARRAY
; MOV AX,4
; CALL INIT_PARALLEL_ARRAY
XOR AX,AX
MOV TD_N_LSCOPES,AX
MOV AX,CSEG_GARRAY._STD_LIMIT
MOV MOD_PREV_CSEGS,AX
endif
L9$:
POPM EBX,ESI,EDI
RET
DO_DEFINE_MODULE ENDP
if any_overlays
CLONE_SECTION PROC NEAR
;
;NEED ANOTHER SECTION JUST LIKE THIS ONE...
;
;
MOV AX,SIZE SECTION_STRUCT ;ALLOCATE ANOTHER SECTION
SYM_POOL_ALLOC #T
XCHG AX,DX
MOV BX,DI
LDS SI,FILE_SECTION
SYM_CONV_DS
MOV AX,[SI]._SECT_LAST_CLONE.OFFS
MOV CX,[SI]._SECT_LAST_CLONE.SEGM
MOV [SI]._SECT_LAST_CLONE.OFFS,BX
MOV [SI]._SECT_LAST_CLONE.SEGM,DX
MOV FILE_SECTION.OFFS,BX
MOV FILE_SECTION.SEGM,DX
JCXZ 1$
MOV DS,CX
XCHG AX,SI
SYM_CONV_DS
1$:
MOV CX,(SIZE SECTION_STRUCT)/2 ;DUPLICATE ENTRIES
REP MOVSW
;
;CLEAR OUT FIRST_AREA, LAST_AREA, NAME, CHILDREN, FIRST_SEGMOD, LAST_SEGMOD
;
LEA DI,[BX]._SECT_FIRST_AREA
XOR AX,AX
STOSW
STOSW
LEA DI,_SECT_LAST_AREA-(_SECT_FIRST_AREA+4)[DI]
STOSW
STOSW
LEA DI,_SECT_NAME-(_SECT_LAST_AREA+4)[DI]
STOSW
STOSW
LEA DI,_SECT_CHILDREN[BX]
STOSW
LEA DI,_SECT_FIRST_SEGMOD[BX]
STOSW
STOSW
LEA DI,_SECT_LAST_SEGMOD-(_SECT_FIRST_SEGMOD+4)[DI]
STOSW
STOSW
LEA SI,-SIZE SECTION_STRUCT[SI]
MOV [SI]._SECT_NEXT_SECTION.OFFS,BX
MOV [SI]._SECT_NEXT_SECTION.SEGM,DX
MOV [SI]._SECT_NEXT_SECTION_ORDER.OFFS,BX
MOV [SI]._SECT_NEXT_SECTION_ORDER.SEGM,DX
CMP ES:[BX]._SECT_NEXT_SECTION.SEGM,0 ;NEXT SECTION THIS AREA...
JNZ 2$
LDS SI,[SI]._SECT_PARENT_AREA
SYM_CONV_DS
MOV [SI]._AREA_LAST_SECTION.OFFS,BX
MOV [SI]._AREA_LAST_SECTION.SEGM,DX
2$:
;
;INC OUTFILE COUNT
;
LDS SI,ES:[BX]._SECT_OUTFILE
MOV CX,DS
JCXZ 3$
SYM_CONV_DS
INC [SI]._OF_SECTIONS
3$:
;
;INC SECTION NUMBERS
;
PUSHM DX,BX
LDS SI,ES:[BX]._SECT_PARENT_AREA
4$:
MOV CX,DS
JCXZ 5$
SYM_CONV_DS
LDS SI,[SI]._AREA_PARENT_SECTION
MOV CX,DS
JCXZ 5$
SYM_CONV_DS
INC [SI]._SECT_CHILDREN
LDS SI,[SI]._SECT_PARENT_AREA
JMP 4$
5$:
;
;INC SECTION # IN LINKED LIST
;
POPM SI,DS
6$:
SYM_CONV_DS
INC [SI]._SECT_NUMBER
LDS SI,[SI]._SECT_NEXT_SECTION_ORDER
MOV AX,DS
OR AX,AX
JNZ 6$
INC SECTION_NUMBER
RET
CLONE_SECTION ENDP
endif
VERBOSE_MODULENAME PROC
;
;
;
GETT AL,INFORMATION_FLAG
OR AL,AL
JZ L9$
PUSHM EDI,ESI
PUSH EBX
MOV EDI,OFF OUTBUF
MOV ESI,OFF READINGMOD_MSG
CALL MOVE_ESI_EDI_STG
MOV EAX,CURNMOD_GINDEX
CONVERT EAX,EAX,MODULE_GARRAY
ASSUME EAX:PTR MODULE_STRUCT
MOV ECX,[EAX]._M_FILE_LIST_GINDEX
LEA ESI,[EAX]._M_TEXT
PUSH ECX
CALL MOVE_ASCIZ_ESI_EDI ;PHYSICAL
MOV ESI,OFF FROMFILE_MSG
CALL MOVE_ESI_EDI_STG
POP ECX
TEST ECX,ECX
JZ L2$
MOV EAX,EDI
push ECX
push EAX
call _move_file_list_gindex_path_prim_ext
add ESP,8
MOV EDI,EAX
L2$:
CALL FLUSH_OUTBUF
POPM EBX,ESI,EDI
L9$:
RET
VERBOSE_MODULENAME ENDP
if any_overlays
DO_OVR_EXTRN_SYMBOL PROC NEAR
;
;
;
PUSH CX
LEA DI,TEMP_RECORD
LODSW ;PTR TO TEXT STRING
XCHG AX,BX ;BX PTS TO TEXT STRING
LODSB ;AL IS # OF Y/N BYTES TO ADD
CBW
XCHG AX,DX ;DX IS COUNT OF Y/N BYTES
XCHG BX,SI ;SI PTS TO STRING LEN, BX PTS TO FIRST Y/N OFFSET
LODSB
CBW
MOV CX,AX ;CX IS BYTES IN STRING
ADD AX,DX ;AL IS TOTAL LENGTH WITH Y/N'S
STOSB
REP MOVSB ;MOVE HEAD OF STRING
MOV SI,BX ;SI POINTS TO Y/N OFFSET
MOV CX,DX ;CX IS COUNT OF Y/N'S
4$:
LODSB ;OFFSET OF NEXT Y/N
LEA BX,BYTES
ADD BX,AX
MOV AL,[BX] ;LOAD Y/N
STOSB
LOOP 4$
XOR AL,AL
STOSB ;TYP-INDEX
MOV END_OF_RECORD,DI
PUSH SI
LEA SI,TEMP_RECORD
CALL EXTDEF
POPM SI,CX
FIXDS
FIXES
RET
DO_OVR_EXTRN_SYMBOL ENDP
endif
if any_overlays
FIRSTT PROC
;
;
;
BITT DOING_OVERLAYS
JZ FIRSTT1
PUSHM DI,AX
;
;REFERENCE EXTERN...
;
FIXDS
LEA SI,OVR_EXTRN_TABLE
CALL DO_OVR_EXTRN_SYMBOL
MOV OVR_INIT_ADDR.OFFS,BX
MOV OVR_INIT_ADDR.SEGM,AX
MOV CX,OVR_EXTRN_COUNT-1
; CMP CACHE_BYTE,'Y'
; JZ FIRSTT0
; DEC CX
FIRSTT0:
CALL DO_OVR_EXTRN_SYMBOL
LOOP FIRSTT0
POPM AX,DI
FIRSTT1:
JMP FIRSTT_RET
FIRSTT ENDP
endif
MODEND_RETURN PROC
NO_FIXUPPS LABEL PROC
;
;OK, END OF MODULE, FIRST WE SCAN LIST OF EXTERNALS AND PROCESS THEM
;
GETT DL,ANY_LNAMES
XOR EAX,EAX
TEST DL,DL
JNZ MR_1
CMP MOD_FIRST_PUBLIC_GINDEX,EAX
JZ MR_99
MR_1:
MOV ESI,CURNMOD_GINDEX
RESS LAST_DATA_COMDAT,AL
if any_overlays
MOV BX,LAST_MODULE_GINDEX_EXT
OR BX,BX
JZ FIRSTT
FIRSTT_RET:
endif
MOV LAST_MODULE_GINDEX_EXT,ESI ;BECAUSE PROCESS EXTERNALS MESSES UP CURNMOD_GINDEX
CONVERT ESI,ESI,MODULE_GARRAY
ASSUME ESI:PTR MODULE_STRUCT
MOV EAX,MOD_FIRST_PUBLIC_GINDEX
MOV ECX,MOD_FIRST_SRC_GINDEX
MOV [ESI]._M_FIRST_PUB_GINDEX,EAX
MOV AL,[ESI]._M_FLAGS
XOR DL,DL
TEST ECX,ECX
JZ MR_8
OR AL,MASK M_SRCS_PRESENT
MR_8:
BITT DEBUGGING_THIS,DL
JZ MR_9
OR AL,MASK M_DEBUGGING_THIS
MR_9:
BITT PCODE_OMIT_PUBLICS,DL
JZ MR_91
OR AL,MASK M_OMIT_$$PUBLICS
RESS PCODE_OMIT_PUBLICS,DL
MR_91:
BITT PCH_HERE,DL
JZ MR_92
OR AL,MASK M_PRECOMPILED_CV
RESS PCH_HERE,DL
MR_92:
MOV [ESI]._M_FLAGS,AL
if fg_td
BITT TD_FLAG
JZ MR_93
XOR AX,AX
XCHG AX,MOD_TD_COMP_PARAMS
MOV [SI]._M_TD_COMP_PARAMS,AX
MR_93:
endif
MR_99:
RESS REC_TYPE_VALID,DL
if fg_td
CALL PROCESS_MODEND_TD ;HANDLE TURBO DEBUGGER MODEND STUFF...
endif
; MOV EAX,OFF FLUSHING_COMDATS
; CALL SAY_OMF_VERBOSE
CALL FLUSH_COMDATS
; MOV EAX,OFF PROCESSING_EXTERNALS
; CALL SAY_OMF_VERBOSE
CALL PROCESS_EXTERNALS
if fg_td
FIXDS ;SO DS IS VALID AFTER
LEA SI,TD_LSRC_PARRAY ;RELEASE
CALL RELEASE_PARALLEL_ARRAY
endif
; MOV EAX,OFF RELEASING_LOCAL_STORAGE
; CALL SAY_OMF_VERBOSE
CALL RELEASE_LOCAL_STORAGE
;
;ANY REASON TO DO MDB RECORD?
;
BITT NEED_MDB_RECORD
JZ MR_10
; MOV EAX,OFF PROCESSING_MDB
; CALL SAY_OMF_VERBOSE
CALL PROCESS_MDB
MR_10:
XOR EAX,EAX
MOV DEFAULT_SIZE,EAX
MOV MOD_FIRST_PUBLIC_GINDEX,EAX
MOV MOD_FIRST_SRC_GINDEX,EAX
MOV MOD_LAST_SRC_GINDEX,EAX
; MOV MOD_SRC_COUNT,EAX
MOV MOD_FIRST_CSEGMOD_GINDEX,EAX
MOV MOD_CSEG_COUNT,EAX
MOV EBX,OBJ_DEVICE
ASSUME EBX:PTR MYI_STRUCT
MOV CURNMOD_GINDEX,EAX
BITT LIB_OR_NOT,AL
JNZ MODEND_DONE
;
;NORMAL OBJ, ANYTHING LEFT IN THE BUFFER?
;
CHECK_MORE_RET:
MOV ECX,[EBX].MYI_COUNT
MOV ESI,[EBX].MYI_PTRA
TEST ECX,ECX ;SOMETHING LEFT IN BUFFER, CHECK IT
JNZ CHECK_MORE_NOW
SUB ESI,[EBX].MYI_BLOCK
MOV EAX,EBX
CMP ESI,PAGE_SIZE ;PAGE BOUNDARY, TRY ANOTHER READ
JZ CHECK_MORE
RET
CHECK_MORE_NOW:
CMP BPTR [ESI],80H ;IS IT A THEADR RECORD?
JZ OBJ_MOD1
MODEND_DONE:
RET
CHECK_MORE:
push EAX
CALL [EBX].MYI_FILLBUF
add ESP,4
MOV ECX,[EBX].MYI_COUNT
TEST ECX,ECX
JNZ CHECK_MORE_RET
RET
OBJ_MOD1:
JMP OBJ_MOD
MODEND_RETURN ENDP
PROCESS_MDB PROC NEAR
;
;
;
MOV EAX,MDB_STRUCT_SIZE
MOV ESI,LAST_MODULE_GINDEX_EXT
MOV ECX,EAX
TILLP2_POOL_ALLOC
MOV EBX,EAX
ASSUME EBX:PTR MDB_STRUCT
INSTALL_POINTER_GINDEX MDB_GARRAY
MOV EDX,LAST_MDB_GINDEX
MOV EDI,EBX
TEST EDX,EDX
JZ DO_FIRST
CONVERT EDX,EDX,MDB_GARRAY
ASSUME EDX:PTR MDB_STRUCT
MOV [EDX]._MD_NEXT_MDB_GINDEX,EAX
DF_9:
MOV LAST_MDB_GINDEX,EAX
SHR ECX,2
XOR EAX,EAX
REP STOSD
RESS NEED_MDB_RECORD,CL
MOV EAX,N_MDB_STRUCTS
MOV ECX,ESI
CONVERT ESI,ESI,MODULE_GARRAY
ASSUME ESI:PTR MODULE_STRUCT
INC EAX
MOV EDX,LAST_MDB_GINDEX
MOV N_MDB_STRUCTS,EAX
MOV [ESI]._M_MDB_GINDEX,EDX
MOV EAX,MOD_FIRST_SRC_GINDEX
XOR EDX,EDX
MOV [EBX]._MD_FIRST_SRC_GINDEX,EAX
TEST EAX,EAX
JZ L2$
CONVERT EAX,EAX,SRC_GARRAY
ASSUME EAX:PTR SRC_STRUCT
MOV EAX,[EAX]._SRC_NUMBER
MOV EDX,SRC_COUNT
SUB EDX,EAX
INC EDX
L2$:
MOV [EBX]._MD_SRC_COUNT,EDX
MOV EAX,MOD_FIRST_CSEGMOD_GINDEX
MOV EDX,MOD_CSEG_COUNT
MOV [EBX]._MD_FIRST_CSEGMOD_GINDEX,EAX
MOV [EBX]._MD_CSEG_COUNT,EDX
if fg_cv
GETT AL,CODEVIEW_FLAG
MOV ECX,MOD_CV_TYPES_SEGMOD
OR AL,AL
JZ L5$
MOV EDX,MOD_CV_SYMBOLS_SEGMOD
MOV [EBX]._MD_CV_TYPES_GINDEX,ECX
XOR EAX,EAX
MOV [EBX]._MD_CV_SYMBOLS_GINDEX,EDX
MOV MOD_CV_TYPES_SEGMOD,EAX
MOV MOD_CV_SYMBOLS_SEGMOD,EAX
L5$:
endif
if fg_td
BITT TD_FLAG
JZ 9$
MOV [SI]._MD_TD_MOTHER_GINDEX,CX
MOV AX,MOD_TD_OPTFLAGS.LW
MOV BX,MOD_TD_OPTFLAGS.HW
MOV [SI]._MD_TD_OPTFLAGS.LW,AX
MOV [SI]._MD_TD_OPTFLAGS.HW,BX
OR AX,BX
OR AX,TD_OPTIMIZATIONS_FLAG
MOV TD_OPTIMIZATIONS_FLAG,AX
MOV AX,MOD_TD_LOCALS_INDEX32.LW
MOV BX,MOD_TD_LOCALS_INDEX32.HW
MOV [SI]._MD_TD_LOCALS_INDEX32.LW,AX
MOV [SI]._MD_TD_LOCALS_INDEX32.HW,BX
MOV AX,MOD_TD_LOCALS_COUNT
MOV [SI]._MD_TD_LOCALS_COUNT,AX
XOR AX,AX
MOV MOD_TD_OPTFLAGS.LW,AX
MOV MOD_TD_OPTFLAGS.HW,AX
MOV MOD_TD_LOCALS_INDEX32.LW,AX
MOV MOD_TD_LOCALS_INDEX32.HW,AX
MOV MOD_TD_LOCALS_COUNT,AX
endif
L9$:
RET
DO_FIRST:
MOV FIRST_MDB_GINDEX,EAX
JMP DF_9
PROCESS_MDB ENDP
FLUSH_COMDATS PROC NEAR
;
;THIS GUY SCANS LIST OF MYCOMDATS MAKING SURE THEY ARE FLUSHED
;
MOV EAX,LAST_MYCOMDAT_LINDEX
TEST EAX,EAX
JZ L9$
PUSHM EDI,ESI,EBX
MOV EBX,EAX
L1$:
MOV EAX,EBX
CONVERT_MYCOMDAT_EAX_ECX
ASSUME ECX:PTR MYCOMDAT_STRUCT
MOV EDX,[ECX]._MCD_SYMBOL_GINDEX ;CEXTDEF WITH NO DEFINITION?
MOV EBX,[ECX]._MCD_NEXT_MCD_LINDEX
OR EDX,EDX
JZ L5$
CALL FLUSH_COMDAT ;EAX IS LINDEX, ECX IS COMDAT PHYSICAL
L6$:
L8$:
TEST EBX,EBX
JNZ L1$
;
;ZERO OUT MCD HASH TABLE
;
MOV EDI,VIRDEF_MCD_HASH_TABLE_PTR
MOV ECX,VIRDEF_MCD_HASH_SIZE
XOR EAX,EAX
POP EBX
OPTI_STOSD
POPM ESI,EDI
L9$:
RET
L5$:
MOV AL,CEXTDEF_ERR
push EAX
call _err_abort
JMP L6$
FLUSH_COMDATS ENDP
IGNORES PROC
LOCSYM::
RET
LOCSYM32::
RET
TYPDEF::
MOV TYPDEF_ANDER,0
RET
BLKDEF:: RET
BLKEND:: RET
DEBSYM1:: RET
OVLDEF:: RET
ENDREC:: RET
LIBHED:: RET
LIBNAM:: RET
LIBLOC:: RET
LIBDIC:: RET
AC_WHAT::
REGINT:: RET
IGNORE_RECORD::
REGINT32:: RET
IGNORES ENDP
if debug
SAY_OMF_VERBOSE PROC
BITT VERBOSE_OMF
JZ L9$
CALL SAY_VERBOSE
L9$:
RET
SAY_OMF_VERBOSE ENDP
SAY_OMF_TYPE PROC
BITT VERBOSE_OMF
JZ L9$
PUSH EDI
MOV EAX,RECORD_TYPE
MOV EDI,OFF OMF_TYPE_HEX
CALL HEXWOUT
POP EDI
MOV EAX,OFF SAY_OMF_TYP_MSG
CALL SAY_VERBOSE
L9$:
RET
SAY_OMF_TYPE ENDP
endif
.CONST
ALIGN 4
REC_TABLE DCA RHEADR ;6E
DCA RHEADR ;6F
DCA REGINT ;70
DCA REGINT32 ;71
DCA REDATA ;72
DCA REDATA32 ;73
DCA RIDATA ;74
DCA RIDATA32 ;75
DCA OVLDEF ;76
DCA BAD_RECORD ;77
DCA ENDREC ;78
DCA BAD_RECORD ;79
DCA BLKDEF ;7A
DCA BLKDEF ;7B
DCA BLKEND ;7C
DCA BAD_RECORD ;7D
DCA DEBSYM1 ;7E
DCA BAD_RECORD ;7F
DCA THEADR ;80
DCA BAD_RECORD
DCA THEADR ;82 LHEADR
DCA THEADR ;83 LHEADR...
; DCA PEDATA ;84
; DCA PEDATA32 ;85
; DCA PIDATA ;86
; DCA PIDATA32 ;87
DCA BAD_RECORD ;84
DCA BAD_RECORD ;85
DCA BAD_RECORD ;86
DCA BAD_RECORD ;87
DCA COMENT ;88
DCA BAD_RECORD ;89
DCA MODEND ;8A
DCA MODEND32 ;8B
DCA EXTDEF ;8C
DCA EXTDEF ;8D
DCA TYPDEF ;8E
DCA BAD_RECORD ;8F
DCA PUBDEF ;90
DCA PUBDEF32 ;91
DCA LOCSYM ;92
DCA LOCSYM32 ;93
DCA LINNUM ;94
DCA LINNUM32 ;95
DCA LNAMES ;96
DCA BAD_RECORD ;97
DCA SEGDEF ;98
DCA SEGDEF32 ;99
DCA GRPDEF ;9A
DCA BAD_RECORD ;9B
DCA FIXUPP ;9C
DCA FIXUPP32 ;9D
DCA 2 DUP(BAD_RECORD)
DCA LEDATA ;A0
DCA LEDATA32 ;A1
DCA LIDATA ;A2
DCA LIDATA32 ;A3
DCA LIBHED ;A4
DCA BAD_RECORD ;A5
DCA LIBNAM ;A6
DCA BAD_RECORD ;A7
DCA LIBLOC ;A8
DCA BAD_RECORD ;A9
DCA LIBDIC ;AA
DCA BAD_RECORD ;AB
DCA AC_WHAT ;AC IGNORE FOR MICROFOCUS
DCA 3 DUP(BAD_RECORD)
DCA COMDEF ;B0
DCA BAD_RECORD
DCA FORREF ;B2 FORREF
DCA FORREF32 ;B3
DCA LEXTDF ;B4
DCA LEXTDF ;B5
DCA LPUBDF ;B6
DCA LPUBDF32 ;B7
DCA LCOMDF ;B8
DCA BAD_RECORD
DCA BAD_RECORD ;BA
DCA BAD_RECORD ;BB
DCA CEXTDEF ;BC COMDAT EXTERNAL NAMES
DCA BAD_RECORD ;BD
DCA BAD_RECORD ;BE
DCA BAD_RECORD ;BF
DCA BAD_RECORD ;C0
DCA BAD_RECORD ;C1
DCA COMDAT ;C2
DCA COMDAT32 ;C3
DCA LINSYM ;C4
DCA LINSYM32 ;C5
DCA ALIASS ;C6
DCA BAD_RECORD ;C7
DCA NBKPAT ;C8
DCA NBKPAT32 ;C9
DCA LLNAMES ;CA
DCA BAD_RECORD ;CB
DCA IGNORE_RECORD ;CC VERNUM
DCA BAD_RECORD ;CD
DCA BAD_RECORD ;CE
DCA BAD_RECORD ;CF
DCA BAD_RECORD ;D0
READINGMOD_MSG DB SIZEOF READINGMOD_MSG-1,'Loading '
FROMFILE_MSG DB SIZEOF FROMFILE_MSG-1,' from '
if debug
SAY_OMF_RET_MSG DB SIZEOF SAY_OMF_RET_MSG-1,' Returned',0DH,0AH
FLUSHING_COMDATS DB SIZEOF FLUSHING_COMDATS-1,'Flushing COMDATs',0DH,0AH
PROCESSING_EXTERNALS DB SIZEOF PROCESSING_EXTERNALS-1,'Processing Externals',0DH,0AH
PROCESSING_MDB DB SIZEOF PROCESSING_MDB-1,'Processing MDB',0DH,0AH
RELEASING_LOCAL_STORAGE DB SIZEOF RELEASING_LOCAL_STORAGE-1,'Releasing Local Storage',0DH,0AH
endif
.DATA
if debug
SAY_OMF_TYP_MSG DB SIZEOF SAY_OMF_TYP_MSG-1+4,'Calling RecTyp '
OMF_TYPE_HEX DB 'XXXX'
endif
END
|
test/asm/asmv4.asm | xdrie/irre-tools | 1 | 177753 | <filename>test/asm/asmv4.asm<gh_stars>1-10
; test of IRRE_ASM assembly v4
; specify the label to be used as an entry point. optional.
%entry :main
; items here are placfed in the executable code section
%section code
; use BIND ("@") to define a macro
; the argument list is followed by MARK (":")
add2@ rA rB v0 : ; this macro sets rA = rB + v0
set ad v0
add rA rB ad
::
main:
set r1 $0
set r2 $4
add2 r2 r2 $8
; labels can be ahead-referenced
; any relative offsets will be resolved later
set r4 ::func1
cal r4
; labels can be accessed with positive offsets
set r3 ::data1 ; pointer to "hello" string
set r5 ::data0^#4
hlt
func1:
set r7 $ff
ret
; indicate that items here should be placed in the data section
%section data
; data must appear in the data section
data0:
%d \x $22000000 ; $22 in little endian
data1:
%d \' hello ; data string support
%d \x $00 ; null terminator |
Transynther/x86/_processed/NC/_st_zr_/i7-7700_9_0x48.log_21829_1704.asm | ljhsiun2/medusa | 9 | 243532 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r15
push %r8
push %r9
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x13849, %r9
nop
nop
nop
nop
nop
cmp $30335, %r15
mov (%r9), %esi
nop
nop
nop
nop
nop
add $9650, %rbp
lea addresses_WT_ht+0x193d1, %r8
nop
nop
nop
nop
nop
sub %r13, %r13
vmovups (%r8), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $0, %xmm3, %r10
nop
nop
nop
add %r10, %r10
lea addresses_WT_ht+0x33c1, %r13
cmp %r15, %r15
vmovups (%r13), %ymm0
vextracti128 $0, %ymm0, %xmm0
vpextrq $0, %xmm0, %r9
nop
nop
nop
sub %r15, %r15
lea addresses_UC_ht+0x4b51, %r10
nop
nop
nop
nop
and $45241, %r15
movw $0x6162, (%r10)
nop
sub %r10, %r10
lea addresses_WC_ht+0x14b8d, %rbp
nop
nop
nop
nop
nop
cmp $42602, %r10
movups (%rbp), %xmm3
vpextrq $0, %xmm3, %r13
sub %r15, %r15
lea addresses_UC_ht+0x12d69, %rsi
lea addresses_WC_ht+0xbef5, %rdi
sub $48682, %r9
mov $103, %rcx
rep movsq
nop
cmp $44188, %r9
lea addresses_A_ht+0x11741, %r10
nop
nop
inc %rsi
mov $0x6162636465666768, %r8
movq %r8, %xmm4
vmovups %ymm4, (%r10)
cmp %rdi, %rdi
lea addresses_WT_ht+0x5951, %rsi
lea addresses_UC_ht+0xd4c9, %rdi
add $7071, %r9
mov $82, %rcx
rep movsb
sub $43473, %rbp
lea addresses_UC_ht+0x4fff, %rsi
lea addresses_WC_ht+0x107d1, %rdi
clflush (%rsi)
nop
nop
nop
xor $13551, %r13
mov $60, %rcx
rep movsb
nop
nop
nop
nop
xor %r15, %r15
lea addresses_WT_ht+0x1eee9, %r13
inc %r9
movb (%r13), %r10b
nop
nop
nop
nop
nop
inc %r13
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r8
pop %r15
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r14
push %rax
push %rdi
push %rdx
// Store
lea addresses_US+0x5bd1, %r14
nop
nop
nop
nop
nop
sub %rax, %rax
mov $0x5152535455565758, %r11
movq %r11, (%r14)
nop
nop
nop
nop
nop
and %rdx, %rdx
// Faulty Load
mov $0x7cd2d00000000bd1, %rax
nop
nop
nop
nop
nop
cmp $16748, %rdi
mov (%rax), %r11d
lea oracles, %r14
and $0xff, %r11
shlq $12, %r11
mov (%r14,%r11,1), %r11
pop %rdx
pop %rdi
pop %rax
pop %r14
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 8, 'size': 8, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 3, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 11, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 3, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 7, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 2, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 4, 'size': 32, 'same': True, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': True}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 10, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 3, 'size': 1, 'same': False, 'NT': False}}
{'58': 21584, '00': 245}
58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58
*/
|
src/smk-run_files.adb | mgrojo/smk | 0 | 7085 | <gh_stars>0
-- -----------------------------------------------------------------------------
-- smk, the smart make
-- © 2018 <NAME> <<EMAIL>>
-- SPDX-License-Identifier: APSL-2.0
-- -----------------------------------------------------------------------------
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
-- http://www.apache.org/licenses/LICENSE-2.0
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-- -----------------------------------------------------------------------------
-- -----------------------------------------------------------------------------
-- Package: Smk.Run_Files body
--
-- Implementation Notes:
--
-- Portability Issues:
--
-- Anticipated Changes:
-- -----------------------------------------------------------------------------
with Ada.Directories;
with Ada.Streams.Stream_IO;
with Smk.IO;
with Smk.Settings;
package body Smk.Run_Files is
Run_Fl : Ada.Streams.Stream_IO.File_Type;
-- --------------------------------------------------------------------------
function "+" (Name : File_Name) return String is
(To_String (Name));
function "+" (Name : String) return File_Name is
(File_Name'(To_Unbounded_String (Name)));
function "+" (Name : File_Name) return Unbounded_String is
(Unbounded_String (Name));
-- --------------------------------------------------------------------------
procedure Dump (File_List : in File_Lists.Map;
Filter_Sytem_Files : in Boolean) is
use Run_Files.File_Lists;
begin
for C in File_List.Iterate loop
declare
Name : constant String := +Key (C);
TT : constant Ada.Calendar.Time := Element (C);
begin
if not Filter_Sytem_Files or
(Name (1 .. 4) /= "/usr"
and Name (1 .. 4) /= "/lib"
and Name (1 .. 4) /= "/opt"
and Name (1 .. 4) /= "/etc"
and Name (1 .. 5) /= "/proc"
and Name (1 .. 4) /= "/sys")
-- Fixme: filter processing to complete, and filtered
-- directories should moved to Settings
then
IO.Put_Line (" - " & IO.Image (TT) & ":" & Name);
end if;
end;
end loop;
end Dump;
-- --------------------------------------------------------------------------
procedure Update_Time_Tag (File_List : in out File_Lists.Map) is
use Ada.Directories;
use File_Lists;
begin
for C in File_List.Iterate loop
declare
Name : constant String := +Key (C);
begin
if Exists (Name) then
File_List.Replace_Element
(C, Ada.Directories.Modification_Time (Name));
-- Fixme : GNAT bug on this line:
-- Element (C) := Ada.Directories.Modification_Time (Name);
end if;
end;
end loop;
end Update_Time_Tag;
-- --------------------------------------------------------------------------
procedure Insert_Or_Update (The_Command : in Command_Lines;
The_Run : in Run;
In_Run_List : in out Run_Lists.Map) is
begin
if In_Run_List.Contains (The_Command) then
In_Run_List.Replace (Key => The_Command,
New_Item => The_Run);
else
In_Run_List.Insert (Key => The_Command,
New_Item => The_Run);
end if;
end Insert_Or_Update;
-- --------------------------------------------------------------------------
procedure Dump (Run_List : in Run_Lists.Map;
Filter_Sytem_Files : in Boolean) is
use Run_Lists;
use Ada.Containers;
begin
for L in Run_List.Iterate loop
declare
Run : constant Run_Files.Run := Element (L);
RT_Image : constant String := IO.Image (Run.Run_Time);
Section : constant String := " [" & (+Run.Section) & "] ";
SC : constant String := Count_Type'Image (Run.Sources.Length);
TC : constant String := Count_Type'Image (Run.Targets.Length);
begin
IO.Put_Line (RT_Image & Section & (+Key (L)));
IO.Put_Line (" Sources (" & SC (2 .. SC'Last) & ") :");
Dump (Run.Sources, Filter_Sytem_Files);
IO.Put_Line (" Targets (" & TC (2 .. TC'Last) & ") :");
Dump (Run.Targets, Filter_Sytem_Files);
IO.Put_Line ("");
end;
end loop;
end Dump;
-- --------------------------------------------------------------------------
function Saved_Run_Found return Boolean is
begin
return Ada.Directories.Exists (Settings.Previous_Run_File_Name);
end Saved_Run_Found;
-- --------------------------------------------------------------------------
function Get_Saved_Run return Run_Lists.Map is
use Ada.Streams.Stream_IO;
List : Run_Lists.Map;
S : Stream_Access;
begin
Open (Name => Settings.Previous_Run_File_Name,
File => Run_Fl,
Mode => In_File);
S := Stream (Run_Fl);
List := Run_Lists.Map'Input (S);
Close (Run_Fl);
return List;
end Get_Saved_Run;
-- --------------------------------------------------------------------------
procedure Save_Run (The_Run : in Run_Lists.Map) is
use Ada.Streams.Stream_IO;
S : Stream_Access;
begin
Create (Name => Settings.Previous_Run_File_Name,
File => Run_Fl,
Mode => Out_File);
S := Stream (Run_Fl);
Run_Lists.Map'Output (S, The_Run);
Close (Run_Fl);
end Save_Run;
end Smk.Run_Files;
|
计算机系统概论/lc3/4test2.asm | yunwei37/ZJU-CS-GIS-ClassNotes | 397 | 179285 | .ORIG x3200
.FILL #3
.FILL #4
.FILL #1
.FILL #1
.FILL #1
.FILL #1
.FILL #1
.FILL #1
.FILL #1
.FILL #1
.FILL #1
.FILL #1
.FILL #1
.FILL #1
.END |
oeis/259/A259905.asm | neoneye/loda-programs | 11 | 21594 | <reponame>neoneye/loda-programs<filename>oeis/259/A259905.asm
; A259905: n*a(n+1) = (2*n^2+2n-1)*a(n)+(n+1)*a(n-1); a(0)=1, a(1)=2.
; Submitted by <NAME>
; 1,2,8,47,371,3676,43822,610493,9730757,174624086,3483890996,76489299307,1832590219063,47577493251632,1330483562569946,39870448222541561,1274615495706568457,43299625736778117418,1557589082593773410272,59147557572252556858151
mov $2,1
mov $4,1
lpb $0
sub $0,1
mov $3,$4
mov $4,$2
mul $2,$0
add $2,$3
add $4,$2
add $2,$4
lpe
mov $0,$4
|
4-high/gel/source/world/gel-world-server.ads | charlie5/lace-alire | 1 | 30584 | with
gel.World,
lace.Observer,
ada.unchecked_Conversion,
ada.Containers.Vectors;
limited
with
openGL.Renderer.lean;
package gel.World.server
--
-- Provides a gel world server.
--
is
type Item is limited new gel.World.item
with private;
type View is access all Item'Class;
type Views is array (Positive range <>) of View;
---------
-- Forge
--
package Forge
is
function to_World (Name : in String;
Id : in world_Id;
space_Kind : in physics.space_Kind;
Renderer : access openGL.Renderer.lean.item'Class) return gel.World.server.item;
function new_World (Name : in String;
Id : in world_Id;
space_Kind : in physics.space_Kind;
Renderer : access openGL.Renderer.lean.item'Class) return gel.World.server.view;
end Forge;
overriding
procedure destroy (Self : in out Item);
procedure free (Self : in out View);
--------------
--- Operations
--
overriding
procedure register (Self : access Item; the_Mirror : in remote.World.view;
Mirror_as_observer : in lace.Observer.view);
overriding
procedure deregister (Self : access Item; the_Mirror : in remote.World.view);
overriding
procedure evolve (Self : in out Item);
private
-----------
--- Clients
--
use type remote.World.view;
package world_Vectors is new ada.Containers.Vectors (Positive, remote.World.view);
subtype world_Vector is world_Vectors.Vector;
--------------
--- sprite_Map
--
type sprite_Map is limited new World.sprite_Map with
record
Map : id_Maps_of_sprite.Map;
end record;
overriding
function fetch (From : in sprite_Map) return id_Maps_of_sprite.Map;
overriding
procedure add (To : in out sprite_Map; the_Sprite : in Sprite.view);
overriding
procedure rid (From : in out sprite_Map; the_Sprite : in Sprite.view);
--------------
--- World Item
--
type Item is limited new gel.World.item with
record
Age_at_last_Clients_update : Duration := 0.0;
Clients : World_vector;
all_Sprites : aliased sprite_Map;
end record;
overriding
function all_Sprites (Self : access Item) return access World.sprite_Map'Class;
end gel.World.server;
|
alloy4fun_models/trainstlt/models/6/WxiPx7hkfcRiRLj46.als | Kaixi26/org.alloytools.alloy | 0 | 4773 | <gh_stars>0
open main
pred idWxiPx7hkfcRiRLj46_prop7 {
all t : Train | eventually (always no t.pos)
}
pred __repair { idWxiPx7hkfcRiRLj46_prop7 }
check __repair { idWxiPx7hkfcRiRLj46_prop7 <=> prop7o } |
test/asset/agda-stdlib-1.0/Data/List/Solver.agda | omega12345/agda-mode | 0 | 5431 | <gh_stars>0
------------------------------------------------------------------------
-- The Agda standard library
--
-- Automatic solvers for equations over lists
------------------------------------------------------------------------
-- See README.Nat for examples of how to use similar solvers
{-# OPTIONS --without-K --safe #-}
module Data.List.Solver where
import Algebra.Solver.Monoid as Solver
open import Data.List.Properties using (++-monoid)
------------------------------------------------------------------------
-- A module for automatically solving propositional equivalences
-- containing _++_
module ++-Solver {a} {A : Set a} =
Solver (++-monoid A) renaming (id to nil)
|
test/asset/agda-stdlib-1.0/Relation/Nullary/Construct/Add/Point.agda | omega12345/agda-mode | 0 | 2131 | <filename>test/asset/agda-stdlib-1.0/Relation/Nullary/Construct/Add/Point.agda
------------------------------------------------------------------------
-- The Agda standard library
--
-- Notation for adding an additional point to any set
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Relation.Nullary.Construct.Add.Point where
open import Data.Maybe.Base using ()
renaming (Maybe to Pointed; nothing to ∙; just to [_])
public
|
Task/Universal-Turing-machine/Ada/universal-turing-machine-3.ada | LaudateCorpus1/RosettaCodeData | 1 | 21419 | with Ada.Text_IO, Turing;
procedure Simple_Incrementer is
type States is (Start, Stop);
type Symbols is (Blank, One);
package UTM is new Turing(States, Symbols);
use UTM;
Map: Symbol_Map := (One => '1', Blank => '_');
Rules: Rules_Type :=
(Start => (One => (Start, Right, One),
Blank => (Stop, Stay, One)));
Tape: Tape_Type := To_Tape("111", Map);
procedure Put_Tape(Tape: Tape_Type; Current: States) is
begin
Ada.Text_IO.Put_Line(To_String(Tape, Map) & " " & States'Image(Current));
Ada.Text_IO.Put_Line(Position_To_String(Tape));
end Put_Tape;
begin
Run(Tape, Rules, 20, null); -- don't print the configuration during running
Put_Tape(Tape, Stop); -- print the final configuration
end Simple_Incrementer;
|
oeis/142/A142210.asm | neoneye/loda-programs | 11 | 90180 | ; A142210: Primes congruent to 13 mod 41.
; Submitted by <NAME>(w1)
; 13,587,751,997,1489,1571,2063,2309,2473,2719,2801,3457,3539,4441,4523,4933,5179,5261,5507,6163,6491,6737,6983,7229,7393,7639,8377,8623,8951,9689,10099,10181,10427,10837,11083,11329,11411,11657,11821,11903,12149,12641,13297,13789,14281,15101,15511,16249,16741,16823,16987,17807,17971,18217,19037,19447,20021,20431,20759,21169,21661,22153,22481,22727,22973,23629,23957,24121,24203,24859,25679,26171,26417,27073,27647,27893,28057,28549,28631,29123,29287,30271,30517,30763,31091,31337,31583,32321,33223
mov $1,26
mov $2,$0
add $2,2
pow $2,2
lpb $2
sub $1,20
sub $2,1
mov $3,$1
mul $3,2
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,61
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
lpe
mov $0,$1
sub $0,107
mul $0,2
add $0,93
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_21829_753.asm | ljhsiun2/medusa | 9 | 22251 | <reponame>ljhsiun2/medusa<gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r14
push %r9
push %rax
push %rbp
push %rdi
push %rsi
lea addresses_WT_ht+0xdee6, %r14
sub $26630, %rax
movb $0x61, (%r14)
nop
nop
sub $20524, %r10
lea addresses_WC_ht+0x6ce6, %rax
clflush (%rax)
nop
nop
nop
nop
nop
cmp %rbp, %rbp
vmovups (%rax), %ymm4
vextracti128 $0, %ymm4, %xmm4
vpextrq $0, %xmm4, %r14
nop
nop
nop
sub %r10, %r10
lea addresses_UC_ht+0x1c6e6, %rdi
nop
nop
nop
nop
nop
cmp $33849, %r9
mov (%rdi), %r14d
nop
nop
xor %r9, %r9
lea addresses_D_ht+0x146e6, %rax
nop
nop
nop
cmp %rsi, %rsi
movups (%rax), %xmm4
vpextrq $1, %xmm4, %rdi
nop
nop
nop
nop
inc %rsi
lea addresses_normal_ht+0x136e6, %r9
clflush (%r9)
nop
nop
nop
lfence
mov $0x6162636465666768, %rdi
movq %rdi, %xmm7
movups %xmm7, (%r9)
xor $15146, %rsi
lea addresses_UC_ht+0xdee6, %r10
nop
dec %r9
mov (%r10), %rdi
nop
nop
add $63396, %rbp
lea addresses_A_ht+0x112da, %r9
nop
nop
nop
sub $46074, %rdi
mov $0x6162636465666768, %rsi
movq %rsi, (%r9)
nop
cmp %rsi, %rsi
lea addresses_A_ht+0x3016, %rdi
and %r14, %r14
mov $0x6162636465666768, %r9
movq %r9, %xmm6
movups %xmm6, (%rdi)
and $1490, %r9
lea addresses_UC_ht+0x5de6, %rax
clflush (%rax)
nop
nop
cmp $55355, %rdi
movb $0x61, (%rax)
add %rax, %rax
lea addresses_A_ht+0x9fe, %rax
nop
nop
nop
add $54437, %r14
mov (%rax), %edi
nop
nop
nop
xor %r9, %r9
lea addresses_WC_ht+0x1dc66, %r14
dec %rbp
vmovups (%r14), %ymm7
vextracti128 $0, %ymm7, %xmm7
vpextrq $1, %xmm7, %r9
nop
nop
nop
nop
nop
sub $42288, %r10
pop %rsi
pop %rdi
pop %rbp
pop %rax
pop %r9
pop %r14
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r8
push %r9
push %rbp
push %rcx
push %rdx
// Store
lea addresses_US+0xace0, %r11
nop
nop
nop
nop
sub $28754, %r9
mov $0x5152535455565758, %rcx
movq %rcx, %xmm5
movups %xmm5, (%r11)
nop
add $45859, %rdx
// Faulty Load
lea addresses_D+0x46e6, %rbp
nop
nop
sub %r11, %r11
vmovups (%rbp), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $1, %xmm6, %rdx
lea oracles, %r9
and $0xff, %rdx
shlq $12, %rdx
mov (%r9,%rdx,1), %rdx
pop %rdx
pop %rcx
pop %rbp
pop %r9
pop %r8
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 32, 'NT': True, 'type': 'addresses_D'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_US'}}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 32, 'NT': False, 'type': 'addresses_D'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_WT_ht'}}
{'src': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 9, 'AVXalign': False, 'same': True, 'size': 16, 'NT': False, 'type': 'addresses_normal_ht'}}
{'src': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_A_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_A_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 8, 'AVXalign': False, 'same': True, 'size': 1, 'NT': False, 'type': 'addresses_UC_ht'}}
{'src': {'congruent': 3, 'AVXalign': False, 'same': True, 'size': 4, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
|
source/league/ucd/matreshka-internals-unicode-ucd-core_0003.ads | svn2github/matreshka | 24 | 22170 | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012-2015, <NAME> <<EMAIL>> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
pragma Restrictions (No_Elaboration_Code);
-- GNAT: enforce generation of preinitialized data section instead of
-- generation of elaboration code.
package Matreshka.Internals.Unicode.Ucd.Core_0003 is
pragma Preelaborate;
Group_0003 : aliased constant Core_Second_Stage
:= (16#40# .. 16#41# => -- 0340 .. 0341
(Nonspacing_Mark, Ambiguous,
Extend, Extend, Extend, Combining_Mark,
(Diacritic
| Case_Ignorable
| Grapheme_Extend
| ID_Continue
| XID_Continue
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#43# .. 16#44# => -- 0343 .. 0344
(Nonspacing_Mark, Ambiguous,
Extend, Extend, Extend, Combining_Mark,
(Diacritic
| Case_Ignorable
| Grapheme_Extend
| ID_Continue
| XID_Continue
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#45# => -- 0345
(Nonspacing_Mark, Ambiguous,
Extend, Extend, Extend, Combining_Mark,
(Diacritic
| Other_Alphabetic
| Other_Lowercase
| Alphabetic
| Cased
| Case_Ignorable
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Extend
| ID_Continue
| Lowercase
| XID_Continue
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#4F# => -- 034F
(Nonspacing_Mark, Ambiguous,
Extend, Extend, Extend, Glue,
(Other_Default_Ignorable_Code_Point
| Case_Ignorable
| Default_Ignorable_Code_Point
| Grapheme_Extend
| ID_Continue
| XID_Continue
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#58# .. 16#5B# => -- 0358 .. 035B
(Nonspacing_Mark, Ambiguous,
Extend, Extend, Extend, Combining_Mark,
(Case_Ignorable
| Grapheme_Extend
| ID_Continue
| XID_Continue => True,
others => False)),
16#5C# => -- 035C
(Nonspacing_Mark, Ambiguous,
Extend, Extend, Extend, Glue,
(Case_Ignorable
| Grapheme_Extend
| ID_Continue
| XID_Continue => True,
others => False)),
16#5D# .. 16#62# => -- 035D .. 0362
(Nonspacing_Mark, Ambiguous,
Extend, Extend, Extend, Glue,
(Diacritic
| Case_Ignorable
| Grapheme_Extend
| ID_Continue
| XID_Continue => True,
others => False)),
16#63# .. 16#6F# => -- 0363 .. 036F
(Nonspacing_Mark, Ambiguous,
Extend, Extend, Extend, Combining_Mark,
(Case_Ignorable
| Grapheme_Extend
| ID_Continue
| XID_Continue => True,
others => False)),
16#70# => -- 0370
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#71# => -- 0371
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#72# => -- 0372
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#73# => -- 0373
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#74# => -- 0374
(Modifier_Letter, Neutral,
Other, A_Letter, O_Letter, Alphabetic,
(Diacritic
| Alphabetic
| Case_Ignorable
| Grapheme_Base
| ID_Continue
| ID_Start
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#75# => -- 0375
(Modifier_Symbol, Neutral,
Other, Other, Other, Alphabetic,
(Diacritic
| Case_Ignorable
| Grapheme_Base => True,
others => False)),
16#76# => -- 0376
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#77# => -- 0377
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#78# .. 16#79# => -- 0378 .. 0379
(Unassigned, Neutral,
Other, Other, Other, Unknown,
(others => False)),
16#7A# => -- 037A
(Modifier_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Diacritic
| Other_Lowercase
| Alphabetic
| Cased
| Case_Ignorable
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#7B# .. 16#7D# => -- 037B .. 037D
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#7E# => -- 037E
(Other_Punctuation, Neutral,
Other, Mid_Num, Other, Infix_Numeric,
(Terminal_Punctuation
| Grapheme_Base
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#7F# => -- 037F
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#80# .. 16#83# => -- 0380 .. 0383
(Unassigned, Neutral,
Other, Other, Other, Unknown,
(others => False)),
16#84# .. 16#85# => -- 0384 .. 0385
(Modifier_Symbol, Neutral,
Other, Other, Other, Alphabetic,
(Diacritic
| Case_Ignorable
| Grapheme_Base
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#86# => -- 0386
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#87# => -- 0387
(Other_Punctuation, Neutral,
Other, Mid_Letter, Other, Alphabetic,
(Other_ID_Continue
| Terminal_Punctuation
| Case_Ignorable
| Grapheme_Base
| ID_Continue
| XID_Continue
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#88# .. 16#8A# => -- 0388 .. 038A
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#8B# => -- 038B
(Unassigned, Neutral,
Other, Other, Other, Unknown,
(others => False)),
16#8C# => -- 038C
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#8D# => -- 038D
(Unassigned, Neutral,
Other, Other, Other, Unknown,
(others => False)),
16#8E# .. 16#8F# => -- 038E .. 038F
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#90# => -- 0390
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#91# .. 16#A1# => -- 0391 .. 03A1
(Uppercase_Letter, Ambiguous,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#A2# => -- 03A2
(Unassigned, Neutral,
Other, Other, Other, Unknown,
(others => False)),
16#A3# .. 16#A9# => -- 03A3 .. 03A9
(Uppercase_Letter, Ambiguous,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#AA# .. 16#AB# => -- 03AA .. 03AB
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#AC# .. 16#B0# => -- 03AC .. 03B0
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#B1# .. 16#C1# => -- 03B1 .. 03C1
(Lowercase_Letter, Ambiguous,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#C2# => -- 03C2
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#C3# .. 16#C9# => -- 03C3 .. 03C9
(Lowercase_Letter, Ambiguous,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#CA# .. 16#CE# => -- 03CA .. 03CE
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#CF# => -- 03CF
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#D0# .. 16#D1# => -- 03D0 .. 03D1
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Other_Math
| Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| Math
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#D2# => -- 03D2
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Other_Math
| Alphabetic
| Cased
| Grapheme_Base
| ID_Continue
| ID_Start
| Math
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#D3# .. 16#D4# => -- 03D3 .. 03D4
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#D5# => -- 03D5
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Other_Math
| Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| Math
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#D6# => -- 03D6
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#D7# => -- 03D7
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#D8# => -- 03D8
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#D9# => -- 03D9
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#DA# => -- 03DA
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#DB# => -- 03DB
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#DC# => -- 03DC
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#DD# => -- 03DD
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#DE# => -- 03DE
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#DF# => -- 03DF
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#E0# => -- 03E0
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#E1# => -- 03E1
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#E2# => -- 03E2
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#E3# => -- 03E3
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#E4# => -- 03E4
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#E5# => -- 03E5
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#E6# => -- 03E6
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#E7# => -- 03E7
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#E8# => -- 03E8
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#E9# => -- 03E9
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#EA# => -- 03EA
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#EB# => -- 03EB
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#EC# => -- 03EC
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#ED# => -- 03ED
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#EE# => -- 03EE
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#EF# => -- 03EF
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#F0# .. 16#F1# => -- 03F0 .. 03F1
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Other_Math
| Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| Math
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#F2# => -- 03F2
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#F3# => -- 03F3
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Soft_Dotted
| Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#F4# => -- 03F4
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Other_Math
| Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Math
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#F5# => -- 03F5
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Other_Math
| Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| Math
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#F6# => -- 03F6
(Math_Symbol, Neutral,
Other, Other, Other, Alphabetic,
(Grapheme_Base
| Math => True,
others => False)),
16#F7# => -- 03F7
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#F8# => -- 03F8
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#F9# .. 16#FA# => -- 03F9 .. 03FA
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
16#FB# => -- 03FB
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Uppercased
| Changes_When_Titlecased
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#FC# => -- 03FC
(Lowercase_Letter, Neutral,
Other, A_Letter, Lower, Alphabetic,
(Alphabetic
| Cased
| Grapheme_Base
| ID_Continue
| ID_Start
| Lowercase
| XID_Continue
| XID_Start => True,
others => False)),
16#FD# .. 16#FF# => -- 03FD .. 03FF
(Uppercase_Letter, Neutral,
Other, A_Letter, Upper, Alphabetic,
(Alphabetic
| Cased
| Changes_When_Lowercased
| Changes_When_Casefolded
| Changes_When_Casemapped
| Grapheme_Base
| ID_Continue
| ID_Start
| Uppercase
| XID_Continue
| XID_Start
| Changes_When_NFKC_Casefolded => True,
others => False)),
others =>
(Nonspacing_Mark, Ambiguous,
Extend, Extend, Extend, Combining_Mark,
(Diacritic
| Case_Ignorable
| Grapheme_Extend
| ID_Continue
| XID_Continue => True,
others => False)));
end Matreshka.Internals.Unicode.Ucd.Core_0003;
|
programs/oeis/001/A001963.asm | karttu/loda | 1 | 90829 | <reponame>karttu/loda
; A001963: Wythoff game.
; 0,1,2,4,5,6,7,8,10,11,12,13,15,16,17,18,20,21,22,23,25,26,27,28,29,31,32,33,34,36,37,38,39,41,42,43,44,46,47,48,49,50,52,53,54,55,57,58,59,60,62,63,64,65,67,68,69,70,72,73,74,75,76,78,79,80,81,83,84,85,86,88,89,90,91,93,94,95,96,97,99,100,101,102,104,105,106,107,109,110,111,112,114,115,116,117,118,120,121,122,123,125,126,127,128,130,131,132,133,135,136,137,138,139,141,142,143,144,146,147,148,149,151,152,153,154,156,157,158,159,160,162,163,164,165,167,168,169,170,172,173,174,175,177,178,179,180,182,183,184,185,186,188,189,190,191,193,194,195,196,198,199,200,201,203,204,205,206,207,209,210,211,212,214,215,216,217,219,220,221,222,224,225,226,227,228,230,231,232,233,235,236,237,238,240,241,242,243,245,246,247,248,249,251,252,253,254,256,257,258,259,261,262,263,264,266,267,268,269,271,272,273,274,275,277,278,279,280,282,283,284,285,287,288,289,290,292,293,294,295,296,298,299,300,301,303,304,305,306,308
mul $0,2
cal $0,1965 ; Wythoff game.
div $0,2
mov $1,$0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.