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
agda-stdlib/src/Data/List/Membership/Propositional/Properties/WithK.agda
DreamLinuxer/popl21-artifact
5
10605
<filename>agda-stdlib/src/Data/List/Membership/Propositional/Properties/WithK.agda ------------------------------------------------------------------------ -- The Agda standard library -- -- Properties related to propositional list membership, that rely on -- the K rule ------------------------------------------------------------------------ {-# OPTIONS --with-K --safe #-} module Data.List.Membership.Propositional.Properties.WithK where open import Data.List.Base open import Data.List.Relation.Unary.Unique.Propositional open import Data.List.Membership.Propositional import Data.List.Membership.Setoid.Properties as Membershipₛ open import Relation.Unary using (Irrelevant) open import Relation.Binary.PropositionalEquality as P using (_≡_) open import Relation.Binary.PropositionalEquality.WithK ------------------------------------------------------------------------ -- Irrelevance unique⇒irrelevant : ∀ {a} {A : Set a} {xs : List A} → Unique xs → Irrelevant (_∈ xs) unique⇒irrelevant = Membershipₛ.unique⇒irrelevant (P.setoid _) ≡-irrelevant
mc-sema/validator/x86/tests/RCL16ri.asm
randolphwong/mcsema
2
21760
BITS 32 ;TEST_FILE_META_BEGIN ;TEST_TYPE=TEST_F ;TEST_IGNOREFLAGS=FLAG_OF ;TEST_FILE_META_END ; RCL16ri mov cx, 0x545 ;TEST_BEGIN_RECORDING rcl cx, 0x8 ;TEST_END_RECORDING
src/wfc.ads
98devin/ada-wfc
9
4070
generic type Element_Type is private; -- The type of picture elements within the input. type Element_Matrix is array (Natural range <>, Natural range <>) of Element_Type; -- The array type we'll take as input and provide as output. -- We treat these as a toroidal surface which infinitely tiles. with function "<" (E1, E2 : Element_Type) return Boolean is <>; with function "=" (E1, E2 : Element_Type) return Boolean is <>; -- Because the element type might be a record, we don't -- constrain it to be discrete, but for various purposes -- we at least require it to be orderable. package WFC is subtype Tile_ID is Positive; -- A tile represents a part of the input array as a submatrix of elements. -- Because passing around arrays by value is -- more expensive, instead we represent tiles as -- indices into arrays of their properties, for simplicity. type Tile_Element_Array is array (Tile_ID range <>) of Element_Type; -- Mapping the id to the tile itself is somewhat -- more than required, as each tile contributes only one -- pixel to the output. Here, we map each tile to -- the pixel it will contribute. The adjacency information -- will guarantee their combined behavior is as desired. type Frequency_Array is array (Tile_ID range <>) of Natural; -- Mapping each tile to its frequency in the input type Adjacency_Direction is (Upwards, Downwards, Leftwards, Rightwards); -- The directions in which we record tile adjacency information. type Adjacency is array (Adjacency_Direction) of Boolean with Pack; -- A bitvector recording for each direction -- whether there is an adjacency. type Adjacency_Matrix is array (Tile_ID range <>, Tile_ID range <>) of Adjacency with Pack; -- For every pair of tiles, we store whether they are -- allowed to be adjacent to each other, in each direction. -- For efficiency we also pack together the bitvectors; -- when the number of tiles is large this still becomes the majority -- of the data we need to store, even when each adjacency -- is stored in one bit. type Small_Integer is mod 2 ** 16; -- This only needs to be large enough to hold a number -- as high as a particular instance's Num_Tiles value. -- -- The necessary size of adjacency matrices in the general case -- becomes far larger than is reasonable long before -- the number of tiles reaches 65536, but more than 255 tiles -- is possible, so we just use two bytes to count enablers. type Enablers_By_Direction is array (Adjacency_Direction) of Small_Integer with Pack; type Enabler_Counts is array (Tile_ID range <>) of Enablers_By_Direction; -- The number of "enablers" of a particular tile -- in a direction is the number of other tiles which -- can be adjacent in that direction. type Instance (Num_Tiles : Natural) is tagged record Tile_Elements : Tile_Element_Array (1 .. Num_Tiles); Frequency_Total : Natural; Frequencies : Frequency_Array (1 .. Num_Tiles); Adjacencies : Adjacency_Matrix (1 .. Num_Tiles, 1 .. Num_Tiles); Enablers : Enabler_Counts (1 .. Num_Tiles); end record; -- All information we need to record about a particular input -- in order to generate similar outputs via wave function collapse. function Initialize_From_Sample ( Sample : in Element_Matrix; Include_Rotations : in Boolean := False; Include_Reflections : in Boolean := False; N, M : in Positive := 2 ) return Instance; -- Create an instantiation representing the empirical tile and frequency -- information from a sample matrix provided. If desired, -- this information will be combined with rotated and reflected -- versions of the tiles for more variety. The size of each tile -- is specified with the N and M parameters. function Collapse_Within (Parameters : in Instance; World : out Element_Matrix) return Boolean; -- Given an instance and a matrix to populate, attempt a wave function -- collapse within the space with the tiles from the parameters. -- This is an operation which is (although likely) not guaranteed to -- succeed, and so the return value indicates whether it was successful. -- -- If this fails many times it may indicate that the tileset is unable -- to seamlessly tile a matrix of the size given; this may happen if -- the size of a single tile is larger than the matrix especially, or -- if every tile in the sample used to create the instance was unique, -- leading to a tileset which can only tile spaces with size equal -- to the sample modulo its dimensions. -- -- In such cases the recommendation is simply to use larger samples, -- or decrease the N/M tile parameter until there is wider representation -- of different tiles and adjacencies. generic type X_Dim is range <>; type Y_Dim is range <>; package Extended_Interfaces is -- If more control over generation, data structures, etc. -- is required, then the extended interfaces package -- provides an way of allowing more internals of the collapse -- algorithm to be inspected or configured as need be. type Collapse_Info is interface; -- For the more generic collapsing procedure, we allow returning -- information to the user by querying an instance of this type. function Is_Possible ( Info : in Collapse_Info; X : in X_Dim; Y : in Y_Dim; E : in Element_Type) return Boolean is abstract; function Is_Possible ( Info : in Collapse_Info; X : in X_Dim; Y : in Y_Dim; T : in Tile_ID) return Boolean is abstract; -- Determine whether it's possible for a particular element or -- tile_id to occur at the position specified. type Collapse_Settings is interface and Collapse_Info; -- This type not only allows querying information -- about what is possible, but also configuring -- certain requirements within the procedure Require (Info : in Collapse_Settings; X : in X_Dim; Y : in Y_Dim; E : in Element_Type) is abstract; procedure Require (Info : in Collapse_Settings; X : in X_Dim; Y : in Y_Dim; T : in Tile_ID) is abstract; -- inject requirements for certain positions to have -- certain tile or element values. generic with procedure Set_Resulting_Element (X : X_Dim; Y : Y_Dim; Element : Element_Type) is <>; with procedure Set_Initial_Requirements (Info : in Collapse_Settings'Class) is null; with procedure Upon_Collapse (X : X_Dim; Y : Y_Dim; Info : in Collapse_Info'Class) is null; with procedure Upon_Removal (X : X_Dim; Y : Y_Dim; Info : in Collapse_Info'Class) is null; function Generic_Collapse_Within (Parameters : in Instance) return Boolean; end; end;
oeis/174/A174325.asm
neoneye/loda-programs
11
18701
; A174325: Trisection A061037(3*n-2) of the Balmer spectrum numerators extended to negative indices. ; 0,-3,3,45,6,165,63,357,30,621,195,957,72,1365,399,1845,132,2397,675,3021,210,3717,1023,4485,306,5325,1443,6237,420,7221,1935,8277,552,9405,2499,10605,702,11877,3135,13221,870,14637,3843,16125,1056,17685,4623,19317,1260,21021,5475,22797,1482,24645,6399,26565,1722,28557,7395,30621,1980,32757,8463,34965,2256,37245,9603,39597,2550,42021,10815,44517,2862,47085,12099,49725,3192,52437,13455,55221,3540,58077,14883,61005,3906,64005,16383,67077,4290,70221,17955,73437,4692,76725,19599,80085,5112,83517 mul $0,3 seq $0,181829 ; a(n) = 4*A060819(n-2)*A060819(n+2). mul $0,12671122464000 div $0,50684489856000
3-mid/physics/implement/box2d/source/thin/box2d_c-joint_cursor.ads
charlie5/lace
20
2534
<filename>3-mid/physics/implement/box2d/source/thin/box2d_c-joint_cursor.ads -- This file is generated by SWIG. Please do *not* modify by hand. -- with interfaces.C; package box2d_c.joint_Cursor is -- Item -- type Item is record Joint : access box2d_c.b2Joint; end record; -- Items -- type Items is array (interfaces.C.Size_t range <>) of aliased box2d_c.joint_Cursor.Item; -- Pointer -- type Pointer is access all box2d_c.joint_Cursor.Item; -- Pointers -- type Pointers is array (interfaces.C.Size_t range <>) of aliased box2d_c.joint_Cursor.Pointer; -- Pointer_Pointer -- type Pointer_Pointer is access all box2d_c.joint_Cursor.Pointer; function construct return box2d_c.joint_Cursor.Item; private pragma Import (C, construct, "Ada_new_joint_Cursor"); end box2d_c.joint_Cursor;
source/gmp-z.ads
ytomino/gmp-ada
4
30445
<filename>source/gmp-z.ads<gh_stars>1-10 private with Ada.Finalization; private with Ada.Streams; package GMP.Z is pragma Preelaborate; type MP_Integer is private; -- conversions function To_MP_Integer (X : Long_Long_Integer) return MP_Integer; -- formatting function Image (Value : MP_Integer; Base : Number_Base := 10) return String; function Value (Image : String; Base : Number_Base := 10) return MP_Integer; -- relational operators function "=" (Left, Right : MP_Integer) return Boolean; function "<" (Left, Right : MP_Integer) return Boolean; function ">" (Left, Right : MP_Integer) return Boolean; function "<=" (Left, Right : MP_Integer) return Boolean; function ">=" (Left, Right : MP_Integer) return Boolean; -- unary adding operators function "+" (Right : MP_Integer) return MP_Integer; function "-" (Right : MP_Integer) return MP_Integer; -- binary adding operators function "+" (Left, Right : MP_Integer) return MP_Integer; function "-" (Left, Right : MP_Integer) return MP_Integer; -- multiplying operators function "*" (Left, Right : MP_Integer) return MP_Integer; function "/" (Left, Right : MP_Integer) return MP_Integer; -- highest precedence operators function "**" (Left : MP_Integer; Right : Natural) return MP_Integer; -- subprograms of a scalar type function Copy_Sign (Value, Sign : MP_Integer) return MP_Integer; function Copy_Sign (Value : MP_Integer; Sign : Integer) return MP_Integer; function Copy_Sign (Value : Integer; Sign : MP_Integer) return Integer; private package Controlled is type MP_Integer is private; function Reference (Item : in out Z.MP_Integer) return not null access C.gmp.mpz_struct; function Constant_Reference (Item : Z.MP_Integer) return not null access constant C.gmp.mpz_struct; pragma Inline (Reference); pragma Inline (Constant_Reference); private type MP_Integer is new Ada.Finalization.Controlled with record Raw : aliased C.gmp.mpz_t := (others => (others => <>)); end record; overriding procedure Initialize (Object : in out MP_Integer); overriding procedure Adjust (Object : in out MP_Integer); overriding procedure Finalize (Object : in out MP_Integer); end Controlled; type MP_Integer is new Controlled.MP_Integer; procedure Read ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : out MP_Integer); procedure Write ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : in MP_Integer); for MP_Integer'Read use Read; for MP_Integer'Write use Write; procedure Read ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : not null access C.gmp.mpz_struct); procedure Write ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : not null access constant C.gmp.mpz_struct); end GMP.Z;
book-01/Assembly/asm/avx/packed/avx_p_y_permute_float.asm
gfurtadoalmeida/study-assembly-x64
2
166882
<reponame>gfurtadoalmeida/study-assembly-x64 .code ; void AVX_Packed_Y_Permute_Float_(YmmVal * src, YmmVal * des, YmmVal * indexes) AVX_Packed_Y_Permute_Float_ proc vmovaps ymm0, ymmword ptr [rcx] ; src vmovdqa ymm1, ymmword ptr [r8] ; indexes ; Rearrange the items in src according to the indexes control. vpermps ymm2, ymm1, ymm0 vmovaps ymmword ptr [rdx], ymm2 vzeroupper ret AVX_Packed_Y_Permute_Float_ endp end
token.asm
mossx-dev/Mycore
0
246477
<reponame>mossx-dev/Mycore ;; Author: <NAME> ;; Date: 21-Oct-21 %ifndef _mycelium_token_ %define _mycelium_token_ %include "std/sys.asm" %include "std/str.asm" %include "std/tuple.asm" section .data token#binary#math#plus#code: equ 0x0 token#binary#math#plus#cstr: db "+", 0 token#binary#math#minus#code: equ 0x1 token#binary#math#minus#cstr: db "-", 0 token#binary#math#mul#code: equ 0x2 token#binary#math#mul#cstr: db "*", 0 token#binary#math#div#code: equ 0x3 token#binary#math#div#cstr: db "/", 0 token#binary#math#mod#code: equ 0x4 token#binary#math#mod#cstr: db "%", 0 token#binary#math#assign#code: equ 0x5 token#binary#math#assing#cstr: db "=", 0 token#binary#logic#eq#code: equ 0x0 token#binary#logic#eq#cstr: db "==", 0 token#binary#logic#neq#code: equ 0x1 token#binary#logic#neq#cstr: db "!=", 0 token#binary#logic#less#code: equ 0x2 token#binary#logic#less#cstr: db "<", 0 token#binary#logic#less_eq#code: equ 0x3 token#binary#logic#less_eq#cstr: db "<=", 0 token#binary#logic#greater#code: equ 0x4 token#binary#logic#greater#cstr: db ">", 0 token#binary#logic#greater_eq#code: equ 0x5 token#binary#logic#greater_eq#cstr: db ">=", 0 token#binary#logic#and#code: equ 0x6 token#binary#logic#and#cstr: db "&&", 0 token#binary#logic#or#code: equ 0x7 token#binary#logic#or#cstr: db "||", 0 token#unary#inc#code: equ 0x0 token#unary#inc#cstr: db "++", 0 token#unary#dec#code: equ 0x1 token#unary#dec#cstr: db "--", 0 token#unary#not#code: equ 0x2 token#unary#not#cstr: db "!", 0 token#bitwise#shl#code: equ 0x0 token#bitwise#shl#cstr: db "<<", 0 token#bitwise#shr#code: equ 0x1 token#bitwise#shr#cstr: db ">>", 0 token#bitwise#and#code: equ 0x2 token#bitwise#and#cstr: db "&", 0 token#bitwise#or#code: equ 0x3 token#bitwise#or#cstr: db "|", 0 token#bitwise#not#code: equ 0x4 token#bitwise#not#cstr: db "~", 0 token#whitespace#space#code: equ 0x0 token#whitespace#space#cstr: db " ", 0 token#whitespace#tab#code: equ 0x1 token#whitespace#tab#cstr: db " ", 0 token#grouping#open#para#code: equ 0x0 token#grouping#open#para#cstr: db "(", 0 token#grouping#close#para#code: equ 0x1 token#grouping#close#para#cstr: db ")", 0 token#grouping#open#curly#code: equ 0x2 token#grouping#open#curly#cstr: db "{", 0 token#grouping#close#curly#code: equ 0x3 token#grouping#close#curly#cstr: db "}", 0 token#grouping#open#bracket#code: equ 0x4 token#grouping#open#bracket#cstr: db "[", 0 token#grouping#close#bracket#code: equ 0x5 token#grouping#close#bracket#cstr: db "]", 0 token#keyword#func#code: equ 0x0 token#keyword#func#cstr: db "fn", 0 token#keyword#oper#code: equ 0x1 token#keyword#oper#cstr: db "op", 0 token#keyword#cond#code: equ 0x2 token#keyword#cond#cstr: db "cn", 0 token#mov: db "mov ", 0 token#add: db "add ", 0 token#sub: db "sub ", 0 token#call: db "call ", 0 token#rax: db "rax", 0 token#rbx: db "rbx", 0 token#rcx: db "rcx", 0 token#rdx: db "rdx", 0 token#rsi: db "rsi", 0 token#comma: db ", ", 0 token#type#number: equ 0x1 token#type#binary_op: equ 0x2 token#type#logic_op: equ 0x3 token#type#bitwise_op: equ 0x4 token#type#unary_op: equ 0x5 token#type#whitespace: equ 0x6 token#type#grouping: equ 0x7 token#type#word: equ 0x8 token#type#func: equ 0x9 token#type#keyword: equ 0xa token#type#new_line: equ 0x0 section .bss token#binary#math#plus#str: resq 1 token#binary#math#minus#str: resq 1 token#binary#math#mul#str: resq 1 token#binary#math#div#str: resq 1 token#binary#math#mod#str: resq 1 token#ops#binary#math: resq 1 token#binary#logic#eq#str: resq 1 token#binary#logic#neq#str: resq 1 token#binary#logic#shl#str: resq 1 token#binary#logic#shr#str: resq 1 token#binary#logic#less#str: resq 1 token#binary#logic#less_eq#str: resq 1 token#binary#logic#greater#str: resq 1 token#binary#logic#greater_eq#str: resq 1 token#binary#logic#and#str: resq 1 token#binary#logic#or#str: resq 1 token#binary#bitwise#and#str: resq 1 token#binary#bitwise#or#str: resq 1 token#ops#binary#logic: resq 1 token#unary#inc#str: resq 1 token#unary#dec#str: resq 1 token#unary#not#str: resq 1 token#ops#unary: resq 1 token#bitwise#shl#str: resq 1 token#bitwise#shr#str: resq 1 token#bitwise#and#str: resq 1 token#bitwise#or#str: resq 1 token#bitwise#not#str: resq 1 token#ops#bitwise: resq 1 token#whitespace#space#str: resq 1 token#whitespace#tab#str: resq 1 token#ops#whitespace: resq 1 token#grouping#open#para#str: resq 1 token#grouping#close#para#str: resq 1 token#grouping#open#curly#str: resq 1 token#grouping#close#curly#str: resq 1 token#grouping#open#bracket#str: resq 1 token#grouping#close#bracket#str: resq 1 token#ops#grouping: resq 1 token#keyword#func#str: resq 1 token#keyword#oper#str: resq 1 token#keyword#cond#str: resq 1 token#ops#keyword: resq 1 section .data token#ops: dq 0, token#ops#binary#math, token#ops#binary#logic, token#ops#bitwise, token#ops#unary, token#ops#whitespace, token#ops#grouping, 0, 0, token#ops#keyword token#num_types: equ token#type#keyword+1 section .text ; Args ; rax: cstr ; rbx: str ; rcx: arr ; Returns ; void token#make: push rax push rbx call str#new_cs pop rbx pop rax mov [rbx], rsi mov rbx, rsi mov rax, rcx call arr~push ret ; Args ; void ; Returns ; void token#binary#math#generate: mov rax, 0 mov rbx, type#string call arr#new mov [token#ops#binary#math], rsi mov rcx, rsi mov rax, token#binary#math#plus#cstr mov rbx, token#binary#math#plus#str call token#make mov rax, token#binary#math#minus#cstr mov rbx, token#binary#math#minus#str call token#make mov rax, token#binary#math#mul#cstr mov rbx, token#binary#math#mul#str call token#make mov rax, token#binary#math#div#cstr mov rbx, token#binary#math#div#str call token#make mov rax, token#binary#math#mod#cstr mov rbx, token#binary#math#mod#str call token#make %ifdef _mycelium_debug_ mov rax, [token#ops#binary#math] call arr~println %endif ret ; Args ; void ; Returns ; void token#binary#logic#generate: mov rax, 0 mov rbx, type#string call arr#new mov [token#ops#binary#logic], rsi mov rcx, rsi mov rax, token#binary#logic#eq#cstr mov rbx, token#binary#logic#eq#str call token#make mov rax, token#binary#logic#neq#cstr mov rbx, token#binary#logic#neq#str call token#make mov rax, token#binary#logic#less#cstr mov rbx, token#binary#logic#less#str call token#make mov rax, token#binary#logic#less_eq#cstr mov rbx, token#binary#logic#less_eq#str call token#make mov rax, token#binary#logic#greater#cstr mov rbx, token#binary#logic#greater#str call token#make mov rax, token#binary#logic#greater_eq#cstr mov rbx, token#binary#logic#greater_eq#str call token#make mov rax, token#binary#logic#and#cstr mov rbx, token#binary#logic#and#str call token#make mov rax, token#binary#logic#or#cstr mov rbx, token#binary#logic#or#str call token#make %ifdef _mycelium_debug_ mov rax, [token#ops#binary#logic] call arr~println %endif ret ; Args ; void ; Returns ; void token#unary#generate: mov rax, 0 mov rbx, type#string call arr#new mov [token#ops#unary], rsi mov rcx, rsi mov rax, token#unary#inc#cstr mov rbx, token#unary#inc#str call token#make mov rax, token#unary#dec#cstr mov rbx, token#unary#dec#str call token#make mov rax, token#unary#not#cstr mov rbx, token#unary#not#str call token#make %ifdef _mycelium_debug_ mov rax, [token#ops#unary] call arr~println %endif ret ; Args ; void ; Returns ; void token#keyword#generate: mov rax, 0 mov rbx, type#string call arr#new mov [token#ops#keyword], rsi mov rcx, rsi mov rax, token#keyword#func#cstr mov rbx, token#keyword#func#str call token#make mov rax, token#keyword#oper#cstr mov rbx, token#keyword#oper#str call token#make mov rax, token#keyword#cond#cstr mov rbx, token#keyword#cond#str call token#make %ifdef _mycelium_debug_ mov rax, [token#ops#keyword] call arr~println %endif ret ; Args ; void ; Returns ; void token#bitwise#generate: mov rax, 0 mov rbx, type#string call arr#new mov [token#ops#bitwise], rsi mov rcx, rsi mov rax, token#bitwise#shl#cstr mov rbx, token#bitwise#shl#str call token#make mov rax, token#bitwise#shr#cstr mov rbx, token#bitwise#shr#str call token#make mov rax, token#bitwise#and#cstr mov rbx, token#bitwise#and#str call token#make mov rax, token#bitwise#or#cstr mov rbx, token#bitwise#or#str call token#make mov rax, token#bitwise#not#cstr mov rbx, token#bitwise#not#str call token#make %ifdef _mycelium_debug_ mov rax, [token#ops#bitwise] call arr~println %endif ret ; Args ; void ; Returns ; void token#whitespace#generate: mov rax, 0 mov rbx, type#string call arr#new mov [token#ops#whitespace], rsi mov rcx, rsi mov rax, token#whitespace#space#cstr mov rbx, token#whitespace#space#str call token#make mov rax, token#whitespace#tab#cstr mov rbx, token#whitespace#tab#str call token#make %ifdef _mycelium_debug_ mov rax, [token#ops#whitespace] call arr~println %endif ret ; Args ; void ; Returns ; void token#grouping#generate: mov rax, 0 mov rbx, type#string call arr#new mov [token#ops#grouping], rsi mov rcx, rsi mov rax, token#grouping#open#para#cstr mov rbx, token#grouping#open#para#str call token#make mov rax, token#grouping#close#para#cstr mov rbx, token#grouping#close#para#str call token#make mov rax, token#grouping#open#curly#cstr mov rbx, token#grouping#open#curly#str call token#make mov rax, token#grouping#close#curly#cstr mov rbx, token#grouping#close#curly#str call token#make mov rax, token#grouping#open#bracket#cstr mov rbx, token#grouping#open#bracket#str call token#make mov rax, token#grouping#close#bracket#cstr mov rbx, token#grouping#close#bracket#str call token#make %ifdef _mycelium_debug_ mov rax, [token#ops#grouping] call arr~println %endif ret ret ; Args ; void ; Returns ; void token#generate: call token#binary#math#generate call token#binary#logic#generate call token#unary#generate call token#bitwise#generate call token#whitespace#generate call token#grouping#generate call token#keyword#generate ret ; Args ; void ; Returns ; void token#del: push r8 ; counter push r9 ; ops array push r10 ; array size lea r9, [token#ops] mov r10, token#num_types xor r8, r8 jmp .loop_check .loop: mov rax, r9 mov rbx, r8 shl rbx, 3 ; rbx * 8 mov rax, [rax + rbx] cmp rax, 0 je .no_del call arr~del .no_del: add r8, 1 .loop_check: cmp r8, r10 jl .loop pop r10 pop r9 pop r8 ret ; Args ; rax: token ; Returns ; rsi: type token.get_data_type: push r8 ; token type push r9 ; token mov r9, rax mov rbx, 0 call tuple~get ; rsi = token[0] a.k.a rsi = token.type (token type not data type) mov r8, rsi ;; -- Switch -- cmp r8, token#type#number je .case_number cmp r8, token#type#word je .case_word cmp r8, token#type#binary_op je .case_op cmp r8, token#type#logic_op je .case_op cmp r8, token#type#bitwise_op je .case_op cmp r8, token#type#unary_op je .case_op jmp .default .case_string: mov rsi, type#string jmp .switch_end .case_number: mov rsi, type#int jmp .switch_end .case_word: mov rax, exception~compiletime~not_implemented call exception~compiletime~throw .case_op: mov rsi, type#op jmp .switch_end .default: mov rsi, -1 .switch_end: pop r9 pop r8 ret ; Args ; rax: token str ; rbx: token type ; Returns ; rsi: token code token#get_code: push r8 ; counter push r9 ; token push r10 ; num tokens push r11 ; token array xor r8, r8 mov r9, rax mov rax, rbx call token#get_array_from_type mov r11, rsi cmp rsi, -1 je .no_code .loop: lea rax, [r11] mov rbx, r8 call arr~get mov rax, rsi mov rbx, 1 call tuple~get mov rax, rsi mov rbx, r9 call str~eq je .found .loop_check: cmp r8, r10 jl .loop .not_found: mov rax, exception~compiletime~bad_token mov rbx, r9 call exception~runtime~throw .found: mov rsi, r8 jmp .return .no_code: mov rsi, -1 .return: pop r11 pop r10 pop r9 pop r8 ret ; Args ; rax: type ; Return ; rsi: array token#get_array_from_type: mov rsi, -1 cmp rax, token#type#whitespace jg .return shl rax, 3 ; Multiply by 8 (pointer size) mov rbx, [token#ops] mov rsi, [rbx + rax] .return: ret ; Args ; rax: token str ; Returns ; rsi: token code ;;; FIXME: Not Implemented token#get_var: mov rsi, -1 ret push r8 ; counter push r9 ; token push r10 ; num tokens push r11 ; token array xor r8, r8 mov r9, rax mov r11, [token#ops#binary#math] mov rax, r9 call str~is_int jnz .return ; ignore nums their parsed in other places .loop: lea rax, [r11] mov rbx, r8 call arr~get mov rax, rsi mov rbx, 1 call tuple~get mov rax, rsi mov rbx, r9 call arr~compare je .found .loop_check: cmp r8, r10 jl .loop .not_found: mov rax, exception~compiletime~bad_token mov rbx, r9 call exception~runtime~throw .found: lea rax, [r11] mov rbx, r8 call arr~get mov rax, rsi mov rbx, 0 call tuple~get .return: pop r11 pop r10 pop r9 pop r8 ret %endif
programs/oeis/327/A327625.asm
karttu/loda
0
166967
; A327625: Expansion of Sum_{k>=0} x^(3^k) / (1 - x^(3^k))^2. ; 1,2,4,4,5,8,7,8,13,10,11,16,13,14,20,16,17,26,19,20,28,22,23,32,25,26,40,28,29,40,31,32,44,34,35,52,37,38,52,40,41,56,43,44,65,46,47,64,49,50,68,52,53,80,55,56,76,58,59,80,61,62,91,64,65,88,67,68,92,70,71,104,73,74,100,76,77,104,79,80,121,82,83,112,85,86,116,88,89,130,91,92,124,94,95,128,97,98,143,100,101,136,103,104,140,106,107,160,109,110,148,112,113,152,115,116,169,118,119,160,121,122,164,124,125,182,127,128,172,130,131,176,133,134,200,136,137,184,139,140,188,142,143,208,145,146,196,148,149,200,151,152,221,154,155,208,157,158,212,160,161,242,163,164,220,166,167,224,169,170,247,172,173,232,175,176,236,178,179,260,181,182,244,184,185,248,187,188,280,190,191,256,193,194,260,196,197,286,199,200,268,202,203,272,205,206,299,208,209,280,211,212,284,214,215,320,217,218,292,220,221,296,223,224,325,226,227,304,229,230,308,232,233,338,235,236,316,238,239,320,241,242,364,244,245,328,247,248,332,250 mov $8,$0 mov $10,2 lpb $10,1 clr $0,8 mov $0,$8 sub $10,1 add $0,$10 lpb $0,1 add $1,$0 mov $2,$0 div $0,3 pow $2,2 add $1,$2 lpe mov $11,$10 lpb $11,1 mov $9,$1 sub $11,1 lpe lpe lpb $8,1 mov $8,0 sub $9,$1 lpe mov $1,$9 sub $1,2 div $1,2 add $1,1
lib/controller.scpt
atsuya/youtube-playlist-control
1
3051
<reponame>atsuya/youtube-playlist-control on control(direction) set code to " var direction = " & direction & "; var event = new MouseEvent('click', { 'view': window, 'bubbles': true, 'cancelable': true }); var classNames = { 'next': ['yt-uix-button-icon-watch-appbar-play-next', 'yt-uix-button-icon-watch-queue-next'], 'previous': ['yt-uix-button-icon-watch-appbar-play-prev', 'yt-uix-button-icon-watch-queue-prev'], 'play': ['ytp-button-play', 'yt-uix-button-icon-watch-appbar-play-play', 'yt-uix-button-icon-watch-queue-play'], 'pause': ['ytp-button-pause', 'yt-uix-button-icon-watch-appbar-play-pause', 'yt-uix-button-icon-watch-queue-pause'] }; var className = classNames[direction]; var theClassName = null; className.forEach(function each(klass) { if (document.getElementsByClassName(klass)[0] !== undefined) { console.log('found: ' + klass); if (!theClassName) { theClassName = klass; } } }); if (theClassName) { console.log('using: ' + theClassName); var nextButton = document.getElementsByClassName(theClassName)[0] nextButton.dispatchEvent(event); } " set targetTab to activeTab() of me executeJavaScript(targetTab, code) of me end control on activeTab() set targetTab to null tell application "Google Chrome" repeat with theWindow in every window repeat with theTab in every tab of theWindow if theTab's title ends with "- YouTube" then set targetTab to theTab exit repeat end if end repeat end repeat end tell return targetTab end activeTab on executeJavaScript(activeTab, code) set result to null tell application "Google Chrome" tell activeTab to set URL to "javascript:" & code end tell return result end executeJavaScript
libsrc/_DEVELOPMENT/adt/wv_priority_queue/c/sccz80/wv_priority_queue_resize_callee.asm
teknoplop/z88dk
8
97913
; int wv_priority_queue_resize(wv_priority_queue_t *q, size_t n) SECTION code_clib SECTION code_adt_wv_priority_queue PUBLIC wv_priority_queue_resize_callee EXTERN wa_priority_queue_resize_callee defc wv_priority_queue_resize_callee = wa_priority_queue_resize_callee
FinderSyncExtension/Scripts/newFile.scpt
Musk66/FinderGo-Modify
6
166
<filename>FinderSyncExtension/Scripts/newFile.scpt tell application "Finder" make new file at (the target of the front window) as alias end tell
util/thg/entry.asm
olifink/smsqe
0
89530
* Entry point for thing manipulation v0.00  Feb 1988 J.R.Oakley QJUMP * section thing * include 'dev8_keys_err' include 'dev8_keys_68000' include 'dev8_keys_qdos_sms' include 'dev8_keys_qdos_ioa' * xref th_lthg xref th_rthg xref th_uthg xref th_fthg xref th_zthg xref th_nthg xref th_nthu * xdef th_entry xdef th_enfix xdef th_exit xdef th_exitd3 utimeout equ 8 * th_enfix bset #15,d0 ; set fixed flag *+++ * This entry point is for calling from user mode: in SMS2 it would be * replaced by a TRAP #1, and the entry vectors added in with the rest. * The parameters are exactly the same as for the SMS2 version, though. * Under QDOS, all calls to SMS.ZTHG must be made in user mode, as * must calls to FTHG on behalf of another Job. * * Registers: * Entry Exit * D0 key error code * D1 Job ID or -1 (UTHG, FTHG) preserved * D2 additional parameter additional return (U/FTHG) * job ID (NTHU) * D3 additional parameter preserved (FTHG) * timeout version ID (UTHG) * A0 name of thing (all but LTHG) preserved * A1 pointer to thing linkage (LTHG) * pointer to thing (UTHG) * pointer to usage block next usage block (NTHU) * A2 additional parameter additional return (U/FTHG) * * D0 call and return values may be: * SMS.LTHG link in thing FEX thing already exists * SMS.RTHG remove thing FDIU thing in use * ITNF thing not found * SMS.UTHG use thing IMEM insufficient memory * ITNF thing not found * any other returns from Thing itself * SMS.FTHG free thing ITNF thing not found * any other returns from Thing itself * SMS.ZTHG zap thing ITNF thing not found * SMS.NTHG next thing ITNF thing not found * SMS.NTHU next user ITNF thing not found * IJOB user not found *--- th_entry * extreg reg d5/d7 entreg reg d1/d3/d4/d6/a0/a3-a5 stk_d1 equ $00 stk_d3 equ $04 * movem.l extreg,-(sp) movem.l entreg,-(sp) ; registers go to user stack move.w d0,d7 swap d7 ; keep action... move sr,d7 ; ...and status safe the_retry trap #0 ; and use supervisor mode move.l a6,a5 ; now it's safe to keep old A6 * infreg reg d1-d3/a0/a1 movem.l infreg,-(sp) moveq #sms.info,d0 ; find system variables trap #do.sms2 move.l a0,a6 ; keep them safe move.l d1,d6 ; and current Job moveq #0,d2 ; now with system at top of tree moveq #sms.injb,d0 ; get info on current Job trap #do.sms2 tst.l d0 beq.s the_relt moveq #0,d0 bra.s the_not the_relt bclr #7,$16-$68(a0) ; is A0 relative to A6?... $$$$ MAGIC the_not movem.l (sp)+,infreg * beq.s setz ; ...no add.l a5,a0 ; yes, make it absolute setz move.l d7,d0 ; get operation key swap d0 ext.w d0 sub.w #sms.lthg,d0 ; key must be at least this blt.s the_exbp ; wrong cmp.w #(th_etend-th_etab)/2,d0 ; and less than this bge.s the_exbp ; also wrong moveq #0,d5 ; assume there's no timeout cmp.w #sms.uthg-sms.lthg,d0 ; only time out on UTHG bne.s the_jtab ; which it isn't move.w d3,d5 ; it is, set the timeout ext.l d5 ; -ve is more or less indefinite bclr #31,d5 ; make it positive, though the_jtab add.w d0,d0 ; index into table move.w th_etab(pc,d0.w),d0 ; find offset of code jmp th_etab(pc,d0.w) ; and call it *+++ * To avoid using supervisor stack, the various thing routines are jumped * to directly, and jump here when they complete. The condition codes * should be set and the supervisor stack empty when this routine is * called. *--- th_exitd3 move.l a5,a6 ; restore old A6 move d7,sr ; back to user mode move.l d3,stk_d3(sp) ; set d3 return bra.s th_exchk th_exit move.l a5,a6 ; restore old A6 move d7,sr ; back to user mode th_exchk tst.l d0 beq.s the_exit ; OK, done subq.l #utimeout,d5 ; are we timing out? ble.s the_exit ; no, at least not any more cmp.l #err.fdiu,d0 ; yes, was it just "in use"? bne.s the_exit ; no, quit moveq #utimeout,d3 ; wait N ticks moveq #myself,d1 ; that's me moveq #sms.ssjb,d0 trap #do.sms2 movem.l (sp),entreg ; restore environment move.w d5,d3 ; but with a different timeout bra the_retry ; and try again the_exit movem.l (sp)+,entreg ; restore registers from user stack movem.l (sp)+,extreg tst.l d0 rts ; and exit * th_etab dc.w th_lthg-th_etab dc.w th_rthg-th_etab dc.w th_uthg-th_etab dc.w th_fthg-th_etab dc.w th_zthg-th_etab dc.w th_nthg-th_etab dc.w th_nthu-th_etab th_etend * the_exbp moveq #err.ipar,d0 bra.s th_exit * end
programs/oeis/017/A017403.asm
neoneye/loda
22
176421
; A017403: (11n+1)^3. ; 1,1728,12167,39304,91125,175616,300763,474552,704969,1000000,1367631,1815848,2352637,2985984,3723875,4574296,5545233,6644672,7880599,9261000,10793861,12487168,14348907,16387064 mul $0,11 add $0,1 pow $0,3
AppleScript/Mute.scpt
KombinatAeppaeraet/mute-macbook-microphone-in-style
0
3235
set volume input volume 0 tell application "System Events" tell appearance preferences set dark mode to true end tell end tell display notification "Off" with title "Mic"
multimedia/mythtv-core.25/files/Myth_Filldatabase.applescript
telotortium/macports-ports
0
3176
<gh_stars>0 (* Applescript to run 'Unix' version of mythfilldatabase For use with MacPorts install of Myth Author: <NAME>, ctreleaven at cogeco.ca Myth Version: 0.25.0 Modified: 2012May17 *) property MFDappPath : "@PREFIX@/bin/mythfilldatabase" property MFDlogArg : "--logpath @MYTHTVLOGDIR@" property MFDlogLevel : "warning" -- single string property MFDverboseLevel : {"general"} -- a list, can be multiple strings set welcome to "In a 'production' system, mythfilldatabase is run automatically by mythbackend at the times suggested by the listings source, usually daily. This applescript program allows you to run mythfilldatabase 'manually'; perhaps when Myth is first set up or if there are problems with the automatic runs. " try set Clicked to display dialog welcome with title "Run mythfilldatabase" buttons {"Cancel", "Options", "Start Run"} default button "Start Run" on error set Clicked to false end try set CmdList to {MFDappPath, MFDlogArg, "--loglevel " & MFDlogLevel, "--verbose " & joinlist(MFDverboseLevel, ",")} set Cmd to (joinlist(CmdList, " ")) --display alert button returned of Clicked if Clicked is not false then if button returned of Clicked = "Start Run" then do shell script Cmd -- run it! else if button returned of Clicked = "Options" then display alert "Options" -- let user select verbose and loglevel options end if end if -- -- -- -- -- -- -- -- -- Handlers to joinlist(aList, delimiter) set retVal to "" set prevDelimiter to AppleScript's text item delimiters set AppleScript's text item delimiters to delimiter set retVal to aList as string set AppleScript's text item delimiters to prevDelimiter return retVal end joinlist
software/pcx86/bdsrc/test/sleep.asm
fatman2021/basicdos
59
244985
; ; BASIC-DOS Sleep Tests ; ; @author <NAME> <<EMAIL>> ; @copyright (c) 2020-2021 <NAME> ; @license MIT <https://basicdos.com/LICENSE.txt> ; ; This file is part of PCjs, a computer emulation software project at pcjs.org ; include macros.inc include dosapi.inc CODE SEGMENT org 100h ASSUME CS:CODE, DS:CODE, ES:CODE, SS:CODE DEFPROC main mov ax,(DOS_MSC_SETVEC SHL 8) + INT_DOSCTRLC mov dx,offset ctrlc int 21h mov ax,2 mov si,PSP_CMDTAIL cmp [si],ah je s1 inc si DOSUTIL ATOI32D ; DX:AX = value (# of seconds) ; ; Perform an unnecessary division, so we can verify that division error ; processing works (eg, by running "sleep 0"). ; push ax push dx div ax pop dx pop ax s1: push ax PRINTF <"sleeping %d seconds...">,ax pop ax mov dx,1000 mul dx ; DX:AX = AX * 1000 (# of milliseconds) mov cx,dx xchg dx,ax ; CX:DX = # of milliseconds DOSUTIL SLEEP PRINTF <13,10,"feeling refreshed!",13,10> int 20h ENDPROC main DEFPROC ctrlc,FAR push ax PRINTF <"CTRL-C intercepted",13,10> pop ax iret ENDPROC ctrlc ; ; COMHEAP 0 means we don't need a heap, but BASIC-DOS will still allocate a ; minimum amount of heap space, because that's where our initial stack lives. ; COMHEAP 0 ; COMHEAP (heap size) must be the last item CODE ENDS end main
Modules/Module4/FloatingPoint/doublecompare.asm
hackettccp/CSCI213
0
85996
#Demonstrates comparing double precision floating point numbers .text l.d $f0, double1 #Loads double1 into $f0 l.d $f2, double2 #Loads double2 into $f2 c.le.d $f0, $f2 #Compares $f0 (double1) <= $f2 (double2) bc1t lessthanorequal #Branch to lessthanorequal if condition code is true (1) bc1f greaterthan #Branch to greaterthan if condition code is false (0) lessthanorequal: la $a0, output1 #Loads the starting address of output1 string to $a0 li $v0, 4 #Sets the system call code for printing a string syscall j done greaterthan: la $a0, output2 #Loads the starting address of output2 string to $a0 li $v0, 4 #Sets the system call code for printing a string syscall done: #Finished .data double1: .double 178.345 double2: .double 323.67 output1: .asciiz "double1 <= double2" output2: .asciiz "double1 > double2"
test/Fail/HoTTCompatibleWithSizeBasedTerminationMaximeDenes.agda
redfish64/autonomic-agda
1
11951
<filename>test/Fail/HoTTCompatibleWithSizeBasedTerminationMaximeDenes.agda -- Andreas, 2014-01-08, following <NAME> 2014-01-06 -- This file demonstrates that size-based termination does -- not lead to incompatibility with HoTT. {-# OPTIONS --sized-types #-} open import Common.Size open import Common.Equality data Empty : Set where data Box : Size → Set where wrap : ∀ i → (Empty → Box i) → Box (↑ i) -- Box is inhabited at each stage > 0: gift : ∀ {i} → Empty → Box i gift () box : ∀ {i} → Box (↑ i) box {i} = wrap i gift -- wrap has an inverse: unwrap : ∀ i → Box (↑ i) → (Empty → Box i) unwrap .i (wrap i f) = f -- There is an isomorphism between (Empty → Box ∞) and (Box ∞) -- but none between (Empty → Box i) and (Box i). -- We only get the following, but it is not sufficient to -- produce the loop. postulate iso : ∀ i → (Empty → Box i) ≡ Box (↑ i) -- Since Agda's termination checker uses the structural order -- in addition to sized types, we need to conceal the subterm. conceal : {A : Set} → A → A conceal x = x mutual loop : ∀ i → Box i → Empty loop .(↑ i) (wrap i x) = loop' (↑ i) (Empty → Box i) (iso i) (conceal x) -- We would like to write loop' i instead of loop' (↑ i) -- but this is ill-typed. Thus, we cannot achieve something -- well-founded wrt. to sized types. loop' : ∀ i A → A ≡ Box i → A → Empty loop' i .(Box i) refl x = loop i x -- The termination checker complains here, rightfully! bug : Empty bug = loop ∞ box
src/adder.asm
earaujoassis/machos-assembly
1
86714
global _main default rel section .text _main: mov rax, 0x02000004 ; SYS_write setup (SYS_write at 4 bits offset from 0x02000000) mov rdi, 1 ; SYS_write use STDOUT mov rsi, warning_msg ; SYS_write argument mov rdx, 33 ; SYS_write argument size (bytes) syscall ; perform SYS_write mov rax, 0x02000004 ; SYS_write setup (SYS_write at 4 bits offset from 0x02000000) mov rdi, 1 ; SYS_write use STDOUT mov rsi, number_1st ; SYS_write argument mov rdx, 21 ; SYS_write argument size (bytes) syscall ; perform SYS_write mov rax, 0x02000003 ; SYS_read setup (SYS_write at 4 bits offset from 0x02000000) mov rdi, 0 ; SYS_read use STDIN mov rsi, number_1st_b ; SYS_read store the byte at `number_1st_b` mov rdx, 2 ; SYS_read read up to 1 byte only syscall mov rax, 0x02000004 ; SYS_write setup (SYS_write at 4 bits offset from 0x02000000) mov rdi, 1 ; SYS_write use STDOUT mov rsi, number_2nd ; SYS_write argument mov rdx, 21 ; SYS_write argument size (bytes) syscall ; perform SYS_write mov rax, 0x02000003 ; SYS_read setup (SYS_write at 4 bits offset from 0x02000000) mov rdi, 0 ; SYS_read use STDIN mov rsi, number_2nd_b ; SYS_read store the byte at `number_1st_b` mov rdx, 2 ; SYS_read read up to 1 byte only syscall mov rbx, [number_1st_b] mov rcx, [number_2nd_b] add rbx, rcx sub rbx, 48 mov [added], rbx mov rax, 0x02000004 ; SYS_write setup (SYS_write at 4 bits offset from 0x02000000) mov rdi, 1 ; SYS_write use STDOUT mov rsi, added ; SYS_write argument mov rdx, 2 ; SYS_write argument size (bytes) syscall ; perform SYS_write mov rax, 0x02000004 ; SYS_write setup (SYS_write at 4 bits offset from 0x02000000) mov rdi, 1 ; SYS_write use STDOUT mov rsi, new_line ; SYS_write argument mov rdx, 1 ; SYS_write argument size (bytes) syscall ; perform SYS_write mov rax, 0x02000001 ; SYS_exit setup (SYS_write at 1 bit offset from 0x02000000) xor rdi, rdi ; SYS_exit argument (check if it's zero) syscall ; perform SYS_exit section .data warning_msg: db "This only works from 0-9 numbers", 0xA number_1st: db "Read the 1st number: " number_2nd: db "Read the 2nd number: " new_line: db 0xA number_1st_b: db 0x0, 0x0 number_2nd_b: db 0x0, 0x0 added: db 0x0, 0xA
src/main/antlr4-grammars/PropFormulaParser.g4
RiccardoDeMasellis/FLLOAT
9
454
grammar PropFormulaParser; @header{ package antlr4_generated; } propositionalFormula : doubleImplicationProp ; doubleImplicationProp : implicationProp (DOUBLEIMPLY implicationProp)* ; implicationProp : orProp (IMPLY orProp)* ; orProp : andProp (OR andProp)* ; andProp : notProp (AND notProp)* ; notProp : NOT? atom | NOT? LSEPARATOR propositionalFormula RSEPARATOR ; atom : ID* | TRUE | FALSE ; ID : (('a'..'z') | ('A'..'Z') | ('0'..'9') | '_' | '?'); TRUE : ('True')|('TRUE')|('true'); FALSE : ('False')|('FALSE')|('false'); DOUBLEIMPLY : ('<->'); IMPLY : ('->'); OR : ('||'|'|'); AND : ('&&'|'&'); NOT : ('!'); LSEPARATOR : ('('); RSEPARATOR : (')'); WS : (' ' | '\t' | '\r' | '\n')+ -> skip;
movies_file.g4
MakotoE/cs320-worksheet-6
0
4094
<gh_stars>0 grammar movies_file; r : value; value : object | array | NUMBER | STRING; object : '{' pair (',' pair)* '}'; pair : STRING ':' value; array : '[' value (',' value)* ']'; NUMBER : [-]?[0-9]*[.]?[0-9]+; STRING : ["]~["\r\n]*?["]; WS : [ \t\r\n]+ -> skip;
test/gameboy/slidshow/main.asm
gb-archive/asmotor
0
172138
;*************************************************************************** ;* ;* MAIN.ASM - Standard ROM-image header ;* ;* All fields left to zero since RGBFix does a nice job of filling them in ;* in for us... ;* ;*************************************************************************** IMPORT UserMain INCLUDE "irq.i" INCLUDE "utility.i" INCLUDE "hardware.i" SECTION "Startup",HOME[0] RST_00: jp Main DS 5 RST_08: jp Main DS 5 RST_10: jp Main DS 5 RST_18: jp Main DS 5 RST_20: jp Main DS 5 RST_28: jp Main DS 5 RST_30: jp Main DS 5 RST_38: jp Main DS 5 jp irq_VBlank DS 5 jp irq_LCDC DS 5 jp irq_Timer DS 5 jp irq_Serial DS 5 jp irq_HiLo DS 5 DS $100-$68 nop jp Main DB $CE,$ED,$66,$66,$CC,$0D,$00,$0B,$03,$73,$00,$83,$00,$0C,$00,$0D DB $00,$08,$11,$1F,$88,$89,$00,$0E,$DC,$CC,$6E,$E6,$DD,$DD,$D9,$99 DB $BB,$BB,$67,$63,$6E,$0E,$EC,$CC,$DD,$DC,$99,$9F,$BB,$B9,$33,$3E ;0123456789ABCDEF DB " " DB 0,0,0 ;SuperGameboy DB 0 ;CARTTYPE ;-------- ;0 - ROM ONLY ;1 - ROM+MBC1 ;2 - ROM+MBC1+RAM ;3 - ROM+MBC1+RAM+BATTERY ;5 - ROM+MBC2 ;6 - ROM+MBC2+BATTERY DB 0 ;ROMSIZE ;------- ;0 - 256 kBit ( 32 kByte, 2 banks) ;1 - 512 kBit ( 64 kByte, 4 banks) ;2 - 1 MBit (128 kByte, 8 banks) ;3 - 2 MBit (256 kByte, 16 banks) ;3 - 4 MBit (512 kByte, 32 banks) DB 0 ;RAMSIZE ;------- ;0 - NONE ;1 - 16 kBit ( 2 kByte, 1 bank ) ;2 - 64 kBit ( 8 kByte, 1 bank ) ;3 - 256 kBit (32 kByte, 4 banks) DW $0000 ;Manufacturer DB 0 ;Version DB 0 ;Complement check DW 0 ;Checksum ; -- ; -- Initialize the Gameboy ; -- Main:: ; disable interrupts di ; we want a stack ld hl,StackTop ld sp,hl ; oh, and initialize the rest of the RAM to zero ld bc,$2000-$200 xor a,a call mem_Set ; prepare for some interrupts call irq_Init ; We'd better make a longjump to the user's main. ; Only the linker knows where it's been placed. ; Even if this is a 32k image it's ok to long jump. ; In fact it doesn't work without it at least on a ; SSC when the image is downloaded raw without ; the menu?!??! ljp UserMain ; -- ; -- Variables ; -- SECTION "StartupVars",BSS Stack: DS $200 StackTop:
acceptance_test_lib.ads
oysteinlondal/Inverted-Pendulum
0
20498
with Ada.Real_Time; use Ada.Real_Time; with Exception_Declarations; use Exception_Declarations; package Acceptance_Test_Lib is procedure Acceptance_Test(Max, Min, Value : in Float; Computation_Time, Max_Computation_Time: in Ada.Real_Time.Time_Span; Count : in Integer); end Acceptance_Test_Lib;
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_225.asm
ljhsiun2/medusa
9
245957
<filename>Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_225.asm .global s_prepare_buffers s_prepare_buffers: push %r12 push %rax push %rbp push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_A_ht+0x124cf, %rsi lea addresses_normal_ht+0x18a7f, %rdi nop nop nop sub %rdx, %rdx mov $54, %rcx rep movsw nop nop nop dec %rsi lea addresses_A_ht+0x6d53, %rsi lea addresses_A_ht+0x11bcf, %rdi sub %rbx, %rbx mov $120, %rcx rep movsw add $31341, %rcx lea addresses_WT_ht+0x1014f, %rsi lea addresses_UC_ht+0x41ff, %rdi nop nop cmp $36315, %rbp mov $18, %rcx rep movsb nop nop inc %rcx lea addresses_normal_ht+0xa40f, %rdx nop nop sub $37211, %rdi mov $0x6162636465666768, %rcx movq %rcx, %xmm5 movups %xmm5, (%rdx) nop nop nop nop inc %rbp lea addresses_A_ht+0xd9cf, %rsi lea addresses_normal_ht+0x12bcf, %rdi nop nop nop nop nop sub %r12, %r12 mov $46, %rcx rep movsb nop nop nop nop nop xor $60806, %rdx lea addresses_D_ht+0x6e4f, %rdi nop nop nop nop sub %rbx, %rbx mov $0x6162636465666768, %rdx movq %rdx, (%rdi) nop cmp %rbp, %rbp lea addresses_WC_ht+0xc2ef, %r12 nop nop dec %rdi mov $0x6162636465666768, %rsi movq %rsi, %xmm6 vmovups %ymm6, (%r12) nop nop nop nop add %rdi, %rdi lea addresses_WC_ht+0xbc4f, %rsi lea addresses_WT_ht+0x888f, %rdi nop nop nop add %rax, %rax mov $50, %rcx rep movsq nop nop nop nop add $52593, %rbx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rbp pop %rax pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r13 push %r9 push %rax push %rdx push %rsi // Store lea addresses_A+0x3c9c, %r12 nop nop cmp $49024, %r10 mov $0x5152535455565758, %rdx movq %rdx, %xmm7 movups %xmm7, (%r12) nop nop nop nop add %r12, %r12 // Store lea addresses_A+0x14cc7, %rax nop nop nop nop nop xor $4803, %r9 mov $0x5152535455565758, %r13 movq %r13, %xmm2 movups %xmm2, (%rax) nop nop nop cmp %r10, %r10 // Faulty Load lea addresses_RW+0x1ac4f, %r12 nop nop add %r9, %r9 vmovups (%r12), %ymm4 vextracti128 $0, %ymm4, %xmm4 vpextrq $1, %xmm4, %r10 lea oracles, %r9 and $0xff, %r10 shlq $12, %r10 mov (%r9,%r10,1), %r10 pop %rsi pop %rdx pop %rax pop %r9 pop %r13 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_RW', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_A', 'size': 16, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_A', 'size': 16, 'AVXalign': False}} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_RW', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}} {'src': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 7, 'same': False}} {'src': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False}} {'src': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_D_ht', 'size': 8, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_WC_ht', 'size': 32, 'AVXalign': False}} {'src': {'type': 'addresses_WC_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': True}} {'32': 21829} 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 */
test/asset/agda-stdlib-1.0/Data/List/Relation/Binary/Sublist/DecSetoid.agda
omega12345/agda-mode
5
12661
<filename>test/asset/agda-stdlib-1.0/Data/List/Relation/Binary/Sublist/DecSetoid.agda ------------------------------------------------------------------------ -- The Agda standard library -- -- An inductive definition of the sublist relation with respect to a -- setoid which is decidable. This is a generalisation of what is -- commonly known as Order Preserving Embeddings (OPE). ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary module Data.List.Relation.Binary.Sublist.DecSetoid {c ℓ} (S : DecSetoid c ℓ) where import Data.List.Relation.Binary.Equality.DecSetoid as DecSetoidEquality import Data.List.Relation.Binary.Sublist.Setoid as SetoidSublist import Data.List.Relation.Binary.Sublist.Heterogeneous.Properties as HeterogeneousProperties open import Level using (_⊔_) open DecSetoid S open DecSetoidEquality S ------------------------------------------------------------------------ -- Re-export core definitions open SetoidSublist setoid public ------------------------------------------------------------------------ -- Additional relational properties _⊆?_ : Decidable _⊆_ _⊆?_ = HeterogeneousProperties.sublist? _≟_ ⊆-isDecPartialOrder : IsDecPartialOrder _≋_ _⊆_ ⊆-isDecPartialOrder = record { isPartialOrder = ⊆-isPartialOrder ; _≟_ = _≋?_ ; _≤?_ = _⊆?_ } ⊆-decPoset : DecPoset c (c ⊔ ℓ) (c ⊔ ℓ) ⊆-decPoset = record { isDecPartialOrder = ⊆-isDecPartialOrder }
segments/applemusic.scpt
devanlooches/tmux-config
0
2925
tell application "System Events" set process_list to (name of every process) end tell if process_list contains "Music" then tell application "Music" if player state is playing then set track_name to name of current track set artist_name to artist of current track set now_playing to artist_name & " - " & track_name set now_playing to " 🎵" & now_playing return now_playing end if end tell end if
src/main/java/com/kulics/feel/antlr/FeelLexer.g4
kulics-works/feel-jvm
3
863
lexer grammar FeelLexer; Arrow: '->'; FatArrow: '=>'; EqualEqual: '=='; LessEqual: '<='; GreaterEqual: '>='; NotEqual: '<>'; AndAnd: '&&'; OrOr: '||'; Dot: '.'; Comma: ','; Equal: '='; Less: '<'; Greater: '>'; Semi: ';'; Colon: ':'; LeftParen: '('; RightParen: ')'; LeftBrace: '{'; RightBrace: '}'; LeftBrack: '['; RightBrack: ']'; Question: '?'; At: '@'; Bang: '!'; Coin: '$'; Tilde: '~'; Add: '+'; Sub: '-'; Mul: '*'; Div: '/'; Mod: '%'; And: '&'; Or: '|'; Caret: '^'; BackQuote: '`'; Sharp: '#'; Mut: 'mut'; Let: 'let'; Def: 'def'; Ext: 'ext'; Module: 'mod'; If: 'if'; Then: 'then'; Else: 'else'; While: 'while'; Is: 'is'; True: 'true'; False: 'false'; FloatLiteral: Digit (Exponent | '.' Digit Exponent?); DecimalLiteral: Digit; BinaryLiteral: '0' [bB] [0-1_]* [0-1]; OctalLiteral: '0' [oO] [0-7_]* [0-7]; HexLiteral: '0' [xX] [a-fA-F0-9_]* [a-fA-F0-9]; fragment Digit: [0-9] | [0-9] [0-9_]* [0-9]; fragment Exponent: [eE] [+-]? [0-9]+; CharLiteral: '\'' ('\\\'' | '\\' [btnfr\\] | .)*? '\''; StringLiteral: '"' ('\\' [btnfr"\\] | ~('\\' | '"' )+)* '"'; UpperIdentifier: [A-Z] [0-9a-zA-Z_]*; LowerIdentifier: [a-z] [0-9a-zA-Z_]*; Discard: '_'; CommentBlock: '/*' .*? '*/' -> skip; CommentLine: '//' ~[\r\n]* -> skip; WhiteSpace: (' ' |'\t' |'\n' |'\r' )+ -> skip ;
CodeExecution/Invoke-ReflectivePEInjection_Resources/Shellcode/x64/CallDllMain.asm
g-goessel/PowerSploit
9,233
28208
[SECTION .text] global _start _start: ; Get stack setup push rbx mov rbx, rsp and sp, 0xff00 ; Call DllMain mov rcx, 0x4141414141414141 ; DLLHandle, set by PowerShell mov rdx, 0x1 ; PROCESS_ATTACH mov r8, 0x0 ; NULL mov rax, 0x4141414141414141 ; Address of DllMain, set by PS call rax ; Fix stack mov rsp, rbx pop rbx ret
libsrc/_DEVELOPMENT/arch/zx/display/c/sdcc_iy/zx_aaddr2cx_fastcall.asm
meesokim/z88dk
0
97023
; uint zx_aaddr2cx_fastcall(void *attraddr) SECTION code_arch PUBLIC _zx_aaddr2cx_fastcall _zx_aaddr2cx_fastcall: INCLUDE "arch/zx/display/z80/asm_zx_aaddr2cx.asm"
MCDRICORSIVO.asm
edoardottt/Asm_mars_examples
21
167128
# MCD TRA DUE INTERI POSITIVI RICORSIVO .data richiesta: .asciiz "inserire due valori x ed y interi positivi\n" .text li $v0,4 la $a0,richiesta syscall li $v0,5 syscall move $s0,$v0 #X li $v0,5 syscall move $s1,$v0 #Y jal mcd li $v0,1 syscall li $v0,10 syscall mcd: subi $sp,$sp,12 sw $ra,0($sp) sw $s0,4($sp) sw $s1,8($sp) beq $s0,$s1,caso_base jal verifica jal mcd lw $ra,0($sp) lw $s0,4($sp) lw $s1,8($sp) addi $sp,$sp,12 jr $ra caso_base: move $a0,$s0 lw $ra,0($sp) lw $s0,4($sp) lw $s1,8($sp) addi $sp,$sp,12 jr $ra verifica: sgt $t0,$s0,$s1 beq $t0,1,cambia sub $s1,$s1,$s0 jr $ra cambia: move $s2,$s1 move $s1,$s0 move $s0,$s2 jr $ra
Library/Breadbox/X10DRVR/X10init.asm
steakknife/pcgeos
504
92263
<gh_stars>100-1000 COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) Breadbox Computer 1995 -- All Rights Reserved PROJECT: Breadbox Home Automation FILE: X10Init.asm AUTHOR: <NAME> ROUTINES: Name Description ---- ----------- X10Init Initialize controller X10ExitDriver Deal with leaving GEOS X10Suspend Deal with task-switching X10Unsuspend Deal with waking up after task switch %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ InitCode segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% X10Init %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Initialize the X-10 controller CALLED BY: Strategy Routine, X10Unsuspend PASS: ds -> driver's dgroup RETURN: carry set if no controller found DESTROYED: nothing PSEUDO CODE/STRATEGY: Read .INI file for port and settings to use. If no port set, return with no error. (Allows software to configure) Call the appropriate interface-specific initialization routine. Return the results in carry flag. KNOWN BUGS/SIDE EFFECTS/IDEAS: .INI settings will be cleared if no controller found so next load attempt will succeed by default. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ X10Init proc far .enter call ReadIniFileSettings ; gets base port and settings cmp ds:[X10Settings], SETTINGS_NONE je done cmp ds:[X10Settings], SETTINGS_DIRECT jne doSerial ; Test for direct interface call X10TestPort ; test port to see if there's a controller there jnc done ; controller found (or no port set) jmp reset ; no controller ; Test for serial interface doSerial: call X10SerialInit ; test serial interface for response jnc done ; controller found (or no port set) jmp reset ; no controller reset: clr bx ; no controller on that port, clear it out mov ds:[X10Port], bx mov ds:[X10Settings], bx call WriteIniFileSettings ; erase setting stc done: .leave ret X10Init endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ReadIniFileSettings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Read the base hardware settings from the .ini file CALLED BY: X10Init PASS: nothing RETURN: nothing DESTROYED: nothing SIDE EFFECTS: Sets the port and things PSEUDO CODE/STRATEGY: Read category/key from .ini file. If it doesn't exist, create it using current values. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ReadIniFileSettings proc far uses ax, cx, dx, bp, si .enter mov si, offset x10DriverCategory ; ds:si <- category asciiz mov cx, ds ; cx:dx <- key asciiz mov dx, offset x10DriverKey call InitFileReadInteger ; get base port address in ax jc noCategory ; carry set if error mov bp, ax mov dx, offset x10SettingsKey ; cx:dx <- key asciiz call InitFileReadInteger ; get settings in ax jc noCategory mov ds:[X10Port], bp mov ds:[X10Settings], ax jmp done noCategory: ; if we get here, we have to make them. call WriteIniFileSettings done: .leave ret ReadIniFileSettings endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% WriteIniFileSettings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Write the base hardware settings to the .ini file CALLED BY: X10Init, X10ChangePort PASS: nothing RETURN: nothing DESTROYED: nothing SIDE EFFECTS: .INI file setting is changed and committed PSEUDO CODE/STRATEGY: Write or create category/keys in .ini file. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ WriteIniFileSettings proc far uses ax, cx, dx, bp, si .enter mov bp, ds:[X10Port] ; bp <- integer to write to .ini file mov si, offset x10DriverCategory ; ds:si <- category asciiz mov cx, ds ; cx:dx <- key asciiz mov dx, offset x10DriverKey call InitFileWriteInteger ; write port to file mov bp, ds:[X10Settings] mov dx, offset x10SettingsKey call InitFileWriteInteger ; write settings to file call INITFILECOMMIT ; commit changes .leave ret WriteIniFileSettings endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% X10TestPort %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Test the port to see if there's a controller there. CALLED BY: X10Init, X10ChangePort PASS: ds -> dgroup of driver RETURN: carry set if error DESTROYED: nothing SIDE EFFECTS: Sets base port level Clears base port level on error, so rest of code doesn't lock PSEUDO CODE/STRATEGY: Check for 2 or 3 zero crossings. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ X10TestPort proc far uses ax, bx, cx, dx, di, si, es .enter clc ; no error if port is zero mov dx, ds:[X10Port] ; get base port tst dx jz done ; in case port is zero (i.e., we're debugging) cmp dx, 4 ; only allow COM1 to COM4 ja error mov si, dx dec si shl si, 1 ; use port as index into address table mov dx, cs:PortAddresses[si] ; get the address mov ds:[basePortAddress], dx ; store address in memory add dx, 4 ; why? 'cause the source code says so! mov al, 1 ; to initialize controller out dx, al mov ax, 15 ; wait 1/4 sec. for power-up call TimerSleep call X10TestZeroCrossing ; to clear status of zeroFlag call SysEnterInterrupt ; prevent context switching while we test mov bx, 0 ; count zero crossings found. mov cx, 18 ; 20 for Europe--18 for USA testCrossings: push cx mov cx, DELAY1000 call X10Sleep ; in 18ms, we should find 2 or 3 crossings. pop cx call X10TestZeroCrossing jnc nextLoop ; no crossing here inc bx ; found one--increment counter nextLoop: loop testCrossings call SysExitInterrupt ; enable context switching again. cmp bx, 2 ; did we find 2 or 3 crossings? jb error ; less than 2 is bad cmp bx, 3 ja error ; more than 3 is bad clc ; yes, found them! jmp done error: clr ds:[basePortAddress] ; clear that address stc ; or lockup will happen! done: .leave ; clc ; for Lysle--trial version never returns error ret X10TestPort endp PortAddresses dw 03f8h, 02f8h, 03e8h, 02e8h COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% X10Close %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Close the port used by the X-10 controller CALLED BY: X10ChangePort, X10ExitDriver, X10Suspend PASS: ds -> driver's dgroup RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: Call the appropriate interface-specific close routine. Return the results. KNOWN BUGS/SIDE EFFECTS/IDEAS: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ X10Close proc far cmp ds:[X10Settings], SETTINGS_SERIAL_CM11 jne done ; Nothing to do for the direct interface. call X10CloseSerial ; Serial, however, must close port. done: .leave ret X10Close endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% X10ExitDriver %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: We are being unloaded. Clean up after ourselves CALLED BY: Strategy Routine PASS: ds -> dgroup RETURN: nothing DESTROYED: allowed: ax, bx, cx, dx, si, di, ds, es SIDE EFFECTS: none PSEUDO CODE/STRATEGY: Call the close routine to close any open ports. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ X10ExitDriver proc far uses ax, bx, es, di .enter call X10Close .leave ret X10ExitDriver endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% X10Suspend %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Prepare driver to go into task-switch CALLED BY: Strategy Routine PASS: cx:dx -> buffer in which to place reason for refusal, if suspension refused. ds -> dgroup RETURN: carry set on refusal cx:dx <- buffer null terminate reason carry clear if accept suspend DESTROYED: allowed: ax, di SIDE EFFECTS: PSEUDO CODE/STRATEGY: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ X10Suspend proc far .enter .leave ret X10Suspend endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% X10Unsuspend %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Return from a task switch. CALLED BY: Strategy Routine PASS: nothing RETURN: nothing DESTROYED: allowed: ax, di SIDE EFFECTS: PSEUDO CODE/STRATEGY: NOTE: Due to timer issues, we cannot call the initialization routine for the serial interface. There is no real gain in closing and reopening the port anyway, since the serial driver will restore its state on unsuspend, and our state doesn't change during the suspend; if the interface uninitialized, too bad. DH 3/11/99 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ X10Unsuspend proc far .enter .leave ret X10Unsuspend endp InitCode ends
test/Fail/Issue3810a.agda
cruhland/agda
1,989
11197
<filename>test/Fail/Issue3810a.agda {-# OPTIONS --rewriting --confluence-check #-} open import Agda.Builtin.Equality open import Agda.Builtin.Equality.Rewrite postulate A : Set a b : A f : A → A rew₁ : f a ≡ b rew₂ : f ≡ λ _ → a {-# REWRITE rew₁ #-} {-# REWRITE rew₂ #-}
src/Const.agda
nad/equality
3
5133
<reponame>nad/equality ------------------------------------------------------------------------ -- Some properties related to the const function ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Equality module Const {reflexive} (eq : ∀ {a p} → Equality-with-J a p reflexive) where open import Logical-equivalence using (_⇔_) open import Prelude import Bijection eq as Bijection open Derived-definitions-and-properties eq open import Embedding eq open import Equivalence eq as Eq using (_≃_) open import Fin eq open import Function-universe eq open import H-level eq open import H-level.Closure eq open import Injection eq using (Injective) import Nat eq as Nat open import Univalence-axiom eq -- If A is inhabited, then the function const : B → (A → B) is -- injective. const-is-injective : ∀ {a b} → {A : Type a} {B : Type b} → A → Injective {B = A → B} const const-is-injective x {y} {z} = const y ≡ const z ↝⟨ cong (_$ x) ⟩□ y ≡ z □ -- Thus, if B is a set, then const is also an embedding (assuming -- extensionality). const-is-embedding : ∀ {a b} → Extensionality (a ⊔ b) (a ⊔ b) → {A : Type a} {B : Type b} → Is-set B → A → Is-embedding {B = A → B} const const-is-embedding {a} {b} ext B-set x = _≃_.to (Injective≃Is-embedding ext B-set (Π-closure (lower-extensionality b a ext) 2 λ _ → B-set) const) (const-is-injective x) -- However, if B is not a set, then one can construct a counterexample -- (assuming extensionality and univalence). -- -- This example is due to <NAME>. (His proof was not -- identical to the one below.) const-is-not-embedding : ∀ {a b} → Extensionality (a ⊔ b) (lsuc b) → Univalence b → Univalence (# 0) → ¬ ({A : Type a} {B : Type (lsuc b)} → A → Is-embedding {B = A → B} const) const-is-not-embedding {a} {b} ext univ univ₀ hyp = from-⊎ (2 Nat.≟ 4) 2≡4 where ext-b : Extensionality b b ext-b = lower-extensionality a (lsuc b) ext ext-ab₊ : Extensionality a (lsuc b) ext-ab₊ = lower-extensionality b lzero ext ext₁ : Extensionality (# 0) (# 1) ext₁ = lower-extensionality _ (lsuc b) ext ext₀ : Extensionality (# 0) (# 0) ext₀ = lower-extensionality _ _ ext emb : Is-embedding {B = ↑ a (Fin 2) → Type b} const emb = hyp (lift true) 2≡4 : 2 ≡ 4 2≡4 = _⇔_.to isomorphic-same-size ( Fin 2 ↝⟨ inverse $ [Fin≡Fin]↔Fin! ext₀ univ₀ 2 ⟩ Fin 2 ≡ Fin 2 ↔⟨ inverse $ ≡-preserves-≃ ext-b univ univ₀ (Eq.↔⇒≃ Bijection.↑↔) (Eq.↔⇒≃ Bijection.↑↔) ⟩ ↑ b (Fin 2) ≡ ↑ b (Fin 2) ↔⟨ Eq.⟨ _ , emb (↑ b (Fin 2)) (↑ b (Fin 2)) ⟩ ⟩ const (↑ b (Fin 2)) ≡ const (↑ b (Fin 2)) ↔⟨ inverse $ Eq.extensionality-isomorphism ext-ab₊ ⟩ (↑ a (Fin 2) → ↑ b (Fin 2) ≡ ↑ b (Fin 2)) ↔⟨ →-cong ext-ab₊ (Eq.↔⇒≃ Bijection.↑↔) (≡-preserves-≃ ext-b univ univ₀ (Eq.↔⇒≃ Bijection.↑↔) (Eq.↔⇒≃ Bijection.↑↔)) ⟩ (Fin 2 → Fin 2 ≡ Fin 2) ↝⟨ ∀-cong ext₁ (λ _ → [Fin≡Fin]↔Fin! ext₀ univ₀ 2) ⟩ (Fin 2 → Fin 2) ↝⟨ [Fin→Fin]↔Fin^ ext₀ 2 2 ⟩□ Fin 4 □)
test/Succeed/Issue4615-missing-reduce.agda
shlevy/agda
1,989
16178
<gh_stars>1000+ open import Agda.Primitive open import Agda.Builtin.Nat Type : (i : Level) -> Set (lsuc i) Type i = Set i postulate P : (i : Level) (A : Type i) → A → Type i postulate lemma : (a : Nat) -> P _ _ a
kernel/arch/x86_64/util.asm
feliwir/benny
3
26356
<filename>kernel/arch/x86_64/util.asm<gh_stars>1-10 .global loadGDT .section .text loadGDT: # Save the current stack pointer on the stack to push later popq %rax pushq %rsp # push ss pushq $0x10 # push rsp pushq 8(%rsp) pushfq # push cs pushq $0x08 # push eip back on pushq %rax call reloadCS iretq reloadCS: pushw %ax movw $0x10, %ax mov %ax, %ds mov %ax, %es mov %ax, %fs mov %ax, %gs mov %ax, %ss popw %ax ret
src/apsepp.ads
thierr26/ada-apsepp
0
9654
-- Copyright (C) 2019 <NAME> <<EMAIL>> -- MIT license. Please refer to the LICENSE file. package Apsepp is pragma Pure (Apsepp); end Apsepp;
abnf/Abnf.g4
Cmejia/grammars-v4
1
6185
/* BSD License Copyright (c) 2013, <NAME> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of Rainer Schuster 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. ABNF grammar derived from: http://tools.ietf.org/html/rfc5234 Augmented BNF for Syntax Specifications: ABNF January 2008 http://tools.ietf.org/html/rfc7405 Case-Sensitive String Support in ABNF December 2014 Terminal rules mainly created by ANTLRWorks 1.5 sample code. */ grammar Abnf; // Note: Whitespace handling not as strict as in the specification. rulelist : rule_* EOF ; rule_ : ID ('=' | '=/') elements ; elements : alternation ; alternation: concatenation ('/' concatenation)* ; concatenation: repetition (repetition)* ; repetition : repeat? element ; repeat : INT | (INT? '*' INT?) ; element : ID | group | option | STRING | NumberValue | ProseValue ; group : '(' alternation ')' ; option : '[' alternation ']' ; NumberValue : '%' (BinaryValue | DecimalValue | HexValue) ; fragment BinaryValue : 'b' BIT+ (('.' BIT+)+ | ('-' BIT+))? ; fragment DecimalValue : 'd' DIGIT+ (('.' DIGIT+)+ | ('-' DIGIT+))? ; fragment HexValue : 'x' HEX_DIGIT+ (('.' HEX_DIGIT+)+ | ('-' HEX_DIGIT+))? ; ProseValue : '<' (~'>')* '>' ; ID : ('a'..'z'|'A'..'Z') ('a'..'z'|'A'..'Z'|'0'..'9'|'-')* ; INT : '0'..'9'+ ; COMMENT : ';' ~('\n'|'\r')* '\r'? '\n' -> channel(HIDDEN) ; WS : ( ' ' | '\t' | '\r' | '\n' ) -> channel(HIDDEN) ; STRING : ('%s'|'%i')? '"' (~'"')* '"' ; fragment BIT : '0'..'1' ; fragment DIGIT : '0'..'9' ; // Note: from the RFC errata (http://www.rfc-editor.org/errata_search.php?rfc=5234&eid=4040): // > ABNF strings are case insensitive and the character set for these strings is US-ASCII. // > So the definition of HEXDIG already allows for both upper and lower case (or a mixture). fragment HEX_DIGIT : ('0'..'9'|'a'..'f'|'A'..'F') ;
General/Sprites/Tails/Anim - Tails Tail.asm
NatsumiFox/AMPS-Sonic-3-Knuckles
5
4929
dc.w AniTails_Tail00-AniTails_Tail dc.w AniTails_Tail01-AniTails_Tail dc.w AniTails_Tail02-AniTails_Tail dc.w AniTails_Tail03-AniTails_Tail dc.w AniTails_Tail04-AniTails_Tail dc.w AniTails_Tail05-AniTails_Tail dc.w AniTails_Tail06-AniTails_Tail dc.w AniTails_Tail07-AniTails_Tail dc.w AniTails_Tail08-AniTails_Tail dc.w AniTails_Tail09-AniTails_Tail dc.w AniTails_Tail0A-AniTails_Tail dc.w AniTails_Tail0B-AniTails_Tail dc.w AniTails_Tail0C-AniTails_Tail AniTails_Tail00:dc.b $20, 0, $FF AniTails_Tail01:dc.b 7, $22, $23, $24, $25, $26, $FF AniTails_Tail02:dc.b 3, $22, $23, $24, $25, $26, $FD, 1 AniTails_Tail03:dc.b $FC, 5, 6, 7, 8, $FF AniTails_Tail04:dc.b 3, 9, $A, $B, $C, $FF AniTails_Tail05:dc.b 3, $D, $E, $F, $10, $FF AniTails_Tail06:dc.b 3, $11, $12, $13, $14, $FF AniTails_Tail07:dc.b 2, 1, 2, 3, 4, $FF AniTails_Tail08:dc.b 2, $1A, $1B, $1C, $1D, $FF AniTails_Tail09:dc.b 9, $1E, $1F, $20, $21, $FF AniTails_Tail0A:dc.b 9, $29, $2A, $2B, $2C, $FF AniTails_Tail0B:dc.b 1, $27, $28, $FF AniTails_Tail0C:dc.b 0, $27, $28, $FF even
src/main/antlr/com/yok/parser/Yok.g4
ALoTron/yolol-minifier
3
5862
<filename>src/main/antlr/com/yok/parser/Yok.g4 grammar Yok; @header { package com.yok.parser; } /* Changes: Statements seperated by ';' Added parentheses / curvy brackets to ifStatement Arguments for functions now need parentheses ('cos(42)') Factorial is now a prefixOperator and functoin ('fac(3)') -> spaces are irellevant now added '\\' to enforce a new line in the later generated yolol-script -> line breaks are irellevant now */ COMMENT : '//' ~('\n')*? ('\n' | BREAK); STRING : '"'(~'\n')*?'"'; BREAK : '\\\\'; WHITESPACE : [ \n\t] -> skip; IF : I F; THEN : T H E N; ELSE : E L S E; END : E N D; GOTO : G O T O; NOT : N O T; AND : A N D; OR : O R; ABS : A B S; SQRT : S Q R T; SIN : S I N; COS : C O S; TAN : T A N; ARCSIN : A R C S I N; ARCCOS : A R C C O S; ARCTAN : A R C T A N; FAC : F A C; LBRACKET : '('; RBRACKET : ')'; LCURLY : '{'; RCURLY : '}'; LESS : '<'; GREATER : '>'; LESSEQUAL : '<='; GREATEREQUAL: '>='; NOTEQUAL : '!='; EQUAL : '=='; ASSIGN : '='; POW : '^'; PLUS : '+'; MINUS : '-'; MULTIPLY : '*'; DIVIDE : '/'; MODULO : '%'; ADDASSIGN : PLUS ASSIGN; SUBASSIGN : MINUS ASSIGN; MULTITPLYASSIGN : MULTIPLY ASSIGN; DIVIDEASSIGN : DIVIDE ASSIGN; MODULOASSIGN : MODULO ASSIGN; DOT : '.'; COLON : ':'; SEMICOLON : ';'; fragment ALPHABETICAL : [a-zA-Z]+; fragment NUMERICAL : [0-9]+; INTERNALVARIABLE : ALPHABETICAL (ALPHABETICAL|NUMERICAL)*; EXTERNALVARIABLE : COLON (ALPHABETICAL|NUMERICAL)+; NUMBER : NUMERICAL+ (DOT NUMERICAL+)?; fragment A : [aA]; fragment B : [bB]; fragment C : [cC]; fragment D : [dD]; fragment E : [eE]; fragment F : [fF]; fragment G : [gG]; fragment H : [hH]; fragment I : [iI]; fragment J : [jJ]; fragment K : [kK]; fragment L : [lL]; fragment M : [mM]; fragment N : [nN]; fragment O : [oO]; fragment P : [pP]; fragment Q : [qQ]; fragment R : [rR]; fragment S : [sS]; fragment T : [tT]; fragment U : [uU]; fragment V : [vV]; fragment W : [wW]; fragment X : [xX]; fragment Y : [yY]; fragment Z : [zZ]; chip : (line BREAK)* line? EOF ; line : multipleStatements? COMMENT? ; multipleStatements : statement* ; statement : ifStatement SEMICOLON? | ( varAssignment | expression | gotoStatement ) SEMICOLON ; ifStatement : IF LBRACKET expression RBRACKET THEN LCURLY multipleStatements? RCURLY (ELSE LCURLY multipleStatements? RCURLY)? ; expression : value | mathExpr ; value : primitive | var | increment | decrement ; primitive : number | string ; number : MINUS? NUMBER ; string : STRING ; var : internalVar | externalVar ; internalVar : INTERNALVARIABLE ; externalVar : EXTERNALVARIABLE ; increment : PLUS PLUS var | var PLUS PLUS ; decrement : MINUS MINUS var | var MINUS MINUS ; mathExpr : logicalExpression ; logicalExpression : arithmeticalExpression (logicalOp arithmeticalExpression)* ; arithmeticalExpression : primaryExpression (arithmeticalOp primaryExpression)* ; primaryExpression : LBRACKET mathExpr RBRACKET | value | prefixOp LBRACKET mathExpr RBRACKET ; prefixOp : NOT | ABS | SQRT | SIN | COS | TAN | ARCSIN | ARCCOS | ARCTAN | FAC ; arithmeticalOp : POW | PLUS | MINUS | MULTIPLY | DIVIDE | MODULO ; logicalOp : LESS | LESSEQUAL | GREATER | GREATEREQUAL | NOTEQUAL | EQUAL | AND | OR ; varAssignment : var assignOp expression ; assignOp : ADDASSIGN | SUBASSIGN | MULTITPLYASSIGN | DIVIDEASSIGN | MODULOASSIGN | ASSIGN ; gotoStatement : GOTO LBRACKET expression RBRACKET ;
src/Line_Array/src/line_arrays-classified.ads
fintatarta/eugen
0
21168
with Ada.Containers.Indefinite_Vectors; generic type Classified_Line (<>) is private; type Classifier_Type (<>) is private; with function Classify (Classifier : Classifier_Type; Line : String) return Classified_Line is <> ; with function Is_To_Be_Ignored (Line : Classified_Line) return Boolean is <>; package Line_Arrays.Classified is package Classified_Line_Vectors is new Ada.Containers.Indefinite_Vectors (Index_Type => Positive, Element_Type => Classified_Line); function Classify (Classifier : Classifier_Type; Lines : Line_Array) return Classified_Line_Vectors.Vector; end Line_Arrays.Classified;
Transynther/x86/_processed/AVXALIGN/_zr_un_/i3-7100_9_0x84_notsx.log_543_1694.asm
ljhsiun2/medusa
9
88801
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r13 push %r9 push %rbp push %rbx push %rcx lea addresses_UC_ht+0x1430a, %r10 nop nop nop add %rbx, %rbx movl $0x61626364, (%r10) nop nop nop nop nop sub $38541, %r13 lea addresses_normal_ht+0x15e1a, %rcx nop nop add $39955, %rbp mov $0x6162636465666768, %r9 movq %r9, %xmm4 and $0xffffffffffffffc0, %rcx movaps %xmm4, (%rcx) and $26179, %r11 lea addresses_D_ht+0xd4de, %r13 nop nop nop nop nop xor $12206, %r10 mov (%r13), %r11d nop nop nop nop nop cmp $59474, %rbp pop %rcx pop %rbx pop %rbp pop %r9 pop %r13 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r13 push %r15 push %r8 push %rbx push %rdi push %rsi // Load lea addresses_D+0x1543a, %r15 cmp %rsi, %rsi mov (%r15), %r10w nop nop nop nop nop and $27792, %rsi // Store mov $0x43a, %r13 nop nop nop nop nop dec %rbx movw $0x5152, (%r13) nop nop add $8965, %rbx // Faulty Load mov $0x382c3000000023a, %r13 nop nop nop xor $52389, %rdi vmovntdqa (%r13), %ymm7 vextracti128 $0, %ymm7, %xmm7 vpextrq $1, %xmm7, %r8 lea oracles, %r15 and $0xff, %r8 shlq $12, %r8 mov (%r15,%r8,1), %r8 pop %rsi pop %rdi pop %rbx pop %r8 pop %r15 pop %r13 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_NC', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_D', 'same': False, 'size': 2, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_P', 'same': False, 'size': 2, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_NC', 'same': True, 'size': 32, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 4, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 16, 'congruent': 5, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} {'src': {'type': 'addresses_D_ht', 'same': False, 'size': 4, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'2d': 3, '7b': 2, '8b': 2, '00': 517, '1e': 4, '08': 15} 00 1e 08 00 00 00 00 00 00 00 00 00 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1e 08 08 08 08 8b 8b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 08 00 00 00 00 00 00 00 00 00 00 00 00 7b 00 00 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 08 2d 08 2d 00 00 00 00 00 00 00 00 00 00 00 2d 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
Lab 1 - Moving and Complementing Values/lab21.asm
SathyasriS27/ARM7-Thumb-Programming
0
28485
<reponame>SathyasriS27/ARM7-Thumb-Programming AREA ADD, CODE, READONLY ENTRY MOV R0, #0X00000003 MOV R1, #0X00000004 ADD R2, R0, R1 UP B UP END
programs/oeis/184/A184552.asm
neoneye/loda
22
80139
; A184552: Super-birthdays (falling on the same weekday), version 4 (birth in the year preceding a February 29). ; 0,5,11,22,28,33,39,50,56,61,67,78,84,89,95,106,112,117,123,134,140,145,151,162,168,173,179,190,196,201,207,218,224,229,235,246,252,257,263,274,280,285,291,302,308,313,319,330,336,341,347,358,364,369,375,386,392,397,403,414,420,425,431,442,448,453,459,470,476,481,487,498,504,509,515,526,532,537,543,554,560,565,571,582,588,593,599,610,616,621,627,638,644,649,655,666,672,677,683,694 add $0,10 seq $0,184551 ; Super-birthdays (falling on the same weekday), version 3 (birth within 2 and 3 years after a February 29). sub $0,73
mac0412/seminario/exemplo/cor_da_tela/programa.asm
rulojuka/listas
0
23969
;==LoRom== ; We'll get to HiRom some other time. .MEMORYMAP ; Begin describing the system architecture. SLOTSIZE $8000 ; The slot is $8000 bytes in size. More details on slots later. DEFAULTSLOT 0 SLOT 0 $8000 ; Defines Slot 0's starting address. .ENDME ; End MemoryMap definition .ROMBANKSIZE $8000 ; Every ROM bank is 32 KBytes in size .ROMBANKS 8 ; 2 Mbits - Tell WLA we want to use 8 ROM Banks .SNESHEADER ID "SNES" ; 1-4 letter string, just leave it as "SNES" NAME "SNES Tile Demo " ; Program Title - can't be over 21 bytes, ; "123456789012345678901" ; use spaces for unused bytes of the name. SLOWROM LOROM CARTRIDGETYPE $00 ; $00 = ROM only, see WLA documentation for others ROMSIZE $08 ; $08 = 2 Mbits, see WLA doc for more.. SRAMSIZE $00 ; No SRAM see WLA doc for more.. COUNTRY $01 ; $01 = U.S. $00 = Japan, that's all I know LICENSEECODE $00 ; Just use $00 VERSION $00 ; $00 = 1.00, $01 = 1.01, etc. .ENDSNES .SNESNATIVEVECTOR ; Define Native Mode interrupt vector table COP EmptyHandler BRK EmptyHandler ABORT EmptyHandler NMI VBlank IRQ EmptyHandler .ENDNATIVEVECTOR .SNESEMUVECTOR ; Define Emulation Mode interrupt vector table COP EmptyHandler ABORT EmptyHandler NMI EmptyHandler RESET Start ; where execution starts IRQBRK EmptyHandler .ENDEMUVECTOR .BANK 0 SLOT 0 ; Defines the ROM bank and the slot it is inserted in memory. .ORG 0 ; .ORG 0 is really $8000, because the slot starts at $8000 .SECTION "EmptyVectors" SEMIFREE EmptyHandler: rti .ENDS .EMPTYFILL $00 ; fill unused areas with $00, opcode for BRK. ; BRK will crash the snes if executed. .MACRO Snes_Init sei ; Disabled interrupts clc ; clear carry to switch to native mode xce ; Xchange carry & emulation bit. native mode rep #$18 ; Binary mode (decimal mode off), X/Y 16 bit ldx #$1FFF ; set stack to $1FFF txs jsr Init .ENDM .bank 0 .section "Snes_Init" SEMIFREE Init: sep #$30 ; X,Y,A are 8 bit numbers lda #$8F ; screen off, full brightness sta $2100 ; brightness + screen enable register stz $2101 ; Sprite register (size + address in VRAM) stz $2102 ; Sprite registers (address of sprite memory [OAM]) stz $2103 ; "" "" stz $2105 ; Mode 0, = Graphic mode register stz $2106 ; noplanes, no mosaic, = Mosaic register stz $2107 ; Plane 0 map VRAM location stz $2108 ; Plane 1 map VRAM location stz $2109 ; Plane 2 map VRAM location stz $210A ; Plane 3 map VRAM location stz $210B ; Plane 0+1 Tile data location stz $210C ; Plane 2+3 Tile data location stz $210D ; Plane 0 scroll x (first 8 bits) stz $210D ; Plane 0 scroll x (last 3 bits) #$0 - #$07ff lda #$FF ; The top pixel drawn on the screen isn't the top one in the tilemap, it's the one above that. sta $210E ; Plane 0 scroll y (first 8 bits) sta $2110 ; Plane 1 scroll y (first 8 bits) sta $2112 ; Plane 2 scroll y (first 8 bits) sta $2114 ; Plane 3 scroll y (first 8 bits) lda #$07 ; Since this could get quite annoying, it's better to edit the scrolling registers to fix this. sta $210E ; Plane 0 scroll y (last 3 bits) #$0 - #$07ff sta $2110 ; Plane 1 scroll y (last 3 bits) #$0 - #$07ff sta $2112 ; Plane 2 scroll y (last 3 bits) #$0 - #$07ff sta $2114 ; Plane 3 scroll y (last 3 bits) #$0 - #$07ff stz $210F ; Plane 1 scroll x (first 8 bits) stz $210F ; Plane 1 scroll x (last 3 bits) #$0 - #$07ff stz $2111 ; Plane 2 scroll x (first 8 bits) stz $2111 ; Plane 2 scroll x (last 3 bits) #$0 - #$07ff stz $2113 ; Plane 3 scroll x (first 8 bits) stz $2113 ; Plane 3 scroll x (last 3 bits) #$0 - #$07ff lda #$80 ; increase VRAM address after writing to $2119 sta $2115 ; VRAM address increment register stz $2116 ; VRAM address low stz $2117 ; VRAM address high stz $211A ; Initial Mode 7 setting register stz $211B ; Mode 7 matrix parameter A register (low) lda #$01 sta $211B ; Mode 7 matrix parameter A register (high) stz $211C ; Mode 7 matrix parameter B register (low) stz $211C ; Mode 7 matrix parameter B register (high) stz $211D ; Mode 7 matrix parameter C register (low) stz $211D ; Mode 7 matrix parameter C register (high) stz $211E ; Mode 7 matrix parameter D register (low) sta $211E ; Mode 7 matrix parameter D register (high) stz $211F ; Mode 7 center position X register (low) stz $211F ; Mode 7 center position X register (high) stz $2120 ; Mode 7 center position Y register (low) stz $2120 ; Mode 7 center position Y register (high) stz $2121 ; Color number register ($0-ff) stz $2123 ; BG1 & BG2 Window mask setting register stz $2124 ; BG3 & BG4 Window mask setting register stz $2125 ; OBJ & Color Window mask setting register stz $2126 ; Window 1 left position register stz $2127 ; Window 2 left position register stz $2128 ; Window 3 left position register stz $2129 ; Window 4 left position register stz $212A ; BG1, BG2, BG3, BG4 Window Logic register stz $212B ; OBJ, Color Window Logic Register (or,and,xor,xnor) sta $212C ; Main Screen designation (planes, sprites enable) stz $212D ; Sub Screen designation stz $212E ; Window mask for Main Screen stz $212F ; Window mask for Sub Screen lda #$30 sta $2130 ; Color addition & screen addition init setting stz $2131 ; Add/Sub sub designation for screen, sprite, color lda #$E0 sta $2132 ; color data for addition/subtraction stz $2133 ; Screen setting (interlace x,y/enable SFX data) stz $4200 ; Enable V-blank, interrupt, Joypad register lda #$FF sta $4201 ; Programmable I/O port stz $4202 ; Multiplicand A stz $4203 ; Multiplier B stz $4204 ; Multiplier C stz $4205 ; Multiplicand C stz $4206 ; Divisor B stz $4207 ; Horizontal Count Timer stz $4208 ; Horizontal Count Timer MSB (most significant bit) stz $4209 ; Vertical Count Timer stz $420A ; Vertical Count Timer MSB stz $420B ; General DMA enable (bits 0-7) stz $420C ; Horizontal DMA (HDMA) enable (bits 0-7) stz $420D ; Access cycle designation (slow/fast rom) cli ; Enable interrupts rts .ends ; SNES Initialization Tutorial code ; This code is in the public domain. ; Needed to satisfy interrupt definition in "Header.inc". VBlank: RTI .bank 0 .section "MainCode" Start: ; Initialize the SNES. Snes_Init ; Set the background color to green. sep #$20 ; Set the A register to 8-bit. lda #%10000000 ; Force VBlank by turning off the screen. sta $2100 lda #%00000000 ; Load the low byte of the green color. sta $2122 lda #%01111100 ; Load the high byte of the green color. sta $2122 lda #%00001111 ; End VBlank, setting brightness to 15 (100%). sta $2100 ; Loop forever. Forever: jmp Forever .ends
programs/oeis/132/A132222.asm
karttu/loda
1
2244
<reponame>karttu/loda ; A132222: Beatty sequence 1+2*floor(n*Pi/2), which contains infinitely many primes. ; 1,3,7,9,13,15,19,21,25,29,31,35,37,41,43,47,51,53,57,59,63,65,69,73,75,79,81,85,87,91,95,97,101,103,107,109,113,117,119,123,125,129,131,135,139,141,145,147,151,153,157,161,163,167,169,173,175,179,183,185,189 mov $1,399 mul $1,$0 div $1,254 mul $1,2 add $1,1
AzureMXChip/MXCHIPAZ3166/core/lib/threadx/ports/c667x/ccs/src/tx_timer_interrupt.asm
Logicalis/eugenio-devices
0
169638
<filename>AzureMXChip/MXCHIPAZ3166/core/lib/threadx/ports/c667x/ccs/src/tx_timer_interrupt.asm ;/**************************************************************************/ ;/* */ ;/* Copyright (c) Microsoft Corporation. All rights reserved. */ ;/* */ ;/* This software is licensed under the Microsoft Software License */ ;/* Terms for Microsoft Azure RTOS. Full text of the license can be */ ;/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */ ;/* and in the root directory of this software. */ ;/* */ ;/**************************************************************************/ ; ; ;/**************************************************************************/ ;/**************************************************************************/ ;/** */ ;/** ThreadX Component */ ;/** */ ;/** Timer */ ;/** */ ;/**************************************************************************/ ;/**************************************************************************/ ; ;#define TX_SOURCE_CODE ; ; ;/* Include necessary system files. */ ; ;#include "tx_api.h" ;#include "tx_timer.h" ;#include "tx_thread.h" ; FP .set A15 DP .set B14 SP .set B15 ; ;Define Assembly language external references... ; .global _tx_timer_time_slice .global _tx_timer_system_clock .global _tx_timer_current_ptr .global _tx_timer_list_start .global _tx_timer_list_end .global _tx_timer_expired_time_slice .global _tx_timer_expired .global _tx_timer_expiration_process .global _tx_thread_time_slice .global _tx_thread_context_save .global _tx_thread_context_restore ; ; .sect ".text" ;/**************************************************************************/ ;/* */ ;/* FUNCTION RELEASE */ ;/* */ ;/* _tx_timer_interrupt C667x/TI */ ;/* 6.1 */ ;/* AUTHOR */ ;/* */ ;/* <NAME>, Microsoft Corporation */ ;/* */ ;/* DESCRIPTION */ ;/* */ ;/* This function processes the hardware timer interrupt. This */ ;/* processing includes incrementing the system clock and checking for */ ;/* time slice and/or timer expiration. If either is found, the */ ;/* interrupt context save/restore functions are called along with the */ ;/* expiration functions. */ ;/* */ ;/* INPUT */ ;/* */ ;/* None */ ;/* */ ;/* OUTPUT */ ;/* */ ;/* None */ ;/* */ ;/* CALLS */ ;/* */ ;/* _tx_thread_context_save Context save */ ;/* _tx_thread_context_restore Context restore */ ;/* _tx_thread_time_slice Time slice interrupted thread */ ;/* _tx_timer_expiration_process Timer expiration processing */ ;/* */ ;/* CALLED BY */ ;/* */ ;/* interrupt vector */ ;/* */ ;/* RELEASE HISTORY */ ;/* */ ;/* DATE NAME DESCRIPTION */ ;/* */ ;/* 09-30-2020 <NAME> Initial Version 6.1 */ ;/* */ ;/**************************************************************************/ ;VOID _tx_timer_interrupt(VOID) ;{ .global _tx_timer_interrupt _tx_timer_interrupt: ; ; /* Upon entry to this routine, it is assumed that registers B3, A0-A4 have ; already been saved and the space for saving additional registers has ; already been reserved. In addition, interrupts are locked out and must ; remain so until context save returns. */ ; ; /* Increment the system clock. */ ; _tx_timer_system_clock++; ; MVKL _tx_timer_system_clock,A0 ; Build address of system clock MVKH _tx_timer_system_clock,A0 ; LDW *A0,A2 ; Pickup system clock MVKL _tx_timer_time_slice,A3 ; Build address of time slice MVKH _tx_timer_time_slice,A3 ; LDW *A3,A1 ; Pickup time slice NOP 2 ; Delay ADD 1,A2,A2 ; Increment the system clock STW A2,*A0 ; Store it back in memory ; ; /* Test for time-slice expiration. */ ; if (_tx_timer_time_slice) ; { ; [!A1] B _tx_timer_no_time_slice ; If 0, skip time slice processing SUB A1,1,A1 ; Decrement time-slice value NOP 4 ; Delay slots ; ; /* Decrement the time_slice. */ ; _tx_timer_time_slice--; ; ; /* Check for expiration. */ ; if (_tx_timer_time_slice == 0) ; [A1] B _tx_timer_no_time_slice ; If non-zero, not expired yet STW A1,*A3 ; Store new time-slice MVKL _tx_timer_expired_time_slice,A0 ; Build address of expired flag MVKH _tx_timer_expired_time_slice,A0 ; MVKL 1,A4 ; Expired flag NOP ; Delay ; ; /* Set the time-slice expired flag. */ ; _tx_timer_expired_time_slice = TX_TRUE; ; STW A4,*A0 ; Set expired flag ; } ; _tx_timer_no_time_slice: ; ; /* Test for timer expiration. */ ; if (*_tx_timer_current_ptr) ; { ; MVKL _tx_timer_current_ptr,A2 ; Build address of current timer pointer MVKH _tx_timer_current_ptr,A2 ; LDW *A2,A0 ; Pickup timer list address MVKL _tx_timer_expired,A3 ; Build address of expired flag MVKH _tx_timer_expired,A3 ; NOP 2 ; Delay slots LDW *A0,A1 ; Pickup current timer entry ADD 4,A0,A0 ; Increment the current pointer NOP 3 ; Delay slots [A1] B _tx_timer_done ; If non-NULL, something has expired ; ; ; /* Set expiration flag. */ ; _tx_timer_expired = TX_TRUE; ; MVKL 1,A4 ; Build expired flag [A1] STW A4,*A3 ; Set expired flag NOP 3 ; Delay slots ; ; } ; else ; { _tx_timer_no_timer: ; ; /* No timer expired, increment the timer pointer. */ ; _tx_timer_current_ptr++; ; ; /* Check for wrap-around. */ ; if (_tx_timer_current_ptr == _tx_timer_list_end) ; MVKL _tx_timer_list_end,A3 ; Build timer list end address MVKH _tx_timer_list_end,A3 ; LDW *A3,A4 ; Pickup list end address MVKL _tx_timer_list_start,A3 ; Build timer list start address MVKH _tx_timer_list_start,A3 ; NOP 2 ; Delay slots CMPEQ A4,A0,A1 ; Compare current pointer with end [A1] LDW *A3,A0 ; If at the end, pickup timer list start NOP 4 ; Delay slots ; ; /* Wrap to beginning of list. */ ; _tx_timer_current_ptr = _tx_timer_list_start; ; _tx_timer_skip_wrap: ; ; STW A0,*A2 ; Store current timer pointer ; } ; _tx_timer_done: ; ; ; /* See if anything has expired. */ ; if ((_tx_timer_expired_time_slice) || (_tx_timer_expired)) ; { ; MVKL _tx_timer_expired_time_slice,A3 ; Build time-slice expired flag MVKH _tx_timer_expired_time_slice,A3 ; LDW *A3,A4 ; Pickup time-slice expired flag MVKL _tx_timer_expired,A0 ; Build timer expired flag MVKH _tx_timer_expired,A0 ; LDW *A0,A2 ; Pickup timer expired flag NOP 4 ; Delay slots OR A2,A4,A1 ; Combine expired flags [!A1] B _tx_timer_nothing_expired NOP 5 ; Delay slots ; _tx_something_expired: ; ; ; /* Something expired, call context save. */ ; _tx_thread_context_save(); ; B _tx_thread_context_save ; Call context save routine MVKL _tx_timer_ISR_return,B3 ; Build return address MVKH _tx_timer_ISR_return,B3 ; NOP 3 ; Delay slots _tx_timer_ISR_return: ; ; /* Did a timer expire? */ ; if (_tx_timer_expired) ; { ; MVKL _tx_timer_expired,A0 ; Build timer expired address MVKH _tx_timer_expired,A0 ; LDW *A0,A1 ; Pickup expired flag NOP 4 ; Delay slots [!A1] B _tx_timer_dont_activate ; If not set, skip timer activation NOP 5 ; Delay slots ; ; /* Process timer expiration. */ ; _tx_timer_expiration_process(); ; B _tx_timer_expiration_process ; Process timer expiration MVKL _tx_timer_ISR_return_1,B3 ; Build return address MVKH _tx_timer_ISR_return_1,B3 ; NOP 3 ; Delay slots _tx_timer_ISR_return_1: ; ; } _tx_timer_dont_activate: ; ; /* Did time slice expire? */ ; if (_tx_timer_expired_time_slice) ; { ; MVKL _tx_timer_expired_time_slice,A0 ; Build address of expired flag MVKH _tx_timer_expired_time_slice,A0 ; LDW *A0,A1 ; Pickup expired flag NOP 4 ; Delay slots [!A1] B _tx_timer_not_ts_expiration ; If not set, skip time-slice processing NOP 5 ; Delay slots ; ; /* Time slice interrupted thread. */ ; _tx_thread_time_slice(); ; B _tx_thread_time_slice ; Call time-slice processing MVKL _tx_timer_ISR_return_2,B3 ; Build return address MVKH _tx_timer_ISR_return_2,B3 ; NOP 3 ; Delay slots _tx_timer_ISR_return_2: ; ; } ; _tx_timer_not_ts_expiration: ; ; ; /* Call context restore. */ ; _tx_thread_context_restore(); ; B _tx_thread_context_restore ; Jump to context restore - no return! NOP 5 ; Delay slots ; ; } ; _tx_timer_nothing_expired: ; LDW *+SP(20),A0 ; Recover A0 LDW *+SP(24),A1 ; Recover A1 LDW *+SP(28),A2 ; Recover A2 LDW *+SP(32),A3 ; Recover A3 B IRP ; Return to point of interrupt || LDW *+SP(36),A4 ; Recover A4 LDW *+SP(96),B3 ; Recover B3 ADDK.S2 288,SP ; Recover stack space NOP 3 ; Delay slots ; ;}
packages/external/libmpg123-1.22.x/src/asm_nasm/synth_sse_accurate.asm
sezero/SDL2-OS2
2
242636
<filename>packages/external/libmpg123-1.22.x/src/asm_nasm/synth_sse_accurate.asm ; 1 "synth_sse_accurate.S" ; 1 "<built-in>" ; 1 "<command line>" ; 1 "synth_sse_accurate.S" ; 9 "synth_sse_accurate.S" ; 1 "mangle.h" 1 ; 13 "mangle.h" ; 1 "config.h" 1 ; 14 "mangle.h" 2 ; 1 "intsym.h" 1 ; 15 "mangle.h" 2 ; 10 "synth_sse_accurate.S" 2 ; 28 "synth_sse_accurate.S" %include "asm_nasm.inc" _sym_mangle synth_1to1_sse_accurate_asm SECTION .data align 32 maxmin_s16: dd 1191181824 dd 1191181824 dd 1191181824 dd 1191181824 dd -956301312 dd -956301312 dd -956301312 dd -956301312 SECTION .text align 16 GLOBAL synth_1to1_sse_accurate_asm synth_1to1_sse_accurate_asm: push dword ebp mov dword ebp, esp push dword ebx push dword esi pxor mm7, mm7 mov dword ebx, [ebp+8] mov dword edx, [ebp+12] mov dword esi, [ebp+16] mov dword eax, [ebp+20] shl dword eax, 2 lea dword ebx, [ebx+64] sub dword ebx, eax mov dword ecx, 4 align 16 Loop_start_1: movups xmm0, [ebx] movups xmm1, [ebx+16] movups xmm2, [ebx+32] movups xmm3, [ebx+48] movups xmm4, [ebx+128] movups xmm5, [ebx+144] movups xmm6, [ebx+160] movups xmm7, [ebx+176] mulps xmm0, [edx+0] mulps xmm1, [edx+16] mulps xmm2, [edx+32] mulps xmm3, [edx+48] mulps xmm4, [edx+64] mulps xmm5, [edx+80] mulps xmm6, [edx+96] mulps xmm7, [edx+112] addps xmm0, xmm1 addps xmm2, xmm3 addps xmm4, xmm5 addps xmm6, xmm7 addps xmm0, xmm2 addps xmm4, xmm6 movaps xmm5, xmm4 movaps xmm4, xmm0 lea dword ebx, [ebx+256] lea dword edx, [edx+128] movups xmm0, [ebx] movups xmm1, [ebx+16] movups xmm2, [ebx+32] movups xmm3, [ebx+48] movups xmm6, [ebx+128] movups xmm7, [ebx+144] mulps xmm0, [edx] mulps xmm1, [edx+16] mulps xmm2, [edx+32] mulps xmm3, [edx+48] mulps xmm6, [edx+64] mulps xmm7, [edx+80] addps xmm0, xmm1 addps xmm2, xmm3 addps xmm6, xmm7 movups xmm1, [ebx+160] movups xmm3, [ebx+176] mulps xmm1, [edx+96] mulps xmm3, [edx+112] addps xmm0, xmm2 addps xmm1, xmm3 addps xmm6, xmm1 movaps xmm7, xmm6 movaps xmm6, xmm0 lea dword ebx, [ebx+256] lea dword edx, [edx+128] movaps xmm0, xmm4 movaps xmm1, xmm6 unpcklps xmm4, xmm5 unpcklps xmm6, xmm7 unpckhps xmm0, xmm5 unpckhps xmm1, xmm7 movaps xmm2, xmm4 movaps xmm3, xmm0 movlhps xmm4, xmm6 movhlps xmm6, xmm2 movlhps xmm0, xmm1 movhlps xmm1, xmm3 subps xmm4, xmm6 subps xmm0, xmm1 addps xmm0, xmm4 movaps xmm1, xmm0 movaps xmm2, xmm0 pshufw mm2, [esi], 0xdd pshufw mm3, [esi+8], 0xdd cmpnleps xmm1, [maxmin_s16] cmpltps xmm2, [maxmin_s16+16] cvtps2pi mm0, xmm0 movhlps xmm0, xmm0 cvtps2pi mm1, xmm0 packssdw mm0, mm1 movq mm1, mm0 punpcklwd mm0, mm2 punpckhwd mm1, mm3 movq [esi], mm0 movq [esi+8], mm1 cvtps2pi mm0, xmm1 cvtps2pi mm1, xmm2 movhlps xmm1, xmm1 movhlps xmm2, xmm2 cvtps2pi mm2, xmm1 cvtps2pi mm3, xmm2 packssdw mm0, mm2 packssdw mm1, mm3 psrlw mm0, 15 psrlw mm1, 15 paddw mm0, mm1 paddw mm7, mm0 lea dword esi, [esi+16] dec dword ecx jnz Loop_start_1 mov dword ecx, 4 align 16 Loop_start_2: movups xmm0, [ebx] movups xmm1, [ebx+16] movups xmm2, [ebx+32] movups xmm3, [ebx+48] movups xmm4, [ebx+128] movups xmm5, [ebx+144] movups xmm6, [ebx+160] movups xmm7, [ebx+176] mulps xmm0, [edx+0] mulps xmm1, [edx+16] mulps xmm2, [edx+32] mulps xmm3, [edx+48] mulps xmm4, [edx+-64] mulps xmm5, [edx+-48] mulps xmm6, [edx+-32] mulps xmm7, [edx+-16] addps xmm0, xmm1 addps xmm2, xmm3 addps xmm4, xmm5 addps xmm6, xmm7 addps xmm0, xmm2 addps xmm4, xmm6 movaps xmm5, xmm4 movaps xmm4, xmm0 lea dword ebx, [ebx+256] lea dword edx, [edx+-128] movups xmm0, [ebx] movups xmm1, [ebx+16] movups xmm2, [ebx+32] movups xmm3, [ebx+48] movups xmm6, [ebx+128] movups xmm7, [ebx+144] mulps xmm0, [edx] mulps xmm1, [edx+16] mulps xmm2, [edx+32] mulps xmm3, [edx+48] mulps xmm6, [edx+-64] mulps xmm7, [edx+-48] addps xmm0, xmm1 addps xmm2, xmm3 addps xmm6, xmm7 movups xmm1, [ebx+160] movups xmm3, [ebx+176] mulps xmm1, [edx+-32] mulps xmm3, [edx+-16] addps xmm0, xmm2 addps xmm1, xmm3 addps xmm6, xmm1 movaps xmm7, xmm6 movaps xmm6, xmm0 lea dword ebx, [ebx+256] lea dword edx, [edx+-128] movaps xmm0, xmm4 movaps xmm1, xmm6 unpcklps xmm4, xmm5 unpcklps xmm6, xmm7 unpckhps xmm0, xmm5 unpckhps xmm1, xmm7 movaps xmm2, xmm4 movaps xmm3, xmm0 movlhps xmm4, xmm6 movhlps xmm6, xmm2 movlhps xmm0, xmm1 movhlps xmm1, xmm3 addps xmm4, xmm6 addps xmm0, xmm1 addps xmm0, xmm4 movaps xmm1, xmm0 movaps xmm2, xmm0 pshufw mm2, [esi], 0xdd pshufw mm3, [esi+8], 0xdd cmpnleps xmm1, [maxmin_s16] cmpltps xmm2, [maxmin_s16+16] cvtps2pi mm0, xmm0 movhlps xmm0, xmm0 cvtps2pi mm1, xmm0 packssdw mm0, mm1 movq mm1, mm0 punpcklwd mm0, mm2 punpckhwd mm1, mm3 movq [esi], mm0 movq [esi+8], mm1 cvtps2pi mm0, xmm1 cvtps2pi mm1, xmm2 movhlps xmm1, xmm1 movhlps xmm2, xmm2 cvtps2pi mm2, xmm1 cvtps2pi mm3, xmm2 packssdw mm0, mm2 packssdw mm1, mm3 psrlw mm0, 15 psrlw mm1, 15 paddw mm0, mm1 paddw mm7, mm0 lea dword esi, [esi+16] dec dword ecx jnz Loop_start_2 pshufw mm0, mm7, 0xee paddw mm0, mm7 pshufw mm1, mm0, 0x55 paddw mm0, mm1 movd eax, mm0 and dword eax, 0xffff pop dword esi pop dword ebx mov dword esp, ebp pop dword ebp emms ret
Lab Assessment Submission/Lab 1/ASSESMENT 2.asm
FahimuzzamanShaurav/CSE331L-Section-10-Fall20-NSU
0
21297
; You may customize this and other start-up templates; ; The location of this template is c:\emu8086\inc\0_com_template.txt org 100h ;#INCLUDE<STDIO.H> ;INT MAIN (){ MOV AX, 02 ; INT A=2; MOV BX, 03 ; INT B=3; ADD AX, BX ; INT C = A+B; ; PRINTF(C); ; RETURN} ; ret
alloy4fun_models/trashltl/models/5/y5bJXPNCe3wyhcurx.als
Kaixi26/org.alloytools.alloy
0
939
<filename>alloy4fun_models/trashltl/models/5/y5bJXPNCe3wyhcurx.als<gh_stars>0 open main pred idy5bJXPNCe3wyhcurx_prop6 { all f:File | always (f in Trash implies (after f in Trash)) } pred __repair { idy5bJXPNCe3wyhcurx_prop6 } check __repair { idy5bJXPNCe3wyhcurx_prop6 <=> prop6o }
basic_constraint/composite_unique_key.als
nowavailable/alloy_als_study
0
4366
<filename>basic_constraint/composite_unique_key.als module composite_unique_constraint /** * 複合ユニーク制約の実現。(単独ユニークフィールドとの共存) */ /* sig Entity_0 { disj pkey: one Int } */ sig Entity_1 { field_a: one Int, field_b: one Int } fact { all e,e':Entity_1 | e != e' => e.field_a -> e.field_a != e'.field_a -> e'.field_a } run {} // for 6
programs/oeis/004/A004155.asm
neoneye/loda
22
12538
; A004155: Sum of digits of n-th odd number. ; 1,3,5,7,9,2,4,6,8,10,3,5,7,9,11,4,6,8,10,12,5,7,9,11,13,6,8,10,12,14,7,9,11,13,15,8,10,12,14,16,9,11,13,15,17,10,12,14,16,18,2,4,6,8,10,3,5,7,9,11,4,6,8,10,12,5,7,9,11,13,6,8,10,12,14,7,9,11,13,15,8,10,12,14,16,9,11,13,15,17,10,12,14,16,18,11,13,15,17,19 mul $0,2 lpb $0 mov $2,$0 div $0,10 mod $2,10 add $1,$2 lpe add $1,1 mov $0,$1
programs/oeis/181/A181716.asm
neoneye/loda
22
16961
<filename>programs/oeis/181/A181716.asm ; A181716: a(n) = a(n-1) + a(n-2) + (-1)^n, with a(0)=0 and a(1)=1. ; 0,1,2,2,5,6,12,17,30,46,77,122,200,321,522,842,1365,2206,3572,5777,9350,15126,24477,39602,64080,103681,167762,271442,439205,710646,1149852,1860497,3010350,4870846,7881197,12752042,20633240,33385281,54018522,87403802,141422325,228826126,370248452,599074577,969323030,1568397606,2537720637,4106118242,6643838880,10749957121,17393796002,28143753122,45537549125,73681302246,119218851372,192900153617,312119004990,505019158606,817138163597,1322157322202,2139295485800,3461452808001,5600748293802,9062201101802,14662949395605,23725150497406,38388099893012,62113250390417,100501350283430,162614600673846,263115950957277,425730551631122,688846502588400,1114577054219521,1803423556807922,2918000611027442,4721424167835365,7639424778862806,12360848946698172,20000273725560977,32361122672259150,52361396397820126,84722519070079277,137083915467899402,221806434537978680,358890350005878081,580696784543856762,939587134549734842,1520283919093591605,2459871053643326446,3980154972736918052,6440026026380244497,10420180999117162550,16860207025497407046,27280388024614569597,44140595050111976642,71420983074726546240,115561578124838522881,186982561199565069122,302544139324403592002 mov $3,$0 mov $5,2 lpb $5 mov $0,$3 sub $5,1 add $0,$5 trn $0,1 seq $0,301653 ; Expansion of x*(1 + 2*x)/((1 - x)*(1 + x)*(1 - x - x^2)). mov $2,$5 mul $2,$0 add $1,$2 mov $4,$0 lpe min $3,1 mul $3,$4 sub $1,$3 mov $0,$1
src/lib/math/sin.asm
germix/sanos
57
93822
<gh_stars>10-100 ;----------------------------------------------------------------------------- ; sin.asm - floating point sine ; Ported from <NAME>'s free C Runtime Library ;----------------------------------------------------------------------------- SECTION .text global sin global _sin sin: _sin: push ebp ; Save register bp mov ebp,esp ; Point to the stack frame fld qword [ebp+8] ; Load real from stack fsin ; Take the sine pop ebp ; Restore register bp ret ; Return to caller
core/lib/types/EilenbergMacLane1.agda
AntoineAllioux/HoTT-Agda
294
1488
{-# OPTIONS --without-K --rewriting #-} module lib.types.EilenbergMacLane1 where open import lib.types.EilenbergMacLane1.Core public open import lib.types.EilenbergMacLane1.Recursion public open import lib.types.EilenbergMacLane1.DoubleElim public open import lib.types.EilenbergMacLane1.DoublePathElim public open import lib.types.EilenbergMacLane1.FunElim public open import lib.types.EilenbergMacLane1.PathElim public
test/fail/Imports/Test.agda
asr/agda-kanso
1
5880
{-# OPTIONS --universe-polymorphism #-} module Imports.Test where open import Imports.Level record Foo (ℓ : Level) : Set ℓ where
splash.asm
peter-mount/teletextc64
1
8614
<filename>splash.asm<gh_stars>1-10 ; ********************************************************************** ; Splash loading page ; 1K for holding screen chars for refresh ; ; Copyright 2021 <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. ; ********************************************************************** CPU 0 ; 6502 start = &0400 ; Base of Teletext screen ORG start-2 ; Start 2 bytes earlier so we can inject the load address for the prg file format GUARD start+(25*40) ; Guard against going over teletext screen size EQUW start ; Load address 0400 in prg file format EQUS 134, "departureboards.mobi ",135,"C64",129,"v0.01" EQUB &96, &ff, &ff, &ff, &ff, &ff, &ff, &ff EQUB &ff, &ff, &ff, &ff, &ff, &ff, &bf, &af, &af, &a3, &a3, &a3, &a3, &a3, &a3, &a3 EQUB &a3, &a3, &a3, &af, &af, &ff, &ff, &ff, &ff, &ff, &ff, &ff, &ff, &ff, &ff, &ff EQUB &96, &ff, &ff, &ff, &ff, &ff, &ff, &ff, &bf, &af, &a7, &a3, &97, &e0, &f0, &bc EQUB &ec, &fb, &ff, &ff, &ff, &ff, &ff, &ff, &ff, &ff, &ff, &fc, &f4, &f0, &96, &a3 EQUB &af, &ff, &ff, &ff, &ff, &ff, &ff, &ff, &96, &ff, &af, &af, &a7, &a3, &a1, &97 EQUB &f0, &f0, &fc, &fc, &ff, &e7, &f9, &fe, &ff, &af, &af, &af, &a7, &a3, &a3, &a3 EQUB &a3, &a3, &a3, &a3, &a3, &a3, &ab, &ac, &e4, &96, &ef, &ff, &ff, &ff, &ff, &ff EQUB &97, &f0, &f0, &f8, &fc, &fc, &ff, &ff, &af, &af, &af, &a7, &a1, &a3, &a1, &93 EQUB &e0, &f8, &fc, &fc, &fc, &ff, &ff, &ff, &ff, &ff, &ff, &ff, &ff, &ff, &fc, &fc EQUB &fc, &f4, &96, &eb, &ff, &ff, &ff, &ff, &97, &af, &a7, &a3, &a3, &94, &f0, &f0 EQUB &f0, &f8, &fc, &fc, &9e, &ff, &ff, &93, &ff, &bf, &a3, &a3, &a3, &a3, &96, &f0 EQUB &f0, &f0, &20, &f0, &f0, &93, &a3, &a3, &9f, &a3, &a9, &96, &ff, &ff, &ff, &ff EQUB &95, &e8, &9d, &94, &ff, &9e, &9c, &ff, &ff, &ff, &ff, &ff, &b7, &a3, &ff, &93 EQUB &9f, &96, &fe, &ff, &ff, &ff, &ff, &ff, &ff, &ff, &b0, &ef, &ff, &ff, &ff, &ff EQUB &ff, &ff, &f4, &96, &ef, &ff, &ff, &ff, &95, &ea, &9e, &94, &bf, &af, &ef, &ff EQUB &bf, &af, &af, &ff, &b5, &20, &ff, &93, &9f, &96, &ff, &ff, &ff, &ff, &ff, &ff EQUB &ff, &ff, &b5, &ea, &ff, &ff, &ff, &ff, &ff, &ff, &ff, &b0, &ea, &ff, &ff, &ff EQUB &95, &ea, &ea, &ea, &94, &20, &ea, &ff, &20, &20, &9e, &ff, &b5, &20, &ff, &93 EQUB &9f, &96, &ff, &ff, &ff, &ff, &ff, &ff, &ff, &ff, &a5, &20, &ef, &ff, &ff, &ff EQUB &ff, &ff, &ff, &b4, &ea, &ff, &ff, &ff, &95, &ea, &ea, &ea, &94, &a1, &eb, &ff EQUB &a2, &9e, &a3, &ff, &a1, &20, &ff, &93, &9f, &96, &ff, &ff, &ff, &ff, &ff, &ff EQUB &ff, &e5, &b4, &20, &f4, &ef, &ff, &ff, &ff, &ff, &ff, &b5, &ea, &ff, &ff, &ff EQUB &95, &ea, &ea, &ea, &94, &20, &ea, &ff, &20, &20, &20, &ff, &20, &9e, &ff, &93 EQUB &9f, &96, &ff, &ff, &ff, &ff, &ff, &bf, &e1, &fe, &b5, &20, &ff, &fd, &ab, &ff EQUB &ff, &ff, &ff, &b5, &a8, &ff, &ff, &ff, &95, &ea, &fa, &fa, &94, &20, &fa, &ff EQUB &20, &20, &20, &ff, &20, &9e, &ff, &93, &9f, &96, &ef, &ff, &ff, &ff, &bf, &e1 EQUB &ae, &af, &af, &20, &af, &af, &ad, &a2, &af, &af, &af, &a5, &20, &ff, &ff, &ff EQUB &95, &ea, &9d, &94, &ff, &9e, &9c, &ff, &fc, &fc, &fe, &ff, &b0, &e0, &ff, &93 EQUB &fc, &b4, &20, &20, &20, &94, &20, &20, &20, &f0, &f0, &f0, &f0, &f0, &f0, &f0 EQUB &f0, &f0, &9f, &f0, &96, &ff, &ff, &ff, &95, &ea, &9d, &94, &ff, &ff, &9d, &96 EQUB &e0, &ac, &e4, &20, &20, &94, &9d, &93, &ff, &b5, &20, &20, &20, &20, &20, &9e EQUB &97, &aa, &a8, &95, &a9, &20, &97, &a6, &9f, &a2, &a6, &96, &9c, &ff, &ff, &ff EQUB &95, &a2, &9d, &94, &e9, &f8, &f2, &a3, &e6, &9d, &96, &a9, &b8, &a9, &9e, &93 EQUB &ff, &9c, &bc, &ac, &ac, &ac, &ac, &fc, &fc, &fc, &fc, &fc, &fc, &fc, &fc, &bc EQUB &ac, &9f, &ac, &fc, &92, &f0, &f0, &f0, &94, &a3, &ab, &af, &ff, &ff, &9d, &95 EQUB &a2, &a3, &9e, &ab, &94, &ff, &9c, &93, &ff, &ff, &ea, &eb, &a3, &b7, &eb, &ff EQUB &ff, &ff, &ff, &ff, &ff, &ff, &9f, &ff, &a3, &b7, &eb, &ea, &92, &ff, &ff, &ff EQUB &97, &9a, &a2, &a1, &99, &94, &a3, &af, &ef, &ff, &ff, &ff, &ea, &ff, &9e, &93 EQUB &ff, &ff, &9f, &ff, &ff, &ff, &ff, &ff, &ff, &ff, &ff, &ff, &ff, &ff, &ff, &ff EQUB &ff, &ff, &ff, &b5, &92, &ff, &ff, &ff, &97, &9a, &a9, &a4, &20, &e9, &aa, &b0 EQUB &99, &94, &a3, &ab, &ed, &f3, &9d, &93, &eb, &ff, &9e, &9c, &ff, &9f, &ff, &bf EQUB &a3, &a3, &a3, &a3, &a3, &a3, &a3, &af, &af, &af, &af, &92, &aa, &ff, &ff, &ff EQUB &97, &9a, &e0, &20, &20, &20, &e5, &20, &b5, &20, &e0, &b8, &94, &99, &e6, &e4 EQUB &93, &ad, &ac, &ac, &ac, &ac, &ac, &a4, &97, &20, &b6, &a3, &a3, &93, &e8, &e7 EQUB &e7, &e7, &a7, &92, &e8, &ff, &ff, &ff, &20, &20, &97, &9a, &a8, &20, &9a, &ac EQUB &f0, &20, &b9, &b5, &99, &94, &a8, &b9, &93, &a9, &b9, &b9, &b9, &b9, &b9, &97 EQUB &a1, &ac, &20, &20, &a4, &93, &ea, &b9, &b9, &b1, &92, &fe, &ff, &ff, &ff, &ff EQUB &92, &20, &20, &20, &97, &9a, &a2, &20, &9a, &b3, &20, &9a, &b6, &99, &94, &e6 EQUB &a4, &93, &a2, &a2, &a6, &a6, &a6, &97, &a1, &ac, &93, &e8, &fc, &20, &aa, &af EQUB &ae, &a4, &92, &ff, &ff, &ff, &ff, &ff, &92, &fd, &f4, &20, &20, &20, &20, &20 EQUB &20, &97, &9a, &a4, &a2, &9a, &a2, &ac, &ac, &a4, &20, &20, &20, &20, &20, &20 EQUB &20, &20, &20, &20, &20, &94, &9a, &e8, &99, &92, &af, &ff, &ff, &ff, &ff, &ff EQUB &92, &ff, &ff, &ff, &f4, &b0, &20, &20, &20, &20, &20, &9a, &97, &a1, &20, &b8 EQUB &94, &a8, &e4, &f0, &20, &20, &20, &20, &20, &20, &20, &20, &20, &94, &f0, &a6 EQUB &20, &20, &20, &99, &92, &a3, &a3, &af, &92, &ff, &ff, &ff, &ff, &ff, &fd, &f0 EQUB &20, &20, &20, &20, &20, &20, &9a, &97, &a8, &20, &b0, &94, &a3, &a3, &a3, &a3 EQUB &a3, &a3, &a3, &a3, &a3, &97, &f0, &b0, &20, &20, &20, &20, &20, &20, &20, &20 EQUB &92, &ff, &ff, &ff, &ff, &ff, &ff, &ff, &fd, &f4, &b0, &20, &20, &20, &20, &9a EQUB &20, &97, &a2, &a9, &e4, &b0, &20, &20, &20, &20, &20, &20, &20, &20, &20, &a2 EQUB &a9, &ac, &f0, &20, &20, &20, &20, &20 .end SAVE "splash.prg", start-2, end
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_2447.asm
ljhsiun2/medusa
9
3881
.global s_prepare_buffers s_prepare_buffers: push %r15 push %rax push %rcx push %rdi push %rsi lea addresses_A_ht+0xc42e, %rsi lea addresses_WT_ht+0xf2c, %rdi nop nop and $20065, %r15 mov $5, %rcx rep movsq nop nop sub %rax, %rax pop %rsi pop %rdi pop %rcx pop %rax pop %r15 ret .global s_faulty_load s_faulty_load: push %r12 push %r14 push %r15 push %rax push %rdx push %rsi // Load lea addresses_WC+0x798e, %rdx nop nop nop cmp $48822, %rsi mov (%rdx), %r14d nop nop nop nop nop xor %rsi, %rsi // Faulty Load lea addresses_normal+0x1f20e, %rsi nop nop xor $59837, %r12 movups (%rsi), %xmm7 vpextrq $0, %xmm7, %r15 lea oracles, %rsi and $0xff, %r15 shlq $12, %r15 mov (%rsi,%r15,1), %r15 pop %rsi pop %rdx pop %rax pop %r15 pop %r14 pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 7, 'size': 4, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}} {'34': 21829} 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 */
oeis/043/A043119.asm
neoneye/loda-programs
11
29508
<filename>oeis/043/A043119.asm<gh_stars>10-100 ; A043119: Numbers k such that 0 and 4 occur juxtaposed in the base-6 representation of k but not of k-1. ; Submitted by <NAME> ; 24,40,60,76,96,112,132,144,168,184,204,220,240,256,276,292,312,328,348,360,384,400,420,436,456,472,492,508,528,544,564,576,600,616,636,652,672,688,708,724,744,760,780,792,816,832,852 mov $2,$0 mov $7,$0 mov $9,$0 lpb $9 mov $0,$7 mov $4,0 sub $9,1 sub $0,$9 mul $0,2 mov $3,$0 add $3,1 add $3,$0 add $8,$0 mov $0,$3 add $1,1 sub $3,1 mul $3,5 mov $5,16 mul $5,$8 sub $5,$8 add $10,$8 add $10,$5 mov $5,4 mov $6,$3 add $3,2 mul $6,$8 lpb $0 add $5,2 mov $0,$5 div $6,$10 mul $3,$6 mul $7,$2 lpe gcd $3,$5 add $4,$0 add $4,5 add $3,$4 mov $10,$3 sub $10,6 div $10,3 add $1,$10 lpe add $1,$2 mov $0,$1 mul $0,4 add $0,24
oeis/020/A020114.asm
neoneye/loda-programs
11
27972
; A020114: Ceiling of GAMMA(n+1/9)/GAMMA(1/9). ; Submitted by <NAME> ; 1,1,1,1,1,4,18,105,741,6006,54718,553254,6147264,74450194,976124761,13774204959,208143541602,3353423725802,57380805974820,1039230152655058,19860842917407766,399423618672311730 mov $1,1 mov $3,1 lpb $0 mov $2,$0 sub $0,1 mul $2,18 sub $2,16 mul $1,$2 mul $3,18 lpe sub $3,5 div $1,$3 mov $0,$1 add $0,1
src/main/antlr/TextTemplateColorizeLexer.g4
mikecargal/texttemplate-editor
0
3790
lexer grammar TextTemplateColorizeLexer; COMMENT: '//' ~[\n]*; SLASH_STAR_COMMENT: '/*' .*? '*/' ->type(COMMENT); SLASHSTAR: '/*'; TICK_COMMENT: [ \t]* '`' [ \t]* '//' ~[\n]* ('\n' [ \t]* '//' ~[\n]*)* '\n' [ \t]* ->type(TICK); TICK: '`' [ \t]* EOF; TEXT: ~[{/`]+ ; TICK_TEXT: '`' ->type(TEXT); LBRACE: '{' -> pushMode(BRACED); TEXT_SLASH: '/' ->type(TEXT); SUBTEMPLATES: 'Subtemplates:' [ \t\n]* EOF; ERROR: .; mode BRACED; BRACED_SLASH_STAR_COMMENT: '/*' .*? '*/' ->type(COMMENT); BRACED_SLASH_STAR: '/*'->type(SLASHSTAR); BRACED_COMMENT: '//' ~[\n]* ('\n' | EOF) ->type(COMMENT); POUNDIDENTIFIER: '#' [@$a-zA-Z_^][a-zA-Z0-9_]*; IDENTIFIER: [@$a-zA-Z_^][a-zA-Z0-9_]* ; KEYWORD: '.' KEYWORDS; LP: '(' -> pushMode(PARENED); DOT: '.'; ARROW: '=>'; RELATIONAL: ('==' | '!=' | '=' | '<=' | '>=' | '<' | '>'); THINARROW: '->'; RBRACE: '}' -> popMode; WS: [ \t\n]+ ->skip; // allow white space in braced BRACED_COMMA: ',' ->type(COMMA); COLON : ':'; LBRACKET_WHITE_SPACE: '[' [ \t]* '\n' [ \t]* ->type(LBRACKET),pushMode(BRACKETED); LBRACKET: '[' ->pushMode(BRACKETED); BRACED_QUOTE: '"' ->type(LQUOTE),pushMode(QUOTEDMODE); LAPOSTROPHE: '\'' ->pushMode(APOSTROPHED); AND: '&'; OR: '|'; NOT: '!'; DIGITS: ('0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9')+; MINUS: '-'; BRACED_ILLEGAL: ('%' | '*' | '-' | '=' | '{' | ';' | '<' | '>' | '?' | '\\' | ']')+; mode PARENED; PARENED_SLASH_STAR_COMMENT: '/*' .*? '*/' ->type(COMMENT); REGEX: '/' REGEXFIRSTCHAR REGEXCHAR* '/' ('g' | 'i' | 'm' | 's')*; PARENED_SLASH_STAR: '/*' ->type(SLASHSTAR); PARENED_COMMENT: [ ]+ '//' ~[\n]* ('\n' | EOF) ->type(COMMENT); PARENED_WS: [ \t\n]+ ->skip; // allow white space in braced PARENED_BRACKET: '[' ->type(LBRACKET),pushMode(BRACKETED); PARENED_POUNDIDENTIFIER: '#' [@$a-zA-Z_^][a-zA-Z0-9_]* ->type(POUNDIDENTIFIER); PARENED_IDENTIFIER: [@$a-zA-Z_^][a-zA-Z0-9_]* ->type(IDENTIFIER); PARENED_KEYWORD: '.' KEYWORDS ->type(KEYWORD); PARENED_DOT: '.' ->type(DOT); PARENED_DIGITS: ('0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9')+ ->type(DIGITS); PARENED_MINUS: '-' ->type(MINUS); RP: ')' -> popMode; LQUOTE: '"' -> pushMode(QUOTEDMODE); PARENED_APOSTROPHE: '\'' ->type(LAPOSTROPHE),pushMode(APOSTROPHED); PARENED_BRACE: '{' -> type(LBRACE),pushMode(BRACED); COMMA: ','; PARENED_AND: '&' ->type(AND); PARENED_OR: '|' ->type(OR); PARENED_NOT: '!' ->type(NOT); PARENED_LP: '(' -> type(LP),pushMode(NESTED); PARENED_RELATIONAL: ('==' | '!=' | '=' | '<=' | '>=' | '<' | '>') ->type(RELATIONAL); PARENED_ILLEGAL: . ->type(ERROR); fragment REGEXFIRSTCHAR : ~[*\r\n\u2028\u2029\\/[] | REGEXBACKSLASH | '[' REGEXCLASSCHAR* ']'; fragment REGEXCHAR : ~[\r\n\u2028\u2029\\/[] | REGEXBACKSLASH | '[' REGEXCLASSCHAR* ']'; fragment REGEXCLASSCHAR : ~[\r\n\u2028\u2029\]\\] | REGEXBACKSLASH; fragment REGEXBACKSLASH: '\\' ~[\r\n\u2028\u2029]; mode QUOTEDMODE; RQUOTE: '"' ->popMode; fragment ESC: '\\' (["\\/bfnrt] | UNICODE); fragment UNICODE : 'u' HEX HEX HEX HEX; fragment HEX : [0-9a-fA-F]; QUOTED: (ESC | ~["\\])*; QUOTED_BAD_BACKSLASH: '\\' ~["\\/bfnrt] ->type(ERROR); mode APOSTROPHED; ESCAPED_APOSTROPHE: '\\\'' ->type(QUOTED); ESCAPED_BACKSLASH: '\\\\' ->type(QUOTED); BAD_BACKSLASH: '\\'; RAPOSTROPHE: '\'' ->popMode; APOSTROPHED_TEXT: ~['\\]* ->type(QUOTED); mode BRACKETED; BRACKETED_SLASH_STAR_COMMENT: '/*' .*? '*/' ->type(COMMENT); BRACKETED_SLASH_STAR: '/*' ->type(SLASHSTAR); BRACKETED_COMMENT_LINE: '\n' [ \t]* '//' ~[\n]* ->type(COMMENT); BULLET: [ \t]* '{.}' ; BRACKETED_COMMENT_SKIP: [ \t]* '//' ~[\n]* ('\n' [ \t]* '//' ~[\n]*)* ->type(COMMENT); BRACKETED_TICK_COMMENT: [ \t]* '`' [ \t]* '//' ~[\n]* ('\n' [ \t]* '//' ~[\n]*)* '\n' [ \t]* ->type(TICK); BRACKETED_TICK: '`' [ \t]* EOF; RBRACKET_WHITE_SPACE: [ \t]* '\n' [ \t]* ']' ->type(RBRACKET),popMode; RBRACKET: ']' -> popMode; BRACKETED_TEXT: ~[{}/`\n\u005d]+ ->type(TEXT); // u005d right bracket BRACKETED_TICK_TEXT: '`' ->type(TEXT); BRACKETED_LBRACE: '{' -> type(LBRACE),pushMode(BRACED); BRACKETED_RBRACE: '}' -> type(RBRACE); BRACKETED_SLASH: '/' ->type(TEXT); BRACKETED_SUBTEMPLATES: 'Subtemplates:' [ \t]* EOF->type(SUBTEMPLATES); mode NESTED; NESTED_SLASH_STAR_COMMENT: '/*' .*? '*/' ->type(COMMENT); NESTED_SLASH_STAR: '/*' ->type(SLASHSTAR); NESTED_POUNDIDENTIFIER: '#' [@$a-zA-Z_^][a-zA-Z0-9_]* ->type(POUNDIDENTIFIER); NESTED_IDENTIFIER: [@$a-zA-Z_^][a-zA-Z0-9_]* ->type(IDENTIFIER); NESTED_KEYWORD: '.' KEYWORDS ->type(KEYWORD); NESTED_DOT: '.' ->type(DOT); NESTED_RELATIONAL: ('==' | '!=' | '=' | '<=' | '>=' | '<' | '>') ->type(RELATIONAL); NESTED_WS: [ \t\n]+ ->skip; // allow white space in braced NESTED_LP: '(' -> type(LP),pushMode(NESTED); NESTED_RP: ')' ->type(RP),popMode; NESTED_AND: '&' ->type(AND); NESTED_OR: '|' ->type(OR); NESTED_NOT: '!' ->type(NOT); NESTED_DIGITS: ('0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9')+ ->type(DIGITS); NESTED_QUOTE: '"' ->type(LQUOTE),pushMode(QUOTEDMODE); NESTED_APOSTROPHE: '\'' ->type(LAPOSTROPHE),pushMode(APOSTROPHED); NESTED_ILLEGAL: . ->type(ERROR); fragment KEYWORDS: ( 'ToUpper' | 'GreaterThan' | 'LessThan' | 'Where' | 'Exists' | '@BulletStyle' | '@MissingValue' | 'Join' | 'Assert' | 'Case' | 'Count' | 'IfMissing' | 'Matches' | 'ToJson' | 'ToLower' | '@Include' | 'ToDate' | '@DateFormat' | '@DateTest' | 'GroupBy' | 'OrderBy' | 'Trim' | 'StartsWith' | 'EndsWith' | 'Replace' | 'Contains' | 'Align' | 'Substr' | 'IndexOf' | 'LastIndexOf' | 'EncodeFor' | '@EncodeDataFor' | '@BulletMode' | '@Falsy' | 'Compose' | '@DefaultIndent' | '@ValueFunction' | 'Index' | '@MultilineStyle' );
src/Categories/Functor/Instance/StrictCore.agda
MirceaS/agda-categories
0
14065
{-# OPTIONS --without-K --safe #-} module Categories.Functor.Instance.StrictCore where -- The 'strict' core functor (from StrictCats to StrictGroupoids). -- This is the right-adjoint of the forgetful functor from -- StrictGroupoids to StrictCats -- (see Categories.Functor.Adjoint.Instance.StrictCore) open import Data.Product open import Level using (_⊔_) open import Function using (_on_; _$_) renaming (id to idf) open import Relation.Binary.PropositionalEquality as ≡ using (cong; cong-id) open import Categories.Category import Categories.Category.Construction.Core as C open import Categories.Category.Instance.StrictCats open import Categories.Category.Instance.StrictGroupoids open import Categories.Functor open import Categories.Functor.Equivalence open import Categories.Functor.Instance.Core renaming (Core to WeakCore) open import Categories.Functor.Properties using ([_]-resp-≅) import Categories.Morphism as Morphism import Categories.Morphism.Reasoning as MR import Categories.Morphism.HeterogeneousIdentity as HId import Categories.Morphism.HeterogeneousIdentity.Properties as HIdProps open import Categories.Morphism.IsoEquiv using (⌞_⌟) Core : ∀ {o ℓ e} → Functor (Cats o ℓ e) (Groupoids o (ℓ ⊔ e) e) Core {o} {ℓ} {e} = record { F₀ = F₀ ; F₁ = F₁ ; identity = λ {A} → record { eq₀ = λ _ → ≡.refl ; eq₁ = λ _ → ⌞ MR.id-comm-sym A ⌟ } ; homomorphism = λ {A B C} → record { eq₀ = λ _ → ≡.refl ; eq₁ = λ _ → ⌞ MR.id-comm-sym C ⌟ } ; F-resp-≈ = λ {A B F G} → CoreRespFEq {A} {B} {F} {G} } where open Functor WeakCore CoreRespFEq : {A B : Category o ℓ e} {F G : Functor A B} → F ≡F G → F₁ F ≡F F₁ G CoreRespFEq {A} {B} {F} {G} F≡G = record { eq₀ = eq₀ ; eq₁ = λ {X} {Y} f → ⌞ begin (from $ hid BC $ eq₀ Y) ∘ F.F₁ (from f) ≈⟨ ∘-resp-≈ˡ (hid-identity BC B from Equiv.refl (eq₀ Y)) ⟩ (hid B $ ≡.cong idf $ eq₀ Y) ∘ F.F₁ (from f) ≡⟨ cong (λ p → hid B p ∘ _) (cong-id (eq₀ Y)) ⟩ hid B (eq₀ Y) ∘ F.F₁ (from f) ≈⟨ eq₁ (from f) ⟩ G.F₁ (from f) ∘ hid B (eq₀ X) ≡˘⟨ cong (λ p → _ ∘ hid B p) (cong-id (eq₀ X)) ⟩ G.F₁ (from f) ∘ (hid B $ cong idf $ eq₀ X) ≈˘⟨ ∘-resp-≈ʳ (hid-identity BC B from Equiv.refl (eq₀ X)) ⟩ G.F₁ (from f) ∘ (from $ hid BC $ eq₀ X) ∎ ⌟ } where BC = C.Core B module F = Functor F module G = Functor G open Category B open HomReasoning hiding (refl) open HId open HIdProps open _≡F_ F≡G open Morphism._≅_
Task/Pointers-and-references/Ada/pointers-and-references-2.ada
LaudateCorpus1/RosettaCodeData
1
5969
<filename>Task/Pointers-and-references/Ada/pointers-and-references-2.ada<gh_stars>1-10 type Safe_Int_Access is not null access Integer;
src/test/cpp/raw/deleg/build/deleg.asm
cbrune/VexRiscv
1,524
179696
build/deleg.elf: file format elf32-littleriscv Disassembly of section .crt_section: 80000000 <_start>: 80000000: 00100e93 li t4,1 80000004: 00001097 auipc ra,0x1 80000008: a3c08093 addi ra,ra,-1476 # 80000a40 <mtrap> 8000000c: 30509073 csrw mtvec,ra 80000010: 00001097 auipc ra,0x1 80000014: a6808093 addi ra,ra,-1432 # 80000a78 <strap> 80000018: 10509073 csrw stvec,ra 8000001c: f00110b7 lui ra,0xf0011 80000020: 00000113 li sp,0 80000024: 0020a023 sw sp,0(ra) # f0011000 <strap+0x70010588> 80000028: 00000013 nop 8000002c: 00000013 nop 80000030: 00000013 nop 80000034: 00000013 nop 80000038: 00000013 nop 8000003c: 00000013 nop 80000040: 00000013 nop 80000044: 00000013 nop 80000048 <test1>: 80000048: 00100e13 li t3,1 8000004c: 00000f17 auipc t5,0x0 80000050: 00cf0f13 addi t5,t5,12 # 80000058 <test2> 80000054: 00000073 ecall 80000058 <test2>: 80000058: 00200e13 li t3,2 8000005c: 000020b7 lui ra,0x2 80000060: 80008093 addi ra,ra,-2048 # 1800 <_start-0x7fffe800> 80000064: 00000113 li sp,0 80000068: 3000b073 csrc mstatus,ra 8000006c: 30012073 csrs mstatus,sp 80000070: 00000097 auipc ra,0x0 80000074: 01408093 addi ra,ra,20 # 80000084 <test2+0x2c> 80000078: 34109073 csrw mepc,ra 8000007c: 30200073 mret 80000080: 1a90006f j 80000a28 <fail> 80000084: 00000f17 auipc t5,0x0 80000088: 024f0f13 addi t5,t5,36 # 800000a8 <test4> 8000008c: 00000073 ecall 80000090: 1990006f j 80000a28 <fail> 80000094 <test3>: 80000094: 00300e13 li t3,3 80000098: 00000f17 auipc t5,0x0 8000009c: 010f0f13 addi t5,t5,16 # 800000a8 <test4> 800000a0: 00102083 lw ra,1(zero) # 1 <_start-0x7fffffff> 800000a4: 1850006f j 80000a28 <fail> 800000a8 <test4>: 800000a8: 00400e13 li t3,4 800000ac: 000020b7 lui ra,0x2 800000b0: 80008093 addi ra,ra,-2048 # 1800 <_start-0x7fffe800> 800000b4: 00001137 lui sp,0x1 800000b8: 80010113 addi sp,sp,-2048 # 800 <_start-0x7ffff800> 800000bc: 3000b073 csrc mstatus,ra 800000c0: 30012073 csrs mstatus,sp 800000c4: 00000097 auipc ra,0x0 800000c8: 01408093 addi ra,ra,20 # 800000d8 <test4+0x30> 800000cc: 34109073 csrw mepc,ra 800000d0: 30200073 mret 800000d4: 1550006f j 80000a28 <fail> 800000d8: 00000f17 auipc t5,0x0 800000dc: 010f0f13 addi t5,t5,16 # 800000e8 <test5> 800000e0: 00102083 lw ra,1(zero) # 1 <_start-0x7fffffff> 800000e4: 1450006f j 80000a28 <fail> 800000e8 <test5>: 800000e8: 00500e13 li t3,5 800000ec: 000020b7 lui ra,0x2 800000f0: 80008093 addi ra,ra,-2048 # 1800 <_start-0x7fffe800> 800000f4: 00000113 li sp,0 800000f8: 3000b073 csrc mstatus,ra 800000fc: 30012073 csrs mstatus,sp 80000100: 00000097 auipc ra,0x0 80000104: 01408093 addi ra,ra,20 # 80000114 <test5+0x2c> 80000108: 34109073 csrw mepc,ra 8000010c: 30200073 mret 80000110: 1190006f j 80000a28 <fail> 80000114: 00000f17 auipc t5,0x0 80000118: 010f0f13 addi t5,t5,16 # 80000124 <test6> 8000011c: 00102083 lw ra,1(zero) # 1 <_start-0x7fffffff> 80000120: 1090006f j 80000a28 <fail> 80000124 <test6>: 80000124: 00600e13 li t3,6 80000128: 01000093 li ra,16 8000012c: 30209073 csrw medeleg,ra 80000130 <test7>: 80000130: 00700e13 li t3,7 80000134: 00000f17 auipc t5,0x0 80000138: 010f0f13 addi t5,t5,16 # 80000144 <test8> 8000013c: 00102083 lw ra,1(zero) # 1 <_start-0x7fffffff> 80000140: 0e90006f j 80000a28 <fail> 80000144 <test8>: 80000144: 00800e13 li t3,8 80000148: 00000f17 auipc t5,0x0 8000014c: 03cf0f13 addi t5,t5,60 # 80000184 <test9> 80000150: 000020b7 lui ra,0x2 80000154: 80008093 addi ra,ra,-2048 # 1800 <_start-0x7fffe800> 80000158: 00001137 lui sp,0x1 8000015c: 80010113 addi sp,sp,-2048 # 800 <_start-0x7ffff800> 80000160: 3000b073 csrc mstatus,ra 80000164: 30012073 csrs mstatus,sp 80000168: 00000097 auipc ra,0x0 8000016c: 01408093 addi ra,ra,20 # 8000017c <test8+0x38> 80000170: 34109073 csrw mepc,ra 80000174: 30200073 mret 80000178: 0b10006f j 80000a28 <fail> 8000017c: 00102083 lw ra,1(zero) # 1 <_start-0x7fffffff> 80000180: 0a90006f j 80000a28 <fail> 80000184 <test9>: 80000184: 00900e13 li t3,9 80000188: 00000f17 auipc t5,0x0 8000018c: 038f0f13 addi t5,t5,56 # 800001c0 <test10> 80000190: 000020b7 lui ra,0x2 80000194: 80008093 addi ra,ra,-2048 # 1800 <_start-0x7fffe800> 80000198: 00000113 li sp,0 8000019c: 3000b073 csrc mstatus,ra 800001a0: 30012073 csrs mstatus,sp 800001a4: 00000097 auipc ra,0x0 800001a8: 01408093 addi ra,ra,20 # 800001b8 <test9+0x34> 800001ac: 34109073 csrw mepc,ra 800001b0: 30200073 mret 800001b4: 0750006f j 80000a28 <fail> 800001b8: 00102083 lw ra,1(zero) # 1 <_start-0x7fffffff> 800001bc: 06d0006f j 80000a28 <fail> 800001c0 <test10>: 800001c0: 00a00e13 li t3,10 800001c4: 00000f17 auipc t5,0x0 800001c8: 07cf0f13 addi t5,t5,124 # 80000240 <test11> 800001cc: f00110b7 lui ra,0xf0011 800001d0: 00000113 li sp,0 800001d4: 0020a023 sw sp,0(ra) # f0011000 <strap+0x70010588> 800001d8: 00000013 nop 800001dc: 00000013 nop 800001e0: 00000013 nop 800001e4: 00000013 nop 800001e8: 00000013 nop 800001ec: 00000013 nop 800001f0: 00000013 nop 800001f4: 00000013 nop 800001f8: 00800093 li ra,8 800001fc: 30009073 csrw mstatus,ra 80000200: 000010b7 lui ra,0x1 80000204: 80008093 addi ra,ra,-2048 # 800 <_start-0x7ffff800> 80000208: 30409073 csrw mie,ra 8000020c: f00110b7 lui ra,0xf0011 80000210: 00100113 li sp,1 80000214: 0020a023 sw sp,0(ra) # f0011000 <strap+0x70010588> 80000218: 00000013 nop 8000021c: 00000013 nop 80000220: 00000013 nop 80000224: 00000013 nop 80000228: 00000013 nop 8000022c: 00000013 nop 80000230: 00000013 nop 80000234: 00000013 nop 80000238: 10500073 wfi 8000023c: 7ec0006f j 80000a28 <fail> 80000240 <test11>: 80000240: 00b00e13 li t3,11 80000244: 00000f17 auipc t5,0x0 80000248: 0a8f0f13 addi t5,t5,168 # 800002ec <test12> 8000024c: f00110b7 lui ra,0xf0011 80000250: 00000113 li sp,0 80000254: 0020a023 sw sp,0(ra) # f0011000 <strap+0x70010588> 80000258: 00000013 nop 8000025c: 00000013 nop 80000260: 00000013 nop 80000264: 00000013 nop 80000268: 00000013 nop 8000026c: 00000013 nop 80000270: 00000013 nop 80000274: 00000013 nop 80000278: 00800093 li ra,8 8000027c: 30009073 csrw mstatus,ra 80000280: 000010b7 lui ra,0x1 80000284: 80008093 addi ra,ra,-2048 # 800 <_start-0x7ffff800> 80000288: 30409073 csrw mie,ra 8000028c: 000020b7 lui ra,0x2 80000290: 80008093 addi ra,ra,-2048 # 1800 <_start-0x7fffe800> 80000294: 00001137 lui sp,0x1 80000298: 80010113 addi sp,sp,-2048 # 800 <_start-0x7ffff800> 8000029c: 3000b073 csrc mstatus,ra 800002a0: 30012073 csrs mstatus,sp 800002a4: 00000097 auipc ra,0x0 800002a8: 01408093 addi ra,ra,20 # 800002b8 <test11+0x78> 800002ac: 34109073 csrw mepc,ra 800002b0: 30200073 mret 800002b4: 7740006f j 80000a28 <fail> 800002b8: f00110b7 lui ra,0xf0011 800002bc: 00100113 li sp,1 800002c0: 0020a023 sw sp,0(ra) # f0011000 <strap+0x70010588> 800002c4: 00000013 nop 800002c8: 00000013 nop 800002cc: 00000013 nop 800002d0: 00000013 nop 800002d4: 00000013 nop 800002d8: 00000013 nop 800002dc: 00000013 nop 800002e0: 00000013 nop 800002e4: 10500073 wfi 800002e8: 7400006f j 80000a28 <fail> 800002ec <test12>: 800002ec: 00c00e13 li t3,12 800002f0: 00000f17 auipc t5,0x0 800002f4: 0a4f0f13 addi t5,t5,164 # 80000394 <test14> 800002f8: f00110b7 lui ra,0xf0011 800002fc: 00000113 li sp,0 80000300: 0020a023 sw sp,0(ra) # f0011000 <strap+0x70010588> 80000304: 00000013 nop 80000308: 00000013 nop 8000030c: 00000013 nop 80000310: 00000013 nop 80000314: 00000013 nop 80000318: 00000013 nop 8000031c: 00000013 nop 80000320: 00000013 nop 80000324: 00800093 li ra,8 80000328: 30009073 csrw mstatus,ra 8000032c: 000010b7 lui ra,0x1 80000330: 80008093 addi ra,ra,-2048 # 800 <_start-0x7ffff800> 80000334: 30409073 csrw mie,ra 80000338: 000020b7 lui ra,0x2 8000033c: 80008093 addi ra,ra,-2048 # 1800 <_start-0x7fffe800> 80000340: 00000113 li sp,0 80000344: 3000b073 csrc mstatus,ra 80000348: 30012073 csrs mstatus,sp 8000034c: 00000097 auipc ra,0x0 80000350: 01408093 addi ra,ra,20 # 80000360 <test12+0x74> 80000354: 34109073 csrw mepc,ra 80000358: 30200073 mret 8000035c: 6cc0006f j 80000a28 <fail> 80000360: f00110b7 lui ra,0xf0011 80000364: 00100113 li sp,1 80000368: 0020a023 sw sp,0(ra) # f0011000 <strap+0x70010588> 8000036c: 00000013 nop 80000370: 00000013 nop 80000374: 00000013 nop 80000378: 00000013 nop 8000037c: 00000013 nop 80000380: 00000013 nop 80000384: 00000013 nop 80000388: 00000013 nop 8000038c: 10500073 wfi 80000390: 6980006f j 80000a28 <fail> 80000394 <test14>: 80000394: 00200093 li ra,2 80000398: 10009073 csrw sstatus,ra 8000039c: 00e00e13 li t3,14 800003a0: 00000f17 auipc t5,0x0 800003a4: 080f0f13 addi t5,t5,128 # 80000420 <test15> 800003a8: f00120b7 lui ra,0xf0012 800003ac: 00000113 li sp,0 800003b0: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011588> 800003b4: 00000013 nop 800003b8: 00000013 nop 800003bc: 00000013 nop 800003c0: 00000013 nop 800003c4: 00000013 nop 800003c8: 00000013 nop 800003cc: 00000013 nop 800003d0: 00000013 nop 800003d4: 00200093 li ra,2 800003d8: 30009073 csrw mstatus,ra 800003dc: 20000093 li ra,512 800003e0: 30409073 csrw mie,ra 800003e4: 00000e93 li t4,0 800003e8: f00120b7 lui ra,0xf0012 800003ec: 00100113 li sp,1 800003f0: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011588> 800003f4: 00000013 nop 800003f8: 00000013 nop 800003fc: 00000013 nop 80000400: 00000013 nop 80000404: 00000013 nop 80000408: 00000013 nop 8000040c: 00000013 nop 80000410: 00000013 nop 80000414: 06400093 li ra,100 80000418: fff08093 addi ra,ra,-1 8000041c: fe104ee3 bgtz ra,80000418 <test14+0x84> 80000420 <test15>: 80000420: 00f00e13 li t3,15 80000424: 00000f17 auipc t5,0x0 80000428: 0a8f0f13 addi t5,t5,168 # 800004cc <test16> 8000042c: f00120b7 lui ra,0xf0012 80000430: 00000113 li sp,0 80000434: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011588> 80000438: 00000013 nop 8000043c: 00000013 nop 80000440: 00000013 nop 80000444: 00000013 nop 80000448: 00000013 nop 8000044c: 00000013 nop 80000450: 00000013 nop 80000454: 00000013 nop 80000458: 00200093 li ra,2 8000045c: 30009073 csrw mstatus,ra 80000460: 20000093 li ra,512 80000464: 30409073 csrw mie,ra 80000468: 000020b7 lui ra,0x2 8000046c: 80008093 addi ra,ra,-2048 # 1800 <_start-0x7fffe800> 80000470: 00001137 lui sp,0x1 80000474: 80010113 addi sp,sp,-2048 # 800 <_start-0x7ffff800> 80000478: 3000b073 csrc mstatus,ra 8000047c: 30012073 csrs mstatus,sp 80000480: 00000097 auipc ra,0x0 80000484: 01408093 addi ra,ra,20 # 80000494 <test15+0x74> 80000488: 34109073 csrw mepc,ra 8000048c: 30200073 mret 80000490: 5980006f j 80000a28 <fail> 80000494: 00100e93 li t4,1 80000498: f00120b7 lui ra,0xf0012 8000049c: 00100113 li sp,1 800004a0: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011588> 800004a4: 00000013 nop 800004a8: 00000013 nop 800004ac: 00000013 nop 800004b0: 00000013 nop 800004b4: 00000013 nop 800004b8: 00000013 nop 800004bc: 00000013 nop 800004c0: 00000013 nop 800004c4: 10500073 wfi 800004c8: 5600006f j 80000a28 <fail> 800004cc <test16>: 800004cc: 01000e13 li t3,16 800004d0: 00000f17 auipc t5,0x0 800004d4: 0a0f0f13 addi t5,t5,160 # 80000570 <test17> 800004d8: f00120b7 lui ra,0xf0012 800004dc: 00000113 li sp,0 800004e0: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011588> 800004e4: 00000013 nop 800004e8: 00000013 nop 800004ec: 00000013 nop 800004f0: 00000013 nop 800004f4: 00000013 nop 800004f8: 00000013 nop 800004fc: 00000013 nop 80000500: 00000013 nop 80000504: 00200093 li ra,2 80000508: 30009073 csrw mstatus,ra 8000050c: 20000093 li ra,512 80000510: 30409073 csrw mie,ra 80000514: 000020b7 lui ra,0x2 80000518: 80008093 addi ra,ra,-2048 # 1800 <_start-0x7fffe800> 8000051c: 00000113 li sp,0 80000520: 3000b073 csrc mstatus,ra 80000524: 30012073 csrs mstatus,sp 80000528: 00000097 auipc ra,0x0 8000052c: 01408093 addi ra,ra,20 # 8000053c <test16+0x70> 80000530: 34109073 csrw mepc,ra 80000534: 30200073 mret 80000538: 4f00006f j 80000a28 <fail> 8000053c: f00120b7 lui ra,0xf0012 80000540: 00100113 li sp,1 80000544: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011588> 80000548: 00000013 nop 8000054c: 00000013 nop 80000550: 00000013 nop 80000554: 00000013 nop 80000558: 00000013 nop 8000055c: 00000013 nop 80000560: 00000013 nop 80000564: 00000013 nop 80000568: 10500073 wfi 8000056c: 4bc0006f j 80000a28 <fail> 80000570 <test17>: 80000570: 01100e13 li t3,17 80000574: 20000093 li ra,512 80000578: 30309073 csrw mideleg,ra 8000057c: 00000f17 auipc t5,0x0 80000580: 080f0f13 addi t5,t5,128 # 800005fc <test18> 80000584: f00120b7 lui ra,0xf0012 80000588: 00000113 li sp,0 8000058c: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011588> 80000590: 00000013 nop 80000594: 00000013 nop 80000598: 00000013 nop 8000059c: 00000013 nop 800005a0: 00000013 nop 800005a4: 00000013 nop 800005a8: 00000013 nop 800005ac: 00000013 nop 800005b0: 00200093 li ra,2 800005b4: 30009073 csrw mstatus,ra 800005b8: 20000093 li ra,512 800005bc: 30409073 csrw mie,ra 800005c0: 00000e93 li t4,0 800005c4: f00120b7 lui ra,0xf0012 800005c8: 00100113 li sp,1 800005cc: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011588> 800005d0: 00000013 nop 800005d4: 00000013 nop 800005d8: 00000013 nop 800005dc: 00000013 nop 800005e0: 00000013 nop 800005e4: 00000013 nop 800005e8: 00000013 nop 800005ec: 00000013 nop 800005f0: 06400093 li ra,100 800005f4: fff08093 addi ra,ra,-1 800005f8: fe104ee3 bgtz ra,800005f4 <test17+0x84> 800005fc <test18>: 800005fc: 01200e13 li t3,18 80000600: 00000f17 auipc t5,0x0 80000604: 0a8f0f13 addi t5,t5,168 # 800006a8 <test19> 80000608: f00120b7 lui ra,0xf0012 8000060c: 00000113 li sp,0 80000610: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011588> 80000614: 00000013 nop 80000618: 00000013 nop 8000061c: 00000013 nop 80000620: 00000013 nop 80000624: 00000013 nop 80000628: 00000013 nop 8000062c: 00000013 nop 80000630: 00000013 nop 80000634: 00200093 li ra,2 80000638: 30009073 csrw mstatus,ra 8000063c: 20000093 li ra,512 80000640: 30409073 csrw mie,ra 80000644: 000020b7 lui ra,0x2 80000648: 80008093 addi ra,ra,-2048 # 1800 <_start-0x7fffe800> 8000064c: 00001137 lui sp,0x1 80000650: 80010113 addi sp,sp,-2048 # 800 <_start-0x7ffff800> 80000654: 3000b073 csrc mstatus,ra 80000658: 30012073 csrs mstatus,sp 8000065c: 00000097 auipc ra,0x0 80000660: 01408093 addi ra,ra,20 # 80000670 <test18+0x74> 80000664: 34109073 csrw mepc,ra 80000668: 30200073 mret 8000066c: 3bc0006f j 80000a28 <fail> 80000670: 00100e93 li t4,1 80000674: f00120b7 lui ra,0xf0012 80000678: 00100113 li sp,1 8000067c: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011588> 80000680: 00000013 nop 80000684: 00000013 nop 80000688: 00000013 nop 8000068c: 00000013 nop 80000690: 00000013 nop 80000694: 00000013 nop 80000698: 00000013 nop 8000069c: 00000013 nop 800006a0: 10500073 wfi 800006a4: 3840006f j 80000a28 <fail> 800006a8 <test19>: 800006a8: 01300e13 li t3,19 800006ac: 00000f17 auipc t5,0x0 800006b0: 0a0f0f13 addi t5,t5,160 # 8000074c <test20> 800006b4: f00120b7 lui ra,0xf0012 800006b8: 00000113 li sp,0 800006bc: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011588> 800006c0: 00000013 nop 800006c4: 00000013 nop 800006c8: 00000013 nop 800006cc: 00000013 nop 800006d0: 00000013 nop 800006d4: 00000013 nop 800006d8: 00000013 nop 800006dc: 00000013 nop 800006e0: 00200093 li ra,2 800006e4: 30009073 csrw mstatus,ra 800006e8: 20000093 li ra,512 800006ec: 30409073 csrw mie,ra 800006f0: 000020b7 lui ra,0x2 800006f4: 80008093 addi ra,ra,-2048 # 1800 <_start-0x7fffe800> 800006f8: 00000113 li sp,0 800006fc: 3000b073 csrc mstatus,ra 80000700: 30012073 csrs mstatus,sp 80000704: 00000097 auipc ra,0x0 80000708: 01408093 addi ra,ra,20 # 80000718 <test19+0x70> 8000070c: 34109073 csrw mepc,ra 80000710: 30200073 mret 80000714: 3140006f j 80000a28 <fail> 80000718: f00120b7 lui ra,0xf0012 8000071c: 00100113 li sp,1 80000720: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011588> 80000724: 00000013 nop 80000728: 00000013 nop 8000072c: 00000013 nop 80000730: 00000013 nop 80000734: 00000013 nop 80000738: 00000013 nop 8000073c: 00000013 nop 80000740: 00000013 nop 80000744: 10500073 wfi 80000748: 2e00006f j 80000a28 <fail> 8000074c <test20>: 8000074c: f00120b7 lui ra,0xf0012 80000750: 00000113 li sp,0 80000754: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011588> 80000758: 00000013 nop 8000075c: 00000013 nop 80000760: 00000013 nop 80000764: 00000013 nop 80000768: 00000013 nop 8000076c: 00000013 nop 80000770: 00000013 nop 80000774: 00000013 nop 80000778: 01400e13 li t3,20 8000077c: 00000f17 auipc t5,0x0 80000780: 030f0f13 addi t5,t5,48 # 800007ac <test21> 80000784: 00200093 li ra,2 80000788: 30009073 csrw mstatus,ra 8000078c: 20000093 li ra,512 80000790: 30409073 csrw mie,ra 80000794: 00000e93 li t4,0 80000798: 20000093 li ra,512 8000079c: 1440a073 csrs sip,ra 800007a0: 06400093 li ra,100 800007a4: fff08093 addi ra,ra,-1 800007a8: fe104ee3 bgtz ra,800007a4 <test20+0x58> 800007ac <test21>: 800007ac: 01500e13 li t3,21 800007b0: 00000f17 auipc t5,0x0 800007b4: 060f0f13 addi t5,t5,96 # 80000810 <test22> 800007b8: 20000093 li ra,512 800007bc: 1440b073 csrc sip,ra 800007c0: 00200093 li ra,2 800007c4: 30009073 csrw mstatus,ra 800007c8: 20000093 li ra,512 800007cc: 30409073 csrw mie,ra 800007d0: 000020b7 lui ra,0x2 800007d4: 80008093 addi ra,ra,-2048 # 1800 <_start-0x7fffe800> 800007d8: 00001137 lui sp,0x1 800007dc: 80010113 addi sp,sp,-2048 # 800 <_start-0x7ffff800> 800007e0: 3000b073 csrc mstatus,ra 800007e4: 30012073 csrs mstatus,sp 800007e8: 00000097 auipc ra,0x0 800007ec: 01408093 addi ra,ra,20 # 800007fc <test21+0x50> 800007f0: 34109073 csrw mepc,ra 800007f4: 30200073 mret 800007f8: 2300006f j 80000a28 <fail> 800007fc: 00100e93 li t4,1 80000800: 20000093 li ra,512 80000804: 1440a073 csrs sip,ra 80000808: 10500073 wfi 8000080c: 21c0006f j 80000a28 <fail> 80000810 <test22>: 80000810: 01600e13 li t3,22 80000814: 00000f17 auipc t5,0x0 80000818: 058f0f13 addi t5,t5,88 # 8000086c <test23> 8000081c: 20000093 li ra,512 80000820: 1440b073 csrc sip,ra 80000824: 00200093 li ra,2 80000828: 30009073 csrw mstatus,ra 8000082c: 20000093 li ra,512 80000830: 30409073 csrw mie,ra 80000834: 20000093 li ra,512 80000838: 1440a073 csrs sip,ra 8000083c: 000020b7 lui ra,0x2 80000840: 80008093 addi ra,ra,-2048 # 1800 <_start-0x7fffe800> 80000844: 00000113 li sp,0 80000848: 3000b073 csrc mstatus,ra 8000084c: 30012073 csrs mstatus,sp 80000850: 00000097 auipc ra,0x0 80000854: 01408093 addi ra,ra,20 # 80000864 <test22+0x54> 80000858: 34109073 csrw mepc,ra 8000085c: 30200073 mret 80000860: 1c80006f j 80000a28 <fail> 80000864: 10500073 wfi 80000868: 1c00006f j 80000a28 <fail> 8000086c <test23>: 8000086c: 01700e13 li t3,23 80000870: 00000e93 li t4,0 80000874: f00120b7 lui ra,0xf0012 80000878: 00000113 li sp,0 8000087c: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011588> 80000880: 00000013 nop 80000884: 00000013 nop 80000888: 00000013 nop 8000088c: 00000013 nop 80000890: 00000013 nop 80000894: 00000013 nop 80000898: 00000013 nop 8000089c: 00000013 nop 800008a0: 20000093 li ra,512 800008a4: 1440b073 csrc sip,ra 800008a8: 344021f3 csrr gp,mip 800008ac: f00120b7 lui ra,0xf0012 800008b0: 00100113 li sp,1 800008b4: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011588> 800008b8: 00000013 nop 800008bc: 00000013 nop 800008c0: 00000013 nop 800008c4: 00000013 nop 800008c8: 00000013 nop 800008cc: 00000013 nop 800008d0: 00000013 nop 800008d4: 00000013 nop 800008d8: 20000093 li ra,512 800008dc: 1440b073 csrc sip,ra 800008e0: 344021f3 csrr gp,mip 800008e4: f00120b7 lui ra,0xf0012 800008e8: 00000113 li sp,0 800008ec: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011588> 800008f0: 00000013 nop 800008f4: 00000013 nop 800008f8: 00000013 nop 800008fc: 00000013 nop 80000900: 00000013 nop 80000904: 00000013 nop 80000908: 00000013 nop 8000090c: 00000013 nop 80000910: 20000093 li ra,512 80000914: 1440b073 csrc sip,ra 80000918: 344021f3 csrr gp,mip 8000091c: f00120b7 lui ra,0xf0012 80000920: 00000113 li sp,0 80000924: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011588> 80000928: 00000013 nop 8000092c: 00000013 nop 80000930: 00000013 nop 80000934: 00000013 nop 80000938: 00000013 nop 8000093c: 00000013 nop 80000940: 00000013 nop 80000944: 00000013 nop 80000948: 20000093 li ra,512 8000094c: 1440a073 csrs sip,ra 80000950: 344021f3 csrr gp,mip 80000954: f00120b7 lui ra,0xf0012 80000958: 00100113 li sp,1 8000095c: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011588> 80000960: 00000013 nop 80000964: 00000013 nop 80000968: 00000013 nop 8000096c: 00000013 nop 80000970: 00000013 nop 80000974: 00000013 nop 80000978: 00000013 nop 8000097c: 00000013 nop 80000980: 20000093 li ra,512 80000984: 1440a073 csrs sip,ra 80000988: 344021f3 csrr gp,mip 8000098c: f00120b7 lui ra,0xf0012 80000990: 00000113 li sp,0 80000994: 0020a023 sw sp,0(ra) # f0012000 <strap+0x70011588> 80000998: 00000013 nop 8000099c: 00000013 nop 800009a0: 00000013 nop 800009a4: 00000013 nop 800009a8: 00000013 nop 800009ac: 00000013 nop 800009b0: 00000013 nop 800009b4: 00000013 nop 800009b8 <test24>: 800009b8: 01800e13 li t3,24 800009bc: 00200093 li ra,2 800009c0: 3040a073 csrs mie,ra 800009c4: 3440a073 csrs mip,ra 800009c8: 3000a073 csrs mstatus,ra 800009cc: 00100e93 li t4,1 800009d0: 00000f17 auipc t5,0x0 800009d4: 03cf0f13 addi t5,t5,60 # 80000a0c <test25> 800009d8: 000020b7 lui ra,0x2 800009dc: 80008093 addi ra,ra,-2048 # 1800 <_start-0x7fffe800> 800009e0: 00001137 lui sp,0x1 800009e4: 80010113 addi sp,sp,-2048 # 800 <_start-0x7ffff800> 800009e8: 3000b073 csrc mstatus,ra 800009ec: 30012073 csrs mstatus,sp 800009f0: 00000097 auipc ra,0x0 800009f4: 01408093 addi ra,ra,20 # 80000a04 <test24_s> 800009f8: 34109073 csrw mepc,ra 800009fc: 30200073 mret 80000a00: 0280006f j 80000a28 <fail> 80000a04 <test24_s>: 80000a04: 10500073 wfi 80000a08: 0200006f j 80000a28 <fail> 80000a0c <test25>: 80000a0c: 01900e13 li t3,25 80000a10: 00000f17 auipc t5,0x0 80000a14: 014f0f13 addi t5,t5,20 # 80000a24 <test26> 80000a18: 30046073 csrsi mstatus,8 80000a1c: 10500073 wfi 80000a20: 0080006f j 80000a28 <fail> 80000a24 <test26>: 80000a24: 0100006f j 80000a34 <pass> 80000a28 <fail>: 80000a28: f0100137 lui sp,0xf0100 80000a2c: f2410113 addi sp,sp,-220 # f00fff24 <strap+0x700ff4ac> 80000a30: 01c12023 sw t3,0(sp) 80000a34 <pass>: 80000a34: f0100137 lui sp,0xf0100 80000a38: f2010113 addi sp,sp,-224 # f00fff20 <strap+0x700ff4a8> 80000a3c: 00012023 sw zero,0(sp) 80000a40 <mtrap>: 80000a40: fe0e84e3 beqz t4,80000a28 <fail> 80000a44: 342020f3 csrr ra,mcause 80000a48: 341020f3 csrr ra,mepc 80000a4c: 300020f3 csrr ra,mstatus 80000a50: 343020f3 csrr ra,mbadaddr 80000a54: 08000093 li ra,128 80000a58: 3000b073 csrc mstatus,ra 80000a5c: 00200093 li ra,2 80000a60: fc1e8ae3 beq t4,ra,80000a34 <pass> 80000a64: 000020b7 lui ra,0x2 80000a68: 80008093 addi ra,ra,-2048 # 1800 <_start-0x7fffe800> 80000a6c: 3000a073 csrs mstatus,ra 80000a70: 341f1073 csrw mepc,t5 80000a74: 30200073 mret 80000a78 <strap>: 80000a78: fa0e88e3 beqz t4,80000a28 <fail> 80000a7c: 142020f3 csrr ra,scause 80000a80: 141020f3 csrr ra,sepc 80000a84: 100020f3 csrr ra,sstatus 80000a88: 143020f3 csrr ra,sbadaddr 80000a8c: 00000073 ecall 80000a90: 00000013 nop 80000a94: 00000013 nop 80000a98: 00000013 nop 80000a9c: 00000013 nop 80000aa0: 00000013 nop 80000aa4: 00000013 nop
gcc-gcc-7_3_0-release/gcc/ada/a-cforse.ads
best08618/asylo
7
14325
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- A D A . C O N T A I N E R S . F O R M A L _ O R D E R E D _ S E T S -- -- -- -- S p e c -- -- -- -- Copyright (C) 2004-2015, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- -- apply solely to the contents of the part following the private keyword. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- 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/>. -- ------------------------------------------------------------------------------ -- This spec is derived from package Ada.Containers.Bounded_Ordered_Sets in -- the Ada 2012 RM. The modifications are meant to facilitate formal proofs by -- making it easier to express properties, and by making the specification of -- this unit compatible with SPARK 2014. Note that the API of this unit may be -- subject to incompatible changes as SPARK 2014 evolves. -- The modifications are: -- A parameter for the container is added to every function reading the -- content of a container: Key, Element, Next, Query_Element, Previous, -- Has_Element, Iterate, Reverse_Iterate. This change is motivated by the -- need to have cursors which are valid on different containers (typically -- a container C and its previous version C'Old) for expressing properties, -- which is not possible if cursors encapsulate an access to the underlying -- container. The operators "<" and ">" that could not be modified that way -- have been removed. -- There are three new functions: -- function Strict_Equal (Left, Right : Set) return Boolean; -- function First_To_Previous (Container : Set; Current : Cursor) -- return Set; -- function Current_To_Last (Container : Set; Current : Cursor) -- return Set; -- See detailed specifications for these subprograms private with Ada.Containers.Red_Black_Trees; generic type Element_Type is private; with function "<" (Left, Right : Element_Type) return Boolean is <>; with function "=" (Left, Right : Element_Type) return Boolean is <>; package Ada.Containers.Formal_Ordered_Sets with Pure, SPARK_Mode is pragma Annotate (GNATprove, External_Axiomatization); pragma Annotate (CodePeer, Skip_Analysis); function Equivalent_Elements (Left, Right : Element_Type) return Boolean with Global => null; type Set (Capacity : Count_Type) is private with Iterable => (First => First, Next => Next, Has_Element => Has_Element, Element => Element), Default_Initial_Condition => Is_Empty (Set); pragma Preelaborable_Initialization (Set); type Cursor is private; pragma Preelaborable_Initialization (Cursor); Empty_Set : constant Set; No_Element : constant Cursor; function "=" (Left, Right : Set) return Boolean with Global => null; function Equivalent_Sets (Left, Right : Set) return Boolean with Global => null; function To_Set (New_Item : Element_Type) return Set with Global => null; function Length (Container : Set) return Count_Type with Global => null; function Is_Empty (Container : Set) return Boolean with Global => null; procedure Clear (Container : in out Set) with Global => null; procedure Assign (Target : in out Set; Source : Set) with Pre => Target.Capacity >= Length (Source); function Copy (Source : Set; Capacity : Count_Type := 0) return Set with Global => null, Pre => Capacity = 0 or else Capacity >= Source.Capacity; function Element (Container : Set; Position : Cursor) return Element_Type with Global => null, Pre => Has_Element (Container, Position); procedure Replace_Element (Container : in out Set; Position : Cursor; New_Item : Element_Type) with Global => null, Pre => Has_Element (Container, Position); procedure Move (Target : in out Set; Source : in out Set) with Global => null, Pre => Target.Capacity >= Length (Source); procedure Insert (Container : in out Set; New_Item : Element_Type; Position : out Cursor; Inserted : out Boolean) with Global => null, Pre => Length (Container) < Container.Capacity; procedure Insert (Container : in out Set; New_Item : Element_Type) with Global => null, Pre => Length (Container) < Container.Capacity and then (not Contains (Container, New_Item)); procedure Include (Container : in out Set; New_Item : Element_Type) with Global => null, Pre => Length (Container) < Container.Capacity; procedure Replace (Container : in out Set; New_Item : Element_Type) with Global => null, Pre => Contains (Container, New_Item); procedure Exclude (Container : in out Set; Item : Element_Type) with Global => null; procedure Delete (Container : in out Set; Item : Element_Type) with Global => null, Pre => Contains (Container, Item); procedure Delete (Container : in out Set; Position : in out Cursor) with Global => null, Pre => Has_Element (Container, Position); procedure Delete_First (Container : in out Set) with Global => null; procedure Delete_Last (Container : in out Set) with Global => null; procedure Union (Target : in out Set; Source : Set) with Global => null, Pre => Length (Target) + Length (Source) - Length (Intersection (Target, Source)) <= Target.Capacity; function Union (Left, Right : Set) return Set with Global => null, Pre => Length (Left) + Length (Right) - Length (Intersection (Left, Right)) <= Count_Type'Last; function "or" (Left, Right : Set) return Set renames Union; procedure Intersection (Target : in out Set; Source : Set) with Global => null; function Intersection (Left, Right : Set) return Set with Global => null; function "and" (Left, Right : Set) return Set renames Intersection; procedure Difference (Target : in out Set; Source : Set) with Global => null; function Difference (Left, Right : Set) return Set with Global => null; function "-" (Left, Right : Set) return Set renames Difference; procedure Symmetric_Difference (Target : in out Set; Source : Set) with Global => null, Pre => Length (Target) + Length (Source) - 2 * Length (Intersection (Target, Source)) <= Target.Capacity; function Symmetric_Difference (Left, Right : Set) return Set with Global => null, Pre => Length (Left) + Length (Right) - 2 * Length (Intersection (Left, Right)) <= Count_Type'Last; function "xor" (Left, Right : Set) return Set renames Symmetric_Difference; function Overlap (Left, Right : Set) return Boolean with Global => null; function Is_Subset (Subset : Set; Of_Set : Set) return Boolean with Global => null; function First (Container : Set) return Cursor with Global => null; function First_Element (Container : Set) return Element_Type with Global => null, Pre => not Is_Empty (Container); function Last (Container : Set) return Cursor; function Last_Element (Container : Set) return Element_Type with Global => null, Pre => not Is_Empty (Container); function Next (Container : Set; Position : Cursor) return Cursor with Global => null, Pre => Has_Element (Container, Position) or else Position = No_Element; procedure Next (Container : Set; Position : in out Cursor) with Global => null, Pre => Has_Element (Container, Position) or else Position = No_Element; function Previous (Container : Set; Position : Cursor) return Cursor with Global => null, Pre => Has_Element (Container, Position) or else Position = No_Element; procedure Previous (Container : Set; Position : in out Cursor) with Global => null, Pre => Has_Element (Container, Position) or else Position = No_Element; function Find (Container : Set; Item : Element_Type) return Cursor with Global => null; function Floor (Container : Set; Item : Element_Type) return Cursor with Global => null; function Ceiling (Container : Set; Item : Element_Type) return Cursor with Global => null; function Contains (Container : Set; Item : Element_Type) return Boolean with Global => null; function Has_Element (Container : Set; Position : Cursor) return Boolean with Global => null; generic type Key_Type (<>) is private; with function Key (Element : Element_Type) return Key_Type; with function "<" (Left, Right : Key_Type) return Boolean is <>; package Generic_Keys with SPARK_Mode is function Equivalent_Keys (Left, Right : Key_Type) return Boolean with Global => null; function Key (Container : Set; Position : Cursor) return Key_Type with Global => null; function Element (Container : Set; Key : Key_Type) return Element_Type with Global => null; procedure Replace (Container : in out Set; Key : Key_Type; New_Item : Element_Type) with Global => null; procedure Exclude (Container : in out Set; Key : Key_Type) with Global => null; procedure Delete (Container : in out Set; Key : Key_Type) with Global => null; function Find (Container : Set; Key : Key_Type) return Cursor with Global => null; function Floor (Container : Set; Key : Key_Type) return Cursor with Global => null; function Ceiling (Container : Set; Key : Key_Type) return Cursor with Global => null; function Contains (Container : Set; Key : Key_Type) return Boolean with Global => null; end Generic_Keys; function Strict_Equal (Left, Right : Set) return Boolean with Ghost, Global => null; -- Strict_Equal returns True if the containers are physically equal, i.e. -- they are structurally equal (function "=" returns True) and that they -- have the same set of cursors. function First_To_Previous (Container : Set; Current : Cursor) return Set with Ghost, Global => null, Pre => Has_Element (Container, Current) or else Current = No_Element; function Current_To_Last (Container : Set; Current : Cursor) return Set with Ghost, Global => null, Pre => Has_Element (Container, Current) or else Current = No_Element; -- First_To_Previous returns a container containing all elements preceding -- Current (excluded) in Container. Current_To_Last returns a container -- containing all elements following Current (included) in Container. -- These two new functions can be used to express invariant properties in -- loops which iterate over containers. First_To_Previous returns the part -- of the container already scanned and Current_To_Last the part not -- scanned yet. private pragma SPARK_Mode (Off); pragma Inline (Next); pragma Inline (Previous); type Node_Type is record Has_Element : Boolean := False; Parent : Count_Type := 0; Left : Count_Type := 0; Right : Count_Type := 0; Color : Red_Black_Trees.Color_Type; Element : Element_Type; end record; package Tree_Types is new Red_Black_Trees.Generic_Bounded_Tree_Types (Node_Type); type Set (Capacity : Count_Type) is new Tree_Types.Tree_Type (Capacity) with null record; use Red_Black_Trees; type Cursor is record Node : Count_Type; end record; No_Element : constant Cursor := (Node => 0); Empty_Set : constant Set := (Capacity => 0, others => <>); end Ada.Containers.Formal_Ordered_Sets;
3-mid/impact/source/2d/dynamics/contacts/impact-d2-contact-polygon_circle.ads
charlie5/lace
20
1389
<filename>3-mid/impact/source/2d/dynamics/contacts/impact-d2-contact-polygon_circle.ads package impact.d2.Contact.polygon_circle -- -- -- is type b2PolygonAndCircleContact is new b2Contact with null record; type View is access all b2PolygonAndCircleContact'Class; overriding procedure Evaluate (Self : in out b2PolygonAndCircleContact; manifold : access collision.b2Manifold; xfA, xfB : in b2Transform); function Create (fixtureA, fixtureB : access Fixture.b2Fixture) return access b2Contact'Class; procedure Destroy (contact : in out impact.d2.Contact.view); -- -- #include <Box2D/Dynamics/Contacts/b2Contact.h> -- -- class b2BlockAllocator; -- -- class b2PolygonAndCircleContact : public b2Contact -- { -- public: -- static b2Contact* Create(b2Fixture* fixtureA, b2Fixture* fixtureB, b2BlockAllocator* allocator); -- static void Destroy(b2Contact* contact, b2BlockAllocator* allocator); -- -- b2PolygonAndCircleContact(b2Fixture* fixtureA, b2Fixture* fixtureB); -- ~b2PolygonAndCircleContact() {} -- -- void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB); -- }; -- -- #endif end impact.d2.Contact.polygon_circle;
programs/oeis/002/A002738.asm
neoneye/loda
22
166802
<filename>programs/oeis/002/A002738.asm ; A002738: Coefficients for extrapolation. ; 3,60,630,5040,34650,216216,1261260,7001280,37413090,193993800,981608628,4867480800,23728968900,114011377200,540972351000,2538963567360,11802213457650,54396360988200,248812984520100,1130341536324000,5103492036502860,22913637714910800 mov $1,$0 add $0,1 seq $1,2802 ; a(n) = (2*n+3)!/(6*n!*(n+1)!). mul $0,$1 mul $0,3
data/pokemon/base_stats/grimer.asm
opiter09/ASM-Machina
1
242112
db DEX_GRIMER ; pokedex id db 80, 80, 50, 25, 40 ; hp atk def spd spc db POISON, POISON ; type db 190 ; catch rate db 90 ; base exp INCBIN "gfx/pokemon/front/grimer.pic", 0, 1 ; sprite dimensions dw GrimerPicFront, GrimerPicBack db POUND, DISABLE, NO_MOVE, NO_MOVE ; level 1 learnset db GROWTH_MEDIUM_FAST ; growth rate ; tm/hm learnset tmhm TOXIC, BODY_SLAM, RAGE, MEGA_DRAIN, THUNDERBOLT, \ THUNDER, MIMIC, DOUBLE_TEAM, BIDE, SELFDESTRUCT, \ FIRE_BLAST, REST, EXPLOSION, SUBSTITUTE ; end db 0 ; padding
source/asis/spec/ada-containers-doubly_linked_lists.ads
faelys/gela-asis
4
25997
<filename>source/asis/spec/ada-containers-doubly_linked_lists.ads<gh_stars>1-10 ------------------------------------------------------------------------------ -- A d a r u n - t i m e s p e c i f i c a t i o n -- -- ASIS implementation for Gela project, a portable Ada compiler -- -- http://gela.ada-ru.org -- -- - - - - - - - - - - - - - - - -- -- Read copyright and license at the end of ada.ads file -- ------------------------------------------------------------------------------ -- $Revision: 209 $ $Date: 2013-11-30 21:03:24 +0200 (Сб., 30 нояб. 2013) $ generic type Element_Type is private; with function "=" (Left : in Element_Type; Right : in Element_Type) return Boolean is <>; package Ada.Containers.Doubly_Linked_Lists is pragma Preelaborate (Doubly_Linked_Lists); type List is tagged private; pragma Preelaborable_Initialization (List); type Cursor is private; pragma Preelaborable_Initialization (Cursor); Empty_List : constant List; No_Element : constant Cursor; function "=" (Left : in List; Right : in List) return Boolean; function Length (Container : in List) return Count_Type; function Is_Empty (Container : in List) return Boolean; procedure Clear (Container : in out List); function Element (Position : in Cursor) return Element_Type; procedure Replace_Element (Container : in out List; Position : in Cursor; New_Item : in Element_Type); procedure Query_Element (Position : in Cursor; Process : not null access procedure (Element : in Element_Type)); procedure Update_Element (Container : in out List; Position : in Cursor; Process : not null access procedure (Element : in out Element_Type)); procedure Move (Target : in out List; Source : in out List); procedure Insert (Container : in out List; Before : in Cursor; New_Item : in Element_Type; Count : in Count_Type := 1); procedure Insert (Container : in out List; Before : in Cursor; New_Item : in Element_Type; Position : out Cursor; Count : in Count_Type := 1); procedure Insert (Container : in out List; Before : in Cursor; Position : out Cursor; Count : in Count_Type := 1); procedure Prepend (Container : in out List; New_Item : in Element_Type; Count : in Count_Type := 1); procedure Append (Container : in out List; New_Item : in Element_Type; Count : in Count_Type := 1); procedure Delete (Container : in out List; Position : in out Cursor; Count : in Count_Type := 1); procedure Delete_First (Container : in out List; Count : in Count_Type := 1); procedure Delete_Last (Container : in out List; Count : in Count_Type := 1); procedure Reverse_Elements (Container : in out List); procedure Swap (Container : in out List; I : in Cursor; J : in Cursor); procedure Swap_Links (Container : in out List; I : in Cursor; J : in Cursor); procedure Splice (Target : in out List; Before : in Cursor; Source : in out List); procedure Splice (Target : in out List; Before : in Cursor; Source : in out List; Position : in out Cursor); procedure Splice (Container : in out List; Before : in Cursor; Position : in Cursor); function First (Container : in List) return Cursor; function First_Element (Container : in List) return Element_Type; function Last (Container : in List) return Cursor; function Last_Element (Container : in List) return Element_Type; function Next (Position : in Cursor) return Cursor; function Previous (Position : in Cursor) return Cursor; procedure Next (Position : in out Cursor); procedure Previous (Position : in out Cursor); function Find (Container : in List; Item : in Element_Type; Position : in Cursor := No_Element) return Cursor; function Reverse_Find (Container : in List; Item : in Element_Type; Position : in Cursor := No_Element) return Cursor; function Contains (Container : in List; Item : in Element_Type) return Boolean; function Has_Element (Position : in Cursor) return Boolean; procedure Iterate (Container : in List; Process : not null access procedure (Position : in Cursor)); procedure Reverse_Iterate (Container : in List; Process : not null access procedure (Position : in Cursor)); generic with function "<" (Left : in Element_Type; Right : in Element_Type) return Boolean is <>; package Generic_Sorting is function Is_Sorted (Container : in List) return Boolean; procedure Sort (Container : in out List); procedure Merge (Target : in out List; Source : in out List); end Generic_Sorting; private type List is tagged null record; Empty_List : constant List := (null record); type Cursor is null record; No_Element : constant Cursor := (null record); end Ada.Containers.Doubly_Linked_Lists;
main64/kernel/gdt/gdt.asm
KlausAschenbrenner/KAOS
1
88429
<reponame>KlausAschenbrenner/KAOS [GLOBAL GdtFlush] ; Loads the GDT table GdtFlush: cli ; The first function parameter is provided in the RDI register on the x64 architecture ; RDI points to the variable _gdtPointer (defined in the C code) lgdt [rdi] ; Load the TSS mov ax, 0x2b ; This is the 6th entry from the GDT with the requested RPL of 3 ltr ax sti ret
src/fltk-widgets-clocks.ads
micahwelf/FLTK-Ada
1
30248
package FLTK.Widgets.Clocks is type Clock is new Widget with private; type Clock_Reference (Data : not null access Clock'Class) is limited null record with Implicit_Dereference => Data; subtype Hour is Integer range 0 .. 23; subtype Minute is Integer range 0 .. 59; subtype Second is Integer range 0 .. 60; type Time_Value is mod 2 ** 32; package Forge is function Create (X, Y, W, H : in Integer; Text : in String) return Clock; end Forge; function Get_Hour (This : in Clock) return Hour; function Get_Minute (This : in Clock) return Minute; function Get_Second (This : in Clock) return Second; function Get_Time (This : in Clock) return Time_Value; procedure Set_Time (This : in out Clock; To : in Time_Value); procedure Set_Time (This : in out Clock; Hours : in Hour; Minutes : in Minute; Seconds : in Second); procedure Draw (This : in out Clock); procedure Draw (This : in out Clock; X, Y, W, H : in Integer); function Handle (This : in out Clock; Event : in Event_Kind) return Event_Outcome; private type Clock is new Widget with null record; overriding procedure Finalize (This : in out Clock); pragma Inline (Get_Hour); pragma Inline (Get_Minute); pragma Inline (Get_Second); pragma Inline (Get_Time); pragma Inline (Set_Time); pragma Inline (Draw); pragma Inline (Handle); end FLTK.Widgets.Clocks;
source/league/arch/x86_generic/matreshka-internals-strings-handlers-x86_utilities.adb
svn2github/matreshka
24
9625
<filename>source/league/arch/x86_generic/matreshka-internals-strings-handlers-x86_utilities.adb ------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Localization, Internationalization, Globalization for Ada -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2013, <NAME> <<EMAIL>> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ package body Matreshka.Internals.Strings.Handlers.X86_Utilities is use type Interfaces.Unsigned_32; function popcount (X : Interfaces.Unsigned_32) return Interfaces.Unsigned_32; pragma Import (Intrinsic, popcount, "__builtin_popcount"); ----------------------------------- -- Update_Index_Backward_Generic -- ----------------------------------- procedure Update_Index_Backward_Generic (Mask : Interfaces.Unsigned_32; Index : in out Positive) is begin if (Mask and 2#00000000_00000011#) = 0 then Index := Index - 1; end if; if (Mask and 2#00000000_00001100#) = 0 then Index := Index - 1; end if; if (Mask and 2#00000000_00110000#) = 0 then Index := Index - 1; end if; if (Mask and 2#00000000_11000000#) = 0 then Index := Index - 1; end if; if (Mask and 2#00000011_00000000#) = 0 then Index := Index - 1; end if; if (Mask and 2#00001100_00000000#) = 0 then Index := Index - 1; end if; if (Mask and 2#00110000_00000000#) = 0 then Index := Index - 1; end if; if (Mask and 2#11000000_00000000#) = 0 then Index := Index - 1; end if; end Update_Index_Backward_Generic; ---------------------------------- -- Update_Index_Backward_POPCNT -- ---------------------------------- procedure Update_Index_Backward_POPCNT (Mask : Interfaces.Unsigned_32; Index : in out Positive) is begin Index := Index - 8 + Integer (popcount (Mask) / 2); end Update_Index_Backward_POPCNT; ---------------------------------- -- Update_Index_Forward_Generic -- ---------------------------------- procedure Update_Index_Forward_Generic (Mask : Interfaces.Unsigned_32; Index : in out Positive) is begin if (Mask and 2#00000000_00000011#) = 0 then Index := Index + 1; end if; if (Mask and 2#00000000_00001100#) = 0 then Index := Index + 1; end if; if (Mask and 2#00000000_00110000#) = 0 then Index := Index + 1; end if; if (Mask and 2#00000000_11000000#) = 0 then Index := Index + 1; end if; if (Mask and 2#00000011_00000000#) = 0 then Index := Index + 1; end if; if (Mask and 2#00001100_00000000#) = 0 then Index := Index + 1; end if; if (Mask and 2#00110000_00000000#) = 0 then Index := Index + 1; end if; if (Mask and 2#11000000_00000000#) = 0 then Index := Index + 1; end if; end Update_Index_Forward_Generic; --------------------------------- -- Update_Index_Forward_POPCNT -- --------------------------------- procedure Update_Index_Forward_POPCNT (Mask : Interfaces.Unsigned_32; Index : in out Positive) is begin Index := Index + 8 - Integer (popcount (Mask) / 2); end Update_Index_Forward_POPCNT; end Matreshka.Internals.Strings.Handlers.X86_Utilities;
programs/oeis/306/A306696.asm
neoneye/loda
22
175834
; A306696: Lexicographically earliest sequence of nonnegative terms such that for any n > 0 and k > 0, if a(n) >= a(n+k), then a(n+2*k) <> a(n+k). ; 0,0,1,0,1,1,2,0,2,1,3,1,2,2,3,0,3,2,4,1,3,3,4,1,4,2,5,2,4,3,5,0,5,3,6,2,4,4,6,1,5,3,7,3,5,4,6,1,6,4,7,2,5,5,7,2,6,4,8,3,6,5,7,0,7,5,8,3,6,6,8,2,7,4,9,4,7,6,8,1,8,5,9,3,7,7,9,3,8,5,10,4,8,6,9,1,9,6,10,4 lpb $0 mov $2,$0 sub $0,1 trn $1,$2 div $2,2 add $1,$2 trn $0,$1 lpe mov $0,$1
org.alloytools.alloy.core/src/test/resources/oldInts.als
cesarcorne/org.alloytools.alloy
0
2417
<gh_stars>0 open util/int8bits sig OldNum { field : Int } /* pred prueba[a: A, b: A]{ eq[a.field,b] } */ pred prueba[a: OldNum, b: OldNum]{ eq[a.field, b.field] } run prueba
alloy4fun_models/trashltl/models/7/ZQD4BpwKEYiBEEG6E.als
Kaixi26/org.alloytools.alloy
0
4354
<filename>alloy4fun_models/trashltl/models/7/ZQD4BpwKEYiBEEG6E.als open main pred idZQD4BpwKEYiBEEG6E_prop8 { ( some f1,f2 : File | f1->f2 in link implies eventually f2 in Trash ) } pred __repair { idZQD4BpwKEYiBEEG6E_prop8 } check __repair { idZQD4BpwKEYiBEEG6E_prop8 <=> prop8o }
test/Succeed/Issue2908.agda
cruhland/agda
1,989
1926
<gh_stars>1000+ open import Agda.Builtin.Nat open import Agda.Builtin.Strict foo : Nat → Nat foo n = primForce (n + n) (λ _ → 0) -- Don't get rid of the seq!
alloy4fun_models/trashltl/models/11/RkvoggWsJEhwBzG9f.als
Kaixi26/org.alloytools.alloy
0
603
<filename>alloy4fun_models/trashltl/models/11/RkvoggWsJEhwBzG9f.als<gh_stars>0 open main pred idRkvoggWsJEhwBzG9f_prop12 { always all f: File | f in Trash releases f not in Trash } pred __repair { idRkvoggWsJEhwBzG9f_prop12 } check __repair { idRkvoggWsJEhwBzG9f_prop12 <=> prop12o }
Assignment 4/ReverseArr.asm
wstern1234/COMSC-260
0
173789
<reponame>wstern1234/COMSC-260<gh_stars>0 ; ReverseArr.asm - reverses the elements of an integer numArr in place INCLUDE Irvine32.inc .386 .model flat, stdcall .stack 4096 ExitProcess PROTO, dwExitCode:DWORD .data numArr DWORD 1, 5, 6, 8, 0Ah, 1Bh, 1Eh, 22h, 2Ah, 32h count BYTE LENGTHOF numArr -1 .code main PROC MOV ESI, OFFSET numArr MOV EDI, OFFSET numArr ADD EDI, SIZEOF numArr SUB EDI, TYPE numArr mov ecx, LENGTHOF numArr L1: mov eax, [esi] mov ebx, [edi] XCHG eax, ebx mov [esi], eax mov [edi], ebx add esi, TYPE numArr sub edi, TYPE numArr dec ecx loop L1 mov eax, 0 mov ecx, LENGTHOF numArr mov esi, OFFSET numArr L2: add eax, [esi] add esi, 4h call writeDec call crlf mov eax, 0 loop L2 INVOKE ExitProcess, 0 main ENDP END main
generated/natools-s_expressions-printers-pretty-config-commands.ads
faelys/natools
0
21320
-- Generated at 2014-06-02 19:12:04 +0000 by Natools.Static_Hash_Maps -- from ../src/natools-s_expressions-printers-pretty-config-commands.sx private package Natools.S_Expressions.Printers.Pretty.Config.Commands is pragma Preelaborate; type Main_Command is (Set_Char_Encoding, Set_Fallback, Set_Hex_Casing, Set_Indentation, Set_Newline, Set_Newline_Encoding, Set_Quoted, Set_Quoted_String, Set_Space_At, Set_Tab_Stop, Set_Token, Set_Width); type Newline_Command is (Set_Newline_Command_Encoding, Set_Newline_Separator); type Quoted_String_Command is (Set_Quoted_Option, Set_Quoted_Escape); type Separator_Command is (All_Separators, No_Separators, Invert_Separators, Open_Open, Open_Atom, Open_Close, Atom_Open, Atom_Atom, Atom_Close, Close_Open, Close_Atom, Close_Close); function Main (Key : String) return Main_Command; function Newline (Key : String) return Newline_Command; function Quoted_String (Key : String) return Quoted_String_Command; function Separator (Key : String) return Separator_Command; function To_Atom_Encoding (Key : String) return Atom_Encoding; function To_Character_Encoding (Key : String) return Character_Encoding; function To_Hex_Casing (Key : String) return Encodings.Hex_Casing; function To_Newline_Encoding (Key : String) return Newline_Encoding; function To_Quoted_Escape (Key : String) return Quoted_Escape_Type; function To_Quoted_Option (Key : String) return Quoted_Option; function To_Token_Option (Key : String) return Token_Option; private Map_1_Key_0 : aliased constant String := "ascii"; Map_1_Key_1 : aliased constant String := "ASCII"; Map_1_Key_2 : aliased constant String := "latin-1"; Map_1_Key_3 : aliased constant String := "latin"; Map_1_Key_4 : aliased constant String := "iso-8859-1"; Map_1_Key_5 : aliased constant String := "ISO-8859-1"; Map_1_Key_6 : aliased constant String := "utf-8"; Map_1_Key_7 : aliased constant String := "UTF-8"; Map_1_Key_8 : aliased constant String := "utf8"; Map_1_Key_9 : aliased constant String := "UTF8"; Map_1_Key_10 : aliased constant String := "base64"; Map_1_Key_11 : aliased constant String := "base-64"; Map_1_Key_12 : aliased constant String := "lower-hex"; Map_1_Key_13 : aliased constant String := "lower-hexa"; Map_1_Key_14 : aliased constant String := "hex"; Map_1_Key_15 : aliased constant String := "hexa"; Map_1_Key_16 : aliased constant String := "hexadecimal"; Map_1_Key_17 : aliased constant String := "upper-hex"; Map_1_Key_18 : aliased constant String := "upper-hexa"; Map_1_Key_19 : aliased constant String := "verbatim"; Map_1_Key_20 : aliased constant String := "lower"; Map_1_Key_21 : aliased constant String := "lower-case"; Map_1_Key_22 : aliased constant String := "upper"; Map_1_Key_23 : aliased constant String := "upper-case"; Map_1_Key_24 : aliased constant String := "indent"; Map_1_Key_25 : aliased constant String := "indentation"; Map_1_Key_26 : aliased constant String := "no-indent"; Map_1_Key_27 : aliased constant String := "no-indentation"; Map_1_Key_28 : aliased constant String := "newline"; Map_1_Key_29 : aliased constant String := "cr"; Map_1_Key_30 : aliased constant String := "CR"; Map_1_Key_31 : aliased constant String := "lf"; Map_1_Key_32 : aliased constant String := "LF"; Map_1_Key_33 : aliased constant String := "CRLF"; Map_1_Key_34 : aliased constant String := "CR-LF"; Map_1_Key_35 : aliased constant String := "crlf"; Map_1_Key_36 : aliased constant String := "cr-lf"; Map_1_Key_37 : aliased constant String := "lf-cr"; Map_1_Key_38 : aliased constant String := "lfcr"; Map_1_Key_39 : aliased constant String := "LF-CR"; Map_1_Key_40 : aliased constant String := "LFCR"; Map_1_Key_41 : aliased constant String := "no-quoted"; Map_1_Key_42 : aliased constant String := "no-quoted-string"; Map_1_Key_43 : aliased constant String := "quoted-when-shorter"; Map_1_Key_44 : aliased constant String := "quoted-string-when-shorter"; Map_1_Key_45 : aliased constant String := "single-line-quoted"; Map_1_Key_46 : aliased constant String := "single-line-quoted-string"; Map_1_Key_47 : aliased constant String := "escape"; Map_1_Key_48 : aliased constant String := "quoted"; Map_1_Key_49 : aliased constant String := "space"; Map_1_Key_50 : aliased constant String := "tab-stop"; Map_1_Key_51 : aliased constant String := "extended-token"; Map_1_Key_52 : aliased constant String := "no-token"; Map_1_Key_53 : aliased constant String := "standard-token"; Map_1_Key_54 : aliased constant String := "token"; Map_1_Key_55 : aliased constant String := "width"; Map_1_Key_56 : aliased constant String := "no-width"; Map_1_Keys : constant array (0 .. 56) of access constant String := (Map_1_Key_0'Access, Map_1_Key_1'Access, Map_1_Key_2'Access, Map_1_Key_3'Access, Map_1_Key_4'Access, Map_1_Key_5'Access, Map_1_Key_6'Access, Map_1_Key_7'Access, Map_1_Key_8'Access, Map_1_Key_9'Access, Map_1_Key_10'Access, Map_1_Key_11'Access, Map_1_Key_12'Access, Map_1_Key_13'Access, Map_1_Key_14'Access, Map_1_Key_15'Access, Map_1_Key_16'Access, Map_1_Key_17'Access, Map_1_Key_18'Access, Map_1_Key_19'Access, Map_1_Key_20'Access, Map_1_Key_21'Access, Map_1_Key_22'Access, Map_1_Key_23'Access, Map_1_Key_24'Access, Map_1_Key_25'Access, Map_1_Key_26'Access, Map_1_Key_27'Access, Map_1_Key_28'Access, Map_1_Key_29'Access, Map_1_Key_30'Access, Map_1_Key_31'Access, Map_1_Key_32'Access, Map_1_Key_33'Access, Map_1_Key_34'Access, Map_1_Key_35'Access, Map_1_Key_36'Access, Map_1_Key_37'Access, Map_1_Key_38'Access, Map_1_Key_39'Access, Map_1_Key_40'Access, Map_1_Key_41'Access, Map_1_Key_42'Access, Map_1_Key_43'Access, Map_1_Key_44'Access, Map_1_Key_45'Access, Map_1_Key_46'Access, Map_1_Key_47'Access, Map_1_Key_48'Access, Map_1_Key_49'Access, Map_1_Key_50'Access, Map_1_Key_51'Access, Map_1_Key_52'Access, Map_1_Key_53'Access, Map_1_Key_54'Access, Map_1_Key_55'Access, Map_1_Key_56'Access); Map_1_Elements : constant array (0 .. 56) of Main_Command := (Set_Char_Encoding, Set_Char_Encoding, Set_Char_Encoding, Set_Char_Encoding, Set_Char_Encoding, Set_Char_Encoding, Set_Char_Encoding, Set_Char_Encoding, Set_Char_Encoding, Set_Char_Encoding, Set_Fallback, Set_Fallback, Set_Fallback, Set_Fallback, Set_Fallback, Set_Fallback, Set_Fallback, Set_Fallback, Set_Fallback, Set_Fallback, Set_Hex_Casing, Set_Hex_Casing, Set_Hex_Casing, Set_Hex_Casing, Set_Indentation, Set_Indentation, Set_Indentation, Set_Indentation, Set_Newline, Set_Newline_Encoding, Set_Newline_Encoding, Set_Newline_Encoding, Set_Newline_Encoding, Set_Newline_Encoding, Set_Newline_Encoding, Set_Newline_Encoding, Set_Newline_Encoding, Set_Newline_Encoding, Set_Newline_Encoding, Set_Newline_Encoding, Set_Newline_Encoding, Set_Quoted, Set_Quoted, Set_Quoted, Set_Quoted, Set_Quoted, Set_Quoted, Set_Quoted_String, Set_Quoted_String, Set_Space_At, Set_Tab_Stop, Set_Token, Set_Token, Set_Token, Set_Token, Set_Width, Set_Width); Map_2_Key_0 : aliased constant String := "cr"; Map_2_Key_1 : aliased constant String := "CR"; Map_2_Key_2 : aliased constant String := "lf"; Map_2_Key_3 : aliased constant String := "LF"; Map_2_Key_4 : aliased constant String := "CRLF"; Map_2_Key_5 : aliased constant String := "CR-LF"; Map_2_Key_6 : aliased constant String := "crlf"; Map_2_Key_7 : aliased constant String := "cr-lf"; Map_2_Key_8 : aliased constant String := "lf-cr"; Map_2_Key_9 : aliased constant String := "lfcr"; Map_2_Key_10 : aliased constant String := "LF-CR"; Map_2_Key_11 : aliased constant String := "LFCR"; Map_2_Key_12 : aliased constant String := "all"; Map_2_Key_13 : aliased constant String := "none"; Map_2_Key_14 : aliased constant String := "not"; Map_2_Key_15 : aliased constant String := "open-open"; Map_2_Key_16 : aliased constant String := "open-atom"; Map_2_Key_17 : aliased constant String := "open-close"; Map_2_Key_18 : aliased constant String := "atom-open"; Map_2_Key_19 : aliased constant String := "atom-atom"; Map_2_Key_20 : aliased constant String := "atom-close"; Map_2_Key_21 : aliased constant String := "close-open"; Map_2_Key_22 : aliased constant String := "close-atom"; Map_2_Key_23 : aliased constant String := "close-close"; Map_2_Keys : constant array (0 .. 23) of access constant String := (Map_2_Key_0'Access, Map_2_Key_1'Access, Map_2_Key_2'Access, Map_2_Key_3'Access, Map_2_Key_4'Access, Map_2_Key_5'Access, Map_2_Key_6'Access, Map_2_Key_7'Access, Map_2_Key_8'Access, Map_2_Key_9'Access, Map_2_Key_10'Access, Map_2_Key_11'Access, Map_2_Key_12'Access, Map_2_Key_13'Access, Map_2_Key_14'Access, Map_2_Key_15'Access, Map_2_Key_16'Access, Map_2_Key_17'Access, Map_2_Key_18'Access, Map_2_Key_19'Access, Map_2_Key_20'Access, Map_2_Key_21'Access, Map_2_Key_22'Access, Map_2_Key_23'Access); Map_2_Elements : constant array (0 .. 23) of Newline_Command := (Set_Newline_Command_Encoding, Set_Newline_Command_Encoding, Set_Newline_Command_Encoding, Set_Newline_Command_Encoding, Set_Newline_Command_Encoding, Set_Newline_Command_Encoding, Set_Newline_Command_Encoding, Set_Newline_Command_Encoding, Set_Newline_Command_Encoding, Set_Newline_Command_Encoding, Set_Newline_Command_Encoding, Set_Newline_Command_Encoding, Set_Newline_Separator, Set_Newline_Separator, Set_Newline_Separator, Set_Newline_Separator, Set_Newline_Separator, Set_Newline_Separator, Set_Newline_Separator, Set_Newline_Separator, Set_Newline_Separator, Set_Newline_Separator, Set_Newline_Separator, Set_Newline_Separator); Map_3_Key_0 : aliased constant String := "never"; Map_3_Key_1 : aliased constant String := "single-line"; Map_3_Key_2 : aliased constant String := "when-shorter"; Map_3_Key_3 : aliased constant String := "octal"; Map_3_Key_4 : aliased constant String := "hex"; Map_3_Key_5 : aliased constant String := "hexa"; Map_3_Key_6 : aliased constant String := "hexadecimal"; Map_3_Key_7 : aliased constant String := "lower-hex"; Map_3_Key_8 : aliased constant String := "lower-hexa"; Map_3_Key_9 : aliased constant String := "upper-hex"; Map_3_Key_10 : aliased constant String := "upper-hexa"; Map_3_Keys : constant array (0 .. 10) of access constant String := (Map_3_Key_0'Access, Map_3_Key_1'Access, Map_3_Key_2'Access, Map_3_Key_3'Access, Map_3_Key_4'Access, Map_3_Key_5'Access, Map_3_Key_6'Access, Map_3_Key_7'Access, Map_3_Key_8'Access, Map_3_Key_9'Access, Map_3_Key_10'Access); Map_3_Elements : constant array (0 .. 10) of Quoted_String_Command := (Set_Quoted_Option, Set_Quoted_Option, Set_Quoted_Option, Set_Quoted_Escape, Set_Quoted_Escape, Set_Quoted_Escape, Set_Quoted_Escape, Set_Quoted_Escape, Set_Quoted_Escape, Set_Quoted_Escape, Set_Quoted_Escape); Map_4_Key_0 : aliased constant String := "all"; Map_4_Key_1 : aliased constant String := "none"; Map_4_Key_2 : aliased constant String := "not"; Map_4_Key_3 : aliased constant String := "open-open"; Map_4_Key_4 : aliased constant String := "open-atom"; Map_4_Key_5 : aliased constant String := "open-close"; Map_4_Key_6 : aliased constant String := "atom-open"; Map_4_Key_7 : aliased constant String := "atom-atom"; Map_4_Key_8 : aliased constant String := "atom-close"; Map_4_Key_9 : aliased constant String := "close-open"; Map_4_Key_10 : aliased constant String := "close-atom"; Map_4_Key_11 : aliased constant String := "close-close"; Map_4_Keys : constant array (0 .. 11) of access constant String := (Map_4_Key_0'Access, Map_4_Key_1'Access, Map_4_Key_2'Access, Map_4_Key_3'Access, Map_4_Key_4'Access, Map_4_Key_5'Access, Map_4_Key_6'Access, Map_4_Key_7'Access, Map_4_Key_8'Access, Map_4_Key_9'Access, Map_4_Key_10'Access, Map_4_Key_11'Access); Map_4_Elements : constant array (0 .. 11) of Separator_Command := (All_Separators, No_Separators, Invert_Separators, Open_Open, Open_Atom, Open_Close, Atom_Open, Atom_Atom, Atom_Close, Close_Open, Close_Atom, Close_Close); Map_5_Key_0 : aliased constant String := "base64"; Map_5_Key_1 : aliased constant String := "base-64"; Map_5_Key_2 : aliased constant String := "lower-hex"; Map_5_Key_3 : aliased constant String := "lower-hexa"; Map_5_Key_4 : aliased constant String := "hex"; Map_5_Key_5 : aliased constant String := "hexa"; Map_5_Key_6 : aliased constant String := "hexadecimal"; Map_5_Key_7 : aliased constant String := "upper-hex"; Map_5_Key_8 : aliased constant String := "upper-hexa"; Map_5_Key_9 : aliased constant String := "verbatim"; Map_5_Keys : constant array (0 .. 9) of access constant String := (Map_5_Key_0'Access, Map_5_Key_1'Access, Map_5_Key_2'Access, Map_5_Key_3'Access, Map_5_Key_4'Access, Map_5_Key_5'Access, Map_5_Key_6'Access, Map_5_Key_7'Access, Map_5_Key_8'Access, Map_5_Key_9'Access); Map_5_Elements : constant array (0 .. 9) of Atom_Encoding := (Base64, Base64, Hexadecimal, Hexadecimal, Hexadecimal, Hexadecimal, Hexadecimal, Hexadecimal, Hexadecimal, Verbatim); Map_6_Key_0 : aliased constant String := "ascii"; Map_6_Key_1 : aliased constant String := "ASCII"; Map_6_Key_2 : aliased constant String := "latin-1"; Map_6_Key_3 : aliased constant String := "latin"; Map_6_Key_4 : aliased constant String := "iso-8859-1"; Map_6_Key_5 : aliased constant String := "ISO-8859-1"; Map_6_Key_6 : aliased constant String := "utf-8"; Map_6_Key_7 : aliased constant String := "UTF-8"; Map_6_Key_8 : aliased constant String := "utf8"; Map_6_Key_9 : aliased constant String := "UTF8"; Map_6_Keys : constant array (0 .. 9) of access constant String := (Map_6_Key_0'Access, Map_6_Key_1'Access, Map_6_Key_2'Access, Map_6_Key_3'Access, Map_6_Key_4'Access, Map_6_Key_5'Access, Map_6_Key_6'Access, Map_6_Key_7'Access, Map_6_Key_8'Access, Map_6_Key_9'Access); Map_6_Elements : constant array (0 .. 9) of Character_Encoding := (ASCII, ASCII, Latin, Latin, Latin, Latin, UTF_8, UTF_8, UTF_8, UTF_8); Map_7_Key_0 : aliased constant String := "lower"; Map_7_Key_1 : aliased constant String := "lower-case"; Map_7_Key_2 : aliased constant String := "upper"; Map_7_Key_3 : aliased constant String := "upper-case"; Map_7_Keys : constant array (0 .. 3) of access constant String := (Map_7_Key_0'Access, Map_7_Key_1'Access, Map_7_Key_2'Access, Map_7_Key_3'Access); Map_7_Elements : constant array (0 .. 3) of Encodings.Hex_Casing := (Encodings.Lower, Encodings.Lower, Encodings.Upper, Encodings.Upper); Map_8_Key_0 : aliased constant String := "CR"; Map_8_Key_1 : aliased constant String := "cr"; Map_8_Key_2 : aliased constant String := "LF"; Map_8_Key_3 : aliased constant String := "lf"; Map_8_Key_4 : aliased constant String := "CRLF"; Map_8_Key_5 : aliased constant String := "CR-LF"; Map_8_Key_6 : aliased constant String := "crlf"; Map_8_Key_7 : aliased constant String := "cr-lf"; Map_8_Key_8 : aliased constant String := "LFCR"; Map_8_Key_9 : aliased constant String := "LF-CR"; Map_8_Key_10 : aliased constant String := "lfcr"; Map_8_Key_11 : aliased constant String := "lf-cr"; Map_8_Keys : constant array (0 .. 11) of access constant String := (Map_8_Key_0'Access, Map_8_Key_1'Access, Map_8_Key_2'Access, Map_8_Key_3'Access, Map_8_Key_4'Access, Map_8_Key_5'Access, Map_8_Key_6'Access, Map_8_Key_7'Access, Map_8_Key_8'Access, Map_8_Key_9'Access, Map_8_Key_10'Access, Map_8_Key_11'Access); Map_8_Elements : constant array (0 .. 11) of Newline_Encoding := (CR, CR, LF, LF, CR_LF, CR_LF, CR_LF, CR_LF, LF_CR, LF_CR, LF_CR, LF_CR); Map_9_Key_0 : aliased constant String := "octal"; Map_9_Key_1 : aliased constant String := "hex"; Map_9_Key_2 : aliased constant String := "hexa"; Map_9_Key_3 : aliased constant String := "hexadecimal"; Map_9_Key_4 : aliased constant String := "lower-hex"; Map_9_Key_5 : aliased constant String := "lower-hexa"; Map_9_Key_6 : aliased constant String := "upper-hex"; Map_9_Key_7 : aliased constant String := "upper-hexa"; Map_9_Keys : constant array (0 .. 7) of access constant String := (Map_9_Key_0'Access, Map_9_Key_1'Access, Map_9_Key_2'Access, Map_9_Key_3'Access, Map_9_Key_4'Access, Map_9_Key_5'Access, Map_9_Key_6'Access, Map_9_Key_7'Access); Map_9_Elements : constant array (0 .. 7) of Quoted_Escape_Type := (Octal_Escape, Hex_Escape, Hex_Escape, Hex_Escape, Hex_Escape, Hex_Escape, Hex_Escape, Hex_Escape); Map_10_Key_0 : aliased constant String := "when-shorter"; Map_10_Key_1 : aliased constant String := "quoted-when-shorter"; Map_10_Key_2 : aliased constant String := "quoted-string-when-shorter"; Map_10_Key_3 : aliased constant String := "single-line"; Map_10_Key_4 : aliased constant String := "single-line-quoted"; Map_10_Key_5 : aliased constant String := "single-line-quoted-string"; Map_10_Key_6 : aliased constant String := "never"; Map_10_Key_7 : aliased constant String := "no-quoted"; Map_10_Key_8 : aliased constant String := "no-quoted-string"; Map_10_Keys : constant array (0 .. 8) of access constant String := (Map_10_Key_0'Access, Map_10_Key_1'Access, Map_10_Key_2'Access, Map_10_Key_3'Access, Map_10_Key_4'Access, Map_10_Key_5'Access, Map_10_Key_6'Access, Map_10_Key_7'Access, Map_10_Key_8'Access); Map_10_Elements : constant array (0 .. 8) of Quoted_Option := (When_Shorter, When_Shorter, When_Shorter, Single_Line, Single_Line, Single_Line, No_Quoted, No_Quoted, No_Quoted); Map_11_Key_0 : aliased constant String := "extended-token"; Map_11_Key_1 : aliased constant String := "extended"; Map_11_Key_2 : aliased constant String := "standard-token"; Map_11_Key_3 : aliased constant String := "token"; Map_11_Key_4 : aliased constant String := "standard"; Map_11_Key_5 : aliased constant String := "no-token"; Map_11_Key_6 : aliased constant String := "no"; Map_11_Key_7 : aliased constant String := "none"; Map_11_Key_8 : aliased constant String := "never"; Map_11_Keys : constant array (0 .. 8) of access constant String := (Map_11_Key_0'Access, Map_11_Key_1'Access, Map_11_Key_2'Access, Map_11_Key_3'Access, Map_11_Key_4'Access, Map_11_Key_5'Access, Map_11_Key_6'Access, Map_11_Key_7'Access, Map_11_Key_8'Access); Map_11_Elements : constant array (0 .. 8) of Token_Option := (Extended_Token, Extended_Token, Standard_Token, Standard_Token, Standard_Token, No_Token, No_Token, No_Token, No_Token); end Natools.S_Expressions.Printers.Pretty.Config.Commands;
out/affect.adb
FardaleM/metalang
22
8697
with ada.text_io, ada.Integer_text_IO, Ada.Text_IO.Text_Streams, Ada.Strings.Fixed, Interfaces.C; use ada.text_io, ada.Integer_text_IO, Ada.Strings, Ada.Strings.Fixed, Interfaces.C; procedure affect is type stringptr is access all char_array; procedure PInt(i : in Integer) is begin String'Write (Text_Streams.Stream (Current_Output), Trim(Integer'Image(i), Left)); end; procedure SkipSpaces is C : Character; Eol : Boolean; begin loop Look_Ahead(C, Eol); exit when Eol or C /= ' '; Get(C); end loop; end; -- --Ce test permet de vérifier que l'implémentation de l'affectation fonctionne correctement -- type toto; type toto_PTR is access toto; type toto is record foo : Integer; bar : Integer; blah : Integer; end record; function mktoto(v1 : in Integer) return toto_PTR is t : toto_PTR; begin t := new toto; t.foo := v1; t.bar := v1; t.blah := v1; return t; end; function mktoto2(v1 : in Integer) return toto_PTR is t : toto_PTR; begin t := new toto; t.foo := v1 + 3; t.bar := v1 + 2; t.blah := v1 + 1; return t; end; type a is Array (Integer range <>) of Integer; type a_PTR is access a; function result(t_0 : in toto_PTR; t2_0 : in toto_PTR) return Integer is t3 : toto_PTR; t2 : toto_PTR; t : toto_PTR; len : Integer; cache2 : a_PTR; cache1 : a_PTR; cache0 : a_PTR; begin t := t_0; t2 := t2_0; t3 := new toto; t3.foo := 0; t3.bar := 0; t3.blah := 0; t3 := t2; t := t2; t2 := t3; t.blah := t.blah + 1; len := 1; cache0 := new a (0..len - 1); for i in integer range 0..len - 1 loop cache0(i) := (-i); end loop; cache1 := new a (0..len - 1); for j in integer range 0..len - 1 loop cache1(j) := j; end loop; cache2 := cache0; cache0 := cache1; cache2 := cache0; return t.foo + t.blah * t.bar + t.bar * t.foo; end; t2 : toto_PTR; t : toto_PTR; begin t := mktoto(4); t2 := mktoto(5); Get(t.bar); SkipSpaces; Get(t.blah); SkipSpaces; Get(t2.bar); SkipSpaces; Get(t2.blah); PInt(result(t, t2)); PInt(t.blah); end;
models/util/ternary.als
transclosure/Amalgam
4
878
module util/ternary /* * Utilities for some common operations and constraints * on ternary relations. The keyword 'univ' represents the * top-level type, which all other types implicitly extend. * Therefore, all the functions and predicates in this model * may be applied to ternary relations of any type. * * author: <NAME> */ // returns the domain of a ternary relation fun dom [r: univ->univ->univ] : set ((r.univ).univ) { (r.univ).univ } // returns the range of a ternary relation fun ran [r: univ->univ->univ] : set (univ.(univ.r)) { univ.(univ.r) } // returns the "middle range" of a ternary relation fun mid [r: univ->univ->univ] : set (univ.(r.univ)) { univ.(r.univ) } // returns the first two columns of a ternary relation fun select12 [r: univ->univ->univ] : r.univ { r.univ } // returns the first and last columns of a ternary relation fun select13 [r: univ->univ->univ] : ((r.univ).univ) -> (univ.(univ.r)) { {x: (r.univ).univ, z: univ.(univ.r) | some (x.r).z} } // returns the last two columns of a ternary relation fun select23 [r: univ->univ->univ] : univ.r { univ.r } // flips the first two columns of a ternary relation fun flip12 [r: univ->univ->univ] : (univ.(r.univ))->((r.univ).univ)->(univ.(univ.r)) { {x: univ.(r.univ), y: (r.univ).univ, z: univ.(univ.r) | y->x->z in r} } // flips the first and last columns of a ternary relation fun flip13 [r: univ->univ->univ] : (univ.(univ.r))->(univ.(r.univ))->((r.univ).univ) { {x: univ.(univ.r), y: univ.(r.univ), z: (r.univ).univ | z->y->x in r} } // flips the last two columns of a ternary relation fun flip23 [r: univ->univ->univ] : ((r.univ).univ)->(univ.(univ.r))->(univ.(r.univ)) { {x: (r.univ).univ, y: univ.(univ.r), z: univ.(r.univ) | x->z->y in r} }
data/github.com/Lord-Kamina/Deluge-Magnet-Handler/d14f5e7b446050763bb2584e8091eb66c894d088/Magnet Handler.applescript
ajnavarro/language-dataset
93
2138
<reponame>ajnavarro/language-dataset on quit try tell application "System Events" to tell process "Deluge" activate set frontmost to true windows where title contains "Add Torrents" if result is not {} then perform action "AXRaise" of item 1 of result end tell end try end quit on open location this_URL try tell application "Finder" to set delugePath to POSIX path of (application file id "org.deluge" as string) set appExists to true on error set appExists to false display alert "Deluge.app must be installed in order to use this plug-in." as critical return end try set delugeArgument to quoted form of this_URL try tell application "Deluge" to activate end try do shell script (quoted form of (delugePath & "/Contents/MacOS/Deluge") & " add " & delugeArgument & "; return;") quit end open location tell application "Finder" to set thisPath to (POSIX path of (application file id "org.deluge.MagnetURIHandler" as string)) log "Magnet Handler.app info: path to Application: " & thisPath set regTool to (quoted form of POSIX path of (path to resource "registerHandler")) set handlerCheck to regTool & " -check" set handlerReg to regTool & " -register" log "Magnet Handler.app info: path to registerHandler: " & regTool set retHandlerCheck to do shell script handlerCheck if (retHandlerCheck contains "org.deluge.magneturihandler") then display dialog "Magnet Handler is already the default application to handle magnet URIs" buttons {"OK"} with title "Notification" with icon POSIX file (POSIX path of (path to resource "deluge_magnet.icns")) else try set dialogResult to display dialog "Magnet Handler has not been configured to handle magnet URIs. Would you like to do this now?" buttons {"Yes", "No"} default button "Yes" cancel button "No" with title "Notification" with icon POSIX file (POSIX path of (path to resource "deluge_magnet.icns")) log dialogResult on error number -128 display alert "Unable to complete operation: Error -128" as critical return end try try if (button returned) of dialogResult is "Yes" then set retHandlerSet to do shell script handlerReg if (retHandlerSet is equal to "0") then display dialog "Magnet Handler has now been configured as the default application to handle magnet URIs" buttons {"OK"} with title "Notification" with icon POSIX file (POSIX path of (path to resource "deluge_magnet.icns")) else display alert "We were unable to configure Magnet Handler as the default application to handle magnet URIs. Helper returned error code: " & retHandlerSet as critical end if end if on error number -128 display alert "Unable to complete operation: Error -128" as critical return end try end if quit
_incObj/79 Lamppost.asm
kodishmediacenter/msu-md-sonic
9
960
<reponame>kodishmediacenter/msu-md-sonic<filename>_incObj/79 Lamppost.asm ; --------------------------------------------------------------------------- ; Object 79 - lamppost ; --------------------------------------------------------------------------- Lamppost: moveq #0,d0 move.b obRoutine(a0),d0 move.w Lamp_Index(pc,d0.w),d1 jsr Lamp_Index(pc,d1.w) jmp (RememberState).l ; =========================================================================== Lamp_Index: dc.w Lamp_Main-Lamp_Index dc.w Lamp_Blue-Lamp_Index dc.w Lamp_Finish-Lamp_Index dc.w Lamp_Twirl-Lamp_Index lamp_origX: equ $30 ; original x-axis position lamp_origY: equ $32 ; original y-axis position lamp_time: equ $36 ; length of time to twirl the lamp ; =========================================================================== Lamp_Main: ; Routine 0 addq.b #2,obRoutine(a0) move.l #Map_Lamp,obMap(a0) move.w #$7A0,obGfx(a0) move.b #4,obRender(a0) move.b #8,obActWid(a0) move.b #5,obPriority(a0) lea (v_objstate).w,a2 moveq #0,d0 move.b obRespawnNo(a0),d0 bclr #7,2(a2,d0.w) btst #0,2(a2,d0.w) bne.s @red move.b (v_lastlamp).w,d1 andi.b #$7F,d1 move.b obSubtype(a0),d2 ; get lamppost number andi.b #$7F,d2 cmp.b d2,d1 ; is this a "new" lamppost? bcs.s Lamp_Blue ; if yes, branch @red: bset #0,2(a2,d0.w) move.b #4,obRoutine(a0) ; goto Lamp_Finish next move.b #3,obFrame(a0) ; use red lamppost frame rts ; =========================================================================== Lamp_Blue: ; Routine 2 tst.w (v_debuguse).w ; is debug mode being used? bne.w @donothing ; if yes, branch tst.b (f_lockmulti).w bmi.w @donothing move.b (v_lastlamp).w,d1 andi.b #$7F,d1 move.b obSubtype(a0),d2 andi.b #$7F,d2 cmp.b d2,d1 ; is this a "new" lamppost? bcs.s @chkhit ; if yes, branch lea (v_objstate).w,a2 moveq #0,d0 move.b obRespawnNo(a0),d0 bset #0,2(a2,d0.w) move.b #4,obRoutine(a0) move.b #3,obFrame(a0) bra.w @donothing ; =========================================================================== @chkhit: move.w (v_player+obX).w,d0 sub.w obX(a0),d0 addq.w #8,d0 cmpi.w #$10,d0 bcc.w @donothing move.w (v_player+obY).w,d0 sub.w obY(a0),d0 addi.w #$40,d0 cmpi.w #$68,d0 bcc.s @donothing sfx sfx_Lamppost,0,0,0 ; play lamppost sound addq.b #2,obRoutine(a0) jsr (FindFreeObj).l bne.s @fail move.b #id_Lamppost,0(a1) ; load twirling lamp object move.b #6,obRoutine(a1) ; goto Lamp_Twirl next move.w obX(a0),lamp_origX(a1) move.w obY(a0),lamp_origY(a1) subi.w #$18,lamp_origY(a1) move.l #Map_Lamp,obMap(a1) move.w #$7A0,obGfx(a1) move.b #4,obRender(a1) move.b #8,obActWid(a1) move.b #4,obPriority(a1) move.b #2,obFrame(a1) ; use "ball only" frame move.w #$20,lamp_time(a1) @fail: move.b #1,obFrame(a0) ; use "post only" frame bsr.w Lamp_StoreInfo lea (v_objstate).w,a2 moveq #0,d0 move.b obRespawnNo(a0),d0 bset #0,2(a2,d0.w) @donothing: rts ; =========================================================================== Lamp_Finish: ; Routine 4 rts ; =========================================================================== Lamp_Twirl: ; Routine 6 subq.w #1,lamp_time(a0) ; decrement timer bpl.s @continue ; if time remains, keep twirling move.b #4,obRoutine(a0) ; goto Lamp_Finish next @continue: move.b obAngle(a0),d0 subi.b #$10,obAngle(a0) subi.b #$40,d0 jsr (CalcSine).l muls.w #$C00,d1 swap d1 add.w lamp_origX(a0),d1 move.w d1,obX(a0) muls.w #$C00,d0 swap d0 add.w lamp_origY(a0),d0 move.w d0,obY(a0) rts ; =========================================================================== ; --------------------------------------------------------------------------- ; Subroutine to store information when you hit a lamppost ; --------------------------------------------------------------------------- Lamp_StoreInfo: move.b obSubtype(a0),(v_lastlamp).w ; lamppost number move.b (v_lastlamp).w,($FFFFFE31).w move.w obX(a0),($FFFFFE32).w ; x-position move.w obY(a0),($FFFFFE34).w ; y-position move.w (v_rings).w,($FFFFFE36).w ; rings move.b (v_lifecount).w,($FFFFFE54).w ; lives move.l (v_time).w,($FFFFFE38).w ; time move.b (v_dle_routine).w,($FFFFFE3C).w ; routine counter for dynamic level mod move.w (v_limitbtm2).w,($FFFFFE3E).w ; lower y-boundary of level move.w (v_screenposx).w,($FFFFFE40).w ; screen x-position move.w (v_screenposy).w,($FFFFFE42).w ; screen y-position move.w (v_bgscreenposx).w,($FFFFFE44).w ; bg position move.w (v_bgscreenposy).w,($FFFFFE46).w ; bg position move.w (v_bg2screenposx).w,($FFFFFE48).w ; bg position move.w (v_bg2screenposy).w,($FFFFFE4A).w ; bg position move.w (v_bg3screenposx).w,($FFFFFE4C).w ; bg position move.w (v_bg3screenposy).w,($FFFFFE4E).w ; bg position move.w (v_waterpos2).w,($FFFFFE50).w ; water height move.b (v_wtr_routine).w,($FFFFFE52).w ; rountine counter for water move.b (f_wtr_state).w,($FFFFFE53).w ; water direction rts ; --------------------------------------------------------------------------- ; Subroutine to load stored info when you start a level from a lamppost ; --------------------------------------------------------------------------- ; ||||||||||||||| S U B R O U T I N E ||||||||||||||||||||||||||||||||||||||| Lamp_LoadInfo: move.b ($FFFFFE31).w,(v_lastlamp).w move.w ($FFFFFE32).w,(v_player+obX).w move.w ($FFFFFE34).w,(v_player+obY).w move.w ($FFFFFE36).w,(v_rings).w move.b ($FFFFFE54).w,(v_lifecount).w clr.w (v_rings).w clr.b (v_lifecount).w move.l ($FFFFFE38).w,(v_time).w move.b #59,(v_timecent).w subq.b #1,(v_timesec).w move.b ($FFFFFE3C).w,(v_dle_routine).w move.b ($FFFFFE52).w,(v_wtr_routine).w move.w ($FFFFFE3E).w,(v_limitbtm2).w move.w ($FFFFFE3E).w,(v_limitbtm1).w move.w ($FFFFFE40).w,(v_screenposx).w move.w ($FFFFFE42).w,(v_screenposy).w move.w ($FFFFFE44).w,(v_bgscreenposx).w move.w ($FFFFFE46).w,(v_bgscreenposy).w move.w ($FFFFFE48).w,(v_bg2screenposx).w move.w ($FFFFFE4A).w,(v_bg2screenposy).w move.w ($FFFFFE4C).w,(v_bg3screenposx).w move.w ($FFFFFE4E).w,(v_bg3screenposy).w cmpi.b #1,(v_zone).w ; is this Labyrinth Zone? bne.s @notlabyrinth ; if not, branch move.w ($FFFFFE50).w,(v_waterpos2).w move.b ($FFFFFE52).w,(v_wtr_routine).w move.b ($FFFFFE53).w,(f_wtr_state).w @notlabyrinth: tst.b (v_lastlamp).w bpl.s locret_170F6 move.w ($FFFFFE32).w,d0 subi.w #$A0,d0 move.w d0,(v_limitleft2).w locret_170F6: rts
utils/obb.ads
Lucretia/old_nehe_ada95
0
15886
--------------------------------------------------------------------------------- -- Copyright 2004-2005 © <NAME> -- -- This code is to be used for tutorial purposes only. -- You may not redistribute this code in any form without my express permission. --------------------------------------------------------------------------------- with Matrix3x3; with Vector3; use type Matrix3x3.Object; package OBB is type Object is record Min, Max : Vector3.Object; end record; function Create return Object; procedure Empty(Self : in out Object); procedure Add(Self : in out Object; Vertex : in Vector3.Object); procedure Render(Self : in Object); end OBB;
test/Common/Maybe.agda
KDr2/agda
0
12012
{-# OPTIONS --cubical-compatible #-} module Common.Maybe where data Maybe {a} (A : Set a) : Set a where nothing : Maybe A just : A → Maybe A
programs/oeis/283/A283833.asm
neoneye/loda
22
81239
; A283833: For t >= 0, if 2^t + t - 3 <= n <= 2^t + t - 1 then a(n) = 2^t - 1, while if 2^t + t - 1 < n < 2^(t+1) + t - 3 then a(n) = 2^(t+1) + t - 2 - n. ; 1,1,1,3,3,3,2,1,7,7,7,6,5,4,3,2,1,15,15,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,31,31,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,63,63,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33 lpb $0 sub $0,1 add $1,1 mul $1,2 trn $0,$1 add $0,$1 lpe add $1,2 mov $2,$0 trn $2,$1 sub $1,$2 sub $1,1 mov $0,$1
Lista 3/mips5.asm
AtilaAssuncao/MIPS-AP2
0
89263
.data message: .asciiz "Fim da Execução" space: .asciiz ", " .text main: addi $t0,$zero,0 loop: bgt $t0,9,exit addi $t0,$t0,1 li $v0, 5 # chama função para ler syscall la $t7, ($v0) # carrega o inteiro lido em $t7 add $t1,$t1,$t7 j loop exit: jal intSoma li $v0, 4 la $a0, message syscall #fim da execução li $v0, 10 syscall intSoma: li $v0, 1 add $a0,$t1,$zero syscall li $v0, 4 la $a0,space syscall jr $ra
ke_mode/winnt/ntke_cpprtl/eh/table_based/_arm/eh_invoke_funclet.arm.asm
133a/project_ntke_cpprtl
12
81107
;///////////////////////////////////////////////////////////////////////////// ;//// copyright (c) 2012-2017 project_ntke_cpprtl ;//// mailto:<EMAIL> ;//// license: the MIT license ;///////////////////////////////////////////////////////////////////////////// #include <ksarm.h> ; r0 void* (*)(void) - the funclet entry point; ; r1 void* - the function frame pointer the funclet is linked with; ; r2 void* [] - the {r4-r11} nv-context to be set before the funclet is invoked; NESTED_ENTRY _CPPRTL_invoke_funclet PROLOG_PUSH {r1, r4-r11, lr} ; keep the frame pointer, the nv-context and the link address. ldm r2 , {r4-r11} ; load the funclet {r4-r11} nv-context, blx r0 ; invoke the funclet. EPILOG_POP {r3-r11, pc} ; load 'pc' with the return address, restore the nv-context and pop out the frame ptr, ; r0 - the continuation address if any. NESTED_END _CPPRTL_invoke_funclet END
oeis/000/A000082.asm
neoneye/loda-programs
11
174644
<filename>oeis/000/A000082.asm<gh_stars>10-100 ; A000082: a(n) = n^2*Product_{p|n} (1 + 1/p). ; Submitted by <NAME> ; 1,6,12,24,30,72,56,96,108,180,132,288,182,336,360,384,306,648,380,720,672,792,552,1152,750,1092,972,1344,870,2160,992,1536,1584,1836,1680,2592,1406,2280,2184,2880,1722,4032,1892,3168,3240,3312,2256,4608,2744,4500,3672,4368,2862,5832,3960,5376,4560,5220,3540,8640,3782,5952,6048,6144,5460,9504,4556,7344,6624,10080,5112,10368,5402,8436,9000,9120,7392,13104,6320,11520,8748,10332,6972,16128,9180,11352,10440,12672,8010,19440,10192,13248,11904,13536,11400,18432,9506,16464,14256,18000 mov $2,$0 add $0,2 mul $0,$2 seq $0,1615 ; Dedekind psi function: n * Product_{p|n, p prime} (1 + 1/p).
data/phone/text/alan_callee.asm
Dev727/ancientplatinum
28
168625
UnknownText_0x1b659d: text "Yup, it's @" text_ram wStringBuffer3 text "!" para "Is this <PLAY_G>?" line "Good morning!" done UnknownText_0x1b65c7: text "Yup, it's @" text_ram wStringBuffer3 text "!" para "Is that <PLAY_G>?" done UnknownText_0x1b65e3: text "Yup, it's @" text_ram wStringBuffer3 text "!" para "Is that <PLAY_G>?" line "Good evening!" done UnknownText_0x1b660d: text "Hello! It's me," line "@" text_ram wStringBuffer3 text "!" done UnknownText_0x1b6624: text "Hello! It's me," line "@" text_ram wStringBuffer3 text "!" done UnknownText_0x1b663b: text "Hello! It's me," line "@" text_ram wStringBuffer3 text "!" done UnknownText_0x1b6652: text "<PLAY_G>, are you" line "raising your" cont "#MON properly?" para "I read in a book" line "that you should" para "raise any #MON" line "you catch with" cont "love and care." done
tests/bfp-003-loadfpi.asm
mtalexander/hyperion
187
171584
<gh_stars>100-1000 TITLE 'bfp-003-loadfpi.asm: Test IEEE Load FP Integer' *********************************************************************** * *Testcase IEEE LOAD FP INTEGER * Test case capability includes IEEE exceptions trappable and * otherwise. Test results, FPCR flags, and any DXC are saved for all * tests. Load FP Integer does not set the condition code. * *********************************************************************** SPACE 2 *********************************************************************** * * bfp-003-loadfpi.asm * * This assembly-language source file is part of the * Hercules Binary Floating Point Validation Package * by <NAME> * * Copyright 2016 by <NAME>. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior written * permission. * * DISCLAMER: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "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 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. * *********************************************************************** SPACE 2 *********************************************************************** * * Tests the following three conversion instructions * LOAD FP INTEGER (short BFP, RRE) * LOAD FP INTEGER (long BFP, RRE) * LOAD FP INTEGER (extended BFP, RRE) * LOAD FP INTEGER (short BFP, RRF-e) * LOAD FP INTEGER (long BFP, RRF-e) * LOAD FP INTEGER (extended BFP, RRF-e) * * Test data is compiled into this program. The test script that runs * this program can provide alternative test data through Hercules R * commands. * * Test Case Order * 1) Short BFP inexact masking/trapping & SNaN/QNaN tests * 2) Short BFP rounding mode tests * 3) Long BFP inexact masking/trapping & SNaN/QNaN tests * 4) Long BFP rounding mode tests * 5) Extended BFP inexact masking/trapping & SNaN/QNaN tests * 6) Extended BFP rounding mode tests * * Provided test data is 1, 1.5, SNaN, and QNaN. * The second value will trigger an inexact exception when LOAD FP * INTEGER is executed. The final value will trigger an invalid * exception. * Provided test data for rounding tests is * -9.5, -5.5, -2.5, -1.5, -0.5, +0.5, +1.5, +2.5, +5.5, +9.5 * This data is taken from Table 9-11 on page 9-16 of SA22-7832-10. * * Three input test data sets are provided, one each for short, long, * and extended precision BFP inputs. * * Also tests the following floating point support instructions * LOAD (Short) * LOAD (Long) * LFPC (Load Floating Point Control Register) * SRNMB (Set BFP Rounding Mode 2-bit) * SRNMB (Set BFP Rounding Mode 3-bit) * STORE (Short) * STORE (Long) * STFPC (Store Floating Point Control Register) * *********************************************************************** SPACE 2 MACRO PADCSECT &ENDLABL .* .* Macro to pad the CSECT to include result data areas if this test .* program is not being assembled using asma. asma generates a core .* image that is loaded by the loadcore command, and because the .* core image is a binary stored in Github, it makes sense to make .* this small effort to keep the core image small. .* AIF (D'&ENDLABL).GOODPAD MNOTE 4,'Missing or invalid CSECT padding label ''&ENDLABL''' MNOTE *,'No CSECT padding performed' MEXIT .* .GOODPAD ANOP Label valid. See if we're on asma AIF ('&SYSASM' EQ 'A SMALL MAINFRAME ASSEMBLER').NOPAD ORG &ENDLABL-1 Not ASMA. Pad CSECT MEXIT .* .NOPAD ANOP MNOTE *,'asma detected; no CSECT padding performed' MEND * * Note: for compatibility with the z/CMS test rig, do not change * or use R11, R14, or R15. Everything else is fair game. * BFPLDFPI START 0 R0 EQU 0 Work register for cc extraction R1 EQU 1 Available R2 EQU 2 Holds count of test input values R3 EQU 3 Points to next test input value(s) R4 EQU 4 Available R5 EQU 5 Available R6 EQU 6 Available R7 EQU 7 Pointer to next result value(s) R8 EQU 8 Pointer to next FPCR result R9 EQU 9 Available R10 EQU 10 Pointer to test address list R11 EQU 11 **Reserved for z/CMS test rig R12 EQU 12 Holds number of test cases in set R13 EQU 13 Mainline return address R14 EQU 14 **Return address for z/CMS test rig R15 EQU 15 **Base register on z/CMS or Hyperion * * Floating Point Register equates to keep the cross reference clean * FPR0 EQU 0 FPR1 EQU 1 FPR2 EQU 2 FPR3 EQU 3 FPR4 EQU 4 FPR5 EQU 5 FPR6 EQU 6 FPR7 EQU 7 FPR8 EQU 8 FPR9 EQU 9 FPR10 EQU 10 FPR11 EQU 11 FPR12 EQU 12 FPR13 EQU 13 FPR14 EQU 14 FPR15 EQU 15 * USING *,R15 * Above works on real iron (R15=0 after sysclear) * and in z/CMS (R15 points to start of load module) * SPACE 2 *********************************************************************** * * Low core definitions, Restart PSW, and Program Check Routine. * *********************************************************************** SPACE 2 ORG BFPLDFPI+X'8E' Program check interrution code PCINTCD DS H * PCOLDPSW EQU BFPLDFPI+X'150' z/Arch Program check old PSW * ORG BFPLDFPI+X'1A0' z/Arch Restart PSW DC X'0000000180000000',AD(START) * ORG BFPLDFPI+X'1D0' z/Arch Program check old PSW DC X'0000000000000000',AD(PROGCHK) * * Program check routine. If Data Exception, continue execution at * the instruction following the program check. Otherwise, hard wait. * No need to collect data. All interesting DXC stuff is captured * in the FPCR. * PROGCHK DS 0H Program check occured... CLI PCINTCD+1,X'07' Data Exception? JNE PCNOTDTA ..no, hardwait (not sure if R15 is ok) LPSWE PCOLDPSW ..yes, resume program execution PCNOTDTA DS 0H LTR R14,R14 Return address provided? BNZR R14 Yes, return to z/CMS test rig. LPSWE HARDWAIT Not data exception, enter disabled wait. EJECT *********************************************************************** * * Main program. Enable Advanced Floating Point, process test cases. * *********************************************************************** SPACE 2 START DS 0H STCTL R0,R0,CTLR0 Store CR0 to enable AFP OI CTLR0+1,X'04' Turn on AFP bit LCTL R0,R0,CTLR0 Reload updated CR0 * LA R10,SHORTS Point to short BFP test inputs BAS R13,FIEBR Convert short BFP to integer short BFP LA R10,RMSHORTS Point to short BFP rounding test data BAS R13,FIEBRA Convert using all rounding mode options * LA R10,LONGS Point to long BFP test inputs BAS R13,FIDBR Convert long BFP to integer long BFP LA R10,RMLONGS Point to long BFP rounding test data BAS R13,FIDBRA Convert using all rounding mode options * LA R10,EXTDS Point to extended BFP test inputs BAS R13,FIXBR Convert extd BFP to integer extd BFP LA R10,RMEXTDS Point to extended BFP rounding test data BAS R13,FIXBRA Convert using all rounding mode options * LTR R14,R14 Return address provided? BNZR R14 ..Yes, return to z/CMS test rig. LPSWE WAITPSW All done * DS 0D Ensure correct alignment for psw WAITPSW DC X'0002000000000000',AD(0) Normal end - disabled wait HARDWAIT DC X'0002000000000000',XL6'00',X'DEAD' Abnormal end * CTLR0 DS F FPCREGNT DC X'00000000' FPCR, trap all IEEE exceptions, zero flags FPCREGTR DC X'F8000000' FPCR, trap no IEEE exceptions, zero flags * * Input values parameter list, four fullwords: * 1) Count, * 2) Address of inputs, * 3) Address to place results, and * 4) Address to place DXC/Flags/cc values. * ORG BFPLDFPI+X'300' SHORTS DS 0F Inputs for short BFP testing DC A(SBFPCT/4) DC A(SBFPIN) DC A(SBFPOUT) DC A(SBFPFLGS) * LONGS DS 0F Inputs for long BFP testing DC A(LBFPCT/8) DC A(LBFPIN) DC A(LBFPOUT) DC A(LBFPFLGS) * EXTDS DS 0F Inputs for Extended BFP testing DC A(XBFPCT/16) DC A(XBFPIN) DC A(XBFPOUT) DC A(XBFPFLGS) * RMSHORTS DS 0F Inputs for short BFP rounding testing DC A(SBFPRMCT/4) DC A(SBFPINRM) DC A(SBFPRMO) DC A(SBFPRMOF) * RMLONGS DS 0F Inputs for long BFP rounding testing DC A(LBFPRMCT/8) DC A(LBFPINRM) DC A(LBFPRMO) DC A(LBFPRMOF) * RMEXTDS DS 0F Inputs for extd BFP rounding testing DC A(XBFPRMCT/16) DC A(XBFPINRM) DC A(XBFPRMO) DC A(XBFPRMOF) EJECT *********************************************************************** * * Round short BFP inputs to integer short BFP. A pair of results is * generated for each input: one with all exceptions non-trappable, and * the second with all exceptions trappable. The FPCR is stored for * each result. * *********************************************************************** SPACE 2 FIEBR DS 0H Round short BFP inputs to integer BFP LM R2,R3,0(R10) Get count and address of test input values LM R7,R8,8(R10) Get address of result area and flag area. LTR R2,R2 Any test cases? BZR R13 ..No, return to caller BASR R12,0 Set top of loop * LE FPR0,0(,R3) Get short BFP test value LFPC FPCREGNT Set exceptions non-trappable FIEBR FPR1,0,FPR0 Cvt float in FPR0 to int float in FPR1 STE FPR1,0(,R7) Store short BFP result STFPC 0(R8) Store resulting FPCR flags and DXC * LFPC FPCREGTR Set exceptions trappable LZER FPR1 Eliminate any residual results FIEBR FPR1,0,FPR0 Cvt float in FPR0 to int float in FPR1 STE FPR1,4(,R7) Store short BFP result STFPC 4(R8) Store resulting FPCR flags and DXC * LA R3,4(,R3) Point to next input value LA R7,8(,R7) Point to next rounded rusult value pair LA R8,8(,R8) Point to next FPCR result area BCTR R2,R12 Convert next input value. BR R13 All converted; return. EJECT *********************************************************************** * * Convert short BFP to integer BFP using each possible rounding mode. * Ten test results are generated for each input. A 48-byte test result * section is used to keep results sets aligned on a quad-double word. * * The first four tests use rounding modes specified in the FPCR with * the IEEE Inexact exception supressed. SRNM (2-bit) is used for * the first two FPCR-controlled tests and SRNMB (3-bit) is used for * the last two To get full coverage of that instruction pair. * * The next six results use instruction-specified rounding modes. * * The default rounding mode (0 for RNTE) is not tested in this section; * prior tests used the default rounding mode. RNTE is tested * explicitly as a rounding mode in this section. * *********************************************************************** SPACE 2 FIEBRA LM R2,R3,0(R10) Get count and address of test input values LM R7,R8,8(R10) Get address of result area and flag area. LTR R2,R2 Any test cases? BZR R13 ..No, return to caller BASR R12,0 Set top of loop * LE FPR0,0(,R3) Get short BFP test value * * Test cases using rounding mode specified in the FPCR * LFPC FPCREGNT Set exceptions non-trappable, clear flags SRNM 1 SET FPCR to RZ, towards zero. FIEBRA FPR1,0,FPR0,B'0100' FPCR ctl'd rounding, inexact masked STE FPR1,0*4(,R7) Store integer BFP result STFPC 0(R8) Store resulting FPCR flags and DXC * LFPC FPCREGNT Set exceptions non-trappable, clear flags SRNM 2 SET FPCR to RP, to +infinity FIEBRA FPR1,0,FPR0,B'0100' FPCR ctl'd rounding, inexact masked STE FPR1,1*4(,R7) Store integer BFP result STFPC 1*4(R8) Store resulting FPCR flags and DXC * LFPC FPCREGNT Set exceptions non-trappable, clear flags SRNMB 3 SET FPCR to RM, to -infinity FIEBRA FPR1,0,FPR0,B'0100' FPCR ctl'd rounding, inexact masked STE FPR1,2*4(,R7) Store integer BFP result STFPC 2*4(R8) Store resulting FPCR flags and DXC * LFPC FPCREGNT Set exceptions non-trappable, clear flags SRNMB 7 RPS, Prepare for Shorter Precision FIEBRA FPR1,0,FPR0,B'0100' FPCR ctl'd rounding, inexact masked STE FPR1,3*4(,R7) Store integer BFP result STFPC 3*4(R8) Store resulting FPCR flags and DXC * * Test cases using rounding mode specified in the instruction M3 field * LFPC FPCREGNT Set exceptions non-trappable, clear flags FIEBRA FPR1,1,FPR0,B'0000' RNTA, to nearest, ties away STE FPR1,4*4(,R7) Store integer BFP result STFPC 4*4(R8) Store resulting FPCR flags and DXC * LFPC FPCREGNT Set exceptions non-trappable, clear flags FIEBRA FPR1,3,FPR0,B'0000' RFS, prepare for shorter precision STE FPR1,5*4(,R7) Store integer BFP result STFPC 5*4(R8) Store resulting FPCR flags and DXC * LFPC FPCREGNT Set exceptions non-trappable, clear flags FIEBRA FPR1,4,FPR0,B'0000' RNTE, to nearest, ties to even STE FPR1,6*4(,R7) Store integer BFP result STFPC 6*4(R8) Store resulting FPCR flags and DXC * LFPC FPCREGNT Set exceptions non-trappable, clear flags FIEBRA FPR1,5,FPR0,B'0000' RZ, toward zero STE FPR1,7*4(,R7) Store integer BFP result STFPC 7*4(R8) Store resulting FPCR flags and DXC * LFPC FPCREGNT Set exceptions non-trappable, clear flags FIEBRA FPR1,6,FPR0,B'0000' RP, to +inf STE FPR1,8*4(,R7) Store integer BFP result STFPC 8*4(R8) Store resulting FPCR flags and DXC * LFPC FPCREGNT Set exceptions non-trappable, clear flags FIEBRA FPR1,7,FPR0,B'0000' RM, to -inf STE FPR1,9*4(,R7) Store integer BFP result STFPC 9*4(R8) Store resulting FPCR flags and DXC * LA R3,4(,R3) Point to next input values LA R7,12*4(,R7) Point to next short BFP converted values LA R8,12*4(,R8) Point to next FPCR/CC result area BCTR R2,R12 Convert next input value. BR R13 All converted; return. EJECT *********************************************************************** * * Round long BFP inputs to integer long BFP. A pair of results is * generated for each input: one with all exceptions non-trappable, and * the second with all exceptions trappable. The FPCR is stored for * each result. * *********************************************************************** SPACE 2 FIDBR LM R2,R3,0(R10) Get count and address of test input values LM R7,R8,8(R10) Get address of result area and flag area. LTR R2,R2 Any test cases? BZR R13 ..No, return to caller BASR R12,0 Set top of loop * LD FPR0,0(,R3) Get long BFP test value LFPC FPCREGNT Set exceptions non-trappable FIDBR FPR1,0,FPR0 Cvt float in FPR0 to int float in FPR1 STD R1,0(,R7) Store long BFP result STFPC 0(R8) Store resulting FPCR flags and DXC * LFPC FPCREGTR Set exceptions trappable LZDR FPR1 Eliminate any residual results FIDBR FPR1,0,FPR0 Cvt float in FPR0 to int float in FPR1 STD FPR1,8(,R7) Store int-32 result STFPC 4(R8) Store resulting FPCR flags and DXC * LA R3,8(,R3) Point to next input value LA R7,16(,R7) Point to next rounded long BFP result pair LA R8,8(,R8) Point to next FPCR result area BCTR R2,R12 Convert next input value. BR R13 All converted; return. EJECT *********************************************************************** * * Convert long BFP to integers using each possible rounding mode. * Ten test results are generated for each input. A 48-byte test result * section is used to keep results sets aligned on a quad-double word. * * The first four tests use rounding modes specified in the FPCR with * the IEEE Inexact exception supressed. SRNM (2-bit) is used for * the first two FPCR-controlled tests and SRNMB (3-bit) is used for * the last two To get full coverage of that instruction pair. * * The next six results use instruction-specified rounding modes. * * The default rounding mode (0 for RNTE) is not tested in this section; * prior tests used the default rounding mode. RNTE is tested * explicitly as a rounding mode in this section. * *********************************************************************** SPACE 2 FIDBRA LM R2,R3,0(R10) Get count and address of test input values LM R7,R8,8(R10) Get address of result area and flag area. LTR R2,R2 Any test cases? BZR R13 ..No, return to caller BASR R12,0 Set top of loop * LD FPR0,0(,R3) Get long BFP test value * * Test cases using rounding mode specified in the FPCR * LFPC FPCREGNT Set exceptions non-trappable, clear flags SRNM 1 SET FPCR to RZ, towards zero. FIDBRA FPR1,0,FPR0,B'0100' FPCR ctl'd rounding, inexact masked STD FPR1,0*8(,R7) Store integer BFP result STFPC 0(R8) Store resulting FPCR flags and DXC * LFPC FPCREGNT Set exceptions non-trappable, clear flags SRNM 2 SET FPCR to RP, to +infinity FIDBRA FPR1,0,FPR0,B'0100' FPCR ctl'd rounding, inexact masked STD FPR1,1*8(,R7) Store integer BFP result STFPC 1*4(R8) Store resulting FPCR flags and DXC * LFPC FPCREGNT Set exceptions non-trappable, clear flags SRNMB 3 SET FPCR to RM, to -infinity FIDBRA FPR1,0,FPR0,B'0100' FPCR ctl'd rounding, inexact masked STD FPR1,2*8(,R7) Store integer BFP result STFPC 2*4(R8) Store resulting FPCR flags and DXC * LFPC FPCREGNT Set exceptions non-trappable, clear flags SRNMB 7 RPS, Prepare for Shorter Precision FIDBRA FPR1,0,FPR0,B'0100' FPCR ctl'd rounding, inexact masked STD FPR1,3*8(,R7) Store integer BFP result STFPC 3*4(R8) Store resulting FPCR flags and DXC * * Test cases using rounding mode specified in the instruction M3 field * LFPC FPCREGNT Set exceptions non-trappable, clear flags FIDBRA FPR1,1,FPR0,B'0000' RNTA, to nearest, ties away STD FPR1,4*8(,R7) Store integer BFP result STFPC 4*4(R8) Store resulting FPCR flags and DXC * LFPC FPCREGNT Set exceptions non-trappable, clear flags FIDBRA FPR1,3,FPR0,B'0000' RFS, prepare for shorter precision STD FPR1,5*8(,R7) Store integer BFP result STFPC 5*4(R8) Store resulting FPCR flags and DXC * LFPC FPCREGNT Set exceptions non-trappable, clear flags FIDBRA FPR1,4,FPR0,B'0000' RNTE, to nearest, ties to even STD FPR1,6*8(,R7) Store integer BFP result STFPC 6*4(R8) Store resulting FPCR flags and DXC * LFPC FPCREGNT Set exceptions non-trappable, clear flags FIDBRA FPR1,5,FPR0,B'0000' RZ, toward zero STD FPR1,7*8(,R7) Store integer BFP result STFPC 7*4(R8) Store resulting FPCR flags and DXC * LFPC FPCREGNT Set exceptions non-trappable, clear flags FIDBRA FPR1,6,FPR0,B'0000' RP, to +inf STD FPR1,8*8(,R7) Store integer BFP result STFPC 8*4(R8) Store resulting FPCR flags and DXC * LFPC FPCREGNT Set exceptions non-trappable, clear flags FIDBRA FPR1,7,FPR0,B'0000' RM, to -inf STD FPR1,9*8(,R7) Store integer BFP result STFPC 9*4(R8) Store resulting FPCR flags and DXC * LA R3,8(,R3) Point to next input values LA R7,10*8(,R7) Point to next long BFP converted values LA R8,12*4(,R8) Point to next FPCR/CC result area BCTR R2,R12 Convert next input value. BR R13 All converted; return. EJECT *********************************************************************** * * Round extended BFP to integer extended BFP. A pair of results is * generated for each input: one with all exceptions non-trappable, and * the second with all exceptions trappable. The FPCR is stored for * each result. * *********************************************************************** SPACE 2 FIXBR LM R2,R3,0(R10) Get count and address of test input values LM R7,R8,8(R10) Get address of result area and flag area. LTR R2,R2 Any test cases? BZR R13 ..No, return to caller BASR R12,0 Set top of loop * LD FPR0,0(,R3) Get extended BFP test value part 1 LD FPR2,8(,R3) Get extended BFP test value part 2 LFPC FPCREGNT Set exceptions non-trappable FIXBR FPR1,0,FPR0 Cvt FPR0-FPR2 to int float in FPR1-FPR3 STD FPR1,0(,R7) Store integer BFP result part 1 STD FPR3,8(,R7) Store integer BFP result part 2 STFPC 0(R8) Store resulting FPCR flags and DXC * LFPC FPCREGTR Set exceptions trappable LZXR FPR1 Eliminate any residual results FIXBR FPR1,0,FPR0 Cvt FPR0-FPR2 to int float in FPR1-FPR3 STD FPR1,16(,R7) Store integer BFP result part 1 STD FPR3,24(,R7) Store integer BFP result part 2 STFPC 4(R8) Store resulting FPCR flags and DXC * LA R3,16(,R3) Point to next extended BFP input value LA R7,32(,R7) Point to next extd BFP rounded result pair LA R8,8(,R8) Point to next FPCR/CC result area BCTR R2,R12 Convert next input value. BR R13 All converted; return. EJECT *********************************************************************** * * Convert extended BFP to integers using each possible rounding mode. * Ten test results are generated for each input. A 48-byte test result * section is used to keep results sets aligned on a quad-double word. * * The first four tests use rounding modes specified in the FPCR with * the IEEE Inexact exception supressed. SRNM (2-bit) is used for * the first two FPCR-controlled tests and SRNMB (3-bit) is used for * the last two To get full coverage of that instruction pair. * * The next six results use instruction-specified rounding modes. * * The default rounding mode (0 for RNTE) is not tested in this section; * prior tests used the default rounding mode. RNTE is tested * explicitly as a rounding mode in this section. * *********************************************************************** SPACE 2 FIXBRA LM R2,R3,0(R10) Get count and address of test input values LM R7,R8,8(R10) Get address of result area and flag area. LTR R2,R2 Any test cases? BZR R13 ..No, return to caller BASR R12,0 Set top of loop * LD FPR0,0(,R3) Get extended BFP test value part 1 LD FPR2,8(,R3) Get extended BFP test value part 2 * * Test cases using rounding mode specified in the FPCR * LFPC FPCREGNT Set exceptions non-trappable, clear flags SRNM 1 SET FPCR to RZ, towards zero. FIXBRA FPR1,0,FPR0,B'0100' FPCR ctl'd rounding, inexact masked STD FPR1,0*16(,R7) Store integer BFP result part 1 STD FPR3,(0*16)+8(,R7) Store integer BFP result part 2 STFPC 0(R8) Store resulting FPCR flags and DXC * LFPC FPCREGNT Set exceptions non-trappable, clear flags SRNM 2 SET FPCR to RP, to +infinity FIXBRA FPR1,0,FPR0,B'0100' FPCR ctl'd rounding, inexact masked STD FPR1,1*16(,R7) Store integer BFP result part 1 STD FPR3,(1*16)+8(,R7) Store integer BFP result part 2 STFPC 1*4(R8) Store resulting FPCR flags and DXC * LFPC FPCREGNT Set exceptions non-trappable, clear flags SRNMB 3 SET FPCR to RM, to -infinity FIXBRA FPR1,0,FPR0,B'0100' FPCR ctl'd rounding, inexact masked STD FPR1,2*16(,R7) Store integer BFP result part 1 STD FPR3,(2*16)+8(,R7) Store integer BFP result part 2 STFPC 2*4(R8) Store resulting FPCR flags and DXC * LFPC FPCREGNT Set exceptions non-trappable, clear flags SRNMB 7 RFS, Prepare for Shorter Precision FIXBRA FPR1,0,FPR0,B'0100' FPCR ctl'd rounding, inexact masked STD FPR1,3*16(,R7) Store integer BFP result part 1 STD FPR3,(3*16)+8(,R7) Store integer BFP result part 2 STFPC 3*4(R8) Store resulting FPCR flags and DXC * * Test cases using rounding mode specified in the instruction M3 field * LFPC FPCREGNT Set exceptions non-trappable, clear flags FIXBRA FPR1,1,FPR0,B'0000' RNTA, to nearest, ties away STD FPR1,4*16(,R7) Store integer BFP result part 1 STD FPR3,(4*16)+8(,R7) Store integer BFP result part 2 STFPC 4*4(R8) Store resulting FPCR flags and DXC * LFPC FPCREGNT Set exceptions non-trappable, clear flags FIXBRA FPR1,3,FPR0,B'0000' RFS, prepare for shorter precision STD FPR1,5*16(,R7) Store integer BFP result part 1 STD FPR3,(5*16)+8(,R7) Store integer BFP result part 2 STFPC 5*4(R8) Store resulting FPCR flags and DXC * LFPC FPCREGNT Set exceptions non-trappable, clear flags FIXBRA FPR1,4,FPR0,B'0000' RNTE, to nearest, ties to even STD FPR1,6*16(,R7) Store integer BFP result part 1 STD FPR3,(6*16)+8(,R7) Store integer BFP result part 2 STFPC 6*4(R8) Store resulting FPCR flags and DXC * LFPC FPCREGNT Set exceptions non-trappable, clear flags FIXBRA FPR1,5,FPR0,B'0000' RZ, toward zero STD FPR1,7*16(,R7) Store integer BFP result part 1 STD FPR3,(7*16)+8(,R7) Store integer BFP result part 2 STFPC 7*4(R8) Store resulting FPCR flags and DXC * LFPC FPCREGNT Set exceptions non-trappable, clear flags FIXBRA FPR1,6,FPR0,B'0000' RP, to +inf STD FPR1,8*16(,R7) Store integer BFP result part 1 STD FPR3,(8*16)+8(,R7) Store integer BFP result part 2 STFPC 8*4(R8) Store resulting FPCR flags and DXC * LFPC FPCREGNT Set exceptions non-trappable, clear flags FIXBRA FPR1,7,FPR0,B'0000' RM, to -inf STD FPR1,9*16(,R7) Store integer BFP result part 1 STD FPR3,(9*16)+8(,R7) Store integer BFP result part 2 STFPC 9*4(R8) Store resulting FPCR flags and DXC * LA R3,16(,R3) Point to next input value LA R7,10*16(,R7) Point to next long BFP converted values LA R8,12*4(,R8) Point to next FPCR/CC result area BCTR R2,R12 Convert next input value. BR R13 All converted; return. EJECT *********************************************************************** * * Short integer inputs for Load FP Integer testing. The same * values are used for short, long, and extended formats. * *********************************************************************** SPACE 2 SBFPIN DS 0F Inputs for short BFP testing DC X'3F800000' +1.0 Exact DC X'BFC00000' -1.5 Inexact, incremented DC X'40200000' +2.5 Inexact only DC X'7F810000' SNaN DC X'7FC10000' QNaN DC X'3F400000' +.75 Inexact, incremented DC X'BE800000' -.25 Inexact SBFPCT EQU *-SBFPIN Count of short BFP in list * 4 * SBFPINRM DS 0F Inputs for short BFP rounding testing DC X'C1180000' -9.5 DC X'C0B00000' -5.5 DC X'C0200000' -2.5 DC X'BFC00000' -1.5 DC X'BF000000' -0.5 DC X'3F000000' +0.5 DC X'3FC00000' +1.5 DC X'40200000' +2.5 DC X'40B00000' +5.5 DC X'41180000' +9.5 DC X'3F400000' +.75 DC X'BE800000' -.25 SBFPRMCT EQU *-SBFPINRM Count of short BFP rounding tests * 4 * LBFPIN DS 0F Inputs for long BFP testing DC X'3FF0000000000000' +1.0 DC X'BFF8000000000000' -1.5 DC X'4004000000000000' +2.5 DC X'7FF0100000000000' SNaN DC X'7FF8100000000000' QNaN DC X'3FE8000000000000' +.75 DC X'BFD0000000000000' -.25 LBFPCT EQU *-LBFPIN Count of long BFP in list * 8 * LBFPINRM DS 0F DC X'C023000000000000' -9.5 DC X'C016000000000000' -5.5 DC X'C004000000000000' -2.5 DC X'BFF8000000000000' -1.5 DC X'BFE0000000000000' -0.5 DC X'3FE0000000000000' +0.5 DC X'3FF8000000000000' +1.5 DC X'4004000000000000' +2.5 DC X'4016000000000000' +5.5 DC X'4023000000000000' +9.5 DC X'3FE8000000000000' +.75 DC X'BFD0000000000000' -.25 LBFPRMCT EQU *-LBFPINRM Count of long BFP rounding tests * 8 * XBFPIN DS 0D Inputs for long BFP testing DC X'3FFF0000000000000000000000000000' +1.0 DC X'BFFF8000000000000000000000000000' -1.5 DC X'40004000000000000000000000000000' +2.5 DC X'7FFF0100000000000000000000000000' SNaN DC X'7FFF8100000000000000000000000000' QNaN DC X'3FFE8000000000000000000000000000' +0.75 DC X'BFFD0000000000000000000000000000' -0.25 XBFPCT EQU *-XBFPIN Count of extended BFP in list * 16 * XBFPINRM DS 0D DC X'C0023000000000000000000000000000' -9.5 DC X'C0016000000000000000000000000000' -5.5 DC X'C0004000000000000000000000000000' -2.5 DC X'BFFF8000000000000000000000000000' -1.5 DC X'BFFE0000000000000000000000000000' -0.5 DC X'3FFE0000000000000000000000000000' +0.5 DC X'3FFF8000000000000000000000000000' +1.5 DC X'40004000000000000000000000000000' +2.5 DC X'40016000000000000000000000000000' +5.5 DC X'40023000000000000000000000000000' +9.5 DC X'3FFE8000000000000000000000000000' +0.75 DC X'BFFD0000000000000000000000000000' -0.25 XBFPRMCT EQU *-XBFPINRM Count of extended BFP rounding tests * 16 * * Locations for results * SBFPOUT EQU BFPLDFPI+X'1000' Integer short BFP rounded results * ..7 used, room for 16 SBFPFLGS EQU BFPLDFPI+X'1080' FPCR flags and DXC from short BFP * ..7 used, room for 16 SBFPRMO EQU BFPLDFPI+X'1100' Short BFP rounding mode test results * ..12 used, room for 16 SBFPRMOF EQU BFPLDFPI+X'1400' Short BFP rounding mode FPCR results * ..12 used * LBFPOUT EQU BFPLDFPI+X'2000' Integer long BFP rounded results * ..7 used, room for 16 LBFPFLGS EQU BFPLDFPI+X'2100' FPCR flags and DXC from long BFP * ..7 used, room for 32 LBFPRMO EQU BFPLDFPI+X'2200' Long BFP rounding mode test results * ..12 used, room for 16 LBFPRMOF EQU BFPLDFPI+X'2800' Long BFP rounding mode FPCR results * ..12 used * XBFPOUT EQU BFPLDFPI+X'3000' Integer extended BFP rounded results * ..7 used, room for 16 XBFPFLGS EQU BFPLDFPI+X'3200' FPCR flags and DXC from extended BFP * ..7 used, room for 32 XBFPRMO EQU BFPLDFPI+X'3300' Extd BFP rounding mode test results * ..12 used, room for 16 XBFPRMOF EQU BFPLDFPI+X'3F00' Extd BFP rounding mode FPCR results * ..12 used * * ENDLABL EQU BFPLDFPI+X'4800' * Pad CSECT if not running on ASMA for a stand-alone environment PADCSECT ENDLABL END
src/main/java/uk/nhs/digital/mait/tkwx/tk/internalservices/testautomation/parser/AutotestLexer.g4
nhsdigitalmait/TKW-x
0
2773
/* Copyright 2012-13 <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. */ lexer grammar AutotestLexer; options { language = Java; } @header { package uk.nhs.digital.mait.tkwx.tk.internalservices.testautomation.parser; } // these declarations appear in the generated parser file AutotestParser.java @parser::members { // introduced from AutotestGrammar.g4 //java.util.HashSet<String> hs = new java.util.HashSet<>(); //private boolean isDefined(String s) {if (!hs.contains(s)) {hs.add(s); return true;} else {return false;} }; } /* --------------------------------------------------------------------------------------------------- */ // Lexer token definitions COMMENT : '#' ~[\r\n]* ( ('\r'? '\n')+ | EOF ) -> channel(HIDDEN) ; // discard the comments // If we redirect spaces to HIDDEN rather than skip we can get back the whole line including spaces // by referencing $text SPACES : [ ]+ -> channel(HIDDEN); ESCAPED_QUOTE : '\\"' ; // remove the surrounding quotes and unescape escaped quotes QUOTED_STRING : '"' ( ESCAPED_QUOTE | ~["] )*? '"' { setText(getText().replaceFirst("^\"(.*)\"$", "$1").replaceAll("\\\\\"","\"")); } ; fragment BEGIN_TOKEN : 'BEGIN' ; fragment END_TOKEN : 'END' ; fragment DIGIT : [0-9] ; fragment ALPHA : [a-zA-Z] ; LPAREN : '(' ; RPAREN : ')' ; TAB : '\t' ; // not just whitespace since necessary part of property sets NL : '\r'? '\n' ; INTEGER : '-'? DIGIT+ ; DOT : '.' ; COMMA : ',' ; INCLUDE : 'INCLUDE' ; //------------------------------------------------------------------------------ // one liners SCRIPT : 'SCRIPT' ; SIMULATOR : 'SIMULATOR' ; VALIDATOR : 'VALIDATOR' ; STOP_WHEN_COMPLETE : 'STOP' SPACES 'WHEN' SPACES 'COMPLETE' ; //------------------------------------------------------------------------------ // Begin end blocks fragment MESSAGES : 'MESSAGES' ; fragment TEMPLATES : 'TEMPLATES' ; fragment SCHEDULES : 'SCHEDULES' ; fragment DATASOURCES : 'DATASOURCES' ; fragment EXTRACTORS : 'EXTRACTORS' ; TESTS : 'TESTS' ; fragment PASSFAIL : 'PASSFAIL' ; fragment PROPERTYSETS : 'PROPERTYSETS' ; fragment HTTPHEADERS : 'HTTPHEADERS' ; fragment SUBSTITUTION_TAGS : 'SUBSTITUTION_TAGS' ; BEGIN_SCHEDULES : BEGIN_TOKEN SPACES SCHEDULES ; END_SCHEDULES : END_TOKEN SPACES SCHEDULES ; BEGIN_TESTS : BEGIN_TOKEN SPACES TESTS ; END_TESTS : END_TOKEN SPACES TESTS ; BEGIN_MESSAGES : BEGIN_TOKEN SPACES MESSAGES ; END_MESSAGES : END_TOKEN SPACES MESSAGES ; BEGIN_TEMPLATES : BEGIN_TOKEN SPACES TEMPLATES ; END_TEMPLATES : END_TOKEN SPACES TEMPLATES ; BEGIN_PROPERTYSETS : BEGIN_TOKEN SPACES PROPERTYSETS ; END_PROPERTYSETS : END_TOKEN SPACES PROPERTYSETS ; BEGIN_HTTPHEADERS : BEGIN_TOKEN SPACES HTTPHEADERS ; END_HTTPHEADERS : END_TOKEN SPACES HTTPHEADERS ; BEGIN_DATASOURCES : BEGIN_TOKEN SPACES DATASOURCES ; END_DATASOURCES : END_TOKEN SPACES DATASOURCES ; BEGIN_EXTRACTORS : BEGIN_TOKEN SPACES EXTRACTORS ; END_EXTRACTORS : END_TOKEN SPACES EXTRACTORS ; BEGIN_PASSFAIL : BEGIN_TOKEN SPACES PASSFAIL ; END_PASSFAIL : END_TOKEN SPACES PASSFAIL ; BEGIN_SUBSTITUTION_TAGS : BEGIN_TOKEN SPACES SUBSTITUTION_TAGS ; END_SUBSTITUTION_TAGS : END_TOKEN SPACES SUBSTITUTION_TAGS ; //------------------------------------------------------------------------------ LOOP : 'LOOP' ; FOR : 'FOR' ; SEND_TKW : 'SEND_TKW' ; SEND_RAW : 'SEND_RAW' ; FUNCTION : 'FUNCTION' ; PROMPT : 'PROMPT' ; CHAIN : 'CHAIN' ; TXTIMESTAMPOFFSET : 'TXTIMESTAMPOFFSET' ; ASYNCTIMESTAMPOFFSET : 'ASYNCTIMESTAMPOFFSET' ; WAIT : 'WAIT' ; CORRELATIONCOUNT : 'CORRELATIONCOUNT' ; TEXT : 'TEXT' ; SYNC : 'SYNC' ; ASYNC : 'ASYNC' ; FROM : 'FROM' ; TO : 'TO' ; REPLYTO : 'REPLYTO' ; PROFILEID : 'PROFILEID' ; CORRELATOR : 'CORRELATOR' ; //------------------------------------------------------------------------------ // Property sets WITH_PROPERTYSET : 'WITH_PROPERTYSET' ; BASE : 'base' ; PLUS : '+' ; //------------------------------------------------------------------------------ // HttpHeader sets WITH_HTTPHEADERS : 'WITH_HTTPHEADERS' ; // Substitution tags LITERAL : 'Literal' ; //------------------------------------------------------------------------------ // Transforms PRETRANSFORM : 'PRETRANSFORM' ; // which transform? APPLYPRETRANSFORMTO : 'APPLYPRETRANSFORMTO' ; // where to apply? PRESUBSTITUTE : 'PRESUBSTITUTE' ; // which reg exp substitution pairs? APPLYSUBSTITUTIONTO : 'APPLYSUBSTITUTIONTO' ; // where to apply? // specific transform points DATA : 'data' ; PREBASE64 : 'prebase64' ; POSTBASE64 : 'postbase64' ; PRECOMPRESS : 'precompress' ; POSTCOMPRESS : 'postcompress' ; PREDISTRIBUTIONENVELOPE : 'predistributionenvelope' ; POSTDISTRIBUTIONENVELOPE : 'postdistributionenvelope' ; PRESOAP : 'presoap' ; POSTSOAP : 'postsoap' ; FINAL : 'final' ; //------------------------------------------------------------------------------ EXTRACTOR : 'EXTRACTOR' ; XPATHEXTRACTOR : 'xpathextractor' ; BASE64 : 'BASE64' ; COMPRESS : 'COMPRESS' ; SOAPWRAP : 'SOAPWRAP' ; DISTRIBUTIONENVELOPEWRAP : 'DISTRIBUTIONENVELOPEWRAP' ; USING : 'USING' ; SOAPACTION : 'SOAPACTION' ; MIMETYPE : 'MIMETYPE' ; AUDITIDENTITY : 'AUDITIDENTITY' ; WITH : 'WITH' ; ID : 'ID' ; NULL : 'NULL' ; // data source types FLATWRITABLETDV : 'flatwritabletdv' ; CIRCULARWRITABLETDV : 'circularwritabletdv' ; // Property set operators SET : 'SET' ; REMOVE : 'REMOVE' ; // Java Function Tests DELAY : 'delay' ; //------------------------------------------------------------------------------ // passfail checks HTTPACCEPTED : 'httpaccepted' ; HTTPOK : 'httpok' ; HTTP500 : 'http500' ; NULLRESPONSE : 'nullresponse' ; NULLREQUEST : 'nullrequest' ; SYNCHRONOUSXPATH : 'synchronousxpath' -> mode(CST_MODE) ; ASYNCHRONOUSXPATH : 'asynchronousxpath' -> mode(CST_MODE) ; SECONDRESPONSEXPATH : 'secondresponsexpath' -> mode(CST_MODE) ; ASYNCMESSAGETRACKINGIDTRACKINGIDREFSMATCH : 'asyncmessagetrackingidtrackingidrefsmatch' ; ASYNCMESSAGETRACKINGIDTRACKINGIDNOMATCH : 'asyncmessagetrackingidtrackingidnomatch' ; ASYNCMESSAGETIMESTAMPINFRASTRUCTURERESPONSETIMESTAMPMATCH : 'asyncmessagetimestampinfrastructureresponsetimestampmatch' ; ZEROCONTENTLENGTH : 'zerocontentlength' ; SECONDRESPONSESYNCTRACKINGIDSDIFFER : 'secondresponsesynctrackingidsdiffer' ; SECONDRESPONSESYNCTRACKINGIDACKBY2MATCH : 'secondresponsesynctrackingidackby2match' ; SECONDRESPONSESYNCTRACKINGIDACKBY3MATCH : 'secondresponsesynctrackingidackby3match' ; HTTPHEADERCHECK : 'httpheadercheck' ; HTTPSTATUSCHECK : 'httpstatuscheck' ; HTTPHEADERCORRELATIONCHECK : 'httpheadercorrelationcheck' ; // new logical conjunction tests at 3.13 OR : 'or' ; AND : 'and' ; NOT : 'not' ; IMPLIES : 'implies' ; // Xpath tests EXISTS : 'exists' ; DOESNOTEXIST : 'doesnotexist' ; CHECK : 'check' ; MATCHES : 'matches' ; DOESNOTMATCH : 'doesnotmatch' ; IN : 'in' ; fragment NOT_SPACE : ~[ ] ; // currently 0 .. 999 but should be 0..255 fragment OCTET : DIGIT ( DIGIT DIGIT? )? ; // allow for substitution tags in tstp files, NOT_SPACE is for contiguous trailing parts of the url TAG_URL : '__' ( 'FROM' | 'TO' ) '_' ( 'URL' | 'ENDPOINT' ) '__' NOT_SPACE* ; SUBSTITUTION_TAG : '__' [A-Z0-9_]+ '__' ; // NB the order of tokens is important here more specific come earlier otherwise text may match to a less specific token type IPV4 : OCTET DOT OCTET DOT OCTET DOT OCTET ; /* fix for redmine 2125 allow brackets in test names and redmine 2136 for colons */ IDENTIFIER : ( ALPHA | DIGIT | [_-] | LPAREN | RPAREN | ':' )+ ; DOT_SEPARATED_IDENTIFIER : IDENTIFIER ( DOT IDENTIFIER )* ; fragment PROTOCOL : 'http' | 'https' | 'spine' ; URL : PROTOCOL '://' EXTENDED_IDENTIFIER + ; /* Generally a file path but used elsewhere handles optional dos volume prefix */ PATH : (ALPHA ':')? EXTENDED_IDENTIFIER+ ; // adds unix file path separator and period and ? for get url queries and $ for fhir urls // its doubtful if | should be allowed as a valid url character but NRLS seem to be using them as is // For other dubious characters the url can now be surrounded by double quotes // apparently + is a valid character interpretetd as space but adding this breaks + separated strings eg for transforms:w fragment EXTENDED_IDENTIFIER : IDENTIFIER | DOT | [/] | '?' | '$' | '%' | ':' | '-' | '=' | '&' | '|' | ',' ; //------------------------------------------------------------------------------ // This mode is analagous to the ConfigurationStringTokenizer which honours matching brackets and quotes mode CST_MODE ; SP : [ \t]+ -> channel(HIDDEN); CST : ( ( ( NOSPACESORDELIMS* ( '(' CSTORSPACE ')' | '[' CSTORSPACE ']' | '\'' ~[\']* '\'' | '"' ~["]* '"' ) + NOSPACESORDELIMS* ) + | NOSPACESORDELIMS+ ) ) -> mode(DEFAULT_MODE); // unlike the other two lexers this is a "one shot" and returns to default mode after one token fragment CSTORSPACE : ( CST | ' ' | '\\' )* ; // Bodge to trap \ fragment NOSPACESORDELIMS : ~[\[\"'(\]) \t\r\n] | '\\' ; // Bodge to trap \ LF : ('\r' | '\n')+ -> channel(HIDDEN), mode(DEFAULT_MODE) ; //------------------------------------------------------------------------------
hiress2_lsysteem.asm
visy/c64demo2017
0
9035
<gh_stars>0 // // Switch bank in VIC-II // // Args: // bank: bank number to switch to. Valid values: 0-3. // .macro SwitchVICBank(bank) { // // The VIC-II chip can only access 16K bytes at a time. In order to // have it access all of the 64K available, we have to tell it to look // at one of four banks. // // This is controller by bits 0 and 1 in $dd00 (PORT A of CIA #2). // // +------+-------+----------+-------------------------------------+ // | BITS | BANK | STARTING | VIC-II CHIP RANGE | // | | | LOCATION | | // +------+-------+----------+-------------------------------------+ // | 00 | 3 | 49152 | ($C000-$FFFF)* | // | 01 | 2 | 32768 | ($8000-$BFFF) | // | 10 | 1 | 16384 | ($4000-$7FFF)* | // | 11 | 0 | 0 | ($0000-$3FFF) (DEFAULT VALUE) | // +------+-------+----------+-------------------------------------+ .var bits=%11 .if (bank==0) .eval bits=%11 .if (bank==1) .eval bits=%10 .if (bank==2) .eval bits=%01 .if (bank==3) .eval bits=%00 .print "bits=%" + toBinaryString(bits) // // Set Data Direction for CIA #2, Port A to output // lda $dd02 and #%11111100 // Mask the bits we're interested in. ora #$03 // Set bits 0 and 1. sta $dd02 // // Tell VIC-II to switch to bank // lda $dd00 and #%11111100 ora #bits sta $dd00 } // // Enter hires bitmap mode (a.k.a. standard bitmap mode) // .macro SetHiresBitmapMode() { // // Clear extended color mode (bit 6) and set bitmap mode (bit 5) // lda $d011 and #%10111111 ora #%00100000 sta $d011 // // Clear multi color mode (bit 4) // lda $d016 and #%11101111 sta $d016 } .macro ResetStandardBitMapMode() { lda $d011 and #%11011111 sta $d011 } // // Set location of bitmap. // // Args: // address: Address relative to VIC-II bank address. // Valid values: $0000 (bitmap at $0000-$1FFF) // $2000 (bitmap at $2000-$3FFF) // .macro SetBitmapAddress(address) { // // In standard bitmap mode the location of the bitmap area can // be set to either BANK address + $0000 or BANK address + $2000 // // By setting bit 3, we can configure which of the locations to use. // .var bits=0 lda $d018 .if (address == $0000) { and #%11110111 } .if (address == $2000) { ora #%00001000 } sta $d018 } .macro FillBitmap(addr, value) { ldx #$00 lda #value !loop: sta addr,x sta (addr + $100),x sta (addr + $200),x sta (addr + $300),x sta (addr + $400),x sta (addr + $500),x sta (addr + $600),x sta (addr + $700),x sta (addr + $800),x sta (addr + $900),x sta (addr + $a00),x sta (addr + $b00),x sta (addr + $c00),x sta (addr + $d00),x sta (addr + $e00),x sta (addr + $f00),x sta (addr + $1000),x sta (addr + $1100),x sta (addr + $1200),x sta (addr + $1300),x sta (addr + $1400),x sta (addr + $1500),x sta (addr + $1600),x sta (addr + $1700),x sta (addr + $1800),x sta (addr + $1900),x sta (addr + $1a00),x sta (addr + $1b00),x sta (addr + $1c00),x sta (addr + $1d00),x sta (addr + $1e00),x sta (addr + $1f00),x dex bne !loop- } // // Switch location of screen memory. // // Args: // address: Address relative to current VIC-II bank base address. // Valid values: $0000-$3c00. Must be a multiple of $0400. // .macro SetScreenMemory(address) { // // The most significant nibble of $D018 selects where the screen is // located in the current VIC-II bank. // // +------------+-----------------------------+ // | | LOCATION* | // | BITS +---------+-------------------+ // | | DECIMAL | HEX | // +------------+---------+-------------------+ // | 0000XXXX | 0 | $0000 | // | 0001XXXX | 1024 | $0400 (DEFAULT) | // | 0010XXXX | 2048 | $0800 | // | 0011XXXX | 3072 | $0C00 | // | 0100XXXX | 4096 | $1000 | // | 0101XXXX | 5120 | $1400 | // | 0110XXXX | 6144 | $1800 | // | 0111XXXX | 7168 | $1C00 | // | 1000XXXX | 8192 | $2000 | // | 1001XXXX | 9216 | $2400 | // | 1010XXXX | 10240 | $2800 | // | 1011XXXX | 11264 | $2C00 | // | 1100XXXX | 12288 | $3000 | // | 1101XXXX | 13312 | $3400 | // | 1110XXXX | 14336 | $3800 | // | 1111XXXX | 15360 | $3C00 | // +------------+---------+-------------------+ // .var bits = (address / $0400) << 4 lda $d018 and #%00001111 ora #bits sta $d018 } // // Fill screen memory with a value. // // Args: // address: Absolute base address of screen memory. // value: byte value to fill screen memory with // .macro FillScreenMemory(address, value) { // // Screen memory is 40 * 25 = 1000 bytes ($3E8 bytes) // ldx #$00 lda #value !loop: sta address,x sta (address + $100),x sta (address + $200),x dex bne !loop- ldx #$e8 !loop: sta (address + $2ff),x // Start one byte below the area we're clearing // That way we can bail directly when zero without an additional comparison dex bne !loop- } // // Makes program halt until space is pressed. Useful when debugging. // .macro WaitForSpace() { checkdown: lda $dc01 cmp #$ef bne checkdown checkup: lda $dc01 cmp #$ef beq checkup } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PNGtoHIRES ~~~~~~~~~~ By: TWW/CTR USAGE ~~~~~ :PNGtoHIRES("Filename.png", BitmapMemoryAddress, ScreenMemoryColors) @SIGNATURE void PNGtoHIRES (STR Filename.png ,U16 BitmapMemoryAddress, U16 ScreenMemoryColors) @AUTHOR <EMAIL> @PARAM Filename.png - Filename & path to picture file @PARAM BitmapMemoryAddress - Memorylocation for output of bmp-data @PARAM ScreenMemoryColors - Memorylocation for output of Char-data EXAMPLES ~~~~~~~~ :PNGtoHIRES("something.png", $2000, $2000+8000) NOTES ~~~~~ For now, only handles 320x200 IMPROVEMENTS ~~~~~~~~~~~~ Add variable picture sizes Handle assertions if the format is unsupported (size, color restrictions etc.) TODO ~~~~ BUGS ~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ .macro PNGtoHIRES(PNGpicture,BMPData,ColData) { .var Graphics = LoadPicture(PNGpicture) // Graphics RGB Colors. Must be adapted to the graphics .const C64Black = 000 * 65536 + 000 * 256 + 000 .const C64White = 255 * 65536 + 255 * 256 + 255 .const C64Red = 104 * 65536 + 055 * 256 + 043 .const C64Cyan = 112 * 65536 + 164 * 256 + 178 .const C64Purple = 111 * 65536 + 061 * 256 + 134 .const C64Green = 088 * 65536 + 141 * 256 + 067 .const C64Blue = 053 * 65536 + 040 * 256 + 121 .const C64Yellow = 184 * 65536 + 199 * 256 + 111 .const C64L_brown = 111 * 65536 + 079 * 256 + 037 .const C64D_brown = 067 * 65536 + 057 * 256 + 000 .const C64L_red = 154 * 65536 + 103 * 256 + 089 .const C64D_grey = 068 * 65536 + 068 * 256 + 068 .const C64Grey = 108 * 65536 + 108 * 256 + 108 .const C64L_green = 154 * 65536 + 210 * 256 + 132 .const C64L_blue = 108 * 65536 + 094 * 256 + 181 .const C64L_grey = 149 * 65536 + 149 * 256 + 149 // Add the colors neatly into a Hashtable for easy lookup reference .var ColorTable = Hashtable() .eval ColorTable.put(C64Black,0) .eval ColorTable.put(C64White,1) .eval ColorTable.put(C64Red,2) .eval ColorTable.put(C64Cyan,3) .eval ColorTable.put(C64Purple,4) .eval ColorTable.put(C64Green,5) .eval ColorTable.put(C64Blue,6) .eval ColorTable.put(C64Yellow,7) .eval ColorTable.put(C64L_brown,8) .eval ColorTable.put(C64D_brown,9) .eval ColorTable.put(C64L_red,10) .eval ColorTable.put(C64D_grey,11) .eval ColorTable.put(C64Grey,12) .eval ColorTable.put(C64L_green,13) .eval ColorTable.put(C64L_blue,14) .eval ColorTable.put(C64L_grey,15) .pc = BMPData "Hires Bitmap" .var ScreenMem = List() .for (var Line = 0 ; Line < 200 ; Line = Line + 8) { .for (var Block = 0 ; Block < 320 ; Block=Block+8) { .var Coll1 = Graphics.getPixel(Block,Line) .var Coll2 = 0 .for (var j = 0 ; j < 8 ; j++ ) { .var ByteValue = 0 .for (var i = 0 ; i < 8 ; i++ ) { .if (Graphics.getPixel(Block,Line) != Graphics.getPixel(Block+i,Line+j)) .eval ByteValue = ByteValue + pow(2,7-i) .if (Graphics.getPixel(Block,Line) != Graphics.getPixel(Block+i,Line+j)) .eval Coll2 = Graphics.getPixel(Block+i,Line+j) } .byte ByteValue } .var BlockColor = [ColorTable.get(Coll2)]*16+ColorTable.get(Coll1) .eval ScreenMem.add(BlockColor) } } .pc = ColData "Hires Color Data" ScreenMemColors: .for (var i = 0 ; i < 1000 ; i++ ) { .byte ScreenMem.get(i) } } // // Stabilize the IRQ so that the handler function is called exactly when the // line scan begins. // // If an interrupt is registered when the raster reaches a line, an IRQ is // triggered on the first cycle of that line scan. This means that the code we // want to esecute at that line will not be called immediately. There's quite // a lot of housekeeping that needs to be done before we get called. // // What's worse is that it isn't deterministic how many cycles will pass from // when the raster starts at the current line untill we get the call. // // First, the CPU needs to finish its current operation. This can mean a delay // of 0 to 7 cycles, depending on what operation is currently running. // // Then we spend 7+13 cycles invoking the interrupt handler and pushing stuff to // the stack. // // So all in all we're being called between 20 and 27 cycles after the current line // scan begins. // // This macro removes that uncertainty by registering a new irq on the next line, // after that second interrupt is registered, it calls nop's until a line change // should occur. // // Now we know that the cycle type of the current op is only one cycle, so the only // uncertainty left is wether ran one extra cycle or not. We can determine that by // loading and comparing the current raster line ($d012) with itself. If they're not // equal, we switched raster line between the load and the compare -> we're ready to go. // // If they're equal, we haven't switched yet but we know we'll switch at the next cycle. // So we just wait an extra cycle in this case. // .macro StabilizeRaster() { // // Register a new irq handler for the next line. // lda #<stabilizedirq sta $fffe lda #>stabilizedirq sta $ffff inc $d012 // // ACK the current IRQ // lda #$ff sta $d019 // Save the old stack pointer so we can just restore the stack as it was // before the stabilizing got in the way. tsx // Enable interrupts and call nop's until the end of the current line // should be reached cli nop nop nop nop nop nop nop nop // Add one more nop if NTSC // Here's or second irq handler stabilizedirq: // Reset the SP so it looks like the extra irq stuff never happened txs // // Wait for line to finish. // // PAL-63 // NTSC-64 // NTSC-65 //---------//------------//----------- ldx #$08 // ldx #$08 // ldx #$09 dex // dex // dex bne *-1 // bne *-1 // bne *-1 bit $00 // nop // nop // // Check at exactly what point we go to the next line // lda $d012 cmp $d012 beq *+2 // If we haven't changed line yet, wait an extra cycle. // Here our real logic can start running. } .macro RasterInterrupt(address, line) { // // Address to jump to when raster reaches line. // Since we have the kernal banked out, we set the address // of our interrupt routine directly in $fffe-$ffff instead // of in $0314-$0315. // // If the kernal isn't banked out, it will push registers on the stack, // check if the interrupt is caused by a brk instruction, and eventually // call the interrupt function stored in the $0134-$0315 vector. // lda #<address sta $fffe // Instead of $0314 as we have no kernal rom lda #>address sta $ffff // Instead of $0315 as we have no kernal rom // // Configure line to trigger interrupt at // /* .if(line > $ff) { */ lda $d011 ora #%10000000 sta $d011 lda #>line sta $d012 /* } else { */ /* lda $d011 */ /* and #%01111111 */ /* sta $d011 */ /* */ /* lda #line */ /* sta $d012 */ /* } */ } .plugin "se.triad.kickass.CruncherPlugins" .var vic_bank=1 .var vic_base=$4000*vic_bank // A VIC-II bank indicates a 16K region .var screen_memory=$1000 + vic_base .var bitmap_address=$2000 + vic_base .var music = LoadSid("musare.sid") /* memory map: $080e - $2fff code $3000 - $4fff music $5000 - $7fff vic1 $8000 -> crunched data */ BasicUpstart2(start) start: jmp start2 ls_dir: .byte 0 ls_sx: .byte 160 ls_sy: .byte 150 ls_x: .byte 0 ls_y: .byte 0 ls_px: .byte 0 ls_py: .byte 0 ls_rule: .byte 0 ls_times: .byte 0 .macro INIT_LS() { lda ls_sx sta ls_x sta ls_px lda ls_sy sta ls_y sta ls_py } .macro FWD() { lda ls_x sta ls_px lda ls_y sta ls_py ldx ls_px ldy ls_py jsr putpixel lda ls_dir cmp #0 bne next0 ldx ls_px lda ls_py clc sbc #0 tay jsr putpixel lda ls_y clc sbc #1 sta ls_y jmp ende next0: lda ls_dir cmp #1 bne next1 lda ls_px clc adc #1 tax ldy ls_py jsr putpixel lda ls_x clc adc #2 sta ls_x jmp ende next1: lda ls_dir cmp #2 bne next2 ldx ls_px lda ls_py clc adc #1 tay jsr putpixel lda ls_y clc adc #2 sta ls_y jmp ende next2: lda ls_px clc sbc #0 tax ldy ls_py jsr putpixel lda ls_x clc sbc #1 sta ls_x ende: } .macro PUSH() { inc ls_stackp lda ls_x ldx ls_stackp sta ls_stackx,x lda ls_y ldx ls_stackp sta ls_stacky,x } .macro POP() { ldx ls_stackp lda ls_stackx,x sta ls_x ldx ls_stackp lda ls_stacky,x sta ls_y dec ls_stackp } .macro DIR_L() { dec ls_dir lda ls_dir cmp #$ff bne no_lff lda #3 sta ls_dir no_lff: } .macro DIR_R() { inc ls_dir lda ls_dir cmp #$4 bne no_rff lda #0 sta ls_dir no_rff: } // decruncher .const B2_ZP_BASE = $03 // ByteBoozer Decruncher /HCL May.2003 // B2 Decruncher December 2014 .label zp_base = B2_ZP_BASE .label bits = zp_base .label put = zp_base + 2 .macro B2_DECRUNCH(addr) { ldy #<addr ldx #>addr jsr Decrunch } .macro GetNextBit() { asl bits bne DgEnd jsr GetNewBits DgEnd: } .macro GetLen() { lda #1 GlLoop: :GetNextBit() bcc GlEnd :GetNextBit() rol bpl GlLoop GlEnd: } Decrunch: sty Get1+1 sty Get2+1 sty Get3+1 stx Get1+2 stx Get2+2 stx Get3+2 ldx #0 jsr GetNewBits sty put-1,x cpx #2 bcc *-7 lda #$80 sta bits DLoop: :GetNextBit() bcs Match Literal: // Literal run.. get length. :GetLen() sta LLen+1 ldy #0 LLoop: Get3: lda $feed,x inx bne *+5 jsr GnbInc L1: sta (put),y iny LLen: cpy #0 bne LLoop clc tya adc put sta put bcc *+4 inc put+1 iny beq DLoop // Has to continue with a match.. Match: // Match.. get length. :GetLen() sta MLen+1 // Length 255 -> EOF cmp #$ff beq End // Get num bits cmp #2 lda #0 rol :GetNextBit() rol :GetNextBit() rol tay lda Tab,y beq M8 // Get bits < 8 M_1: :GetNextBit() rol bcs M_1 bmi MShort M8: // Get byte eor #$ff tay Get2: lda $feed,x inx bne *+5 jsr GnbInc jmp Mdone MShort: ldy #$ff Mdone: //clc adc put sta MLda+1 tya adc put+1 sta MLda+2 ldy #$ff MLoop: iny MLda: lda $beef,y sta (put),y MLen: cpy #0 bne MLoop //sec tya adc put sta put bcc *+4 inc put+1 jmp DLoop End: rts GetNewBits: Get1: ldy $feed,x sty bits rol bits inx bne GnbEnd GnbInc: inc Get1+2 inc Get2+2 inc Get3+2 GnbEnd: rts Tab: // Short offsets .byte %11011111 // 3 .byte %11111011 // 6 .byte %00000000 // 8 .byte %10000000 // 10 // Long offsets .byte %11101111 // 4 .byte %11111101 // 7 .byte %10000000 // 10 .byte %11110000 // 13 start2: :INIT_LS() jsr generate_lookups sei // Turn off interrupts from the two CIA chips. // Used by the kernal to flash cursor and scan // keyboard. lda #$7f sta $dc0d //Turn off CIA 1 interrupts sta $dd0d //Turn off CIA 2 interrupts lda #<nmi_nop sta $fffa lda #>nmi_nop sta $fffb // Reading these registers we ack any pending CIA interrupts. // Otherwise, we might get a trailing interrupt after setup. // Tell VIC-II to start generating raster interrupts lda #$01 sta $d01a //Turn on raster interrupts // Bank out BASIC and KERNAL. // This causes the CPU to see RAM instead of KERNAL and // BASIC ROM at $E000-$FFFF and $A000-$BFFF respectively. // // This causes the CPU to see RAM everywhere except for // $D000-$E000, where the VIC-II, SID, CIA's etc are located. // lda #$35 sta $01 lda #<nmi_nop sta $fffa lda #>nmi_nop sta $fffb lda #$00 sta $dd0e // Stop timer A sta $dd04 // Set timer A to 0, NMI will occure immediately after start sta $dd0e lda #$81 sta $dd0d // Set timer A as source for NMI lda #$01 sta $dd0e // Start timer A -> NMI lda #0 sta $d020 sta $d021 :B2_DECRUNCH(crunch_screen1b) :B2_DECRUNCH(crunch_music) ldx #0 ldy #0 lda #music.startSong //<- Here we get the startsong and init address from the sid file jsr music.init SwitchVICBank(vic_bank) SetHiresBitmapMode() SetScreenMemory(screen_memory - vic_base) SetBitmapAddress(bitmap_address - vic_base) RasterInterrupt(mainirq, $35) cli lda #>lsysdata sta $F6 lda #<lsysdata sta $F7 loop: wait: lda #$ff cmp $d012 bne wait jmp no_switch lda frame cmp #$ff bne no_switch inc base lda base cmp #3 bne no_zero lda #0 sta base no_zero: lda $d011 eor #%00010000 sta $d011 lda base cmp #0 beq switch0 cmp #1 beq switch1 bne switch2 switch0: :B2_DECRUNCH(crunch_screen1a) jmp no_switch2 switch1: :B2_DECRUNCH(crunch_screen1b) jmp no_switch2 switch2: :B2_DECRUNCH(crunch_screen1c) jmp no_switch2 no_switch2: lda $d011 eor #%00010000 sta $d011 lda #0 sta frame no_switch: inc frame2 /* lda stro sta $F5 lda #<strox sta $F6 lda #>strox sta $F7 lda #<stroy sta $F8 lda #>stroy sta $F9 jsr do_draw jsr do_draw jsr do_draw jsr do_draw jsr do_draw */ jsr lsystem jsr lsystem jsr lsystem jsr lsystem jsr lsystem jsr lsystem jsr lsystem jsr lsystem jsr lsystem jsr lsystem jsr lsystem jsr lsystem jsr lsystem jsr lsystem jsr lsystem jsr lsystem jsr lsystem jsr lsystem jsr lsystem jsr lsystem jmp loop nybind: .byte 0 ls_stackp: .byte 1 ls_stackx: .byte 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100 ls_stacky: .byte 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100 lsystem: ldy #0 lda ($F6),y sta ls_rule lda nybind cmp #0 bne no_nyb0 lda ls_rule lsr lsr lsr lsr sta ls_rule jmp nybdone no_nyb0: lda ls_rule and #%00001111 sta ls_rule nybdone: inc nybind lda nybind cmp #2 bne no_lshi lda #0 sta nybind inc $F6 lda $F6 cmp #$0 bne no_lshi inc $F7 no_lshi: lda ls_rule cmp #0 bne no_rule0 lda #<lsysdata sta $F6 lda #>lsysdata sta $F7 inc $d020 lda #1 sta ls_stackp rts no_rule0: lda ls_rule cmp #1 bne no_rule jmp fwder no_rule: jmp no_rule1 fwder: :FWD() rts no_rule1: lda ls_rule cmp #2 bne no_rule2 :DIR_L() rts no_rule2: lda ls_rule cmp #3 bne no_rule3 :DIR_R() rts no_rule3: lda ls_rule cmp #6 bne no_rule6 :PUSH() rts no_rule6: lda ls_rule cmp #7 bne no_rule7 :POP() rts no_rule7: rts do_draw: ldy drawp lda ($F6),y sta $FA lda ($F8),y sta $FB lda $FA adc drawt tax lda $FB tay jsr putpixel lda $FA adc #1 adc drawt tax lda $FB adc #1 adc drawt tay jsr putpixel lda $FA adc #2 tax lda $FB adc #2 adc drawt tay jsr putpixel lda $FA adc #3 adc drawt tax lda $FB adc #3 tay jsr putpixel inc drawp lda drawp cmp $F5 bcc no_drawf lda #0 sta drawp inc drawt lda drawt cmp #2 bne no_drawf lda #0 sta drawt FillBitmap($6000,0) no_drawf: rts drawp: .byte 0 drawt: .byte 0 stro: .byte 134 strox: .byte 34,34,33,31,28,25,23,21,19,16,14,13,13,13,13,14,16,19,22,25,27,30,32,34,35,35,36,36,36,35,33,32,30,29,27,26,25,25,24,24,23,23,23,24,27,29,31,34,38,39,39,40,41,43,44,46,47,48,48,48,48,49,48,47,47,46,46,46,50,51,52,53,54,56,57,57,57,58,58,58,58,58,61,63,65,66,66,66,66,66,66,66,66,67,67,68,70,73,74,75,76,77,78,79,81,82,82,82,83,81,79,78,76,75,74,74,73,83,85,86,87,87,81,82,82,83,85,87,88,90,90,91,92,93 stroy: .byte 22,22,22,22,22,22,22,22,22,23,25,26,27,28,30,32,34,36,38,40,41,43,44,47,49,50,51,53,54,55,56,57,58,58,58,58,58,58,59,59,60,60,60,60,60,60,60,58,56,54,53,52,50,47,43,38,32,28,23,20,19,33,41,44,45,46,47,45,44,44,45,45,46,48,50,51,52,54,55,56,57,58,58,57,56,55,54,52,50,48,46,45,43,57,58,59,60,58,58,57,56,54,52,49,46,44,42,40,39,46,47,47,47,47,47,47,47,47,48,48,48,48,53,54,56,58,60,60,60,60,60,60,60,60 ///////////////// putpixel: lda YTABLO,y sta $FC lda YTABHI,y sta $FD ldy XTAB,x lda ($FC),y ora BITTAB,x sta ($FC),y rts generate_lookups: ldx #$00 genloop: txa and #$07 asl asl sta $FC txa lsr lsr lsr sta $FD lsr ror $FC lsr ror $FC adc $FD ora #$60 // bitmap address $6000 sta YTABHI,x lda $FC sta YTABLO,x inx cpx #200 bne genloop lda #$80 sta $FC ldx #$00 genloop2: txa and #$F8 sta XTAB,x lda $FC sta BITTAB,x lsr bcc genskip lda #$80 genskip: sta $FC inx bne genloop2 rts nmi_nop: // // This is the irq handler for the NMI. Just returns without acknowledge. // This prevents subsequent NMI's from interfering. // rti mainirq: // // Since the kernal is switced off, we need to push the // values of the registers to the stack ourselves so // that they're restored when we're done. // // If we don't do anything advanced like calling cli to let another // irq occur, we don't need to use the stack. // // In that case it's faster to: // // sta restorea+1 // stx restorex+1 // sty restorey+1 // // ... do stuff ... // // lda #$ff // sta $d019 // // restorea: lda #$00 // restorex: ldx #$00 // restorey: ldy #$00 // rti // pha txa pha tya pha // // Stabilize raster using double irq's. StabilizeRaster() inc frame lda frame // sta $d020 jsr music.play // // Reset the raster interrupt since the stabilizing registered another // function. // We can also register another irq for something further down the screen // or at next frame. // RasterInterrupt(mainirq, $35) // // Restore the interrupt condition so that we can get // another one. // lda #$ff sta $d019 //ACK interrupt so it can be called again // // Restore the values of the registers and return. // pla tay pla tax pla rti frame: .byte 0 frame2: .byte 0 base: .byte 0 YTABHI: .fill 256,0 YTABLO: .fill 200,0 BITTAB: .fill 256,0 XTAB: .fill 256,0 // crunched data .label crunch_music = * .modify B2() { .pc = music.location "Music" .fill music.size, music.getData(i) } .pc=$8000 .label crunch_screen1a = * .modify B2() { :PNGtoHIRES("test.png", bitmap_address, screen_memory) } .label crunch_screen1b = * .modify B2() { :PNGtoHIRES("test_a.png", bitmap_address, screen_memory) } .label crunch_screen1c = * .modify B2() { :PNGtoHIRES("test4.png", bitmap_address, screen_memory) } .pc=$c000 // lsystem data // each nybble = rule // 0 = end // 1 = fwd // 2 = turn left // 3 = turn right // 6 = push // 7 = pop // pseudo: // read both nybs in buffer, hi then lo // cmp and process rule // continue until 2619.5 rules parsed lsysdata: .byte 17,17,17,17,17,17,17,17,38,97,17,17,17,18,102,17,17,38,97,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,115,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,49,17,22,49,17,17,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,114,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,49,17,18,102,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,49,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,115,17,17,99,17,17,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,33,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,115,17,17,17,17,99,17,17,17,17,17,17,38,97,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,115,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,49,17,22,49,17,17,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,114,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,33,17,18,102,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,49,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,115,17,17,99,17,17,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,33,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,115,17,17,17,17,38,97,17,18,102,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,49,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,115,17,17,99,17,17,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,33,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,115,17,17,38,97,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,115,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,49,17,22,49,17,17,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,114,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,49,17,17,17,22,49,17,17,17,17,17,18,102,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,49,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,115,17,17,99,17,17,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,33,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,114,17,17,38,97,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,115,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,49,17,22,49,17,17,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,114,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,49,17,17,17,17,17,17,17,22,49,17,17,17,17,17,17,17,17,17,17,17,18,102,17,17,38,97,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,115,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,49,17,22,49,17,17,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,114,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,49,17,18,102,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,49,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,115,17,17,99,17,17,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,33,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,115,17,17,17,17,99,17,17,17,17,17,17,38,97,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,115,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,49,17,22,49,17,17,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,114,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,33,17,18,102,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,49,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,115,17,17,99,17,17,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,33,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,114,17,17,17,17,38,97,17,18,102,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,49,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,115,17,17,99,17,17,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,33,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,115,17,17,38,97,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,115,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,49,17,22,49,17,17,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,114,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,49,17,17,17,22,49,17,17,17,17,17,18,102,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,49,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,115,17,17,99,17,17,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,33,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,114,17,17,38,97,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,115,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,39,49,17,22,49,17,17,18,102,18,102,115,115,22,49,114,115,18,102,115,115,22,49,114,115,17,99,17,18,102,115,115,22,49,114,114,18,102,115,115,22,49,114,114,17,38,97,38,103,55,49,99,23,39,49,38,103,55,49,99,23,39,49,22,49,17,38,103,55,49,99,23,39,33,38,103,55,49,99,23,32 .print "vic_bank: " + toHexString(vic_bank) .print "vic_base: " + toHexString(vic_base) .print "screen_memory: " + toHexString(screen_memory) .print "bitmap_address: " + toHexString(bitmap_address)
oeis/060/A060553.asm
neoneye/loda-programs
11
10140
; A060553: a(n) is the number of distinct (modulo geometric D3-operations) patterns which can be formed by an equilateral triangular arrangement of closely packed black and white cells satisfying the local matching rule of Pascal's triangle modulo 2, where n is the number of cells in each edge of the arrangement. The matching rule is such that any elementary top-down triangle of three neighboring cells in the arrangement contains either one or three white cells. ; Submitted by <NAME> ; 2,2,4,6,10,16,32,52,104,192,376,720,1440,2800,5600,11072,22112,43968,87936,175296,350592,700160,1400192,2798336,5596672,11188992,22377984,44747776,89495040,178973696,357947392,715860992,1431721984,2863378432,5726754816,11453378560,22906757120,45813248000,91626496000,183252467712,366504927232,733008805888,1466017611776,2932033110016,5864066220032,11728128245760,23456256458752,46912504528896,93825009057792,187650001272832,375300002545664,750599971536896,1501199942942720,3002399818776576 mov $3,$0 seq $0,68010 ; Number of subsets of {1,2,3,...,n} that sum to 0 mod 3. mov $2,2 div $3,2 pow $2,$3 add $0,$2
src/examples/Rejuvenation_Workshop/src/math.adb
selroc/Renaissance-Ada
1
13767
package body Math is procedure Temp (x : Integer) is Square : constant Integer := x * x; begin pragma Unreferenced (Square); end Temp; end Math;
intro.adb
Spohn/LegendOfZelba
2
22065
with ada.text_io; use ada.text_io; package body intro is ------------------------------- -- Name: <NAME> -- <NAME> -- Game Intro Package ------------------------------- --Read in and display title page procedure title_page(file:in file_type) is char:character; begin while not end_of_file(file) loop while not end_of_line(file) loop get(file, char); put(char); end loop; if not End_Of_File (file) then Skip_Line (file); new_line; end if; end loop; new_line(2); put("Type any character to continue... "); get(char); end title_page; end intro;
FormalAnalyzer/models/apps/IlluminatedResponsetoUnexpectedVisitors.als
Mohannadcse/IoTCOM_BehavioralRuleExtractor
0
4531
module app_IlluminatedResponsetoUnexpectedVisitors open IoTBottomUp as base open cap_runIn open cap_now open cap_motionSensor open cap_switch open cap_switch open cap_switch open cap_switch one sig app_IlluminatedResponsetoUnexpectedVisitors extends IoTApp { motion : one cap_motionSensor, switch1 : one cap_switch, switch2 : one cap_switch, switch3 : one cap_switch, switch4 : one cap_switch, state : one cap_state, } { rules = r //capabilities = motion + switch1 + switch2 + switch3 + switch4 + state } one sig cap_state extends cap_runIn {} { attributes = cap_state_attr + cap_runIn_attr } abstract sig cap_state_attr extends Attribute {} one sig cap_state_attr_escalationLevel extends cap_state_attr {} { values = cap_state_attr_escalationLevel_val } abstract sig cap_state_attr_escalationLevel_val extends AttrValue {} one sig cap_state_attr_escalationLevel_val_0 extends cap_state_attr_escalationLevel_val {} one sig cap_state_attr_escalationLevel_val_1 extends cap_state_attr_escalationLevel_val {} one sig cap_state_attr_escalationLevel_val_2 extends cap_state_attr_escalationLevel_val {} one sig range_0,range_1,range_2,range_3 extends cap_state_attr_escalationLevel_val {} // application rules base class abstract sig r extends Rule {} one sig r0 extends r {}{ triggers = r0_trig conditions = r0_cond commands = r0_comm } abstract sig r0_trig extends Trigger {} one sig r0_trig0 extends r0_trig {} { capabilities = app_IlluminatedResponsetoUnexpectedVisitors.motion attribute = cap_motionSensor_attr_motion value = cap_motionSensor_attr_motion_val_active } abstract sig r0_cond extends Condition {} abstract sig r0_comm extends Command {} one sig r0_comm0 extends r0_comm {} { capability = app_IlluminatedResponsetoUnexpectedVisitors.switch1 attribute = cap_switch_attr_switch value = cap_switch_attr_switch_val_on } one sig r1 extends r {}{ triggers = r1_trig conditions = r1_cond commands = r1_comm } abstract sig r1_trig extends Trigger {} one sig r1_trig0 extends r1_trig {} { capabilities = app_IlluminatedResponsetoUnexpectedVisitors.motion attribute = cap_motionSensor_attr_motion value = cap_motionSensor_attr_motion_val_active } abstract sig r1_cond extends Condition {} abstract sig r1_comm extends Command {} one sig r1_comm0 extends r1_comm {} { capability = app_IlluminatedResponsetoUnexpectedVisitors.switch2 attribute = cap_switch_attr_switch value = cap_switch_attr_switch_val_on } one sig r2 extends r {}{ triggers = r2_trig conditions = r2_cond commands = r2_comm } abstract sig r2_trig extends Trigger {} one sig r2_trig0 extends r2_trig {} { capabilities = app_IlluminatedResponsetoUnexpectedVisitors.motion attribute = cap_motionSensor_attr_motion value = cap_motionSensor_attr_motion_val_inactive } abstract sig r2_cond extends Condition {} one sig r2_cond0 extends r2_cond {} { capabilities = app_IlluminatedResponsetoUnexpectedVisitors.state attribute = cap_state_attr_escalationLevel value = cap_state_attr_escalationLevel_val - range_0 } abstract sig r2_comm extends Command {} one sig r2_comm0 extends r2_comm {} { capability = app_IlluminatedResponsetoUnexpectedVisitors.state attribute = cap_runIn_attr_runIn value = cap_runIn_attr_runIn_val_on } one sig r3 extends r {}{ triggers = r3_trig conditions = r3_cond commands = r3_comm } abstract sig r3_trig extends Trigger {} one sig r3_trig0 extends r3_trig {} { capabilities = app_IlluminatedResponsetoUnexpectedVisitors.motion attribute = cap_motionSensor_attr_motion value = cap_motionSensor_attr_motion_val_active } abstract sig r3_cond extends Condition {} abstract sig r3_comm extends Command {} one sig r3_comm0 extends r3_comm {} { capability = app_IlluminatedResponsetoUnexpectedVisitors.switch3 attribute = cap_switch_attr_switch value = cap_switch_attr_switch_val_on } one sig r3_comm1 extends r3_comm {} { capability = app_IlluminatedResponsetoUnexpectedVisitors.switch4 attribute = cap_switch_attr_switch value = cap_switch_attr_switch_val_on } /* one sig r4 extends r {}{ triggers = r4_trig conditions = r4_cond commands = r4_comm } abstract sig r4_trig extends Trigger {} one sig r4_trig0 extends r4_trig {} { capabilities = app_IlluminatedResponsetoUnexpectedVisitors.motion attribute = cap_motionSensor_attr_motion value = cap_motionSensor_attr_motion_val_active } abstract sig r4_cond extends Condition {} one sig r4_cond0 extends r4_cond {} { capabilities = app_IlluminatedResponsetoUnexpectedVisitors.state attribute = cap_state_attr_escalationLevel value = cap_state_attr_escalationLevel_val_lt_1 } abstract sig r4_comm extends Command {} one sig r4_comm0 extends r4_comm {} { capability = app_IlluminatedResponsetoUnexpectedVisitors.state attribute = cap_escalationLevel_attr_escalationLevel value = cap_escalationLevel_attr_escalationLevel_val_not_null } */ one sig r5 extends r {}{ triggers = r5_trig conditions = r5_cond commands = r5_comm } abstract sig r5_trig extends Trigger {} one sig r5_trig0 extends r5_trig {} { capabilities = app_IlluminatedResponsetoUnexpectedVisitors.motion attribute = cap_motionSensor_attr_motion value = cap_motionSensor_attr_motion_val_active } abstract sig r5_cond extends Condition {} one sig r5_cond0 extends r5_cond {} { capabilities = app_IlluminatedResponsetoUnexpectedVisitors.state attribute = cap_state_attr_escalationLevel value = range_0 + range_1 } abstract sig r5_comm extends Command {} one sig r5_comm0 extends r5_comm {} { capability = app_IlluminatedResponsetoUnexpectedVisitors.state attribute = cap_runIn_attr_runIn value = cap_runIn_attr_runIn_val_on } one sig r6 extends r {}{ triggers = r6_trig conditions = r6_cond commands = r6_comm } abstract sig r6_trig extends Trigger {} one sig r6_trig0 extends r6_trig {} { capabilities = app_IlluminatedResponsetoUnexpectedVisitors.motion attribute = cap_motionSensor_attr_motion value = cap_motionSensor_attr_motion_val_active } abstract sig r6_cond extends Condition {} abstract sig r6_comm extends Command {} one sig r6_comm0 extends r6_comm {} { capability = app_IlluminatedResponsetoUnexpectedVisitors.switch1 attribute = cap_switch_attr_switch value = cap_switch_attr_switch_val_off } one sig r6_comm1 extends r6_comm {} { capability = app_IlluminatedResponsetoUnexpectedVisitors.switch2 attribute = cap_switch_attr_switch value = cap_switch_attr_switch_val_off } one sig r6_comm2 extends r6_comm {} { capability = app_IlluminatedResponsetoUnexpectedVisitors.switch3 attribute = cap_switch_attr_switch value = cap_switch_attr_switch_val_off } one sig r6_comm3 extends r6_comm {} { capability = app_IlluminatedResponsetoUnexpectedVisitors.switch4 attribute = cap_switch_attr_switch value = cap_switch_attr_switch_val_off } one sig r7 extends r {}{ no triggers conditions = r7_cond commands = r7_comm } abstract sig r7_cond extends Condition {} one sig r7_cond0 extends r7_cond {} { capabilities = app_IlluminatedResponsetoUnexpectedVisitors.state attribute = cap_state_attr_escalationLevel value = cap_state_attr_escalationLevel_val_2 } one sig r7_cond1 extends r7_cond {} { capabilities = app_IlluminatedResponsetoUnexpectedVisitors.state attribute = cap_runIn_attr_runIn value = cap_runIn_attr_runIn_val_on } one sig r7_cond2 extends r7_cond {} { capabilities = app_IlluminatedResponsetoUnexpectedVisitors.motion attribute = cap_motionSensor_attr_motion value = cap_motionSensor_attr_motion_val_active } one sig r7_cond3 extends r7_cond {} { capabilities = app_IlluminatedResponsetoUnexpectedVisitors.state attribute = cap_state_attr_escalationLevel value = cap_state_attr_escalationLevel_val - range_0 } abstract sig r7_comm extends Command {} one sig r7_comm0 extends r7_comm {} { capability = app_IlluminatedResponsetoUnexpectedVisitors.state attribute = cap_runIn_attr_runIn value = cap_runIn_attr_runIn_val_on }
lab/island/Island4.g4
rewriting/tom
36
6261
grammar Island4; start : (island|.)*? ; island : MATCH LBRACE (trule)* RBRACE ; trule : ID ARROW block ; block : LBRACE (island|.)*? RBRACE ; MATCH : '%match()' ; LBRACE : '{' ; RBRACE : '}' ; ARROW : '->' ; ID : [a-zA-Z] [a-zA-Z0-9]* ; WS : [ \r\t\n]+ -> skip ; ANY : . ;
programs/oeis/005/A005009.asm
neoneye/loda
22
22672
; A005009: a(n) = 7*2^n. ; 7,14,28,56,112,224,448,896,1792,3584,7168,14336,28672,57344,114688,229376,458752,917504,1835008,3670016,7340032,14680064,29360128,58720256,117440512,234881024,469762048,939524096,1879048192,3758096384,7516192768,15032385536,30064771072,60129542144,120259084288,240518168576,481036337152,962072674304,1924145348608,3848290697216,7696581394432,15393162788864,30786325577728,61572651155456,123145302310912,246290604621824,492581209243648,985162418487296,1970324836974592,3940649673949184,7881299347898368,15762598695796736,31525197391593472,63050394783186944,126100789566373888,252201579132747776,504403158265495552,1008806316530991104,2017612633061982208,4035225266123964416,8070450532247928832,16140901064495857664,32281802128991715328,64563604257983430656,129127208515966861312,258254417031933722624,516508834063867445248,1033017668127734890496,2066035336255469780992,4132070672510939561984,8264141345021879123968,16528282690043758247936,33056565380087516495872,66113130760175032991744,132226261520350065983488,264452523040700131966976,528905046081400263933952,1057810092162800527867904,2115620184325601055735808,4231240368651202111471616,8462480737302404222943232,16924961474604808445886464,33849922949209616891772928,67699845898419233783545856,135399691796838467567091712,270799383593676935134183424,541598767187353870268366848,1083197534374707740536733696,2166395068749415481073467392,4332790137498830962146934784,8665580274997661924293869568,17331160549995323848587739136,34662321099990647697175478272,69324642199981295394350956544,138649284399962590788701913088,277298568799925181577403826176,554597137599850363154807652352,1109194275199700726309615304704,2218388550399401452619230609408,4436777100798802905238461218816 mov $1,2 pow $1,$0 mul $1,7 mov $0,$1
asm/echo.asm
foxxy777/leros
40
105465
// // Just echo characters received from the UART // nop // first instruction is not executed start: in 0 // check rdrf and 2 nop // one delay slot brz start in 1 // read received character store r0 loop: in 0 // check tdre and 1 nop // one delay slot brz loop load r0 out 1 branch start