max_stars_repo_path stringlengths 4 261 | max_stars_repo_name stringlengths 6 106 | max_stars_count int64 0 38.8k | id stringlengths 1 6 | text stringlengths 7 1.05M |
|---|---|---|---|---|
src/basics/count-ascii.asm | Pentium1080Ti/x86-assembly | 0 | 24402 | ; utilises iprint and iprintLF in functions.asm
%include 'src/include/functions.asm'
SECTION .text
global _start
_start:
mov ecx, 0
nextNumber:
inc ecx
mov eax, ecx
call iprintLF
cmp ecx, 10
jne nextNumber
call quit |
src/MFORTH/answords/string.asm | malyn/MFORTH | 10 | 160177 | <reponame>malyn/MFORTH<filename>src/MFORTH/answords/string.asm
; Copyright (c) 2009-2010, <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:
;
; 1. Redistributions of source code must retain the above copyright notice
; unmodified, 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 <NAME> nor the names of the contributors
; to this software may be used to endorse or promote products derived from
; this software without specific prior written permission.
;
; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
; ======================================================================
; STRING Words
; ======================================================================
; ----------------------------------------------------------------------
; /STRING [STRING] 17.6.1.0245 "slash-string" ( c-addr1 u1 n -- c-addr2 u2 )
;
; Adjust the character string at c-addr1 by n characters. The resulting
; character string, specified by c-addr2 u2, begins at c-addr1 plus n
; characters and is u1 minus n characters long.
LINKTO(LINK_STRING,0,7,'G',"NIRTS/")
SLASHSTRING:SAVEDE
MOV D,B ; Save BC
MOV E,C ; ..in DE.
POP B ; Pop the adjustment value into BC.
POP H ; Pop the length into HL.
DSUB ; Adjust the length.
XTHL ; Swap the adjusted length with the address.
DAD B ; Adjust the address.
XTHL ; Swap the address and length again.
PUSH H ; Push the length onto the stack.
MOV B,D ; Restore BC
MOV C,E ; ..from DE.
RESTOREDE
NEXT
; ----------------------------------------------------------------------
; CMOVE [STRING] 17.6.1.0910 "c-move" ( c-addr1 c-addr2 u -- )
;
; If u is greater than zero, copy u consecutive characters from the data
; space starting at c-addr1 to that starting at c-addr2, proceeding
; character-by-character from lower addresses to higher addresses.
LINKTO(SLASHSTRING,0,5,'E',"VOMC")
CMOVE: SAVEDE
SAVEBC
POP B ; Pop u into BC.
POP D ; Pop addr2 into DE.
POP H ; Pop addr1 into HL.
_cmove1: MOV A,B ; We're done if B
ORA C ; ..and C
JZ _cmoveDONE ; ..are zero.
MOV A,M ; Copy the next byte from [HL]
STAX D ; ..to [DE]
INX H ; ..and then increment both HL
INX D ; ..and DE.
DCX B ; Decrement BC
JMP _cmove1 ; ..and continue looping.
_cmoveDONE: RESTOREBC
RESTOREDE
NEXT
; ----------------------------------------------------------------------
; CMOVE> [STRING] 17.6.1.0920 "c-move-up" ( c-addr1 c-addr2 u -- )
;
; If u is greater than zero, copy u consecutive characters from the data
; space starting at c-addr1 to that starting at c-addr2, proceeding
; character-by-character from higher addresses to lower addresses.
LINKTO(CMOVE,0,6,'>',"EVOMC")
LAST_STRING:
CMOVEUP: SAVEDE
SAVEBC
POP B ; Pop u into BC.
POP D ; Pop addr2 into DE.
POP H ; Pop addr1 into HL.
DAD B ; Add u to addr1.
XCHG ; Swap addr1 and addr2,
DAD B ; ..add u to addr2,
XCHG ; ..then swap addr2 and addr1 again.
_cmoveup1: MOV A,B ; We're done if B
ORA C ; ..and C
JZ _cmoveupDONE; ..are zero.
DCX H ; Decrement both HL
DCX D ; ..and DE.
MOV A,M ; Copy the next byte from [HL]
STAX D ; ..to [DE].
DCX B ; Decrement BC
JMP _cmoveup1 ; ..and continue looping.
_cmoveupDONE:RESTOREBC
RESTOREDE
NEXT
|
oeis/015/A015173.asm | neoneye/loda-programs | 11 | 99307 | ; A015173: Sum of (Gaussian) q-binomial coefficients for q=-9.
; Submitted by <NAME>
; 1,2,-6,148,4676,980232,-274157336,520386179408,1312327085726736,22403542811017395232,-508377595506902032430176,78115306822996588019507120448,15953583859604206839297545233032256,22062101805179626967384595821278636007552,-40551825527921355284269771239905535717776597376,504710043013641630212260699149213765026334335626663168,8349262275868541759953501696142726468284045165209095826964736,935237915919083054958373806829503077170005065721897452258443990958592
mov $1,$0
mov $0,0
add $1,1
mov $2,1
mov $3,1
lpb $1
sub $1,1
mov $4,$2
mul $2,-9
mul $4,$3
add $0,$4
sub $3,$4
add $3,$0
lpe
mov $0,$3
|
src/main/antlr/org/actorlang/antlr/gen/ActorLang.g4 | 422404/ActorLang | 3 | 6642 | <filename>src/main/antlr/org/actorlang/antlr/gen/ActorLang.g4
grammar ActorLang;
@header {
package org.actorlang.antlr.gen;
}
WS: [ \r\t\n]+ -> channel(HIDDEN);
COMMENT: '/*' .*? '*/' -> channel(HIDDEN);
fragment Digit: [0-9] ;
IntegerLiteral: Digit+ ;
StringLiteral: '"' (('\\' .) | ~'"')* '"';
True: 'true';
False: 'false';
Self: 'self';
Create: 'create';
Become: 'become';
Display: 'display';
Send: 'send';
To: 'to';
If: 'if';
Else: 'else';
For: 'for';
In: 'in';
Put: 'put';
Identifier: [a-zA-Z_][a-zA-Z0-9_]*;
LParen: '(';
RParen: ')';
LBracket: '[';
RBracket: ']';
LCurly: '{';
RCurly: '}';
Comma: ',';
Semi: ';';
Assign: '=' | '←';
Eq: '==';
Neq: '!=' | '≠';
Lower: '<';
Leq: '<=' | '≤';
Greater: '>';
Geq: '>=' | '≥';
And: '&&';
Or: '||';
Plus: '+';
Minus: '-';
Star: '*';
Slash: '/';
Percent: '%';
Not: '!' | '¬';
eqOp:
Eq
| Neq
;
compOp:
Lower
| Leq
| Greater
| Geq
;
arithOp:
Plus
| Minus
;
expr:
orExpr
| createExpr;
orExpr: andExpr (Or orExpr)?;
andExpr: eqExpr (And andExpr)?;
eqExpr: compExpr (eqOp compExpr)?;
compExpr: arithExpr (compOp arithExpr)?;
arithExpr: termExpr (arithOp arithExpr)?;
termExpr: factorExpr (Star termExpr)?;
factorExpr: moduloExpr (Slash factorExpr)?;
moduloExpr: unary (Percent unary)?;
unaryPlus: Plus atom;
unaryMinus: Minus atom;
unaryNot: Not atom;
unary:
unaryPlus
| unaryMinus
| unaryNot
| atom
;
atom:
literal
| identifier
| parenExpression
;
literal:
IntegerLiteral
| StringLiteral
| True
| False
| Self
;
identifier: Identifier;
parenExpression: LParen expr RParen;
behavior:
identifier behaviorState behaviorMessagePattern Assign
(behaviorStmt | (LCurly (behaviorStmt (Semi behaviorStmt)* Semi?)? RCurly));
behaviorState: LParen (identifier (Comma identifier)*)? RParen;
behaviorMessagePattern:
LBracket (behaviorMessagePatternItem (Comma behaviorMessagePatternItem)*)? RBracket;
behaviorMessagePatternItem:
identifier
| literal
;
behaviorStmt:
displayStmt
| becomeStmt
| sendStmt
| assignStmt
| ifStmt
| forStmt
| putStmt
;
displayStmt: Display expr;
putStmt: Put expr;
becomeStmt: Become parameterizedBehavior;
sendStmt: Send LBracket (expr (Comma expr)*)? RBracket To identifier;
assignStmt: identifier Assign expr;
ifStmt:
If LParen expr RParen
LCurly
(thenStmts+=behaviorStmt (Semi thenStmts+=behaviorStmt)* Semi?)?
RCurly
(Else
LCurly
(elseStmts+=behaviorStmt (Semi elseStmts+=behaviorStmt)* Semi?)?
RCurly)?
;
forStmt:
For LParen identifier In begin=atom '..' end=atom RParen
LCurly
(behaviorStmt (Semi behaviorStmt)* Semi?)?
RCurly
;
createExpr: Create parameterizedBehavior;
parameterizedBehavior: identifier LParen (expr (Comma expr)*)? RParen;
toplevelStmt:
behavior
| displayStmt
| sendStmt
| assignStmt
| forStmt
| putStmt
;
root: (toplevelStmt (Semi toplevelStmt)* Semi?)? EOF;
|
oeis/031/A031358.asm | neoneye/loda-programs | 11 | 82473 | <gh_stars>10-100
; A031358: Number of coincidence site lattices of index 4n+1 in lattice Z^2.
; Submitted by <NAME>
; 1,2,0,2,2,0,2,2,0,2,2,0,0,2,0,2,4,0,2,0,0,4,2,0,2,2,0,2,2,0,0,2,0,0,2,0,4,2,0,2,0,0,2,2,0,2,4,0,2,2,0,4,0,0,0,4,0,2,2,0,2,0,0,0,2,0,4,2,0,2,2,0,2,2,0,0,4,0,2,2,0,4,0,0,2,0,0,2,2,0,0,4,0,2,4,0,0,2,0,2
mul $0,4
seq $0,91379 ; a(n) = Product_{ p | n } (1 + Legendre(-1,p) ).
|
test/Succeed/Issue3673.agda | shlevy/agda | 1,989 | 12167 | <gh_stars>1000+
{-# OPTIONS --allow-unsolved-metas #-}
postulate
A : Set
data Unit : Set where
unit : Unit
F : Unit → Set
F unit = A
postulate
P : {A : Set} → A → Set
Q : ∀ {x} → F x → Set
f : ∀ {x} {y : F x} (z : Q y) → P z
variable
x : Unit
y : F x
g : (z : Q y) → P z
g z with f z
... | p = p
|
src/main/java/neal/java/antlr/Calc.g4 | sddyljsx/java | 1 | 2292 | <filename>src/main/java/neal/java/antlr/Calc.g4
grammar Calc;
prog : stat+;
stat : expr # printExpr
| ID '=' expr # assign
| 'print(' ID ')' # print
;
expr : <assoc=right> expr '^' expr # power
| expr op=(MUL|DIV) expr # MulDiv
| expr op=(ADD|SUB) expr # AddSub
| sign=(ADD|SUB)?NUMBER # number
| ID # id
| '(' expr ')' # parens
;
ID : [a-zA-Z]+;
NUMBER : [0-9]+('.'([0-9]+)?)?
| [0-9]+;
COMMENT : '/*' .*? '*/' -> skip;
LINE_COMMENT : '//' .*? '\r'? '\n' -> skip;
WS : [ \t\r\n]+ -> skip;
MUL : '*';
DIV : '/';
ADD : '+';
SUB : '-'; |
source/tasking/machine-w64-mingw32/s-nattas.adb | ytomino/drake | 33 | 2587 | <filename>source/tasking/machine-w64-mingw32/s-nattas.adb
with Ada.Unchecked_Conversion;
with System.Storage_Map;
with C.basetsd;
with C.winternl;
package body System.Native_Tasks is
use type C.char_array;
use type C.windef.DWORD;
use type C.windef.WINBOOL;
use type C.winnt.HANDLE; -- C.void_ptr
type struct_THREAD_BASIC_INFORMATION is record
ExitStatus : C.winternl.NTSTATUS;
TebBaseAddress : C.winnt.struct_TEB_ptr; -- PVOID;
ClientId : C.winternl.CLIENT_ID;
AffinityMask : C.basetsd.KAFFINITY;
Priority : C.winternl.KPRIORITY;
BasePriority : C.winternl.KPRIORITY;
end record
with Convention => C;
pragma Suppress_Initialization (struct_THREAD_BASIC_INFORMATION);
type NtQueryInformationThread_Type is access function (
ThreadHandle : C.winnt.HANDLE;
ThreadInformationClass : C.winternl.THREADINFOCLASS;
ThreadInformation : C.winnt.PVOID;
ThreadInformationLength : C.windef.ULONG;
ReturnLength : access C.windef.ULONG)
return C.winternl.NTSTATUS
with Convention => WINAPI;
NtQueryInformationThread_Name : constant C.char_array (0 .. 24) :=
"NtQueryInformationThread" & C.char'Val (0);
procedure Nop is null;
Installed_Abort_Handler : not null Abort_Handler := Nop'Access;
-- implementation of thread
procedure Create (
Handle : aliased out Handle_Type;
Parameter : Parameter_Type;
Thread_Body : Thread_Body_Type;
Error : out Boolean)
is
Id : aliased C.windef.DWORD;
begin
Handle := C.winbase.CreateThread (
lpThreadAttributes => null,
dwStackSize => 0,
lpStartAddress => Thread_Body,
lpParameter => Parameter,
dwCreationFlags => 0,
lpThreadId => Id'Access);
Error := Handle = C.winbase.INVALID_HANDLE_VALUE;
end Create;
procedure Join (
Handle : Handle_Type;
Current_Abort_Event : access Synchronous_Objects.Event;
Result : aliased out Result_Type;
Error : out Boolean)
is
Signaled : C.windef.DWORD;
begin
Error := False;
if Current_Abort_Event /= null then
declare
Handles : aliased array (0 .. 1) of aliased C.winnt.HANDLE :=
(Handle, Synchronous_Objects.Handle (Current_Abort_Event.all));
begin
Signaled :=
C.winbase.WaitForMultipleObjects (
2,
Handles (0)'Access,
0,
C.winbase.INFINITE);
if Signaled /= C.winbase.WAIT_OBJECT_0 + 1 then
goto Done;
end if;
Installed_Abort_Handler.all; -- may abort child tasks
end;
end if;
Signaled := C.winbase.WaitForSingleObject (Handle, C.winbase.INFINITE);
<<Done>>
case Signaled is
when C.winbase.WAIT_OBJECT_0 =>
if C.winbase.GetExitCodeThread (Handle, Result'Access) =
C.windef.FALSE
then
Error := True;
end if;
when others =>
Error := True;
end case;
if C.winbase.CloseHandle (Handle) = C.windef.FALSE then
Error := True;
end if;
end Join;
procedure Detach (
Handle : in out Handle_Type;
Error : out Boolean) is
begin
Error := False;
if C.winbase.CloseHandle (Handle) = C.windef.FALSE then
Error := True;
else
Handle := C.winbase.GetCurrentThread;
-- magic value meaning current thread
pragma Assert (
Handle = C.winnt.HANDLE (System'To_Address (16#fffffffe#)));
end if;
end Detach;
-- implementation of stack
function Info_Block (Handle : Handle_Type) return C.winnt.struct_TEB_ptr is
function To_NtQueryInformationThread_Type is
new Ada.Unchecked_Conversion (
C.windef.FARPROC,
NtQueryInformationThread_Type);
NtQueryInformationThread : NtQueryInformationThread_Type;
begin
NtQueryInformationThread :=
To_NtQueryInformationThread_Type (
C.winbase.GetProcAddress (
Storage_Map.NTDLL,
NtQueryInformationThread_Name (0)'Access));
if NtQueryInformationThread = null then
return null; -- ???
else
declare
TBI : aliased struct_THREAD_BASIC_INFORMATION;
ReturnLength : aliased C.windef.ULONG;
Dummy_Status : C.winternl.NTSTATUS;
begin
Dummy_Status := NtQueryInformationThread (
Handle,
C.winternl.ThreadBasicInformation,
C.windef.LPVOID (TBI'Address),
struct_THREAD_BASIC_INFORMATION'Size / Standard'Storage_Unit,
ReturnLength'Access);
return TBI.TebBaseAddress;
end;
end if;
end Info_Block;
-- implementation of signals
procedure Install_Abort_Handler (Handler : Abort_Handler) is
begin
Installed_Abort_Handler := Handler;
end Install_Abort_Handler;
procedure Uninstall_Abort_Handler is
begin
Installed_Abort_Handler := Nop'Access;
end Uninstall_Abort_Handler;
procedure Send_Abort_Signal (
Handle : Handle_Type;
Abort_Event : in out Synchronous_Objects.Event;
Error : out Boolean)
is
pragma Unreferenced (Handle);
begin
Synchronous_Objects.Set (Abort_Event);
Error := False;
end Send_Abort_Signal;
procedure Block_Abort_Signal (Abort_Event : Synchronous_Objects.Event) is
begin
-- check aborted
if Synchronous_Objects.Get (Abort_Event) then
Installed_Abort_Handler.all;
end if;
end Block_Abort_Signal;
procedure Yield is
begin
C.winbase.Sleep (0);
end Yield;
end System.Native_Tasks;
|
rgb-to-hsl.applescript | nikoladev/rgb-to-hsl | 0 | 3126 | <filename>rgb-to-hsl.applescript<gh_stars>0
-- temp to force the clipboard to have good data
set the clipboard to "asd fasdasd '#abc'and #fff some more"
-- Try to find first #123456ff, then #123456, then #fff
---- The third lookup only checks for 3 identical characters
-- `-o` ensures all matches are printed on a separate line
---- https://www.gnu.org/software/grep/manual/grep.html#index-_002d_002donly_002dmatching
-- `head -1` returns only the first result
-- There's double backslashes in command to work around its function as an escape character
set copied to do shell script "pbpaste | grep '#[a-fA-F0-9]\\{8\\}\\|#[a-fA-F0-9]\\{6\\}\\|#\\([a-fA-F0-9]\\)\\1\\{2\\}' -o | head -1"
set the clipboard to copied
display dialog copied
|
source/league/league-character_sets.ads | svn2github/matreshka | 24 | 13334 | <filename>source/league/league-character_sets.ads
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011, <NAME> <<EMAIL>> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This package provides sets of Unicode characters (code points).
------------------------------------------------------------------------------
with League.Strings;
with League.Characters;
private with Ada.Streams;
private with Ada.Finalization;
private with Matreshka.Internals.Code_Point_Sets;
package League.Character_Sets is
pragma Preelaborate;
pragma Remote_Types;
type Universal_Character_Set is tagged private;
Empty_Universal_Character_Set : constant Universal_Character_Set;
function To_Set
(Sequence : Wide_Wide_String)
return Universal_Character_Set;
-- Return set containing all characters from Sequence
function To_Set
(Sequence : League.Strings.Universal_String)
return Universal_Character_Set;
-- Return set containing all characters from Sequence
function To_Set
(Low, High : Wide_Wide_Character)
return Universal_Character_Set;
-- Return set containing all characters between Low and High
function "=" (Left, Right : Universal_Character_Set) return Boolean;
function "not"
(Right : Universal_Character_Set)
return Universal_Character_Set;
-- Return complementing set of character
function "and"
(Left, Right : Universal_Character_Set)
return Universal_Character_Set;
-- Return intersection of Left and Right
function "or"
(Left, Right : Universal_Character_Set)
return Universal_Character_Set;
-- Return union of Left and Right
function "xor"
(Left, Right : Universal_Character_Set)
return Universal_Character_Set;
function "-"
(Left, Right : Universal_Character_Set)
return Universal_Character_Set;
-- Return difference
function Has
(Set : Universal_Character_Set;
Element : Wide_Wide_Character)
return Boolean;
function Has
(Set : Universal_Character_Set;
Element : League.Characters.Universal_Character)
return Boolean;
function Is_Subset
(Elements : Universal_Character_Set;
Set : Universal_Character_Set)
return Boolean;
function "<="
(Left : Universal_Character_Set;
Right : Universal_Character_Set)
return Boolean renames Is_Subset;
function Is_Empty (Set : Universal_Character_Set) return Boolean;
private
procedure Read
(Stream : not null access Ada.Streams.Root_Stream_Type'Class;
Item : out Universal_Character_Set);
procedure Write
(Stream : not null access Ada.Streams.Root_Stream_Type'Class;
Item : Universal_Character_Set);
type Universal_Character_Set is new Ada.Finalization.Controlled with record
Data : Matreshka.Internals.Code_Point_Sets.Shared_Code_Point_Set_Access
:= Matreshka.Internals.Code_Point_Sets.Shared_Empty'Access;
end record;
for Universal_Character_Set'Read use Read;
for Universal_Character_Set'Write use Write;
overriding procedure Adjust (Self : in out Universal_Character_Set);
overriding procedure Finalize (Self : in out Universal_Character_Set);
Empty_Universal_Character_Set : constant Universal_Character_Set :=
(Ada.Finalization.Controlled with
Data => Matreshka.Internals.Code_Point_Sets.Shared_Empty'Access);
end League.Character_Sets;
|
src/ado-objects-cache.ads | My-Colaborations/ada-ado | 0 | 3558 | -----------------------------------------------------------------------
-- objects.cache -- Object cache
-- Copyright (C) 2009, 2010 <NAME>
-- Written by <NAME> (<EMAIL>)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.Finalization;
with ADO.Objects;
with Ada.Containers.Indefinite_Hashed_Sets;
-- The <b>ADO.Objects.Cache</b> holds a cache of object records.
-- The cache maintains a set of objects that were loaded for a given session.
--
-- The cache is not thread-safe. It is not intended to be shared directly.
package ADO.Objects.Cache is
type Object_Cache is limited private;
-- Insert the object in the cache.
-- The reference counter associated with the object is incremented.
procedure Insert (Cache : in out Object_Cache;
Object : in Object_Record_Access);
-- Insert the object in the cache
-- The reference counter associated with the object is incremented.
procedure Insert (Cache : in out Object_Cache;
Object : in Object_Ref'Class);
-- Check if the object is contained in the cache
function Contains (Cache : in Object_Cache;
Key : in Object_Key) return Boolean;
function Find (Cache : in Object_Cache;
Key : in Object_Key) return Object_Record_Access;
procedure Find (Cache : in Object_Cache;
Object : in out Object_Ref'Class;
Key : in Object_Key);
-- Remove the object from the cache. The reference counter associated
-- with the object is decremented.
-- Do nothing if the object is not in the cache.
procedure Remove (Cache : in out Object_Cache;
Object : in Object_Record_Access);
-- Remove the object from the cache.
-- Do nothing if the object is not in the cache.
procedure Remove (Cache : in out Object_Cache;
Object : in Object_Ref);
-- Remove the object from the cache.
-- Do nothing if the object is not in the cache.
procedure Remove (Cache : in out Object_Cache;
Object : in Object_Key);
-- Remove all object in the cache.
procedure Remove_All (Cache : in out Object_Cache);
private
use Ada.Containers;
-- The cache is a <b>Hashed_Set</b> in which the object record pointers
-- are stored. The hash and comparison methods are based on the object key
-- and object type.
function Hash (Item : Object_Record_Access) return Hash_Type;
-- Compare whether the two objects pointed to by Left and Right have the same
-- object key.
function Equivalent_Elements (Left, Right : Object_Record_Access)
return Boolean;
package Object_Set is new Indefinite_Hashed_Sets
(Element_Type => Object_Record_Access,
Hash => Hash,
Equivalent_Elements => Equivalent_Elements);
type Object_Cache is new Ada.Finalization.Limited_Controlled with record
Objects : Object_Set.Set;
end record;
-- Finalize the object cache by removing all entries
overriding
procedure Finalize (Cache : in out Object_Cache);
end ADO.Objects.Cache;
|
P6/data_P6_2/ALUTest168.asm | alxzzhou/BUAA_CO_2020 | 1 | 169157 | addiu $0,$4,26371
sllv $5,$6,$3
addu $3,$4,$3
addiu $0,$0,-8827
addiu $4,$4,14799
xor $4,$4,$3
sllv $5,$5,$3
sltiu $5,$3,13953
addu $0,$3,$3
srlv $3,$4,$3
srlv $1,$1,$3
sh $3,4($0)
lb $1,3($0)
srav $4,$4,$3
addu $6,$6,$3
sh $6,14($0)
lw $6,8($0)
srl $5,$5,20
addu $0,$3,$3
xori $0,$3,26280
sh $0,8($0)
srl $1,$5,30
addu $3,$5,$3
sllv $3,$3,$3
sltu $1,$4,$3
addu $3,$0,$3
srav $5,$3,$3
sll $4,$6,15
addiu $3,$3,-19403
and $4,$3,$3
lh $4,12($0)
srav $4,$1,$3
sltu $5,$5,$3
sw $3,8($0)
lbu $4,1($0)
sltiu $3,$6,-10759
srl $1,$5,30
sll $4,$4,14
srlv $3,$3,$3
sltiu $3,$3,799
sw $3,12($0)
lb $3,15($0)
ori $4,$3,1329
sltu $4,$3,$3
srav $3,$3,$3
sltu $3,$3,$3
addu $2,$2,$3
sw $1,16($0)
nor $1,$1,$3
slti $3,$3,381
subu $5,$5,$3
srl $5,$5,13
sw $6,0($0)
sw $4,8($0)
sh $3,12($0)
or $5,$5,$3
srl $5,$5,22
and $3,$3,$3
subu $6,$5,$3
xor $3,$3,$3
srlv $3,$3,$3
lbu $1,5($0)
addu $3,$4,$3
lw $5,16($0)
addiu $4,$4,-1675
lhu $6,0($0)
addiu $0,$4,-11760
sllv $3,$1,$3
andi $3,$3,10139
subu $3,$4,$3
sltiu $5,$5,-21073
addiu $1,$3,-989
ori $0,$4,32070
xor $0,$3,$3
xori $3,$3,2130
xori $3,$1,8153
sra $6,$0,12
sh $5,14($0)
sltiu $3,$3,17702
sll $1,$6,28
sll $4,$4,27
subu $3,$3,$3
lhu $4,6($0)
sra $4,$4,24
sw $0,4($0)
addiu $4,$3,-27187
subu $4,$4,$3
slt $4,$1,$3
addiu $4,$4,-31480
xor $1,$1,$3
sllv $3,$4,$3
andi $5,$3,41727
addu $5,$1,$3
addiu $3,$1,23573
or $4,$6,$3
slti $4,$5,-8243
addiu $4,$5,24440
sw $3,0($0)
subu $4,$2,$3
ori $5,$6,1086
lb $4,2($0)
and $4,$4,$3
sh $4,10($0)
sll $0,$3,4
lb $6,0($0)
sllv $5,$2,$3
addu $3,$3,$3
andi $4,$5,3954
andi $3,$3,12662
slti $6,$5,11451
lhu $6,4($0)
xori $4,$3,61089
sll $4,$1,9
sltu $0,$3,$3
lw $3,4($0)
or $1,$4,$3
sll $6,$3,14
srlv $3,$3,$3
sllv $3,$4,$3
sll $3,$2,20
sll $3,$3,11
srl $0,$4,4
sll $5,$4,2
or $4,$2,$3
srav $4,$0,$3
addu $4,$4,$3
sw $1,0($0)
lbu $4,14($0)
sra $3,$1,30
lw $1,16($0)
slt $4,$0,$3
sb $4,14($0)
subu $4,$4,$3
sw $3,4($0)
xori $4,$4,17414
lh $0,10($0)
addu $1,$6,$3
andi $5,$4,4206
sllv $3,$5,$3
lb $4,12($0)
sra $5,$1,22
lb $3,13($0)
and $4,$4,$3
addiu $3,$3,10316
or $0,$5,$3
andi $5,$3,22886
sra $1,$3,2
sltiu $4,$4,16673
addu $3,$3,$3
addu $5,$3,$3
lbu $3,15($0)
addu $3,$5,$3
slti $4,$0,29340
addiu $1,$3,21229
ori $3,$3,26940
srlv $5,$3,$3
addiu $0,$0,19175
srav $5,$0,$3
sllv $3,$3,$3
xori $4,$4,5880
xori $5,$5,2882
sltiu $0,$6,-27288
sra $4,$3,15
sll $5,$3,3
addu $3,$3,$3
slti $6,$3,5260
slt $4,$3,$3
subu $3,$4,$3
subu $1,$1,$3
nor $3,$1,$3
lb $1,9($0)
sltiu $1,$5,29117
subu $3,$3,$3
slti $3,$3,-15523
addu $3,$2,$3
slti $1,$0,-1618
or $4,$6,$3
nor $5,$4,$3
sll $3,$0,15
subu $5,$3,$3
lbu $3,10($0)
srlv $4,$4,$3
xor $3,$3,$3
lh $3,8($0)
andi $1,$1,8202
slt $4,$6,$3
xor $4,$6,$3
subu $3,$3,$3
addu $1,$2,$3
addiu $5,$4,16576
and $5,$3,$3
addu $1,$6,$3
srl $5,$5,28
slt $3,$3,$3
nor $4,$6,$3
sw $4,8($0)
slti $0,$1,23530
sll $3,$2,5
addiu $0,$0,-23626
addiu $5,$4,20906
ori $3,$1,51869
sllv $5,$3,$3
sltiu $3,$3,-16381
lb $1,12($0)
lhu $3,8($0)
addiu $3,$5,10872
or $5,$6,$3
slt $0,$0,$3
addiu $3,$3,-18873
subu $0,$3,$3
sh $5,16($0)
slti $3,$3,10554
sll $4,$6,0
andi $1,$3,43318
nor $0,$0,$3
sll $3,$4,12
lb $3,13($0)
addiu $6,$6,-16873
lb $3,2($0)
sltu $5,$4,$3
sllv $5,$1,$3
xor $6,$5,$3
lhu $1,16($0)
ori $0,$5,37088
lh $3,0($0)
sh $4,4($0)
sh $1,10($0)
addiu $6,$3,-26752
lh $4,2($0)
ori $3,$6,7972
sll $6,$3,0
srlv $1,$5,$3
nor $0,$5,$3
lb $0,14($0)
srav $5,$3,$3
addiu $6,$6,28108
xori $5,$4,63779
sllv $1,$3,$3
sll $3,$1,28
addu $4,$3,$3
subu $3,$5,$3
andi $3,$4,59535
addu $4,$3,$3
sh $0,12($0)
srav $3,$1,$3
sra $3,$3,2
srav $3,$2,$3
srav $3,$1,$3
sltiu $6,$5,6636
addu $0,$6,$3
srav $1,$3,$3
lb $3,3($0)
sltiu $3,$3,-14731
subu $5,$5,$3
sltu $4,$4,$3
subu $4,$6,$3
nor $4,$4,$3
sll $4,$3,22
addiu $5,$5,4848
ori $1,$6,64046
sllv $5,$3,$3
sh $4,0($0)
sll $1,$3,3
lb $3,9($0)
addu $3,$5,$3
xor $3,$4,$3
lw $4,12($0)
sltu $0,$5,$3
sh $3,4($0)
lh $3,2($0)
slti $1,$0,12250
sltiu $0,$4,-13463
addu $1,$1,$3
lh $4,6($0)
srl $4,$4,14
lb $4,6($0)
addu $0,$6,$3
sltu $6,$5,$3
subu $4,$3,$3
lhu $3,0($0)
ori $6,$3,46890
addiu $5,$6,1817
subu $3,$1,$3
srav $0,$3,$3
ori $1,$4,43778
sllv $0,$3,$3
sllv $1,$2,$3
xor $4,$3,$3
sll $3,$6,30
addiu $0,$1,-29089
slti $5,$6,27498
srlv $1,$1,$3
subu $3,$3,$3
or $3,$4,$3
sra $5,$1,8
lbu $4,9($0)
addu $0,$4,$3
sllv $1,$0,$3
lw $1,4($0)
sltiu $1,$1,-23139
subu $0,$4,$3
sw $6,16($0)
sra $4,$1,0
addu $1,$4,$3
xor $3,$5,$3
andi $4,$1,42562
or $4,$4,$3
sw $4,16($0)
srlv $3,$0,$3
lhu $5,8($0)
sra $0,$0,5
nor $4,$4,$3
lb $4,13($0)
lhu $6,10($0)
or $3,$4,$3
sllv $5,$1,$3
srl $5,$3,20
sltiu $5,$4,23458
srlv $3,$5,$3
lb $0,16($0)
sllv $0,$0,$3
sllv $0,$0,$3
subu $0,$1,$3
sb $3,1($0)
subu $4,$4,$3
sltu $1,$3,$3
sltu $1,$5,$3
andi $1,$3,23778
addu $3,$1,$3
sll $0,$3,17
sltiu $4,$5,-12335
subu $4,$4,$3
xor $3,$4,$3
sltu $4,$5,$3
sw $4,4($0)
lhu $3,4($0)
lbu $1,6($0)
nor $5,$4,$3
subu $3,$4,$3
sb $1,8($0)
sllv $3,$1,$3
sw $6,4($0)
xori $5,$0,3922
sb $4,16($0)
sllv $4,$4,$3
addu $5,$3,$3
sra $0,$3,12
slti $5,$1,28927
lb $0,14($0)
sb $0,8($0)
sw $1,16($0)
lbu $4,1($0)
addiu $3,$3,-19208
srav $3,$4,$3
subu $3,$3,$3
srav $3,$4,$3
slt $3,$3,$3
lhu $5,10($0)
sb $3,15($0)
andi $5,$4,56677
lw $3,16($0)
sh $1,8($0)
xor $1,$3,$3
lhu $3,4($0)
nor $5,$2,$3
sltu $1,$4,$3
addu $0,$6,$3
srav $3,$0,$3
sll $4,$5,18
slti $4,$4,-15100
subu $1,$3,$3
sw $4,4($0)
sllv $3,$3,$3
addu $3,$6,$3
sltiu $4,$0,-26751
xori $6,$1,60565
subu $3,$3,$3
addu $4,$1,$3
lbu $3,1($0)
lw $1,0($0)
sll $1,$5,16
slt $3,$3,$3
subu $3,$3,$3
andi $3,$0,27266
srav $6,$6,$3
sb $0,2($0)
nor $1,$2,$3
sw $0,16($0)
sllv $3,$3,$3
ori $2,$2,59328
sh $4,0($0)
lb $3,1($0)
slti $4,$0,-32549
lhu $1,6($0)
addu $3,$3,$3
srlv $1,$1,$3
srl $5,$5,5
addiu $3,$1,-30959
and $1,$1,$3
sllv $4,$1,$3
lw $6,12($0)
sb $4,12($0)
slt $3,$3,$3
addu $3,$3,$3
subu $3,$3,$3
addiu $3,$3,29718
ori $4,$3,17432
srav $3,$5,$3
or $3,$4,$3
slt $6,$1,$3
lw $1,8($0)
sltiu $1,$4,24322
slti $3,$3,27493
sw $3,12($0)
addiu $1,$3,12342
xor $0,$3,$3
subu $1,$3,$3
srav $3,$4,$3
sllv $6,$5,$3
sltu $0,$4,$3
andi $4,$4,3455
andi $4,$5,21157
lb $0,3($0)
addiu $3,$3,-12949
xori $6,$6,37668
subu $4,$3,$3
sll $5,$3,10
sw $5,8($0)
srl $1,$4,21
sb $4,6($0)
srav $3,$3,$3
xor $0,$0,$3
sll $4,$3,5
nor $0,$3,$3
sltiu $6,$4,10732
sb $0,3($0)
sra $1,$5,19
sb $4,10($0)
sb $4,7($0)
slti $5,$4,16461
slti $5,$4,-16181
sll $3,$3,1
ori $4,$0,48417
lh $4,14($0)
sltiu $4,$1,24502
sb $5,8($0)
lh $0,0($0)
lbu $4,15($0)
addiu $3,$6,-20445
lh $6,10($0)
andi $2,$2,59920
sb $4,15($0)
sh $5,2($0)
srav $1,$5,$3
slti $3,$3,-28918
sw $5,8($0)
sw $1,16($0)
sh $0,0($0)
lbu $4,6($0)
lh $0,2($0)
srav $1,$3,$3
srlv $1,$3,$3
and $3,$5,$3
lh $1,6($0)
sltu $4,$0,$3
and $3,$6,$3
sb $3,1($0)
xor $1,$3,$3
srlv $3,$0,$3
slt $1,$1,$3
slt $3,$4,$3
xori $4,$3,23551
slti $3,$1,11521
lhu $3,0($0)
ori $0,$3,14374
sra $3,$6,11
subu $5,$4,$3
lb $4,14($0)
sh $3,12($0)
lbu $4,1($0)
slt $4,$4,$3
srlv $1,$4,$3
or $5,$6,$3
addiu $5,$5,16060
sll $3,$3,1
sra $0,$3,14
lh $5,14($0)
ori $4,$5,16030
xor $3,$3,$3
andi $4,$4,47654
addiu $3,$3,-23136
xor $1,$5,$3
addu $3,$5,$3
slt $3,$4,$3
or $3,$3,$3
xori $3,$4,10958
addu $3,$5,$3
sra $0,$3,13
srav $4,$4,$3
or $4,$4,$3
lw $1,12($0)
subu $3,$2,$3
srlv $5,$4,$3
sw $1,12($0)
sh $3,4($0)
sltu $5,$1,$3
lw $5,16($0)
xor $5,$5,$3
lh $1,2($0)
sra $0,$1,29
slti $1,$4,-7665
sb $1,12($0)
xori $1,$4,3141
subu $4,$2,$3
lhu $3,0($0)
ori $4,$5,64246
lh $3,4($0)
sllv $5,$6,$3
sw $5,0($0)
sw $5,8($0)
slti $4,$0,18792
slt $1,$4,$3
slt $4,$3,$3
addiu $6,$5,1613
and $1,$3,$3
sw $1,8($0)
xori $4,$4,16508
sltu $1,$4,$3
addiu $6,$3,-20932
lw $5,0($0)
lhu $3,10($0)
sllv $3,$1,$3
nor $4,$4,$3
and $1,$4,$3
sw $3,4($0)
srlv $5,$4,$3
srlv $3,$6,$3
sw $5,8($0)
addiu $3,$3,-7373
addiu $3,$5,-10052
slti $1,$4,30906
sh $0,6($0)
sb $3,9($0)
lh $4,4($0)
lbu $3,15($0)
srl $3,$3,16
sra $4,$6,24
lw $3,0($0)
nor $3,$6,$3
ori $6,$4,22330
nor $4,$1,$3
sltu $1,$1,$3
subu $3,$5,$3
sltiu $4,$4,8166
srav $1,$4,$3
sh $1,14($0)
lhu $4,10($0)
sltiu $4,$1,15740
srav $3,$0,$3
subu $3,$3,$3
nor $5,$4,$3
lw $4,16($0)
lbu $6,6($0)
xori $0,$3,3064
lw $2,4($0)
sltiu $1,$1,-28469
xor $4,$3,$3
slti $5,$3,894
srlv $5,$1,$3
or $4,$4,$3
lb $3,15($0)
sllv $3,$3,$3
lh $3,10($0)
sb $4,1($0)
lb $3,11($0)
srav $3,$5,$3
addiu $3,$4,-18813
xor $0,$4,$3
sllv $5,$5,$3
and $6,$6,$3
ori $3,$3,8064
lb $1,11($0)
sb $0,12($0)
addiu $6,$3,-21525
slti $4,$3,-24048
lhu $5,14($0)
lh $1,8($0)
sh $6,10($0)
lhu $5,12($0)
sll $5,$5,14
sra $3,$0,15
sh $4,14($0)
sh $3,6($0)
and $1,$4,$3
ori $1,$6,29329
addiu $6,$6,16337
lbu $3,2($0)
addu $1,$3,$3
addiu $4,$4,22858
sh $1,4($0)
srav $6,$4,$3
addu $5,$3,$3
srav $3,$3,$3
sra $1,$3,5
subu $5,$5,$3
and $4,$4,$3
slt $4,$3,$3
sh $4,8($0)
lbu $5,8($0)
sll $4,$1,20
subu $3,$2,$3
sb $1,0($0)
sh $5,8($0)
slt $4,$4,$3
nor $4,$1,$3
slti $1,$3,-14825
sltiu $0,$0,-25895
sltiu $4,$4,31252
srl $1,$3,11
sb $3,0($0)
lbu $6,1($0)
sllv $5,$4,$3
sll $3,$5,0
slt $3,$5,$3
xor $0,$3,$3
sltiu $4,$1,26294
sh $3,14($0)
srav $3,$3,$3
sll $1,$4,2
sltiu $4,$4,30340
sltiu $0,$4,5742
sllv $3,$5,$3
sltu $1,$1,$3
slti $4,$4,-7802
xor $5,$0,$3
slt $6,$1,$3
lh $3,16($0)
and $1,$3,$3
addu $4,$1,$3
sllv $5,$4,$3
xor $4,$0,$3
addu $3,$3,$3
sllv $3,$3,$3
or $3,$1,$3
srl $4,$0,29
srl $4,$4,10
sw $4,0($0)
subu $1,$5,$3
lhu $3,14($0)
addu $5,$1,$3
subu $5,$0,$3
slt $5,$1,$3
nor $3,$4,$3
lb $1,11($0)
lhu $4,10($0)
andi $3,$3,31395
sll $3,$3,26
or $4,$4,$3
sltu $4,$4,$3
lb $5,8($0)
srl $4,$3,9
addiu $0,$0,5356
slti $5,$3,14130
srl $4,$2,1
lbu $5,1($0)
srav $4,$4,$3
subu $3,$1,$3
andi $3,$1,32680
addiu $4,$4,-16602
srlv $4,$4,$3
sra $4,$5,29
lhu $3,14($0)
lh $4,12($0)
sw $3,16($0)
or $6,$0,$3
subu $4,$3,$3
subu $3,$1,$3
sw $3,0($0)
addiu $1,$4,27388
addiu $4,$0,-240
subu $3,$5,$3
addiu $3,$4,-13441
sll $5,$5,23
addiu $6,$6,6580
or $3,$2,$3
lw $4,12($0)
subu $3,$4,$3
subu $3,$4,$3
slt $5,$5,$3
andi $4,$1,50189
addu $6,$1,$3
ori $6,$3,35743
or $5,$6,$3
srl $1,$2,0
sb $3,4($0)
subu $0,$5,$3
ori $1,$4,37254
lb $0,2($0)
lh $3,16($0)
srav $3,$5,$3
xori $4,$4,17958
xor $2,$2,$3
srl $3,$3,13
slti $4,$4,11466
and $5,$4,$3
lhu $5,8($0)
addiu $1,$5,-17447
slti $6,$6,-906
xori $1,$1,18989
andi $0,$3,4989
sb $0,0($0)
and $4,$4,$3
slt $3,$3,$3
srav $4,$5,$3
subu $3,$5,$3
srlv $1,$5,$3
subu $4,$3,$3
addu $1,$6,$3
sll $4,$4,0
srl $3,$3,3
srl $1,$6,20
subu $4,$6,$3
srlv $0,$0,$3
subu $3,$3,$3
or $0,$3,$3
lh $3,16($0)
sltiu $3,$6,-10792
sltu $4,$1,$3
sh $3,6($0)
addu $1,$3,$3
and $4,$4,$3
sllv $4,$5,$3
xor $3,$1,$3
xor $5,$5,$3
sltiu $1,$2,-11812
sw $0,0($0)
sll $5,$3,17
lw $3,8($0)
xor $4,$5,$3
sltu $4,$5,$3
sra $1,$5,24
subu $1,$3,$3
slt $6,$1,$3
slt $6,$6,$3
slti $3,$3,13129
subu $4,$4,$3
addiu $6,$3,-18237
srlv $3,$5,$3
subu $3,$5,$3
lbu $1,12($0)
lbu $5,11($0)
slti $0,$6,-18154
sb $3,6($0)
addu $4,$6,$3
sh $5,10($0)
addu $1,$0,$3
lh $4,8($0)
and $4,$3,$3
subu $1,$3,$3
srav $3,$3,$3
sb $5,10($0)
sh $1,14($0)
nor $1,$3,$3
xor $4,$6,$3
srl $1,$6,19
ori $4,$4,15511
subu $3,$4,$3
xor $5,$5,$3
sh $4,2($0)
slt $3,$2,$3
lhu $3,10($0)
xor $4,$3,$3
lb $3,0($0)
and $3,$3,$3
addu $3,$3,$3
sltiu $1,$1,-15300
sltiu $3,$4,-26802
subu $1,$1,$3
ori $5,$5,20290
srl $4,$1,12
srav $4,$3,$3
slt $5,$5,$3
sra $3,$3,9
nor $5,$4,$3
slti $0,$3,28254
srl $0,$5,1
subu $1,$6,$3
addiu $6,$4,16151
addiu $6,$3,9505
lb $1,9($0)
addiu $4,$4,-7017
nor $3,$3,$3
srav $3,$3,$3
sltu $4,$6,$3
slti $4,$3,15980
ori $6,$3,57200
lbu $1,15($0)
lw $4,16($0)
sb $3,8($0)
sra $4,$3,15
and $2,$2,$3
nor $3,$5,$3
lhu $4,0($0)
xori $4,$4,301
lh $5,0($0)
xori $6,$4,12049
subu $5,$5,$3
sltu $3,$3,$3
addu $4,$5,$3
nor $5,$5,$3
addu $0,$1,$3
lb $1,4($0)
sb $0,15($0)
lbu $4,2($0)
nor $1,$0,$3
sh $0,6($0)
lh $4,2($0)
nor $3,$0,$3
sll $3,$3,0
sb $1,13($0)
ori $6,$3,61136
and $3,$3,$3
sllv $4,$3,$3
slt $5,$3,$3
andi $3,$3,22875
subu $4,$5,$3
sllv $1,$1,$3
sw $4,8($0)
sllv $3,$3,$3
sltu $3,$0,$3
sw $1,4($0)
subu $5,$6,$3
sltu $4,$3,$3
srlv $5,$4,$3
xori $3,$3,57036
lbu $5,4($0)
lb $4,13($0)
sh $3,2($0)
sb $1,14($0)
addu $4,$5,$3
sw $3,16($0)
lb $4,16($0)
srlv $4,$5,$3
andi $4,$4,6348
and $5,$3,$3
ori $0,$3,52002
sll $4,$4,14
xori $0,$3,57894
lh $4,12($0)
lw $3,4($0)
andi $5,$4,18767
lb $0,11($0)
sb $4,13($0)
addu $1,$1,$3
nor $0,$0,$3
or $3,$3,$3
slt $3,$5,$3
addu $5,$3,$3
or $1,$4,$3
lhu $1,6($0)
addu $3,$4,$3
srl $3,$3,28
sw $4,12($0)
slti $0,$3,-22588
sw $0,12($0)
sltiu $4,$3,-11025
xor $4,$3,$3
lbu $5,8($0)
addu $5,$3,$3
lbu $3,10($0)
nor $5,$5,$3
or $3,$1,$3
ori $3,$3,44493
sltu $3,$3,$3
sw $5,8($0)
srav $3,$3,$3
nor $3,$3,$3
slti $3,$1,20417
addiu $4,$4,-13478
srlv $1,$1,$3
nor $4,$3,$3
srav $4,$6,$3
xori $1,$5,62210
andi $1,$5,54187
srlv $5,$4,$3
srlv $3,$3,$3
srlv $6,$1,$3
slt $5,$6,$3
|
src/Examples/Gcd/Clocked.agda | jonsterling/agda-calf | 29 | 17353 | {-# OPTIONS --prop --rewriting #-}
module Examples.Gcd.Clocked where
open import Calf.CostMonoid
import Calf.CostMonoids as CM
open import Calf CM.ℕ-CostMonoid
open import Calf.Types.Nat
open import Data.Nat using (_≤_; z≤n)
open import Calf.Types.Unit
open import Calf.Types.Bounded CM.ℕ-CostMonoid
open import Calf.Types.BoundedFunction CM.ℕ-CostMonoid
open import Data.Nat.DivMod
open import Relation.Binary.PropositionalEquality as P
open import Data.Product
open import Examples.Gcd.Euclid
{- Alternative definition of gcd with an explicit clock parameter.
It is easier to see the computational behavior of the code in this version:
1) when the clock is nonzero: the algorithm proceeds as normal
2) clock is zero: algorithm terminates
Crucially, if the recursor is by-name, then the value of the clock does not
affect asymptotic behavior of the algorithm.
Two things one can do in calf:
1) give a good characterization of the clock in terms of the input by refining the raw recurrence (see Refine.agda)
2) give a good characterization for of the clock for running the code; this usually
means finding a clock computation that is simpler to compute
than the "good" upperbound. For gcd, one can reuse the argument as the clock (see Spec.agda)
-}
gcd/clocked : cmp (Π nat λ _ → Π gcd/i λ _ → F nat)
gcd/clocked zero (x , y , h) = ret x
gcd/clocked (suc k) (x , 0 , h) = ret {nat} x
gcd/clocked (suc k) (x , suc y , h) =
bind {mod-tp x (suc y) triv} (F nat) (mod x (suc y) triv)
λ { (z , eqn2) →
let h2 = P.subst (λ k → suc k ≤ suc y) (P.sym eqn2) (m%n<n' x _ triv) in
gcd/clocked k (suc y , z , h2) }
gcd : cmp (Π gcd/i λ _ → F nat)
gcd i = gcd/clocked (gcd/depth i) i
-- cost of clocked gcd is bounded by for any (not necessarily safe)
-- instantiation of the clock
gcd/clocked≤gcd/depth : ∀ k i → IsBounded nat (gcd/clocked k i) (gcd/depth i)
gcd/clocked≤gcd/depth zero i = bound/relax (λ _ → z≤n) bound/ret
gcd/clocked≤gcd/depth (suc k) (x , zero , h) = bound/ret
gcd/clocked≤gcd/depth (suc k) (x , suc y , h) rewrite gcd/depth-unfold-suc {x} {y} {h} =
bound/step 1 _ (gcd/clocked≤gcd/depth k (suc y , x % suc y , m%n<n' x _ triv))
gcd≤gcd/depth : ∀ i → IsBounded nat (gcd i) (gcd/depth i)
gcd≤gcd/depth i = gcd/clocked≤gcd/depth (gcd/depth i) i
gcd/bounded : cmp (Ψ gcd/i (λ { _ → nat }) gcd/depth)
gcd/bounded = gcd , gcd≤gcd/depth
|
oeis/142/A142205.asm | neoneye/loda-programs | 11 | 28911 | ; A142205: Primes congruent to 8 mod 41.
; Submitted by <NAME>(s4)
; 131,541,787,1033,1279,1361,1607,2017,2099,2591,2837,3001,3083,3329,3739,3821,4231,4723,4969,5051,5297,5953,6199,6691,7019,7757,8167,8741,9151,9397,9479,9643,10463,10627,10709,11119,11447,11939,12841,12923,13907,14071,14153,14563,14891,15137,15383,15629,17351,17597,17761,18089,18253,19073,19237,19319,19483,20549,20959,21943,22189,22271,23173,23747,23911,23993,24239,24977,25469,25633,26371,26699,26863,27109,27191,27437,27847,29077,29569,30307,30389,30553,30881,32029,32603,33013,33587,33751,33997
mov $2,$0
add $2,2
pow $2,2
lpb $2
add $1,24
mul $1,2
sub $2,1
mov $3,$1
add $1,3
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,31
div $1,2
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
lpe
mov $0,$1
mul $0,2
sub $0,33
|
src/Unification.agda | wenkokke/AutoInAgda | 22 | 6436 | open import Function using (_∘_)
open import Category.Monad using (module RawMonad)
open import Data.Fin using (Fin; suc; zero)
open import Data.Fin.Properties renaming (_≟_ to _≟-Fin_)
open import Data.List as List using (List; _∷_; [])
open import Data.List.Properties renaming (∷-injective to ∷-inj)
open import Data.Maybe as Maybe using (Maybe; just; nothing)
open import Data.Nat using (ℕ; suc; zero)
open import Data.Product as Prod using (∃; _×_; _,_; proj₁; proj₂)
open import Relation.Nullary using (Dec; yes; no)
open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong; cong₂)
module Unification
(Name : Set) (_≟-Name_ : (x y : Name) → Dec (x ≡ y))
(Literal : Set) (_≟-Literal_ : (x y : Literal) → Dec (x ≡ y))
where
open RawMonad {{...}} using (_<$>_; _>>=_; return)
private
instance
MaybeMonad = Maybe.monad
data Term (n : ℕ) : Set where
var : (x : Fin n) → Term n
con : (s : Name) (ts : List (Term n)) → Term n
lit : (l : Literal) → Term n
-- ext : (x : Fin (suc n)) (t : Term (suc n)) → Term n
var-inj : ∀ {n x₁ x₂} → var {n} x₁ ≡ var {n} x₂ → x₁ ≡ x₂
var-inj refl = refl
con-inj : ∀ {n s₁ s₂ ts₁ ts₂} → con {n} s₁ ts₁ ≡ con {n} s₂ ts₂ → s₁ ≡ s₂ × ts₁ ≡ ts₂
con-inj refl = (refl , refl)
lit-inj : ∀ {n x₁ x₂} → lit {n} x₁ ≡ lit {n} x₂ → x₁ ≡ x₂
lit-inj refl = refl
mutual
_≟-Term_ : ∀ {n} → (t₁ t₂ : Term n) → Dec (t₁ ≡ t₂)
_≟-Term_ (var _) (lit _) = no (λ ())
_≟-Term_ (var _) (con _ _) = no (λ ())
_≟-Term_ (var x₁) (var x₂) with x₁ ≟-Fin x₂
... | yes x₁=x₂ = yes (cong var x₁=x₂)
... | no x₁≠x₂ = no (x₁≠x₂ ∘ var-inj)
_≟-Term_ (con _ _) (var _) = no (λ ())
_≟-Term_ (con _ _) (lit _) = no (λ ())
_≟-Term_ (con s₁ ts₁) (con s₂ ts₂) with s₁ ≟-Name s₂
... | no s₁≠s₂ = no (s₁≠s₂ ∘ proj₁ ∘ con-inj)
... | yes s₁=s₂ rewrite s₁=s₂ with ts₁ ≟-Terms ts₂
... | no ts₁≠ts₂ = no (ts₁≠ts₂ ∘ proj₂ ∘ con-inj)
... | yes ts₁=ts₂ = yes (cong (con s₂) ts₁=ts₂)
_≟-Term_ (lit _) (var _) = no (λ ())
_≟-Term_ (lit _) (con _ _) = no (λ ())
_≟-Term_ (lit x₁) (lit x₂) with x₁ ≟-Literal x₂
... | yes x₁=x₂ = yes (cong lit x₁=x₂)
... | no x₁≠x₂ = no (x₁≠x₂ ∘ lit-inj)
_≟-Terms_ : ∀ {n} (xs ys : List (Term n)) → Dec (xs ≡ ys)
_≟-Terms_ [] [] = yes refl
_≟-Terms_ [] (_ ∷ _) = no (λ ())
_≟-Terms_ (_ ∷ _) [] = no (λ ())
_≟-Terms_ (x ∷ xs) (y ∷ ys) with x ≟-Term y
... | no x≠y = no (x≠y ∘ proj₁ ∘ ∷-inj)
... | yes x=y with xs ≟-Terms ys
... | no xs≠ys = no (xs≠ys ∘ proj₂ ∘ ∷-inj)
... | yes xs=ys = yes (cong₂ _∷_ x=y xs=ys)
-- defining thick and thin
thin : {n : ℕ} → Fin (suc n) → Fin n → Fin (suc n)
thin zero y = suc y
thin (suc x) zero = zero
thin (suc x) (suc y) = suc (thin x y)
thick : {n : ℕ} → (x y : Fin (suc n)) → Maybe (Fin n)
thick zero zero = nothing
thick zero (suc y) = just y
thick {zero} (suc ()) _
thick {suc n} (suc x) zero = just zero
thick {suc n} (suc x) (suc y) = suc <$> thick x y
-- defining replacement function (written _◂ in McBride, 2003)
replace : ∀ {n m} → (Fin n → Term m) → Term n → Term m
replace _ (lit l) = lit l
replace f (var i) = f i
replace f (con s ts) = con s (replaceChildren f ts)
where
replaceChildren : ∀ {n m} → (Fin n → Term m) → (List (Term n) → List (Term m))
replaceChildren f [] = []
replaceChildren f (x ∷ xs) = replace f x ∷ (replaceChildren f xs)
-- defining replacement composition
_◇_ : ∀ {m n l} (f : Fin m → Term n) (g : Fin l → Term m) → Fin l → Term n
_◇_ f g = replace f ∘ g
-- defining an occurs check (**check** in McBride, 2003)
check : ∀ {n} (x : Fin (suc n)) (t : Term (suc n)) → Maybe (Term n)
check _ (lit l) = just (lit l)
check x₁ (var x₂) = var <$> thick x₁ x₂
check x₁ (con s ts) = con s <$> checkChildren x₁ ts
where
checkChildren : ∀ {n} (x : Fin (suc n)) (ts : List (Term (suc n))) → Maybe (List (Term n))
checkChildren x₁ [] = just []
checkChildren x₁ (t ∷ ts) = check x₁ t >>= λ t' →
checkChildren x₁ ts >>= λ ts' → return (t' ∷ ts')
-- datatype for substitutions (AList in McBride, 2003)
data Subst : ℕ → ℕ → Set where
nil : ∀ {n} → Subst n n
snoc : ∀ {m n} → (s : Subst m n) → (t : Term m) → (x : Fin (suc m)) → Subst (suc m) n
-- substitutes t for x (**for** in McBride, 2003)
_for_ : ∀ {n} (t : Term n) (x : Fin (suc n)) → Fin (suc n) → Term n
_for_ t x y with thick x y
_for_ t x y | just y' = var y'
_for_ t x y | nothing = t
-- substitution application (**sub** in McBride, 2003)
sub : ∀ {m n} → Subst m n → Fin m → Term n
sub nil = var
sub (snoc s t x) = (sub s) ◇ (t for x)
-- composes two substitutions
_++_ : ∀ {l m n} → Subst m n → Subst l m → Subst l n
s₁ ++ nil = s₁
s₁ ++ (snoc s₂ t x) = snoc (s₁ ++ s₂) t x
flexRigid : ∀ {n} → Fin n → Term n → Maybe (∃ (Subst n))
flexRigid {zero} () t
flexRigid {suc n} x t with check x t
flexRigid {suc n} x t | nothing = nothing
flexRigid {suc n} x t | just t' = just (n , snoc nil t' x)
flexFlex : ∀ {n} → (x y : Fin n) → ∃ (Subst n)
flexFlex {zero} () j
flexFlex {suc n} x y with thick x y
flexFlex {suc n} x y | nothing = (suc n , nil)
flexFlex {suc n} x y | just z = (n , snoc nil (var z) x)
mutual
unifyAcc : ∀ {m} → (t₁ t₂ : Term m) → ∃ (Subst m) → Maybe (∃ (Subst m))
unifyAcc (lit x₁) (lit x₂) (n , nil) with x₁ ≟-Literal x₂
... | yes x₁=x₂ rewrite x₁=x₂ = just (n , nil)
... | no x₁≠x₂ = nothing
unifyAcc (con s ts) (lit x) (n , nil) = nothing
unifyAcc (lit x) (con s ts) (n , nil) = nothing
unifyAcc (con s₁ ts₁) (con s₂ ts₂) acc with s₁ ≟-Name s₂
... | yes s₁=s₂ rewrite s₁=s₂ = unifyAccChildren ts₁ ts₂ acc
... | no s₁≠s₂ = nothing
unifyAcc (var x₁) (var x₂) (n , nil) = just (flexFlex x₁ x₂)
unifyAcc t (var x) (n , nil) = flexRigid x t
unifyAcc (var x) t (n , nil) = flexRigid x t
unifyAcc t₁ t₂ (n , snoc s t′ x) =
( λ s → proj₁ s , snoc (proj₂ s) t′ x )
<$> unifyAcc (replace (t′ for x) t₁) (replace (t′ for x) t₂) (n , s)
unifyAccChildren : ∀ {n} → (ts₁ ts₂ : List (Term n)) → ∃ (Subst n) → Maybe (∃ (Subst n))
unifyAccChildren [] [] acc = just acc
unifyAccChildren [] _ _ = nothing
unifyAccChildren _ [] _ = nothing
unifyAccChildren (t₁ ∷ ts₁) (t₂ ∷ ts₂) acc = unifyAcc t₁ t₂ acc >>= unifyAccChildren ts₁ ts₂
unify : ∀ {m} → (t₁ t₂ : Term m) → Maybe (∃ (Subst m))
unify {m} t₁ t₂ = unifyAcc t₁ t₂ (m , nil)
|
Source/eu.modelwriter.core.alloyinecore/src/main/spec/AlloyGeneration.als | ModelWriter/AlloyInEcore | 2 | 2112 | open util/graph[Type] as graph
open util/ordering[Level] as ord
sig Level { level: set Type}
fact{ all t: Type | one t.~level}
fun layer [] : Type -> Level {~level}
sig Instance {
--slot: Type -> Instance
} {some this.~instance}
sig Type {
xtends: set Type,
subTypes: set Type,
-- reference: set Type,
instance : set Instance,
}
fact {graph/dag[xtends] }
fact {subTypes = ~xtends}
fun Type.allSubTypes [] : set Type { this.^~xtends }
fun Type.allExtends [] : set Type { this.^xtends }
fun Instance.getType : Type { this.~instance }
sig AbstractType extends Type {}
one sig Object extends AbstractType {}
fact ObjectIsGreatestElement {Type in Object.*~xtends}
one sig Null extends Type {}
fact {no Null.instance and no Null.~xtends}
fact NullIsLeastElement {all t:Type | Null in t.*~xtends}
fact {
all disj t1, t2 : Type | not (t1 in t2.allExtends or t2 in t1.allExtends) and
no t1.allSubTypes & t2.allSubTypes => no t1.instance & t2.instance
all i: Instance, t: i.getType.xtends | i in t.instance
all a: AbstractType | a.instance = a.allSubTypes.instance
}
/**
* In the initial state.
*/
fact initialState {
let l0 = ord/first | l0.level = Object
}
/**
* Succession condition.
*/
fact succesor {
all l: Level, l': ord/next[l] {
l.level.~xtends = l'.level
}
}
pred ForceMultipleInheritance { some t: Type - Null | #t.xtends >1 }
pred NoAbstractAtLeaf { some a: AbstractType | some a.subTypes }
pred TypeHasInstanceAtLeaf { some t: Type - AbstractType | no t.subTypes and some t.instance }
pred InheritingObject{ all t : Type | Object in t.xtends => Object = t.xtends }
assert leafNotAbstractType{
NoAbstractAtLeaf
TypeHasInstanceAtLeaf
}
check leafNotAbstractType for exactly 8 Type, exactly 7 Instance, 8 Level
run { ForceMultipleInheritance and InheritingObject} for exactly 8 Type, exactly 7 Instance, 8 Level
run { ForceMultipleInheritance and TypeHasInstanceAtLeaf and InheritingObject} for exactly 8 Type, exactly 7 Instance, 7 Level
|
Data/Iterator.agda | Lolirofle/stuff-in-agda | 6 | 388 | <filename>Data/Iterator.agda
module Data.Iterator where
import Lvl
open import Data hiding (empty)
open import Data.Boolean
open import Functional
open import Numeral.Natural
open import Type
private variable ℓ : Lvl.Level
private variable T A B : Type{ℓ}
private variable a x init : T
private variable f : A → B
private variable n : ℕ
-- TODO: Is this useful when not lazy? It cannot store data and I am not sure if the whole list is evaluated in listIterator or not (strictness)
record Iterator (T : Type{ℓ}) : Type{ℓ} where
coinductive
field
isEmpty : Bool
current : if isEmpty then Unit else T -- TODO: These are essentially `Option`s but instead of storing its state, they depend on a boolean defined somewhere else
step : if isEmpty then Unit else Iterator(T)
open Iterator
{- TODO: This is a generalization of an iterator. It could be used to define iterators for any number of dimensions or to define double-ended iterators.
-- TODO: decidable-all-step may also be ∃{Obj = (Step → Bool) → Bool}(dec ↦ ∀{P} → (IsTrue(dec(P)) ↔ ∀ₗ(IsTrue ∘ P))). Not sure if it captures that (∀{s} → atEnd s) always is decidable by the smallest amount of assumptions. An example of this is when Step is finitely enumerable.
record Stepper (Step : Type{ℓₛ}) ⦃ decidable-all-step : ∀{P : Step → Bool} → Decidable(∀ₗ(IsTrue ∘ P)) ⦄ (T : Type{ℓ}) : Type{ℓ} where
coinductive
field
atEnd : Step → Bool
current : if decide(∀ₗ(IsTrue ∘ atEnd)) then Unit else T
step : (step : Step) → if(atEnd step) then Unit else Stepper(Step)(T)
-}
open import Data.Option
open import Data.Boolean.Operators
open Data.Boolean.Operators.Programming
skip : ℕ → Iterator(T) → Iterator(T)
skip 𝟎 iter = iter
skip (𝐒 n) iter with isEmpty iter | step iter
... | 𝑇 | <> = iter
... | 𝐹 | sIter = skip n sIter
skipExact : ℕ → Iterator(T) → Option(Iterator(T))
skipExact 𝟎 iter = Some iter
skipExact (𝐒 n) iter with isEmpty iter | step iter
... | 𝑇 | <> = None
... | 𝐹 | sIter = skipExact n sIter
{- TODO: Not sure if I did not get the semantics of how codata works or whether the termination checker is wrong
{-# TERMINATING #-}
_++_ : Iterator(T) → Iterator(T) → Iterator(T)
isEmpty (a ++ b) with isEmpty a
... | 𝑇 = isEmpty b
... | 𝐹 = 𝐹
current (a ++ b) with isEmpty a | current a
... | 𝐹 | ca = ca
... | 𝑇 | <> with isEmpty b | current b
... | 𝐹 | cb = cb
... | 𝑇 | <> = <>
step (a ++ b) with isEmpty a | step a
... | 𝐹 | sa = sa ++ b
... | 𝑇 | <> with isEmpty b | step b
... | 𝐹 | sb = sb
... | 𝑇 | <> = <>
{-# TERMINATING #-}
map : (A → B) → (Iterator(A) → Iterator(B))
isEmpty (map f iter) = isEmpty iter
current (map f iter) with isEmpty iter | current iter
... | 𝑇 | <> = <>
... | 𝐹 | a = f(a)
step (map f iter) with isEmpty iter | step iter
... | 𝑇 | <> = <>
... | 𝐹 | sIter = map f sIter
-}
empty : Iterator(T)
isEmpty empty = 𝑇
current empty = <>
step empty = <>
prepend : T → Iterator(T) → Iterator(T)
isEmpty (prepend x l) = 𝐹
current (prepend x l) = x
step (prepend x l) = l
open import Data.List
listIterator : List(T) → Iterator(T)
listIterator ∅ = empty
listIterator (x ⊰ l) = prepend x (listIterator l)
|
Grammar/StubsLexer.g4 | Patrick-Remy/stubs-compiler | 0 | 5664 | //
// StubsLexer.g4
// StubsGrammar
//
// Created by <NAME> on 11.12.17.
//
lexer grammar StubsLexer;
options {
language = Swift;
}
fragment Digit: [0-9];
fragment NonzeroDigit: [1-9];
fragment Letter: [a-zA-Z];
Ws: (' '|'\t'|'\r'|'\n')+ -> channel(HIDDEN);
Newline: '\r'?'\n' -> skip;
MultilineComment: '/*' .*? '*/' -> skip;
SingleLineComment: '//' ~[\r\n]* -> skip;
// Literals
IntegerLiteral: (NonzeroDigit Digit* | '0');
DoubleLiteral: Digit+ '.' Digit+;
StringLiteral: '"' .*? '"';
BooleanLiteral: 'true' | 'false';
// Keywords
Array: 'Array';
Var: 'var';
NativeType: 'Int' | 'Double' | 'String' | 'Boolean';
If: 'if';
Else: 'else';
While: 'while';
Def: 'def';
Return: 'return';
Object: 'object';
// Operators
Plus: '+';
Minus: '-';
Mult: '*';
Divide: '/';
Modulo: '%';
Equal: '==';
Less: '<';
Greater: '>';
LessOrEqual: '<=';
GreaterOrEqual: '>=';
NotEqual: '!=';
And: '&&';
Or: '||';
Not: '!';
Assign: '=';
// Symbols
ParenOpen: '(';
ParenClose: ')';
BracketOpen: '[';
BracketClose: ']';
CurlyBracketOpen: '{';
CurlyBracketClose: '}';
Seperator: ',';
Colon: ':';
Semicolon: ';';
Identifier: Letter (Letter|Digit|'_')*;
|
source/lli_end.asm | mateuszstompor/Linked-List-x86-64-ASM | 5 | 10781 | <reponame>mateuszstompor/Linked-List-x86-64-ASM
;
; Created by <NAME> on 25/06/2019.
;
%include "source/offsets.asm"
%include "source/iterator.asm"
%include "source/constants.asm"
%include "source/memory_management.asm"
global LLI_END
section .text
LLI_END:
add rsi, LL_LIST_LAST_OFFSET
mov rcx, [rsi]
mov qword [rdi], NULL_PTR
add rdi, 8
mov [rdi], rcx
ret
|
programs/oeis/165/A165754.asm | neoneye/loda | 22 | 175206 | ; A165754: a(n) = nimsum(n+(n+1)+(n+2)).
; 3,0,5,2,7,4,9,6,11,8,13,10,15,12,17,14,19,16,21,18,23,20,25,22,27,24,29,26,31,28,33,30,35,32,37,34,39,36,41,38,43,40,45,42,47,44,49,46,51,48,53,50,55,52,57,54,59,56,61,58,63,60,65,62,67,64,69,66,71,68,73,70,75,72,77,74,79,76,81,78,83,80,85,82,87,84,89,86,91,88,93,90,95,92,97,94,99,96,101,98
mov $1,$0
mod $0,2
gcd $0,5
add $0,$1
sub $0,2
|
Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0xca_notsx.log_21829_1936.asm | ljhsiun2/medusa | 9 | 7071 | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r13
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x1eed2, %rsi
lea addresses_UC_ht+0x142d2, %rdi
nop
nop
nop
xor %r11, %r11
mov $72, %rcx
rep movsw
nop
and %rdi, %rdi
lea addresses_UC_ht+0xd492, %rsi
lea addresses_D_ht+0x1063a, %rdi
nop
nop
nop
nop
add %r13, %r13
mov $71, %rcx
rep movsb
nop
nop
nop
xor %rsi, %rsi
lea addresses_A_ht+0x173f6, %rbp
nop
dec %r12
mov $0x6162636465666768, %r13
movq %r13, (%rbp)
nop
nop
nop
add $58381, %r12
lea addresses_WC_ht+0x18efe, %rcx
nop
nop
nop
nop
nop
cmp $23249, %rbp
movl $0x61626364, (%rcx)
nop
nop
nop
nop
dec %rsi
lea addresses_A_ht+0x17ed2, %r13
nop
nop
nop
nop
nop
and $18438, %rsi
mov $0x6162636465666768, %rdi
movq %rdi, %xmm3
vmovups %ymm3, (%r13)
nop
nop
nop
cmp $49144, %r11
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r13
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r13
push %r15
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
// Store
lea addresses_UC+0x62d2, %r12
sub $24443, %rsi
movw $0x5152, (%r12)
nop
nop
nop
nop
lfence
// Store
lea addresses_normal+0x92d2, %rbp
nop
and $22941, %rbx
movb $0x51, (%rbp)
nop
nop
nop
nop
nop
xor %r11, %r11
// Store
lea addresses_normal+0x92d2, %r13
nop
nop
nop
nop
nop
xor %rbp, %rbp
mov $0x5152535455565758, %r12
movq %r12, (%r13)
nop
nop
nop
add $55091, %r12
// REPMOV
lea addresses_UC+0x4a81, %rsi
lea addresses_UC+0xfdd2, %rdi
clflush (%rdi)
nop
xor $59162, %r15
mov $84, %rcx
rep movsb
nop
nop
nop
nop
nop
sub $41098, %rsi
// Store
lea addresses_WT+0x1ea12, %rbp
inc %r13
movw $0x5152, (%rbp)
nop
nop
nop
nop
and %rcx, %rcx
// Load
lea addresses_normal+0x92d2, %r13
nop
nop
nop
sub %rbp, %rbp
mov (%r13), %ecx
nop
nop
nop
add %rcx, %rcx
// Store
mov $0x2a3bcb0000000592, %r15
nop
nop
nop
add %rdi, %rdi
movw $0x5152, (%r15)
nop
nop
add %rsi, %rsi
// Store
lea addresses_normal+0x662e, %r15
nop
nop
add $40162, %rbp
movw $0x5152, (%r15)
nop
nop
nop
nop
sub $20289, %rdi
// Store
lea addresses_PSE+0x13ad2, %r12
add %r13, %r13
mov $0x5152535455565758, %rsi
movq %rsi, %xmm0
movups %xmm0, (%r12)
nop
nop
nop
nop
xor $33250, %r12
// Store
lea addresses_WC+0x19e36, %r13
nop
nop
nop
dec %rbx
mov $0x5152535455565758, %r12
movq %r12, %xmm4
vmovups %ymm4, (%r13)
nop
nop
nop
nop
nop
sub %r13, %r13
// Store
lea addresses_RW+0x1d476, %rcx
dec %r11
movw $0x5152, (%rcx)
nop
xor $16524, %r11
// Store
lea addresses_normal+0x92d2, %rbx
nop
add $49287, %rbp
mov $0x5152535455565758, %r12
movq %r12, %xmm3
vmovups %ymm3, (%rbx)
nop
nop
nop
add %r11, %r11
// Faulty Load
lea addresses_normal+0x92d2, %r12
nop
nop
nop
nop
xor $26835, %rbp
mov (%r12), %r13d
lea oracles, %rbx
and $0xff, %r13
shlq $12, %r13
mov (%rbx,%r13,1), %r13
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r15
pop %r13
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': True, 'size': 8, 'congruent': 0, 'same': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 8, 'same': False, 'type': 'addresses_UC'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': True, 'type': 'addresses_normal'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': True, 'type': 'addresses_normal'}, 'OP': 'STOR'}
{'src': {'congruent': 0, 'same': False, 'type': 'addresses_UC'}, 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_UC'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 4, 'same': False, 'type': 'addresses_WT'}, 'OP': 'STOR'}
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': True, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 5, 'same': False, 'type': 'addresses_NC'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': True, 'size': 2, 'congruent': 1, 'same': False, 'type': 'addresses_normal'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 10, 'same': False, 'type': 'addresses_PSE'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 2, 'same': False, 'type': 'addresses_WC'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': True, 'size': 2, 'congruent': 2, 'same': False, 'type': 'addresses_RW'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': True, 'type': 'addresses_normal'}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': True, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 9, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'}
{'src': {'congruent': 6, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 3, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 2, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 1, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 10, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'}
{'58': 21829}
58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58
*/
|
tools/documentation_generator/documentation_generator-database.ads | svn2github/matreshka | 24 | 6906 | with Asis;
with League.Strings;
package Documentation_Generator.Database is
type Module_Information is tagged limited private;
type Module_Access is access all Module_Information;
type Compilation_Unit_Information is tagged limited private;
type Compilation_Unit_Access is access all Compilation_Unit_Information;
type Type_Information is tagged limited private;
type Type_Access is access all Type_Information;
------------------------
-- Module_Information --
------------------------
function Name
(Self : Module_Information'Class) return League.Strings.Universal_String;
-- Returns name of the module.
function Short_Description
(Self : Module_Information'Class) return League.Strings.Universal_String;
-- Returns short description of the module.
----------------------------------
-- Compilation_Unit_Information --
----------------------------------
function Name
(Self : Compilation_Unit_Information'Class)
return League.Strings.Universal_String;
-- Returns full name of the compilation unit.
----------------------
-- Type_Information --
----------------------
function Name
(Self : Type_Information'Class) return League.Strings.Universal_String;
-- Returns name of the type.
function Compilation_Unit
(Self : Type_Information'Class) return Compilation_Unit_Access;
-- Returns compilation unit in which type is declared.
function Module (Self : Type_Information'Class) return Module_Access;
-- Returns module to which specified type belongs.
function Description
(Self : Type_Information'Class) return League.Strings.Universal_String;
-- Returns description of the type.
------------------------
-- Global Supbrograms --
------------------------
function Create
(Name : League.Strings.Universal_String;
Short_Description : League.Strings.Universal_String) return Module_Access;
-- Creates new module.
function Create
(Unit : Asis.Compilation_Unit;
Module : not null Module_Access) return Compilation_Unit_Access;
-- Creates compilation unit and associate it with the specified module.
function Lookup
(Unit : Asis.Compilation_Unit) return Compilation_Unit_Access;
-- Lookup for compilation unit with the specified name. Creates new one if
-- not present.
function Lookup (Declaration : Asis.Element) return Type_Access;
-- Lookup for type declaration. Creates new one if not present.
procedure Iterate
(Process : not null access procedure (Module : not null Module_Access));
-- Iterate over all modules.
procedure Iterate
(Process : not null access procedure (The_Type : not null Type_Access));
-- Iterate over all type declarations.
private
type Module_Information is tagged limited record
Name : League.Strings.Universal_String;
Short_Description : League.Strings.Universal_String;
end record;
type Compilation_Unit_Information is tagged limited record
Module : Module_Access;
Unit : Asis.Compilation_Unit;
end record;
type Type_Information is tagged limited record
Element : Asis.Element;
end record;
end Documentation_Generator.Database;
|
Drivers/PCI/PCI_LookupTables.asm | jaredwhitney/os3 | 5 | 168389 | <reponame>jaredwhitney/os3
PCI_TABLES.lookupVendorString :
push eax
push ebx
push edx
mov ebx, PCI_VENDOR_LOOPKUP_TABLE
xchg cl, ch
PCI_TABLES.lookupVendorString.loop :
cmp word [ebx], cx
je PCI_TABLES.lookupVendorString.ret
cmp word [ebx], 0xFFFF
je PCI_TABLES.lookupVendorString.ret
add ebx, 2
call String.getLength
add ebx, edx
jmp PCI_TABLES.lookupVendorString.loop
PCI_TABLES.lookupVendorString.ret :
mov ecx, ebx
add ecx, 2
pop edx
pop ebx
pop eax
ret
PCI_TABLES.lookupHardwareType :
push ebx
push edx
mov ebx, PCI_TYPE_LOOKUP_TABLE
.loop :
cmp byte [ebx], cl
je .ret
cmp byte [ebx], 0xFE
je .ret
inc ebx
call String.getLength
add ebx, edx
jmp .loop
.ret :
mov ecx, ebx
inc ecx
pop edx
pop ebx
ret
PCI_TYPE_LOOKUP_TABLE :
db 0x0, "Legacy Device", 0
db 0x1, "Mass Storage Controller", 0
db 0x2, "Network Controller", 0
db 0x3, "Display Controller", 0
db 0x4, "Multimedia Controller", 0
db 0x5, "Memory Controller", 0
db 0x6, "Bridge Device", 0
db 0x7, "Simple Communcations Controller", 0
db 0x8, "Base System Peripheral", 0
db 0x9, "Input Device", 0
db 0xA, "Docking Station", 0
db 0xB, "Processor", 0
db 0xC, "Serial Bus Controller", 0
db 0xD, "Wireless Controller", 0
db 0xE, "Intelligent I/O Controller", 0
db 0xF, "Satellite Communication Controller", 0
db 0x10, "Encryption/Decryption Controller", 0
db 0x11, "Data Acquisition / Signal Processing Controller", 0
db 0xFF, "[DEVICE CLASS UNDEFINED]", 0
db 0xFE, "[DEVICE CLASS UNRECOGNIZED]", 0
; The following is a modified and formatted derivitive of the list found at http://pcidatabase.com/vendors.php
PCI_VENDOR_LOOPKUP_TABLE :
db 0x00, 0x33, "Paradyne Corporation", 0
db 0x00, 0x3d, "Master", 0
db 0x00, 0x70, "Hauppauge Computer Works Incorporated", 0
db 0x01, 0x00, "USBPDO-8", 0
db 0x01, 0x23, "General Dynamics", 0
db 0x03, 0x15, "SK Electronics Corporation Limited", 0
db 0x04, 0x02, "Acer Aspire One", 0
db 0x04, 0x6D, "Logitech Incorporated", 0
db 0x04, 0x83, "UPEK", 0
db 0x04, 0xA9, "Canon", 0
db 0x04, 0xB3, "IBM", 0
db 0x04, 0xD9, "Filco", 0
db 0x04, 0xF2, "Chicony Electronics Co.", 0
db 0x05, 0x1D, "ACPI\VEN_INT&DEV_33A0", 0
db 0x05, 0x29, "Aladdin E-Token", 0
db 0x05, 0x53, "Aiptek USA", 0
db 0x05, 0x8f, "Alcor Micro Corporation", 0
db 0x05, 0x90, "Omron Corporation", 0
db 0x05, 0xac, "Apple Incorporated", 0
db 0x05, 0xE1, "D-MAX", 0
db 0x06, 0x4e, "SUYIN Corporation", 0
db 0x06, 0x7B, "Prolific Technology Incorporated", 0
db 0x06, 0xFE, "Acresso Software Incorporated", 0
db 0x07, 0x11, "SIIG, Incorporated", 0
db 0x09, 0x3a, "KYE Systems Corporation / Pixart Imaging", 0
db 0x09, 0x6E, "USB Rockey dongle from Feitain", 0
db 0x0A, 0x5C, "Broadcom Corporation", 0
db 0x0A, 0x89, "BREA Technologies Incorporated", 0
db 0x0A, 0x92, "Egosys, Incorporated", 0
db 0x0A, 0xC8, "ASUS", 0
db 0x0b, 0x05, "Toshiba Bluetooth RFBUS, RFCOM, RFHID", 0
db 0x0c, 0x45, "Microdia Limited", 0
db 0x0c, 0xf3, "TP-Link", 0
db 0x0D, 0x2E, "Feedback Instruments Limited", 0
db 0x0D, 0x8C, "C-Media Electronics, Incorporated", 0
db 0x0D, 0xF6, "Sitecom", 0
db 0x0E, 0x11, "Compaq Computer Corporation", 0
db 0x0E, 0x8D, "MediaTek Incorporated", 0
db 0x10, 0x00, "LSI Logic", 0
db 0x10, 0x01, "Kolter Electronic - Germany", 0
db 0x10, 0x02, "Advanced Micro Devices, Incorporated", 0
db 0x10, 0x03, "ULSI", 0
db 0x10, 0x04, "VLSI Technology", 0
db 0x10, 0x06, "Reply Group", 0
db 0x10, 0x07, "Netframe Systems Incorporated", 0
db 0x10, 0x08, "Epson", 0
db 0x10, 0x0A, "Âas Limited de Phoenix del ƒ de TecnologÃ", 0
db 0x10, 0x0B, "National Semiconductors", 0
db 0x10, 0x0C, "Tseng Labs", 0
db 0x10, 0x0D, "AST Research", 0
db 0x10, 0x0E, "Weitek", 0
db 0x10, 0x10, "Video Logic Limited", 0
db 0x10, 0x11, "Digital Equipment Corporation", 0
db 0x10, 0x12, "Micronics Computers Incorporated", 0
db 0x10, 0x13, "Cirrus Logic", 0
db 0x10, 0x14, "International Business Machines Corporation", 0
db 0x10, 0x16, "Fujitsu ICL Computers", 0
db 0x10, 0x17, "Spea Software AG", 0
db 0x10, 0x18, "Unisys Systems", 0
db 0x10, 0x19, "Elitegroup Computer System", 0
db 0x10, 0x1A, "NCR Corporation", 0
db 0x10, 0x1B, "Vitesse Semiconductor", 0
db 0x10, 0x1E, "American Megatrends Incorporated", 0
db 0x10, 0x1F, "PictureTel Corporation", 0
db 0x10, 0x20, "Hitachi Computer Electronics", 0
db 0x10, 0x21, "Oki Electric Industry", 0
db 0x10, 0x22, "Advanced Micro Devices", 0
db 0x10, 0x23, "<NAME>", 0
db 0x10, 0x25, "Acer Incorporated", 0
db 0x10, 0x28, "Dell Incorporated", 0
db 0x10, 0x2A, "LSI Logic Headland Division", 0
db 0x10, 0x2B, "Matrox Electronic Systems Limited", 0
db 0x10, 0x2C, "Asiliant (Chips And Technologies)", 0
db 0x10, 0x2D, "Wyse Technology", 0
db 0x10, 0x2E, "Olivetti Advanced Technology", 0
db 0x10, 0x2F, "Toshiba America", 0
db 0x10, 0x30, "TMC Research", 0
db 0x10, 0x31, "Miro Computer Products AG", 0
db 0x10, 0x33, "NEC Electronics", 0
db 0x10, 0x34, "Burndy Corporation", 0
db 0x10, 0x36, "Future Domain", 0
db 0x10, 0x37, "Hitachi Micro Systems Incorporated", 0
db 0x10, 0x38, "AMP Incorporated", 0
db 0x10, 0x39, "Silicon Integrated Systems", 0
db 0x10, 0x3A, "Seiko Epson Corporation", 0
db 0x10, 0x3B, "Tatung Corporation Of America", 0
db 0x10, 0x3C, "Hewlett-Packard", 0
db 0x10, 0x3E, "Solliday Engineering", 0
db 0x10, 0x3F, "Logic Modeling", 0
db 0x10, 0x41, "Computrend", 0
db 0x10, 0x43, "Asustek Computer Incorporated", 0
db 0x10, 0x44, "Distributed Processing Tech", 0
db 0x10, 0x45, "OPTi Incorporated", 0
db 0x10, 0x46, "IPC Corporation LTD", 0
db 0x10, 0x47, "Genoa Systems Corporation", 0
db 0x10, 0x48, "ELSA GmbH", 0
db 0x10, 0x49, "Fountain Technology", 0
db 0x10, 0x4A, "STMicroelectronics", 0
db 0x10, 0x4B, "Mylex / Buslogic", 0
db 0x10, 0x4C, "Texas Instruments", 0
db 0x10, 0x4D, "Sony Corporation", 0
db 0x10, 0x4E, "Oak Technology", 0
db 0x10, 0x4F, "Co-Time Computer Limited", 0
db 0x10, 0x50, "Winbond Electronics Corporation", 0
db 0x10, 0x51, "Anigma Corporation", 0
db 0x10, 0x53, "Young Micro Systems", 0
db 0x10, 0x54, "Hitachi Limited", 0
db 0x10, 0x55, "Standard Microsystems Corporation", 0
db 0x10, 0x56, "ICL", 0
db 0x10, 0x57, "Motorola", 0
db 0x10, 0x58, "Electronics & Telecommunication Res", 0
db 0x10, 0x59, "Kontron Canada", 0
db 0x10, 0x5A, "Promise Technology", 0
db 0x10, 0x5B, "Mobham chip", 0
db 0x10, 0x5C, "Wipro Infotech Limited", 0
db 0x10, 0x5D, "Number Nine Visual Technology", 0
db 0x10, 0x5E, "Vtech Engineering Canada Limited", 0
db 0x10, 0x5F, "Infotronic America Incorporated", 0
db 0x10, 0x60, "United Microelectronics", 0
db 0x10, 0x61, "8x8 Incorporated", 0
db 0x10, 0x62, "Maspar Computer Corporation", 0
db 0x10, 0x63, "Ocean Office Automation", 0
db 0x10, 0x64, "Alcatel Cit", 0
db 0x10, 0x65, "Texas Microsystems", 0
db 0x10, 0x66, "Picopower Technology", 0
db 0x10, 0x67, "Mitsubishi Electronics", 0
db 0x10, 0x68, "Diversified Technology", 0
db 0x10, 0x6A, "Aten Research Incorporated", 0
db 0x10, 0x6B, "Apple Incorporated", 0
db 0x10, 0x6C, "Hyundai Electronics America", 0
db 0x10, 0x6D, "Sequent Computer Systems", 0
db 0x10, 0x6E, "DFI Incorporated", 0
db 0x10, 0x6F, "City Gate Development LTD", 0
db 0x10, 0x70, "Daewoo Telecom Limited", 0
db 0x10, 0x71, "Mitac", 0
db 0x10, 0x72, "GIT Co. Limited", 0
db 0x10, 0x73, "Yamaha Corporation", 0
db 0x10, 0x74, "Nexgen Microsystems", 0
db 0x10, 0x75, "Advanced Integration Research", 0
db 0x10, 0x77, "QLogic Corporation", 0
db 0x10, 0x78, "Cyrix Corporation", 0
db 0x10, 0x79, "I-Bus", 0
db 0x10, 0x7A, "Networth controls", 0
db 0x10, 0x7B, "Gateway 2000", 0
db 0x10, 0x7C, "Goldstar Co. Limited", 0
db 0x10, 0x7D, "Leadtek Research", 0
db 0x10, 0x7E, "Testernec", 0
db 0x10, 0x7F, "Data Technology Corporation", 0
db 0x10, 0x80, "Cypress Semiconductor", 0
db 0x10, 0x81, "Radius Incorporated", 0
db 0x10, 0x82, "EFA Corporation Of America", 0
db 0x10, 0x83, "Forex Computer Corporation", 0
db 0x10, 0x84, "Parador", 0
db 0x10, 0x85, "Tulip Computers Int'l BV", 0
db 0x10, 0x86, "<NAME> Computer Systems", 0
db 0x10, 0x87, "Cache Computer", 0
db 0x10, 0x88, "Microcomputer Systems (M) Son", 0
db 0x10, 0x89, "Data General Corporation", 0
db 0x10, 0x8A, "SBS Operations", 0
db 0x10, 0x8C, "Oakleigh Systems Incorporated", 0
db 0x10, 0x8D, "Olicom", 0
db 0x10, 0x8E, "Sun Microsystems", 0
db 0x10, 0x8F, "Systemsoft Corporation", 0
db 0x10, 0x90, "Encore Computer Corporation", 0
db 0x10, 0x91, "Intergraph Corporation", 0
db 0x10, 0x92, "Diamond Computer Systems", 0
db 0x10, 0x93, "National Instruments", 0
db 0x10, 0x94, "Apostolos", 0
db 0x10, 0x95, "Silicon Image, Incorporated", 0
db 0x10, 0x96, "Alacron", 0
db 0x10, 0x97, "Appian Graphics", 0
db 0x10, 0x98, "Quantum Designs Limited", 0
db 0x10, 0x99, "Samsung Electronics Co. Limited", 0
db 0x10, 0x9A, "<NAME>", 0
db 0x10, 0x9B, "Gemlight Computer Limited", 0
db 0x10, 0x9C, "Megachips Corporation", 0
db 0x10, 0x9D, "Zida Technologies Limited", 0
db 0x10, 0x9E, "Brooktree Corporation", 0
db 0x10, 0x9F, "Trigem Computer Incorporated", 0
db 0x10, 0xA0, "Meidensha Corporation", 0
db 0x10, 0xA1, "Juko Electronics Incorporated Limited", 0
db 0x10, 0xA2, "Quantum Corporation", 0
db 0x10, 0xA3, "Everex Systems Incorporated", 0
db 0x10, 0xA4, "Globe Manufacturing Sales", 0
db 0x10, 0xA5, "Racal Interlan", 0
db 0x10, 0xA8, "Sierra Semiconductor", 0
db 0x10, 0xA9, "Silicon Graphics", 0
db 0x10, 0xAB, "Digicom", 0
db 0x10, 0xAC, "Honeywell IASD", 0
db 0x10, 0xAD, "Winbond Systems Labs", 0
db 0x10, 0xAE, "Cornerstone Technology", 0
db 0x10, 0xAF, "Micro Computer Systems Incorporated", 0
db 0x10, 0xB0, "Gainward GmbH", 0
db 0x10, 0xB1, "Cabletron Systems Incorporated", 0
db 0x10, 0xB2, "Raytheon Company", 0
db 0x10, 0xB3, "Databook Incorporated", 0
db 0x10, 0xB4, "STB Systems", 0
db 0x10, 0xB5, "PLX Technology Incorporated", 0
db 0x10, 0xB6, "Madge Networks", 0
db 0x10, 0xB7, "3Com Corporation", 0
db 0x10, 0xB8, "Standard Microsystems Corporation", 0
db 0x10, 0xB9, "Ali Corporation", 0
db 0x10, 0xBA, "Mitsubishi Electronics Corporation", 0
db 0x10, 0xBB, "Dapha Electronics Corporation", 0
db 0x10, 0xBC, "Advanced Logic Research Incorporated", 0
db 0x10, 0xBD, "Surecom Technology", 0
db 0x10, 0xBE, "Tsenglabs International Corporation", 0
db 0x10, 0xBF, "MOST Corporation", 0
db 0x10, 0xC0, "Boca Research Incorporated", 0
db 0x10, 0xC1, "ICM Corporation Limited", 0
db 0x10, 0xC2, "Auspex Systems Incorporated", 0
db 0x10, 0xC3, "Samsung Semiconductors", 0
db 0x10, 0xC4, "Award Software Int'l Incorporated", 0
db 0x10, 0xC5, "Xerox Corporation", 0
db 0x10, 0xC6, "Rambus Incorporated", 0
db 0x10, 0xC8, "Neomagic Corporation", 0
db 0x10, 0xC9, "Dataexpert Corporation", 0
db 0x10, 0xCA, "Fujitsu Siemens", 0
db 0x10, 0xCB, "Omron Corporation", 0
db 0x10, 0xCD, "Advanced System Products", 0
db 0x10, 0xCF, "Fujitsu Limited", 0
db 0x10, 0xD1, "Future+ Systems", 0
db 0x10, 0xD2, "Molex Incorporated", 0
db 0x10, 0xD3, "Jabil Circuit Incorporated", 0
db 0x10, 0xD4, "Hualon Microelectronics", 0
db 0x10, 0xD5, "Autologic Incorporated", 0
db 0x10, 0xD6, "Wilson .co .ltd", 0
db 0x10, 0xD7, "BCM Advanced Research", 0
db 0x10, 0xD8, "Advanced Peripherals Labs", 0
db 0x10, 0xD9, "Macronix International Co. Limited", 0
db 0x10, 0xDB, "Rohm Research", 0
db 0x10, 0xDC, "CERN-European Lab. for Particle Physics", 0
db 0x10, 0xDD, "Evans & Sutherland", 0
db 0x10, 0xDE, "NVIDIA", 0
db 0x10, 0xDF, "Emulex Corporation", 0
db 0x10, 0xE1, "Tekram Technology Corporation Limited", 0
db 0x10, 0xE2, "Aptix Corporation", 0
db 0x10, 0xE3, "Tundra Semiconductor Corporation", 0
db 0x10, 0xE4, "Tandem Computers", 0
db 0x10, 0xE5, "Micro Industries Corporation", 0
db 0x10, 0xE6, "Gainbery Computer Products Incorporated", 0
db 0x10, 0xE7, "Vadem", 0
db 0x10, 0xE8, "Applied Micro Circuits Corporation", 0
db 0x10, 0xE9, "Alps Electronic Corporation Limited", 0
db 0x10, 0xEA, "Tvia, Incorporated", 0
db 0x10, 0xEB, "Artist Graphics", 0
db 0x10, 0xEC, "Realtek Semiconductor Corporation", 0
db 0x10, 0xED, "Ascii Corporation", 0
db 0x10, 0xEE, "Xilinx Corporation", 0
db 0x10, 0xEF, "Racore Computer Products", 0
db 0x10, 0xF0, "Curtiss-Wright Controls Embedded Computing", 0
db 0x10, 0xF1, "Tyan Computer", 0
db 0x10, 0xF2, "Achme Computer Incorporated - GONE !!!!", 0
db 0x10, 0xF3, "Alaris Incorporated", 0
db 0x10, 0xF4, "S-Mos Systems", 0
db 0x10, 0xF5, "NKK Corporation", 0
db 0x10, 0xF6, "Creative Electronic Systems SA", 0
db 0x10, 0xF7, "Matsushita Electric Industrial Corporation", 0
db 0x10, 0xF8, "Altos India Limited", 0
db 0x10, 0xF9, "PC Direct", 0
db 0x10, 0xFA, "Truevision", 0
db 0x10, 0xFB, "Thesys Microelectronic's", 0
db 0x10, 0xFC, "I-O Data Device Incorporated", 0
db 0x10, 0xFD, "Soyo Technology Corporation Limited", 0
db 0x10, 0xFE, "Fast Electronic GmbH", 0
db 0x10, 0xFF, "Ncube", 0
db 0x11, 0x00, "Jazz Multimedia", 0
db 0x11, 0x01, "Initio Corporation", 0
db 0x11, 0x02, "Creative Technology LTD.", 0
db 0x11, 0x03, "HighPoint Technologies, Incorporated", 0
db 0x11, 0x04, "Rasterops", 0
db 0x11, 0x05, "Sigma Designs Incorporated", 0
db 0x11, 0x06, "VIA Technologies, Incorporated", 0
db 0x11, 0x07, "Stratus Computer", 0
db 0x11, 0x08, "Proteon Incorporated", 0
db 0x11, 0x09, "Adaptec/Cogent Data Technologies", 0
db 0x11, 0x0A, "Siemens AG", 0
db 0x11, 0x0B, "Chromatic Research Incorporated", 0
db 0x11, 0x0C, "Mini-Max Technology Incorporated", 0
db 0x11, 0x0D, "ZNYX Corporation", 0
db 0x11, 0x0E, "CPU Technology", 0
db 0x11, 0x0F, "Ross Technology", 0
db 0x11, 0x12, "Osicom Technologies Incorporated", 0
db 0x11, 0x13, "Accton Technology Corporation", 0
db 0x11, 0x14, "Atmel Corporation", 0
db 0x11, 0x16, "Data Translation, Incorporated", 0
db 0x11, 0x17, "Datacube Incorporated", 0
db 0x11, 0x18, "Berg Electronics", 0
db 0x11, 0x19, "ICP vortex Computersysteme GmbH", 0
db 0x11, 0x1A, "Efficent Networks", 0
db 0x11, 0x1C, "Tricord Systems Incorporated", 0
db 0x11, 0x1D, "Integrated Device Technology Incorporated", 0
db 0x11, 0x1F, "Precision Digital Images", 0
db 0x11, 0x20, "EMC Corporation", 0
db 0x11, 0x21, "Zilog", 0
db 0x11, 0x23, "Excellent Design Incorporated", 0
db 0x11, 0x24, "Leutron Vision AG", 0
db 0x11, 0x25, "Eurocore/Vigra", 0
db 0x11, 0x27, "FORE Systems", 0
db 0x11, 0x29, "Firmworks", 0
db 0x11, 0x2A, "Hermes Electronics Co. Limited", 0
db 0x11, 0x2C, "Zenith Data Systems", 0
db 0x11, 0x2D, "Ravicad", 0
db 0x11, 0x2E, "Infomedia", 0
db 0x11, 0x30, "Computervision", 0
db 0x11, 0x31, "NXP Semiconductors N.V.", 0
db 0x11, 0x32, "Mitel Corporation", 0
db 0x11, 0x33, "Eicon Networks Corporation", 0
db 0x11, 0x34, "Mercury Computer Systems Incorporated", 0
db 0x11, 0x35, "Fuji Xerox Co Limited", 0
db 0x11, 0x36, "Momentum Data Systems", 0
db 0x11, 0x37, "Cisco Systems Incorporated", 0
db 0x11, 0x38, "Ziatech Corporation", 0
db 0x11, 0x39, "Dynamic Pictures Incorporated", 0
db 0x11, 0x3A, "FWB Incorporated", 0
db 0x11, 0x3B, "Network Computing Devices", 0
db 0x11, 0x3C, "Cyclone Microsystems Incorporated", 0
db 0x11, 0x3D, "Leading Edge Products Incorporated", 0
db 0x11, 0x3E, "Sanyo Electric Co", 0
db 0x11, 0x3F, "Equinox Systems", 0
db 0x11, 0x40, "Intervoice Incorporated", 0
db 0x11, 0x41, "Crest Microsystem Incorporated", 0
db 0x11, 0x42, "Alliance Semiconductor", 0
db 0x11, 0x43, "Netpower Incorporated", 0
db 0x11, 0x44, "<NAME>", 0
db 0x11, 0x45, "Workbit Corporation", 0
db 0x11, 0x46, "Force Computers", 0
db 0x11, 0x47, "Interface Corporation", 0
db 0x11, 0x48, "Marvell Semiconductor Germany GmbH", 0
db 0x11, 0x49, "Win System Corporation", 0
db 0x11, 0x4A, "VMIC", 0
db 0x11, 0x4B, "Canopus corporation", 0
db 0x11, 0x4C, "Annabooks", 0
db 0x11, 0x4D, "IC Corporation", 0
db 0x11, 0x4E, "Nikon Systems Incorporated", 0
db 0x11, 0x4F, "Digi International", 0
db 0x11, 0x50, "Thinking Machines Corporation", 0
db 0x11, 0x51, "JAE Electronics Incorporated", 0
db 0x11, 0x53, "Land Win Electronic Corporation", 0
db 0x11, 0x54, "Melco Incorporated", 0
db 0x11, 0x55, "Pine Technology Limited", 0
db 0x11, 0x56, "Periscope Engineering", 0
db 0x11, 0x57, "Avsys Corporation", 0
db 0x11, 0x58, "Voarx R&D Incorporated", 0
db 0x11, 0x59, "Mutech", 0
db 0x11, 0x5A, "Harlequin Limited", 0
db 0x11, 0x5B, "Parallax Graphics", 0
db 0x11, 0x5C, "Photron Limited", 0
db 0x11, 0x5D, "Xircom", 0
db 0x11, 0x5E, "Peer Protocols Incorporated", 0
db 0x11, 0x5F, "Maxtor Corporation", 0
db 0x11, 0x60, "Megasoft Incorporated", 0
db 0x11, 0x61, "PFU Limited", 0
db 0x11, 0x62, "OA Laboratory Co Limited", 0
db 0x11, 0x63, "<NAME>", 0
db 0x11, 0x64, "Advanced Peripherals Tech", 0
db 0x11, 0x65, "Imagraph Corporation", 0
db 0x11, 0x66, "Broadcom / ServerWorks", 0
db 0x11, 0x67, "Mutoh Industries Incorporated", 0
db 0x11, 0x68, "Thine Electronics Incorporated", 0
db 0x11, 0x69, "Centre f/Dev. of Adv. Computing", 0
db 0x11, 0x6A, "Luminex Software, Incorporated", 0
db 0x11, 0x6B, "Connectware Incorporated", 0
db 0x11, 0x6C, "Intelligent Resources", 0
db 0x11, 0x6E, "Electronics for Imaging", 0
db 0x11, 0x70, "Inventec Corporation", 0
db 0x11, 0x72, "Altera Corporation", 0
db 0x11, 0x73, "Adobe Systems", 0
db 0x11, 0x74, "Bridgeport Machines", 0
db 0x11, 0x75, "Mitron Computer Incorporated", 0
db 0x11, 0x76, "SBE", 0
db 0x11, 0x77, "Silicon Engineering", 0
db 0x11, 0x78, "Alfa Incorporated", 0
db 0x11, 0x79, "Toshiba corporation", 0
db 0x11, 0x7A, "A-Trend Technology", 0
db 0x11, 0x7B, "LG (Lucky Goldstar) Electronics Incorporated", 0
db 0x11, 0x7C, "Atto Technology", 0
db 0x11, 0x7D, "<NAME>", 0
db 0x11, 0x7E, "T/R Systems", 0
db 0x11, 0x7F, "Integrated Circuit Systems", 0
db 0x11, 0x80, "RicohCompany,Limited", 0
db 0x11, 0x83, "Fujikura Limited", 0
db 0x11, 0x84, "Forks Incorporated", 0
db 0x11, 0x85, "Dataworld", 0
db 0x11, 0x86, "D-Link System Incorporated", 0
db 0x11, 0x87, "Philips Healthcare", 0
db 0x11, 0x88, "Shima Seiki Manufacturing Limited", 0
db 0x11, 0x89, "Matsushita Electronics", 0
db 0x11, 0x8A, "Hilevel Technology", 0
db 0x11, 0x8B, "Hypertec Pty Limited", 0
db 0x11, 0x8C, "Corollary Incorporated", 0
db 0x11, 0x8D, "BitFlow Incorporated", 0
db 0x11, 0x8E, "Hermstedt AG", 0
db 0x11, 0x8F, "Green Logic", 0
db 0x11, 0x90, "Tripace", 0
db 0x11, 0x91, "Acard Technology Corporation", 0
db 0x11, 0x92, "Densan Co. Limited", 0
db 0x11, 0x94, "Toucan Technology", 0
db 0x11, 0x95, "Ratoc System Incorporated", 0
db 0x11, 0x96, "Hytec Electronics Limited", 0
db 0x11, 0x97, "Gage Applied Technologies", 0
db 0x11, 0x98, "Lambda Systems Incorporated", 0
db 0x11, 0x99, "Attachmate Corporation", 0
db 0x11, 0x9A, "Mind/Share Incorporated", 0
db 0x11, 0x9B, "Omega Micro Incorporated", 0
db 0x11, 0x9C, "Information Technology Inst.", 0
db 0x11, 0x9D, "Bug Sapporo Japan", 0
db 0x11, 0x9E, "Fujitsu Microelectronics Limited", 0
db 0x11, 0x9F, "Bull Hn Information Systems", 0
db 0x11, 0xA1, "Hamamatsu Photonics K.K.", 0
db 0x11, 0xA2, "Sierra Research and Technology", 0
db 0x11, 0xA3, "Deuretzbacher GmbH & Co. Eng. KG", 0
db 0x11, 0xA4, "Barco", 0
db 0x11, 0xA5, "MicroUnity Systems Engineering Incorporated", 0
db 0x11, 0xA6, "Pure Data", 0
db 0x11, 0xA7, "Power Computing Corporation", 0
db 0x11, 0xA8, "Systech Corporation", 0
db 0x11, 0xA9, "InnoSys Incorporated", 0
db 0x11, 0xAA, "Actel", 0
db 0x11, 0xAB, "Marvell Semiconductor", 0
db 0x11, 0xAC, "Canon Information Systems", 0
db 0x11, 0xAD, "Lite-On Technology Corporation", 0
db 0x11, 0xAE, "Scitex Corporation Limited", 0
db 0x11, 0xAF, "Avid Technology, Incorporated", 0
db 0x11, 0xB0, "Quicklogic Corporation", 0
db 0x11, 0xB1, "Apricot Computers", 0
db 0x11, 0xB2, "<NAME>", 0
db 0x11, 0xB3, "Barr Systems Incorporated", 0
db 0x11, 0xB4, "Leitch Technology International", 0
db 0x11, 0xB5, "Radstone Technology Limited", 0
db 0x11, 0xB6, "United Video Corporation", 0
db 0x11, 0xB7, "Motorola", 0
db 0x11, 0xB8, "Xpoint Technologies Incorporated", 0
db 0x11, 0xB9, "Pathlight Technology Incorporated", 0
db 0x11, 0xBA, "Videotron Corporation", 0
db 0x11, 0xBB, "Pyramid Technology", 0
db 0x11, 0xBC, "Network Peripherals Incorporated", 0
db 0x11, 0xBD, "Pinnacle system", 0
db 0x11, 0xBE, "International Microcircuits Incorporated", 0
db 0x11, 0xBF, "Astrodesign Incorporated", 0
db 0x11, 0xC1, "LSI Corporation", 0
db 0x11, 0xC2, "Sand Microelectronics", 0
db 0x11, 0xC4, "Document Technologies Ind.", 0
db 0x11, 0xC5, "Shiva Corporationoratin", 0
db 0x11, 0xC6, "Dainippon Screen Mfg. Co", 0
db 0x11, 0xC7, "D.C.M. Data Systems", 0
db 0x11, 0xC8, "Dolphin Interconnect Solutions", 0
db 0x11, 0xC9, "MAGMA", 0
db 0x11, 0xCA, "LSI Systems Incorporated", 0
db 0x11, 0xCB, "Specialix International Limited", 0
db 0x11, 0xCC, "Michels & Kleberhoff Computer GmbH", 0
db 0x11, 0xCD, "HAL Computer Systems Incorporated", 0
db 0x11, 0xCE, "Primary Rate Incorporated", 0
db 0x11, 0xCF, "Pioneer Electronic Corporation", 0
db 0x11, 0xD0, "BAE SYSTEMS - Manassas", 0
db 0x11, 0xD1, "AuraVision Corporation", 0
db 0x11, 0xD2, "Intercom Incorporated", 0
db 0x11, 0xD3, "Trancell Systems Incorporated", 0
db 0x11, 0xD4, "Analog Devices, Incorporated", 0
db 0x11, 0xD5, "Tahoma Technology", 0
db 0x11, 0xD6, "Tekelec Technologies", 0
db 0x11, 0xD7, "TRENTON Technology, Incorporated", 0
db 0x11, 0xD8, "Image Technologies Development", 0
db 0x11, 0xD9, "Tec Corporation", 0
db 0x11, 0xDA, "Novell", 0
db 0x11, 0xDB, "Sega Enterprises Limited", 0
db 0x11, 0xDC, "Questra Corporation", 0
db 0x11, 0xDD, "Crosfield Electronics Limited", 0
db 0x11, 0xDE, "Zoran Corporation", 0
db 0x11, 0xE1, "Gec Plessey Semi Incorporated", 0
db 0x11, 0xE2, "Samsung Information Systems America", 0
db 0x11, 0xE3, "Quicklogic Corporation", 0
db 0x11, 0xE4, "Second Wave Incorporated", 0
db 0x11, 0xE5, "IIX Consulting", 0
db 0x11, 0xE6, "Mitsui-Zosen System Research", 0
db 0x11, 0xE8, "Digital Processing Systems Incorporated", 0
db 0x11, 0xE9, "Highwater Designs Limited", 0
db 0x11, 0xEA, "<NAME>", 0
db 0x11, 0xEB, "Formation, Incorporated", 0
db 0x11, 0xEC, "Coreco Incorporated", 0
db 0x11, 0xED, "Mediamatics", 0
db 0x11, 0xEE, "Dome Imaging Systems Incorporated", 0
db 0x11, 0xEF, "Nicolet Technologies BV", 0
db 0x11, 0xF0, "Triya", 0
db 0x11, 0xF2, "Picture Tel Japan KK", 0
db 0x11, 0xF3, "Keithley Instruments, Incorporated", 0
db 0x11, 0xF4, "Kinetic Systems Corporation", 0
db 0x11, 0xF5, "Computing Devices Intl", 0
db 0x11, 0xF6, "Powermatic Data Systems Limited", 0
db 0x11, 0xF7, "Scientific Atlanta", 0
db 0x11, 0xF8, "PMC-Sierra Incorporated", 0
db 0x11, 0xF9, "I-Cube Incorporated", 0
db 0x11, 0xFA, "Kasan Electronics Co Limited", 0
db 0x11, 0xFB, "Datel Incorporated", 0
db 0x11, 0xFD, "High Street Consultants", 0
db 0x11, 0xFE, "Comtrol Corporation", 0
db 0x11, 0xFF, "Scion Corporation", 0
db 0x12, 0x00, "CSS Corporation", 0
db 0x12, 0x01, "Vista Controls Corporation", 0
db 0x12, 0x02, "Network General Corporation", 0
db 0x12, 0x03, "Bayer Corporation Agfa Div", 0
db 0x12, 0x04, "Lattice Semiconductor Corporation", 0
db 0x12, 0x05, "Array Corporation", 0
db 0x12, 0x06, "Amdahl Corporation", 0
db 0x12, 0x08, "Parsytec GmbH", 0
db 0x12, 0x09, "Sci Systems Incorporated", 0
db 0x12, 0x0A, "Synaptel", 0
db 0x12, 0x0B, "Adaptive Solutions", 0
db 0x12, 0x0D, "Compression Labs Incorporated", 0
db 0x12, 0x0E, "Cyclades Corporation", 0
db 0x12, 0x0F, "Essential Communications", 0
db 0x12, 0x10, "Hyperparallel Technologies", 0
db 0x12, 0x11, "Braintech Incorporated", 0
db 0x12, 0x13, "Applied Intelligent Systems Incorporated", 0
db 0x12, 0x14, "Performance Technologies Incorporated", 0
db 0x12, 0x15, "Interware Co Limited", 0
db 0x12, 0x16, "Purup-Eskofot A/S", 0
db 0x12, 0x17, "O2Micro Incorporated", 0
db 0x12, 0x18, "Hybricon Corporation", 0
db 0x12, 0x19, "First Virtual Corporation", 0
db 0x12, 0x1A, "3dfx Interactive Incorporated", 0
db 0x12, 0x1B, "Advanced Telecommunications Modules", 0
db 0x12, 0x1C, "Nippon Texa Co Limited", 0
db 0x12, 0x1D, "LiPPERT Embedded Computers GmbH", 0
db 0x12, 0x1E, "CSPI", 0
db 0x12, 0x1F, "Arcus Technology Incorporated", 0
db 0x12, 0x20, "Ariel Corporation", 0
db 0x12, 0x21, "Contec Microelectronics Europe BV", 0
db 0x12, 0x22, "Ancor Communications Incorporated", 0
db 0x12, 0x23, "Artesyn Embedded Technologies", 0
db 0x12, 0x24, "Interactive Images", 0
db 0x12, 0x25, "Power I/O Incorporated", 0
db 0x12, 0x27, "Tech-Source", 0
db 0x12, 0x28, "Norsk Elektro Optikk A/S", 0
db 0x12, 0x29, "Data Kinesis Incorporated", 0
db 0x12, 0x2A, "Integrated Telecom", 0
db 0x12, 0x2B, "LG Industrial Systems Co. Limited", 0
db 0x12, 0x2C, "sci-worx GmbH", 0
db 0x12, 0x2D, "Aztech System Limited", 0
db 0x12, 0x2E, "Absolute Analysis", 0
db 0x12, 0x2F, "Andrew Corporation", 0
db 0x12, 0x30, "Fishcamp Engineering", 0
db 0x12, 0x31, "Woodward McCoach Incorporated", 0
db 0x12, 0x33, "Bus-Tech Incorporated", 0
db 0x12, 0x34, "Technical Corporation", 0
db 0x12, 0x36, "Sigma Designs Incorporated", 0
db 0x12, 0x37, "Alta Technology Corporation", 0
db 0x12, 0x38, "Adtran", 0
db 0x12, 0x39, "The 3DO Company", 0
db 0x12, 0x3A, "Visicom Laboratories Incorporated", 0
db 0x12, 0x3B, "Seeq Technology Incorporated", 0
db 0x12, 0x3C, "Century Systems Incorporated", 0
db 0x12, 0x3D, "Engineering Design Team Incorporated", 0
db 0x12, 0x3F, "C-Cube Microsystems", 0
db 0x12, 0x40, "Marathon Technologies Corporation", 0
db 0x12, 0x41, "DSC Communications", 0
db 0x12, 0x42, "JNI Corporation", 0
db 0x12, 0x43, "Delphax", 0
db 0x12, 0x44, "AVM AUDIOVISUELLES MKTG & Computer GmbH", 0
db 0x12, 0x45, "APD S.A.", 0
db 0x12, 0x46, "Dipix Technologies Incorporated", 0
db 0x12, 0x47, "Xylon Research Incorporated", 0
db 0x12, 0x48, "Central Data Corporation", 0
db 0x12, 0x49, "Samsung Electronics Co. Limited", 0
db 0x12, 0x4A, "AEG Electrocom GmbH", 0
db 0x12, 0x4C, "Solitron Technologies Incorporated", 0
db 0x12, 0x4D, "Stallion Technologies", 0
db 0x12, 0x4E, "Cylink", 0
db 0x12, 0x4F, "Infortrend Technology Incorporated", 0
db 0x12, 0x50, "Hitachi Microcomputer System Limited", 0
db 0x12, 0x51, "VLSI Solution OY", 0
db 0x12, 0x53, "Guzik Technical Enterprises", 0
db 0x12, 0x54, "Linear Systems Limited", 0
db 0x12, 0x55, "Optibase Limited", 0
db 0x12, 0x56, "Perceptive Solutions Incorporated", 0
db 0x12, 0x57, "Vertex Networks Incorporated", 0
db 0x12, 0x58, "Gilbarco Incorporated", 0
db 0x12, 0x59, "Allied Telesyn International", 0
db 0x12, 0x5A, "ABB Power Systems", 0
db 0x12, 0x5B, "Asix Electronics Corporation", 0
db 0x12, 0x5C, "Aurora Technologies Incorporated", 0
db 0x12, 0x5D, "ESS Technology", 0
db 0x12, 0x5E, "Specialvideo Engineering SRL", 0
db 0x12, 0x5F, "Concurrent Technologies Incorporated", 0
db 0x12, 0x60, "Intersil Corporation", 0
db 0x12, 0x61, "Matsushita-Kotobuki Electronics Indu", 0
db 0x12, 0x62, "ES Computer Co. Limited", 0
db 0x12, 0x63, "Sonic Solutions", 0
db 0x12, 0x64, "Aval Nagasaki Corporation", 0
db 0x12, 0x65, "Casio Computer Co. Limited", 0
db 0x12, 0x66, "Microdyne Corporation", 0
db 0x12, 0x67, "S.A. Telecommunications", 0
db 0x12, 0x68, "Tektronix", 0
db 0x12, 0x69, "Thomson-CSF/TTM", 0
db 0x12, 0x6A, "Lexmark International Incorporated", 0
db 0x12, 0x6B, "Adax Incorporated", 0
db 0x12, 0x6C, "Nortel Networks Corporation", 0
db 0x12, 0x6D, "Splash Technology Incorporated", 0
db 0x12, 0x6E, "Sumitomo Metal Industries Limited", 0
db 0x12, 0x6F, "Silicon Motion", 0
db 0x12, 0x70, "Olympus Optical Co. Limited", 0
db 0x12, 0x71, "GW Instruments", 0
db 0x12, 0x72, "themrtaish", 0
db 0x12, 0x73, "Hughes Network Systems", 0
db 0x12, 0x74, "Ensoniq", 0
db 0x12, 0x75, "Network Appliance", 0
db 0x12, 0x76, "Switched Network Technologies Incorporated", 0
db 0x12, 0x77, "Comstream", 0
db 0x12, 0x78, "Transtech Parallel Systems", 0
db 0x12, 0x79, "Transmeta Corporation", 0
db 0x12, 0x7B, "Pixera Corporation", 0
db 0x12, 0x7C, "Crosspoint Solutions Incorporated", 0
db 0x12, 0x7D, "Vela Research LP", 0
db 0x12, 0x7E, "Winnov L.P.", 0
db 0x12, 0x7F, "Fujifilm", 0
db 0x12, 0x80, "Photoscript Group Limited", 0
db 0x12, 0x81, "Yokogawa Electronic Corporation", 0
db 0x12, 0x82, "Davicom Semiconductor Incorporated", 0
db 0x12, 0x83, "Waldo", 0
db 0x12, 0x85, "Platform Technologies Incorporated", 0
db 0x12, 0x86, "MAZeT GmbH", 0
db 0x12, 0x87, "LuxSonor Incorporated", 0
db 0x12, 0x88, "Timestep Corporation", 0
db 0x12, 0x89, "AVC Technology Incorporated", 0
db 0x12, 0x8A, "Asante Technologies Incorporated", 0
db 0x12, 0x8B, "Transwitch Corporation", 0
db 0x12, 0x8C, "Retix Corporation", 0
db 0x12, 0x8D, "G2 Networks Incorporated", 0
db 0x12, 0x8F, "Tateno Dennou Incorporated", 0
db 0x12, 0x90, "Sord Computer Corporation", 0
db 0x12, 0x91, "NCS Computer Italia", 0
db 0x12, 0x92, "Tritech Microelectronics Intl PTE", 0
db 0x12, 0x93, "Media Reality Technology", 0
db 0x12, 0x94, "Rhetorex Incorporated", 0
db 0x12, 0x95, "Imagenation Corporation", 0
db 0x12, 0x96, "Kofax Image Products", 0
db 0x12, 0x97, "Shuttle Computer", 0
db 0x12, 0x98, "Spellcaster Telecommunications Incorporated", 0
db 0x12, 0x99, "Knowledge Technology Laboratories", 0
db 0x12, 0x9A, "Curtiss Wright Controls Electronic Systems", 0
db 0x12, 0x9B, "Image Access", 0
db 0x12, 0x9D, "CompCore Multimedia Incorporated", 0
db 0x12, 0x9E, "Victor Co. of Japan Limited", 0
db 0x12, 0x9F, "OEC Medical Systems Incorporated", 0
db 0x12, 0xA0, "<NAME>.", 0
db 0x12, 0xA1, "Simpact Incorporated", 0
db 0x12, 0xA2, "NewGen Systems Corporation", 0
db 0x12, 0xA3, "Lucent Technologies AMR", 0
db 0x12, 0xA4, "NTT Electronics Corporation", 0
db 0x12, 0xA5, "Vision Dynamics Limited", 0
db 0x12, 0xA6, "Scalable Networks Incorporated", 0
db 0x12, 0xA7, "AMO GmbH", 0
db 0x12, 0xA8, "News Datacom", 0
db 0x12, 0xA9, "Xiotech Corporation", 0
db 0x12, 0xAA, "SDL Communications Incorporated", 0
db 0x12, 0xAB, "Yuan Yuan Enterprise Co. Limited", 0
db 0x12, 0xAC, "MeasureX Corporation", 0
db 0x12, 0xAD, "MULTIDATA GmbH", 0
db 0x12, 0xAE, "Alteon Networks Incorporated", 0
db 0x12, 0xAF, "TDK USA Corporation", 0
db 0x12, 0xB0, "Jorge Scientific Corporation", 0
db 0x12, 0xB1, "GammaLink", 0
db 0x12, 0xB2, "General Signal Networks", 0
db 0x12, 0xB3, "Interface Corporation Limited", 0
db 0x12, 0xB4, "Future Tel Incorporated", 0
db 0x12, 0xB5, "Granite Systems Incorporated", 0
db 0x12, 0xB7, "Acumen", 0
db 0x12, 0xB8, "Korg", 0
db 0x12, 0xB9, "3Com Corporation", 0
db 0x12, 0xBA, "Bittware Incorporated", 0
db 0x12, 0xBB, "Nippon Unisoft Corporation", 0
db 0x12, 0xBC, "Array Microsystems", 0
db 0x12, 0xBD, "Computerm Corporation", 0
db 0x12, 0xBF, "Fujifilm Microdevices", 0
db 0x12, 0xC0, "Infimed", 0
db 0x12, 0xC1, "GMM Research Corporation", 0
db 0x12, 0xC2, "Mentec Limited", 0
db 0x12, 0xC3, "Holtek Microelectronics Incorporated", 0
db 0x12, 0xC4, "Connect Tech Incorporated", 0
db 0x12, 0xC5, "Picture Elements Incorporated", 0
db 0x12, 0xC6, "Mitani Corporation", 0
db 0x12, 0xC7, "Dialogic Corporation", 0
db 0x12, 0xC8, "G Force Co. Limited", 0
db 0x12, 0xC9, "Gigi Operations", 0
db 0x12, 0xCA, "Integrated Computing Engines, Incorporated", 0
db 0x12, 0xCB, "Antex Electronics Corporation", 0
db 0x12, 0xCC, "Pluto Technologies International", 0
db 0x12, 0xCD, "Aims Lab", 0
db 0x12, 0xCE, "Netspeed Incorporated", 0
db 0x12, 0xCF, "Prophet Systems Incorporated", 0
db 0x12, 0xD0, "GDE Systems Incorporated", 0
db 0x12, 0xD1, "Huawei Technologies Co., Limited", 0
db 0x12, 0xD3, "Vingmed Sound A/S", 0
db 0x12, 0xD4, "Ulticom, Incorporated", 0
db 0x12, 0xD5, "Equator Technologies", 0
db 0x12, 0xD6, "Analogic Corporation", 0
db 0x12, 0xD7, "Biotronic SRL", 0
db 0x12, 0xD8, "Pericom Semiconductor", 0
db 0x12, 0xD9, "Aculab Plc.", 0
db 0x12, 0xDA, "TrueTime", 0
db 0x12, 0xDB, "Annapolis Micro Systems Incorporated", 0
db 0x12, 0xDC, "Symicron Computer Communication Limited", 0
db 0x12, 0xDD, "Management Graphics Incorporated", 0
db 0x12, 0xDE, "Rainbow Technologies", 0
db 0x12, 0xDF, "SBS Technologies Incorporated", 0
db 0x12, 0xE0, "Chase Research PLC", 0
db 0x12, 0xE1, "Nintendo Co. Limited", 0
db 0x12, 0xE2, "Datum Incorporated Bancomm-Timing Division", 0
db 0x12, 0xE3, "Imation Corporation - Medical Imaging Syst", 0
db 0x12, 0xE4, "Brooktrout Technology Incorporated", 0
db 0x12, 0xE6, "Cirel Systems", 0
db 0x12, 0xE7, "Sebring Systems Incorporated", 0
db 0x12, 0xE8, "CRISC Corporation", 0
db 0x12, 0xE9, "GE Spacenet", 0
db 0x12, 0xEB, "Aureal Semiconductor", 0
db 0x12, 0xEC, "3A International Incorporated", 0
db 0x12, 0xED, "Optivision Incorporated", 0
db 0x12, 0xEE, "Orange Micro, Incorporated", 0
db 0x12, 0xEF, "Vienna Systems", 0
db 0x12, 0xF0, "Pentek", 0
db 0x12, 0xF1, "Sorenson Vision Incorporated", 0
db 0x12, 0xF2, "Gammagraphx Incorporated", 0
db 0x12, 0xF4, "Megatel", 0
db 0x12, 0xF5, "Forks", 0
db 0x12, 0xF7, "Cognex", 0
db 0x12, 0xF8, "Electronic-Design GmbH", 0
db 0x12, 0xF9, "FourFold Technologies", 0
db 0x12, 0xFB, "Spectrum Signal Processing", 0
db 0x12, 0xFC, "Capital Equipment Corporation", 0
db 0x12, 0xFE, "esd Electronic System Design GmbH", 0
db 0x13, 0x03, "Innovative Integration", 0
db 0x13, 0x04, "Juniper Networks Incorporated", 0
db 0x13, 0x07, "ComputerBoards", 0
db 0x13, 0x08, "Jato Technologies Incorporated", 0
db 0x13, 0x0A, "Mitsubishi Electric Microcomputer", 0
db 0x13, 0x0B, "Colorgraphic Communications Corporation", 0
db 0x13, 0x0F, "Advanet Incorporated", 0
db 0x13, 0x10, "Gespac", 0
db 0x13, 0x12, "Microscan Systems Incorporated", 0
db 0x13, 0x13, "Yaskawa Electric Co.", 0
db 0x13, 0x16, "Teradyne Incorporated", 0
db 0x13, 0x17, "ADMtek Incorporated", 0
db 0x13, 0x18, "Packet Engines, Incorporated", 0
db 0x13, 0x19, "Forte Media", 0
db 0x13, 0x1F, "SIIG", 0
db 0x13, 0x25, "austriamicrosystems", 0
db 0x13, 0x26, "Seachange International", 0
db 0x13, 0x28, "CIFELLI SYSTEMS CORPORATION", 0
db 0x13, 0x31, "RadiSys Corporation", 0
db 0x13, 0x32, "Curtiss-Wright Controls Embedded Computing", 0
db 0x13, 0x35, "Videomail Incorporated", 0
db 0x13, 0x3D, "Prisa Networks", 0
db 0x13, 0x3F, "SCM Microsystems", 0
db 0x13, 0x42, "Promax Systems Incorporated", 0
db 0x13, 0x44, "Micron Technology, Incorporated", 0
db 0x13, 0x47, "Spectracom Corporation", 0
db 0x13, 0x4A, "DTC Technology Corporation", 0
db 0x13, 0x4B, "ARK Research Corporation", 0
db 0x13, 0x4C, "Chori Joho System Co. Limited", 0
db 0x13, 0x4D, "PCTEL Incorporated", 0
db 0x13, 0x5A, "Brain Boxes Limited", 0
db 0x13, 0x5B, "Giganet Incorporated", 0
db 0x13, 0x5C, "Quatech Incorporated", 0
db 0x13, 0x5D, "ABB Network Partner AB", 0
db 0x13, 0x5E, "Sealevel Systems Incorporated", 0
db 0x13, 0x5F, "I-Data International A-S", 0
db 0x13, 0x60, "Meinberg Funkuhren GmbH & Co. KG", 0
db 0x13, 0x61, "Soliton Systems K.K.", 0
db 0x13, 0x63, "Phoenix Technologies Limited", 0
db 0x13, 0x65, "Hypercope Corporation", 0
db 0x13, 0x66, "Teijin Seiki Co. Limited", 0
db 0x13, 0x67, "Hitachi Zosen Corporation", 0
db 0x13, 0x68, "Skyware Corporation", 0
db 0x13, 0x69, "Digigram", 0
db 0x13, 0x6B, "Kawasaki Steel Corporation", 0
db 0x13, 0x6C, "Adtek System Science Co Limited", 0
db 0x13, 0x75, "Boeing - Sunnyvale", 0
db 0x13, 0x7A, "Mark Of The Unicorn Incorporated", 0
db 0x13, 0x7B, "PPT Vision", 0
db 0x13, 0x7C, "Iwatsu Electric Co Limited", 0
db 0x13, 0x7D, "Dynachip Corporation", 0
db 0x13, 0x7E, "Patriot Scientific Corporation", 0
db 0x13, 0x80, "Sanritz Automation Co LTC", 0
db 0x13, 0x81, "Brains Co. Limited", 0
db 0x13, 0x82, "Marian - Electronic & Software", 0
db 0x13, 0x84, "Stellar Semiconductor Incorporated", 0
db 0x13, 0x85, "Netgear", 0
db 0x13, 0x87, "Curtiss-Wright Controls Electronic Systems", 0
db 0x13, 0x88, "Hitachi Information Technology Co Limited", 0
db 0x13, 0x89, "Applicom International", 0
db 0x13, 0x8A, "Validity Sensors, Incorporated", 0
db 0x13, 0x8B, "Tokimec Incorporated", 0
db 0x13, 0x8E, "Basler GMBH", 0
db 0x13, 0x8F, "Patapsco Designs Incorporated", 0
db 0x13, 0x90, "Concept Development Incorporated", 0
db 0x13, 0x93, "Moxa Technologies Co Limited", 0
db 0x13, 0x94, "Level One Communications", 0
db 0x13, 0x95, "Ambicom Incorporated", 0
db 0x13, 0x96, "Cipher Systems Incorporated", 0
db 0x13, 0x97, "Cologne Chip Designs GmbH", 0
db 0x13, 0x98, "Clarion Co. Limited", 0
db 0x13, 0x9A, "Alacritech Incorporated", 0
db 0x13, 0x9D, "Xstreams PLC/ EPL Limited", 0
db 0x13, 0x9E, "Echostar Data Networks", 0
db 0x13, 0xA0, "Crystal Group Incorporated", 0
db 0x13, 0xA1, "Kawasaki Heavy Industries Limited", 0
db 0x13, 0xA3, "HI-FN Incorporated", 0
db 0x13, 0xA4, "Rascom Incorporated", 0
db 0x13, 0xA7, "amc330", 0
db 0x13, 0xA8, "Exar Corporation", 0
db 0x13, 0xA9, "Siemens Healthcare", 0
db 0x13, 0xAA, "Nortel Networks - BWA Division", 0
db 0x13, 0xAF, "T.Sqware", 0
db 0x13, 0xB1, "Tamura Corporation", 0
db 0x13, 0xB4, "Wellbean Co Incorporated", 0
db 0x13, 0xB5, "ARM Limited", 0
db 0x13, 0xB6, "DLoG Gesellschaft für elektronische Datentechnik mbH", 0
db 0x13, 0xB8, "Nokia Telecommunications OY", 0
db 0x13, 0xBD, "Sharp Corporation", 0
db 0x13, 0xBF, "Sharewave Incorporated", 0
db 0x13, 0xC0, "Microgate Corporation", 0
db 0x13, 0xC1, "LSI", 0
db 0x13, 0xC2, "Technotrend Systemtechnik GMBH", 0
db 0x13, 0xC3, "Janz Computer AG", 0
db 0x13, 0xC7, "Blue Chip Technology Limited", 0
db 0x13, 0xCC, "Metheus Corporation", 0
db 0x13, 0xCF, "Studio Audio & Video Limited", 0
db 0x13, 0xD0, "B2C2 Incorporated", 0
db 0x13, 0xD1, "AboCom Systems, Incorporated", 0
db 0x13, 0xD4, "Graphics Microsystems Incorporated", 0
db 0x13, 0xD6, "K.I. Technology Co Limited", 0
db 0x13, 0xD7, "Toshiba Engineering Corporation", 0
db 0x13, 0xD8, "Phobos Corporation", 0
db 0x13, 0xD9, "Apex Incorporated", 0
db 0x13, 0xDC, "Netboost Corporation", 0
db 0x13, 0xDE, "ABB Robotics Products AB", 0
db 0x13, 0xDF, "E-Tech Incorporated", 0
db 0x13, 0xE0, "GVC Corporation", 0
db 0x13, 0xE3, "Nest Incorporated", 0
db 0x13, 0xE4, "Calculex Incorporated", 0
db 0x13, 0xE5, "Telesoft Design Limited", 0
db 0x13, 0xE9, "Intraserver Technology Incorporated", 0
db 0x13, 0xEA, "Dallas Semiconductor", 0
db 0x13, 0xF0, "IC Plus Corporation", 0
db 0x13, 0xF1, "OCE - Industries S.A.", 0
db 0x13, 0xF4, "Troika Networks Incorporated", 0
db 0x13, 0xF6, "C-Media Electronics Incorporated", 0
db 0x13, 0xF9, "NTT Advanced Technology Corporation", 0
db 0x13, 0xFA, "Pentland Systems Limited", 0
db 0x13, 0xFB, "Aydin Corporation", 0
db 0x13, 0xFD, "Micro Science Incorporated", 0
db 0x13, 0xFE, "Advantech Co., Limited", 0
db 0x13, 0xFF, "Silicon Spice Incorporated", 0
db 0x14, 0x00, "ArtX Incorporated", 0
db 0x14, 0x02, "Meilhaus Electronic GmbH Germany", 0
db 0x14, 0x04, "Fundamental Software Incorporated", 0
db 0x14, 0x06, "Oce Print Logics Technologies S.A.", 0
db 0x14, 0x07, "Lava Computer MFG Incorporated", 0
db 0x14, 0x08, "Aloka Co. Limited", 0
db 0x14, 0x09, "SUNIX Co., Limited", 0
db 0x14, 0x0A, "DSP Research Incorporated", 0
db 0x14, 0x0B, "Ramix Incorporated", 0
db 0x14, 0x0D, "Matsushita Electric Works Limited", 0
db 0x14, 0x0F, "Salient Systems Corporation", 0
db 0x14, 0x12, "IC Ensemble, Incorporated", 0
db 0x14, 0x13, "Addonics", 0
db 0x14, 0x15, "Oxford Semiconductor Limited- now part of PLX Technology", 0
db 0x14, 0x18, "Kyushu Electronics Systems Incorporated", 0
db 0x14, 0x19, "Excel Switching Corporation", 0
db 0x14, 0x1B, "Zoom Telephonics Incorporated", 0
db 0x14, 0x1E, "Fanuc Co. Limited", 0
db 0x14, 0x1F, "Visiontech Limited", 0
db 0x14, 0x20, "Psion Dacom PLC", 0
db 0x14, 0x25, "Chelsio Communications", 0
db 0x14, 0x28, "Edec Co Limited", 0
db 0x14, 0x29, "Unex Technology Corporation", 0
db 0x14, 0x2A, "Kingmax Technology Incorporated", 0
db 0x14, 0x2B, "Radiolan", 0
db 0x14, 0x2C, "Minton Optic Industry Co Limited", 0
db 0x14, 0x2D, "Pixstream Incorporated", 0
db 0x14, 0x30, "ITT Aerospace/Communications Division", 0
db 0x14, 0x33, "Eltec Elektronik AG", 0
db 0x14, 0x35, "RTD Embedded Technologies, Incorporated", 0
db 0x14, 0x36, "CIS Technology Incorporated", 0
db 0x14, 0x37, "Nissin IncorporatedCo", 0
db 0x14, 0x38, "Atmel-Dream", 0
db 0x14, 0x3F, "Lightwell Co Limited- Zax Division", 0
db 0x14, 0x41, "Agie SA.", 0
db 0x14, 0x43, "Unibrain S.A.", 0
db 0x14, 0x45, "Logical Co Limited", 0
db 0x14, 0x46, "Graphin Co., LTD", 0
db 0x14, 0x47, "Aim GMBH", 0
db 0x14, 0x48, "Alesis Studio", 0
db 0x14, 0x4A, "ADLINK Technology Incorporated", 0
db 0x14, 0x4B, "Loronix Information Systems, Incorporated", 0
db 0x14, 0x4D, "sanyo", 0
db 0x14, 0x50, "Octave Communications Ind.", 0
db 0x14, 0x51, "SP3D Chip Design GMBH", 0
db 0x14, 0x53, "Mycom Incorporated", 0
db 0x14, 0x58, "Giga-Byte Technologies", 0
db 0x14, 0x5C, "Cryptek", 0
db 0x14, 0x5F, "Baldor Electric Company", 0
db 0x14, 0x60, "Dynarc Incorporated", 0
db 0x14, 0x62, "Micro-Star International Co Limited", 0
db 0x14, 0x63, "Fast Corporation", 0
db 0x14, 0x64, "Interactive Circuits & Systems Limited", 0
db 0x14, 0x68, "Ambit Microsystems Corporation", 0
db 0x14, 0x69, "Cleveland Motion Controls", 0
db 0x14, 0x6C, "Ruby Tech Corporation", 0
db 0x14, 0x6D, "Tachyon Incorporated", 0
db 0x14, 0x6E, "WMS Gaming", 0
db 0x14, 0x71, "Integrated Telecom Express Incorporated", 0
db 0x14, 0x73, "Zapex Technologies Incorporated", 0
db 0x14, 0x74, "<NAME> & Associates", 0
db 0x14, 0x77, "Net Insight", 0
db 0x14, 0x78, "Diatrend Corporation", 0
db 0x14, 0x7B, "Abit Computer Corporation", 0
db 0x14, 0x7F, "Nihon Unisys Limited", 0
db 0x14, 0x82, "Isytec - Integrierte Systemtechnik Gmbh", 0
db 0x14, 0x83, "Labway Coporation", 0
db 0x14, 0x85, "Erma - Electronic GMBH", 0
db 0x14, 0x89, "KYE Systems Corporation", 0
db 0x14, 0x8A, "Opto 22", 0
db 0x14, 0x8B, "Innomedialogic Incorporated", 0
db 0x14, 0x8C, "C.P. Technology Co. Limited", 0
db 0x14, 0x8D, "Digicom Systems Incorporated", 0
db 0x14, 0x8E, "OSI Plus Corporation", 0
db 0x14, 0x8F, "Plant Equipment Incorporated", 0
db 0x14, 0x90, "TC Labs Pty Limited", 0
db 0x14, 0x91, "Futronic", 0
db 0x14, 0x93, "Maker Communications", 0
db 0x14, 0x95, "Tokai Communications Industry Co. Limited", 0
db 0x14, 0x96, "Joytech Computer Co. Limited", 0
db 0x14, 0x97, "SMA Technologie AG", 0
db 0x14, 0x98, "Tews Technologies", 0
db 0x14, 0x99, "Micro-Technology Co Limited", 0
db 0x14, 0x9A, "Andor Technology Limited", 0
db 0x14, 0x9B, "Seiko Instruments Incorporated", 0
db 0x14, 0x9E, "Mapletree Networks Incorporated", 0
db 0x14, 0x9F, "Lectron Co Limited", 0
db 0x14, 0xA0, "Softing AG", 0
db 0x14, 0xA2, "Millennium Engineering Incorporated", 0
db 0x14, 0xA4, "GVC/BCM Advanced Research", 0
db 0x14, 0xA9, "Hivertec Incorporated", 0
db 0x14, 0xAB, "Mentor Graphics Corporation", 0
db 0x14, 0xB1, "Nextcom K.K.", 0
db 0x14, 0xB3, "Xpeed Incorporated", 0
db 0x14, 0xB4, "Philips Business Electronics B.V.", 0
db 0x14, 0xB5, "Creamware GmbH", 0
db 0x14, 0xB6, "Quantum Data Corporation", 0
db 0x14, 0xB7, "Proxim Incorporated", 0
db 0x14, 0xB9, "Aironet Wireless Communication", 0
db 0x14, 0xBA, "Internix Incorporated", 0
db 0x14, 0xBB, "Semtech Corporation", 0
db 0x14, 0xBE, "L3 Communications", 0
db 0x14, 0xC0, "Compal Electronics, Incorporated", 0
db 0x14, 0xC1, "Myricom Incorporated", 0
db 0x14, 0xC2, "DTK Computer", 0
db 0x14, 0xC4, "Iwasaki Information Systems Co Limited", 0
db 0x14, 0xC5, "ABB AB (Sweden)", 0
db 0x14, 0xC6, "Data Race Incorporated", 0
db 0x14, 0xC7, "Modular Technology Limited", 0
db 0x14, 0xC8, "Turbocomm Tech Incorporated", 0
db 0x14, 0xC9, "Odin Telesystems Incorporated", 0
db 0x14, 0xCB, "Billionton Systems Incorporated/Cadmus Micro Incorporated", 0
db 0x14, 0xCD, "Universal Scientific Ind.", 0
db 0x14, 0xCF, "TEK Microsystems Incorporated", 0
db 0x14, 0xD4, "Panacom Technology Corporation", 0
db 0x14, 0xD5, "Nitsuko Corporation", 0
db 0x14, 0xD6, "Accusys Incorporated", 0
db 0x14, 0xD7, "Hirakawa Hewtech Corporation", 0
db 0x14, 0xD8, "Hopf Elektronik GMBH", 0
db 0x14, 0xD9, "Alpha Processor Incorporated", 0
db 0x14, 0xDB, "Avlab Technology Incorporated", 0
db 0x14, 0xDC, "Amplicon Liveline Limited", 0
db 0x14, 0xDD, "Imodl Incorporated", 0
db 0x14, 0xDE, "Applied Integration Corporation", 0
db 0x14, 0xE3, "Amtelco", 0
db 0x14, 0xE4, "Broadcom", 0
db 0x14, 0xEA, "Planex Communications, Incorporated", 0
db 0x14, 0xEB, "Seiko Epson Corporation", 0
db 0x14, 0xEC, "Acqiris", 0
db 0x14, 0xED, "Datakinetics Limited", 0
db 0x14, 0xEF, "Carry Computer Eng. Co Limited", 0
db 0x14, 0xF1, "Conexant", 0
db 0x14, 0xF2, "Mobility Electronics, Incorporated", 0
db 0x14, 0xF4, "Tokyo Electronic Industry Co. Limited", 0
db 0x14, 0xF5, "Sopac Limited", 0
db 0x14, 0xF6, "Coyote Technologies LLC", 0
db 0x14, 0xF7, "Wolf Technology Incorporated", 0
db 0x14, 0xF8, "Audiocodes Incorporated", 0
db 0x14, 0xF9, "AG Communications", 0
db 0x14, 0xFB, "Transas Marine (UK) Limited", 0
db 0x14, 0xFC, "Quadrics Limited", 0
db 0x14, 0xFD, "Silex Technology Incorporated", 0
db 0x14, 0xFE, "Archtek Telecom Corporation", 0
db 0x14, 0xFF, "Twinhead International Corporation", 0
db 0x15, 0x01, "Banksoft Canada Limited", 0
db 0x15, 0x02, "Mitsubishi Electric Logistics Support Co", 0
db 0x15, 0x03, "Kawasaki LSI USA Incorporated", 0
db 0x15, 0x04, "Kaiser Electronics", 0
db 0x15, 0x06, "Chameleon Systems Incorporated", 0
db 0x15, 0x07, "Htec Limited", 0
db 0x15, 0x09, "First International Computer Incorporated", 0
db 0x15, 0x0B, "Yamashita Systems Corporation", 0
db 0x15, 0x0C, "Kyopal Co Limited", 0
db 0x15, 0x0D, "Warpspped Incorporated", 0
db 0x15, 0x0E, "C-Port Corporation", 0
db 0x15, 0x0F, "Intec GMBH", 0
db 0x15, 0x10, "Behavior Tech Computer Corporation", 0
db 0x15, 0x11, "Centillium Technology Corporation", 0
db 0x15, 0x12, "Rosun Technologies Incorporated", 0
db 0x15, 0x13, "Raychem", 0
db 0x15, 0x14, "TFL LAN Incorporated", 0
db 0x15, 0x15, "ICS Advent", 0
db 0x15, 0x16, "Myson Technology Incorporated", 0
db 0x15, 0x17, "Echotek Corporation", 0
db 0x15, 0x18, "Kontron Modular Computers GmbH (PEP Modular Computers GMBH)", 0
db 0x15, 0x19, "Telefon Aktiebolaget LM Ericsson", 0
db 0x15, 0x1A, "Globetek Incorporated", 0
db 0x15, 0x1B, "Combox Limited", 0
db 0x15, 0x1C, "Digital Audio Labs Incorporated", 0
db 0x15, 0x1D, "Fujitsu Computer Products Of America", 0
db 0x15, 0x1E, "Matrix Corporation", 0
db 0x15, 0x1F, "Topic Semiconductor Corporation", 0
db 0x15, 0x20, "Chaplet System Incorporated", 0
db 0x15, 0x21, "Bell Corporation", 0
db 0x15, 0x22, "Mainpine Limited", 0
db 0x15, 0x23, "Music Semiconductors", 0
db 0x15, 0x24, "ENE Technology Incorporated", 0
db 0x15, 0x25, "Impact Technologies", 0
db 0x15, 0x26, "ISS Incorporated", 0
db 0x15, 0x27, "Solectron", 0
db 0x15, 0x28, "Acksys", 0
db 0x15, 0x29, "American Microsystems Incorporated", 0
db 0x15, 0x2A, "Quickturn Design Systems", 0
db 0x15, 0x2B, "Flytech Technology Co Limited", 0
db 0x15, 0x2C, "Macraigor Systems LLC", 0
db 0x15, 0x2D, "Quanta Computer Incorporated", 0
db 0x15, 0x2E, "Melec Incorporated", 0
db 0x15, 0x2F, "Philips - Crypto", 0
db 0x15, 0x32, "Echelon Corporation", 0
db 0x15, 0x33, "Baltimore", 0
db 0x15, 0x34, "Road Corporation", 0
db 0x15, 0x35, "Evergreen Technologies Incorporated", 0
db 0x15, 0x37, "Datalex Communcations", 0
db 0x15, 0x38, "Aralion Incorporated", 0
db 0x15, 0x39, "Atelier Informatiques et Electronique Et", 0
db 0x15, 0x3A, "<NAME>", 0
db 0x15, 0x3B, "Terratec Electronic GMBH", 0
db 0x15, 0x3C, "Antal Electronic", 0
db 0x15, 0x3D, "Filanet Corporation", 0
db 0x15, 0x3E, "Techwell Incorporated", 0
db 0x15, 0x3F, "MIPS Technologies Incorporated", 0
db 0x15, 0x40, "Provideo Multimedia Co Limited", 0
db 0x15, 0x41, "Telocity Incorporated", 0
db 0x15, 0x42, "Vivid Technology Incorporated", 0
db 0x15, 0x43, "Silicon Laboratories", 0
db 0x15, 0x44, "DCM Technologies Limited", 0
db 0x15, 0x45, "VisionTek", 0
db 0x15, 0x46, "IOI Technology Corporation", 0
db 0x15, 0x47, "Mitutoyo Corporation", 0
db 0x15, 0x48, "Jet Propulsion Laboratory", 0
db 0x15, 0x49, "Interconnect Systems Solutions", 0
db 0x15, 0x4A, "Max Technologies Incorporated", 0
db 0x15, 0x4B, "Computex Co Limited", 0
db 0x15, 0x4C, "Visual Technology Incorporated", 0
db 0x15, 0x4D, "PAN International Industrial Corporation", 0
db 0x15, 0x4E, "Servotest Limited", 0
db 0x15, 0x4F, "Stratabeam Technology", 0
db 0x15, 0x50, "Open Network Company Limited", 0
db 0x15, 0x51, "Smart Electronic Development GMBH", 0
db 0x15, 0x53, "Chicony Electronics Company Limited", 0
db 0x15, 0x54, "Prolink Microsystems Corporation", 0
db 0x15, 0x55, "Gesytec GmbH", 0
db 0x15, 0x56, "PLDA", 0
db 0x15, 0x57, "Mediastar Co. Limited", 0
db 0x15, 0x58, "Clevo/Kapok Computer", 0
db 0x15, 0x59, "SI Logic Limited", 0
db 0x15, 0x5A, "Innomedia Incorporated", 0
db 0x15, 0x5B, "Protac International Corporation", 0
db 0x15, 0x5C, "s", 0
db 0x15, 0x5D, "MAC System Company Limited", 0
db 0x15, 0x5E, "KUKA Roboter GmbH", 0
db 0x15, 0x5F, "Perle Systems Limited", 0
db 0x15, 0x60, "Terayon Communications Systems", 0
db 0x15, 0x61, "Viewgraphics Incorporated", 0
db 0x15, 0x62, "Symbol Technologies, Incorporated", 0
db 0x15, 0x63, "A-Trend Technology Company Limited", 0
db 0x15, 0x64, "Yamakatsu Electronics Industry Company Limited", 0
db 0x15, 0x65, "Biostar Microtech Intl Corporation", 0
db 0x15, 0x66, "Ardent Technologies Incorporated", 0
db 0x15, 0x67, "Jungsoft", 0
db 0x15, 0x68, "DDK Electronics Incorporated", 0
db 0x15, 0x69, "Palit Microsystems Incorporated", 0
db 0x15, 0x6A, "Avtec Systems Incorporated", 0
db 0x15, 0x6B, "S2io Incorporated", 0
db 0x15, 0x6C, "Vidac Electronics GMBH", 0
db 0x15, 0x6D, "Alpha-Top Corporation", 0
db 0x15, 0x6E, "Alfa Incorporated", 0
db 0x15, 0x6F, "M-Systems Flash Disk Pioneers Limited", 0
db 0x15, 0x70, "Lecroy Corporation", 0
db 0x15, 0x71, "Contemporary Controls", 0
db 0x15, 0x72, "Otis Elevator Company", 0
db 0x15, 0x73, "Lattice - Vantis", 0
db 0x15, 0x74, "Fairchild Semiconductor", 0
db 0x15, 0x75, "Voltaire Advanced Data Security Limited", 0
db 0x15, 0x76, "Viewcast Com", 0
db 0x15, 0x78, "Hitt", 0
db 0x15, 0x79, "Dual Technology Corporation", 0
db 0x15, 0x7A, "Japan Elecronics Ind. Incorporated", 0
db 0x15, 0x7B, "Star Multimedia Corporation", 0
db 0x15, 0x7C, "Eurosoft (UK)", 0
db 0x15, 0x7D, "Gemflex Networks", 0
db 0x15, 0x7E, "Transition Networks", 0
db 0x15, 0x7F, "PX Instruments Technology Limited", 0
db 0x15, 0x80, "Primex Aerospace Co.", 0
db 0x15, 0x81, "SEH Computertechnik GMBH", 0
db 0x15, 0x82, "Cytec Corporation", 0
db 0x15, 0x83, "Inet Technologies Incorporated", 0
db 0x15, 0x84, "Vetronix Corporation Engenharia Limited", 0
db 0x15, 0x85, "Marconi Commerce Systems SRL", 0
db 0x15, 0x86, "Lancast Incorporated", 0
db 0x15, 0x87, "Konica Corporation", 0
db 0x15, 0x88, "Solidum Systems Corporation", 0
db 0x15, 0x89, "Atlantek Microsystems Pty Limited", 0
db 0x15, 0x8A, "Digalog Systems Incorporated", 0
db 0x15, 0x8B, "Allied Data Technologies", 0
db 0x15, 0x8C, "Hitachi Semiconductor & Devices Sales Co", 0
db 0x15, 0x8D, "Point Multimedia Systems", 0
db 0x15, 0x8E, "Lara Technology Incorporated", 0
db 0x15, 0x8F, "Ditect Coop", 0
db 0x15, 0x90, "3pardata Incorporated", 0
db 0x15, 0x91, "ARN", 0
db 0x15, 0x92, "Syba Tech Limited", 0
db 0x15, 0x93, "Bops Incorporated", 0
db 0x15, 0x94, "Netgame Limited", 0
db 0x15, 0x95, "Diva Systems Corporation", 0
db 0x15, 0x96, "Folsom Research Incorporated", 0
db 0x15, 0x97, "Memec Design Services", 0
db 0x15, 0x98, "Granite Microsystems", 0
db 0x15, 0x99, "Delta Electronics Incorporated", 0
db 0x15, 0x9A, "General Instrument", 0
db 0x15, 0x9B, "Faraday Technology Corporation", 0
db 0x15, 0x9C, "Stratus Computer Systems", 0
db 0x15, 0x9D, "Ningbo Harrison Electronics Co Limited", 0
db 0x15, 0x9E, "A-Max Technology Co Limited", 0
db 0x15, 0x9F, "Galea Network Security", 0
db 0x15, 0xA0, "Compumaster SRL", 0
db 0x15, 0xA1, "Geocast Network Systems Incorporated", 0
db 0x15, 0xA2, "Catalyst Enterprises Incorporated", 0
db 0x15, 0xA3, "Italtel", 0
db 0x15, 0xA4, "X-Net OY", 0
db 0x15, 0xA5, "Toyota MACS Incorporated", 0
db 0x15, 0xA6, "Sunlight Ultrasound Technologies Limited", 0
db 0x15, 0xA7, "SSE Telecom Incorporated", 0
db 0x15, 0xA8, "Shanghai Communications Technologies Cen", 0
db 0x15, 0xAA, "Moreton Bay", 0
db 0x15, 0xAB, "Bluesteel Networks Incorporated", 0
db 0x15, 0xAC, "North Atlantic Instruments", 0
db 0x15, 0xAD, "VMware Incorporated", 0
db 0x15, 0xAE, "Amersham Pharmacia Biotech", 0
db 0x15, 0xB0, "Zoltrix International Limited", 0
db 0x15, 0xB1, "Source Technology Incorporated", 0
db 0x15, 0xB2, "Mosaid Technologies Incorporated", 0
db 0x15, 0xB3, "Mellanox Technology", 0
db 0x15, 0xB4, "CCI/Triad", 0
db 0x15, 0xB5, "Cimetrics Incorporated", 0
db 0x15, 0xB6, "Texas Memory Systems Incorporated", 0
db 0x15, 0xB7, "Sandisk Corporation", 0
db 0x15, 0xB8, "Addi-Data GMBH", 0
db 0x15, 0xB9, "Maestro Digital Communications", 0
db 0x15, 0xBA, "Impacct Technology Corporation", 0
db 0x15, 0xBB, "Portwell Incorporated", 0
db 0x15, 0xBC, "Agilent Technologies", 0
db 0x15, 0xBD, "DFI Incorporated", 0
db 0x15, 0xBE, "Sola Electronics", 0
db 0x15, 0xBF, "High Tech Computer Corporation (HTC)", 0
db 0x15, 0xC0, "BVM Limited", 0
db 0x15, 0xC1, "Quantel", 0
db 0x15, 0xC2, "Newer Technology Incorporated", 0
db 0x15, 0xC3, "Taiwan Mycomp Co Limited", 0
db 0x15, 0xC4, "EVSX Incorporated", 0
db 0x15, 0xC5, "Procomp Informatics Limited", 0
db 0x15, 0xC6, "Technical University Of Budapest", 0
db 0x15, 0xC7, "Tateyama System Laboratory Co Limited", 0
db 0x15, 0xC8, "Penta Media Co. Limited", 0
db 0x15, 0xC9, "Serome Technology Incorporated", 0
db 0x15, 0xCA, "Bitboys OY", 0
db 0x15, 0xCB, "AG Electronics Limited", 0
db 0x15, 0xCC, "Hotrail Incorporated", 0
db 0x15, 0xCD, "Dreamtech Co Limited", 0
db 0x15, 0xCE, "Genrad Incorporated", 0
db 0x15, 0xCF, "Hilscher GMBH", 0
db 0x15, 0xD1, "Infineon Technologies AG", 0
db 0x15, 0xD2, "FIC (First International Computer Incorporated", 0
db 0x15, 0xD3, "NDS Technologies Israel Limited", 0
db 0x15, 0xD4, "Iwill Corporation", 0
db 0x15, 0xD5, "Tatung Co.", 0
db 0x15, 0xD6, "Entridia Corporation", 0
db 0x15, 0xD7, "Rockwell-Collins Incorporated", 0
db 0x15, 0xD8, "Cybernetics Technology Co Limited", 0
db 0x15, 0xD9, "Super Micro Computer Incorporated", 0
db 0x15, 0xDA, "Cyberfirm Incorporated", 0
db 0x15, 0xDB, "Applied Computing Systems Incorporated", 0
db 0x15, 0xDC, "Litronic Incorporated", 0
db 0x15, 0xDD, "Sigmatel Incorporated", 0
db 0x15, 0xDE, "Malleable Technologies Incorporated", 0
db 0x15, 0xE0, "Cacheflow Incorporated", 0
db 0x15, 0xE1, "Voice Technologies Group", 0
db 0x15, 0xE2, "Quicknet Technologies Incorporated", 0
db 0x15, 0xE3, "Networth Technologies Incorporated", 0
db 0x15, 0xE4, "VSN Systemen BV", 0
db 0x15, 0xE5, "Valley Technologies Incorporated", 0
db 0x15, 0xE6, "Agere Incorporated", 0
db 0x15, 0xE7, "GET Engineering Corporation", 0
db 0x15, 0xE8, "National Datacomm Corporation", 0
db 0x15, 0xE9, "Pacific Digital Corporation", 0
db 0x15, 0xEA, "<NAME>.", 0
db 0x15, 0xEB, "Drsearch GMBH", 0
db 0x15, 0xEC, "Beckhoff Automation GmbH", 0
db 0x15, 0xED, "Macrolink Incorporated", 0
db 0x15, 0xEE, "IN Win Development Incorporated", 0
db 0x15, 0xEF, "Intelligent Paradigm Incorporated", 0
db 0x15, 0xF0, "B-Tree Systems Incorporated", 0
db 0x15, 0xF1, "Times N Systems Incorporated", 0
db 0x15, 0xF2, "SPOT Imaging Solutions a division of Diagnostic Instruments Incorporated", 0
db 0x15, 0xF3, "Digitmedia Corporation", 0
db 0x15, 0xF4, "Valuesoft", 0
db 0x15, 0xF5, "Power Micro Research", 0
db 0x15, 0xF6, "Extreme Packet Device Incorporated", 0
db 0x15, 0xF7, "Banctec", 0
db 0x15, 0xF8, "Koga Electronics Co", 0
db 0x15, 0xF9, "Zenith Electronics Co", 0
db 0x15, 0xFA, "Axzam Corporation", 0
db 0x15, 0xFB, "Zilog Incorporated", 0
db 0x15, 0xFC, "Techsan Electronics Co Limited", 0
db 0x15, 0xFD, "N-Cubed.Net", 0
db 0x15, 0xFE, "Kinpo Electronics Incorporated", 0
db 0x15, 0xFF, "Fastpoint Technologies Incorporated", 0
db 0x16, 0x00, "Northrop Grumman - Canada Limited", 0
db 0x16, 0x01, "Tenta Technology", 0
db 0x16, 0x02, "Prosys-TEC Incorporated", 0
db 0x16, 0x03, "Nokia Wireless Business Communications", 0
db 0x16, 0x04, "Central System Research Co Limited", 0
db 0x16, 0x05, "Pairgain Technologies", 0
db 0x16, 0x06, "Europop AG", 0
db 0x16, 0x07, "Lava Semiconductor Manufacturing Incorporated", 0
db 0x16, 0x08, "Automated Wagering International", 0
db 0x16, 0x09, "Sciemetric Instruments Incorporated", 0
db 0x16, 0x0A, "Kollmorgen Servotronix", 0
db 0x16, 0x0B, "Onkyo Corporation", 0
db 0x16, 0x0C, "Oregon Micro Systems Incorporated", 0
db 0x16, 0x0D, "Aaeon Electronics Incorporated", 0
db 0x16, 0x0E, "CML Emergency Services", 0
db 0x16, 0x0F, "ITEC Co Limited", 0
db 0x16, 0x10, "Tottori Sanyo Electric Co Limited", 0
db 0x16, 0x11, "Bel Fuse Incorporated", 0
db 0x16, 0x12, "Telesynergy Research Incorporated", 0
db 0x16, 0x13, "System Craft Incorporated", 0
db 0x16, 0x14, "Jace Tech Incorporated", 0
db 0x16, 0x15, "Equus Computer Systems Incorporated", 0
db 0x16, 0x16, "Iotech Incorporated", 0
db 0x16, 0x17, "Rapidstream Incorporated", 0
db 0x16, 0x18, "Esec SA", 0
db 0x16, 0x19, "FarSite Communications Limited", 0
db 0x16, 0x1B, "Mobilian Israel Limited", 0
db 0x16, 0x1C, "Berkshire Products", 0
db 0x16, 0x1D, "Gatec", 0
db 0x16, 0x1E, "Kyoei Sangyo Co Limited", 0
db 0x16, 0x1F, "Arima Computer Corporation", 0
db 0x16, 0x20, "Sigmacom Co Limited", 0
db 0x16, 0x21, "Lynx Studio Technology Incorporated", 0
db 0x16, 0x22, "Nokia Home Communications", 0
db 0x16, 0x23, "KRF Tech Limited", 0
db 0x16, 0x24, "CE Infosys GMBH", 0
db 0x16, 0x25, "Warp Nine Engineering", 0
db 0x16, 0x26, "TDK Semiconductor Corporation", 0
db 0x16, 0x27, "BCom Electronics Incorporated", 0
db 0x16, 0x29, "Kongsberg Spacetec a.s.", 0
db 0x16, 0x2A, "Sejin Computerland Company Limited", 0
db 0x16, 0x2B, "Shanghai Bell Company Limited", 0
db 0x16, 0x2C, "C&H Technologies Incorporated", 0
db 0x16, 0x2D, "Reprosoft Company Limited", 0
db 0x16, 0x2E, "Margi Systems Incorporated", 0
db 0x16, 0x2F, "Rohde & Schwarz GMBH & Co KG", 0
db 0x16, 0x30, "Sky Computers Incorporated", 0
db 0x16, 0x31, "NEC Computer International", 0
db 0x16, 0x32, "Verisys Incorporated", 0
db 0x16, 0x33, "Adac Corporation", 0
db 0x16, 0x34, "Visionglobal Network Corporation", 0
db 0x16, 0x35, "Decros / S.ICZ a.s.", 0
db 0x16, 0x36, "Jean Company Limited", 0
db 0x16, 0x37, "NSI", 0
db 0x16, 0x38, "Eumitcom Technology Incorporated", 0
db 0x16, 0x3A, "Air Prime Incorporated", 0
db 0x16, 0x3B, "Glotrex Co Limited", 0
db 0x16, 0x3C, "intel", 0
db 0x16, 0x3D, "Heidelberg Digital LLC", 0
db 0x16, 0x3E, "3dpower", 0
db 0x16, 0x3F, "Renishaw PLC", 0
db 0x16, 0x40, "Intelliworxx Incorporated", 0
db 0x16, 0x41, "MKNet Corporation", 0
db 0x16, 0x42, "Bitland", 0
db 0x16, 0x43, "Hajime Industries Limited", 0
db 0x16, 0x44, "Western Avionics Limited", 0
db 0x16, 0x45, "Quick-Serv. Computer Co. Limited", 0
db 0x16, 0x46, "Nippon Systemware Co Limited", 0
db 0x16, 0x47, "Hertz Systemtechnik GMBH", 0
db 0x16, 0x48, "MeltDown Systems LLC", 0
db 0x16, 0x49, "Jupiter Systems", 0
db 0x16, 0x4A, "Aiwa Co. Limited", 0
db 0x16, 0x4C, "Department Of Defense", 0
db 0x16, 0x4D, "Ishoni Networks", 0
db 0x16, 0x4E, "Micrel Incorporated", 0
db 0x16, 0x4F, "Datavoice (Pty) Limited", 0
db 0x16, 0x50, "Admore Technology Incorporated", 0
db 0x16, 0x51, "Chaparral Network Storage", 0
db 0x16, 0x52, "Spectrum Digital Incorporated", 0
db 0x16, 0x53, "Nature Worldwide Technology Corporation", 0
db 0x16, 0x54, "Sonicwall Incorporated", 0
db 0x16, 0x55, "Dazzle Multimedia Incorporated", 0
db 0x16, 0x56, "Insyde Software Corporation", 0
db 0x16, 0x57, "Brocade Communications Systems", 0
db 0x16, 0x58, "Med Associates Incorporated", 0
db 0x16, 0x59, "Shiba Denshi Systems Incorporated", 0
db 0x16, 0x5A, "Epix Incorporated", 0
db 0x16, 0x5B, "Real-Time Digital Incorporated", 0
db 0x16, 0x5C, "<NAME>", 0
db 0x16, 0x5D, "Hsing Tech. Enterprise Co. Limited", 0
db 0x16, 0x5E, "Hyunju Computer Co. Limited", 0
db 0x16, 0x5F, "Comartsystem Korea", 0
db 0x16, 0x60, "Network Security Technologies Incorporated (NetSec)", 0
db 0x16, 0x61, "Worldspace Corporation", 0
db 0x16, 0x62, "Int Labs", 0
db 0x16, 0x63, "Elmec Incorporated Limited", 0
db 0x16, 0x64, "Fastfame Technology Co. Limited", 0
db 0x16, 0x65, "Edax Incorporated", 0
db 0x16, 0x66, "Norpak Corporation", 0
db 0x16, 0x67, "CoSystems Incorporated", 0
db 0x16, 0x68, "Actiontec Electronics Incorporated", 0
db 0x16, 0x6A, "Komatsu Limited", 0
db 0x16, 0x6B, "Supernet Incorporated", 0
db 0x16, 0x6C, "Shade Limited", 0
db 0x16, 0x6D, "Sibyte Incorporated", 0
db 0x16, 0x6E, "Schneider Automation Incorporated", 0
db 0x16, 0x6F, "Televox Software Incorporated", 0
db 0x16, 0x70, "Rearden Steel", 0
db 0x16, 0x71, "Atan Technology Incorporated", 0
db 0x16, 0x72, "Unitec Co. Limited", 0
db 0x16, 0x73, "pctel", 0
db 0x16, 0x75, "Square Wave Technology", 0
db 0x16, 0x76, "Emachines Incorporated", 0
db 0x16, 0x77, "<NAME>", 0
db 0x16, 0x78, "INH Semiconductor", 0
db 0x16, 0x79, "Tokyo Electron Device Limited", 0
db 0x16, 0x7F, "iba AG", 0
db 0x16, 0x80, "Dunti Corporation", 0
db 0x16, 0x81, "Hercules", 0
db 0x16, 0x82, "PINE Technology, Limited", 0
db 0x16, 0x88, "CastleNet Technology Incorporated", 0
db 0x16, 0x8A, "Utimaco Safeware AG", 0
db 0x16, 0x8B, "Circut Assembly Corporation", 0
db 0x16, 0x8C, "Atheros Communications Incorporated", 0
db 0x16, 0x8D, "NMI Electronics Limited", 0
db 0x16, 0x8E, "Hyundai MultiCAV Computer Co. Limited", 0
db 0x16, 0x8F, "KDS Innotech Corporation", 0
db 0x16, 0x90, "NetContinuum, Incorporated", 0
db 0x16, 0x93, "FERMA", 0
db 0x16, 0x95, "EPoX Computer Company Limited", 0
db 0x16, 0xAE, "SafeNet Incorporated", 0
db 0x16, 0xB3, "CNF Mobile Solutions", 0
db 0x16, 0xB8, "Sonnet Technologies, Incorporated", 0
db 0x16, 0xCA, "Cenatek Incorporated", 0
db 0x16, 0xCB, "Minolta Co. Limited", 0
db 0x16, 0xCC, "Inari Incorporated", 0
db 0x16, 0xD0, "Systemax", 0
db 0x16, 0xE0, "Third Millenium Test Solutions, Incorporated", 0
db 0x16, 0xE5, "Intellon Corporation", 0
db 0x16, 0xEC, "U.S. Robotics", 0
db 0x16, 0xF0, "LaserLinc Incorporated", 0
db 0x16, 0xF1, "Adicti Corporation", 0
db 0x16, 0xF3, "Jetway Information Company Limited", 0
db 0x16, 0xF6, "VideoTele.com Incorporated", 0
db 0x17, 0x00, "Antara LLC", 0
db 0x17, 0x01, "Interactive Computer Products Incorporated", 0
db 0x17, 0x02, "Internet Machines Corporation", 0
db 0x17, 0x03, "Desana Systems", 0
db 0x17, 0x04, "Clearwater Networks", 0
db 0x17, 0x05, "Digital First", 0
db 0x17, 0x06, "Pacific Broadband Communications", 0
db 0x17, 0x07, "Cogency Semiconductor Incorporated", 0
db 0x17, 0x08, "Harris Corporation", 0
db 0x17, 0x09, "Zarlink Semiconductor", 0
db 0x17, 0x0A, "Alpine Electronics Incorporated", 0
db 0x17, 0x0B, "NetOctave Incorporated", 0
db 0x17, 0x0C, "YottaYotta Incorporated", 0
db 0x17, 0x0D, "SensoMotoric Instruments GmbH", 0
db 0x17, 0x0E, "San Valley Systems, Incorporated", 0
db 0x17, 0x0F, "Cyberdyne Incorporated", 0
db 0x17, 0x10, "Pelago Networks", 0
db 0x17, 0x11, "MyName Technologies, Incorporated", 0
db 0x17, 0x12, "NICE Systems Incorporated", 0
db 0x17, 0x13, "TOPCON Corporation", 0
db 0x17, 0x25, "Vitesse Semiconductor", 0
db 0x17, 0x34, "Fujitsu-Siemens Computers GmbH", 0
db 0x17, 0x37, "LinkSys", 0
db 0x17, 0x3B, "Altima Communications Incorporated", 0
db 0x17, 0x43, "Peppercon AG", 0
db 0x17, 0x4B, "PC Partner Limited", 0
db 0x17, 0x52, "Global Brands Manufacture Limited", 0
db 0x17, 0x53, "TeraRecon Incorporated", 0
db 0x17, 0x55, "Alchemy Semiconductor Incorporated", 0
db 0x17, 0x6A, "General Dynamics Canada", 0
db 0x17, 0x75, "General Electric", 0
db 0x17, 0x89, "Ennyah Technologies Corporation", 0
db 0x17, 0x93, "Unitech Electronics Company Limited", 0
db 0x17, 0xA1, "Tascorp", 0
db 0x17, 0xA7, "Start Network Technology Company Limited", 0
db 0x17, 0xAA, "Legend Limited (Beijing)", 0
db 0x17, 0xAB, "Phillips Components", 0
db 0x17, 0xAF, "Hightech Information Systems Limited", 0
db 0x17, 0xBE, "Philips Semiconductors", 0
db 0x17, 0xC0, "Wistron Corporation", 0
db 0x17, 0xC4, "Movita", 0
db 0x17, 0xCC, "NetChip", 0
db 0x17, 0xCD, "Cadence Design Systems", 0
db 0x17, 0xD5, "Neterion Incorporated", 0
db 0x17, 0xDB, "Cray Incorporated", 0
db 0x17, 0xE9, "DH electronics GmbH / Sabrent", 0
db 0x17, 0xEE, "Connect Components Limited", 0
db 0x17, 0xF3, "RDC Semiconductor Company Limited", 0
db 0x17, 0xFE, "INPROCOMM", 0
db 0x18, 0x13, "Ambient Technologies Incorporated", 0
db 0x18, 0x14, "Ralink Technology, Corporation", 0
db 0x18, 0x15, "devolo AG", 0
db 0x18, 0x20, "InfiniCon Systems, Incorporated", 0
db 0x18, 0x24, "Avocent", 0
db 0x18, 0x41, "Panda Platinum", 0
db 0x18, 0x60, "Primagraphics Limited", 0
db 0x18, 0x6C, "Humusoft S.R.O", 0
db 0x18, 0x87, "Elan Digital Systems Limited", 0
db 0x18, 0x88, "Varisys Limited", 0
db 0x18, 0x8D, "Millogic Limited", 0
db 0x18, 0x90, "Egenera, Incorporated", 0
db 0x18, 0xBC, "Info-Tek Corporation", 0
db 0x18, 0xC9, "ARVOO Engineering BV", 0
db 0x18, 0xCA, "XGI Technology Incorporated", 0
db 0x18, 0xF1, "Spectrum Systementwicklung Microelectronic GmbH", 0
db 0x18, 0xF4, "Napatech A/S", 0
db 0x18, 0xF7, "Commtech, Incorporated", 0
db 0x18, 0xFB, "Resilience Corporation", 0
db 0x19, 0x04, "Ritmo", 0
db 0x19, 0x05, "WIS Technology, Incorporated", 0
db 0x19, 0x10, "Seaway Networks", 0
db 0x19, 0x12, "Renesas Electronics", 0
db 0x19, 0x31, "Option NV", 0
db 0x19, 0x41, "Stelar", 0
db 0x19, 0x54, "One Stop Systems, Incorporated", 0
db 0x19, 0x69, "Atheros Communications", 0
db 0x19, 0x71, "AGEIA Technologies, Incorporated", 0
db 0x19, 0x7B, "JMicron Technology Corporation", 0
db 0x19, 0x8A, "Nallatech", 0
db 0x19, 0x91, "Topstar Digital Technologies Co., Limited", 0
db 0x19, 0xA2, "ServerEngines", 0
db 0x19, 0xA8, "DAQDATA GmbH", 0
db 0x19, 0xAC, "Kasten Chase Applied Research", 0
db 0x19, 0xB6, "Mikrotik", 0
db 0x19, 0xE2, "Vector Informatik GmbH", 0
db 0x19, 0xE3, "DDRdrive LLC", 0
db 0x1A, 0x08, "Linux Networx", 0
db 0x1A, 0x41, "Tilera Corporation", 0
db 0x1A, 0x42, "Imaginant", 0
db 0x1B, 0x13, "Jaton Corporation USA", 0
db 0x1B, 0x21, "Asustek - ASMedia Technology Incorporated", 0
db 0x1B, 0x6F, "Etron", 0
db 0x1B, 0x73, "Fresco Logic Incorporated", 0
db 0x1B, 0x91, "Averna", 0
db 0x1B, 0xAD, "ReFLEX CES", 0
db 0x1C, 0x0F, "Monarch Innovative Technologies Private Limited", 0
db 0x1C, 0x32, "Highland Technology Incorporated", 0
db 0x1C, 0x39, "Thomson Video Networks", 0
db 0x1D, 0xE1, "Tekram", 0
db 0x1F, 0xCF, "Miranda Technologies Limited", 0
db 0x20, 0x01, "Temporal Research Limited", 0
db 0x26, 0x46, "Kingston Technology Company", 0
db 0x27, 0x0F, "ChainTek Computer Company Limited", 0
db 0x2E, 0xC1, "Zenic Incorporated", 0
db 0x33, 0x88, "Hint Corporation", 0
db 0x34, 0x11, "Quantum Designs (H.K.) Incorporated", 0
db 0x35, 0x13, "ARCOM Control Systems Limited", 0
db 0x38, 0xEF, "4links", 0
db 0x3D, 0x3D, "3Dlabs, Incorporated Limited", 0
db 0x40, 0x05, "Avance Logic Incorporated", 0
db 0x41, 0x44, "Alpha Data", 0
db 0x41, 0x6C, "Aladdin Knowledge Systems", 0
db 0x43, 0x48, "wch.cn", 0
db 0x46, 0x80, "UMAX Computer Corporation", 0
db 0x48, 0x43, "Hercules Computer Technology", 0
db 0x49, 0x43, "Growth Networks", 0
db 0x49, 0x54, "Integral Technologies", 0
db 0x49, 0x78, "Axil Computer Incorporated", 0
db 0x4C, 0x48, "Lung Hwa Electronics", 0
db 0x4C, 0x53, "SBS-OR Industrial Computers", 0
db 0x4C, 0xA1, "Seanix Technology Incorporated", 0
db 0x4D, 0x51, "Mediaq Incorporated", 0
db 0x4D, 0x54, "Microtechnica Company Limited", 0
db 0x4D, 0xDC, "ILC Data Device Corporation", 0
db 0x4E, 0x80, "Samsung Windows Portable Devices", 0
db 0x50, 0x53, "TBS/Voyetra Technologies", 0
db 0x50, 0x8A, "Samsung T10 MP3 Player", 0
db 0x51, 0x36, "S S Technologies", 0
db 0x51, 0x43, "Qualcomm Incorporated USA", 0
db 0x53, 0x33, "S3 Graphics Company Limited", 0
db 0x54, 0x4C, "Teralogic Incorporated", 0
db 0x55, 0x55, "Genroco Incorporated", 0
db 0x58, 0x53, "Citrix Systems, Incorporated", 0
db 0x64, 0x09, "Logitec Corporation", 0
db 0x66, 0x66, "Decision Computer International Company", 0
db 0x69, 0x45, "ASMedia Technology Incorporated", 0
db 0x76, 0x04, "O.N. Electric Company Limited", 0
db 0x7d, 0x10, "D-Link Corporation", 0
db 0x80, 0x80, "Xirlink, Incorporated", 0
db 0x80, 0x86, "Intel Corporation", 0
db 0x80, 0xEE, "Oracle Corporation - InnoTek Systemberatung GmbH", 0
db 0x88, 0x66, "T-Square Design Incorporated", 0
db 0x88, 0x88, "Silicon Magic", 0
db 0x8E, 0x0E, "Computone Corporation", 0
db 0x90, 0x04, "Adaptec Incorporated", 0
db 0x90, 0x05, "Adaptec Incorporated", 0
db 0x91, 0x9A, "Gigapixel Corporation", 0
db 0x94, 0x12, "Holtek", 0
db 0x96, 0x99, "Omni Media Technology Incorporated", 0
db 0x97, 0x10, "MosChip Semiconductor Technology", 0
db 0x99, 0x02, "StarGen Incorporated", 0
db 0xA0, 0xA0, "Aopen Incorporated", 0
db 0xA0, 0xF1, "Unisys Corporation", 0
db 0xA2, 0x00, "NEC Corporation", 0
db 0xA2, 0x59, "<NAME>", 0
db 0xA3, 0x04, "Sony", 0
db 0xA7, 0x27, "3com Corporation", 0
db 0xAA, 0x42, "Abekas Incorporated", 0
db 0xAC, 0x1E, "Digital Receiver Technology Incorporated", 0
db 0xB1, 0xB3, "Shiva Europe Limited", 0
db 0xB8, 0x94, "Brown & Sharpe Mfg. Company", 0
db 0xBE, 0xEF, "Mindstream Computing", 0
db 0xC0, 0x01, "TSI Telsys", 0
db 0xC0, 0xA9, "Micron/Crucial Technology", 0
db 0xC0, 0xDE, "Motorola", 0
db 0xC0, 0xFE, "Motion Engineering Inc.", 0
db 0xC6, 0x22, "Hudson Soft Company Limited", 0
db 0xCA, 0x50, "Varian Incorporated", 0
db 0xCA, 0xFE, "Chrysalis-ITS", 0
db 0xCC, 0xCC, "Catapult Communications", 0
db 0xD4, 0xD4, "Curtiss-Wright Controls Embedded Computing", 0
db 0xDC, 0x93, "Dawicontrol", 0
db 0xDE, 0xAD, "Indigita Corporation", 0
db 0xDE, 0xAF, "Middle Digital, Inc", 0
db 0xE1, 0x59, "Tiger Jet Network Inc", 0
db 0xE4, 0xBF, "EKF Elektronik GMBH", 0
db 0xEA, 0x01, "Eagle Technology", 0
db 0xEA, 0xBB, "Aashima Technology B.V.", 0
db 0xEA, 0xCE, "Endace Measurement Systems Limited", 0
db 0xEC, 0xC0, "Echo Digital Audio Corporation", 0
db 0xED, 0xD8, "ARK Logic Incorporated", 0
db 0xF5, 0xF5, "F5 Networks Incorporated", 0
db 0xFA, 0x57, "Interagon AS", 0
db 0xFF, 0xFF, "-Unknown or Invalid Vendor ID-", 0 |
Transynther/x86/_processed/AVXALIGN/_zr_/i3-7100_9_0x84_notsx.log_21829_2661.asm | ljhsiun2/medusa | 9 | 160557 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r14
push %r15
push %r9
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0xfcd, %rdi
nop
nop
nop
nop
xor %rdx, %rdx
and $0xffffffffffffffc0, %rdi
movaps (%rdi), %xmm2
vpextrq $0, %xmm2, %r15
add $59358, %r9
lea addresses_A_ht+0x1a9cd, %rax
nop
nop
nop
nop
nop
inc %r10
and $0xffffffffffffffc0, %rax
vmovaps (%rax), %ymm2
vextracti128 $1, %ymm2, %xmm2
vpextrq $1, %xmm2, %rdi
nop
add $771, %r9
lea addresses_A_ht+0x35d, %rdi
nop
nop
nop
cmp $25664, %r14
movl $0x61626364, (%rdi)
nop
nop
add $4760, %rax
lea addresses_normal_ht+0x1e04d, %rsi
lea addresses_A_ht+0x5e8d, %rdi
nop
cmp $54036, %rdx
mov $11, %rcx
rep movsb
nop
nop
xor %rdx, %rdx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r15
pop %r14
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r15
push %r8
push %rax
push %rbx
// Faulty Load
lea addresses_D+0xf84d, %rax
nop
nop
nop
nop
cmp $52097, %r10
movaps (%rax), %xmm4
vpextrq $0, %xmm4, %r15
lea oracles, %rbx
and $0xff, %r15
shlq $12, %r15
mov (%rbx,%r15,1), %r15
pop %rbx
pop %rax
pop %r8
pop %r15
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_D', 'same': True, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_D', 'same': True, 'size': 16, 'congruent': 0, 'NT': True, 'AVXalign': True}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_D_ht', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'same': False, 'size': 32, 'congruent': 6, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 4, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM'}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1324.asm | ljhsiun2/medusa | 9 | 171433 | <gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0xd84, %rdx
nop
nop
nop
and %rdi, %rdi
movb (%rdx), %r10b
nop
nop
nop
nop
cmp %rdx, %rdx
lea addresses_D_ht+0xfd7c, %rsi
lea addresses_WC_ht+0x1762c, %rdi
nop
nop
nop
inc %r10
mov $98, %rcx
rep movsw
nop
dec %rsi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r9
push %rax
push %rdx
push %rsi
// Faulty Load
lea addresses_RW+0x1d53c, %rdx
inc %rax
mov (%rdx), %r12
lea oracles, %rsi
and $0xff, %r12
shlq $12, %r12
mov (%rsi,%r12,1), %r12
pop %rsi
pop %rdx
pop %rax
pop %r9
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_RW', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_RW', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 1}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_WC_ht'}}
{'32': 21829}
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
*/
|
test/exemplo_if_erro.asm | auroralimin/montador-assembly-inventado | 0 | 28669 | <filename>test/exemplo_if_erro.asm
L1: EQU 1
L2: EQU -0
SECTION TEXT
IF L1
LOAD SPACE ;faz esta opera ̧c~ao se L1 for verdadeiro
IF LABELERRADA
IF L2
INPUT SPACE ;faz esta opera ̧c~ao se L2 for verdadeiro
SECTION DATA
N: SPACE
IF K
|
src/sensors-libsensors.ads | Ada-bindings-project/a-lmsensors | 0 | 23785 | ------------------------------------------------------------
-- This is the root for the lowlevel C interface
-- Where the Ada-specs are automaticly generated.
-- The package is private in order to guarantie that
-- no one outsite this libraray is using the internals without
-- beeing aware.
------------------------------------------------------------
private package Sensors.LibSensors is
pragma Linker_Options ("-l" & "sensors");
pragma Linker_Options ("-l" & "m");
end Sensors.libSensors;
|
Task/Knapsack-problem-Unbounded/Ada/knapsack-problem-unbounded.ada | LaudateCorpus1/RosettaCodeData | 1 | 18299 | with Ada.Text_IO;
procedure Knapsack_Unbounded is
type Bounty is record
Value : Natural;
Weight : Float;
Volume : Float;
end record;
function Min (A, B : Float) return Float is
begin
if A < B then
return A;
else
return B;
end if;
end Min;
Panacea : Bounty := (3000, 0.3, 0.025);
Ichor : Bounty := (1800, 0.2, 0.015);
Gold : Bounty := (2500, 2.0, 0.002);
Limits : Bounty := ( 0, 25.0, 0.250);
Best : Bounty := ( 0, 0.0, 0.000);
Current : Bounty := ( 0, 0.0, 0.000);
Best_Amounts : array (1 .. 3) of Natural := (0, 0, 0);
Max_Panacea : Natural := Natural (Float'Floor (Min
(Limits.Weight / Panacea.Weight,
Limits.Volume / Panacea.Volume)));
Max_Ichor : Natural := Natural (Float'Floor (Min
(Limits.Weight / Ichor.Weight,
Limits.Volume / Ichor.Volume)));
Max_Gold : Natural := Natural (Float'Floor (Min
(Limits.Weight / Gold.Weight,
Limits.Volume / Gold.Volume)));
begin
for Panacea_Count in 0 .. Max_Panacea loop
for Ichor_Count in 0 .. Max_Ichor loop
for Gold_Count in 0 .. Max_Gold loop
Current.Value := Panacea_Count * Panacea.Value +
Ichor_Count * Ichor.Value +
Gold_Count * Gold.Value;
Current.Weight := Float (Panacea_Count) * Panacea.Weight +
Float (Ichor_Count) * Ichor.Weight +
Float (Gold_Count) * Gold.Weight;
Current.Volume := Float (Panacea_Count) * Panacea.Volume +
Float (Ichor_Count) * Ichor.Volume +
Float (Gold_Count) * Gold.Volume;
if Current.Value > Best.Value and
Current.Weight <= Limits.Weight and
Current.Volume <= Limits.Volume then
Best := Current;
Best_Amounts := (Panacea_Count, Ichor_Count, Gold_Count);
end if;
end loop;
end loop;
end loop;
Ada.Text_IO.Put_Line ("Maximum value:" & Natural'Image (Best.Value));
Ada.Text_IO.Put_Line ("Panacea:" & Natural'Image (Best_Amounts (1)));
Ada.Text_IO.Put_Line ("Ichor: " & Natural'Image (Best_Amounts (2)));
Ada.Text_IO.Put_Line ("Gold: " & Natural'Image (Best_Amounts (3)));
end Knapsack_Unbounded;
|
target/cos_117/disasm/iop_overlay1/STAGEIN.asm | jrrk2/cray-sim | 49 | 10317 | 0x0000 (0x000000) 0x1800-0x0000 f:00014 d: 0 | A = 0 (0x0000)
0x0002 (0x000004) 0x291A- f:00024 d: 282 | OR[282] = A
0x0003 (0x000006) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0004 (0x000008) 0x291B- f:00024 d: 283 | OR[283] = A
0x0005 (0x00000A) 0x2118- f:00020 d: 280 | A = OR[280]
0x0006 (0x00000C) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x0007 (0x00000E) 0x2908- f:00024 d: 264 | OR[264] = A
0x0008 (0x000010) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0009 (0x000012) 0x291C- f:00024 d: 284 | OR[284] = A
0x000A (0x000014) 0x2118- f:00020 d: 280 | A = OR[280]
0x000B (0x000016) 0x1405- f:00012 d: 5 | A = A + 5 (0x0005)
0x000C (0x000018) 0x2908- f:00024 d: 264 | OR[264] = A
0x000D (0x00001A) 0x3108- f:00030 d: 264 | A = (OR[264])
0x000E (0x00001C) 0x291D- f:00024 d: 285 | OR[285] = A
0x000F (0x00001E) 0x1018- f:00010 d: 24 | A = 24 (0x0018)
0x0010 (0x000020) 0x292B- f:00024 d: 299 | OR[299] = A
0x0011 (0x000022) 0x10B4- f:00010 d: 180 | A = 180 (0x00B4)
0x0012 (0x000024) 0x292C- f:00024 d: 300 | OR[300] = A
0x0013 (0x000026) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0014 (0x000028) 0x292D- f:00024 d: 301 | OR[301] = A
0x0015 (0x00002A) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0016 (0x00002C) 0x292E- f:00024 d: 302 | OR[302] = A
0x0017 (0x00002E) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0018 (0x000030) 0x292F- f:00024 d: 303 | OR[303] = A
0x0019 (0x000032) 0x111B- f:00010 d: 283 | A = 283 (0x011B)
0x001A (0x000034) 0x2930- f:00024 d: 304 | OR[304] = A
0x001B (0x000036) 0x112B- f:00010 d: 299 | A = 299 (0x012B)
0x001C (0x000038) 0x5800- f:00054 d: 0 | B = A
0x001D (0x00003A) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x001E (0x00003C) 0x7C09- f:00076 d: 9 | R = OR[9]
0x001F (0x00003E) 0x8602- f:00103 d: 2 | P = P + 2 (0x0021), A # 0
0x0020 (0x000040) 0x700B- f:00070 d: 11 | P = P + 11 (0x002B)
0x0021 (0x000042) 0x1007- f:00010 d: 7 | A = 7 (0x0007)
0x0022 (0x000044) 0x292B- f:00024 d: 299 | OR[299] = A
0x0023 (0x000046) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x0024 (0x000048) 0x292C- f:00024 d: 300 | OR[300] = A
0x0025 (0x00004A) 0x112B- f:00010 d: 299 | A = 299 (0x012B)
0x0026 (0x00004C) 0x5800- f:00054 d: 0 | B = A
0x0027 (0x00004E) 0x1800-0x2718 f:00014 d: 0 | A = 10008 (0x2718)
0x0029 (0x000052) 0x7C09- f:00076 d: 9 | R = OR[9]
0x002A (0x000054) 0x721B- f:00071 d: 27 | P = P - 27 (0x000F)
0x002B (0x000056) 0x1026- f:00010 d: 38 | A = 38 (0x0026)
0x002C (0x000058) 0x292B- f:00024 d: 299 | OR[299] = A
0x002D (0x00005A) 0x211C- f:00020 d: 284 | A = OR[284]
0x002E (0x00005C) 0x292C- f:00024 d: 300 | OR[300] = A
0x002F (0x00005E) 0x211D- f:00020 d: 285 | A = OR[285]
0x0030 (0x000060) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0031 (0x000062) 0x292D- f:00024 d: 301 | OR[301] = A
0x0032 (0x000064) 0x211B- f:00020 d: 283 | A = OR[283]
0x0033 (0x000066) 0x292E- f:00024 d: 302 | OR[302] = A
0x0034 (0x000068) 0x102D- f:00010 d: 45 | A = 45 (0x002D)
0x0035 (0x00006A) 0x292F- f:00024 d: 303 | OR[303] = A
0x0036 (0x00006C) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0037 (0x00006E) 0x2930- f:00024 d: 304 | OR[304] = A
0x0038 (0x000070) 0x112B- f:00010 d: 299 | A = 299 (0x012B)
0x0039 (0x000072) 0x5800- f:00054 d: 0 | B = A
0x003A (0x000074) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x003B (0x000076) 0x7C09- f:00076 d: 9 | R = OR[9]
0x003C (0x000078) 0x2119- f:00020 d: 281 | A = OR[281]
0x003D (0x00007A) 0x8602- f:00103 d: 2 | P = P + 2 (0x003F), A # 0
0x003E (0x00007C) 0x7023- f:00070 d: 35 | P = P + 35 (0x0061)
0x003F (0x00007E) 0x101D- f:00010 d: 29 | A = 29 (0x001D)
0x0040 (0x000080) 0x292B- f:00024 d: 299 | OR[299] = A
0x0041 (0x000082) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x0042 (0x000084) 0x292C- f:00024 d: 300 | OR[300] = A
0x0043 (0x000086) 0x112B- f:00010 d: 299 | A = 299 (0x012B)
0x0044 (0x000088) 0x5800- f:00054 d: 0 | B = A
0x0045 (0x00008A) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0046 (0x00008C) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0047 (0x00008E) 0x2006- f:00020 d: 6 | A = OR[6]
0x0048 (0x000090) 0x140C- f:00012 d: 12 | A = A + 12 (0x000C)
0x0049 (0x000092) 0x2908- f:00024 d: 264 | OR[264] = A
0x004A (0x000094) 0x3108- f:00030 d: 264 | A = (OR[264])
0x004B (0x000096) 0x291C- f:00024 d: 284 | OR[284] = A
0x004C (0x000098) 0x2006- f:00020 d: 6 | A = OR[6]
0x004D (0x00009A) 0x140D- f:00012 d: 13 | A = A + 13 (0x000D)
0x004E (0x00009C) 0x2908- f:00024 d: 264 | OR[264] = A
0x004F (0x00009E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0050 (0x0000A0) 0x291D- f:00024 d: 285 | OR[285] = A
0x0051 (0x0000A2) 0x2006- f:00020 d: 6 | A = OR[6]
0x0052 (0x0000A4) 0x140B- f:00012 d: 11 | A = A + 11 (0x000B)
0x0053 (0x0000A6) 0x2908- f:00024 d: 264 | OR[264] = A
0x0054 (0x0000A8) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0055 (0x0000AA) 0x8602- f:00103 d: 2 | P = P + 2 (0x0057), A # 0
0x0056 (0x0000AC) 0x700B- f:00070 d: 11 | P = P + 11 (0x0061)
0x0057 (0x0000AE) 0x1007- f:00010 d: 7 | A = 7 (0x0007)
0x0058 (0x0000B0) 0x292B- f:00024 d: 299 | OR[299] = A
0x0059 (0x0000B2) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x005A (0x0000B4) 0x292C- f:00024 d: 300 | OR[300] = A
0x005B (0x0000B6) 0x112B- f:00010 d: 299 | A = 299 (0x012B)
0x005C (0x0000B8) 0x5800- f:00054 d: 0 | B = A
0x005D (0x0000BA) 0x1800-0x2718 f:00014 d: 0 | A = 10008 (0x2718)
0x005F (0x0000BE) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0060 (0x0000C0) 0x7224- f:00071 d: 36 | P = P - 36 (0x003C)
0x0061 (0x0000C2) 0x2119- f:00020 d: 281 | A = OR[281]
0x0062 (0x0000C4) 0x8602- f:00103 d: 2 | P = P + 2 (0x0064), A # 0
0x0063 (0x0000C6) 0x7011- f:00070 d: 17 | P = P + 17 (0x0074)
0x0064 (0x0000C8) 0x211B- f:00020 d: 283 | A = OR[283]
0x0065 (0x0000CA) 0x140A- f:00012 d: 10 | A = A + 10 (0x000A)
0x0066 (0x0000CC) 0x2908- f:00024 d: 264 | OR[264] = A
0x0067 (0x0000CE) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0068 (0x0000D0) 0x291E- f:00024 d: 286 | OR[286] = A
0x0069 (0x0000D2) 0x2118- f:00020 d: 280 | A = OR[280]
0x006A (0x0000D4) 0x1417- f:00012 d: 23 | A = A + 23 (0x0017)
0x006B (0x0000D6) 0x2908- f:00024 d: 264 | OR[264] = A
0x006C (0x0000D8) 0x211E- f:00020 d: 286 | A = OR[286]
0x006D (0x0000DA) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x006E (0x0000DC) 0x211B- f:00020 d: 283 | A = OR[283]
0x006F (0x0000DE) 0x140A- f:00012 d: 10 | A = A + 10 (0x000A)
0x0070 (0x0000E0) 0x2908- f:00024 d: 264 | OR[264] = A
0x0071 (0x0000E2) 0x1800-0x5354 f:00014 d: 0 | A = 21332 (0x5354)
0x0073 (0x0000E6) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0074 (0x0000E8) 0x1027- f:00010 d: 39 | A = 39 (0x0027)
0x0075 (0x0000EA) 0x292B- f:00024 d: 299 | OR[299] = A
0x0076 (0x0000EC) 0x211C- f:00020 d: 284 | A = OR[284]
0x0077 (0x0000EE) 0x292C- f:00024 d: 300 | OR[300] = A
0x0078 (0x0000F0) 0x211D- f:00020 d: 285 | A = OR[285]
0x0079 (0x0000F2) 0x292D- f:00024 d: 301 | OR[301] = A
0x007A (0x0000F4) 0x211B- f:00020 d: 283 | A = OR[283]
0x007B (0x0000F6) 0x292E- f:00024 d: 302 | OR[302] = A
0x007C (0x0000F8) 0x102D- f:00010 d: 45 | A = 45 (0x002D)
0x007D (0x0000FA) 0x292F- f:00024 d: 303 | OR[303] = A
0x007E (0x0000FC) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x007F (0x0000FE) 0x2930- f:00024 d: 304 | OR[304] = A
0x0080 (0x000100) 0x112B- f:00010 d: 299 | A = 299 (0x012B)
0x0081 (0x000102) 0x5800- f:00054 d: 0 | B = A
0x0082 (0x000104) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0083 (0x000106) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0084 (0x000108) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x0085 (0x00010A) 0x292B- f:00024 d: 299 | OR[299] = A
0x0086 (0x00010C) 0x1800-0x0168 f:00014 d: 0 | A = 360 (0x0168)
0x0088 (0x000110) 0x292C- f:00024 d: 300 | OR[300] = A
0x0089 (0x000112) 0x1800-0x3813 f:00014 d: 0 | A = 14355 (0x3813)
0x008B (0x000116) 0x292D- f:00024 d: 301 | OR[301] = A
0x008C (0x000118) 0x2118- f:00020 d: 280 | A = OR[280]
0x008D (0x00011A) 0x292E- f:00024 d: 302 | OR[302] = A
0x008E (0x00011C) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x008F (0x00011E) 0x292F- f:00024 d: 303 | OR[303] = A
0x0090 (0x000120) 0x1800-0x0B40 f:00014 d: 0 | A = 2880 (0x0B40)
0x0092 (0x000124) 0x2930- f:00024 d: 304 | OR[304] = A
0x0093 (0x000126) 0x211C- f:00020 d: 284 | A = OR[284]
0x0094 (0x000128) 0x2931- f:00024 d: 305 | OR[305] = A
0x0095 (0x00012A) 0x211D- f:00020 d: 285 | A = OR[285]
0x0096 (0x00012C) 0x2932- f:00024 d: 306 | OR[306] = A
0x0097 (0x00012E) 0x112B- f:00010 d: 299 | A = 299 (0x012B)
0x0098 (0x000130) 0x5800- f:00054 d: 0 | B = A
0x0099 (0x000132) 0x1800-0x2718 f:00014 d: 0 | A = 10008 (0x2718)
0x009B (0x000136) 0x7C09- f:00076 d: 9 | R = OR[9]
0x009C (0x000138) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001)
0x009D (0x00013A) 0x8602- f:00103 d: 2 | P = P + 2 (0x009F), A # 0
0x009E (0x00013C) 0x7005- f:00070 d: 5 | P = P + 5 (0x00A3)
0x009F (0x00013E) 0x1800-0x0000 f:00014 d: 0 | A = 0 (0x0000)
0x00A1 (0x000142) 0x291A- f:00024 d: 282 | OR[282] = A
0x00A2 (0x000144) 0x70A0- f:00070 d: 160 | P = P + 160 (0x0142)
0x00A3 (0x000146) 0x2119- f:00020 d: 281 | A = OR[281]
0x00A4 (0x000148) 0x8602- f:00103 d: 2 | P = P + 2 (0x00A6), A # 0
0x00A5 (0x00014A) 0x7070- f:00070 d: 112 | P = P + 112 (0x0115)
0x00A6 (0x00014C) 0x211B- f:00020 d: 283 | A = OR[283]
0x00A7 (0x00014E) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x00A8 (0x000150) 0x290D- f:00024 d: 269 | OR[269] = A
0x00A9 (0x000152) 0x2118- f:00020 d: 280 | A = OR[280]
0x00AA (0x000154) 0x140D- f:00012 d: 13 | A = A + 13 (0x000D)
0x00AB (0x000156) 0x290E- f:00024 d: 270 | OR[270] = A
0x00AC (0x000158) 0x1004- f:00010 d: 4 | A = 4 (0x0004)
0x00AD (0x00015A) 0x290F- f:00024 d: 271 | OR[271] = A
0x00AE (0x00015C) 0x7006- f:00070 d: 6 | P = P + 6 (0x00B4)
0x00AF (0x00015E) 0x310D- f:00030 d: 269 | A = (OR[269])
0x00B0 (0x000160) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x00B1 (0x000162) 0x2D0D- f:00026 d: 269 | OR[269] = OR[269] + 1
0x00B2 (0x000164) 0x2D0E- f:00026 d: 270 | OR[270] = OR[270] + 1
0x00B3 (0x000166) 0x2F0F- f:00027 d: 271 | OR[271] = OR[271] - 1
0x00B4 (0x000168) 0x210F- f:00020 d: 271 | A = OR[271]
0x00B5 (0x00016A) 0x8E06- f:00107 d: 6 | P = P - 6 (0x00AF), A # 0
0x00B6 (0x00016C) 0x211B- f:00020 d: 283 | A = OR[283]
0x00B7 (0x00016E) 0x1418- f:00012 d: 24 | A = A + 24 (0x0018)
0x00B8 (0x000170) 0x290D- f:00024 d: 269 | OR[269] = A
0x00B9 (0x000172) 0x2118- f:00020 d: 280 | A = OR[280]
0x00BA (0x000174) 0x1411- f:00012 d: 17 | A = A + 17 (0x0011)
0x00BB (0x000176) 0x290E- f:00024 d: 270 | OR[270] = A
0x00BC (0x000178) 0x1004- f:00010 d: 4 | A = 4 (0x0004)
0x00BD (0x00017A) 0x290F- f:00024 d: 271 | OR[271] = A
0x00BE (0x00017C) 0x7006- f:00070 d: 6 | P = P + 6 (0x00C4)
0x00BF (0x00017E) 0x310D- f:00030 d: 269 | A = (OR[269])
0x00C0 (0x000180) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x00C1 (0x000182) 0x2D0D- f:00026 d: 269 | OR[269] = OR[269] + 1
0x00C2 (0x000184) 0x2D0E- f:00026 d: 270 | OR[270] = OR[270] + 1
0x00C3 (0x000186) 0x2F0F- f:00027 d: 271 | OR[271] = OR[271] - 1
0x00C4 (0x000188) 0x210F- f:00020 d: 271 | A = OR[271]
0x00C5 (0x00018A) 0x8E06- f:00107 d: 6 | P = P - 6 (0x00BF), A # 0
0x00C6 (0x00018C) 0x211B- f:00020 d: 283 | A = OR[283]
0x00C7 (0x00018E) 0x1414- f:00012 d: 20 | A = A + 20 (0x0014)
0x00C8 (0x000190) 0x2908- f:00024 d: 264 | OR[264] = A
0x00C9 (0x000192) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00CA (0x000194) 0x291F- f:00024 d: 287 | OR[287] = A
0x00CB (0x000196) 0x2118- f:00020 d: 280 | A = OR[280]
0x00CC (0x000198) 0x1416- f:00012 d: 22 | A = A + 22 (0x0016)
0x00CD (0x00019A) 0x2908- f:00024 d: 264 | OR[264] = A
0x00CE (0x00019C) 0x211F- f:00020 d: 287 | A = OR[287]
0x00CF (0x00019E) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x00D0 (0x0001A0) 0x211B- f:00020 d: 283 | A = OR[283]
0x00D1 (0x0001A2) 0x140B- f:00012 d: 11 | A = A + 11 (0x000B)
0x00D2 (0x0001A4) 0x2908- f:00024 d: 264 | OR[264] = A
0x00D3 (0x0001A6) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00D4 (0x0001A8) 0x2920- f:00024 d: 288 | OR[288] = A
0x00D5 (0x0001AA) 0x2118- f:00020 d: 280 | A = OR[280]
0x00D6 (0x0001AC) 0x141A- f:00012 d: 26 | A = A + 26 (0x001A)
0x00D7 (0x0001AE) 0x2908- f:00024 d: 264 | OR[264] = A
0x00D8 (0x0001B0) 0x2120- f:00020 d: 288 | A = OR[288]
0x00D9 (0x0001B2) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x00DA (0x0001B4) 0x2120- f:00020 d: 288 | A = OR[288]
0x00DB (0x0001B6) 0x8402- f:00102 d: 2 | P = P + 2 (0x00DD), A = 0
0x00DC (0x0001B8) 0x7014- f:00070 d: 20 | P = P + 20 (0x00F0)
0x00DD (0x0001BA) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x00DE (0x0001BC) 0x292B- f:00024 d: 299 | OR[299] = A
0x00DF (0x0001BE) 0x1800-0x0157 f:00014 d: 0 | A = 343 (0x0157)
0x00E1 (0x0001C2) 0x292C- f:00024 d: 300 | OR[300] = A
0x00E2 (0x0001C4) 0x2118- f:00020 d: 280 | A = OR[280]
0x00E3 (0x0001C6) 0x292D- f:00024 d: 301 | OR[301] = A
0x00E4 (0x0001C8) 0x1800-0x0153 f:00014 d: 0 | A = 339 (0x0153)
0x00E6 (0x0001CC) 0x292E- f:00024 d: 302 | OR[302] = A
0x00E7 (0x0001CE) 0x112B- f:00010 d: 299 | A = 299 (0x012B)
0x00E8 (0x0001D0) 0x5800- f:00054 d: 0 | B = A
0x00E9 (0x0001D2) 0x1800-0x2718 f:00014 d: 0 | A = 10008 (0x2718)
0x00EB (0x0001D6) 0x7C09- f:00076 d: 9 | R = OR[9]
0x00EC (0x0001D8) 0x1800-0xA037 f:00014 d: 0 | A = 41015 (0xA037)
0x00EE (0x0001DC) 0x291A- f:00024 d: 282 | OR[282] = A
0x00EF (0x0001DE) 0x7053- f:00070 d: 83 | P = P + 83 (0x0142)
0x00F0 (0x0001E0) 0x2118- f:00020 d: 280 | A = OR[280]
0x00F1 (0x0001E2) 0x141B- f:00012 d: 27 | A = A + 27 (0x001B)
0x00F2 (0x0001E4) 0x290E- f:00024 d: 270 | OR[270] = A
0x00F3 (0x0001E6) 0x1034- f:00010 d: 52 | A = 52 (0x0034)
0x00F4 (0x0001E8) 0x161B- f:00013 d: 27 | A = A - 27 (0x001B)
0x00F5 (0x0001EA) 0x290D- f:00024 d: 269 | OR[269] = A
0x00F6 (0x0001EC) 0x210D- f:00020 d: 269 | A = OR[269]
0x00F7 (0x0001EE) 0x8406- f:00102 d: 6 | P = P + 6 (0x00FD), A = 0
0x00F8 (0x0001F0) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x00F9 (0x0001F2) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x00FA (0x0001F4) 0x2F0D- f:00027 d: 269 | OR[269] = OR[269] - 1
0x00FB (0x0001F6) 0x2D0E- f:00026 d: 270 | OR[270] = OR[270] + 1
0x00FC (0x0001F8) 0x7206- f:00071 d: 6 | P = P - 6 (0x00F6)
0x00FD (0x0001FA) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x00FE (0x0001FC) 0x2923- f:00024 d: 291 | OR[291] = A
0x00FF (0x0001FE) 0x7483- f:00072 d: 131 | R = P + 131 (0x0182)
0x0100 (0x000200) 0x2121- f:00020 d: 289 | A = OR[289]
0x0101 (0x000202) 0x1E00-0x4D54 f:00017 d: 0 | A = A - 19796 (0x4D54)
0x0103 (0x000206) 0x8402- f:00102 d: 2 | P = P + 2 (0x0105), A = 0
0x0104 (0x000208) 0x7007- f:00070 d: 7 | P = P + 7 (0x010B)
0x0105 (0x00020A) 0x74A8- f:00072 d: 168 | R = P + 168 (0x01AD)
0x0106 (0x00020C) 0x7E03-0x0237 f:00077 d: 3 | R = OR[3]+567 (0x0237)
0x0108 (0x000210) 0x7E03-0x02E3 f:00077 d: 3 | R = OR[3]+739 (0x02E3)
0x010A (0x000214) 0x700B- f:00070 d: 11 | P = P + 11 (0x0115)
0x010B (0x000216) 0x2121- f:00020 d: 289 | A = OR[289]
0x010C (0x000218) 0x1E00-0x444B f:00017 d: 0 | A = A - 17483 (0x444B)
0x010E (0x00021C) 0x8402- f:00102 d: 2 | P = P + 2 (0x0110), A = 0
0x010F (0x00021E) 0x7006- f:00070 d: 6 | P = P + 6 (0x0115)
0x0110 (0x000220) 0x749D- f:00072 d: 157 | R = P + 157 (0x01AD)
0x0111 (0x000222) 0x7E03-0x0266 f:00077 d: 3 | R = OR[3]+614 (0x0266)
0x0113 (0x000226) 0x7E03-0x02B1 f:00077 d: 3 | R = OR[3]+689 (0x02B1)
0x0115 (0x00022A) 0x1019- f:00010 d: 25 | A = 25 (0x0019)
0x0116 (0x00022C) 0x292B- f:00024 d: 299 | OR[299] = A
0x0117 (0x00022E) 0x211B- f:00020 d: 283 | A = OR[283]
0x0118 (0x000230) 0x292C- f:00024 d: 300 | OR[300] = A
0x0119 (0x000232) 0x112B- f:00010 d: 299 | A = 299 (0x012B)
0x011A (0x000234) 0x5800- f:00054 d: 0 | B = A
0x011B (0x000236) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x011C (0x000238) 0x7C09- f:00076 d: 9 | R = OR[9]
0x011D (0x00023A) 0x2118- f:00020 d: 280 | A = OR[280]
0x011E (0x00023C) 0x1419- f:00012 d: 25 | A = A + 25 (0x0019)
0x011F (0x00023E) 0x2908- f:00024 d: 264 | OR[264] = A
0x0120 (0x000240) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0121 (0x000242) 0x2921- f:00024 d: 289 | OR[289] = A
0x0122 (0x000244) 0x2121- f:00020 d: 289 | A = OR[289]
0x0123 (0x000246) 0x1E00-0x4D54 f:00017 d: 0 | A = A - 19796 (0x4D54)
0x0125 (0x00024A) 0x8402- f:00102 d: 2 | P = P + 2 (0x0127), A = 0
0x0126 (0x00024C) 0x7005- f:00070 d: 5 | P = P + 5 (0x012B)
0x0127 (0x00024E) 0x1800-0x016E f:00014 d: 0 | A = 366 (0x016E)
0x0129 (0x000252) 0x2922- f:00024 d: 290 | OR[290] = A
0x012A (0x000254) 0x700C- f:00070 d: 12 | P = P + 12 (0x0136)
0x012B (0x000256) 0x2121- f:00020 d: 289 | A = OR[289]
0x012C (0x000258) 0x1E00-0x444B f:00017 d: 0 | A = A - 17483 (0x444B)
0x012E (0x00025C) 0x8402- f:00102 d: 2 | P = P + 2 (0x0130), A = 0
0x012F (0x00025E) 0x7005- f:00070 d: 5 | P = P + 5 (0x0134)
0x0130 (0x000260) 0x1800-0x0171 f:00014 d: 0 | A = 369 (0x0171)
0x0132 (0x000264) 0x2922- f:00024 d: 290 | OR[290] = A
0x0133 (0x000266) 0x7003- f:00070 d: 3 | P = P + 3 (0x0136)
0x0134 (0x000268) 0x7C34- f:00076 d: 52 | R = OR[52]
0x0135 (0x00026A) 0x0000- f:00000 d: 0 | PASS
0x0136 (0x00026C) 0x1029- f:00010 d: 41 | A = 41 (0x0029)
0x0137 (0x00026E) 0x292B- f:00024 d: 299 | OR[299] = A
0x0138 (0x000270) 0x2122- f:00020 d: 290 | A = OR[290]
0x0139 (0x000272) 0x292C- f:00024 d: 300 | OR[300] = A
0x013A (0x000274) 0x2118- f:00020 d: 280 | A = OR[280]
0x013B (0x000276) 0x292D- f:00024 d: 301 | OR[301] = A
0x013C (0x000278) 0x2119- f:00020 d: 281 | A = OR[281]
0x013D (0x00027A) 0x292E- f:00024 d: 302 | OR[302] = A
0x013E (0x00027C) 0x112B- f:00010 d: 299 | A = 299 (0x012B)
0x013F (0x00027E) 0x5800- f:00054 d: 0 | B = A
0x0140 (0x000280) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0141 (0x000282) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0142 (0x000284) 0x211B- f:00020 d: 283 | A = OR[283]
0x0143 (0x000286) 0x8602- f:00103 d: 2 | P = P + 2 (0x0145), A # 0
0x0144 (0x000288) 0x7009- f:00070 d: 9 | P = P + 9 (0x014D)
0x0145 (0x00028A) 0x1019- f:00010 d: 25 | A = 25 (0x0019)
0x0146 (0x00028C) 0x292B- f:00024 d: 299 | OR[299] = A
0x0147 (0x00028E) 0x211B- f:00020 d: 283 | A = OR[283]
0x0148 (0x000290) 0x292C- f:00024 d: 300 | OR[300] = A
0x0149 (0x000292) 0x112B- f:00010 d: 299 | A = 299 (0x012B)
0x014A (0x000294) 0x5800- f:00054 d: 0 | B = A
0x014B (0x000296) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x014C (0x000298) 0x7C09- f:00076 d: 9 | R = OR[9]
0x014D (0x00029A) 0x2119- f:00020 d: 281 | A = OR[281]
0x014E (0x00029C) 0x8602- f:00103 d: 2 | P = P + 2 (0x0150), A # 0
0x014F (0x00029E) 0x700F- f:00070 d: 15 | P = P + 15 (0x015E)
0x0150 (0x0002A0) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x0151 (0x0002A2) 0x292B- f:00024 d: 299 | OR[299] = A
0x0152 (0x0002A4) 0x1800-0x0101 f:00014 d: 0 | A = 257 (0x0101)
0x0154 (0x0002A8) 0x292C- f:00024 d: 300 | OR[300] = A
0x0155 (0x0002AA) 0x211A- f:00020 d: 282 | A = OR[282]
0x0156 (0x0002AC) 0x292D- f:00024 d: 301 | OR[301] = A
0x0157 (0x0002AE) 0x2119- f:00020 d: 281 | A = OR[281]
0x0158 (0x0002B0) 0x292E- f:00024 d: 302 | OR[302] = A
0x0159 (0x0002B2) 0x112B- f:00010 d: 299 | A = 299 (0x012B)
0x015A (0x0002B4) 0x5800- f:00054 d: 0 | B = A
0x015B (0x0002B6) 0x1800-0x2718 f:00014 d: 0 | A = 10008 (0x2718)
0x015D (0x0002BA) 0x7C09- f:00076 d: 9 | R = OR[9]
0x015E (0x0002BC) 0x1029- f:00010 d: 41 | A = 41 (0x0029)
0x015F (0x0002BE) 0x292B- f:00024 d: 299 | OR[299] = A
0x0160 (0x0002C0) 0x1800-0x0168 f:00014 d: 0 | A = 360 (0x0168)
0x0162 (0x0002C4) 0x292C- f:00024 d: 300 | OR[300] = A
0x0163 (0x0002C6) 0x211A- f:00020 d: 282 | A = OR[282]
0x0164 (0x0002C8) 0x292D- f:00024 d: 301 | OR[301] = A
0x0165 (0x0002CA) 0x2118- f:00020 d: 280 | A = OR[280]
0x0166 (0x0002CC) 0x292E- f:00024 d: 302 | OR[302] = A
0x0167 (0x0002CE) 0x112B- f:00010 d: 299 | A = 299 (0x012B)
0x0168 (0x0002D0) 0x5800- f:00054 d: 0 | B = A
0x0169 (0x0002D2) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x016A (0x0002D4) 0x7C09- f:00076 d: 9 | R = OR[9]
0x016B (0x0002D6) 0x1800-0x9037 f:00014 d: 0 | A = 36919 (0x9037)
0x016D (0x0002DA) 0x291A- f:00024 d: 282 | OR[282] = A
0x016E (0x0002DC) 0x722C- f:00071 d: 44 | P = P - 44 (0x0142)
0x016F (0x0002DE) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x0170 (0x0002E0) 0x292B- f:00024 d: 299 | OR[299] = A
0x0171 (0x0002E2) 0x1800-0x0157 f:00014 d: 0 | A = 343 (0x0157)
0x0173 (0x0002E6) 0x292C- f:00024 d: 300 | OR[300] = A
0x0174 (0x0002E8) 0x2118- f:00020 d: 280 | A = OR[280]
0x0175 (0x0002EA) 0x292D- f:00024 d: 301 | OR[301] = A
0x0176 (0x0002EC) 0x1800-0x01A3 f:00014 d: 0 | A = 419 (0x01A3)
0x0178 (0x0002F0) 0x292E- f:00024 d: 302 | OR[302] = A
0x0179 (0x0002F2) 0x112B- f:00010 d: 299 | A = 299 (0x012B)
0x017A (0x0002F4) 0x5800- f:00054 d: 0 | B = A
0x017B (0x0002F6) 0x1800-0x2718 f:00014 d: 0 | A = 10008 (0x2718)
0x017D (0x0002FA) 0x7C09- f:00076 d: 9 | R = OR[9]
0x017E (0x0002FC) 0x1800-0xA037 f:00014 d: 0 | A = 41015 (0xA037)
0x0180 (0x000300) 0x291A- f:00024 d: 282 | OR[282] = A
0x0181 (0x000302) 0x723F- f:00071 d: 63 | P = P - 63 (0x0142)
0x0182 (0x000304) 0x211E- f:00020 d: 286 | A = OR[286]
0x0183 (0x000306) 0x1E00-0x4D54 f:00017 d: 0 | A = A - 19796 (0x4D54)
0x0185 (0x00030A) 0x8402- f:00102 d: 2 | P = P + 2 (0x0187), A = 0
0x0186 (0x00030C) 0x7005- f:00070 d: 5 | P = P + 5 (0x018B)
0x0187 (0x00030E) 0x1800-0x4D54 f:00014 d: 0 | A = 19796 (0x4D54)
0x0189 (0x000312) 0x2921- f:00024 d: 289 | OR[289] = A
0x018A (0x000314) 0x701D- f:00070 d: 29 | P = P + 29 (0x01A7)
0x018B (0x000316) 0x211E- f:00020 d: 286 | A = OR[286]
0x018C (0x000318) 0x1E00-0x5354 f:00017 d: 0 | A = A - 21332 (0x5354)
0x018E (0x00031C) 0x8402- f:00102 d: 2 | P = P + 2 (0x0190), A = 0
0x018F (0x00031E) 0x7005- f:00070 d: 5 | P = P + 5 (0x0194)
0x0190 (0x000320) 0x1800-0x444B f:00014 d: 0 | A = 17483 (0x444B)
0x0192 (0x000324) 0x2921- f:00024 d: 289 | OR[289] = A
0x0193 (0x000326) 0x7014- f:00070 d: 20 | P = P + 20 (0x01A7)
0x0194 (0x000328) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x0195 (0x00032A) 0x292B- f:00024 d: 299 | OR[299] = A
0x0196 (0x00032C) 0x1800-0x0157 f:00014 d: 0 | A = 343 (0x0157)
0x0198 (0x000330) 0x292C- f:00024 d: 300 | OR[300] = A
0x0199 (0x000332) 0x2118- f:00020 d: 280 | A = OR[280]
0x019A (0x000334) 0x292D- f:00024 d: 301 | OR[301] = A
0x019B (0x000336) 0x1800-0x00EA f:00014 d: 0 | A = 234 (0x00EA)
0x019D (0x00033A) 0x292E- f:00024 d: 302 | OR[302] = A
0x019E (0x00033C) 0x112B- f:00010 d: 299 | A = 299 (0x012B)
0x019F (0x00033E) 0x5800- f:00054 d: 0 | B = A
0x01A0 (0x000340) 0x1800-0x2718 f:00014 d: 0 | A = 10008 (0x2718)
0x01A2 (0x000344) 0x7C09- f:00076 d: 9 | R = OR[9]
0x01A3 (0x000346) 0x1800-0xA037 f:00014 d: 0 | A = 41015 (0xA037)
0x01A5 (0x00034A) 0x291A- f:00024 d: 282 | OR[282] = A
0x01A6 (0x00034C) 0x7264- f:00071 d: 100 | P = P - 100 (0x0142)
0x01A7 (0x00034E) 0x2118- f:00020 d: 280 | A = OR[280]
0x01A8 (0x000350) 0x1419- f:00012 d: 25 | A = A + 25 (0x0019)
0x01A9 (0x000352) 0x2908- f:00024 d: 264 | OR[264] = A
0x01AA (0x000354) 0x2121- f:00020 d: 289 | A = OR[289]
0x01AB (0x000356) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x01AC (0x000358) 0x0200- f:00001 d: 0 | EXIT
0x01AD (0x00035A) 0x2118- f:00020 d: 280 | A = OR[280]
0x01AE (0x00035C) 0x141C- f:00012 d: 28 | A = A + 28 (0x001C)
0x01AF (0x00035E) 0x2924- f:00024 d: 292 | OR[292] = A
0x01B0 (0x000360) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x01B1 (0x000362) 0x2925- f:00024 d: 293 | OR[293] = A
0x01B2 (0x000364) 0x2125- f:00020 d: 293 | A = OR[293]
0x01B3 (0x000366) 0x1608- f:00013 d: 8 | A = A - 8 (0x0008)
0x01B4 (0x000368) 0xAC03-0x0219 f:00126 d: 3 | P = OR[3]+537 (0x0219), A = 0
0x01B6 (0x00036C) 0x7E03-0x02FC f:00077 d: 3 | R = OR[3]+764 (0x02FC)
0x01B8 (0x000370) 0x2126- f:00020 d: 294 | A = OR[294]
0x01B9 (0x000372) 0x1620- f:00013 d: 32 | A = A - 32 (0x0020)
0x01BA (0x000374) 0x8402- f:00102 d: 2 | P = P + 2 (0x01BC), A = 0
0x01BB (0x000376) 0x7003- f:00070 d: 3 | P = P + 3 (0x01BE)
0x01BC (0x000378) 0x724D- f:00071 d: 77 | P = P - 77 (0x016F)
0x01BD (0x00037A) 0x703C- f:00070 d: 60 | P = P + 60 (0x01F9)
0x01BE (0x00037C) 0x2126- f:00020 d: 294 | A = OR[294]
0x01BF (0x00037E) 0x8402- f:00102 d: 2 | P = P + 2 (0x01C1), A = 0
0x01C0 (0x000380) 0x7039- f:00070 d: 57 | P = P + 57 (0x01F9)
0x01C1 (0x000382) 0x2121- f:00020 d: 289 | A = OR[289]
0x01C2 (0x000384) 0x1E00-0x444B f:00017 d: 0 | A = A - 17483 (0x444B)
0x01C4 (0x000388) 0x8402- f:00102 d: 2 | P = P + 2 (0x01C6), A = 0
0x01C5 (0x00038A) 0x702A- f:00070 d: 42 | P = P + 42 (0x01EF)
0x01C6 (0x00038C) 0x1008- f:00010 d: 8 | A = 8 (0x0008)
0x01C7 (0x00038E) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x01C8 (0x000390) 0x251B- f:00022 d: 283 | A = A + OR[283]
0x01C9 (0x000392) 0x143C- f:00012 d: 60 | A = A + 60 (0x003C)
0x01CA (0x000394) 0x290D- f:00024 d: 269 | OR[269] = A
0x01CB (0x000396) 0x310D- f:00030 d: 269 | A = (OR[269])
0x01CC (0x000398) 0x290D- f:00024 d: 269 | OR[269] = A
0x01CD (0x00039A) 0x1008- f:00010 d: 8 | A = 8 (0x0008)
0x01CE (0x00039C) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x01CF (0x00039E) 0x2908- f:00024 d: 264 | OR[264] = A
0x01D0 (0x0003A0) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x01D1 (0x0003A2) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x01D2 (0x0003A4) 0x8604- f:00103 d: 4 | P = P + 4 (0x01D6), A # 0
0x01D3 (0x0003A6) 0x210D- f:00020 d: 269 | A = OR[269]
0x01D4 (0x0003A8) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x01D5 (0x0003AA) 0x290D- f:00024 d: 269 | OR[269] = A
0x01D6 (0x0003AC) 0x210D- f:00020 d: 269 | A = OR[269]
0x01D7 (0x0003AE) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x01D8 (0x0003B0) 0x8402- f:00102 d: 2 | P = P + 2 (0x01DA), A = 0
0x01D9 (0x0003B2) 0x7013- f:00070 d: 19 | P = P + 19 (0x01EC)
0x01DA (0x0003B4) 0x1800-0x3964 f:00014 d: 0 | A = 14692 (0x3964)
0x01DC (0x0003B8) 0x290D- f:00024 d: 269 | OR[269] = A
0x01DD (0x0003BA) 0x2124- f:00020 d: 292 | A = OR[292]
0x01DE (0x0003BC) 0x290E- f:00024 d: 270 | OR[270] = A
0x01DF (0x0003BE) 0x1004- f:00010 d: 4 | A = 4 (0x0004)
0x01E0 (0x0003C0) 0x290F- f:00024 d: 271 | OR[271] = A
0x01E1 (0x0003C2) 0x7006- f:00070 d: 6 | P = P + 6 (0x01E7)
0x01E2 (0x0003C4) 0x310D- f:00030 d: 269 | A = (OR[269])
0x01E3 (0x0003C6) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x01E4 (0x0003C8) 0x2D0D- f:00026 d: 269 | OR[269] = OR[269] + 1
0x01E5 (0x0003CA) 0x2D0E- f:00026 d: 270 | OR[270] = OR[270] + 1
0x01E6 (0x0003CC) 0x2F0F- f:00027 d: 271 | OR[271] = OR[271] - 1
0x01E7 (0x0003CE) 0x210F- f:00020 d: 271 | A = OR[271]
0x01E8 (0x0003D0) 0x8E06- f:00107 d: 6 | P = P - 6 (0x01E2), A # 0
0x01E9 (0x0003D2) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x01EA (0x0003D4) 0x2923- f:00024 d: 291 | OR[291] = A
0x01EB (0x0003D6) 0x7003- f:00070 d: 3 | P = P + 3 (0x01EE)
0x01EC (0x0003D8) 0x1008- f:00010 d: 8 | A = 8 (0x0008)
0x01ED (0x0003DA) 0x2923- f:00024 d: 291 | OR[291] = A
0x01EE (0x0003DC) 0x700A- f:00070 d: 10 | P = P + 10 (0x01F8)
0x01EF (0x0003DE) 0x2121- f:00020 d: 289 | A = OR[289]
0x01F0 (0x0003E0) 0x1E00-0x4D54 f:00017 d: 0 | A = A - 19796 (0x4D54)
0x01F2 (0x0003E4) 0x8402- f:00102 d: 2 | P = P + 2 (0x01F4), A = 0
0x01F3 (0x0003E6) 0x7005- f:00070 d: 5 | P = P + 5 (0x01F8)
0x01F4 (0x0003E8) 0x2125- f:00020 d: 293 | A = OR[293]
0x01F5 (0x0003EA) 0x8402- f:00102 d: 2 | P = P + 2 (0x01F7), A = 0
0x01F6 (0x0003EC) 0x7002- f:00070 d: 2 | P = P + 2 (0x01F8)
0x01F7 (0x0003EE) 0x7288- f:00071 d: 136 | P = P - 136 (0x016F)
0x01F8 (0x0003F0) 0x0200- f:00001 d: 0 | EXIT
0x01F9 (0x0003F2) 0x2126- f:00020 d: 294 | A = OR[294]
0x01FA (0x0003F4) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x01FB (0x0003F6) 0x290D- f:00024 d: 269 | OR[269] = A
0x01FC (0x0003F8) 0x2125- f:00020 d: 293 | A = OR[293]
0x01FD (0x0003FA) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x01FE (0x0003FC) 0x2524- f:00022 d: 292 | A = A + OR[292]
0x01FF (0x0003FE) 0x290E- f:00024 d: 270 | OR[270] = A
0x0200 (0x000400) 0x2125- f:00020 d: 293 | A = OR[293]
0x0201 (0x000402) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x0202 (0x000404) 0x2908- f:00024 d: 264 | OR[264] = A
0x0203 (0x000406) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0204 (0x000408) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x0205 (0x00040A) 0x8607- f:00103 d: 7 | P = P + 7 (0x020C), A # 0
0x0206 (0x00040C) 0x310E- f:00030 d: 270 | A = (OR[270])
0x0207 (0x00040E) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x0208 (0x000410) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x0209 (0x000412) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x020A (0x000414) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x020B (0x000416) 0x7006- f:00070 d: 6 | P = P + 6 (0x0211)
0x020C (0x000418) 0x310E- f:00030 d: 270 | A = (OR[270])
0x020D (0x00041A) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x020F (0x00041E) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x0210 (0x000420) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x0211 (0x000422) 0x2D25- f:00026 d: 293 | OR[293] = OR[293] + 1
0x0212 (0x000424) 0x7260- f:00071 d: 96 | P = P - 96 (0x01B2)
0x0213 (0x000426) 0x2121- f:00020 d: 289 | A = OR[289]
0x0214 (0x000428) 0x1E00-0x444B f:00017 d: 0 | A = A - 17483 (0x444B)
0x0216 (0x00042C) 0x8402- f:00102 d: 2 | P = P + 2 (0x0218), A = 0
0x0217 (0x00042E) 0x7013- f:00070 d: 19 | P = P + 19 (0x022A)
0x0218 (0x000430) 0x1800-0x3964 f:00014 d: 0 | A = 14692 (0x3964)
0x021A (0x000434) 0x290D- f:00024 d: 269 | OR[269] = A
0x021B (0x000436) 0x2124- f:00020 d: 292 | A = OR[292]
0x021C (0x000438) 0x290E- f:00024 d: 270 | OR[270] = A
0x021D (0x00043A) 0x1004- f:00010 d: 4 | A = 4 (0x0004)
0x021E (0x00043C) 0x290F- f:00024 d: 271 | OR[271] = A
0x021F (0x00043E) 0x7006- f:00070 d: 6 | P = P + 6 (0x0225)
0x0220 (0x000440) 0x310D- f:00030 d: 269 | A = (OR[269])
0x0221 (0x000442) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x0222 (0x000444) 0x2D0D- f:00026 d: 269 | OR[269] = OR[269] + 1
0x0223 (0x000446) 0x2D0E- f:00026 d: 270 | OR[270] = OR[270] + 1
0x0224 (0x000448) 0x2F0F- f:00027 d: 271 | OR[271] = OR[271] - 1
0x0225 (0x00044A) 0x210F- f:00020 d: 271 | A = OR[271]
0x0226 (0x00044C) 0x8E06- f:00107 d: 6 | P = P - 6 (0x0220), A # 0
0x0227 (0x00044E) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0228 (0x000450) 0x2923- f:00024 d: 291 | OR[291] = A
0x0229 (0x000452) 0x7007- f:00070 d: 7 | P = P + 7 (0x0230)
0x022A (0x000454) 0x2121- f:00020 d: 289 | A = OR[289]
0x022B (0x000456) 0x1E00-0x4D54 f:00017 d: 0 | A = A - 19796 (0x4D54)
0x022D (0x00045A) 0x8402- f:00102 d: 2 | P = P + 2 (0x022F), A = 0
0x022E (0x00045C) 0x7002- f:00070 d: 2 | P = P + 2 (0x0230)
0x022F (0x00045E) 0x72C0- f:00071 d: 192 | P = P - 192 (0x016F)
0x0230 (0x000460) 0x0200- f:00001 d: 0 | EXIT
0x0231 (0x000462) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0232 (0x000464) 0x2927- f:00024 d: 295 | OR[295] = A
0x0233 (0x000466) 0x1008- f:00010 d: 8 | A = 8 (0x0008)
0x0234 (0x000468) 0x2923- f:00024 d: 291 | OR[291] = A
0x0235 (0x00046A) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0236 (0x00046C) 0x2925- f:00024 d: 293 | OR[293] = A
0x0237 (0x00046E) 0x2125- f:00020 d: 293 | A = OR[293]
0x0238 (0x000470) 0x1604- f:00013 d: 4 | A = A - 4 (0x0004)
0x0239 (0x000472) 0x8426- f:00102 d: 38 | P = P + 38 (0x025F), A = 0
0x023A (0x000474) 0x74BC- f:00072 d: 188 | R = P + 188 (0x02F6)
0x023B (0x000476) 0x2126- f:00020 d: 294 | A = OR[294]
0x023C (0x000478) 0x8405- f:00102 d: 5 | P = P + 5 (0x0241), A = 0
0x023D (0x00047A) 0x2126- f:00020 d: 294 | A = OR[294]
0x023E (0x00047C) 0x163A- f:00013 d: 58 | A = A - 58 (0x003A)
0x023F (0x00047E) 0x8402- f:00102 d: 2 | P = P + 2 (0x0241), A = 0
0x0240 (0x000480) 0x700C- f:00070 d: 12 | P = P + 12 (0x024C)
0x0241 (0x000482) 0x2125- f:00020 d: 293 | A = OR[293]
0x0242 (0x000484) 0x8402- f:00102 d: 2 | P = P + 2 (0x0244), A = 0
0x0243 (0x000486) 0x7002- f:00070 d: 2 | P = P + 2 (0x0245)
0x0244 (0x000488) 0x72D5- f:00071 d: 213 | P = P - 213 (0x016F)
0x0245 (0x00048A) 0x2118- f:00020 d: 280 | A = OR[280]
0x0246 (0x00048C) 0x1428- f:00012 d: 40 | A = A + 40 (0x0028)
0x0247 (0x00048E) 0x2908- f:00024 d: 264 | OR[264] = A
0x0248 (0x000490) 0x2127- f:00020 d: 295 | A = OR[295]
0x0249 (0x000492) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x024A (0x000494) 0x0200- f:00001 d: 0 | EXIT
0x024B (0x000496) 0x7011- f:00070 d: 17 | P = P + 17 (0x025C)
0x024C (0x000498) 0x2126- f:00020 d: 294 | A = OR[294]
0x024D (0x00049A) 0x1620- f:00013 d: 32 | A = A - 32 (0x0020)
0x024E (0x00049C) 0x8402- f:00102 d: 2 | P = P + 2 (0x0250), A = 0
0x024F (0x00049E) 0x7003- f:00070 d: 3 | P = P + 3 (0x0252)
0x0250 (0x0004A0) 0x72E1- f:00071 d: 225 | P = P - 225 (0x016F)
0x0251 (0x0004A2) 0x700B- f:00070 d: 11 | P = P + 11 (0x025C)
0x0252 (0x0004A4) 0x2126- f:00020 d: 294 | A = OR[294]
0x0253 (0x0004A6) 0x1630- f:00013 d: 48 | A = A - 48 (0x0030)
0x0254 (0x0004A8) 0x8007- f:00100 d: 7 | P = P + 7 (0x025B), C = 0
0x0255 (0x0004AA) 0x2126- f:00020 d: 294 | A = OR[294]
0x0256 (0x0004AC) 0x1639- f:00013 d: 57 | A = A - 57 (0x0039)
0x0257 (0x0004AE) 0x8003- f:00100 d: 3 | P = P + 3 (0x025A), C = 0
0x0258 (0x0004B0) 0x8402- f:00102 d: 2 | P = P + 2 (0x025A), A = 0
0x0259 (0x0004B2) 0x7002- f:00070 d: 2 | P = P + 2 (0x025B)
0x025A (0x0004B4) 0x7002- f:00070 d: 2 | P = P + 2 (0x025C)
0x025B (0x0004B6) 0x72EC- f:00071 d: 236 | P = P - 236 (0x016F)
0x025C (0x0004B8) 0x74AF- f:00072 d: 175 | R = P + 175 (0x030B)
0x025D (0x0004BA) 0x2D25- f:00026 d: 293 | OR[293] = OR[293] + 1
0x025E (0x0004BC) 0x7227- f:00071 d: 39 | P = P - 39 (0x0237)
0x025F (0x0004BE) 0x72F0- f:00071 d: 240 | P = P - 240 (0x016F)
0x0260 (0x0004C0) 0x2123- f:00020 d: 291 | A = OR[291]
0x0261 (0x0004C2) 0x2928- f:00024 d: 296 | OR[296] = A
0x0262 (0x0004C4) 0x2118- f:00020 d: 280 | A = OR[280]
0x0263 (0x0004C6) 0x1420- f:00012 d: 32 | A = A + 32 (0x0020)
0x0264 (0x0004C8) 0x2929- f:00024 d: 297 | OR[297] = A
0x0265 (0x0004CA) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0266 (0x0004CC) 0x2925- f:00024 d: 293 | OR[293] = A
0x0267 (0x0004CE) 0x2125- f:00020 d: 293 | A = OR[293]
0x0268 (0x0004D0) 0x1610- f:00013 d: 16 | A = A - 16 (0x0010)
0x0269 (0x0004D2) 0x8441- f:00102 d: 65 | P = P + 65 (0x02AA), A = 0
0x026A (0x0004D4) 0x748C- f:00072 d: 140 | R = P + 140 (0x02F6)
0x026B (0x0004D6) 0x2126- f:00020 d: 294 | A = OR[294]
0x026C (0x0004D8) 0x162F- f:00013 d: 47 | A = A - 47 (0x002F)
0x026D (0x0004DA) 0x8402- f:00102 d: 2 | P = P + 2 (0x026F), A = 0
0x026E (0x0004DC) 0x7007- f:00070 d: 7 | P = P + 7 (0x0275)
0x026F (0x0004DE) 0x2125- f:00020 d: 293 | A = OR[293]
0x0270 (0x0004E0) 0x8402- f:00102 d: 2 | P = P + 2 (0x0272), A = 0
0x0271 (0x0004E2) 0x7002- f:00070 d: 2 | P = P + 2 (0x0273)
0x0272 (0x0004E4) 0x7303- f:00071 d: 259 | P = P - 259 (0x016F)
0x0273 (0x0004E6) 0x0200- f:00001 d: 0 | EXIT
0x0274 (0x0004E8) 0x701C- f:00070 d: 28 | P = P + 28 (0x0290)
0x0275 (0x0004EA) 0x2126- f:00020 d: 294 | A = OR[294]
0x0276 (0x0004EC) 0x1620- f:00013 d: 32 | A = A - 32 (0x0020)
0x0277 (0x0004EE) 0x8402- f:00102 d: 2 | P = P + 2 (0x0279), A = 0
0x0278 (0x0004F0) 0x7003- f:00070 d: 3 | P = P + 3 (0x027B)
0x0279 (0x0004F2) 0x730A- f:00071 d: 266 | P = P - 266 (0x016F)
0x027A (0x0004F4) 0x7016- f:00070 d: 22 | P = P + 22 (0x0290)
0x027B (0x0004F6) 0x2126- f:00020 d: 294 | A = OR[294]
0x027C (0x0004F8) 0x8402- f:00102 d: 2 | P = P + 2 (0x027E), A = 0
0x027D (0x0004FA) 0x7013- f:00070 d: 19 | P = P + 19 (0x0290)
0x027E (0x0004FC) 0x1800-0x3969 f:00014 d: 0 | A = 14697 (0x3969)
0x0280 (0x000500) 0x290D- f:00024 d: 269 | OR[269] = A
0x0281 (0x000502) 0x2129- f:00020 d: 297 | A = OR[297]
0x0282 (0x000504) 0x290E- f:00024 d: 270 | OR[270] = A
0x0283 (0x000506) 0x1008- f:00010 d: 8 | A = 8 (0x0008)
0x0284 (0x000508) 0x290F- f:00024 d: 271 | OR[271] = A
0x0285 (0x00050A) 0x7006- f:00070 d: 6 | P = P + 6 (0x028B)
0x0286 (0x00050C) 0x310D- f:00030 d: 269 | A = (OR[269])
0x0287 (0x00050E) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x0288 (0x000510) 0x2D0D- f:00026 d: 269 | OR[269] = OR[269] + 1
0x0289 (0x000512) 0x2D0E- f:00026 d: 270 | OR[270] = OR[270] + 1
0x028A (0x000514) 0x2F0F- f:00027 d: 271 | OR[271] = OR[271] - 1
0x028B (0x000516) 0x210F- f:00020 d: 271 | A = OR[271]
0x028C (0x000518) 0x8E06- f:00107 d: 6 | P = P - 6 (0x0286), A # 0
0x028D (0x00051A) 0x2128- f:00020 d: 296 | A = OR[296]
0x028E (0x00051C) 0x2923- f:00024 d: 291 | OR[291] = A
0x028F (0x00051E) 0x0200- f:00001 d: 0 | EXIT
0x0290 (0x000520) 0x2126- f:00020 d: 294 | A = OR[294]
0x0291 (0x000522) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0292 (0x000524) 0x290D- f:00024 d: 269 | OR[269] = A
0x0293 (0x000526) 0x2125- f:00020 d: 293 | A = OR[293]
0x0294 (0x000528) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x0295 (0x00052A) 0x2529- f:00022 d: 297 | A = A + OR[297]
0x0296 (0x00052C) 0x290E- f:00024 d: 270 | OR[270] = A
0x0297 (0x00052E) 0x2125- f:00020 d: 293 | A = OR[293]
0x0298 (0x000530) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x0299 (0x000532) 0x2908- f:00024 d: 264 | OR[264] = A
0x029A (0x000534) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x029B (0x000536) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x029C (0x000538) 0x8607- f:00103 d: 7 | P = P + 7 (0x02A3), A # 0
0x029D (0x00053A) 0x310E- f:00030 d: 270 | A = (OR[270])
0x029E (0x00053C) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x029F (0x00053E) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x02A0 (0x000540) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x02A1 (0x000542) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x02A2 (0x000544) 0x7006- f:00070 d: 6 | P = P + 6 (0x02A8)
0x02A3 (0x000546) 0x310E- f:00030 d: 270 | A = (OR[270])
0x02A4 (0x000548) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x02A6 (0x00054C) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x02A7 (0x00054E) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x02A8 (0x000550) 0x2D25- f:00026 d: 293 | OR[293] = OR[293] + 1
0x02A9 (0x000552) 0x7242- f:00071 d: 66 | P = P - 66 (0x0267)
0x02AA (0x000554) 0x733B- f:00071 d: 315 | P = P - 315 (0x016F)
0x02AB (0x000556) 0x2118- f:00020 d: 280 | A = OR[280]
0x02AC (0x000558) 0x1428- f:00012 d: 40 | A = A + 40 (0x0028)
0x02AD (0x00055A) 0x2927- f:00024 d: 295 | OR[295] = A
0x02AE (0x00055C) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x02AF (0x00055E) 0x2925- f:00024 d: 293 | OR[293] = A
0x02B0 (0x000560) 0x2125- f:00020 d: 293 | A = OR[293]
0x02B1 (0x000562) 0x1610- f:00013 d: 16 | A = A - 16 (0x0010)
0x02B2 (0x000564) 0x842A- f:00102 d: 42 | P = P + 42 (0x02DC), A = 0
0x02B3 (0x000566) 0x7443- f:00072 d: 67 | R = P + 67 (0x02F6)
0x02B4 (0x000568) 0x2126- f:00020 d: 294 | A = OR[294]
0x02B5 (0x00056A) 0x8402- f:00102 d: 2 | P = P + 2 (0x02B7), A = 0
0x02B6 (0x00056C) 0x7007- f:00070 d: 7 | P = P + 7 (0x02BD)
0x02B7 (0x00056E) 0x2125- f:00020 d: 293 | A = OR[293]
0x02B8 (0x000570) 0x8402- f:00102 d: 2 | P = P + 2 (0x02BA), A = 0
0x02B9 (0x000572) 0x7002- f:00070 d: 2 | P = P + 2 (0x02BB)
0x02BA (0x000574) 0x734B- f:00071 d: 331 | P = P - 331 (0x016F)
0x02BB (0x000576) 0x0200- f:00001 d: 0 | EXIT
0x02BC (0x000578) 0x7006- f:00070 d: 6 | P = P + 6 (0x02C2)
0x02BD (0x00057A) 0x2126- f:00020 d: 294 | A = OR[294]
0x02BE (0x00057C) 0x1620- f:00013 d: 32 | A = A - 32 (0x0020)
0x02BF (0x00057E) 0x8402- f:00102 d: 2 | P = P + 2 (0x02C1), A = 0
0x02C0 (0x000580) 0x7002- f:00070 d: 2 | P = P + 2 (0x02C2)
0x02C1 (0x000582) 0x7352- f:00071 d: 338 | P = P - 338 (0x016F)
0x02C2 (0x000584) 0x2126- f:00020 d: 294 | A = OR[294]
0x02C3 (0x000586) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x02C4 (0x000588) 0x290D- f:00024 d: 269 | OR[269] = A
0x02C5 (0x00058A) 0x2125- f:00020 d: 293 | A = OR[293]
0x02C6 (0x00058C) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x02C7 (0x00058E) 0x2527- f:00022 d: 295 | A = A + OR[295]
0x02C8 (0x000590) 0x290E- f:00024 d: 270 | OR[270] = A
0x02C9 (0x000592) 0x2125- f:00020 d: 293 | A = OR[293]
0x02CA (0x000594) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x02CB (0x000596) 0x2908- f:00024 d: 264 | OR[264] = A
0x02CC (0x000598) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x02CD (0x00059A) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x02CE (0x00059C) 0x8607- f:00103 d: 7 | P = P + 7 (0x02D5), A # 0
0x02CF (0x00059E) 0x310E- f:00030 d: 270 | A = (OR[270])
0x02D0 (0x0005A0) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x02D1 (0x0005A2) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x02D2 (0x0005A4) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x02D3 (0x0005A6) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x02D4 (0x0005A8) 0x7006- f:00070 d: 6 | P = P + 6 (0x02DA)
0x02D5 (0x0005AA) 0x310E- f:00030 d: 270 | A = (OR[270])
0x02D6 (0x0005AC) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x02D8 (0x0005B0) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x02D9 (0x0005B2) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x02DA (0x0005B4) 0x2D25- f:00026 d: 293 | OR[293] = OR[293] + 1
0x02DB (0x0005B6) 0x722B- f:00071 d: 43 | P = P - 43 (0x02B0)
0x02DC (0x0005B8) 0x736D- f:00071 d: 365 | P = P - 365 (0x016F)
0x02DD (0x0005BA) 0x1010- f:00010 d: 16 | A = 16 (0x0010)
0x02DE (0x0005BC) 0x2923- f:00024 d: 291 | OR[291] = A
0x02DF (0x0005BE) 0x7417- f:00072 d: 23 | R = P + 23 (0x02F6)
0x02E0 (0x0005C0) 0x2126- f:00020 d: 294 | A = OR[294]
0x02E1 (0x0005C2) 0x0A08- f:00005 d: 8 | A = A < 8 (0x0008)
0x02E2 (0x0005C4) 0x292A- f:00024 d: 298 | OR[298] = A
0x02E3 (0x0005C6) 0x7413- f:00072 d: 19 | R = P + 19 (0x02F6)
0x02E4 (0x0005C8) 0x212A- f:00020 d: 298 | A = OR[298]
0x02E5 (0x0005CA) 0x2526- f:00022 d: 294 | A = A + OR[294]
0x02E6 (0x0005CC) 0x292A- f:00024 d: 298 | OR[298] = A
0x02E7 (0x0005CE) 0x212A- f:00020 d: 298 | A = OR[298]
0x02E8 (0x0005D0) 0x1E00-0x4E52 f:00017 d: 0 | A = A - 20050 (0x4E52)
0x02EA (0x0005D4) 0x8404- f:00102 d: 4 | P = P + 4 (0x02EE), A = 0
0x02EB (0x0005D6) 0x212A- f:00020 d: 298 | A = OR[298]
0x02EC (0x0005D8) 0x8402- f:00102 d: 2 | P = P + 2 (0x02EE), A = 0
0x02ED (0x0005DA) 0x7007- f:00070 d: 7 | P = P + 7 (0x02F4)
0x02EE (0x0005DC) 0x2118- f:00020 d: 280 | A = OR[280]
0x02EF (0x0005DE) 0x141B- f:00012 d: 27 | A = A + 27 (0x001B)
0x02F0 (0x0005E0) 0x2908- f:00024 d: 264 | OR[264] = A
0x02F1 (0x0005E2) 0x212A- f:00020 d: 298 | A = OR[298]
0x02F2 (0x0005E4) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x02F3 (0x0005E6) 0x7002- f:00070 d: 2 | P = P + 2 (0x02F5)
0x02F4 (0x0005E8) 0x7385- f:00071 d: 389 | P = P - 389 (0x016F)
0x02F5 (0x0005EA) 0x0200- f:00001 d: 0 | EXIT
0x02F6 (0x0005EC) 0x2123- f:00020 d: 291 | A = OR[291]
0x02F7 (0x0005EE) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x02F8 (0x0005F0) 0x251B- f:00022 d: 283 | A = A + OR[283]
0x02F9 (0x0005F2) 0x143C- f:00012 d: 60 | A = A + 60 (0x003C)
0x02FA (0x0005F4) 0x290D- f:00024 d: 269 | OR[269] = A
0x02FB (0x0005F6) 0x310D- f:00030 d: 269 | A = (OR[269])
0x02FC (0x0005F8) 0x290D- f:00024 d: 269 | OR[269] = A
0x02FD (0x0005FA) 0x2123- f:00020 d: 291 | A = OR[291]
0x02FE (0x0005FC) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x02FF (0x0005FE) 0x2908- f:00024 d: 264 | OR[264] = A
0x0300 (0x000600) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0301 (0x000602) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x0302 (0x000604) 0x8604- f:00103 d: 4 | P = P + 4 (0x0306), A # 0
0x0303 (0x000606) 0x210D- f:00020 d: 269 | A = OR[269]
0x0304 (0x000608) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x0305 (0x00060A) 0x290D- f:00024 d: 269 | OR[269] = A
0x0306 (0x00060C) 0x210D- f:00020 d: 269 | A = OR[269]
0x0307 (0x00060E) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0308 (0x000610) 0x2926- f:00024 d: 294 | OR[294] = A
0x0309 (0x000612) 0x2D23- f:00026 d: 291 | OR[291] = OR[291] + 1
0x030A (0x000614) 0x0200- f:00001 d: 0 | EXIT
0x030B (0x000616) 0x2127- f:00020 d: 295 | A = OR[295]
0x030C (0x000618) 0x0A03- f:00005 d: 3 | A = A < 3 (0x0003)
0x030D (0x00061A) 0x2913- f:00024 d: 275 | OR[275] = A
0x030E (0x00061C) 0x2127- f:00020 d: 295 | A = OR[295]
0x030F (0x00061E) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001)
0x0310 (0x000620) 0x2513- f:00022 d: 275 | A = A + OR[275]
0x0311 (0x000622) 0x2927- f:00024 d: 295 | OR[295] = A
0x0312 (0x000624) 0x2126- f:00020 d: 294 | A = OR[294]
0x0313 (0x000626) 0x1630- f:00013 d: 48 | A = A - 48 (0x0030)
0x0314 (0x000628) 0x2913- f:00024 d: 275 | OR[275] = A
0x0315 (0x00062A) 0x2127- f:00020 d: 295 | A = OR[295]
0x0316 (0x00062C) 0x2513- f:00022 d: 275 | A = A + OR[275]
0x0317 (0x00062E) 0x2927- f:00024 d: 295 | OR[295] = A
0x0318 (0x000630) 0x0200- f:00001 d: 0 | EXIT
0x0319 (0x000632) 0x0000- f:00000 d: 0 | PASS
0x031A (0x000634) 0x0000- f:00000 d: 0 | PASS
0x031B (0x000636) 0x0000- f:00000 d: 0 | PASS
|
Qsi.Athena/Antlr/SqlBase.g4 | challenger71498/qsi | 0 | 2479 | /*
* 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.
*/
grammar SqlBase;
tokens {
DELIMITER
}
@header {
using Qsi.Data;
using Qsi.Tree;
using Qsi.Utilities;
}
singleStatement
: statement EOF
;
standaloneExpression
: expression EOF
;
standaloneRoutineBody
: routineBody EOF
;
statement
/***
* ATHENA DDL
*
* @athena (Amazon Athena DDL Reference)[https://docs.aws.amazon.com/athena/latest/ug/language-reference.html]
* @hive (HiveQL DDL Reference)[https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL]
*/
/**********************
* *
* *
* Database DDL *
* *
* *
**********************/
/**
* Create Database
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/create-database.html
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-CreateDatabaseCreateDatabase
*/
: CREATE
(REMOTE)?
(DATABASE | SCHEMA) (IF NOT EXISTS)? databaseName=identifier[null]
(COMMENT comment=string)?
(LOCATION location=string)?
(MANAGEDLOCATION managedLocation=string)?
(WITH DBPROPERTIES dbProperties=stringProperties)? #createDatabase
/**
* Drop Database
*
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-DropDatabase
*/
| DROP
(DATABASE | SCHEMA)
(IF EXISTS)?
databaseName=qualifiedName
(RESTRICT | CASCADE)? #dropDatabase
/**
* Database Set DB Properties
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/alter-database-set-dbproperties.html
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-AlterDatabase
*/
| ALTER (DATABASE | SCHEMA) databaseName=qualifiedName
SET DBPROPERTIES dbProperties=stringProperties #setDbProperties
/**
* Database Set Owner
*
* @notsupport Tested at 2021. 12. 14.
*/
// Not Implemented
/**
* Database Set Location
*
* @notsupport Tested at 2021. 12. 14.
*/
// Not Implemented
/**
* Database Set Managed Location
*
* @notsupport Tested at 2021. 12. 14.
*/
// Not Implemented
/**
* Use Database
*
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-UseDatabase
* @notsupport Tested at 2021. 12. 20.s
*/
// | USE
// databaseName=identifier[null] #useDatabase
/**********************
* *
* *
* Data Connector DDL *
* *
* *
**********************/
/**
* Create Connector
*
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-CreateDataConnectorCreateConnector
* @notsupport Not tested
*/
// Not Implemented
/**
* Drop Connector
*
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-DropConnector
* @notsupport Not tested
*/
// Not Implemented
/**
* Connector Set DC Properties
*
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-AlterConnector
* @notsupport Not tested
*/
// Not Implemented
/**
* Connector Set URL
*
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-AlterConnector
* @notsupport Not tested
*/
// Not Implemented
/**
* Connector Set Owner
*
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-AlterConnector
* @notsupport Not tested
*/
// Not Implemented
/**********************
* *
* *
* Table DDL *
* *
* *
**********************/
/**
* Create Table
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/create-table.html
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-CreateTable
*/
| CREATE
(TEMPORARY)?
(EXTERNAL)?
TABLE
(IF NOT EXISTS)?
tableName=qualifiedName
( '(' columnDefinition (',' columnDefinition)* ')' )?
(COMMENT tableComment=string)?
(PARTITIONED BY '(' columnDefinition (',' columnDefinition)* ')' )?
(
CLUSTERED BY '(' identifier[null] (',' identifier[null])* ')'
(SORTED BY (columnName=identifier[null] (ASC | DESC)? (',' columnName=identifier[null] (ASC | DESC)? )* ) )?
INTO numBuckets=number BUCKETS
)?
(
SKEWED BY '(' columnName=identifier[null] (',' columnName=identifier[null])* ')'
ON '(' '(' columnValue=string (',' columnValue=string)* ')' ( ',' '(' columnValue=string (',' columnValue=string)* ')' )* ')'
(STORED AS DIRECTORIES)?
)?
(
ROW FORMAT rowFormat
| STORED AS fileFormat
| ROW FORMAT rowFormat STORED AS fileFormat
| STORED BY storageHandlerClassName=string
(WITH SERDEPROPERTIES serDeProperties=stringProperties)?
)?
(LOCATION location=string)?
(TBLPROPERTIES tblProperties=stringProperties)? #createTable
/**
* Create Table As
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/create-table.html
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-CreateTable
*/
| CREATE
(TEMPORARY)?
(EXTERNAL)?
TABLE
(IF NOT EXISTS)?
tableName=qualifiedName
( '(' columnDefinition (',' columnDefinition)* ')' )?
(COMMENT tableComment=string)?
(PARTITIONED BY '(' columnDefinition (',' columnDefinition)* ')' )?
(
CLUSTERED BY '(' identifier[null] (',' identifier[null])* ')'
(SORTED BY (columnName=identifier[null] (ASC | DESC)? (',' columnName=identifier[null] (ASC | DESC)? )* ) )?
INTO numBuckets=number BUCKETS
)?
(
SKEWED BY '(' columnName=identifier[null] (',' columnName=identifier[null])* ')'
ON '(' '(' columnValue=string (',' columnValue=string)* ')' ( ',' '(' columnValue=string (',' columnValue=string)* ')' )* ')'
(STORED AS DIRECTORIES)?
)?
(
ROW FORMAT rowFormat
| STORED AS fileFormat
| ROW FORMAT rowFormat STORED AS fileFormat
| STORED BY storageHandlerClassName=string
(WITH SERDEPROPERTIES serDeProperties=stringProperties)?
)?
(LOCATION location=string)?
(TBLPROPERTIES tblProperties=stringProperties)?
AS query
(WITH NO? DATA)? #createTableAs
/**
* Create TABLE LIKE
*
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-CreateTable
*/
| CREATE
(TEMPORARY)?
(EXTERNAL)?
TABLE
(IF NOT EXISTS)?
tableName=qualifiedName
LIKE likeTableName=qualifiedName
(LOCATION location=string) #createTableLike
/**
* Drop Table
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/drop-table.html
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-DropTable
*/
| DROP TABLE
(IF NOT EXISTS)?
tableName=qualifiedName
(PURGE)? #dropTable
/**
* Truncate Table
*
* @notsupport Tested at 2021. 12. 16.
*/
// Not Implemented
/**
* Table Rename to
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Table Set Tbl Properties
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/alter-table-set-tblproperties.html
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-AlterTableProperties
*/
| ALTER TABLE tableName=qualifiedName
SET TBLPROPERTIES tblProperties=stringProperties #setTblProperties
/**
* Table Set Serde
*
* @notsupport Tested at 2021. 12. 14.
*/
// Not Implemented
/**
* Table Set Serde Properties
*
* @notsupport Tested at 2021. 12. 14.
*/
// Not Implemented
/**
* Table Unset Serde Properties
*
* @notsupport Tested at 2021. 12. 14.
*/
// Not Implemented
/**
* Table Add Constraint
*
* @notsupport Tested at 2021. 12. 14.
*/
// Not Implemented
/**
* Table Clustered by
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Table Not Clustered
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Table Skewed by
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Table Set Skewed Location
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Table Not Skewed
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Table Not Stored
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Table Not Stored as Directories
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Msck Repair Table
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/msck-repair-table.html
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-RecoverPartitions(MSCKREPAIRTABLE)
*/
| MSCK (REPAIR)? TABLE tableName=qualifiedName
(ADD | DROP | SYNC PARTITIONS) #repairTable
/***************************
* *
* *
* Table/Partition DDL *
* *
* *
***************************/
/**
* Table/Partition Set File Format
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Table/Partition Touch
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Table/Partition Compact
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Table/Partition Concatenate
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Table/Partition Enable/Disable No Drop
*
* @notsupport Tested at 2021. 12. 14.
*/
// Not Implemented
/**
* Table/Partition Enable/Disable Offline
*
* @notsupport Tested at 2021. 12. 14.
*/
// Not Implemented
/**
* Table/Partition Update Columns
*
* @notsupport Tested at 2021. 12. 14.
*/
// Not Implemented
/**
* Table/Partition Set Location
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/alter-table-set-location.html
* @hive https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=82706445#LanguageManualDDL-AlterTable/PartitionLocation
*/
| ALTER TABLE tableName=qualifiedName
(PARTITION partitionSpec=properties)?
SET LOCATION location=string #setLocation
/**********************
* *
* *
* Partition DDL *
* *
* *
**********************/
/**
* Archive Partition
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Unarchive Partition
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Add Partitions
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/alter-table-add-partition.html
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-AddPartitions
*/
| ALTER TABLE tableName=qualifiedName ADD (IF NOT EXISTS)?
(
PARTITION partitionSpec=properties
(LOCATION location=string)?
)+ #addPartitions
/**
* Rename Partition
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/alter-table-rename-partition.html
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-RenamePartition
*/
| ALTER TABLE tableName=qualifiedName
PARTITION from=properties
RENAME TO PARTITION to=properties #renamePartition
/**
* Exchange Partition
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Drop Partition
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/alter-table-drop-partition.html
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-DropPartitions
*/
| ALTER TABLE tableName=qualifiedName DROP (IF EXISTS)?
PARTITION partitionSpec=properties (',' PARTITION partitionSpec=properties)*
(IGNORE PROTECTION)?
(PURGE)? #dropPartition
// endregion
/**********************
* *
* *
* Column DDL *
* *
* *
**********************/
/**
* Change Column
* @comment According to Reference1(AWS), CHANGE COLUMN is not supported in Athena, but works in test
* test query: "ALTER TABLE table_name CHANGE original_column changed_column int"
* @athena https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-ChangeColumnName/Type/Position/Comment
*/
| ALTER TABLE tableName=qualifiedName
(PARTITION properties)?
CHANGE (COLUMN)? identifier[null] columnDefinition
(FIRST | AFTER identifier[null])?
(CASCADE | RESTRICT)? #changeColumn
/**
* Add Columns
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/alter-table-add-columns.html
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-Add/ReplaceColumns
*/
| ALTER TABLE tableName=qualifiedName
(PARTITION partitionSpec=properties)?
ADD COLUMNS
'(' columnDefinition (',' columnDefinition)* ')'
(CASCADE|RESTRICT)? #addColumns
/**
* Replace Columns
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/alter-table-replace-columns.html
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-Add/ReplaceColumns
*/
| ALTER TABLE tableName=qualifiedName
(PARTITION partitionSpec=properties)?
REPLACE COLUMNS
'(' columnDefinition (',' columnDefinition)* ')'
(CASCADE|RESTRICT)? #replaceColumns
/**********************
* *
* *
* View DDL *
* *
* *
**********************/
/**
* Create View
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/create-view.html
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-CreateView
*/
| CREATE
(OR REPLACE)?
VIEW
(IF NOT EXISTS)?
viewName=qualifiedName
(
columnName=identifier[null] (COMMENT columnComment=string)?
(',' columnName=identifier[null] (COMMENT columnComment=string)? )*
)?
viewColumnAliases?
(COMMENT viewComment=string)?
(TBLPROPERTIES tblProperties=stringProperties)?
AS query #createView
/**
* Drop View
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/drop-view.html
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-DropView
*/
| DROP VIEW (IF EXISTS)? viewName=qualifiedName #dropView
/**
* Set View Tbl Properties
*
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-AlterViewProperties
*/
| ALTER VIEW viewName=qualifiedName
SET TBLPROPERTIES tblProperties=stringProperties #setViewTblProperties
/**
* Alter View As Select
*
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-AlterViewAsSelect
*/
| ALTER VIEW viewName=qualifiedName AS query #alterViewAsSelect
/*************************
* *
* *
* Materialized View DDL *
* *
* *
*************************/
/**
* Create Materialized View
*
* @notsupport Not tested
*/
// Not Implemented
/**
* Drop Materialized View
*
* @notsupport Not tested
*/
// Not Implemented
/**
* Alter Materialized View
*
* @notsupport Not tested
*/
// Not Implemented
/*************************
* *
* *
* Index DDL *
* *
* *
*************************/
/**
* Create Index
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Drop Index
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Alter Index
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/*************************
* *
* *
* Macro DDL *
* *
* *
*************************/
/**
* Create Temporary Macro
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Drop Temporary Macro
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/*************************
* *
* *
* Function DDL *
* *
* *
*************************/
/**
* Create Function
*
* @notsupport Tested at 2021. 12. 16.
*/
// Not Implemented
/**
* Drop Function
*
* @notsupport Tested at 2021. 12. 16.
*/
// Not Implemented
/**
* Reload Function
*
* @notsupport Tested at 2021. 12. 16.
*/
// Not Implemented
/*************************
* *
* *
* Role DDL *
* *
* *
*************************/
/**
* Create Role
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Grant Role
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Revoke Role
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Drop Role
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Show Roles
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Show Role Grant
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Show Current Roles
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Set Role
*
* @notsupport Not tested
*/
// Not Implemented
/**
* Show Principals
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Grant privilege_type
*
* @notsupport Not tested
*/
// Not Implemented
/**
* Revoke privilege_type
*
* @notsupport Not tested
*/
// Not Implemented
/**
* Show Grant
*
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/*************************
* *
* *
* Show DDL *
* *
* *
*************************/
/**
* Show Databases
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/show-databases.html
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-ShowDatabases
*/
| SHOW (DATABASES | SCHEMAS)
(LIKE string)? #showDatabases
/**
* Show Connectors
*
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-ShowConnectors
* @notsupport Not tested
*/
// Not Implemented
/**
* Show Tables
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/show-tables.html
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-ShowTables
*/
| SHOW TABLES
(IN databaseName=identifier[null])?
(string)? #showTables
/**
* Show Views
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/show-views.html
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-ShowViews
*/
| SHOW VIEWS
( (IN | FROM) databaseName=identifier[null])?
(LIKE string) #showViews
/**
* Show Materialized Views
*
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-ShowMaterializedViews
* @notsupport Not tested
*/
// Not Implemented
/**
* Show Partitions
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/show-partitions.html
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-ShowPartitions
*/
| SHOW PARTITIONS
tableName=qualifiedName
(PARTITION properties)?
(WHERE where=booleanExpression)?
(ORDER BY sortItem (',' sortItem)*)?
(LIMIT limit=INTEGER_VALUE)? #showPartitions
/**
* Show Table/Partition Extended
*
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-ShowTable/PartitionExtended
*/
| SHOW TABLE EXTENDED
((IN | FROM) databaseName=qualifiedName)?
LIKE string
(PARTITION properties)? #showTableExtended
/**
* Show Table Properties
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/show-tblproperties.html
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-ShowTableProperties
*/
| SHOW TBLPROPERTIES
tableName=qualifiedName
( '(' string ')' )? #showTableProperties
/**
* Show Create Table
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/show-create-table.html
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-ShowCreateTable
*/
| SHOW CREATE TABLE
tableName=qualifiedName #showCreateTable
/**
* Show Indexes
*
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-ShowIndexes
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Show Columns
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/show-columns.html
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-ShowColumns
*/
| SHOW COLUMNS
(FROM | IN)
tableName=qualifiedName
( (FROM | IN) databaseName=qualifiedName?)
(LIKE string)? #showColumns
/**
* Show Functions
*
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-ShowFunctions
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Show Locks
*
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-ShowLocks
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Show Conf
*
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-ShowConf
* @notsupport Tested at 2021. 12. 16.
*/
// Not Implemented
/**
* Show Transactions
*
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-ShowTransactions
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Show Compactions
*
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-ShowCompactions
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/*************************
* *
* *
* Describe DDL *
* *
* *
*************************/
/**
* Describe Database
*
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-DescribeDatabase
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* Describe Data Connector
*
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-DescribeDataconnector
* @notsupport Not tested
*/
// Not Implemented
/**
* Describe Table / View / MaterializedView / Column
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/describe-table.html
* @athena https://docs.aws.amazon.com/athena/latest/ug/describe-view.html
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-DescribeTable/View/MaterializedView/Column
*/
| (DESCRIBE | DESC)
(EXTENDED | FORMATTED)?
tableName=qualifiedName
(PARTITION partitionSpec=properties)?
(
columnName=identifier[null]
( '.' (fieldName=identifier[null] | '$elem$' | '$key$' | '$value$') )*
)? #describeTable
/*************************
* *
* *
* Abort DDL *
* *
* *
*************************/
/**
* Abort Transactions
*
* @hive https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl#LanguageManualDDL-AbortTransactions
* @notsupport Not tested
*/
/***
* ATHENA DML
*
* @athena (Amazon Athena DML Reference)[https://docs.aws.amazon.com/athena/latest/ug/functions-operators-reference-section.html]
* @presto (Presto SQL Syntax Refrence)[https://prestodb.io/docs/current/sql.html]
*/
/**
* ALTER FUNCTION
*
* @presto https://prestodb.io/docs/current/sql/alter-function.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* ALTER SCHEMA
*
* @presto https://prestodb.io/docs/current/sql/alter-schema.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* ALTER TABLE
*
* @presto https://prestodb.io/docs/current/sql/alter-table.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* Analyze
*
* @presto https://prestodb.io/docs/current/sql/analyze.html
* @notsupport Tested at 2021. 12. 20.
*/
// Not Implemented
/**
* Call
*
* @presto https://prestodb.io/docs/current/sql/call.html
* @notsupport Tested at 2021. 12. 20.
*/
// Not Implemented
/**
* COMMIT
*
* @presto https://prestodb.io/docs/current/sql/commit.html
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemeneted
/**
* CREATE FUNCTION
*
* @presto https://prestodb.io/docs/current/sql/create-function.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* CREATE ROLE
*
* @presto https://prestodb.io/docs/current/sql/create-role.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* CREATE SCHEMA
*
* @presto https://prestodb.io/docs/current/sql/create-schema.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* CREATE TABLE
*
* @presto https://prestodb.io/docs/current/sql/create-table.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* CREATE TABLE AS
*
* @presto https://prestodb.io/docs/current/sql/create-table-as.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* CREATE VIEW
*
* @presto https://prestodb.io/docs/current/sql/create-view.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* DEALLOCATE PREPARE
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/querying-with-prepared-statements.html
* @presto https://prestodb.io/docs/current/sql/deallocate-prepare.html
*/
| DEALLOCATE PREPARE identifier[null] #deallocate
/**
* DELETE
*
* @presto https://prestodb.io/docs/current/sql/delete.html
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* DESCRIBE
*
* @presto https://prestodb.io/docs/current/sql/describe.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* DESCRIBE INPUT
*
* @presto https://prestodb.io/docs/current/sql/describe-input.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* DESCRIBE OUTPUT
*
* @presto https://prestodb.io/docs/current/sql/describe-output.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* DROP FUNCTION
*
* @presto https://prestodb.io/docs/current/sql/drop-function.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* DROP ROLE
*
* @presto https://prestodb.io/docs/current/sql/drop-role.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* DROP SCHEMA
*
* @presto https://prestodb.io/docs/current/sql/drop-schema.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* DROP TABLE
*
* @presto https://prestodb.io/docs/current/sql/drop-table.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* DROP VIEW
*
* @presto https://prestodb.io/docs/current/sql/drop-view.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* EXECUTE
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/querying-with-prepared-statements.html
* @presto https://prestodb.io/docs/current/sql/execute.html
*/
| EXECUTE identifier[null] (USING expression (',' expression)*)? #execute
/**
* EXPLAIN
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/athena-explain-statement.html
* @presto https://prestodb.io/docs/current/sql/explain.html
*/
| EXPLAIN VERBOSE?
('(' explainOption (',' explainOption)* ')')? statement #explain
/**
* EXPLAIN ANALYZE
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/athena-explain-statement.html
* @presto https://prestodb.io/docs/current/sql/explain-analyze.html
*/
| EXPLAIN ANALYZE VERBOSE?
('(' explainOption (',' explainOption)* ')')? statement #explainAnalyze
/**
* GRANT
*
* @presto https://prestodb.io/docs/current/sql/grant.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* GRANT ROLES
*
* @presto https://prestodb.io/docs/current/sql/grant-roles.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* INSERT
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/insert-into.html
* @presto https://prestodb.io/docs/current/sql/insert.html
*/
| INSERT INTO qualifiedName columnAliases? query #insertInto
/**
* PREPARE
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/querying-with-prepared-statements.html
* @presto
*/
| PREPARE identifier[null] FROM statement #prepare
/**
* RESET SESSION
*
* @presto https://prestodb.io/docs/current/sql/reset-session.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* REVOKE
*
* @presto https://prestodb.io/docs/current/sql/revoke.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* REVOKE ROLES
*
* @presto https://prestodb.io/docs/current/sql/revoke-roles.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* ROLLBACK
*
* @presto https://prestodb.io/docs/current/sql/rollback.html
* @notsupport https://docs.aws.amazon.com/athena/latest/ug/unsupported-ddl.html
*/
// Not Implemented
/**
* SELECT
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/select.html
* @presto https://prestodb.io/docs/current/sql/select.html
*/
| query #statementDefault
/**
* SET ROLE
*
* @presto https://prestodb.io/docs/current/sql/set-role.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* SET SESSION
*
* @presto https://prestodb.io/docs/current/sql/set-session.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* SHOW CATALOGS
*
* @presto https://prestodb.io/docs/current/sql/show-catalogs.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* SHOW COLUMNS
*
* @presto https://prestodb.io/docs/current/sql/show-columns.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* SHOW CREATE FUNCTION
*
* @presto https://prestodb.io/docs/current/sql/show-create-function.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* SHOW CREATE TABLE
*
* @presto https://prestodb.io/docs/current/sql/show-create-table.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* SHOW CREATE VIEW
*
* @presto https://prestodb.io/docs/current/sql/show-create-view.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* SHOW FUNCTIONS
*
* @presto https://prestodb.io/docs/current/sql/show-functions.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* SHOW GRANTS
*
* @presto https://prestodb.io/docs/current/sql/show-grants.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* SHOW ROLE GRANTS
*
* @presto https://prestodb.io/docs/current/sql/show-role-grants.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* SHOW ROLES
*
* @presto https://prestodb.io/docs/current/sql/show-roles.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* SHOW SCHEMAS
*
* @presto https://prestodb.io/docs/current/sql/show-schemas.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* SHOW SESSION
*
* @presto https://prestodb.io/docs/current/sql/show-session.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* SHOW STATS
*
* @presto https://prestodb.io/docs/current/sql/show-stats.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* SHOW TABLES
*
* @presto https://prestodb.io/docs/current/sql/show-tables.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* START TRANSACTION
*
* @presto https://prestodb.io/docs/current/sql/start-transaction.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* USE
*
* @presto https://prestodb.io/docs/current/sql/use.html
* @notsupport Use hive syntax
*/
// Not Implemented
/**
* VALUES
*
* @presto https://prestodb.io/docs/current/sql/values.html
*/
// Implemented in "query"
/***
* Athena Only Statements
*/
/**
* UNLOAD
*
* @athena https://docs.aws.amazon.com/athena/latest/ug/unload.html
*/
| UNLOAD '(' query ')'
TO location=string WITH properties #unload
;
query
: with? queryNoWith
;
with
: WITH namedQuery (',' namedQuery)*
;
//tableElement
// : columnDefinition
// | likeClause
// ;
columnDefinition
: identifier[null] dataType (COMMENT comment=string)?
;
//likeClause
// : LIKE qualifiedName (optionType=(INCLUDING | EXCLUDING) PROPERTIES)?
// ;
rowFormat
: DELIMITED
(FIELDS TERMINATED BY string (ESCAPED BY string)?)?
(COLLECTION ITEMS TERMINATED BY string)?
(MAP KEYS TERMINATED BY string)?
(LINES TERMINATED BY string)?
(NULL DEFINED AS string)?
| SERDE string
(WITH SERDEPROPERTIES stringProperties)?
;
fileFormat
: SEQUENCEFILE
| TEXTFILE
| RCFILE
| ORC
| PARQUET
| AVRO
| JSONFILE
| INPUTFORMAT string OUTPUTFORMAT string
;
stringProperties
: '(' stringProperty (',' stringProperty)* ')'
;
stringProperty
: string EQ string
;
properties
: '(' property (',' property)* ')'
;
property
: identifier[null] EQ expression
;
//sqlParameterDeclaration
// : identifier[null] type
// ;
//routineCharacteristics
// : routineCharacteristic*
// ;
//routineCharacteristic
// : LANGUAGE language
// | determinism
// | nullCallClause
// ;
//alterRoutineCharacteristics
// : alterRoutineCharacteristic*
// ;
//alterRoutineCharacteristic
// : nullCallClause
// ;
routineBody
: returnStatement
| externalBodyReference
;
returnStatement
: RETURN expression
;
externalBodyReference
: EXTERNAL (NAME externalRoutineName)?
;
//language
// : SQL
// | identifier[null]
// ;
//
//determinism
// : DETERMINISTIC
// | NOT DETERMINISTIC;
//
//nullCallClause
// : RETURNS NULL ON NULL INPUT
// | CALLED ON NULL INPUT
// ;
externalRoutineName
: identifier[null]
;
queryNoWith
: queryTerm
orderBy?
limitOffsetTerm?
;
limitOffsetTerm
: offsetTerm limitTerm
| offsetTerm
| limitTerm
;
offsetTerm
: OFFSET rowCountTerm ROW?
| OFFSET rowCountTerm ROWS
;
limitTerm
: LIMIT rowCountTerm
| LIMIT ALL
;
rowCountTerm
: INTEGER_VALUE
| parameterExpression
;
queryTerm
: queryPrimary #queryTermDefault
| left=queryTerm operator=(UNION | EXCEPT | INTERSECT) setQuantifier? right=queryTerm #setOperation
;
queryPrimary
: querySpecification #queryPrimaryDefault
| TABLE qualifiedName #table
| VALUES expression (',' expression)* #inlineTable
| '(' queryNoWith ')' #subquery
;
sortItem
: expression ordering=(ASC | DESC)? (NULLS nullOrdering=(FIRST | LAST))?
;
querySpecification
: SELECT
setQuantifier?
selectItem (',' selectItem)*
fromTerm?
whereTerm?
groupByHavingTerm?
;
fromTerm
: FROM relation (',' relation)*
;
whereTerm
: WHERE where=booleanExpression
;
groupByHavingTerm
: GROUP BY setQuantifier? groupingElement (',' groupingElement)*
HAVING having=booleanExpression
| GROUP BY setQuantifier? groupingElement (',' groupingElement)*
| HAVING having=booleanExpression
;
//groupBy
// : setQuantifier? groupingElement (',' groupingElement)*
// ;
groupingElement
: groupingSet #singleGroupingSet
| ROLLUP '(' (expression (',' expression)*)? ')' #rollup
| CUBE '(' (expression (',' expression)*)? ')' #cube
| GROUPING SETS '(' groupingSet (',' groupingSet)* ')' #multipleGroupingSets
;
groupingSet
: '(' (expression (',' expression)*)? ')' #multipleExpressionGroupingSet
| expression #singleExpressionGroupingSet
;
namedQuery
: name=identifier[null] (columnAliases)? AS '(' query ')'
;
setQuantifier
: DISTINCT
| ALL
;
selectItem
: expression (AS? identifier[null])? #selectSingle
| qualifiedName '.' ASTERISK #selectAll
| ASTERISK #selectAll
;
relation
: left=relation
(
CROSS JOIN right=sampledRelation
| joinType JOIN rightRelation=relation joinCriteria
| NATURAL joinType JOIN right=sampledRelation
) #joinRelation
| sampledRelation #relationDefault
;
joinType
: INNER?
| LEFT OUTER?
| RIGHT OUTER?
| FULL OUTER?
;
joinCriteria
: ON booleanExpression
| USING '(' identifier[null] (',' identifier[null])* ')'
;
sampledRelation
: aliasedRelation (
TABLESAMPLE sampleType '(' percentage=expression ')'
)?
;
sampleType
: BERNOULLI
| SYSTEM
;
aliasedRelation
: relationPrimary (AS? identifier[null] columnAliases?)?
;
viewColumnAliases
: '('
columnName+=identifier[null] (COMMENT string)?
(',' columnName+=identifier[null] (COMMENT string)? )*
')'
;
columnAliases
: '(' identifier[null] (',' identifier[null])* ')'
;
relationPrimary
: qualifiedName #tableName
| '(' query ')' #subqueryRelation
| UNNEST '(' expression (',' expression)* ')' (WITH ORDINALITY)? #unnest
| LATERAL '(' query ')' #lateral
| '(' relation ')' #parenthesizedRelation
;
expression
: booleanExpression
;
booleanExpression
: valueExpression predicate[$valueExpression.ctx]? #predicated
| NOT booleanExpression #logicalNot
| left=booleanExpression operator=AND right=booleanExpression #logicalBinary
| left=booleanExpression operator=OR right=booleanExpression #logicalBinary
;
// workaround for https://github.com/antlr/antlr4/issues/780
predicate[ParserRuleContext value]
: comparisonOperator right=valueExpression #comparison
| comparisonOperator comparisonQuantifier '(' query ')' #quantifiedComparison
| NOT? BETWEEN lower=valueExpression AND upper=valueExpression #between
| NOT? IN '(' expression (',' expression)* ')' #inList
| NOT? IN '(' query ')' #inSubquery
| NOT? LIKE pattern=valueExpression (ESCAPE escape=valueExpression)? #like
| IS NOT? NULL #nullPredicate
| IS NOT? DISTINCT FROM right=valueExpression #distinctFrom
;
valueExpression
: primaryExpression #valueExpressionDefault
| valueExpression AT timeZoneSpecifier #atTimeZone
| operator=(MINUS | PLUS) valueExpression #arithmeticUnary
| left=valueExpression operator=(ASTERISK | SLASH | PERCENT) right=valueExpression #arithmeticBinary
| left=valueExpression operator=(PLUS | MINUS) right=valueExpression #arithmeticBinary
| left=valueExpression CONCAT right=valueExpression #concatenation
;
primaryExpression
: NULL #nullLiteral
| interval #intervalLiteral
| identifier[null] string #typeConstructor
| DOUBLE_PRECISION string #typeConstructor
| number #numericLiteral
| booleanValue #booleanLiteral
| string #stringLiteral
| BINARY_LITERAL #binaryLiteral
| parameterExpression #parameter
| POSITION '(' valueExpression IN valueExpression ')' #position
| '(' expression (',' expression)+ ')' #rowConstructor
| ROW '(' expression (',' expression)* ')' #rowConstructor
| qualifiedName '(' ASTERISK ')' filter? over? #functionCall
| qualifiedName '(' (setQuantifier? expression (',' expression)*)?
orderBy? ')' filter? (nullTreatment? over)? #functionCall
| identifier[null] '->' expression #lambda
| '(' (identifier[null] (',' identifier[null])*)? ')' '->' expression #lambda
| '(' query ')' #subqueryExpression
// This is an extension to ANSI SQL, which considers EXISTS to be a <boolean expression>
| EXISTS '(' query ')' #exists
| CASE valueExpression whenClause+ (ELSE elseExpression=expression)? END #simpleCase
| CASE whenClause+ (ELSE elseExpression=expression)? END #searchedCase
| CAST '(' expression AS dataType ')' #cast
| TRY_CAST '(' expression AS dataType ')' #cast
| ARRAY '[' (expression (',' expression)*)? ']' #arrayConstructor
| value=primaryExpression '[' index=valueExpression ']' #subscript
| identifier[null] #columnReference
| expr=primaryExpression '.' fieldName=identifier[null] #dereference
| name=CURRENT_DATE #specialDateTimeFunction
| name=CURRENT_TIME ('(' precision=INTEGER_VALUE ')')? #specialDateTimeFunction
| name=CURRENT_TIMESTAMP ('(' precision=INTEGER_VALUE ')')? #specialDateTimeFunction
| name=LOCALTIME ('(' precision=INTEGER_VALUE ')')? #specialDateTimeFunction
| name=LOCALTIMESTAMP ('(' precision=INTEGER_VALUE ')')? #specialDateTimeFunction
| name=CURRENT_USER #currentUser
| SUBSTRING '(' valueExpression FROM valueExpression (FOR valueExpression)? ')' #substring
| NORMALIZE '(' valueExpression (',' normalForm)? ')' #normalize
| EXTRACT '(' identifier[null] FROM valueExpression ')' #extract
| '(' expression ')' #parenthesizedExpression
| GROUPING '(' (qualifiedName (',' qualifiedName)*)? ')' #groupingOperation
;
timeZoneSpecifier
: TIME ZONE interval #timeZoneInterval
| TIME ZONE string #timeZoneString
;
interval
: INTERVAL sign=(PLUS | MINUS)? string from=intervalField (TO to=intervalField)?
;
orderBy
: ORDER BY sortItem (',' sortItem)*
;
string
: STRING #basicStringLiteral
| UNICODE_STRING (UESCAPE STRING)? #unicodeStringLiteral
;
number
: DECIMAL_VALUE #decimalLiteral
| DOUBLE_VALUE #doubleLiteral
| INTEGER_VALUE #integerLiteral
;
nullTreatment
: IGNORE NULLS
| RESPECT NULLS
;
comparisonOperator
: EQ | NEQ | LT | LTE | GT | GTE
;
comparisonQuantifier
: ALL | SOME | ANY
;
booleanValue
: TRUE | FALSE
;
intervalField
: YEAR | MONTH | DAY | HOUR | MINUTE | SECOND
;
normalForm
: NFD | NFC | NFKD | NFKC
;
//dataTypes
// : '(' (dataType (',' dataType)*)? ')'
// ;
dataType
: primitiveType
| arrayType
| mapType
| structType
| unionType
;
primitiveType
: TINYINT
| SMALLINT
| INT
| BIGINT
| BOOLEAN
| FLOAT
| DOUBLE
| DOUBLE PRECISION
| STRING
| BINARY
| TIMESTAMP
| DECIMAL
| DECIMAL '(' INTEGER_VALUE ',' INTEGER_VALUE ')'
| DATE
| VARCHAR
| CHAR
;
arrayType
: ARRAY '<' dataType '>'
;
mapType
: MAP < primitiveType, dataType >
;
structType
: STRUCT
'<'
columnName=identifier[null] ':' dataType (COMMENT comment=string)?
(',' columnName=identifier[null] ':' dataType (COMMENT comment=string)? )*
'>'
;
unionType
: UNIONTYPE
'<' dataType (',' dataType)* '>'
;
parameterExpression returns [int index]
: '?' { $index = NextBindParameterIndex(); }
;
//type
// : type ARRAY
// | ARRAY '<' type '>'
// | MAP '<' type ',' type '>'
// | ROW '(' identifier[null] type (',' identifier[null] type)* ')'
// | baseType ('(' typeParameter (',' typeParameter)* ')')?
// | INTERVAL from=intervalField TO to=intervalField
// ;
//typeParameter
// : INTEGER_VALUE | type
// ;
//
//baseType
// : TIME_WITH_TIME_ZONE
// | TIMESTAMP_WITH_TIME_ZONE
// | DOUBLE_PRECISION
// | qualifiedName
// ;
whenClause
: WHEN condition=expression THEN result=expression
;
filter
: FILTER '(' WHERE booleanExpression ')'
;
over
: OVER '(' windowSpecification ')'
;
windowSpecification:
partitionBy?
orderBy?
windowFrame?
;
partitionBy:
PARTITION BY partition+=expression (',' partition+=expression)*
;
windowFrame
: frameType=RANGE start=frameBound
| frameType=ROWS start=frameBound
| frameType=RANGE BETWEEN start=frameBound AND end=frameBound
| frameType=ROWS BETWEEN start=frameBound AND end=frameBound
;
frameBound
: UNBOUNDED boundType=PRECEDING #unboundedFrame
| UNBOUNDED boundType=FOLLOWING #unboundedFrame
| CURRENT ROW #currentRowBound
| expression boundType=(PRECEDING | FOLLOWING) #boundedFrame // expression should be unsignedLiteral
;
explainOption
: FORMAT value=(TEXT | GRAPHVIZ | JSON) #explainFormat
| TYPE value=(LOGICAL | DISTRIBUTED | VALIDATE | IO) #explainType
;
//transactionMode
// : ISOLATION LEVEL levelOfIsolation #isolationLevel
// | READ accessMode=(ONLY | WRITE) #transactionAccessMode
// ;
//levelOfIsolation
// : READ UNCOMMITTED #readUncommitted
// | READ COMMITTED #readCommitted
// | REPEATABLE READ #repeatableRead
// | SERIALIZABLE #serializable
// ;
//callArgument
// : expression #positionalArgument
// | identifier[null] '=>' expression #namedArgument
// ;
//privilege
// : SELECT | DELETE | INSERT | identifier[null]
// ;
qualifiedName returns [QsiQualifiedIdentifier qqi] locals [List<QsiIdentifier> buffer]
@init { $buffer = new List<QsiIdentifier>(); }
@after { $qqi = new QsiQualifiedIdentifier($buffer); }
: identifier[$buffer] ('.' identifier[$buffer] )*
;
//grantor
// : CURRENT_USER #currentUserGrantor
// | CURRENT_ROLE #currentRoleGrantor
// | principal #specifiedPrincipal
// ;
//principal
// : USER identifier[null] #userPrincipal
// | ROLE identifier[null] #rolePrincipal
// | identifier[null] #unspecifiedPrincipal
// ;
//roles
// : identifier[null] (',' identifier[null])*
// ;
identifier[List<QsiIdentifier> buffer] returns [QsiIdentifier qi]
@after { $buffer?.Add($qi); }
: i=IDENTIFIER { $qi = new QsiIdentifier($i.text.ToUpper(), false); } #unquotedIdentifier
| i=QUOTED_IDENTIFIER { $qi = new QsiIdentifier($i.text, true); } #quotedIdentifier
| ki=nonReserved { $qi = new QsiIdentifier($ki.text.ToUpper(), false); } #unquotedIdentifier
| i=BACKQUOTED_IDENTIFIER { $qi = new QsiIdentifier($i.text, true); } #backQuotedIdentifier
| i=DIGIT_IDENTIFIER { $qi = new QsiIdentifier($i.text.ToUpper(), false); } #digitIdentifier
;
nonReserved
// IMPORTANT: this rule must only contain tokens. Nested rules are not supported. See SqlParser.exitNonReserved
: ADD | AFTER | ADMIN | ALL | ANALYZE | ANY | ARRAY | ASC | AT
| BERNOULLI
| CALL | CALLED | CASCADE | CATALOGS | CHANGE | COLUMN | COLUMNS | COMMENT | COMMIT | COMMITTED | CURRENT | CURRENT_ROLE
| DATA | DATE | DAY | DEFINER | DESC | DETERMINISTIC | DISTRIBUTED
| EXCLUDING | EXPLAIN | EXTERNAL
| FILTER | FIRST | FOLLOWING | FORMAT | FUNCTION | FUNCTIONS
| GRANT | GRANTED | GRANTS | GRAPHVIZ
| HOUR
| IF | IGNORE | INCLUDING | INPUT | INTERVAL | INVOKER | IO | ISOLATION
| JSON
| LANGUAGE | LAST | LATERAL | LEVEL | LIMIT | LOGICAL
| MAP | MATERIALIZED | MINUTE | MONTH
| NAME | NFC | NFD | NFKC | NFKD | NO | NONE | NULLIF | NULLS
| OFFSET | ONLY | OPTION | ORDINALITY | OUTPUT | OVER
| PARTITION | PARTITIONS | POSITION | PRECEDING | PRIVILEGES | PROPERTIES
| RANGE | READ | REFRESH | RENAME | REPEATABLE | REPLACE | RESET | RESPECT | RESTRICT | RETURN | RETURNS | REVOKE | ROLE | ROLES | ROLLBACK | ROW | ROWS
| SCHEMA | SCHEMAS | SECOND | SECURITY | SERIALIZABLE | SESSION | SET | SETS | SQL
| SHOW | SOME | START | STATS | SUBSTRING | SYSTEM
| TABLES | TABLESAMPLE | TEMPORARY | TEXT | TIME | TIMESTAMP | TO | TRANSACTION | TRY_CAST | TYPE
| UNBOUNDED | UNCOMMITTED | USE | USER
| VALIDATE | VERBOSE | VIEW
| WORK | WRITE
| YEAR
| ZONE
| SYNC | PROTECTION | PURGE | SKEWED | DIRECTORIES | SORTED | REMOTE | MANAGEDLOCATION;
ADD: 'ADD';
ADMIN: 'ADMIN';
AFTER: 'AFTER';
ALL: 'ALL';
ALTER: 'ALTER';
ANALYZE: 'ANALYZE';
AND: 'AND';
ANY: 'ANY';
ARRAY: 'ARRAY';
AS: 'AS';
ASC: 'ASC';
AT: 'AT';
BERNOULLI: 'BERNOULLI';
BETWEEN: 'BETWEEN';
BY: 'BY';
CALL: 'CALL';
CALLED: 'CALLED';
CASCADE: 'CASCADE';
CASE: 'CASE';
CAST: 'CAST';
CATALOGS: 'CATALOGS';
CHANGE: 'CHANGE';
COLUMN: 'COLUMN';
COLUMNS: 'COLUMNS';
COMMENT: 'COMMENT';
COMMIT: 'COMMIT';
COMMITTED: 'COMMITTED';
CONSTRAINT: 'CONSTRAINT';
CREATE: 'CREATE';
CROSS: 'CROSS';
CUBE: 'CUBE';
CURRENT: 'CURRENT';
CURRENT_DATE: 'CURRENT_DATE';
CURRENT_ROLE: 'CURRENT_ROLE';
CURRENT_TIME: 'CURRENT_TIME';
CURRENT_TIMESTAMP: 'CURRENT_TIMESTAMP';
CURRENT_USER: 'CURRENT_USER';
DATA: 'DATA';
DATABASE: 'DATABASE';
DATE: 'DATE';
DAY: 'DAY';
DBPROPERTIES: 'DBPROPERTIES';
DEALLOCATE: 'DEALLOCATE';
DEFINER: 'DEFINER';
DELETE: 'DELETE';
DESC: 'DESC';
DESCRIBE: 'DESCRIBE';
DETERMINISTIC: 'DETERMINISTIC';
DISTINCT: 'DISTINCT';
DISTRIBUTED: 'DISTRIBUTED';
DROP: 'DROP';
ELSE: 'ELSE';
END: 'END';
ESCAPE: 'ESCAPE';
EXCEPT: 'EXCEPT';
EXCLUDING: 'EXCLUDING';
EXECUTE: 'EXECUTE';
EXISTS: 'EXISTS';
EXPLAIN: 'EXPLAIN';
EXTRACT: 'EXTRACT';
EXTERNAL: 'EXTERNAL';
FALSE: 'FALSE';
FILTER: 'FILTER';
FIRST: 'FIRST';
FOLLOWING: 'FOLLOWING';
FOR: 'FOR';
FORMAT: 'FORMAT';
FROM: 'FROM';
FULL: 'FULL';
FUNCTION: 'FUNCTION';
FUNCTIONS: 'FUNCTIONS';
GRANT: 'GRANT';
GRANTED: 'GRANTED';
GRANTS: 'GRANTS';
GRAPHVIZ: 'GRAPHVIZ';
GROUP: 'GROUP';
GROUPING: 'GROUPING';
HAVING: 'HAVING';
HOUR: 'HOUR';
IF: 'IF';
IGNORE: 'IGNORE';
IN: 'IN';
INCLUDING: 'INCLUDING';
INNER: 'INNER';
INPUT: 'INPUT';
INSERT: 'INSERT';
INTERSECT: 'INTERSECT';
INTERVAL: 'INTERVAL';
INTO: 'INTO';
INVOKER: 'INVOKER';
IO: 'IO';
IS: 'IS';
ISOLATION: 'ISOLATION';
JSON: 'JSON';
JOIN: 'JOIN';
LANGUAGE: 'LANGUAGE';
LAST: 'LAST';
LATERAL: 'LATERAL';
LEFT: 'LEFT';
LEVEL: 'LEVEL';
LIKE: 'LIKE';
LIMIT: 'LIMIT';
LOCATION: 'LOCATION';
LOCALTIME: 'LOCALTIME';
LOCALTIMESTAMP: 'LOCALTIMESTAMP';
LOGICAL: 'LOGICAL';
MAP: 'MAP';
MATERIALIZED: 'MATERIALIZED';
MINUTE: 'MINUTE';
MONTH: 'MONTH';
NAME: 'NAME';
NATURAL: 'NATURAL';
NFC : 'NFC';
NFD : 'NFD';
NFKC : 'NFKC';
NFKD : 'NFKD';
NO: 'NO';
NONE: 'NONE';
NORMALIZE: 'NORMALIZE';
NOT: 'NOT';
NULL: 'NULL';
NULLIF: 'NULLIF';
NULLS: 'NULLS';
OFFSET: 'OFFSET';
ON: 'ON';
ONLY: 'ONLY';
OPTION: 'OPTION';
OR: 'OR';
ORDER: 'ORDER';
ORDINALITY: 'ORDINALITY';
OUTER: 'OUTER';
OUTPUT: 'OUTPUT';
OVER: 'OVER';
PARTITION: 'PARTITION';
PARTITIONS: 'PARTITIONS';
POSITION: 'POSITION';
PRECEDING: 'PRECEDING';
PREPARE: 'PREPARE';
PRIVILEGES: 'PRIVILEGES';
PROPERTIES: 'PROPERTIES';
RANGE: 'RANGE';
READ: 'READ';
RECURSIVE: 'RECURSIVE';
REFRESH: 'REFRESH';
RENAME: 'RENAME';
REPEATABLE: 'REPEATABLE';
REPLACE: 'REPLACE';
RESET: 'RESET';
RESPECT: 'RESPECT';
RESTRICT: 'RESTRICT';
RETURN: 'RETURN';
RETURNS: 'RETURNS';
REVOKE: 'REVOKE';
RIGHT: 'RIGHT';
ROLE: 'ROLE';
ROLES: 'ROLES';
ROLLBACK: 'ROLLBACK';
ROLLUP: 'ROLLUP';
ROW: 'ROW';
ROWS: 'ROWS';
SCHEMA: 'SCHEMA';
SCHEMAS: 'SCHEMAS';
SECOND: 'SECOND';
SECURITY: 'SECURITY';
SELECT: 'SELECT';
SERIALIZABLE: 'SERIALIZABLE';
SESSION: 'SESSION';
SET: 'SET';
SETS: 'SETS';
SHOW: 'SHOW';
SOME: 'SOME';
SQL: 'SQL';
START: 'START';
STATS: 'STATS';
SUBSTRING: 'SUBSTRING';
SYSTEM: 'SYSTEM';
TABLE: 'TABLE';
TABLES: 'TABLES';
TABLESAMPLE: 'TABLESAMPLE';
TEMPORARY: 'TEMPORARY';
TEXT: 'TEXT';
THEN: 'THEN';
TIME: 'TIME';
TIMESTAMP: 'TIMESTAMP';
TO: 'TO';
TRANSACTION: 'TRANSACTION';
TRUE: 'TRUE';
TRY_CAST: 'TRY_CAST';
TYPE: 'TYPE';
UESCAPE: 'UESCAPE';
UNBOUNDED: 'UNBOUNDED';
UNCOMMITTED: 'UNCOMMITTED';
UNION: 'UNION';
UNNEST: 'UNNEST';
UNLOAD: 'UNLOAD';
USE: 'USE';
USER: 'USER';
USING: 'USING';
VALIDATE: 'VALIDATE';
VALUES: 'VALUES';
VERBOSE: 'VERBOSE';
VIEW: 'VIEW';
WHEN: 'WHEN';
WHERE: 'WHERE';
WITH: 'WITH';
WORK: 'WORK';
WRITE: 'WRITE';
YEAR: 'YEAR';
ZONE: 'ZONE';
PARTITIONED: 'PARTITIONED';
CLUSTERED: 'CLUSTERED';
BUCKETS: 'BUCKETS';
STORED: 'STORED';
SERDEPROPERTIES: 'SERDEPROPERTIES';
TBLPROPERTIES: 'TBLPROPERTIES';
DELIMITED: 'DELIMITED';
FIELDS: 'FIELDS';
TERMINATED: 'TERMINATED';
ESCAPED: 'ESCAPED';
COLLECTION: 'COLLECTION';
ITEMS: 'ITEMS';
KEYS: 'KEYS';
LINES: 'LINES';
DEFINED: 'DEFINED';
SERDE: 'SERDE';
SEQUENCEFILE: 'SEQUENCEFILE';
TEXTFILE: 'TEXTFILE';
RCFILE: 'RCFILE';
ORC: 'ORC';
PARQUET: 'PARQUET';
AVRO: 'AVRO';
INPUTFORMAT: 'INPUTFORMAT';
OUTPUTFORMAT: 'OUTPUTFORMAT';
EXTENDED: 'EXTENDED';
FORMATTED: 'FORMATTED';
MSCK: 'MSCK';
REPAIR: 'REPAIR';
DATABASES: 'DATABASES';
VIEWS: 'VIEWS';
SYNC: 'SYNC';
PROTECTION: 'PROTECTION';
PURGE: 'PURGE';
SKEWED: 'SKEWED';
DIRECTORIES: 'DIRECTORIES';
SORTED: 'SORTED';
JSONFILE: 'JSONFILE';
REMOTE: 'REMOTE';
MANAGEDLOCATION: 'MANAGEDLOCATION';
TINYINT: 'TINYINT';
BIGINT: 'BIGINT';
INT: 'INT';
SMALLINT: 'SMALLINT';
BOOLEAN: 'BOOLEAN';
FLOAT: 'FLOAT';
DOUBLE: 'DOUBLE';
PRECISION: 'PRECISION';
BINARY: 'BINARY';
DECIMAL: 'DECIMAL';
VARCHAR: 'VARCHAR';
CHAR: 'CHAR';
STRUCT: 'STRUCT';
UNIONTYPE: 'UNIONTYPE';
EQ : '=';
NEQ : '<>' | '!=';
LT : '<';
LTE : '<=';
GT : '>';
GTE : '>=';
PLUS: '+';
MINUS: '-';
ASTERISK: '*';
SLASH: '/';
PERCENT: '%';
CONCAT: '||';
STRING
: '\'' ( ~'\'' | '\'\'' )* '\''
;
UNICODE_STRING
: 'U&\'' ( ~'\'' | '\'\'' )* '\''
;
// Note: we allow any character inside the binary literal and validate
// its a correct literal when the AST is being constructed. This
// allows us to provide more meaningful error messages to the user
BINARY_LITERAL
: 'X\'' (~'\'')* '\''
;
INTEGER_VALUE
: DIGIT+
;
DECIMAL_VALUE
: DIGIT+ '.' DIGIT*
| '.' DIGIT+
;
DOUBLE_VALUE
: DIGIT+ ('.' DIGIT*)? EXPONENT
| '.' DIGIT+ EXPONENT
;
IDENTIFIER
: (LETTER | '_') (LETTER | DIGIT | '_' | '@' | ':')*
;
DIGIT_IDENTIFIER
: DIGIT (LETTER | DIGIT | '_' | '@' | ':')+
;
QUOTED_IDENTIFIER
: '"' ( ~'"' | '""' )* '"'
;
BACKQUOTED_IDENTIFIER
: '`' ( ~'`' | '``' )* '`'
;
TIME_WITH_TIME_ZONE
: 'TIME' WS 'WITH' WS 'TIME' WS 'ZONE'
;
TIMESTAMP_WITH_TIME_ZONE
: 'TIMESTAMP' WS 'WITH' WS 'TIME' WS 'ZONE'
;
DOUBLE_PRECISION
: 'DOUBLE' WS 'PRECISION'
;
fragment EXPONENT
: 'E' [+-]? DIGIT+
;
fragment DIGIT
: [0-9]
;
fragment LETTER
: [A-Z]
;
SIMPLE_COMMENT
: '--' ~[\r\n]* '\r'? '\n'? -> channel(HIDDEN)
;
BRACKETED_COMMENT
: '/*' .*? '*/' -> channel(HIDDEN)
;
WS
: [ \r\n\t]+ -> channel(HIDDEN)
;
// Catch-all for anything we can't recognize.
// We use this to be able to ignore and recover all the text
// when splitting statements with DelimiterLexer
UNRECOGNIZED
: .
;
|
alloy4fun_models/trashltl/models/4/yHJxrtzkeMBBrAv5Q.als | Kaixi26/org.alloytools.alloy | 0 | 4429 | open main
pred idyHJxrtzkeMBBrAv5Q_prop5 {
eventually some f:File | f not in File
}
pred __repair { idyHJxrtzkeMBBrAv5Q_prop5 }
check __repair { idyHJxrtzkeMBBrAv5Q_prop5 <=> prop5o } |
Commands/Miscellaneous Commands suite/system info/AppleScript version of (get system info).applescript | looking-for-a-job/applescript-examples | 1 | 53 | #!/usr/bin/osascript
AppleScript version of (get system info) |
libsrc/_DEVELOPMENT/string/c/sdcc_iy/ffs_fastcall.asm | meesokim/z88dk | 0 | 5658 |
; int ffs_fastcall(int i)
SECTION code_string
PUBLIC _ffs_fastcall
EXTERN asm_ffs
defc _ffs_fastcall = asm_ffs
|
Lectures/Two.agda | UoG-Agda/Agda101 | 0 | 12020 | <reponame>UoG-Agda/Agda101<filename>Lectures/Two.agda
module Lectures.Two where
-- Introduce imports
open import Lectures.One
-- Introduce type parameters
module List-types where
data List (A : Set₁) : Set₁ where
[] : List A
_∷_ : A → List A → List A
_ : List Set
_ = ⊥ ∷ (ℕ ∷ (⊤ ∷ []))
module List {ℓ} where
data List (A : Set ℓ) : Set ℓ where
[] : List A
_∷_ : A → List A → List A
_++_ : {A : Set ℓ} → List A → List A → List A
[] ++ ys = ys
(x ∷ xs) ++ ys = x ∷ (xs ++ ys)
map : {A B : Set ℓ} → (A → B) → List A → List B
map f [] = []
map f (x ∷ xs) = f x ∷ map f xs
open List using (List; []; _∷_)
_ : List ℕ
_ = 0 ∷ (1 ∷ (2 ∷ []))
-- Introduce type families
module Vec where
data Vec (A : Set) : ℕ → Set where
[] : Vec A zero
_∷_ : ∀ {n} → A → Vec A n → Vec A (suc n)
head : ∀ {A n} → Vec A (suc n) → A
head (x ∷ xs) = x
_++_ : ∀ {A n m} → Vec A n → Vec A m → Vec A (n + m)
[] ++ ys = ys
(x ∷ xs) ++ ys = x ∷ (xs ++ ys)
map : ∀ {A B n} → (A → B) → Vec A n → Vec B n
map f [] = []
map f (x ∷ xs) = f x ∷ map f xs
zipWith : ∀ {A B C : Set} {n} (f : A → B → C)
→ Vec A n → Vec B n → Vec C n
zipWith f [] [] = []
zipWith f (x ∷ xs) (y ∷ ys) = f x y ∷ zipWith f xs ys
-- \u+
data _⊎_ (A : Set) (B : Set) : Set where
inj₁ : A → A ⊎ B
inj₂ : B → A ⊎ B
Dec : Set → Set
Dec B = B ⊎ (¬ B)
private
data _×'_ (A : Set) (B : Set) : Set where
_,'_ : A → B → A ×' B
record _×''_ (A : Set) (B : Set) : Set where
constructor _,''_
field
proj₁ : A
proj₂ : B
-- \Sigma
record Σ {ℓ} (A : Set ℓ) (B : A → Set ℓ) : Set ℓ where
constructor _,_
field
proj₁ : A
proj₂ : B proj₁
open Σ public
_ : Σ ℕ _isEven
_ = 0 , tt
_×_ : Set → Set → Set
A × B = Σ A λ _ → B
|
Microsoft Word for Windows Version 1.1a/Word 1.1a CHM Distribution/OpusEtAl/tools/src/winemsds.asm | lborgav/Historical-Source-Codes | 7 | 164508 | <filename>Microsoft Word for Windows Version 1.1a/Word 1.1a CHM Distribution/OpusEtAl/tools/src/winemsds.asm
EMSF_EXISTS EQU 01h ; EMS exits.
EMSF_LIM_40 EQU 02h ; LIM 4.0 is available.
EMSF_LIB_CODE EQU 04h ; Library code segs above the line.
EMSF_DATA_ABOVE EQU 08h ; Task data segments above the line.
EMSF_RESOURCES_ABOVE EQU 10h ; Task resources above the line.
EMSF_SEARCH_PID_STACKS EQU 20h ; PatchStack search this PIDs stacks.
EMSF_SMARTDRIVE EQU 40h ; SMARTDrive exists.
EMSF_DONT_FREE EQU 80H ; Do not free this bank
EMSF1_PREV_HANDLE EQU 01h ; A user of EMS exists before Windows.
EMSF1_ADVANCED_OFF EQU 02h ; User said don't use advanced EMS (/N)
EMSF1_AST EQU 04h ; This is the AST 3.2 driver.
EMSF1_COMPACT_EMS EQU 08h ; Kernel wants EMS heap compacted.
include eems.inc
include winkern.inc
; DO NOT TOUCH THE FOLLOWING VARIABLES
globalW fEEMS,0 ; Non-zero if an advanced EEMS driver is present
; and is the number of swap areas
globalW segSwapArea,-1,3 ; List of up to 3 EEMS swap areas
globalW segSwapSize,0,3 ; List of up to 3 EEMS swap area sizes
globalW altfEEMS,0 ; Number of swap areas excluding LIM WINDOW
globalW segAltSwapArea,-1,3 ; EEMS swap areas excluding LIM WINDOW
globalW segAltSwapSize,0,3 ; EEMS swap area sizes excluding LIM WINDOW
globalW PID0_pages,0 ; #pages PID0 originally started with
globalW PID0_pages_low,0 ; #pages PID0 has below the line
globalW PID0_pages_high,0 ; #pages PID0 has above the line
globalW PID0_high_start,0 ; seg address of where high pages start
globalB fEMM,0 ; Non-zero if Intel/Above board Extended Memory
; Manager is present and is the size of the
; context save area
globalB EMSFlags,0,2 ; Flags are always a good idea.
globalW EMSPageFrame,0 ; The segment of the EMM page frame
globalW EMSPageSize,0 ; The raw EEMS page size
globalW EMSPageCount,0 ; Total number of mappable banks.
globalW EMSTaskPageSize,0 ; Min free banks required to start a task.
globalW PID_for_fake,0 ; the PID allocated for the fake task
globalW DOS_top_of_memory,0
globalW PID0_top_of_memory,0
globalW EMS_calc_swap_line,0 ; The calculated swap line
globalW EMSVectraDelta,0 ; Don't ask.
; DO NOT TOUCH THE ABOVE VARIABLES
|
awa/src/awa-users-filters.adb | Letractively/ada-awa | 0 | 5 | -----------------------------------------------------------------------
-- awa-users-filters -- Specific filters for authentication and key verification
-- Copyright (C) 2011, 2012, 2013 <NAME>
-- Written by <NAME> (<EMAIL>)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Util.Log.Loggers;
with ASF.Cookies;
with AWA.Users.Services;
with AWA.Users.Modules;
package body AWA.Users.Filters is
-- The logger
Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("AWA.Users.Filters");
-- ------------------------------
-- Set the user principal on the session associated with the ASF request.
-- ------------------------------
procedure Set_Session_Principal (Request : in out ASF.Requests.Request'Class;
Principal : in Principals.Principal_Access) is
Session : ASF.Sessions.Session := Request.Get_Session (Create => True);
begin
Session.Set_Principal (Principal.all'Access);
end Set_Session_Principal;
-- ------------------------------
-- Initialize the filter and configure the redirection URIs.
-- ------------------------------
procedure Initialize (Filter : in out Auth_Filter;
Context : in ASF.Servlets.Servlet_Registry'Class) is
URI : constant String := Context.Get_Init_Parameter (AUTH_FILTER_REDIRECT_PARAM);
begin
Log.Info ("Using login URI: {0}", URI);
if URI = "" then
Log.Error ("The login URI is empty. Redirection to the login page will not work.");
end if;
Filter.Login_URI := To_Unbounded_String (URI);
ASF.Security.Filters.Auth_Filter (Filter).Initialize (Context);
end Initialize;
procedure Authenticate (F : in Auth_Filter;
Request : in out ASF.Requests.Request'Class;
Response : in out ASF.Responses.Response'Class;
Session : in ASF.Sessions.Session;
Auth_Id : in String;
Principal : out ASF.Principals.Principal_Access) is
pragma Unreferenced (F, Session);
use AWA.Users.Modules;
use AWA.Users.Services;
Manager : constant User_Service_Access := AWA.Users.Modules.Get_User_Manager;
P : AWA.Users.Principals.Principal_Access;
begin
Manager.Authenticate (Cookie => Auth_Id,
Ip_Addr => "",
Principal => P);
Principal := P.all'Access;
-- Setup a new AID cookie with the new connection session.
declare
Cookie : constant String := Manager.Get_Authenticate_Cookie (P.Get_Session_Identifier);
C : ASF.Cookies.Cookie := ASF.Cookies.Create (ASF.Security.Filters.AID_COOKIE,
Cookie);
begin
ASF.Cookies.Set_Path (C, Request.Get_Context_Path);
ASF.Cookies.Set_Max_Age (C, 15 * 86400);
Response.Add_Cookie (Cookie => C);
end;
exception
when Not_Found =>
Principal := null;
end Authenticate;
-- ------------------------------
-- Display or redirects the user to the login page. This procedure is called when
-- the user is not authenticated.
-- ------------------------------
overriding
procedure Do_Login (Filter : in Auth_Filter;
Request : in out ASF.Requests.Request'Class;
Response : in out ASF.Responses.Response'Class) is
URI : constant String := To_String (Filter.Login_URI);
begin
Log.Info ("User is not logged, redirecting to {0}", URI);
if Request.Get_Header ("X-Requested-With") = "" then
Response.Send_Redirect (Location => URI);
else
Response.Send_Error (ASF.Responses.SC_UNAUTHORIZED);
end if;
end Do_Login;
-- ------------------------------
-- Initialize the filter and configure the redirection URIs.
-- ------------------------------
overriding
procedure Initialize (Filter : in out Verify_Filter;
Context : in ASF.Servlets.Servlet_Registry'Class) is
URI : constant String := Context.Get_Init_Parameter (VERIFY_FILTER_REDIRECT_PARAM);
begin
Filter.Invalid_Key_URI := To_Unbounded_String (URI);
end Initialize;
-- ------------------------------
-- Filter a request which contains an access key and verify that the
-- key is valid and identifies a user. Once the user is known, create
-- a session and setup the user principal.
--
-- If the access key is missing or invalid, redirect to the
-- <b>Invalid_Key_URI</b> associated with the filter.
-- ------------------------------
overriding
procedure Do_Filter (Filter : in Verify_Filter;
Request : in out ASF.Requests.Request'Class;
Response : in out ASF.Responses.Response'Class;
Chain : in out ASF.Servlets.Filter_Chain) is
Key : constant String := Request.Get_Parameter (PARAM_ACCESS_KEY);
Manager : constant Users.Services.User_Service_Access := Users.Modules.Get_User_Manager;
Principal : AWA.Users.Principals.Principal_Access;
begin
Log.Info ("Verify access key {0}", Key);
Manager.Verify_User (Key => Key,
IpAddr => "",
Principal => Principal);
Set_Session_Principal (Request, Principal);
-- Request is authorized, proceed to the next filter.
ASF.Servlets.Do_Filter (Chain => Chain,
Request => Request,
Response => Response);
exception
when AWA.Users.Services.Not_Found =>
declare
URI : constant String := To_String (Filter.Invalid_Key_URI);
begin
Log.Info ("Invalid access key {0}, redirecting to {1}", Key, URI);
Response.Send_Redirect (Location => URI);
end;
end Do_Filter;
end AWA.Users.Filters;
|
alloy4fun_models/trashltl/models/7/6edvcNEDWaiKJXxnb.als | Kaixi26/org.alloytools.alloy | 0 | 2118 | <reponame>Kaixi26/org.alloytools.alloy
open main
pred id6edvcNEDWaiKJXxnb_prop8 {
always all f:File | some f.link implies always eventually f.link in Trash
}
pred __repair { id6edvcNEDWaiKJXxnb_prop8 }
check __repair { id6edvcNEDWaiKJXxnb_prop8 <=> prop8o } |
src/i18n.adb | VitalijBondarenko/AdaNLS | 0 | 15123 | <reponame>VitalijBondarenko/AdaNLS
------------------------------------------------------------------------------
-- --
-- Copyright (c) 2014-2017 <NAME> <<EMAIL>> --
-- --
------------------------------------------------------------------------------
-- --
-- The MIT License (MIT) --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
-- "Software"), to deal in the Software without restriction, including --
-- without limitation the rights to use, copy, modify, merge, publish, --
-- distribute, sublicense, and/or sell copies of the Software, and to --
-- permit persons to whom the Software is furnished to do so, subject to --
-- the following conditions: --
-- --
-- The above copyright notice and this permission notice shall be included --
-- in all copies or substantial portions of the Software. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --
-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --
-- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY --
-- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, --
-- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE --
-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --
------------------------------------------------------------------------------
with Interfaces.C.Strings; use Interfaces.C.Strings;
package body I18n is
pragma Warnings (Off);
-------------
-- Gettext --
-------------
function Gettext (Msg : String) return String is
function Internal (Msg : String) return chars_ptr;
pragma Import (C, Internal, "gettext");
P : chars_ptr := Internal (Msg & ASCII.NUL);
begin
if P = Null_Ptr then
return "";
else
return Value (P);
end if;
end Gettext;
--------------
-- Dgettext --
--------------
function Dgettext (Domain : String; Msg : String) return String is
function Internal
(Domain : String; Msg : String) return chars_ptr;
pragma Import (C, Internal, "dgettext");
P : chars_ptr := Internal (Domain & ASCII.NUL, Msg & ASCII.NUL);
begin
if P = Null_Ptr then
return "";
else
return Value (P);
end if;
end Dgettext;
---------------
-- Dcgettext --
---------------
function Dcgettext
(Domain : String; Msg : String; Category : Locale_Category) return String
is
function Internal
(Domain : String; Msg : String; Category : Locale_Category)
return chars_ptr;
pragma Import (C, Internal, "dcgettext");
P : chars_ptr :=
Internal (Domain & ASCII.NUL, Msg & ASCII.NUL, Category);
begin
if P = Null_Ptr then
return "";
else
return Value (P);
end if;
end Dcgettext;
--------------
-- Ngettext --
--------------
function Ngettext
(Msg1 : String; Msg2 : String; N : unsigned_long) return String
is
function Internal
(Msg1 : String; Msg2 : String; N : unsigned_long) return chars_ptr;
pragma Import (C, Internal, "ngettext");
P : chars_ptr :=
Internal (Msg1 & ASCII.NUL, Msg2 & ASCII.NUL, N);
begin
if P = Null_Ptr then
return "";
else
return Value (P);
end if;
end Ngettext;
---------------
-- Dngettext --
---------------
function Dngettext
(Domain : String;
Msg1 : String;
Msg2 : String;
N : unsigned_long) return String
is
function Internal
(Domain : String;
Msg1 : String;
Msg2 : String;
N : unsigned_long) return chars_ptr;
pragma Import (C, Internal, "dngettext");
P : chars_ptr :=
Internal (Domain & ASCII.NUL, Msg1 & ASCII.NUL, Msg2 & ASCII.NUL, N);
begin
if P = Null_Ptr then
return "";
else
return Value (P);
end if;
end Dngettext;
----------------
-- Dcngettext --
----------------
function Dcngettext
(Domain : String;
Msg1 : String;
Msg2 : String;
N : unsigned_long;
Category : Locale_Category) return String
is
function Internal
(Domain : String;
Msg1 : String;
Msg2 : String;
N : unsigned_long;
Category : Locale_Category) return chars_ptr;
pragma Import (C, Internal, "dcngettext");
P : chars_ptr :=
Internal
(Domain & ASCII.NUL,
Msg1 & ASCII.NUL,
Msg2 & ASCII.NUL,
N,
Category);
begin
if P = Null_Ptr then
return "";
else
return Value (P);
end if;
end Dcngettext;
-----------------
-- Text_Domain --
-----------------
procedure Text_Domain (Domain_Name : String) is
procedure Internal (Domain_Name : String);
pragma Import (C, Internal, "textdomain");
begin
Internal (Domain_Name & ASCII.NUL);
end Text_Domain;
-------------------------
-- Default_Text_Domain --
-------------------------
function Default_Text_Domain return String is
function Internal (Domain : chars_ptr) return chars_ptr;
pragma Import (C, Internal, "textdomain");
P : chars_ptr := Internal (Null_Ptr);
begin
if P = Null_Ptr then
return "";
else
return Value (P);
end if;
end Default_Text_Domain;
----------------------
-- Bind_Text_Domain --
----------------------
procedure Bind_Text_Domain (Domain_Name : String; Dirname : String) is
procedure Internal (Domain_Name, Dirname : String);
pragma Import (C, Internal, "bindtextdomain");
begin
Internal (Domain_Name & ASCII.NUL, Dirname & ASCII.NUL);
end Bind_Text_Domain;
---------------------------
-- Text_Domain_Directory --
---------------------------
function Text_Domain_Directory (Domain_Name : String) return String is
function Internal
(Domain_Name : String; Dirname : chars_ptr) return chars_ptr;
pragma Import (C, Internal, "bindtextdomain");
P : chars_ptr := Internal (Domain_Name & ASCII.NUL, Null_Ptr);
begin
if P = Null_Ptr then
return "";
else
return Value (P);
end if;
end Text_Domain_Directory;
------------------------------
-- Bind_Text_Domain_Codeset --
------------------------------
procedure Bind_Text_Domain_Codeset
(Domain_Name : String; Codeset : String)
is
procedure Internal (Domain_Name : String; Codeset : String);
pragma Import (C, Internal, "bind_textdomain_codeset");
begin
Internal (Domain_Name & ASCII.NUL, Codeset & ASCII.NUL);
end Bind_Text_Domain_Codeset;
-------------------------
-- Text_Domain_Codeset --
-------------------------
function Text_Domain_Codeset (Domain_Name : String) return String is
function Internal
(Domain_Name : String; Codeset : chars_ptr) return chars_ptr;
pragma Import (C, Internal, "bind_textdomain_codeset");
P : chars_ptr := Internal (Domain_Name & ASCII.NUL, Null_Ptr);
begin
if P = Null_Ptr then
return "";
else
return Value (P);
end if;
end Text_Domain_Codeset;
end I18n;
|
tokamak-core/src/main/antlr4/com/wrmsr/tokamak/core/parse/Search.g4 | wrmsr/tokamak | 3 | 6409 | <reponame>wrmsr/tokamak
/*
Copyright (c) 2016, Burt AB
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 the copyright holder nor the names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 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.
*/
/*
https://github.com/burtcorp/jmespath-java/blob/f119644209001be06bdc6382d6f5cc9c5098a9fe/jmespath-core/src/main/antlr4/io/burt/jmespath/parser/JmesPath.g4
*/
grammar Search;
singleExpression
: expression EOF
;
expression
: expression '.' chainedExpression #chainExpression
| expression bracketSpecifier #bracketedExpression
| bracketSpecifier #bracketExpression
| expression COMPARATOR expression #comparisonExpression
| expression '&&' expression #andExpression
| expression '||' expression #orExpression
| identifier #identifierExpression
| '!' expression #notExpression
| '(' expression ')' #parenExpression
| wildcard #wildcardExpression
| multiSelectList #multiSelectListExpression
| multiSelectHash #multiSelectHashExpression
| literal #literalExpression
| functionExpression #functionCallExpression
| expression '|' expression #pipeExpression
| RAW_STRING #rawStringExpression
| currentNode #currentNodeExpression
| parameterNode #parameterExpression
;
chainedExpression
: identifier
| multiSelectList
| multiSelectHash
| functionExpression
| wildcard
;
wildcard
: '*'
;
bracketSpecifier
: '[' SIGNED_INT ']' #bracketIndex
| '[' '*' ']' #bracketStar
| '[' slice ']' #bracketSlice
| '[' ']' #bracketFlatten
| '[?' expression ']' #select
;
multiSelectList
: '[' expression (',' expression)* ']'
;
multiSelectHash
: '{' keyvalExpr (',' keyvalExpr)* '}'
;
keyvalExpr
: identifier ':' expression
;
slice
: start=SIGNED_INT? ':' stop=SIGNED_INT? (':' step=SIGNED_INT?)?
;
parameterNode
: '$' NAME #nameParameter
| '$' INT #numberParameter
;
functionExpression
: NAME '(' functionArg (',' functionArg)* ')'
| NAME '(' ')'
;
functionArg
: expression
| expressionType
;
currentNode
: '@'
;
expressionType
: '&' expression
;
literal
: '`' jsonValue '`'
;
identifier
: NAME
| STRING
| JSON_CONSTANT
;
jsonObject
: '{' jsonObjectPair (',' jsonObjectPair)* '}'
| '{' '}'
;
jsonObjectPair
: STRING ':' jsonValue
;
jsonArray
: '[' jsonValue (',' jsonValue)* ']'
| '[' ']'
;
jsonValue
: STRING #jsonStringValue
| (REAL_OR_EXPONENT_NUMBER | SIGNED_INT) #jsonNumberValue
| jsonObject #jsonObjectValue
| jsonArray #jsonArrayValue
| JSON_CONSTANT #jsonConstantValue
;
COMPARATOR
: '<'
| '<='
| '=='
| '>='
| '>'
| '!='
;
RAW_STRING:
'\'' (RAW_ESC | ~['\\])* '\''
;
fragment RAW_ESC
: '\\' .
;
JSON_CONSTANT
: 'true'
| 'false'
| 'null'
;
NAME
: [a-zA-Z_] [a-zA-Z0-9_]*
;
STRING
: '"' (ESC | ~ ["\\])* '"'
;
fragment ESC
: '\\' (["\\/bfnrt`] | UNICODE)
;
fragment UNICODE
: 'u' HEX HEX HEX HEX
;
fragment HEX
: [0-9a-fA-F]
;
REAL_OR_EXPONENT_NUMBER
: '-'? INT '.' [0-9] + EXP?
| '-'? INT EXP
;
SIGNED_INT
: '-'? INT
;
INT
: '0'
| [1-9] [0-9]*
;
fragment EXP
: [Ee] [+\-]? INT
;
WS
: [ \t\n\r] + -> skip
;
|
oeis/062/A062200.asm | neoneye/loda-programs | 11 | 14435 | ; A062200: Number of compositions of n such that two adjacent parts are not equal modulo 2.
; Submitted by <NAME>
; 1,1,1,3,2,6,6,11,16,22,37,49,80,113,172,257,377,573,839,1266,1874,2798,4175,6204,9274,13785,20577,30640,45665,68072,101393,151169,225193,335659,500162,745342,1110790,1655187,2466760,3675822,5477917,8163217,12164896,18128529,27015092
mov $3,$0
mul $0,2
add $0,16
add $3,4
lpb $0
sub $0,4
mov $2,$3
bin $2,$0
add $1,$2
sub $3,1
lpe
mov $0,$1
|
3-Assemble(80x86)/lab-5/demo.asm | ftxj/4th-Semester | 0 | 14905 | .386
.model flat,stdcall
option casemap:none
WinMain proto :DWORD,:DWORD,:DWORD,:DWORD
WndProc proto :DWORD,:DWORD,:DWORD,:DWORD
Paint_Proc PROTO :DWORD, hDC:DWORD
Display proto :DWORD
include menuID.INC
include windows.inc
include user32.inc
include kernel32.inc
include gdi32.inc
include shell32.inc
includelib user32.lib
includelib kernel32.lib
includelib gdi32.lib
includelib shell32.lib
return MACRO arg
mov eax, arg
ret
ENDM
student struct
myname db 10 dup(0)
chinese db 0
math db 0
english db 0
average db 0
grade db 0
student ends
.data
ClassName db 'TryWinClass',0
AppName db 'Our First Window',0
MenuName db 'MyMenu',0
DlgName db 'MyDialog',0
AboutMsg db 'I am ACM1501 <NAME>',0
hInstance dd 0
CommandLine dd 0
buf student <>
student <'Jin',96,98,100,0,'A'>
student <'Xin',90,90,90,0,'A'>
msg_name db 'name',0
msg_chinese db 'chinese',0
msg_math db 'math',0
msg_english db 'english',0
msg_average db 'average',0
msg_grade db 'grade',0
msg_frame db 100 dup ('_')
chinese db 3,0,'___','() ','** '
math db 3,0,'99 ','100','89 '
english db 3,0,'99 ','100','90 '
average db 3,0,' ',' ',' '
.code
Start: invoke GetModuleHandle,NULL ; 参数为 0(NULL) 表明获得此程序句柄
mov hInstance,eax
invoke GetCommandLine
mov CommandLine,eax
invoke WinMain,hInstance,NULL,CommandLine,SW_SHOWDEFAULT
invoke ExitProcess,eax
;;
WinMain proc hInst:DWORD,hPrevInst:DWORD,CmdLine:DWORD,CmdShow:DWORD
LOCAL wc:WNDCLASSEX ;变量名:类型
LOCAL msg:MSG
LOCAL hWnd:HWND
local mywidth:DWORD
local myheight:DWORD
invoke RtlZeroMemory,addr wc,sizeof wc
mov wc.cbSize,SIZEOF WNDCLASSEX ;这个结构体大小
mov wc.style, CS_HREDRAW or CS_VREDRAW ;窗口风格
mov wc.lpfnWndProc, offset WndProc ;窗口消息处理的指针
mov wc.cbClsExtra,NULL ;
mov wc.cbWndExtra,NULL
push hInst
pop wc.hInstance ;处理的窗口的句柄
mov wc.hbrBackground,COLOR_WINDOW+1 ;背景色
mov wc.lpszMenuName, offset MenuName ;资源文件中描述菜单的资源文件名字符串的指针
mov wc.lpszClassName,offset ClassName ; 指向类名称的指针
invoke LoadIcon,NULL,IDI_APPLICATION
mov wc.hIcon,eax; hIcon 窗口图标资源
mov wc.hIconSm,0
invoke LoadCursor,NULL,IDC_ARROW
mov wc.hCursor,eax ; hCursor 光标资源
invoke RegisterClassEx, addr wc ;注册窗口
mov myheight, 500
mov mywidth, 800
INVOKE CreateWindowEx,NULL,addr ClassName,addr AppName,\
WS_OVERLAPPEDWINDOW,CW_USEDEFAULT,\
CW_USEDEFAULT,mywidth,myheight,NULL,NULL,\
hInst,NULL ;创建窗口
mov hWnd,eax ;执行成功返回窗口句柄
INVOKE ShowWindow,hWnd,SW_SHOWNORMAL
INVOKE UpdateWindow,hWnd
;;
MsgLoop: INVOKE GetMessage,addr msg,NULL,0,0 ;msg, 句柄,消息范围
cmp EAX,0 ; 0 是返回的退出消息
je ExitLoop
INVOKE TranslateMessage,addr msg ;将键盘输入转化为对应ACSCII码
INVOKE DispatchMessage,addr msg ; 转移到 窗口消息处理的指针所在函数
jmp MsgLoop
ExitLoop: mov eax,msg.wParam
ret
WinMain endp
WndProc proc hWnd:DWORD,uMsg:DWORD,wParam:DWORD,lParam:DWORD
LOCAL hdc:DWORD
LOCAL Ps :PAINTSTRUCT
.IF uMsg == WM_DESTROY
invoke PostQuitMessage,NULL
.ELSEIF uMsg == WM_KEYDOWN
.IF wParam == VK_F1
;;your code
.ENDIF
.ELSEIF uMsg == WM_COMMAND
.IF wParam == IDM_FILE_EXIT
invoke SendMessage,hWnd,WM_CLOSE,0,0 ;接受消息的窗口,要发送的消息,消息类别,消息类别
.ELSEIF wParam == IDM_ACTION_AVERAGE
call SET_AVERANGE_GRADE
.ELSEIF wParam == IDM_ACTION_LIST
invoke Display,hWnd
.ELSEIF wParam == IDM_HELP_ABOUT
invoke MessageBoxA,hWnd,addr AboutMsg,addr AppName,0 ;所属窗口,显示消息,标题,类型
.ENDIF
.ELSEIF uMsg == WM_PAINT
invoke BeginPaint,hWnd,ADDR Ps
mov hdc, eax
;invoke Paint_Proc,hWnd,hdc
invoke EndPaint,hWnd,ADDR Ps
return 0
;;redraw window again
.ELSE
invoke DefWindowProc,hWnd,uMsg,wParam,lParam
ret
.ENDIF
xor eax,eax
ret
WndProc endp
SET_AVERANGE_GRADE:
PUSH ESI
PUSH EAX
PUSH EBX
PUSH ECX
PUSH EDX
MOV SI, 0
MOV CX, 5
MATH:
MOV AX, 0
MOV BX, 0
MOV DX, 0
MOV AL, buf[15].chinese
MOV AH, 2
MUL AH ;AX IS CHINESE * 2 <= 200 16 IS ENOUGH
MOV BL, buf[15].math;MATH GRADE
MOV BH, 0
ADD BX, AX
MOV AL, buf[15].english ;ENGLISH
MOV AH, 0
MOV DL, 2
DIV DL
ADD BX, AX
MOV AX, 2
MUL BX
MOV BL, 7
DIV BL
MOV buf[15].average, AL
ADD SI, 15
LOOP MATH
POP EDX
POP ECX
POP EBX
POP EAX
POP ESI
RET
Display proc hWnd:DWORD
XX equ 10
YY equ 10
N EQU 0
XX_GAP equ 100
YY_GAP equ 30
CAL MACRO A,B
invoke TextOut,hdc,XX+0*XX_GAP,YY+&A&*YY_GAP,offset buf[&B&*15].myname,3
invoke TextOut,hdc,XX+1*XX_GAP,YY+&A&*YY_GAP,offset chinese+2+&B&*3,chinese
invoke TextOut,hdc,XX+2*XX_GAP,YY+&A&*YY_GAP,offset math+2+&B&*3, math
invoke TextOut,hdc,XX+3*XX_GAP,YY+&A&*YY_GAP,offset english+2+&B&*3,english
invoke TextOut,hdc,XX+4*XX_GAP,YY+&A&*YY_GAP,offset average+2+&B&*3,average
invoke TextOut,hdc,XX+5*XX_GAP,YY+&A&*YY_GAP,offset buf[&B&*15].grade,1
ENDM
LOCAL hdc:HDC
invoke GetDC,hWnd
mov hdc,eax
invoke TextOut,hdc,XX+0*XX_GAP,YY+0*YY_GAP,offset msg_name,4
invoke TextOut,hdc,XX+1*XX_GAP,YY+0*YY_GAP,offset msg_chinese,7
invoke TextOut,hdc,XX+2*XX_GAP,YY+0*YY_GAP,offset msg_math,4
invoke TextOut,hdc,XX+3*XX_GAP,YY+0*YY_GAP,offset msg_english,7
invoke TextOut,hdc,XX+4*XX_GAP,YY+0*YY_GAP,offset msg_average,7
invoke TextOut,hdc,XX+5*XX_GAP,YY+0*YY_GAP,offset msg_grade,5
;;
invoke TextOut,hdc,XX+0*XX_GAP,YY+1*YY_GAP,offset msg_frame,67
;;
CAL 2,0
CAL 3,1
CAL 4,2
ret
Display endp
end Start |
programs/oeis/159/A159941.asm | neoneye/loda | 22 | 98023 | <gh_stars>10-100
; A159941: Number of trisubstituted linear alkanes of composition C_n H_(2n-1) XYZ.
; 8,32,92,212,416,728,1172,1772,2552,3536,4748,6212,7952,9992,12356,15068,18152,21632,25532,29876,34688,39992,45812,52172,59096,66608,74732,83492,92912,103016,113828,125372,137672
mov $2,$0
add $0,4
bin $0,$2
bin $2,4
sub $0,$2
div $0,2
mul $0,12
add $0,8
|
rewrite-maven/src/main/antlr/VersionRangeParser.g4 | honnix/rewrite | 0 | 4648 | parser grammar VersionRangeParser;
options { tokenVocab=VersionRangeLexer; }
requestedVersion
: (range (COMMA range)*) | version;
range
: (OPEN_RANGE_OPEN | CLOSED_RANGE_OPEN) bounds (OPEN_RANGE_CLOSE | CLOSED_RANGE_CLOSE)
;
bounds
: boundedLower
| unboundedLower
;
boundedLower
: (Version COMMA Version?)
;
unboundedLower
: (COMMA Version?)
;
version
: Version
| (PROPERTY_OPEN Version PROPERTY_CLOSE)
;
|
oeis/039/A039724.asm | neoneye/loda-programs | 11 | 4843 | <gh_stars>10-100
; A039724: Numbers in base -2.
; Submitted by Jon Maiga
; 0,1,110,111,100,101,11010,11011,11000,11001,11110,11111,11100,11101,10010,10011,10000,10001,10110,10111,10100,10101,1101010,1101011,1101000,1101001,1101110,1101111,1101100,1101101,1100010,1100011,1100000,1100001,1100110,1100111,1100100,1100101,1111010,1111011,1111000,1111001,1111110,1111111,1111100,1111101,1110010,1110011,1110000,1110001,1110110,1110111,1110100,1110101,1001010,1001011,1001000,1001001,1001110,1001111,1001100,1001101,1000010,1000011,1000000,1000001,1000110,1000111,1000100,1000101
seq $0,5351 ; Base -2 representation for n regarded as base 2, then evaluated.
seq $0,7088 ; The binary numbers (or binary words, or binary vectors, or binary expansion of n): numbers written in base 2.
|
programs/oeis/166/A166146.asm | neoneye/loda | 22 | 172648 | ; A166146: a(n) = (7*n^2 + 7*n - 12)/2.
; 1,15,36,64,99,141,190,246,309,379,456,540,631,729,834,946,1065,1191,1324,1464,1611,1765,1926,2094,2269,2451,2640,2836,3039,3249,3466,3690,3921,4159,4404,4656,4915,5181,5454,5734,6021,6315,6616,6924,7239,7561,7890,8226,8569,8919,9276,9640,10011,10389,10774,11166,11565,11971,12384,12804,13231,13665,14106,14554,15009,15471,15940,16416,16899,17389,17886,18390,18901,19419,19944,20476,21015,21561,22114,22674,23241,23815,24396,24984,25579,26181,26790,27406,28029,28659,29296,29940,30591,31249,31914,32586,33265,33951,34644,35344
add $0,2
bin $0,2
mov $1,7
mul $1,$0
sub $1,6
mov $0,$1
|
src/formatter.adb | zenharris/ada-bbs | 2 | 23852 | <reponame>zenharris/ada-bbs
-------------------------------------------------------------------------------
with Text_IO;
package body Formatter is
-- Instantiated Input-Output packages
package IO is new Text_io.Integer_io(Integer);
package FIO is new Text_io.Float_io(Float);
package DFIO is new Text_io.Float_io(Dp_float);
-- Overloaded Data Type to Variant Record conversion functions
function F (Data : in Integer) return Contents is
begin
return Contents'(Class => Integer_Type,
Integer_Value => Data);
exception
when others =>
return Contents'(Class => Unknown_Type);
end F;
function F (Data : in Enumerated) return Contents is
Data_String : constant String := Enumerated'Image(Data);
begin
return Contents'(Class => String_Type,
String_Value => (The_String => new String'(Data_String),
The_Length => Data_String'Length));
exception
when others =>
return Contents'(Class => Unknown_Type);
end F;
function F (Data : in Float) return Contents is
begin
return Contents'(Class => Float_Type,
Float_Value => Data);
exception
when others =>
return Contents'(Class => Unknown_Type);
end F;
function F (Data : in Dp_Float) return Contents is
begin
return Contents'(Class => Dp_Float_Type,
Dp_Float_Value => Data);
exception
when others =>
return Contents'(Class => Unknown_Type);
end F;
function F (Data : in String) return Contents is
begin
return Contents'(Class => String_Type,
String_Value => (The_String => new String'(Data),
The_Length => Data'Length));
exception
when others =>
return Contents'(Class => Unknown_Type);
end F;
function F (Data : in Character) return Contents is
begin
return Contents'(Class => Character_Type,
Character_Value => Data);
exception
when others =>
return Contents'(Class => Unknown_Type);
end F;
-- Overloaded Print Formatted Value procedures
procedure Put(Format : in String;
Value : in Values) is
begin
-- Write formatted string returned by Formatter.Get
Text_Io.Put(Get(Format, Value));
end Put;
procedure PutS(retStr : in out String;
Format : in String;
Value : in Values) is
begin
-- Write formatted string returned by Formatter.Get
retStr := Get(Format, Value);
end PutS;
function SPut(Format : in String;
Value : in Values) return String is
begin
-- Write formatted string returned by Formatter.Get
return Get(Format, Value);
end SPut;
function SPut(Format : in String;
Value : in Contents) return String is
Value_List : Values(1..1) := (1 => Value);
begin
return SPut(Format => Format,
Value => Value_List);
end SPut;
procedure Put(Format : in String) is
Value_List : Values (1..0);
begin
Put(Format => Format,
Value => Value_List);
end Put;
procedure Put(Format : in String;
Value : in Contents) is
Value_List : Values(1..1) := (1 => Value);
begin
Put(Format => Format,
Value => Value_List);
end Put;
-- Overloaded Formatted Value String functions
function Get(Format : in String;
Value : in Values) return String
is separate;
function Get(Format : in String) return String is
Value_List : Values (1..0);
begin
return Get(Format => Format,
Value => Value_List);
end Get;
function Get(Format : in String;
Value : in Contents) return String is
Value_List : Values(1..1) := (1 => Value);
begin
return Get(Format => Format,
Value => Value_List);
end Get;
end Formatter;
-- separate(FORMATTER)
|
Build/for_development/b__swarm.ads | ForYouEyesOnly/Space-Convoy | 1 | 19589 | <filename>Build/for_development/b__swarm.ads
pragma Warnings (Off);
pragma Ada_95;
with System;
with System.Parameters;
with System.Secondary_Stack;
package ada_main is
gnat_argc : Integer;
gnat_argv : System.Address;
gnat_envp : System.Address;
pragma Import (C, gnat_argc);
pragma Import (C, gnat_argv);
pragma Import (C, gnat_envp);
gnat_exit_status : Integer;
pragma Import (C, gnat_exit_status);
GNAT_Version : constant String :=
"GNAT Version: Community 2018 (20180523-73)" & ASCII.NUL;
pragma Export (C, GNAT_Version, "__gnat_version");
Ada_Main_Program_Name : constant String := "_ada_swarm" & ASCII.NUL;
pragma Export (C, Ada_Main_Program_Name, "__gnat_ada_main_program_name");
procedure adainit;
pragma Export (C, adainit, "adainit");
procedure adafinal;
pragma Export (C, adafinal, "adafinal");
function main
(argc : Integer;
argv : System.Address;
envp : System.Address)
return Integer;
pragma Export (C, main, "main");
type Version_32 is mod 2 ** 32;
u00001 : constant Version_32 := 16#5ff99a27#;
pragma Export (C, u00001, "swarmB");
u00002 : constant Version_32 := 16#050ff2f0#;
pragma Export (C, u00002, "system__standard_libraryB");
u00003 : constant Version_32 := 16#0f7d71d4#;
pragma Export (C, u00003, "system__standard_libraryS");
u00004 : constant Version_32 := 16#f8088b52#;
pragma Export (C, u00004, "ada__exceptionsB");
u00005 : constant Version_32 := 16#16307b94#;
pragma Export (C, u00005, "ada__exceptionsS");
u00006 : constant Version_32 := 16#76789da1#;
pragma Export (C, u00006, "adaS");
u00007 : constant Version_32 := 16#5726abed#;
pragma Export (C, u00007, "ada__exceptions__last_chance_handlerB");
u00008 : constant Version_32 := 16#41e5552e#;
pragma Export (C, u00008, "ada__exceptions__last_chance_handlerS");
u00009 : constant Version_32 := 16#085b6ffb#;
pragma Export (C, u00009, "systemS");
u00010 : constant Version_32 := 16#ae860117#;
pragma Export (C, u00010, "system__soft_linksB");
u00011 : constant Version_32 := 16#4d58644d#;
pragma Export (C, u00011, "system__soft_linksS");
u00012 : constant Version_32 := 16#bd45c2cc#;
pragma Export (C, u00012, "system__secondary_stackB");
u00013 : constant Version_32 := 16#4dcf97e2#;
pragma Export (C, u00013, "system__secondary_stackS");
u00014 : constant Version_32 := 16#86dbf443#;
pragma Export (C, u00014, "system__parametersB");
u00015 : constant Version_32 := 16#40b73bd0#;
pragma Export (C, u00015, "system__parametersS");
u00016 : constant Version_32 := 16#ced09590#;
pragma Export (C, u00016, "system__storage_elementsB");
u00017 : constant Version_32 := 16#259825ff#;
pragma Export (C, u00017, "system__storage_elementsS");
u00018 : constant Version_32 := 16#75bf515c#;
pragma Export (C, u00018, "system__soft_links__initializeB");
u00019 : constant Version_32 := 16#5697fc2b#;
pragma Export (C, u00019, "system__soft_links__initializeS");
u00020 : constant Version_32 := 16#41837d1e#;
pragma Export (C, u00020, "system__stack_checkingB");
u00021 : constant Version_32 := 16#86e40413#;
pragma Export (C, u00021, "system__stack_checkingS");
u00022 : constant Version_32 := 16#34742901#;
pragma Export (C, u00022, "system__exception_tableB");
u00023 : constant Version_32 := 16#55f506b9#;
pragma Export (C, u00023, "system__exception_tableS");
u00024 : constant Version_32 := 16#ce4af020#;
pragma Export (C, u00024, "system__exceptionsB");
u00025 : constant Version_32 := 16#6038020d#;
pragma Export (C, u00025, "system__exceptionsS");
u00026 : constant Version_32 := 16#80916427#;
pragma Export (C, u00026, "system__exceptions__machineB");
u00027 : constant Version_32 := 16#3bad9081#;
pragma Export (C, u00027, "system__exceptions__machineS");
u00028 : constant Version_32 := 16#aa0563fc#;
pragma Export (C, u00028, "system__exceptions_debugB");
u00029 : constant Version_32 := 16#76d1963f#;
pragma Export (C, u00029, "system__exceptions_debugS");
u00030 : constant Version_32 := 16#6c2f8802#;
pragma Export (C, u00030, "system__img_intB");
u00031 : constant Version_32 := 16#0a808f39#;
pragma Export (C, u00031, "system__img_intS");
u00032 : constant Version_32 := 16#39df8c17#;
pragma Export (C, u00032, "system__tracebackB");
u00033 : constant Version_32 := 16#5679b13f#;
pragma Export (C, u00033, "system__tracebackS");
u00034 : constant Version_32 := 16#9ed49525#;
pragma Export (C, u00034, "system__traceback_entriesB");
u00035 : constant Version_32 := 16#0800998b#;
pragma Export (C, u00035, "system__traceback_entriesS");
u00036 : constant Version_32 := 16#bb296fbb#;
pragma Export (C, u00036, "system__traceback__symbolicB");
u00037 : constant Version_32 := 16#c84061d1#;
pragma Export (C, u00037, "system__traceback__symbolicS");
u00038 : constant Version_32 := 16#701f9d88#;
pragma Export (C, u00038, "ada__exceptions__tracebackB");
u00039 : constant Version_32 := 16#20245e75#;
pragma Export (C, u00039, "ada__exceptions__tracebackS");
u00040 : constant Version_32 := 16#a0d3d22b#;
pragma Export (C, u00040, "system__address_imageB");
u00041 : constant Version_32 := 16#a9b7f2c1#;
pragma Export (C, u00041, "system__address_imageS");
u00042 : constant Version_32 := 16#8c33a517#;
pragma Export (C, u00042, "system__wch_conB");
u00043 : constant Version_32 := 16#13264d29#;
pragma Export (C, u00043, "system__wch_conS");
u00044 : constant Version_32 := 16#9721e840#;
pragma Export (C, u00044, "system__wch_stwB");
u00045 : constant Version_32 := 16#3e376128#;
pragma Export (C, u00045, "system__wch_stwS");
u00046 : constant Version_32 := 16#a831679c#;
pragma Export (C, u00046, "system__wch_cnvB");
u00047 : constant Version_32 := 16#1c91f7da#;
pragma Export (C, u00047, "system__wch_cnvS");
u00048 : constant Version_32 := 16#5ab55268#;
pragma Export (C, u00048, "interfacesS");
u00049 : constant Version_32 := 16#ece6fdb6#;
pragma Export (C, u00049, "system__wch_jisB");
u00050 : constant Version_32 := 16#9ce1eefb#;
pragma Export (C, u00050, "system__wch_jisS");
u00051 : constant Version_32 := 16#64d7e8d2#;
pragma Export (C, u00051, "callback_proceduresB");
u00052 : constant Version_32 := 16#0bb57c0d#;
pragma Export (C, u00052, "callback_proceduresS");
u00053 : constant Version_32 := 16#adc843f0#;
pragma Export (C, u00053, "ada__real_timeB");
u00054 : constant Version_32 := 16#69ea8064#;
pragma Export (C, u00054, "ada__real_timeS");
u00055 : constant Version_32 := 16#c8eda0b7#;
pragma Export (C, u00055, "system__taskingB");
u00056 : constant Version_32 := 16#904e70c9#;
pragma Export (C, u00056, "system__taskingS");
u00057 : constant Version_32 := 16#fde20231#;
pragma Export (C, u00057, "system__task_primitivesS");
u00058 : constant Version_32 := 16#4a005d03#;
pragma Export (C, u00058, "system__os_interfaceB");
u00059 : constant Version_32 := 16#55598295#;
pragma Export (C, u00059, "system__os_interfaceS");
u00060 : constant Version_32 := 16#769e25e6#;
pragma Export (C, u00060, "interfaces__cB");
u00061 : constant Version_32 := 16#467817d8#;
pragma Export (C, u00061, "interfaces__cS");
u00062 : constant Version_32 := 16#1b8990a4#;
pragma Export (C, u00062, "interfaces__c__extensionsS");
u00063 : constant Version_32 := 16#54ea2fd2#;
pragma Export (C, u00063, "system__os_constantsS");
u00064 : constant Version_32 := 16#9690f83e#;
pragma Export (C, u00064, "system__task_primitives__operationsB");
u00065 : constant Version_32 := 16#bd0bc49c#;
pragma Export (C, u00065, "system__task_primitives__operationsS");
u00066 : constant Version_32 := 16#89b55e64#;
pragma Export (C, u00066, "system__interrupt_managementB");
u00067 : constant Version_32 := 16#1a73cd21#;
pragma Export (C, u00067, "system__interrupt_managementS");
u00068 : constant Version_32 := 16#f65595cf#;
pragma Export (C, u00068, "system__multiprocessorsB");
u00069 : constant Version_32 := 16#30f7f088#;
pragma Export (C, u00069, "system__multiprocessorsS");
u00070 : constant Version_32 := 16#2b2125d3#;
pragma Export (C, u00070, "system__os_primitivesB");
u00071 : constant Version_32 := 16#0fa60a0d#;
pragma Export (C, u00071, "system__os_primitivesS");
u00072 : constant Version_32 := 16#e0fce7f8#;
pragma Export (C, u00072, "system__task_infoB");
u00073 : constant Version_32 := 16#8841d2fa#;
pragma Export (C, u00073, "system__task_infoS");
u00074 : constant Version_32 := 16#1036f432#;
pragma Export (C, u00074, "system__tasking__debugB");
u00075 : constant Version_32 := 16#de1ac8b1#;
pragma Export (C, u00075, "system__tasking__debugS");
u00076 : constant Version_32 := 16#fd83e873#;
pragma Export (C, u00076, "system__concat_2B");
u00077 : constant Version_32 := 16#0afbb82b#;
pragma Export (C, u00077, "system__concat_2S");
u00078 : constant Version_32 := 16#2b70b149#;
pragma Export (C, u00078, "system__concat_3B");
u00079 : constant Version_32 := 16#032b335e#;
pragma Export (C, u00079, "system__concat_3S");
u00080 : constant Version_32 := 16#4e0ce0a1#;
pragma Export (C, u00080, "system__crtlS");
u00081 : constant Version_32 := 16#273384e4#;
pragma Export (C, u00081, "system__img_enum_newB");
u00082 : constant Version_32 := 16#6917693b#;
pragma Export (C, u00082, "system__img_enum_newS");
u00083 : constant Version_32 := 16#9dca6636#;
pragma Export (C, u00083, "system__img_lliB");
u00084 : constant Version_32 := 16#19143a2a#;
pragma Export (C, u00084, "system__img_lliS");
u00085 : constant Version_32 := 16#3cdd1378#;
pragma Export (C, u00085, "system__unsigned_typesS");
u00086 : constant Version_32 := 16#6ec3c867#;
pragma Export (C, u00086, "system__stack_usageB");
u00087 : constant Version_32 := 16#3a3ac346#;
pragma Export (C, u00087, "system__stack_usageS");
u00088 : constant Version_32 := 16#d7aac20c#;
pragma Export (C, u00088, "system__ioB");
u00089 : constant Version_32 := 16#961998b4#;
pragma Export (C, u00089, "system__ioS");
u00090 : constant Version_32 := 16#d398a95f#;
pragma Export (C, u00090, "ada__tagsB");
u00091 : constant Version_32 := 16#12a0afb8#;
pragma Export (C, u00091, "ada__tagsS");
u00092 : constant Version_32 := 16#796f31f1#;
pragma Export (C, u00092, "system__htableB");
u00093 : constant Version_32 := 16#8c99dc11#;
pragma Export (C, u00093, "system__htableS");
u00094 : constant Version_32 := 16#089f5cd0#;
pragma Export (C, u00094, "system__string_hashB");
u00095 : constant Version_32 := 16#2ec7b76f#;
pragma Export (C, u00095, "system__string_hashS");
u00096 : constant Version_32 := 16#afdbf393#;
pragma Export (C, u00096, "system__val_lluB");
u00097 : constant Version_32 := 16#462f440a#;
pragma Export (C, u00097, "system__val_lluS");
u00098 : constant Version_32 := 16#269742a9#;
pragma Export (C, u00098, "system__val_utilB");
u00099 : constant Version_32 := 16#a4fbd905#;
pragma Export (C, u00099, "system__val_utilS");
u00100 : constant Version_32 := 16#ec4d5631#;
pragma Export (C, u00100, "system__case_utilB");
u00101 : constant Version_32 := 16#378ed9af#;
pragma Export (C, u00101, "system__case_utilS");
u00102 : constant Version_32 := 16#9e3065b2#;
pragma Export (C, u00102, "exceptionsB");
u00103 : constant Version_32 := 16#bae1bad2#;
pragma Export (C, u00103, "exceptionsS");
u00104 : constant Version_32 := 16#920f3e36#;
pragma Export (C, u00104, "ada__task_identificationB");
u00105 : constant Version_32 := 16#a04f2339#;
pragma Export (C, u00105, "ada__task_identificationS");
u00106 : constant Version_32 := 16#1d5082e5#;
pragma Export (C, u00106, "system__tasking__utilitiesB");
u00107 : constant Version_32 := 16#ab3d060e#;
pragma Export (C, u00107, "system__tasking__utilitiesS");
u00108 : constant Version_32 := 16#0a98af1a#;
pragma Export (C, u00108, "system__tasking__initializationB");
u00109 : constant Version_32 := 16#f7885a93#;
pragma Export (C, u00109, "system__tasking__initializationS");
u00110 : constant Version_32 := 16#9f1b5cb1#;
pragma Export (C, u00110, "system__soft_links__taskingB");
u00111 : constant Version_32 := 16#e939497e#;
pragma Export (C, u00111, "system__soft_links__taskingS");
u00112 : constant Version_32 := 16#17d21067#;
pragma Export (C, u00112, "ada__exceptions__is_null_occurrenceB");
u00113 : constant Version_32 := 16#e1d7566f#;
pragma Export (C, u00113, "ada__exceptions__is_null_occurrenceS");
u00114 : constant Version_32 := 16#cde2b616#;
pragma Export (C, u00114, "system__tasking__task_attributesB");
u00115 : constant Version_32 := 16#4c40320c#;
pragma Export (C, u00115, "system__tasking__task_attributesS");
u00116 : constant Version_32 := 16#81b9d4a8#;
pragma Export (C, u00116, "system__tasking__queuingB");
u00117 : constant Version_32 := 16#c9e0262c#;
pragma Export (C, u00117, "system__tasking__queuingS");
u00118 : constant Version_32 := 16#9fcf5d7f#;
pragma Export (C, u00118, "system__tasking__protected_objectsB");
u00119 : constant Version_32 := 16#b15a1586#;
pragma Export (C, u00119, "system__tasking__protected_objectsS");
u00120 : constant Version_32 := 16#3d3c265e#;
pragma Export (C, u00120, "system__tasking__protected_objects__entriesB");
u00121 : constant Version_32 := 16#7daf93e7#;
pragma Export (C, u00121, "system__tasking__protected_objects__entriesS");
u00122 : constant Version_32 := 16#100eaf58#;
pragma Export (C, u00122, "system__restrictionsB");
u00123 : constant Version_32 := 16#4329b6aa#;
pragma Export (C, u00123, "system__restrictionsS");
u00124 : constant Version_32 := 16#86c56e5a#;
pragma Export (C, u00124, "ada__finalizationS");
u00125 : constant Version_32 := 16#10558b11#;
pragma Export (C, u00125, "ada__streamsB");
u00126 : constant Version_32 := 16#67e31212#;
pragma Export (C, u00126, "ada__streamsS");
u00127 : constant Version_32 := 16#92d882c5#;
pragma Export (C, u00127, "ada__io_exceptionsS");
u00128 : constant Version_32 := 16#95817ed8#;
pragma Export (C, u00128, "system__finalization_rootB");
u00129 : constant Version_32 := 16#47a91c6b#;
pragma Export (C, u00129, "system__finalization_rootS");
u00130 : constant Version_32 := 16#927a893f#;
pragma Export (C, u00130, "ada__text_ioB");
u00131 : constant Version_32 := 16#1ffab6e1#;
pragma Export (C, u00131, "ada__text_ioS");
u00132 : constant Version_32 := 16#73d2d764#;
pragma Export (C, u00132, "interfaces__c_streamsB");
u00133 : constant Version_32 := 16#b1330297#;
pragma Export (C, u00133, "interfaces__c_streamsS");
u00134 : constant Version_32 := 16#ec083f01#;
pragma Export (C, u00134, "system__file_ioB");
u00135 : constant Version_32 := 16#af2a8e9e#;
pragma Export (C, u00135, "system__file_ioS");
u00136 : constant Version_32 := 16#0f8892f9#;
pragma Export (C, u00136, "system__os_libB");
u00137 : constant Version_32 := 16#d8e681fb#;
pragma Export (C, u00137, "system__os_libS");
u00138 : constant Version_32 := 16#2a8e89ad#;
pragma Export (C, u00138, "system__stringsB");
u00139 : constant Version_32 := 16#684d436e#;
pragma Export (C, u00139, "system__stringsS");
u00140 : constant Version_32 := 16#f5c4f553#;
pragma Export (C, u00140, "system__file_control_blockS");
u00141 : constant Version_32 := 16#20095f7e#;
pragma Export (C, u00141, "generic_sliding_statisticsB");
u00142 : constant Version_32 := 16#bb10ab49#;
pragma Export (C, u00142, "generic_sliding_statisticsS");
u00143 : constant Version_32 := 16#98a387f5#;
pragma Export (C, u00143, "real_typeS");
u00144 : constant Version_32 := 16#cd2959fb#;
pragma Export (C, u00144, "ada__numericsS");
u00145 : constant Version_32 := 16#e5114ee9#;
pragma Export (C, u00145, "ada__numerics__auxB");
u00146 : constant Version_32 := 16#9f6e24ed#;
pragma Export (C, u00146, "ada__numerics__auxS");
u00147 : constant Version_32 := 16#0cccd408#;
pragma Export (C, u00147, "system__fat_llfS");
u00148 : constant Version_32 := 16#6533c8fa#;
pragma Export (C, u00148, "system__machine_codeS");
u00149 : constant Version_32 := 16#52f1910f#;
pragma Export (C, u00149, "system__assertionsB");
u00150 : constant Version_32 := 16#c5d6436f#;
pragma Export (C, u00150, "system__assertionsS");
u00151 : constant Version_32 := 16#b2a569d2#;
pragma Export (C, u00151, "system__exn_llfB");
u00152 : constant Version_32 := 16#b425d427#;
pragma Export (C, u00152, "system__exn_llfS");
u00153 : constant Version_32 := 16#761c7ae2#;
pragma Export (C, u00153, "system__fat_lfltS");
u00154 : constant Version_32 := 16#f86a0784#;
pragma Export (C, u00154, "graphics_configurationS");
u00155 : constant Version_32 := 16#a1e0f341#;
pragma Export (C, u00155, "glB");
u00156 : constant Version_32 := 16#3e6953e9#;
pragma Export (C, u00156, "glS");
u00157 : constant Version_32 := 16#7be628b8#;
pragma Export (C, u00157, "gl__extendedS");
u00158 : constant Version_32 := 16#27986d94#;
pragma Export (C, u00158, "interfaces__c__stringsB");
u00159 : constant Version_32 := 16#603c1c44#;
pragma Export (C, u00159, "interfaces__c__stringsS");
u00160 : constant Version_32 := 16#ef512720#;
pragma Export (C, u00160, "globe_3dB");
u00161 : constant Version_32 := 16#68f549e6#;
pragma Export (C, u00161, "globe_3dS");
u00162 : constant Version_32 := 16#5b4659fa#;
pragma Export (C, u00162, "ada__charactersS");
u00163 : constant Version_32 := 16#8f637df8#;
pragma Export (C, u00163, "ada__characters__handlingB");
u00164 : constant Version_32 := 16#3b3f6154#;
pragma Export (C, u00164, "ada__characters__handlingS");
u00165 : constant Version_32 := 16#4b7bb96a#;
pragma Export (C, u00165, "ada__characters__latin_1S");
u00166 : constant Version_32 := 16#e6d4fa36#;
pragma Export (C, u00166, "ada__stringsS");
u00167 : constant Version_32 := 16#96df1a3f#;
pragma Export (C, u00167, "ada__strings__mapsB");
u00168 : constant Version_32 := 16#1e526bec#;
pragma Export (C, u00168, "ada__strings__mapsS");
u00169 : constant Version_32 := 16#98e13b0e#;
pragma Export (C, u00169, "system__bit_opsB");
u00170 : constant Version_32 := 16#0765e3a3#;
pragma Export (C, u00170, "system__bit_opsS");
u00171 : constant Version_32 := 16#92f05f13#;
pragma Export (C, u00171, "ada__strings__maps__constantsS");
u00172 : constant Version_32 := 16#179d7d28#;
pragma Export (C, u00172, "ada__containersS");
u00173 : constant Version_32 := 16#adb6d201#;
pragma Export (C, u00173, "ada__strings__fixedB");
u00174 : constant Version_32 := 16#a86b22b3#;
pragma Export (C, u00174, "ada__strings__fixedS");
u00175 : constant Version_32 := 16#2eb48a6d#;
pragma Export (C, u00175, "ada__strings__searchB");
u00176 : constant Version_32 := 16#c1ab8667#;
pragma Export (C, u00176, "ada__strings__searchS");
u00177 : constant Version_32 := 16#9c2abfb0#;
pragma Export (C, u00177, "gl__errorsB");
u00178 : constant Version_32 := 16#51391c66#;
pragma Export (C, u00178, "gl__errorsS");
u00179 : constant Version_32 := 16#30237187#;
pragma Export (C, u00179, "gluB");
u00180 : constant Version_32 := 16#f8141e55#;
pragma Export (C, u00180, "gluS");
u00181 : constant Version_32 := 16#932a4690#;
pragma Export (C, u00181, "system__concat_4B");
u00182 : constant Version_32 := 16#763f44db#;
pragma Export (C, u00182, "system__concat_4S");
u00183 : constant Version_32 := 16#049d363d#;
pragma Export (C, u00183, "gl__skinsB");
u00184 : constant Version_32 := 16#2584189e#;
pragma Export (C, u00184, "gl__skinsS");
u00185 : constant Version_32 := 16#502e73ef#;
pragma Export (C, u00185, "system__fat_fltS");
u00186 : constant Version_32 := 16#5a895de2#;
pragma Export (C, u00186, "system__pool_globalB");
u00187 : constant Version_32 := 16#7141203e#;
pragma Export (C, u00187, "system__pool_globalS");
u00188 : constant Version_32 := 16#2323a8af#;
pragma Export (C, u00188, "system__memoryB");
u00189 : constant Version_32 := 16#512609cf#;
pragma Export (C, u00189, "system__memoryS");
u00190 : constant Version_32 := 16#6d4d969a#;
pragma Export (C, u00190, "system__storage_poolsB");
u00191 : constant Version_32 := 16#2bb6f156#;
pragma Export (C, u00191, "system__storage_poolsS");
u00192 : constant Version_32 := 16#2e260032#;
pragma Export (C, u00192, "system__storage_pools__subpoolsB");
u00193 : constant Version_32 := 16#cc5a1856#;
pragma Export (C, u00193, "system__storage_pools__subpoolsS");
u00194 : constant Version_32 := 16#d96e3c40#;
pragma Export (C, u00194, "system__finalization_mastersB");
u00195 : constant Version_32 := 16#53a75631#;
pragma Export (C, u00195, "system__finalization_mastersS");
u00196 : constant Version_32 := 16#7268f812#;
pragma Export (C, u00196, "system__img_boolB");
u00197 : constant Version_32 := 16#fd821e10#;
pragma Export (C, u00197, "system__img_boolS");
u00198 : constant Version_32 := 16#84042202#;
pragma Export (C, u00198, "system__storage_pools__subpools__finalizationB");
u00199 : constant Version_32 := 16#fe2f4b3a#;
pragma Export (C, u00199, "system__storage_pools__subpools__finalizationS");
u00200 : constant Version_32 := 16#837026c9#;
pragma Export (C, u00200, "gl__bufferB");
u00201 : constant Version_32 := 16#fcf76790#;
pragma Export (C, u00201, "gl__bufferS");
u00202 : constant Version_32 := 16#039168f8#;
pragma Export (C, u00202, "system__stream_attributesB");
u00203 : constant Version_32 := 16#8bc30a4e#;
pragma Export (C, u00203, "system__stream_attributesS");
u00204 : constant Version_32 := 16#e6b92a39#;
pragma Export (C, u00204, "gl__buffer__texture_coordsB");
u00205 : constant Version_32 := 16#ee91d95f#;
pragma Export (C, u00205, "gl__buffer__texture_coordsS");
u00206 : constant Version_32 := 16#9004b2de#;
pragma Export (C, u00206, "gl__buffer__generalB");
u00207 : constant Version_32 := 16#b07eab0a#;
pragma Export (C, u00207, "gl__buffer__generalS");
u00208 : constant Version_32 := 16#089a501d#;
pragma Export (C, u00208, "gl__geometryB");
u00209 : constant Version_32 := 16#1e8d36a3#;
pragma Export (C, u00209, "gl__geometryS");
u00210 : constant Version_32 := 16#457fb2da#;
pragma Export (C, u00210, "ada__strings__unboundedB");
u00211 : constant Version_32 := 16#f39c7224#;
pragma Export (C, u00211, "ada__strings__unboundedS");
u00212 : constant Version_32 := 16#acee74ad#;
pragma Export (C, u00212, "system__compare_array_unsigned_8B");
u00213 : constant Version_32 := 16#a1581e76#;
pragma Export (C, u00213, "system__compare_array_unsigned_8S");
u00214 : constant Version_32 := 16#a8025f3c#;
pragma Export (C, u00214, "system__address_operationsB");
u00215 : constant Version_32 := 16#1b57d1c8#;
pragma Export (C, u00215, "system__address_operationsS");
u00216 : constant Version_32 := 16#020a3f4d#;
pragma Export (C, u00216, "system__atomic_countersB");
u00217 : constant Version_32 := 16#bc074276#;
pragma Export (C, u00217, "system__atomic_countersS");
u00218 : constant Version_32 := 16#59ec45db#;
pragma Export (C, u00218, "gl__mathB");
u00219 : constant Version_32 := 16#a8dd0043#;
pragma Export (C, u00219, "gl__mathS");
u00220 : constant Version_32 := 16#d5f9759f#;
pragma Export (C, u00220, "ada__text_io__float_auxB");
u00221 : constant Version_32 := 16#48248c7b#;
pragma Export (C, u00221, "ada__text_io__float_auxS");
u00222 : constant Version_32 := 16#181dc502#;
pragma Export (C, u00222, "ada__text_io__generic_auxB");
u00223 : constant Version_32 := 16#16b3615d#;
pragma Export (C, u00223, "ada__text_io__generic_auxS");
u00224 : constant Version_32 := 16#8aa4f090#;
pragma Export (C, u00224, "system__img_realB");
u00225 : constant Version_32 := 16#cff33e19#;
pragma Export (C, u00225, "system__img_realS");
u00226 : constant Version_32 := 16#1b28662b#;
pragma Export (C, u00226, "system__float_controlB");
u00227 : constant Version_32 := 16#e8a72cc7#;
pragma Export (C, u00227, "system__float_controlS");
u00228 : constant Version_32 := 16#3e932977#;
pragma Export (C, u00228, "system__img_lluB");
u00229 : constant Version_32 := 16#751413bb#;
pragma Export (C, u00229, "system__img_lluS");
u00230 : constant Version_32 := 16#ec78c2bf#;
pragma Export (C, u00230, "system__img_unsB");
u00231 : constant Version_32 := 16#a3292f8f#;
pragma Export (C, u00231, "system__img_unsS");
u00232 : constant Version_32 := 16#582b098c#;
pragma Export (C, u00232, "system__powten_tableS");
u00233 : constant Version_32 := 16#c2ca0511#;
pragma Export (C, u00233, "system__val_realB");
u00234 : constant Version_32 := 16#f67218ea#;
pragma Export (C, u00234, "system__val_realS");
u00235 : constant Version_32 := 16#608e2cd1#;
pragma Export (C, u00235, "system__concat_5B");
u00236 : constant Version_32 := 16#8f052cd5#;
pragma Export (C, u00236, "system__concat_5S");
u00237 : constant Version_32 := 16#fafb0eca#;
pragma Export (C, u00237, "gl__texturesB");
u00238 : constant Version_32 := 16#91ca1c90#;
pragma Export (C, u00238, "gl__texturesS");
u00239 : constant Version_32 := 16#5c76d753#;
pragma Export (C, u00239, "gl__ioB");
u00240 : constant Version_32 := 16#daf3b9dd#;
pragma Export (C, u00240, "gl__ioS");
u00241 : constant Version_32 := 16#86ecf8ab#;
pragma Export (C, u00241, "system__strings__stream_opsB");
u00242 : constant Version_32 := 16#ec029138#;
pragma Export (C, u00242, "system__strings__stream_opsS");
u00243 : constant Version_32 := 16#db0aa7dc#;
pragma Export (C, u00243, "ada__streams__stream_ioB");
u00244 : constant Version_32 := 16#55e6e4b0#;
pragma Export (C, u00244, "ada__streams__stream_ioS");
u00245 : constant Version_32 := 16#5de653db#;
pragma Export (C, u00245, "system__communicationB");
u00246 : constant Version_32 := 16#113b3a29#;
pragma Export (C, u00246, "system__communicationS");
u00247 : constant Version_32 := 16#7f8879fc#;
pragma Export (C, u00247, "gl__materialsB");
u00248 : constant Version_32 := 16#65f2b4a3#;
pragma Export (C, u00248, "gl__materialsS");
u00249 : constant Version_32 := 16#33fd7c82#;
pragma Export (C, u00249, "globe_3d__mathB");
u00250 : constant Version_32 := 16#e3e98860#;
pragma Export (C, u00250, "globe_3d__mathS");
u00251 : constant Version_32 := 16#40c8be3a#;
pragma Export (C, u00251, "globe_3d__optionsB");
u00252 : constant Version_32 := 16#dc499730#;
pragma Export (C, u00252, "globe_3d__optionsS");
u00253 : constant Version_32 := 16#bd43c68c#;
pragma Export (C, u00253, "globe_3d__portalsB");
u00254 : constant Version_32 := 16#345614ab#;
pragma Export (C, u00254, "globe_3d__portalsS");
u00255 : constant Version_32 := 16#c861171e#;
pragma Export (C, u00255, "globe_3d__texturesB");
u00256 : constant Version_32 := 16#2a1c4756#;
pragma Export (C, u00256, "globe_3d__texturesS");
u00257 : constant Version_32 := 16#c164a034#;
pragma Export (C, u00257, "ada__containers__hash_tablesS");
u00258 : constant Version_32 := 16#bcec81df#;
pragma Export (C, u00258, "ada__containers__helpersB");
u00259 : constant Version_32 := 16#4adfc5eb#;
pragma Export (C, u00259, "ada__containers__helpersS");
u00260 : constant Version_32 := 16#c24eaf4d#;
pragma Export (C, u00260, "ada__containers__prime_numbersB");
u00261 : constant Version_32 := 16#6d3af8ed#;
pragma Export (C, u00261, "ada__containers__prime_numbersS");
u00262 : constant Version_32 := 16#217daf40#;
pragma Export (C, u00262, "ada__strings__unbounded__hashB");
u00263 : constant Version_32 := 16#f0232cad#;
pragma Export (C, u00263, "ada__strings__unbounded__hashS");
u00264 : constant Version_32 := 16#fa5081d0#;
pragma Export (C, u00264, "unzipB");
u00265 : constant Version_32 := 16#592613ef#;
pragma Export (C, u00265, "unzipS");
u00266 : constant Version_32 := 16#8bbf26e6#;
pragma Export (C, u00266, "unzip__decompressB");
u00267 : constant Version_32 := 16#ff9edbf7#;
pragma Export (C, u00267, "unzip__decompressS");
u00268 : constant Version_32 := 16#bf116e3f#;
pragma Export (C, u00268, "bzip2B");
u00269 : constant Version_32 := 16#951df2a7#;
pragma Export (C, u00269, "bzip2S");
u00270 : constant Version_32 := 16#297a02d7#;
pragma Export (C, u00270, "unzip__decompress__huffmanB");
u00271 : constant Version_32 := 16#3045b9d5#;
pragma Export (C, u00271, "unzip__decompress__huffmanS");
u00272 : constant Version_32 := 16#21f15937#;
pragma Export (C, u00272, "zipB");
u00273 : constant Version_32 := 16#a4865b30#;
pragma Export (C, u00273, "zipS");
u00274 : constant Version_32 := 16#ebb133b2#;
pragma Export (C, u00274, "zip__headersB");
u00275 : constant Version_32 := 16#17ef6cb6#;
pragma Export (C, u00275, "zip__headersS");
u00276 : constant Version_32 := 16#97991e4b#;
pragma Export (C, u00276, "zip_streamsB");
u00277 : constant Version_32 := 16#534a2c31#;
pragma Export (C, u00277, "zip_streamsS");
u00278 : constant Version_32 := 16#b8719323#;
pragma Export (C, u00278, "ada__calendarB");
u00279 : constant Version_32 := 16#41508869#;
pragma Export (C, u00279, "ada__calendarS");
u00280 : constant Version_32 := 16#397e9c9f#;
pragma Export (C, u00280, "zip__crcB");
u00281 : constant Version_32 := 16#06c4d47b#;
pragma Export (C, u00281, "zip__crcS");
u00282 : constant Version_32 := 16#8ec48dfb#;
pragma Export (C, u00282, "unzip__streamsB");
u00283 : constant Version_32 := 16#deb9bdf2#;
pragma Export (C, u00283, "unzip__streamsS");
u00284 : constant Version_32 := 16#46899fd1#;
pragma Export (C, u00284, "system__concat_7B");
u00285 : constant Version_32 := 16#f49c34e4#;
pragma Export (C, u00285, "system__concat_7S");
u00286 : constant Version_32 := 16#a83b7c85#;
pragma Export (C, u00286, "system__concat_6B");
u00287 : constant Version_32 := 16#da9c4249#;
pragma Export (C, u00287, "system__concat_6S");
u00288 : constant Version_32 := 16#46b1f5ea#;
pragma Export (C, u00288, "system__concat_8B");
u00289 : constant Version_32 := 16#eb5c222c#;
pragma Export (C, u00289, "system__concat_8S");
u00290 : constant Version_32 := 16#de0a8573#;
pragma Export (C, u00290, "gl__frustumsB");
u00291 : constant Version_32 := 16#2c4c19e2#;
pragma Export (C, u00291, "gl__frustumsS");
u00292 : constant Version_32 := 16#cd53cf3b#;
pragma Export (C, u00292, "gl__skinned_geometryB");
u00293 : constant Version_32 := 16#ec459e05#;
pragma Export (C, u00293, "gl__skinned_geometryS");
u00294 : constant Version_32 := 16#c62d8c42#;
pragma Export (C, u00294, "glut_2dB");
u00295 : constant Version_32 := 16#7eff0cd3#;
pragma Export (C, u00295, "glut_2dS");
u00296 : constant Version_32 := 16#e13e5087#;
pragma Export (C, u00296, "glutB");
u00297 : constant Version_32 := 16#6ee34171#;
pragma Export (C, u00297, "glutS");
u00298 : constant Version_32 := 16#01a73f89#;
pragma Export (C, u00298, "ada__command_lineB");
u00299 : constant Version_32 := 16#3cdef8c9#;
pragma Export (C, u00299, "ada__command_lineS");
u00300 : constant Version_32 := 16#8225628b#;
pragma Export (C, u00300, "ada__containers__red_black_treesS");
u00301 : constant Version_32 := 16#763b4fd7#;
pragma Export (C, u00301, "graphics_frameratesB");
u00302 : constant Version_32 := 16#e379c8e5#;
pragma Export (C, u00302, "graphics_frameratesS");
u00303 : constant Version_32 := 16#357666d8#;
pragma Export (C, u00303, "ada__calendar__delaysB");
u00304 : constant Version_32 := 16#a808adf5#;
pragma Export (C, u00304, "ada__calendar__delaysS");
u00305 : constant Version_32 := 16#9bd4ba92#;
pragma Export (C, u00305, "graphics_structuresS");
u00306 : constant Version_32 := 16#f2a9860d#;
pragma Export (C, u00306, "rotationsB");
u00307 : constant Version_32 := 16#f942fbb5#;
pragma Export (C, u00307, "rotationsS");
u00308 : constant Version_32 := 16#621b3e02#;
pragma Export (C, u00308, "matricesB");
u00309 : constant Version_32 := 16#48257de2#;
pragma Export (C, u00309, "matricesS");
u00310 : constant Version_32 := 16#dd900968#;
pragma Export (C, u00310, "quaternionsB");
u00311 : constant Version_32 := 16#504fbd0e#;
pragma Export (C, u00311, "quaternionsS");
u00312 : constant Version_32 := 16#3315000b#;
pragma Export (C, u00312, "vectors_3dB");
u00313 : constant Version_32 := 16#9351ec73#;
pragma Export (C, u00313, "vectors_3dS");
u00314 : constant Version_32 := 16#fe1ffede#;
pragma Export (C, u00314, "ada__strings__boundedB");
u00315 : constant Version_32 := 16#89c18940#;
pragma Export (C, u00315, "ada__strings__boundedS");
u00316 : constant Version_32 := 16#7ec26662#;
pragma Export (C, u00316, "ada__strings__superboundedB");
u00317 : constant Version_32 := 16#da6addee#;
pragma Export (C, u00317, "ada__strings__superboundedS");
u00318 : constant Version_32 := 16#35a52d91#;
pragma Export (C, u00318, "vectors_xdB");
u00319 : constant Version_32 := 16#4c943a4c#;
pragma Export (C, u00319, "vectors_xdS");
u00320 : constant Version_32 := 16#15404f33#;
pragma Export (C, u00320, "vectors_2d_nS");
u00321 : constant Version_32 := 16#ae860a75#;
pragma Export (C, u00321, "vectors_xd_iB");
u00322 : constant Version_32 := 16#32b570f3#;
pragma Export (C, u00322, "vectors_xd_iS");
u00323 : constant Version_32 := 16#99c5812a#;
pragma Export (C, u00323, "graphics_dataS");
u00324 : constant Version_32 := 16#9cceee23#;
pragma Export (C, u00324, "modelsB");
u00325 : constant Version_32 := 16#670c4a41#;
pragma Export (C, u00325, "modelsS");
u00326 : constant Version_32 := 16#407e14ab#;
pragma Export (C, u00326, "spaceship_pB");
u00327 : constant Version_32 := 16#de928fde#;
pragma Export (C, u00327, "spaceship_pS");
u00328 : constant Version_32 := 16#bfd27222#;
pragma Export (C, u00328, "sphere_pB");
u00329 : constant Version_32 := 16#a2350170#;
pragma Export (C, u00329, "sphere_pS");
u00330 : constant Version_32 := 16#ed26937f#;
pragma Export (C, u00330, "vectors_4dS");
u00331 : constant Version_32 := 16#bf77ef48#;
pragma Export (C, u00331, "graphics_openglB");
u00332 : constant Version_32 := 16#380aa6a1#;
pragma Export (C, u00332, "graphics_openglS");
u00333 : constant Version_32 := 16#d976e2b4#;
pragma Export (C, u00333, "ada__numerics__float_randomB");
u00334 : constant Version_32 := 16#62aa8dd2#;
pragma Export (C, u00334, "ada__numerics__float_randomS");
u00335 : constant Version_32 := 16#ec9cfed1#;
pragma Export (C, u00335, "system__random_numbersB");
u00336 : constant Version_32 := 16#cb43df61#;
pragma Export (C, u00336, "system__random_numbersS");
u00337 : constant Version_32 := 16#650caaea#;
pragma Export (C, u00337, "system__random_seedB");
u00338 : constant Version_32 := 16#534b46a0#;
pragma Export (C, u00338, "system__random_seedS");
u00339 : constant Version_32 := 16#1d9142a4#;
pragma Export (C, u00339, "system__val_unsB");
u00340 : constant Version_32 := 16#2c75fe43#;
pragma Export (C, u00340, "system__val_unsS");
u00341 : constant Version_32 := 16#ffa721d2#;
pragma Export (C, u00341, "globe_3d__stars_skyB");
u00342 : constant Version_32 := 16#60803aec#;
pragma Export (C, u00342, "globe_3d__stars_skyS");
u00343 : constant Version_32 := 16#9df65f1b#;
pragma Export (C, u00343, "graphics_setupB");
u00344 : constant Version_32 := 16#ae3cfa3a#;
pragma Export (C, u00344, "graphics_setupS");
u00345 : constant Version_32 := 16#03e83d1c#;
pragma Export (C, u00345, "ada__numerics__elementary_functionsB");
u00346 : constant Version_32 := 16#edc89b7f#;
pragma Export (C, u00346, "ada__numerics__elementary_functionsS");
u00347 : constant Version_32 := 16#748f0b17#;
pragma Export (C, u00347, "glut__devicesB");
u00348 : constant Version_32 := 16#c8f38135#;
pragma Export (C, u00348, "glut__devicesS");
u00349 : constant Version_32 := 16#da9d8aa7#;
pragma Export (C, u00349, "glut__windowsB");
u00350 : constant Version_32 := 16#75e2ce49#;
pragma Export (C, u00350, "glut__windowsS");
u00351 : constant Version_32 := 16#1a19ed33#;
pragma Export (C, u00351, "actorsB");
u00352 : constant Version_32 := 16#9c19e623#;
pragma Export (C, u00352, "actorsS");
u00353 : constant Version_32 := 16#d317e11b#;
pragma Export (C, u00353, "game_controlB");
u00354 : constant Version_32 := 16#5097ee25#;
pragma Export (C, u00354, "game_controlS");
u00355 : constant Version_32 := 16#c48063ce#;
pragma Export (C, u00355, "globe_3d__software_anti_aliasingB");
u00356 : constant Version_32 := 16#41a04269#;
pragma Export (C, u00356, "globe_3d__software_anti_aliasingS");
u00357 : constant Version_32 := 16#ecc4ed1f#;
pragma Export (C, u00357, "keyboardB");
u00358 : constant Version_32 := 16#e8d894be#;
pragma Export (C, u00358, "keyboardS");
u00359 : constant Version_32 := 16#339eba20#;
pragma Export (C, u00359, "screenshotsB");
u00360 : constant Version_32 := 16#fb6ddf6f#;
pragma Export (C, u00360, "screenshotsS");
u00361 : constant Version_32 := 16#4e9834aa#;
pragma Export (C, u00361, "swarm_configurationB");
u00362 : constant Version_32 := 16#58067b51#;
pragma Export (C, u00362, "swarm_configurationS");
u00363 : constant Version_32 := 16#844fe575#;
pragma Export (C, u00363, "swarm_configurationsB");
u00364 : constant Version_32 := 16#bf53612f#;
pragma Export (C, u00364, "swarm_configurationsS");
u00365 : constant Version_32 := 16#eea673f9#;
pragma Export (C, u00365, "swarm_structures_baseS");
u00366 : constant Version_32 := 16#118d926e#;
pragma Export (C, u00366, "generic_protectedB");
u00367 : constant Version_32 := 16#dac5157f#;
pragma Export (C, u00367, "generic_protectedS");
u00368 : constant Version_32 := 16#cc990476#;
pragma Export (C, u00368, "system__tasking__protected_objects__operationsB");
u00369 : constant Version_32 := 16#ba36ad85#;
pragma Export (C, u00369, "system__tasking__protected_objects__operationsS");
u00370 : constant Version_32 := 16#2db45322#;
pragma Export (C, u00370, "system__tasking__entry_callsB");
u00371 : constant Version_32 := 16#c7180c67#;
pragma Export (C, u00371, "system__tasking__entry_callsS");
u00372 : constant Version_32 := 16#624cb93c#;
pragma Export (C, u00372, "system__tasking__rendezvousB");
u00373 : constant Version_32 := 16#f242aaf9#;
pragma Export (C, u00373, "system__tasking__rendezvousS");
u00374 : constant Version_32 := 16#e582cfb0#;
pragma Export (C, u00374, "swarm_controlB");
u00375 : constant Version_32 := 16#23efe8fe#;
pragma Export (C, u00375, "swarm_controlS");
u00376 : constant Version_32 := 16#84d70551#;
pragma Export (C, u00376, "swarm_dataS");
u00377 : constant Version_32 := 16#a3e1fbc0#;
pragma Export (C, u00377, "swarm_structuresB");
u00378 : constant Version_32 := 16#87aa0ec8#;
pragma Export (C, u00378, "swarm_structuresS");
u00379 : constant Version_32 := 16#5aabc651#;
pragma Export (C, u00379, "barrier_typeB");
u00380 : constant Version_32 := 16#94192802#;
pragma Export (C, u00380, "barrier_typeS");
u00381 : constant Version_32 := 16#98ccd1c1#;
pragma Export (C, u00381, "generic_realtime_bufferB");
u00382 : constant Version_32 := 16#a4c755fe#;
pragma Export (C, u00382, "generic_realtime_bufferS");
u00383 : constant Version_32 := 16#710eed06#;
pragma Export (C, u00383, "vehicle_message_typeS");
u00384 : constant Version_32 := 16#5da508ef#;
pragma Export (C, u00384, "vehicle_task_typeB");
u00385 : constant Version_32 := 16#d9636149#;
pragma Export (C, u00385, "vehicle_task_typeS");
u00386 : constant Version_32 := 16#82b6184f#;
pragma Export (C, u00386, "system__tasking__stagesB");
u00387 : constant Version_32 := 16#1b9f5506#;
pragma Export (C, u00387, "system__tasking__stagesS");
u00388 : constant Version_32 := 16#b00860db#;
pragma Export (C, u00388, "vehicle_interfaceB");
u00389 : constant Version_32 := 16#72d0071b#;
pragma Export (C, u00389, "vehicle_interfaceS");
u00390 : constant Version_32 := 16#d51f6d70#;
pragma Export (C, u00390, "system__tasking__async_delaysB");
u00391 : constant Version_32 := 16#5faa1c14#;
pragma Export (C, u00391, "system__tasking__async_delaysS");
u00392 : constant Version_32 := 16#969cb1f9#;
pragma Export (C, u00392, "system__interrupt_management__operationsB");
u00393 : constant Version_32 := 16#19b909c9#;
pragma Export (C, u00393, "system__interrupt_management__operationsS");
u00394 : constant Version_32 := 16#a6d7988d#;
pragma Export (C, u00394, "vectors_3d_lfB");
u00395 : constant Version_32 := 16#abff4c19#;
pragma Export (C, u00395, "vectors_3d_lfS");
u00396 : constant Version_32 := 16#1e27852c#;
pragma Export (C, u00396, "vectors_conversionsB");
u00397 : constant Version_32 := 16#923ddf49#;
pragma Export (C, u00397, "vectors_conversionsS");
u00398 : constant Version_32 := 16#cdecf3e0#;
pragma Export (C, u00398, "vectors_2dS");
u00399 : constant Version_32 := 16#3b68dc9f#;
pragma Export (C, u00399, "vectors_2d_iS");
u00400 : constant Version_32 := 16#e9217b79#;
pragma Export (C, u00400, "vectors_2d_pS");
u00401 : constant Version_32 := 16#878e5819#;
pragma Export (C, u00401, "swarm_control_concurrent_genericB");
u00402 : constant Version_32 := 16#7d3a30dd#;
pragma Export (C, u00402, "swarm_control_concurrent_genericS");
-- BEGIN ELABORATION ORDER
-- ada%s
-- ada.characters%s
-- ada.characters.latin_1%s
-- interfaces%s
-- system%s
-- system.address_operations%s
-- system.address_operations%b
-- system.atomic_counters%s
-- system.atomic_counters%b
-- system.exn_llf%s
-- system.exn_llf%b
-- system.float_control%s
-- system.float_control%b
-- system.img_bool%s
-- system.img_bool%b
-- system.img_enum_new%s
-- system.img_enum_new%b
-- system.img_int%s
-- system.img_int%b
-- system.img_lli%s
-- system.img_lli%b
-- system.io%s
-- system.io%b
-- system.machine_code%s
-- system.os_primitives%s
-- system.os_primitives%b
-- system.parameters%s
-- system.parameters%b
-- system.crtl%s
-- interfaces.c_streams%s
-- interfaces.c_streams%b
-- system.powten_table%s
-- system.restrictions%s
-- system.restrictions%b
-- system.storage_elements%s
-- system.storage_elements%b
-- system.stack_checking%s
-- system.stack_checking%b
-- system.stack_usage%s
-- system.stack_usage%b
-- system.string_hash%s
-- system.string_hash%b
-- system.htable%s
-- system.htable%b
-- system.strings%s
-- system.strings%b
-- system.task_info%s
-- system.task_info%b
-- system.traceback_entries%s
-- system.traceback_entries%b
-- system.unsigned_types%s
-- system.img_llu%s
-- system.img_llu%b
-- system.img_uns%s
-- system.img_uns%b
-- system.wch_con%s
-- system.wch_con%b
-- system.wch_jis%s
-- system.wch_jis%b
-- system.wch_cnv%s
-- system.wch_cnv%b
-- system.compare_array_unsigned_8%s
-- system.compare_array_unsigned_8%b
-- system.concat_2%s
-- system.concat_2%b
-- system.concat_3%s
-- system.concat_3%b
-- system.concat_4%s
-- system.concat_4%b
-- system.concat_5%s
-- system.concat_5%b
-- system.concat_6%s
-- system.concat_6%b
-- system.concat_7%s
-- system.concat_7%b
-- system.concat_8%s
-- system.concat_8%b
-- system.traceback%s
-- system.traceback%b
-- system.wch_stw%s
-- system.standard_library%s
-- system.exceptions_debug%s
-- system.exceptions_debug%b
-- ada.exceptions%s
-- system.wch_stw%b
-- ada.exceptions.traceback%s
-- system.secondary_stack%s
-- system.address_image%s
-- system.soft_links%s
-- system.exception_table%s
-- system.exception_table%b
-- system.exceptions%s
-- system.exceptions%b
-- ada.exceptions.last_chance_handler%s
-- system.memory%s
-- system.memory%b
-- ada.exceptions.traceback%b
-- system.traceback.symbolic%s
-- system.traceback.symbolic%b
-- system.exceptions.machine%s
-- system.exceptions.machine%b
-- system.secondary_stack%b
-- system.address_image%b
-- system.soft_links.initialize%s
-- system.soft_links.initialize%b
-- system.soft_links%b
-- ada.exceptions.last_chance_handler%b
-- system.standard_library%b
-- ada.exceptions%b
-- ada.command_line%s
-- ada.command_line%b
-- ada.containers%s
-- ada.containers.prime_numbers%s
-- ada.containers.prime_numbers%b
-- ada.exceptions.is_null_occurrence%s
-- ada.exceptions.is_null_occurrence%b
-- ada.io_exceptions%s
-- ada.numerics%s
-- ada.strings%s
-- interfaces.c%s
-- interfaces.c%b
-- interfaces.c.extensions%s
-- interfaces.c.strings%s
-- interfaces.c.strings%b
-- system.case_util%s
-- system.case_util%b
-- system.fat_flt%s
-- system.fat_lflt%s
-- system.fat_llf%s
-- ada.numerics.aux%s
-- ada.numerics.aux%b
-- ada.numerics.elementary_functions%s
-- ada.numerics.elementary_functions%b
-- system.img_real%s
-- system.img_real%b
-- system.multiprocessors%s
-- system.multiprocessors%b
-- system.os_constants%s
-- system.os_interface%s
-- system.os_interface%b
-- system.interrupt_management%s
-- system.interrupt_management%b
-- system.os_lib%s
-- system.os_lib%b
-- system.task_primitives%s
-- system.tasking%s
-- system.task_primitives.operations%s
-- system.tasking.debug%s
-- system.tasking%b
-- system.task_primitives.operations%b
-- system.tasking.debug%b
-- system.val_util%s
-- system.val_util%b
-- system.val_llu%s
-- system.val_llu%b
-- ada.tags%s
-- ada.tags%b
-- ada.streams%s
-- ada.streams%b
-- system.communication%s
-- system.communication%b
-- system.file_control_block%s
-- system.finalization_root%s
-- system.finalization_root%b
-- ada.finalization%s
-- ada.containers.helpers%s
-- ada.containers.helpers%b
-- ada.containers.hash_tables%s
-- ada.containers.red_black_trees%s
-- system.file_io%s
-- system.file_io%b
-- ada.streams.stream_io%s
-- ada.streams.stream_io%b
-- system.storage_pools%s
-- system.storage_pools%b
-- system.finalization_masters%s
-- system.finalization_masters%b
-- system.storage_pools.subpools%s
-- system.storage_pools.subpools.finalization%s
-- system.storage_pools.subpools%b
-- system.storage_pools.subpools.finalization%b
-- system.stream_attributes%s
-- system.stream_attributes%b
-- system.val_real%s
-- system.val_real%b
-- system.val_uns%s
-- system.val_uns%b
-- ada.calendar%s
-- ada.calendar%b
-- ada.calendar.delays%s
-- ada.calendar.delays%b
-- ada.real_time%s
-- ada.real_time%b
-- ada.text_io%s
-- ada.text_io%b
-- ada.text_io.generic_aux%s
-- ada.text_io.generic_aux%b
-- ada.text_io.float_aux%s
-- ada.text_io.float_aux%b
-- system.assertions%s
-- system.assertions%b
-- system.bit_ops%s
-- system.bit_ops%b
-- ada.strings.maps%s
-- ada.strings.maps%b
-- ada.strings.maps.constants%s
-- ada.characters.handling%s
-- ada.characters.handling%b
-- ada.strings.search%s
-- ada.strings.search%b
-- ada.strings.fixed%s
-- ada.strings.fixed%b
-- ada.strings.superbounded%s
-- ada.strings.superbounded%b
-- ada.strings.bounded%s
-- ada.strings.bounded%b
-- ada.strings.unbounded%s
-- ada.strings.unbounded%b
-- ada.strings.unbounded.hash%s
-- ada.strings.unbounded.hash%b
-- system.interrupt_management.operations%s
-- system.interrupt_management.operations%b
-- system.pool_global%s
-- system.pool_global%b
-- system.random_seed%s
-- system.random_seed%b
-- system.random_numbers%s
-- system.random_numbers%b
-- ada.numerics.float_random%s
-- ada.numerics.float_random%b
-- system.soft_links.tasking%s
-- system.soft_links.tasking%b
-- system.strings.stream_ops%s
-- system.strings.stream_ops%b
-- system.tasking.initialization%s
-- system.tasking.task_attributes%s
-- system.tasking.initialization%b
-- system.tasking.task_attributes%b
-- system.tasking.protected_objects%s
-- system.tasking.protected_objects%b
-- system.tasking.protected_objects.entries%s
-- system.tasking.protected_objects.entries%b
-- system.tasking.queuing%s
-- system.tasking.queuing%b
-- system.tasking.utilities%s
-- system.tasking.utilities%b
-- ada.task_identification%s
-- ada.task_identification%b
-- system.tasking.entry_calls%s
-- system.tasking.rendezvous%s
-- system.tasking.protected_objects.operations%s
-- system.tasking.protected_objects.operations%b
-- system.tasking.entry_calls%b
-- system.tasking.rendezvous%b
-- system.tasking.stages%s
-- system.tasking.stages%b
-- system.tasking.async_delays%s
-- system.tasking.async_delays%b
-- barrier_type%s
-- barrier_type%b
-- bzip2%s
-- bzip2%b
-- exceptions%s
-- exceptions%b
-- generic_protected%s
-- generic_protected%b
-- generic_realtime_buffer%s
-- generic_realtime_buffer%b
-- gl%s
-- gl.extended%s
-- gl%b
-- gl.buffer%s
-- gl.buffer%b
-- gl.io%s
-- gl.io%b
-- gl.materials%s
-- gl.materials%b
-- gl.math%s
-- gl.math%b
-- gl.geometry%s
-- gl.geometry%b
-- gl.frustums%s
-- gl.frustums%b
-- glu%s
-- glu%b
-- gl.errors%s
-- gl.errors%b
-- gl.buffer.general%s
-- gl.buffer.general%b
-- gl.textures%s
-- gl.textures%b
-- gl.buffer.texture_coords%s
-- gl.buffer.texture_coords%b
-- gl.skins%s
-- gl.skins%b
-- gl.skinned_geometry%s
-- gl.skinned_geometry%b
-- glut%s
-- glut%b
-- glut_2d%s
-- glut_2d%b
-- real_type%s
-- generic_sliding_statistics%s
-- generic_sliding_statistics%b
-- graphics_framerates%s
-- graphics_framerates%b
-- matrices%s
-- matrices%b
-- quaternions%s
-- quaternions%b
-- screenshots%s
-- screenshots%b
-- vectors_xd%s
-- vectors_xd%b
-- vectors_2d%s
-- vectors_3d%s
-- vectors_3d%b
-- rotations%s
-- rotations%b
-- vectors_3d_lf%s
-- vectors_3d_lf%b
-- vectors_4d%s
-- vectors_xd_i%s
-- vectors_xd_i%b
-- vectors_2d_i%s
-- vectors_2d_n%s
-- vectors_2d_p%s
-- vectors_conversions%s
-- vectors_conversions%b
-- zip_streams%s
-- zip%s
-- zip_streams%b
-- zip.headers%s
-- zip.headers%b
-- zip%b
-- zip.crc%s
-- zip.crc%b
-- unzip%s
-- unzip.decompress%s
-- unzip.decompress.huffman%s
-- unzip.decompress.huffman%b
-- unzip%b
-- unzip.decompress%b
-- unzip.streams%s
-- unzip.streams%b
-- globe_3d%s
-- globe_3d.textures%s
-- globe_3d.portals%s
-- globe_3d.options%s
-- globe_3d.options%b
-- globe_3d.math%s
-- globe_3d.math%b
-- globe_3d.textures%b
-- globe_3d%b
-- globe_3d.portals%b
-- globe_3d.software_anti_aliasing%s
-- globe_3d.software_anti_aliasing%b
-- globe_3d.stars_sky%s
-- globe_3d.stars_sky%b
-- glut.devices%s
-- game_control%s
-- game_control%b
-- actors%s
-- actors%b
-- glut.windows%s
-- glut.windows%b
-- glut.devices%b
-- graphics_structures%s
-- graphics_configuration%s
-- keyboard%s
-- keyboard%b
-- spaceship_p%s
-- spaceship_p%b
-- sphere_p%s
-- sphere_p%b
-- models%s
-- models%b
-- graphics_data%s
-- graphics_setup%s
-- graphics_setup%b
-- graphics_opengl%s
-- graphics_opengl%b
-- swarm_structures_base%s
-- swarm_configurations%s
-- swarm_configurations%b
-- swarm_configuration%s
-- swarm_configuration%b
-- vehicle_task_type%s
-- vehicle_message_type%s
-- swarm_structures%s
-- swarm_structures%b
-- swarm_data%s
-- swarm_control%s
-- swarm_control%b
-- vehicle_interface%s
-- vehicle_interface%b
-- vehicle_task_type%b
-- swarm_control_concurrent_generic%s
-- swarm_control_concurrent_generic%b
-- callback_procedures%s
-- callback_procedures%b
-- swarm%b
-- END ELABORATION ORDER
end ada_main;
|
org.conqat.engine.sourcecode/test-data/org.conqat.engine.sourcecode.shallowparser/ada/sample2.ada | assessorgeneral/ConQAT | 4 | 4948 | <gh_stars>1-10
package body PKG is
function fkt1 is
new Foo.Bar (Some_Thing => Some_Thing_Else);
task body Foo_Task is separate;
task body Bar_Task is separate;
end PKG;
|
oeis/020/A020067.asm | neoneye/loda-programs | 11 | 81518 | <filename>oeis/020/A020067.asm<gh_stars>10-100
; A020067: Integer part of Gamma(n+4/9)/Gamma(4/9).
; Submitted by <NAME>
; 1,0,0,1,5,24,130,842,6274,52988,500442,5226841,59818300,744405515,10008118594,144561713037,2232675345794,36715105686390,640474621418148,11813198572823622,229701083360459334,4696111037591613052,100705492250575702116,2260278826068476869716,52990981366716513278903,1295335100075292546817649,32959081990804665913471312,871584612645723387489574700,23920155480388186301102772327,680395533664375077009145523995,20033868491228821711935951539854,609919996288521905452272302435559
mov $1,1
mov $3,1
lpb $0
mov $2,$0
sub $0,1
mul $2,18
sub $2,10
mul $1,$2
mul $3,18
lpe
div $1,$3
mov $0,$1
|
scripts/remove10.applescript | TimeForANinja/qlab-scoreboard | 1 | 1192 | -- TODO: add case 0 => no number displayed
set einer to "left-einer"
set zehner to "left-zehner"
on decreaseZehner()
tell application id "com.figure53.QLab.4" to tell front workspace
set groupCue to cues of cue (my zehner)
set runningIndex to 0
repeat with n from 1 to count groupCue
if running of groupCue's item n is true then set runningIndex to n
end repeat
if runningIndex is 1 then
-- zehner bereits 0
-- setze einer auf 0
set groupCueEinser to cues of cue (my einer)
start groupCueEinser's item 1
repeat with n from 2 to count groupCueEinser
if running of groupCueEinser's item n is true then stop groupCueEinser's item n
end repeat
else if runningIndex is not 0 then
-- aktuellen stoppen und vorherigen zehner starten
start groupCue's item (runningIndex - 1)
stop groupCue's item runningIndex
end if
end tell
end decreaseZehner
decreaseZehner()
|
programs/oeis/133/A133695.asm | jmorken/loda | 1 | 25260 | ; A133695: a(n) = 2*A008683 - 1.
; 1,-3,-3,-1,-3,1,-3,-1,-1,1,-3,-1,-3,1,1,-1,-3,-1,-3,-1,1,1,-3,-1,-1,1,-1,-1,-3,-3,-3,-1,1,1,1,-1,-3,1,1,-1,-3,-3,-3,-1,-1,1,-3,-1,-1,-1,1,-1,-3,-1,1,-1,1,1,-3,-1,-3,1,-1,-1,1,-3,-3,-1,1,-3,-3,-1,-3,1,-1,-1
cal $0,8683 ; Möbius (or Moebius) function mu(n). mu(1) = 1; mu(n) = (-1)^k if n is the product of k different primes; otherwise mu(n) = 0.
mul $0,2
sub $0,1
mov $1,$0
|
programs/oeis/268/A268384.asm | karttu/loda | 0 | 10759 | <filename>programs/oeis/268/A268384.asm
; A268384: Characteristic function of A001317.
; 0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mov $1,$0
gcd $1,255
cmp $1,$0
|
Ada/DataStructures/BinTree/generic_binary_tree.adb | egustafson/sandbox | 2 | 12690 | <filename>Ada/DataStructures/BinTree/generic_binary_tree.adb
with Ada.Text_IO, Ada.Unchecked_Deallocation;
use Ada.Text_IO;
package body Generic_Binary_Tree is
type Compare_Result_Type is ( Less_Than, Equal, Greater_Than );
type Traced_Node_Type is
record
Node : Tree_Node_Ptr;
Parent : Tree_Node_Ptr;
end record;
----------------------------------------------------------------------
procedure Free is new Ada.Unchecked_Deallocation( Tree_Node,
Tree_Node_Ptr );
----------------------------------------------------------------------
function Compare( Left, Right : in Element_Type ) return
Compare_Result_Type is
begin
if Less_Than( Left, Right ) then
return Less_Than;
elsif Greater_Than( Left, Right ) then
return Greater_Than;
else
return Equal;
end if;
end Compare;
----------------------------------------------------------------------
function Find_Node( Tree: in T; Element: in Element_Type ) return
Traced_Node_Type is
T_Node : Traced_Node_Type := Traced_Node_Type'( Node => Tree.Root,
Parent => null );
Node : Tree_Node_Ptr renames T_Node.Node;
Parent : Tree_Node_Ptr renames T_Node.Parent;
begin
while Node /= null loop
case Compare ( Element, Node.Data ) is
when Equal =>
return T_Node;
when Less_Than =>
Parent := Node;
Node := Node.Left;
when Greater_Than =>
Parent := Node;
Node := Node.Right;
end case;
end loop;
return T_Node;
end Find_Node;
----------------------------------------------------------------------
function Is_In_Tree( Tree: in T; Element: in Element_Type ) return Boolean is
T_Node : Traced_Node_Type := Find_Node( Tree, Element );
begin
if T_Node.Node /= null then
return True;
else
return False;
end if;
end Is_In_Tree;
----------------------------------------------------------------------
procedure Insert( Tree: in out T; Element: in Element_Type ) is
T_Node : Traced_Node_Type := Find_Node( Tree, Element );
New_Node : Tree_Node_Ptr := new Tree_Node'( Data => Element,
Left => null,
Right => null );
begin
if T_Node.Node /= null then
return;
elsif T_Node.Parent = null then
Tree.Root := New_Node;
else
case Compare( Element, T_Node.Parent.Data ) is
when Less_Than =>
T_Node.Parent.Left := New_Node;
when Greater_Than =>
T_Node.Parent.Right := New_Node;
when Equal =>
null;
end case;
end if;
end Insert;
----------------------------------------------------------------------
procedure Remove( Tree: in out T; Element: in Element_Type ) is
Remove_Node : Traced_Node_Type := Find_Node( Tree, Element );
Pivot_Node : Tree_Node_Ptr;
Pivot_Node_Parent : Tree_Node_Ptr;
procedure Graft( Tree: in out T;
Old_Node,
New_Node,
Parent: in out Tree_Node_Ptr ) is
begin
if Parent /= null then
if Parent.Left = Old_Node then
Parent.Left := New_Node;
else
Parent.Right := New_Node;
end if;
else
Tree.Root := New_Node;
end if;
end Graft;
begin
if Remove_Node.Node = null then
return;
end if;
if Remove_Node.Node.Left = null then
Graft( Tree, Remove_Node.Node, Remove_Node.Node.Right, Remove_Node.Parent );
Free( Remove_Node.Node );
elsif Remove_Node.Node.Right = null then
Graft( Tree, Remove_Node.Node, Remove_Node.Node.Left, Remove_Node.Parent );
Free( Remove_Node.Node );
else
Pivot_Node_Parent := Remove_Node.Node;
Pivot_Node := Remove_Node.Node.Left;
while Pivot_Node.Right /= null loop
Pivot_Node_Parent := Pivot_Node;
Pivot_Node := Pivot_Node.Right;
end loop;
if Pivot_Node_Parent = Remove_Node.Node then
Pivot_Node.Right := Remove_Node.Node.Right;
else
Pivot_Node_Parent.Right := Pivot_Node.Left;
Pivot_Node.Left := Remove_Node.Node.Left;
Pivot_Node.Right := Remove_Node.Node.Right;
end if;
Graft( Tree, Remove_Node.Node, Pivot_Node, Remove_Node.Parent );
end if;
end Remove;
----------------------------------------------------------------------
procedure Print( Tree: in T ) is
procedure Print_Node( Node: in Tree_Node_Ptr ) is
begin
if Node.Left /= null then
Print_Node( Node.Left );
end if;
Put(Node.Data);
New_Line;
if Node.Right /= null then
Print_Node( Node.Right );
end if;
end;
begin
Print_Node( Tree.Root );
end Print;
----------------------------------------------------------------------
procedure Debug_Print( Tree: in T ) is
procedure Print_Node( Node: in Tree_Node_Ptr ) is
procedure Print_Branch( Node: in Tree_Node_Ptr ) is
begin
if Node = null then
Put(" null");
else
Put(Node.Data);
end if;
end Print_Branch;
begin
if Node.Left /= null then
Print_Node( Node.Left );
end if;
Put(Node.Data);
Put(" Left: "); Print_Branch(Node.Left);
Put(" Right:"); Print_Branch(Node.Right);
New_Line;
if Node.Right /= null then
Print_Node( Node.Right );
end if;
end Print_Node;
begin
Print_Node( Tree.Root );
end Debug_Print;
end Generic_Binary_Tree;
|
programs/oeis/060/A060544.asm | neoneye/loda | 22 | 160274 | ; A060544: Centered 9-gonal (also known as nonagonal or enneagonal) numbers. Every third triangular number, starting with a(1)=1.
; 1,10,28,55,91,136,190,253,325,406,496,595,703,820,946,1081,1225,1378,1540,1711,1891,2080,2278,2485,2701,2926,3160,3403,3655,3916,4186,4465,4753,5050,5356,5671,5995,6328,6670,7021,7381,7750,8128,8515,8911,9316,9730,10153,10585,11026,11476,11935,12403,12880,13366,13861,14365,14878,15400,15931,16471,17020,17578,18145,18721,19306,19900,20503,21115,21736,22366,23005,23653,24310,24976,25651,26335,27028,27730,28441,29161,29890,30628,31375,32131,32896,33670,34453,35245,36046,36856,37675,38503,39340,40186,41041,41905,42778,43660,44551
mul $0,3
add $0,2
bin $0,2
|
oeis/096/A096000.asm | neoneye/loda-programs | 11 | 240185 | ; A096000: Cupolar numbers: a(n) = (n+1)*(5*n^2+7*n+3)/3.
; 1,10,37,92,185,326,525,792,1137,1570,2101,2740,3497,4382,5405,6576,7905,9402,11077,12940,15001,17270,19757,22472,25425,28626,32085,35812,39817,44110,48701,53600,58817,64362,70245,76476,83065,90022,97357,105080,113201,121730,130677,140052,149865,160126,170845,182032,193697,205850,218501,231660,245337,259542,274285,289576,305425,321842,338837,356420,374601,393390,412797,432832,453505,474826,496805,519452,542777,566790,591501,616920,643057,669922,697525,725876,754985,784862,815517,846960,879201
mul $0,5
mov $1,$0
add $0,4
pow $0,3
mul $1,2
add $1,$0
mov $0,$1
div $0,75
add $0,1
|
programs/oeis/284/A284429.asm | jmorken/loda | 1 | 97085 | <reponame>jmorken/loda
; A284429: A quasilinear solution to Hofstadter's Q recurrence.
; 2,1,3,5,1,3,8,1,3,11,1,3,14,1,3,17,1,3,20,1,3,23,1,3,26,1,3,29,1,3,32,1,3,35,1,3,38,1,3,41,1,3,44,1,3,47,1,3,50,1,3,53,1,3,56,1,3,59,1,3,62,1,3,65,1,3,68,1,3,71,1,3,74,1,3,77,1,3,80,1,3,83,1,3,86,1,3,89,1,3,92,1,3,95,1,3,98,1,3,101,1,3,104,1,3,107,1,3,110,1,3,113,1,3,116,1,3,119,1,3,122,1,3,125,1,3,128,1,3,131,1,3,134,1,3,137,1,3,140,1,3,143,1,3,146,1,3,149,1,3,152,1,3,155,1,3,158,1,3,161,1,3,164,1,3,167,1,3,170,1,3,173,1,3,176,1,3,179,1,3,182,1,3,185,1,3,188,1,3,191,1,3,194,1,3,197,1,3,200,1,3,203,1,3,206,1,3,209,1,3,212,1,3,215,1,3,218,1,3,221,1,3,224,1,3,227,1,3,230,1,3,233,1,3,236,1,3,239,1,3,242,1,3,245,1,3,248,1,3,251
mov $1,$0
mov $2,$0
mod $2,3
sub $2,4
mov $0,$2
div $0,2
add $0,2
add $1,3
mov $3,4
mov $4,-1
pow $4,$2
lpb $0
sub $0,$0
mov $1,$3
lpe
sub $0,$4
sub $1,$0
sub $1,2
|
oeis/256/A256294.asm | neoneye/loda-programs | 11 | 100769 | <gh_stars>10-100
; A256294: Apply the transformation 0 -> 1 -> 2 -> 3 -> 0 to the digits of n written in base 4, then convert back to base 10.
; Submitted by <NAME>
; 1,2,3,0,9,10,11,8,13,14,15,12,1,2,3,0,37,38,39,36,41,42,43,40,45,46,47,44,33,34,35,32,53,54,55,52,57,58,59,56,61,62,63,60,49,50,51,48,5,6,7,4,9,10,11,8,13,14,15,12
bin $1,$0
mov $3,1
lpb $0
mov $2,$0
div $0,4
add $2,1
mod $2,4
mul $2,$3
add $1,$2
mul $3,4
lpe
mov $0,$1
|
antlr-basics/src/main/java/com/poc/chapter_05_part03/LogDetectionPart3.g4 | cgonul/antlr-poc | 0 | 3935 | grammar LogDetectionPart3;
file : row+ ; // parser rule matching rows of log file
row : ip STRING INT NL ; // match log file record
ip : INT '.' INT '.' INT '.' INT;
INT : [0-9]+ ; // match IP octet or HTTP result code
STRING: '"' .*? '"' ; // matches the HTTP protocol command
NL : '\n' ; // match log file record terminator
WS : ' ' -> skip ; // ignore spaces |
lift/x86/testdata/x86_32/fpu/fldln2/fldln2.asm | decomp/experimental | 9 | 4818 | [BITS 32]
global fldln2:function
section .text
; === [ FLDLN2 ] ===============================================================
fldln2:
fldln2
ret
|
SubtractOneUntilZero.asm | patkub/mips | 0 | 90415 | # Subtract One Until Zero - <NAME> - 12/2/2015
# Subtracts one from a number in memory until it is zero.
.data # items stored in data segment
.align 0 # no automatic alignment
number:
.space 4 # 4 bytes to store number
debug1:
.asciiz "Number = " # null-terminated string
debug2:
.asciiz "\n" # null-terminated string
.text # items stored in text segment
.globl main # label accessible from other files
main:
la $t0, number # load number address to $t0
# Set number and $t1 equal to 5
addi $t1, $zero, 5 # set $t1 = 5
sw $t1, 0($t0) # store $t1 into memory address number
# START DEBUG
# Print Number
la $a0, debug1 # print debug statement
li $v0, 4 # service code for printing string
syscall # perform service
# display number at $t1
move $a0, $t1 # set $a0 to number
li $v0, 1 # service code for print integer
syscall # perform service
# print new line
la $a0, debug2 # print debug statement
li $v0, 4 # service code for printing string
syscall # perform service
# END DEBUG
addi $t2, $zero, 1 # set $t2 = 1
j calc # loop
calc:
sub $t3, $t1, $t2 # $t3 = $t1 (number) - $t2 (1)
add $t1, $t3, $zero # $t1 = $t3 + 0
sw $t1, 0($t0) # store $t1 into memory address number
# START DEBUG
# Print Number
la $a0, debug1 # print debug statement
li $v0, 4 # service code for printing string
syscall # perform service
# display number at $t1
move $a0, $t1 # set $a0 to number
li $v0, 1 # service code for print integer
syscall # perform service
# print new line
la $a0, debug2 # print debug statement
li $v0, 4 # service code for printing string
syscall # perform service
# END DEBUG
beq $t3, $zero, exit # exit if $t3 = 0
j calc
exit:
# exit code
li $v0, 10 # service code for exit
syscall # perform service
|
Ada95/samples/ncurses2-overlap_test.adb | ProtonAOSP-platina/android_external_libncurses | 1 | 8950 | <gh_stars>1-10
------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding Samples --
-- --
-- ncurses --
-- --
-- B O D Y --
-- --
------------------------------------------------------------------------------
-- Copyright 2020 <NAME> --
-- Copyright 2000-2014,2015 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
-- "Software"), to deal in the Software without restriction, including --
-- without limitation the rights to use, copy, modify, merge, publish, --
-- distribute, distribute with modifications, sublicense, and/or sell --
-- copies of the Software, and to permit persons to whom the Software is --
-- furnished to do so, subject to the following conditions: --
-- --
-- The above copyright notice and this permission notice shall be included --
-- in all copies or substantial portions of the Software. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --
-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --
-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --
-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --
-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR --
-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. --
-- --
-- Except as contained in this notice, the name(s) of the above copyright --
-- holders shall not be used in advertising or otherwise to promote the --
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
------------------------------------------------------------------------------
-- Author: <NAME> <<EMAIL>> 2000
-- Version Control
-- $Revision: 1.8 $
-- $Date: 2020/02/02 23:34:34 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with ncurses2.util; use ncurses2.util;
with Terminal_Interface.Curses; use Terminal_Interface.Curses;
-- test effects of overlapping windows
procedure ncurses2.overlap_test is
procedure fillwin (win : Window; ch : Character);
procedure crosswin (win : Window; ch : Character);
procedure fillwin (win : Window; ch : Character) is
y1 : Line_Position;
x1 : Column_Position;
begin
Get_Size (win, y1, x1);
for y in 0 .. y1 - 1 loop
Move_Cursor (win, y, 0);
for x in 0 .. x1 - 1 loop
Add (win, Ch => ch);
end loop;
end loop;
exception
when Curses_Exception => null;
-- write to lower right corner
end fillwin;
procedure crosswin (win : Window; ch : Character) is
y1 : Line_Position;
x1 : Column_Position;
begin
Get_Size (win, y1, x1);
for y in 0 .. y1 - 1 loop
for x in 0 .. x1 - 1 loop
if ((x > (x1 - 1) / 3) and (x <= (2 * (x1 - 1)) / 3)) or
(((y > (y1 - 1) / 3) and (y <= (2 * (y1 - 1)) / 3)))
then
Move_Cursor (win, y, x);
Add (win, Ch => ch);
end if;
end loop;
end loop;
end crosswin;
-- In a 24x80 screen like some xterms are, the instructions will
-- be overwritten.
ch : Character;
win1 : Window := New_Window (9, 20, 3, 3);
win2 : Window := New_Window (9, 20, 9, 16);
begin
Set_Raw_Mode (SwitchOn => True);
Refresh;
Move_Cursor (Line => 0, Column => 0);
Add (Str => "This test shows the behavior of wnoutrefresh() with " &
"respect to");
Add (Ch => newl);
Add (Str => "the shared region of two overlapping windows A and B. " &
"The cross");
Add (Ch => newl);
Add (Str => "pattern in each window does not overlap the other.");
Add (Ch => newl);
Move_Cursor (Line => 18, Column => 0);
Add (Str => "a = refresh A, then B, then doupdate. b = refresh B, " &
"then A, then doupdate");
Add (Ch => newl);
Add (Str => "c = fill window A with letter A. d = fill window B " &
"with letter B.");
Add (Ch => newl);
Add (Str => "e = cross pattern in window A. f = cross pattern " &
"in window B.");
Add (Ch => newl);
Add (Str => "g = clear window A. h = clear window B.");
Add (Ch => newl);
Add (Str => "i = overwrite A onto B. j = overwrite " &
"B onto A.");
Add (Ch => newl);
Add (Str => "^Q/ESC = terminate test.");
loop
ch := Code_To_Char (Getchar);
exit when ch = CTRL ('Q') or ch = CTRL ('['); -- QUIT or ESCAPE
case ch is
when 'a' => -- refresh window A first, then B
Refresh_Without_Update (win1);
Refresh_Without_Update (win2);
Update_Screen;
when 'b' => -- refresh window B first, then A
Refresh_Without_Update (win2);
Refresh_Without_Update (win1);
Update_Screen;
when 'c' => -- fill window A so it's visible
fillwin (win1, 'A');
when 'd' => -- fill window B so it's visible
fillwin (win2, 'B');
when 'e' => -- cross test pattern in window A
crosswin (win1, 'A');
when 'f' => -- cross test pattern in window B
crosswin (win2, 'B');
when 'g' => -- clear window A
Clear (win1);
Move_Cursor (win1, 0, 0);
when 'h' => -- clear window B
Clear (win2);
Move_Cursor (win2, 0, 0);
when 'i' => -- overwrite A onto B
Overwrite (win1, win2);
when 'j' => -- overwrite B onto A
Overwrite (win2, win1);
when others => null;
end case;
end loop;
Delete (win2);
Delete (win1);
Erase;
End_Windows;
end ncurses2.overlap_test;
|
programs/oeis/078/A078979.asm | karttu/loda | 1 | 89806 | ; A078979: a(n) = A078711(n) - 1.
; 0,1,2,0,1,0,0,1,2,0,1,1,0,1,2,0,1,0,0,1,2,0,1,2,0,1,2,0,1,0,0,1,2,0,1,1,0,1,2,0,1,0,0,1,2,0,1,0,0,1,2,0,1,0,0,1,2,0,1,1,0,1,2,0,1,0,0,1,2,0,1,2,0,1,2,0,1,0,0,1,2,0,1,1,0,1,2,0,1,0,0,1,2,0,1,1,0,1,2,0,1,0,0,1,2
cal $0,100833 ; Smallest positive palindrome-free and squarefree sequence.
sub $0,1
mov $1,$0
mod $1,3
|
test/Succeed/TranspPiOnMeta.agda | shlevy/agda | 1,989 | 7458 | {-# OPTIONS --cubical --allow-unsolved-metas #-}
module TranspPiOnMeta where
open import Agda.Primitive.Cubical
open import Agda.Builtin.Cubical.Path
-- Transporting along a function type with unknown sort of
-- domain/codomain shouldn't result into an impossible being thrown.
-- We equate to Set to trigger reduction.
test1 : (primTransp (\ i → (x : {!!}) → {!!}) i0 {!!} {!!}) ≡ Set
test1 i = Set
test2 : (primTransp (\ i → (x : Set) → {!!}) i0 {!!} {!!}) ≡ Set
test2 i = Set
Foo : Set₂
Foo = {!!}
test3 : (primTransp (\ i → (x : {!!}) → Foo) i0 {!!} {!!}) ≡ Set
test3 i = Set
|
Cubical/HITs/James.agda | thomas-lamiaux/cubical | 1 | 7429 | <gh_stars>1-10
{-# OPTIONS --safe #-}
module Cubical.HITs.James where
open import Cubical.HITs.James.Base public
open import Cubical.HITs.James.Properties public
|
dsl/src/main/resources/IdesLexer.g4 | wuchunfu/ides | 0 | 3389 | lexer grammar IdesLexer;
@header {
package ides.dsl.parser;
}
channels { COMMENT }
SCALA_MODE : '%scala' NL -> pushMode(SCALA_LAN);
PY_MODE : ('%python'|'%py') ('(' (IDENTIFIER|QUOTED_TEXT)? ')')? NL -> pushMode(PYTHON_LAN);
SQL_MODE : '%sql' ('(' (IDENTIFIER|QUOTED_TEXT)? ')')? NL -> pushMode(SQL_LAN);
SHELL_MODE : ('%shell'|'%sh') NL -> pushMode(SHELL_LAN);
//============================
// Start of the keywords list
//============================
AS: 'as';
INTO: 'into';
LOAD: 'load';
SAVE: 'save';
SELECT: 'select';
OPTIONS:'options';
WHERE: 'where';
AND: 'and';
OVERWRITE: 'overwrite';
APPEND: 'append';
ERRORIfExists: 'errorIfExists';
IGNORE: 'ignore';
PARTITIONBY: 'partitionBy'|'partitionby';
CONNECT: 'connect';
SET: 'set';
CONNECTION: 'connection';
FUNCTION: 'function';
CREATE: 'create';
DROP: 'drop';
REGISTER: 'register';
RUN: 'run';
EXEC_TOKEN: '!';
//============================
// End of the keywords list
//============================
// symbol of raw command
//COMMAND_SYM: ('_' | '-' | '/' | '>' | '<' | '.' | '~' ) ;
DOT
: '.'
;
EQ
: '='
;
COMMA
: ','
;
GT
: '>'
;
LT
: '<'
;
HYPHEN
: '-'
;
UNDERLINE
: '_'
;
SLASH
: '/'
;
TILDE
: '~'
;
COLON
: ':'
;
ASTERISK
: '*'
;
VERTICAL_BAR
: '|'
;
// end of query
EOQ
: ';'
;
MUMERIC
: ('-'|'+')? DIGIT* '.'? DIGIT+
;
// 标识符规则: 数字,字母和下划线(_)组成,数字不能打头,下划线不能单独打头
IDENTIFIER
: LETTER(DIGIT | LETTER | '_')* // 字母开头后面接任意个(数字|字母|下划线) a1 ab1 a_1 ab_
| '_'(DIGIT | LETTER | '_')+ // _开头后面至少接一个(数字|字母|下划线) _1 _a _a1 _1a
;
// 匹配`x` x是非`(可以通过\转义)的任何字符
QUOTED_TEXT
: '`' ( ~('`'|'\\') | ('\\' .) )*? '`'
;
STRING_TEXT
: '\'' ( ~('\''|'\\') | ('\\' .) )*? '\''
| '"' ( ~('"'|'\\') | ('\\' .) )*? '"'
;
BLOCK_STRING_TEXT
: '\'\'\'' .*? '\'\'\''
| '"""' .*? '"""'
;
// fragment:该规则本身不是一个词法符号,它只会被其他词法规则使用
fragment
DIGIT
: [0-9] // 定义数字
;
fragment
LETTER
: [a-zA-Z] // 定义字母
;
fragment
UPPER_LETTER
: [A-Z] // 定义大写字母
;
fragment
LOWER_LETTER
: [a-z] // 定义小写字母
;
VARIABLE
: LETTER(DIGIT | LETTER | '_')*
| '_'(DIGIT | LETTER | '_')+
;
WS : (' '|'\r'|'\t'|'\n') -> channel(HIDDEN)
;
// ~x 是指除x外的任何字符
LINE_COMMENT
: '--' ~[\r\n]* NL? -> channel(HIDDEN) // 单行注释
;
BLOCK_COMMENT
: '/*' .*? '*/' -> channel(HIDDEN) // 多行注释
;
// match both UNIX and Windows newLines
NL
: '\n'
| '\r' '\n'?
;
// channel(HIDDEN) 隐藏通道会 忽略却保留 匹配的词法符号
//WS
// : [ \r\n\t]+ -> channel(HIDDEN) // 匹配一个或者多个空白字符
// ;
// Catch-all for anything we can't recognize.
// We use this to be able to ignore and recover all the text
// when splitting statements with DelimiterLexer
UNRECOGNIZED
: .
;
//============================
// Start of the scala mode
//============================
mode SCALA_LAN;
EXIT_SCALA : '%' -> popMode;
IGNORE_SCALA : . -> more ;
SCALA_RETURN
: '\n'
| '\r\n'
;
SCALA_STRING
: '"""' .*? '"""'
| '"' ( ~('"'|'\\') | ('\\' .) )*? '"'
;
// % 打头认为end
SCALA_NonEnd
: ~[ \r\n\t]+ ( [ \t]* '%' [ \t]* ~[ \r\n\t]+ )+
;
// scala import
SCALA_IMPORT
: [ \t]* 'import' [ \t]* ~[ \r\n\t]+ NL
;
// Scala 类片段
// Abc ( a: Int, b: Int)
// ABC
// Abc_1
SCALA_CLASS_SEGMENT
: [ \t]* (UPPER_LETTER+VARIABLE*) [ \t]* ('(' ~[()]* ')')? [ \t]*
;
SCALA_METHOD_SEGMENT
: [ \t]* (LOWER_LETTER+VARIABLE*) [ \t]* ('(' ~[()]* ')')? [ \t]*
;
SCALA_BLOCK_BODY
: [ \t]* '{' ~[\r\n]*? '}' [ \t]*
;
// scala 方法
SCALA_METHOD
: [ \t]* 'def' SCALA_METHOD_SEGMENT (':'[ \t]*LETTER+)? [ \t]* '='? SCALA_BLOCK_BODY?
;
// 定义Scala 类 对象 接口
SCALA_CLASS
: [ \t]* ('object'|'class'|'trait') SCALA_CLASS_SEGMENT ('extends' SCALA_CLASS_SEGMENT )* SCALA_BLOCK_BODY?
;
SCALA_TEXT
: (~('/'|'*'|'%'|'"'|'\''|';'|'\r'|'\n') | SCALA_STRING | SCALA_IMPORT | SCALA_METHOD | SCALA_CLASS | SCALA_NonEnd)+ ';'? SCALA_RETURN*
;
SCALA_COMMENT
: '//'+ ~('/'|'\r'|'\n')* -> channel(COMMENT)
;
SCALA_COMMENT_BLOCK
: '/*' .*? '*/' -> channel(COMMENT)
;
SCALA_WS
: [ \r\n\t]+ -> skip
;
//============================
// End of the scala mode
//============================
//============================
// Start of the python mode
//============================
mode PYTHON_LAN;
EXIT_PY : '%' -> popMode;
IGNORE_PY : . -> more ;
PY_RETURN
: '\n'
| '\r\n'
;
PY_STRING
: '\'\'\'' .*? '\'\'\''
| '"""' .*? '"""'
| '\'' ( ~('\''|'\\') | ('\\' .) )*? '\''
| '"' ( ~('"'|'\\') | ('\\' .) )*? '"'
;
VariableRef
: '%'[ \t]*VARIABLE
| '%'[ \t]*'(' .*? ')'
| '%'[ \t]*'{' .*? '}'
;
// % 打头认为end
PY_NonEnd
: ~[ \r\n\t]+ ( [ \t]* '%' [ \t]* ~[ \r\n\t]+ )+
;
PY_TEXT
: ( PY_STRING| PY_NonEnd | VariableRef | ~('#'|'%'|'"'|'\''|'\r'|'\n') )+ PY_RETURN?
;
PY_COMMENT
: '#'+ ~('#'|'\r'|'\n')* -> channel(COMMENT)
;
PY_WS
: [ \r\n\t]+ -> skip
;
//============================
// End of the python mode
//============================
//============================
// Start of the SQL mode
//============================
mode SQL_LAN;
EXIT_SQL : '%' -> popMode;
IGNORE_SQL : . -> more ;
SQL_RETURN
: '\n'
| '\r\n'
;
SQL_TEXT
: DML SQL_RETURN?
| DDL SQL_RETURN?
| Profile SQL_RETURN?
;
DDL
: CreatStatement
| AlterStatement
| DropStatement
| RenameStatement
| TruncateStatement
;
DML
: SelectStatement
| InsertStatement
| UpdateStatement
| DeleteStatement
| ReplaceStatement
;
Profile
: UseStatement
| ShowStatement
| ExplainStatement
| SetStatement
| CallStatement
| OpenStatement
| CloseStatement
| TransactionStatement
| CommitStatement
| RollbackStatement
;
SQL_COMMENT1
: '#'+ ~('#'|'\r'|'\n')* -> channel(COMMENT)
;
SQL_COMMENT2
: '-'+ ~('-'|'\r'|'\n')* -> channel(COMMENT)
;
SQL_COMMENT_BLOCK
: '/*' .*? '*/' -> channel(COMMENT)
;
CreatStatement : 'create' ~(';')+ ';' ;
AlterStatement : 'alter' ~(';')+ ';' ;
DropStatement : 'drop' ~(';')+ ';' ;
RenameStatement : 'rename' ~(';')+ ';' ;
TruncateStatement : 'truncate' ~(';')+ ';' ;
SelectStatement : 'select' ~(';')+ ';' ;
InsertStatement : 'insert' ~(';')+ ';' ;
UpdateStatement : 'update' ~(';')+ ';' ;
DeleteStatement : 'delete' ~(';')+ ';' ;
ReplaceStatement : 'replace' ~(';')+ ';' ;
UseStatement : 'use' ~(';')+ ';' ;
ShowStatement : 'show' ~(';')+ ';' ;
ExplainStatement : 'explain' ~(';')+ ';' ;
SetStatement : 'set' ~(';')+ ';' ;
CallStatement : 'call' ~(';')+ ';' ;
OpenStatement : 'open' ~(';')+ ';' ;
CloseStatement : 'close' ~(';')+ ';' ;
TransactionStatement : ('start'|'begin') ~(';')+ ';';
CommitStatement : 'commit' ~(';')* ';';
RollbackStatement : 'rollback' ~(';')* ';';
SQL_WS
: [ \r\n\t]+ -> skip
;
//============================
// End of the SQL mode
//============================
//============================
// Start of the shell mode
//============================
mode SHELL_LAN;
EXIT_SH : '%' -> popMode;
IGNORE_SH : . -> more ;
SH_RETURN
: '\n'
| '\r\n'
;
SH_STRING
: '\'\'\'' .*? '\'\'\''
| '"""' .*? '"""'
| '\'' ( ~('\''|'\\') | ('\\' .) )*? '\''
| '"' ( ~('"'|'\\') | ('\\' .) )*? '"'
;
// % 打头认为end
SH_NonEnd
: ~[ \r\n\t]+ '%' ~(';'|'\r'|'\n')*
;
SHELL_TEXT
: (~('#'|'%'|'"'|'\''|';'|'\r'|'\n') | SH_STRING| SH_NonEnd)+ ';' SH_RETURN?
;
SEHLL_COMMENT
: '#'+ ~('#'|'\r'|'\n')* -> channel(COMMENT)
;
SH_WS
: [ \r\n\t]+ -> skip
;
//============================
// End of the shell mode
//============================ |
_maps/obj7F.asm | NatsumiFox/AMPS-Sonic-1-2005 | 2 | 25388 | ; ---------------------------------------------------------------------------
; Sprite mappings - chaos emeralds from the special stage results screen
; ---------------------------------------------------------------------------
dc.w byte_CE02-Map_obj7F
dc.w byte_CE08-Map_obj7F
dc.w byte_CE0E-Map_obj7F
dc.w byte_CE14-Map_obj7F
dc.w byte_CE1A-Map_obj7F
dc.w byte_CE20-Map_obj7F
dc.w byte_CE26-Map_obj7F
byte_CE02: dc.b 1
dc.b $F8, 5, $20, 4, $F8
byte_CE08: dc.b 1
dc.b $F8, 5, 0, 0, $F8
byte_CE0E: dc.b 1
dc.b $F8, 5, $40, 4, $F8
byte_CE14: dc.b 1
dc.b $F8, 5, $60, 4, $F8
byte_CE1A: dc.b 1
dc.b $F8, 5, $20, 8, $F8
byte_CE20: dc.b 1
dc.b $F8, 5, $20, $C, $F8
byte_CE26: dc.b 0 ; Blank frame
even |
shardingsphere-distsql/shardingsphere-distsql-parser/src/main/antlr4/imports/Symbol.g4 | sunOnly/shardingsphere | 5,788 | 3031 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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 Symbol;
AND: '&&';
OR: '||';
NOT: '!';
TILDE: '~';
VERTICALBAR: '|';
AMPERSAND: '&';
SIGNEDLEFTSHIFT: '<<';
SIGNEDRIGHTSHIFT: '>>';
CARET: '^';
MOD: '%';
COLON: ':';
PLUS: '+';
MINUS: '-';
ASTERISK: '*';
SLASH: '/';
BACKSLASH: '\\';
DOT: '.';
DOTASTERISK: '.*';
SAFEEQ: '<=>';
DEQ: '==';
EQ: '=';
NEQ: '<>' | '!=';
GT: '>';
GTE: '>=';
LT: '<';
LTE: '<=';
POUND: '#';
LP: '(';
RP: ')';
LBE: '{';
RBE: '}';
LBT: '[';
RBT: ']';
COMMA: ',';
DQ: '"';
SQ: '\'';
BQ: '`';
QUESTION: '?';
AT: '@';
SEMI: ';';
JSONSEPARATOR: '->>';
UL: '_';
DL: '$';
|
Transynther/x86/_processed/AVXALIGN/_st_zr_sm_/i3-7100_9_0x84_notsx.log_21829_2908.asm | ljhsiun2/medusa | 9 | 98555 | <reponame>ljhsiun2/medusa<gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r14
push %r15
push %r9
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0xe870, %r12
nop
nop
cmp %r14, %r14
movb (%r12), %r15b
nop
nop
nop
nop
sub %rdi, %rdi
lea addresses_A_ht+0xd30, %r9
nop
nop
cmp $6097, %r14
movw $0x6162, (%r9)
nop
add %r12, %r12
lea addresses_A_ht+0x42ac, %r12
nop
nop
nop
and $59263, %r15
movups (%r12), %xmm3
vpextrq $0, %xmm3, %r14
nop
nop
nop
nop
sub $5027, %rdi
lea addresses_UC_ht+0x188d8, %r14
nop
nop
nop
nop
add %rax, %rax
movb (%r14), %r9b
sub %rdi, %rdi
lea addresses_UC_ht+0x11067, %r9
nop
nop
nop
xor %r12, %r12
mov $0x6162636465666768, %rdi
movq %rdi, (%r9)
nop
nop
nop
cmp %r9, %r9
lea addresses_WT_ht+0x9a70, %rsi
lea addresses_D_ht+0x13f5c, %rdi
nop
nop
add $43275, %r9
mov $75, %rcx
rep movsl
nop
nop
nop
xor $40980, %r15
lea addresses_A_ht+0x15670, %r9
nop
nop
nop
cmp $8388, %r14
movb (%r9), %r12b
nop
nop
nop
nop
dec %r14
lea addresses_D_ht+0x17c70, %rsi
lea addresses_UC_ht+0x10670, %rdi
nop
nop
nop
nop
nop
xor $56747, %r12
mov $70, %rcx
rep movsl
nop
nop
cmp $42809, %r14
lea addresses_normal_ht+0x39f0, %rdi
add $27124, %r9
movb $0x61, (%rdi)
nop
xor %rdi, %rdi
lea addresses_UC_ht+0x15670, %r12
nop
nop
nop
add %rcx, %rcx
mov $0x6162636465666768, %r14
movq %r14, %xmm2
movups %xmm2, (%r12)
inc %r9
lea addresses_normal_ht+0xae70, %rsi
lea addresses_A_ht+0xbfb, %rdi
nop
nop
nop
nop
sub %r14, %r14
mov $12, %rcx
rep movsq
nop
nop
nop
nop
nop
cmp $10824, %rax
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r15
pop %r14
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r14
push %r8
push %rax
push %rcx
// Load
lea addresses_RW+0x10270, %r8
xor $56087, %r11
movups (%r8), %xmm2
vpextrq $1, %xmm2, %rax
nop
nop
nop
nop
and %r10, %r10
// Store
lea addresses_A+0x16e70, %r12
nop
nop
and $13795, %rcx
movb $0x51, (%r12)
cmp %r11, %r11
// Store
lea addresses_D+0xaa70, %rax
nop
nop
nop
nop
and $22332, %r10
mov $0x5152535455565758, %r12
movq %r12, %xmm4
vmovups %ymm4, (%rax)
nop
nop
nop
and $26613, %r12
// Store
lea addresses_UC+0x1ba70, %rax
add %r10, %r10
movw $0x5152, (%rax)
nop
nop
nop
nop
and %rcx, %rcx
// Store
mov $0x7a20b20000000670, %r14
nop
nop
nop
nop
cmp $37810, %r8
mov $0x5152535455565758, %rcx
movq %rcx, (%r14)
nop
and $57136, %r14
// Faulty Load
mov $0x7a20b20000000670, %rax
nop
nop
nop
add %r8, %r8
mov (%rax), %r11w
lea oracles, %r12
and $0xff, %r11
shlq $12, %r11
mov (%r12,%r11,1), %r11
pop %rcx
pop %rax
pop %r8
pop %r14
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_NC', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_RW', 'same': False, 'size': 16, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_A', 'same': False, 'size': 1, 'congruent': 10, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_D', 'same': False, 'size': 32, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_UC', 'same': False, 'size': 2, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_NC', 'same': True, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_NC', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 1, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 2, 'congruent': 6, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
{'src': {'type': 'addresses_A_ht', 'same': False, 'size': 16, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 1, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_A_ht', 'same': False, 'size': 1, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 1, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 16, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM'}
{'00': 394, '58': 21435}
00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58
*/
|
test2.asm | napobear/py6502 | 0 | 81381 | ; Testing absolute load and save
LDA #$10
STA $405
LDA #$20
LDX #$5
ORA $400,X
|
source/shell-commands.adb | charlie5/aShell | 11 | 29377 | <gh_stars>10-100
with
GNAT.OS_Lib,
Ada.Strings.Fixed,
Ada.Strings.Maps,
Ada.Characters.Handling,
Ada.Exceptions,
Ada.Unchecked_Deallocation,
Ada.Unchecked_Conversion;
package body Shell.Commands
is
--- Strings
--
function To_String_Vector (Strings : String_Array) return String_Vector
is
use String_Vectors;
Vector : String_Vector;
begin
for Each of Strings
loop
Vector.Append (Each);
end loop;
return Vector;
end To_String_Vector;
function To_String_Array (Strings : String_Vector) return String_Array
is
use String_Vectors;
The_Array : String_Array (1 .. Natural (Strings.Length));
begin
for i in The_Array'Range
loop
The_Array (i) := Strings.Element (i);
end loop;
return The_Array;
end To_String_Array;
function To_Arguments (All_Arguments : in String) return String_Array
is
use GNAT.OS_Lib;
Command_Name : constant String := "Command_Name"; -- 'Argument_String_To_List' expects the command name to be
-- the 1st piece of the string, so we provide a dummy name.
Arguments : Argument_List_Access := Argument_String_To_List (Command_Name & " " & All_Arguments);
Result : String_Array (1 .. Arguments'Length - 1);
begin
for i in Result'Range
loop
Result (i) := +Arguments (i + 1).all;
end loop;
Free (Arguments);
return Result;
end To_Arguments;
--- Commands
--
function Image (The_Command : in Command) return String
is
use String_Vectors;
Result : Unbounded_String;
begin
Append (Result, "(" & The_Command.Name & ", (");
for Each of The_Command.Arguments
loop
Append (Result, Each);
if Each = Last_Element (The_Command.Arguments)
then
Append (Result, ")");
else
Append (Result, ", ");
end if;
end loop;
Append (Result, ", Input_Pipe => " & Image (The_Command.Input_Pipe));
Append (Result, ", Output_Pipe => " & Image (The_Command.Output_Pipe));
Append (Result, ", Error_Pipe => " & Image (The_Command.Error_Pipe));
Append (Result, ")");
return To_String (Result);
end Image;
procedure Define (The_Command : out Command; Command_Line : in String)
is
use Ada.Strings.Fixed;
I : constant Natural := Index (Command_Line, " ");
begin
The_Command.Copy_Count := new Count' (1);
if I = 0
then
The_Command.Name := +Command_Line;
return;
end if;
declare
Name : constant String := Command_Line (Command_Line'First .. I - 1);
Arguments : constant String_Array := To_Arguments (Command_Line (I + 1 .. Command_Line'Last));
begin
The_Command.Name := +(Name);
The_Command.Arguments := To_String_Vector (Arguments);
end;
end Define;
package body Forge
is
function To_Command (Command_Line : in String) return Command
is
use Ada.Strings.Fixed;
I : constant Natural := Index (Command_Line, " ");
begin
if I = 0
then
return Result : Command
do
Result.Name := +Command_Line;
Result.Copy_Count := new Count' (1);
end return;
end if;
declare
Name : constant String := Command_Line (Command_Line'First .. I - 1);
Arguments : constant String_Array := To_Arguments (Command_Line (I + 1 .. Command_Line'Last));
begin
return Result : Command
do
Result.Name := +(Name);
Result.Arguments := To_String_Vector (Arguments);
Result.Copy_Count := new Count' (1);
end return;
end;
end to_Command;
function To_Commands (Pipeline : in String) return Command_Array
is
use Ada.Strings.Fixed;
Cursor : Positive := Pipeline'First;
First,
Last : Positive;
Count : Natural := 0;
Max_Commands_In_Pipeline : constant := 50; -- Arbitrary.
All_Commands : String_Array (1 .. Max_Commands_In_Pipeline);
begin
loop
Find_Token (Source => Pipeline,
Set => Ada.Strings.Maps.To_Set ('|'),
From => Cursor,
Test => Ada.Strings.Outside,
First => First,
Last => Last);
declare
Full_Command : constant String := Trim (Pipeline (First .. Last),
Ada.Strings.Both);
begin
Count := Count + 1;
All_Commands (Count) := +Full_Command;
end;
exit when Last = Pipeline'Last;
Cursor := Last + 1;
end loop;
return Result : Command_Array (1 .. Count)
do
for i in 1 .. Count
loop
Define ( Result (i),
+All_Commands (i));
end loop;
end return;
end To_Commands;
end Forge;
procedure Connect (From, To : in out Command)
is
Pipe : constant Shell.Pipe := To_Pipe;
begin
From.Output_Pipe := Pipe;
To. Input_Pipe := Pipe;
From.Owns_Input_Pipe := True;
To. Owns_Output_Pipe := True;
end Connect;
procedure Connect (Commands : in out Command_Array)
is
begin
for i in Commands'First .. Commands'Last - 1
loop
Connect (From => Commands (i),
To => Commands (i + 1));
end loop;
end Connect;
procedure Close_Pipe_Write_Ends (The_Command : in out Command)
is
begin
if The_Command.Output_Pipe /= Standard_Output
then
Close_Write_End (The_Command.Output_Pipe);
end if;
if The_Command.Error_Pipe /= Standard_Error
then
Close_Write_End (The_Command.Error_Pipe);
end if;
end Close_Pipe_Write_Ends;
function Input_Pipe (The_Command : in Command) return Pipe
is
begin
return The_Command.Input_Pipe;
end Input_Pipe;
function Output_Pipe (The_Command : in Command) return Pipe
is
begin
return The_Command.Output_Pipe;
end Output_Pipe;
function Error_Pipe (The_Command : in Command) return Pipe
is
begin
return The_Command.Error_Pipe;
end Error_Pipe;
function Name (The_Command : in Command) return String
is
begin
return +The_Command.Name;
end Name;
function Arguments (The_Command : in Command) return String
is
All_Arguments : Unbounded_String;
Last : constant Natural := Natural (The_Command.Arguments.Length);
begin
for i in 1 .. Last
loop
Append (All_Arguments, The_Command.Arguments.Element (i));
if i /= Last
then
Append (All_Arguments, " ");
end if;
end loop;
return To_String (All_Arguments);
end Arguments;
function Process (The_Command : in out Command) return access Shell.Process
is
begin
return The_Command.Process'Unchecked_Access;
end Process;
--- Start
--
procedure Start (The_Command : in out Command;
Input : in Data := No_Data;
Pipeline : in Boolean := False)
is
begin
if Input /= No_Data
then
The_Command.Input_Pipe := To_Pipe;
Write_To (The_Command.Input_Pipe, Input);
end if;
if The_Command.Output_Pipe = Null_Pipe
then
The_Command.Owns_Output_Pipe := True;
The_Command.Output_Pipe := To_Pipe (Blocking => False);
end if;
if The_Command.Error_Pipe = Null_Pipe
then
The_Command. Error_Pipe := To_Pipe (Blocking => False);
end if;
The_Command.Process := Start (Program => +The_Command.Name,
Arguments => To_String_Array (The_Command.Arguments),
Input => The_Command.Input_Pipe,
Output => The_Command.Output_Pipe,
Errors => The_Command.Error_Pipe,
Pipeline => Pipeline);
end Start;
procedure Start (Commands : in out Command_Array;
Input : in Data := No_Data;
Pipeline : in Boolean := True)
is
begin
if not Pipeline
then
for Each of Commands
loop
Start (Each, Input);
end loop;
return;
end if;
Connect (Commands);
for i in Commands'Range
loop
if i = Commands'First
then
Start (Commands (i),
Input,
Pipeline => True);
else
Start (Commands (i),
Pipeline => True);
end if;
-- Since we are making a pipeline, we need to close the write ends of
-- the Output & Errors pipes ourselves.
--
if i /= Commands'First
then
Close_Pipe_Write_Ends (Commands (i - 1)); -- Close ends for the prior command.
end if;
end loop;
Close_Pipe_Write_Ends (Commands (Commands'Last)); -- Close ends for the final command.
end Start;
--- Run
--
procedure Gather_Results (The_Command : in out Command)
is
begin
declare
The_Output : constant Data := Output_Of (The_Command.Output_Pipe);
begin
if The_Output'Length /= 0
then
The_Command.Output.Append (The_Output);
end if;
end;
declare
The_Errors : constant Data := Output_Of (The_Command.Error_Pipe);
begin
if The_Errors'Length /= 0
then
The_Command.Errors.Append (The_Errors);
end if;
end;
end Gather_Results;
procedure Run (The_Command : in out Command;
Input : in Data := No_Data;
Raise_Error : in Boolean := False)
is
begin
Start (The_Command, Input);
loop
Gather_Results (The_Command); -- Gather on-going results.
exit when Has_Terminated (The_Command.Process);
end loop;
Gather_Results (The_Command); -- Gather any final results.
if not Normal_Exit (The_Command.Process)
and Raise_Error
then
declare
Error : constant String := +Output_Of (The_Command.Error_Pipe);
begin
raise Command_Error with Error;
end;
end if;
end Run;
function Run (The_Command : in out Command;
Input : in Data := No_Data;
Raise_Error : in Boolean := False) return Command_Results
is
begin
Run (The_Command, Input, Raise_Error);
return Results_Of (The_Command);
end Run;
procedure Run (The_Pipeline : in out Command_Array;
Input : in Data := No_Data;
Raise_Error : in Boolean := False)
is
Last_Command : Command renames The_Pipeline (The_Pipeline'Last);
i : Positive := 1;
begin
Last_Command.Output_Pipe := To_Pipe;
Start (The_Pipeline, Input);
loop
Gather_Results (Last_Command); -- Gather on-going results.
if Has_Terminated (The_Pipeline (i).Process)
then
if Normal_Exit (The_Pipeline (i).Process)
then
i := i + 1;
if i > The_Pipeline'Last
then
Gather_Results (Last_Command); -- Gather any final results.
exit;
end if;
else
declare
Error : constant String := "Pipeline command" & Integer'Image (i)
& " '" & (+The_Pipeline (i).Name) & "' failed.";
begin
-- Stop the pipeline.
--
while i <= The_Pipeline'Last
loop
Stop (The_Pipeline (i));
i := i + 1;
end loop;
if Raise_Error
then
raise Command_Error with Error;
else
exit;
end if;
end;
end if;
end if;
end loop;
end Run;
function Run (The_Pipeline : in out Command_Array;
Input : in Data := No_Data;
Raise_Error : in Boolean := False) return Command_Results
is
Last_Command : Command renames The_Pipeline (The_Pipeline'Last);
begin
Run (The_Pipeline, Input, Raise_Error);
return Results_Of (Last_Command);
end Run;
function Run (Command_Line : in String;
Input : in Data := No_Data) return Command_Results
is
use Ada.Strings.Fixed,
Shell.Commands.Forge;
The_Index : constant Natural := Index (Command_Line, " | ");
Is_Pipeline : constant Boolean := The_Index /= 0;
begin
if Is_Pipeline
then
declare
The_Commands : Command_Array := To_Commands (Command_Line);
begin
return Run (The_Commands, Input);
end;
else
declare
The_Command : Command := To_Command (Command_Line);
begin
return Run (The_Command, Input);
end;
end if;
end Run;
procedure Run (Command_Line : in String;
Input : in Data := No_Data)
is
Results : Command_Results := Run (Command_Line, Input) with Unreferenced;
begin
null;
end Run;
procedure Stop (The_Command : in out Command)
is
use Ada.Characters.Handling,
Ada.Exceptions;
begin
The_Command.Gather_Results;
Close (The_Command. Input_Pipe);
Close (The_Command.Output_Pipe);
Close (The_Command. Error_Pipe);
begin
Kill (The_Command);
exception
when E : POSIX.POSIX_Error =>
if To_Upper (Exception_Message (E)) /= "NO_SUCH_PROCESS"
then
Log ("Unable to kill process" & Image (The_Command.Process));
raise;
end if;
end;
begin
Wait_On (The_Command.Process); -- Reap zombies.
exception
when E : POSIX.POSIX_Error =>
if To_Upper (Exception_Message (E)) /= "NO_CHILD_PROCESS"
then
Log ("Unable to wait on process" & Image (The_Command.Process));
raise;
end if;
end;
end Stop;
function Failed (The_Command : in Command) return Boolean
is
begin
return not Normal_Exit (The_Command.Process);
end Failed;
function Failed (The_Pipeline : in Command_Array) return Boolean
is
begin
for Each of The_Pipeline
loop
if Failed (Each)
then
return True;
end if;
end loop;
return False;
end Failed;
function Which_Failed (The_Pipeline : in Command_Array) return Natural
is
begin
for i in The_Pipeline'Range
loop
if not Normal_Exit (The_Pipeline (i).Process)
then
return i;
end if;
end loop;
return 0;
end Which_Failed;
-- Command Results
--
function Results_Of (The_Command : in out Command) return Command_Results
is
use Data_Vectors;
Output_Size : Data_Offset := 0;
Errors_Size : Data_Offset := 0;
begin
Gather_Results (The_Command);
for Each of The_Command.Output
loop
Output_Size := Output_Size + Each'Length;
end loop;
for Each of The_Command.Errors
loop
Errors_Size := Errors_Size + Each'Length;
end loop;
declare
Output : Data (1 .. Output_Size);
Errors : Data (1 .. Errors_Size);
procedure Set_Data (From : in out Data_Vector;
To : out Data)
is
First : Data_Index := 1;
Last : Data_Index;
begin
for Each of From
loop
Last := First + Each'Length - 1;
To (First .. Last) := Each;
First := Last + 1;
end loop;
From.Clear;
end Set_Data;
begin
Set_Data (The_Command.Output, Output);
Set_Data (The_Command.Errors, Errors);
return (Output_Size => Output_Size,
Error_Size => Errors_Size,
Output => Output,
Errors => Errors);
end;
exception
when Storage_Error =>
raise Command_Error with "Command output exceeds stack capacity. "
& "Increase the stack limit via 'ulimit -s'.";
end Results_Of;
function Output_Of (The_Results : in Command_Results) return Data
is
begin
return The_Results.Output;
end Output_Of;
function Errors_Of (The_Results : in Command_Results) return Data
is
begin
return The_Results.Errors;
end Errors_Of;
procedure Wait_On (The_Command : in out Command)
is
begin
Wait_On (The_Command.Process);
end Wait_On;
function Has_Terminated (The_Command : in out Command) return Boolean
is
begin
return Has_Terminated (The_Command.Process);
end Has_Terminated;
function Normal_Exit (The_Command : in Command) return Boolean
is
begin
return Normal_Exit (The_Command.Process);
end Normal_Exit;
procedure Kill (The_Command : in Command)
is
begin
Kill (The_Command.Process);
end Kill;
procedure Interrupt (The_Command : in Command)
is
begin
Interrupt (The_Command.Process);
end Interrupt;
procedure Pause (The_Command : in Command)
is
begin
Pause (The_Command.Process);
end Pause;
procedure Resume (The_Command : in Command)
is
begin
Resume (The_Command.Process);
end Resume;
--- Controlled
--
overriding
procedure Adjust (The_Command : in out Command)
is
begin
The_Command.Copy_Count.all := The_Command.Copy_Count.all + 1;
end Adjust;
overriding
procedure Finalize (The_Command : in out Command)
is
procedure Deallocate is new Ada.Unchecked_Deallocation (Count, Count_Access);
begin
The_Command.Copy_Count.all := The_Command.Copy_Count.all - 1;
if The_Command.Copy_Count.all = 0
then
if The_Command.Owns_Input_Pipe
then
Close (The_Command.Input_Pipe);
end if;
if The_Command.Owns_Output_Pipe
then
Close (The_Command.Output_Pipe);
end if;
Close (The_Command.Error_Pipe);
Deallocate (The_Command.Copy_Count);
end if;
end Finalize;
function Hash (Id : in Command_Id) return Ada.Containers.Hash_Type
is
begin
return Ada.Containers.Hash_Type (Id);
end Hash;
end Shell.Commands;
|
programs/oeis/212/A212844.asm | jmorken/loda | 1 | 241703 | <reponame>jmorken/loda<gh_stars>1-10
; A212844: 2^(n+2) mod n.
; 0,0,2,0,3,4,1,0,5,6,8,4,8,2,2,0,8,4,8,4,11,16,8,16,3,16,23,8,8,16,8,0,32,16,2,4,8,16,32,24,8,4,8,20,23,16,8,16,22,46,32,12,8,4,7,16,32,16,8,4,8,16,32,0,63,58,8,64,32,36,8,40,8,16,47,64,72,22,8,64,77,16,8,4,43,16,32,56,8,76,57,64,32,16,52,64,8,72,68,4,8,52,8,88,53,16,8,4,8,26,32,64,8,28,82,64,59,16,2,64,85,16,32,64,103,4,8,0,32,66,8,16,113,16,77,72,8,118,8,44,32,16,54,112,128,16,53,64,8,46,8,112,59,64,97,4,8,16,32,64,121,4,8,64,128,16,8,88,151,16,167,64,8,82,22,80,32,16,8,4,8,16,32,104,128,70,83,64,158,106,8,64,8,16,32,120,8,166,8,104,32,16,135,64,128,16,185,64,79,46,8,64,32,16,42,112,78,16,32,4,128,34,8,128,203,16,8,196,8,186,74,96,8,22,222,64,32,120,8,64,8,82,239,64,23,10,31,32,32,246
mov $2,$0
add $2,$0
add $2,4
mov $3,$0
mov $0,$2
mov $1,4
add $3,1
lpb $0
sub $0,2
mod $1,$3
mul $1,2
lpe
div $1,2
|
src/_in-progress/mode2-obj-size.asm | c-sp/age-test-roms | 0 | 100296 | INCLUDE "_in-progress/mode2-obj-size.inc"
run_test:
RUN_TEST LCDCF_OBJON | LCDCF_OBJ16, LCDCF_OBJON
|
Insert Updated pages for greta.applescript | AlexanderGalen/applescripts | 3 | 3724 | <filename>Insert Updated pages for greta.applescript
set sourceFolder to "HOM:Products:SPORTS PRODUCTS:FOOTBALL:Football2014:FB-print_files:"
set FinishedFolder to sourceFolder & "2-Sides-FB.PDFs:"
tell application "Finder"
set FileList to entire contents of folder FinishedFolder as alias list
end tell
repeat with thisFile in FileList
set thisFile to thisFile as string
set productCode to characters 83 thru 94 of thisFile as string
set sourcePDF to sourceFolder & productCode & ".pdf"
tell application "Adobe Acrobat Pro"
open thisFile
open sourcePDF
replace pages document 1 over 1 from document 2 starting with 1 number of pages 1
close document 1 with saving
close document 1
end tell
end repeat |
agda-stdlib/src/Data/Vec/Recursive/Properties.agda | DreamLinuxer/popl21-artifact | 5 | 14951 | ------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties of n-ary products
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Vec.Recursive.Properties where
open import Level using (Level)
open import Data.Nat.Base hiding (_^_)
open import Data.Product
open import Data.Vec.Recursive
open import Data.Vec.Base using (Vec; _∷_)
open import Function.Inverse using (_↔_; inverse)
open import Relation.Binary.PropositionalEquality as P
open ≡-Reasoning
private
variable
a : Level
A : Set a
------------------------------------------------------------------------
-- Basic proofs
cons-head-tail-identity : ∀ n (as : A ^ suc n) → cons n (head n as) (tail n as) ≡ as
cons-head-tail-identity 0 as = P.refl
cons-head-tail-identity (suc n) as = P.refl
head-cons-identity : ∀ n a (as : A ^ n) → head n (cons n a as) ≡ a
head-cons-identity 0 a as = P.refl
head-cons-identity (suc n) a as = P.refl
tail-cons-identity : ∀ n a (as : A ^ n) → tail n (cons n a as) ≡ as
tail-cons-identity 0 a as = P.refl
tail-cons-identity (suc n) a as = P.refl
append-cons-commute : ∀ m n a (xs : A ^ m) ys →
append (suc m) n (cons m a xs) ys ≡ cons (m + n) a (append m n xs ys)
append-cons-commute 0 n a xs ys = P.refl
append-cons-commute (suc m) n a xs ys = P.refl
append-splitAt-identity : ∀ m n (as : A ^ (m + n)) → uncurry (append m n) (splitAt m n as) ≡ as
append-splitAt-identity 0 n as = P.refl
append-splitAt-identity (suc m) n as = begin
let x = head (m + n) as in
let (xs , ys) = splitAt m n (tail (m + n) as) in
append (suc m) n (cons m (head (m + n) as) xs) ys
≡⟨ append-cons-commute m n x xs ys ⟩
cons (m + n) x (append m n xs ys)
≡⟨ P.cong (cons (m + n) x) (append-splitAt-identity m n (tail (m + n) as)) ⟩
cons (m + n) x (tail (m + n) as)
≡⟨ cons-head-tail-identity (m + n) as ⟩
as
∎
------------------------------------------------------------------------
-- Conversion to and from Vec
fromVec∘toVec : ∀ n (xs : A ^ n) → fromVec (toVec n xs) ≡ xs
fromVec∘toVec 0 _ = P.refl
fromVec∘toVec (suc n) xs = begin
cons n (head n xs) (fromVec (toVec n (tail n xs)))
≡⟨ P.cong (cons n (head n xs)) (fromVec∘toVec n (tail n xs)) ⟩
cons n (head n xs) (tail n xs)
≡⟨ cons-head-tail-identity n xs ⟩
xs ∎
toVec∘fromVec : ∀ {n} (xs : Vec A n) → toVec n (fromVec xs) ≡ xs
toVec∘fromVec Vec.[] = P.refl
toVec∘fromVec {n = suc n} (x Vec.∷ xs) = begin
head n (cons n x (fromVec xs)) Vec.∷ toVec n (tail n (cons n x (fromVec xs)))
≡⟨ P.cong₂ (λ x xs → x Vec.∷ toVec n xs) hd-prf tl-prf ⟩
x Vec.∷ toVec n (fromVec xs)
≡⟨ P.cong (x Vec.∷_) (toVec∘fromVec xs) ⟩
x Vec.∷ xs
∎ where
hd-prf = head-cons-identity _ x (fromVec xs)
tl-prf = tail-cons-identity _ x (fromVec xs)
↔Vec : ∀ n → A ^ n ↔ Vec A n
↔Vec n = inverse (toVec n) fromVec (fromVec∘toVec n) toVec∘fromVec
|
programs/oeis/092/A092205.asm | neoneye/loda | 22 | 162807 | <filename>programs/oeis/092/A092205.asm
; A092205: Number of units in the imaginary quadratic field Q(sqrt(-n)).
; 4,2,6,4,2,2,2,2,4,2,2,6,2,2,2,4,2,2,2,2,2,2,2,2,4,2,6,2,2,2,2,2,2,2,2,4,2,2,2,2,2,2,2,2,2,2,2,6,4,2,2,2,2,2,2,2,2,2,2,2,2,2,2,4,2,2,2,2,2,2,2,2,2,2,6,2,2,2,2,2,4,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,4
seq $0,7913 ; Squarefree part of n: a(n) is the smallest positive number m such that n/m is a square.
sub $0,1
seq $0,40 ; The prime numbers.
seq $0,127648 ; Triangle read by rows: row n consists of n zeros followed by n+1.
seq $0,45 ; Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.
mul $0,2
add $0,2
|
src/day-16/adventofcode-day_16-main.adb | persan/advent-of-code-2020 | 0 | 17621 | with Ada.Text_IO; use Ada.Text_IO;
procedure Adventofcode.Day_16.Main is
begin
Put_Line ("Day-16");
end Adventofcode.Day_16.Main;
|
oeis/125/A125234.asm | neoneye/loda-programs | 11 | 17072 | <reponame>neoneye/loda-programs
; A125234: Triangle T(n,k) read by rows: the k-th column contains the k-fold iterated partial sum of A000566.
; Submitted by <NAME>
; 1,7,1,18,8,1,34,26,9,1,55,60,35,10,1,81,115,95,45,11,1,112,196,210,140,56,12,1,148,308,406,350,196,68,13,1,189,456,714,756,546,264,81,14,1,235,645,1170,1470,1302,810,345,95,15,1,286,880,1815,2640,2772,2112,1155,440
mov $1,1
lpb $0
add $2,1
sub $0,$2
add $1,1
lpe
add $0,2
bin $1,$0
mul $1,4
add $2,2
bin $2,$0
add $2,$1
mov $0,$2
|
programs/oeis/135/A135640.asm | neoneye/loda | 22 | 164780 | ; A135640: Powers of 839.
; 1,839,703921,590589719,495504774241,415728505588199,348796216188498961,292640025382150628279,245524981295624377126081,205995459307028852408781959,172830190358597207170968063601,145004529710863056816442205361239,121658800427414104668995010298079521
mov $1,839
pow $1,$0
mov $0,$1
|
programs/oeis/048/A048770.asm | karttu/loda | 0 | 26361 | <gh_stars>0
; A048770: Partial sums of A048694.
; 1,8,23,60,149,364,883,2136,5161,12464,30095,72660,175421,423508,1022443,2468400,5959249,14386904,34733063,83853036,202439141,488731324,1179901795,2848534920,6876971641,16602478208,40081928063
mov $1,1
mov $2,8
lpb $0,1
sub $0,1
mov $3,$1
mov $1,$2
mul $2,2
add $2,5
add $3,1
add $2,$3
lpe
|
oeis/027/A027831.asm | neoneye/loda-programs | 11 | 85744 | <gh_stars>10-100
; A027831: Expansion of 1/(1 - 4*x + 2*x^2 + 4*x^3 - 2*x^4).
; Submitted by <NAME>
; 1,4,14,44,134,400,1184,3488,10252,30096,88296,258960,759368,2226560,6528256,19140352,56117392,164528960,482376160,1414257856,4146398048,12156629760,35641443840,104495439360,306365146816,898217192704,2633439607424,7720854335744,22636399650944,66366565888000,194576926121984,570470682779648,1672535414624512,4903625720226816,14376703172783616,42150360957742080,123578605433742848,362314138568806400,1062251305922338816,3114363246732255232,9130851031676603392,26770300686690160640,78486550308323092480
add $0,2
lpb $0
sub $0,1
add $1,$3
add $1,1
sub $3,$4
mov $2,$3
mul $5,2
add $5,$4
mov $3,$5
add $4,$1
add $5,$2
lpe
add $5,$3
mov $0,$5
|
Verilog/P7/test/P7测试集/其它异常.asm | JJLeo/BUAA-CO-2020 | 9 | 21785 | <gh_stars>1-10
.text
li $28, 0
li $29, 0
lw $1, 1($0)
lh $1, 1($0)
lhu $1, 1($0)
lh $1, 0x7f00($0)
lhu $1, 0x7f04($0)
lb $1, 0x7f08($0)
lbu $1, 0x7f10($0)
lb $1, 0x7f14($0)
lb $1, 0x7f18($0)
li $2, 0x7fffffff
lw $1, 1($2)
lh $1, 1($2)
lhu $1, 1($2)
lb $1, 1($2)
lbu $1, 1($2)
lw $1, 0x3000($0)
lh $1, 0x4000($0)
lhu $1, 0x6000($0)
lb $1, 0x7f0c($0)
lbu $1, 0x7f1c($0)
sw $1, 1($0)
sh $1, 1($0)
sh $1, 0x7f00($0)
sb $1, 0x7f04($0)
sh $1, 0x7f08($0)
sb $1, 0x7f10($0)
sh $1, 0x7f14($0)
sb $1, 0x7f18($0)
li $2, 0x7fffffff
sw $1, 1($2)
sh $1, 1($2)
sb $1, 1($2)
sw $1, 0x7f08($0)
sh $1, 0x7f08($0)
sb $1, 0x7f08($0)
sw $1, 0x7f18($0)
sh $1, 0x7f18($0)
sb $1, 0x7f18($0)
sw $1, 0x3000($0)
sh $1, 0x4000($0)
sh $1, 0x6000($0)
sb $1, 0x7f0c($0)
sb $1, 0x7f1c($0)
msub $1, $2
li $1, 0x7fffffff
add $1, $1, $1
addi $1, $1, 1
li $1, 0x80000000
add $1, $1, $1
addi $1, $1, -1
sub $1, $1, $2
sub $1, $2, $1
end:j end
.ktext 0x4180
mfc0 $12, $12
mfc0 $13, $13
mfc0 $14, $14
addi $14, $14, 4
mtc0 $14, $14
eret
ori $1, $0, 0
|
kuka/krl.g4 | augustand/grammars-v4 | 0 | 5316 | <reponame>augustand/grammars-v4<filename>kuka/krl.g4<gh_stars>0
grammar krl;
/*
This file is the grammar for the KUKA Robot Language.
Copyright (C) 2010-2011 <NAME>
This grammar is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
Antlr4 port by <NAME>, 2016
*/
module
: (moduleData | moduleRoutines) EOF
;
moduleRoutines
: mainRoutine (subRoutine | NEWLINE)*
;
mainRoutine
: procedureDefinition
| functionDefinition
;
subRoutine
: procedureDefinition
| functionDefinition
;
procedureDefinition
: GLOBAL? DEF procedureName formalParameters NEWLINE routineBody END
;
procedureName
: IDENTIFIER
;
functionDefinition
: GLOBAL? DEFFCT type functionName formalParameters NEWLINE routineBody ENDFCT
;
functionName
: IDENTIFIER
;
moduleData
: DEFDAT moduleName PUBLIC? NEWLINE dataList ENDDAT NEWLINE*
;
moduleName
: IDENTIFIER
;
dataList
: (NEWLINE | forwardDeclaration NEWLINE | typeDeclaration NEWLINE | variableDeclarationInDataList NEWLINE | arrayInitialisation NEWLINE | importStatement NEWLINE)*
;
arrayInitialisation
: IDENTIFIER arrayVariableSuffix '=' unaryPlusMinuxExpression
;
typeDeclaration
: structureDefinition
| enumDefinition
;
structureDefinition
: GLOBAL? STRUC typeName type variableName variableListRest (',' type variableName variableListRest)*
;
enumDefinition
: GLOBAL? ENUM typeName enumValue (',' enumValue)*
;
enumValue
: IDENTIFIER
;
variableDeclaration
: DECL? (type variableName variableListRest | signalDeclaration)
;
signalDeclaration
: SIGNAL IDENTIFIER primary (TO primary)?
;
variableDeclarationInDataList
: DECL? GLOBAL? CONST? (type variableName (variableListRest | variableInitialisation) | signalDeclaration)
;
variableListRest
: (',' variableName)*
;
variableInitialisation
: '=' unaryPlusMinuxExpression
;
structLiteral
: '{' (typeName ':')? structElementList '}'
;
structElementList
: structElement (',' structElement)*
;
structElement
: variableName unaryPlusMinuxExpression
;
formalParameters
: '(' (parameter (',' parameter)*)? ')'
;
parameter
: variableName (parameterCallType)?
;
routineBody
: routineDataSection routineImplementationSection
;
routineDataSection
: (forwardDeclaration NEWLINE | variableDeclaration NEWLINE | (NEWLINE) NEWLINE | importStatement NEWLINE)*
;
forwardDeclaration
: EXT procedureName formalParametersWithType
| EXTFCT type functionName formalParametersWithType
;
formalParametersWithType
: '(' (parameterWithType (',' parameterWithType)*)? ')'
;
parameterWithType
: type (parameterCallType)?
;
parameterCallType
: ':' IDENTIFIER
;
importStatement
: IMPORT type variableName IS '/R1/' moduleName '..' variableName
;
variableName
: IDENTIFIER (arrayVariableSuffix)?
;
// expression in arrays are optional: a string literal can be assigned to a char array as a whole
arrayVariableSuffix
: '[' (expression (',' (expression (',' expression?)?)?)?)? ']'
;
routineImplementationSection
: statementList
;
statementList
: statement*
;
statement
: CONTINUE NEWLINE
| EXIT NEWLINE
| FOR IDENTIFIER '=' expression TO expression (IDENTIFIER expression)? NEWLINE statementList ENDFOR
| GOTO IDENTIFIER NEWLINE
| HALT NEWLINE
| IF expression THEN NEWLINE statementList (ELSE NEWLINE statementList)? ENDIF NEWLINE
| LOOP NEWLINE statementList ENDLOOP NEWLINE
| REPEAT NEWLINE statementList UNTIL expression NEWLINE
| SWITCH expression NEWLINE switchBlockStatementGroups ENDSWITCH NEWLINE
| WAIT FOR expression NEWLINE
| WAIT SEC expression NEWLINE
| WHILE expression NEWLINE statementList ENDWHILE NEWLINE
| RETURN (assignmentExpression)? NEWLINE
| BRAKE (IDENTIFIER)? NEWLINE
| assignmentExpression NEWLINE
| IDENTIFIER ':' NEWLINE
| NEWLINE
| GLOBAL? INTERRUPT DECL primary WHEN expression DO assignmentExpression NEWLINE
| INTERRUPT IDENTIFIER primary? NEWLINE
| (PTP | PTP_REL) geometricExpression (C_PTP (C_DIS | C_ORI | C_VEL)?)? NEWLINE
| LIN geometricExpression (C_DIS | C_ORI | C_VEL)? NEWLINE
| LIN_REL geometricExpression (C_DIS | C_ORI | C_VEL)? enumElement? NEWLINE
| (CIRC | CIRC_REL) geometricExpression ',' geometricExpression (',' IDENTIFIER primary)? (C_DIS | C_ORI | C_VEL)? NEWLINE
| TRIGGER WHEN (IDENTIFIER) '=' expression DELAY '=' expression DO assignmentExpression (PRIO '=' expression)? NEWLINE
| analogInputStatement NEWLINE
| analogOutputStatement NEWLINE
;
analogOutputStatement
: ANOUT (IDENTIFIER assignmentExpression (IDENTIFIER '=' literal)* | IDENTIFIER IDENTIFIER)
;
analogInputStatement
: ANIN (IDENTIFIER assignmentExpression | IDENTIFIER IDENTIFIER)
;
switchBlockStatementGroups
: NEWLINE* (caseLabel statementList) + (defaultLabel statementList)?
;
caseLabel
: CASE expression (',' expression)* NEWLINE
;
defaultLabel
: DEFAULT NEWLINE
;
expressionList
: assignmentExpression (',' assignmentExpression)*
;
assignmentExpression
: expression ('=' expression)*
;
expression
: conditionalOrExpression (relationalOp conditionalOrExpression)*
;
relationalOp
: '=='
| '<>'
| '<='
| '>='
| '<'
| '>'
;
conditionalOrExpression
: exclusiveOrExpression ((OR | B_OR) exclusiveOrExpression)*
;
exclusiveOrExpression
: conditionalAndExpression ((EXOR | B_EXOR) conditionalAndExpression)*
;
conditionalAndExpression
: additiveExpression ((AND | B_AND) additiveExpression)*
;
additiveExpression
: multiplicativeExpression (('+' | '-') multiplicativeExpression)*
;
multiplicativeExpression
: geometricExpression (('*' | '/') geometricExpression)*
;
geometricExpression
: unaryNotExpression (':' unaryNotExpression)*
;
unaryNotExpression
: NOT unaryNotExpression
| B_NOT unaryNotExpression
| unaryPlusMinuxExpression
;
unaryPlusMinuxExpression
: '+' unaryPlusMinuxExpression
| '-' unaryPlusMinuxExpression
| primary
;
primary
: parExpression
| variableName ('.' variableName)* (arguments)?
| literal
;
parExpression
: '(' assignmentExpression ')'
;
type
: primitiveType ('[' (INTLITERAL)? ']')?
| typeName ('[' (INTLITERAL)? ']')?
;
typeName
: IDENTIFIER
;
primitiveType
: BOOL
| CHAR
| INT
| REAL
;
arguments
: '(' (expressionList)? ')'
;
literal
: INTLITERAL
| FLOATLITERAL
| CHARLITERAL
| STRINGLITERAL
| structLiteral
| TRUE
| FALSE
| enumElement
;
enumElement
: '#' IDENTIFIER
;
AND
: A N D
;
ANIN
: A N I N
;
ANOUT
: A N O U T
;
B_AND
: B '_' A N D
;
B_NOT
: B '_' N O T
;
B_OR
: B '_' O R
;
B_EXOR
: B '_' E X O R
;
BOOL
: B O O L
;
BRAKE
: B R A K E
;
C_DIS
: C '_' D I S
;
C_ORI
: C '_' O R I
;
C_PTP
: C '_' P T P
;
C_VEL
: C '_' V E L
;
CASE
: C A S E
;
CAST_FROM
: C A S T '_' F R O M
;
CAST_TO
: C A S T '_' T O
;
CHAR
: C H A R
;
CIRC_REL
: C I R C '_' R E L
;
CIRC
: C I R C
;
CONST
: C O N S T
;
CONTINUE
: C O N T I N U E
;
DELAY
: D E L A Y
;
DECL
: D E C L
;
DEF
: D E F
;
DEFAULT
: D E F A U L T
;
DEFDAT
: D E F D A T
;
DEFFCT
: D E F F C T
;
DO
: D O
;
ELSE
: E L S E
;
END
: E N D
;
ENDDAT
: E N D D A T
;
ENDFCT
: E N D F C T
;
ENDFOR
: E N D F O R
;
ENDIF
: E N D I F
;
ENDLOOP
: E N D L O O P
;
ENDSWITCH
: E N D S W I T C H
;
ENDWHILE
: E N D W H I L E
;
ENUM
: E N U M
;
EXIT
: E X I T
;
EXT
: E X T
;
EXTFCT
: E X T F C T
;
FALSE
: F A L S E
;
FOR
: F O R
;
GLOBAL
: G L O B A L
;
GOTO
: G O T O
;
HALT
: H A L T
;
IF
: I F
;
IMPORT
: I M P O R T
;
INTERRUPT
: I N T E R R U P T
;
INT
: I N T
;
IS
: I S
;
LIN_REL
: L I N '_' R E L
;
LIN
: L I N
;
LOOP
: L O O P
;
MAXIMUM
: M A X I M U M
;
MINIMUM
: M I N I M U M
;
NOT
: N O T
;
OR
: O R
;
PRIO
: P R I O
;
PTP_REL
: P T P '_' R E L
;
PTP
: P T P
;
PUBLIC
: P U B L I C
;
REAL
: R E A L
;
REPEAT
: R E P E A T
;
RETURN
: R E T U R N
;
SEC
: S E C
;
SIGNAL
: S I G N A L
;
STRUC
: S T R U C
;
SWITCH
: S W I T C H
;
THEN
: T H E N
;
TO
: T O
;
TRIGGER
: T R I G G E R
;
TRUE
: T R U E
;
UNTIL
: U N T I L
;
WAIT
: W A I T
;
WHEN
: W H E N
;
WHILE
: W H I L E
;
EXOR
: E X O R
;
fragment A
: ('a' | 'A')
;
fragment B
: ('b' | 'B')
;
fragment C
: ('c' | 'C')
;
fragment D
: ('d' | 'D')
;
fragment E
: ('e' | 'E')
;
fragment F
: ('f' | 'F')
;
fragment G
: ('g' | 'G')
;
fragment H
: ('h' | 'H')
;
fragment I
: ('i' | 'I')
;
fragment J
: ('j' | 'J')
;
fragment K
: ('k' | 'K')
;
fragment L
: ('l' | 'L')
;
fragment M
: ('m' | 'M')
;
fragment N
: ('n' | 'N')
;
fragment O
: ('o' | 'O')
;
fragment P
: ('p' | 'P')
;
fragment Q
: ('q' | 'Q')
;
fragment R
: ('r' | 'R')
;
fragment S
: ('s' | 'S')
;
fragment T
: ('t' | 'T')
;
fragment U
: ('u' | 'U')
;
fragment V
: ('v' | 'V')
;
fragment W
: ('w' | 'W')
;
fragment X
: ('x' | 'X')
;
fragment Y
: ('y' | 'Y')
;
fragment Z
: ('z' | 'Z')
;
HEADERLINE
: '&' ~ ('\n' | '\r')* ('\r\n' | '\r' | '\n' | EOF) -> skip
;
WS
: (' ' | '\t' | '\u000C') -> skip
;
NEWLINE
: '\r'? '\n'
;
LINE_COMMENT
: ';' ~ ('\n' | '\r')* -> skip
;
CHARLITERAL
: '\'' (EscapeSequence | ~ ('\'' | '\\' | '\r' | '\n')) '\''
;
STRINGLITERAL
: '"' (EscapeSequence | ~ ('\\' | '"' | '\r' | '\n'))* '"'
;
fragment EscapeSequence
: '\\' ('b' | 't' | 'n' | 'f' | 'r' | '\"' | '\'' | '\\' | ('0' .. '3') ('0' .. '7') ('0' .. '7') | ('0' .. '7') ('0' .. '7') | ('0' .. '7'))
;
FLOATLITERAL
: ('0' .. '9') + '.' ('0' .. '9')* Exponent? | '.' ('0' .. '9') + Exponent? | ('0' .. '9') + Exponent
;
fragment Exponent
: E ('+' | '-')? ('0' .. '9') +
;
INTLITERAL
: ('0' .. '9') + | HexPrefix HexDigit + HexSuffix | BinPrefix BinDigit + BinSuffix
;
fragment HexPrefix
: '\'' H
;
fragment HexDigit
: ('0' .. '9' | 'a' .. 'f' | 'A' .. 'F')
;
fragment HexSuffix
: '\''
;
fragment BinPrefix
: '\'' B
;
fragment BinDigit
: ('0' | '1')
;
fragment BinSuffix
: '\''
;
IDENTIFIER
: IdentifierStart IdentifierPart*
;
fragment IdentifierStart
: 'a' .. 'z' | 'A' .. 'Z' | '_' | '$'
;
fragment IdentifierPart
: IdentifierStart | '0' .. '9'
;
|
main.asm | laerreal/flyshooter | 0 | 25327 | <reponame>laerreal/flyshooter
mov ax,13h
int 10h
mov di,0
push sky1
call skyInicialize
push sky2
call skyInicialize
push sky3
call skyInicialize
main:
;-----------------
push bx
in ax,60h
mov bx,[_a]
cmp byte [KEY_UP],1
jne _next1
sub [player+6],bx
jmp _next2
_next1:
cmp byte [KEY_DOWN],1
jne _next2
add [player+6],bx
_next2:
cmp byte [KEY_LEFT],1
jne _next3
sub [player+4],bx
jmp _next4
_next3:
cmp byte [KEY_RIGHT],1
jne _next4
add [player+4],bx
_next4:
;----shooting--------------
mov cx,[_shoot_timer]
inc word [_shoot_timer]
cmp cx,[_speed_shoot]
jl _end
cmp byte [KEY_FIRE1],1
jne _end
push objects_array
push objects
call playerShoot
mov word [_shoot_timer],0
;-----end_shooting------------
_end:
pop bx
;---------------------
call playerMovie
call clearScreen
inc word [_enemy_timer]
mov ax,[_enemy_rate]
cmp [_enemy_timer],ax
jb _next5
mov word [_enemy_timer],0
;---------------------------------------
push bx
mov ax,[objects_array]
inc ax
mov [objects_array],ax
shl ax,1
push ax
shr ax,1
mov dx,[OBJ_SIGNATURE_SIZE]
mul dl
add ax,objects
mov bx,ax
push ax
call rnd
xor dx,dx
mov cx,200
div cx
add dx,50
mov word [bx],dx
pop ax
mov word [bx+2],-19
mov word [bx+4],0
mov word [bx+6],1
mov word [bx+8],3
mov word [bx+10],model2
mov word [bx+12],1
push ax
call rnd
xor dx,dx
mov cx,40
div cx
mov word [bx+14],dx
pop ax
mov word [bx+16],40
mov word [bx+18],0
pop bx
add bx,objects_array
mov [bx],ax
pop bx
;-----------------------------------
_next5:
cmp word [player+8],0
je _end_all
push sky1
call skyRender
push sky2
call skyRender
push sky3
call skyRender
push objects_array
call deleteObject
push objects_array
call objectsManeger
push objects_array
call collisionTest
push 0
push 0
push interface_model_1
call modelPainter
push 7
push 1
push word [player+8]
push 40
call trace
push 300
push 1
push word [_score]
push 20h
call trace
;---------------------
main_next1:
xor ah,ah
int 1Ah
cmp dx,bx
je main_next1
mov bx,dx
call repaint
jmp main
_end_all:
call clearScreen
push sky3
call skyRender
push sky2
call skyRender
push sky1
call skyRender
push 150
push 100
push word model_t_LOST
call modelPainter
main_next2:
xor ah,ah
int 1Ah
cmp dx,bx
je main_next2
mov bx,dx
call repaint
cmp byte [KEY_ESC],1
je start
jmp _end_all
|
programs/oeis/199/A199848.asm | jmorken/loda | 1 | 27866 | <reponame>jmorken/loda
; A199848: Number of -n..n arrays x(0..3) of 4 elements with zero sum and no element more than one greater than the previous.
; 11,23,42,68,103,149,206,276,361,461,578,714,869,1045,1244,1466,1713,1987,2288,2618,2979,3371,3796,4256,4751,5283,5854,6464,7115,7809,8546,9328,10157,11033,11958,12934,13961,15041,16176,17366,18613,19919,21284
mov $20,$0
mov $22,$0
add $22,1
lpb $22
clr $0,20
mov $0,$20
sub $22,1
sub $0,$22
mov $17,$0
mov $19,$0
add $19,1
lpb $19
mov $0,$17
sub $19,1
sub $0,$19
mov $13,$0
mov $15,2
lpb $15
mov $0,$13
sub $15,1
add $0,$15
sub $0,1
mov $9,$0
mov $11,2
lpb $11
mov $0,$9
sub $11,1
add $0,$11
add $0,3
mov $5,$0
pow $5,3
div $5,3
sub $5,$0
mov $1,$5
mov $12,$11
lpb $12
mov $10,$1
sub $12,1
lpe
lpe
lpb $9
mov $9,0
sub $10,$1
lpe
mov $1,$10
mov $16,$15
lpb $16
mov $14,$1
sub $16,1
lpe
lpe
lpb $13
mov $13,0
sub $14,$1
lpe
mov $1,$14
div $1,3
mul $1,2
add $1,1
add $18,$1
lpe
add $21,$18
lpe
mov $1,$21
|
third_party/antlr_grammars_v4/morsecode/morsecode.g4 | mikhan808/rsyntaxtextarea-antlr4-extension | 4 | 6326 | <reponame>mikhan808/rsyntaxtextarea-antlr4-extension<filename>third_party/antlr_grammars_v4/morsecode/morsecode.g4<gh_stars>1-10
/*
BSD License
Copyright (c) 2017, <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 Tom Everett 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.
*/
grammar morsecode;
morsecode
: letter (SPACE letter)+
;
letter
: a
| b
| c
| d
| e
| f
| g
| h
| i
| j
| k
| l
| m
| n
| o
| p
| q
| r
| s
| t
| u
| v
| w
| x
| y
| z
| one
| two
| three
| four
| five
| six
| seven
| eight
| nine
| zero
;
a
: DOT DASH
;
b
: DASH DOT DOT DOT
;
c
: DASH DOT DASH DOT
;
d
: DASH DOT DOT
;
e
: DOT
;
f
: DOT DOT DASH DOT
;
g
: DASH DASH DOT
;
h
: DOT DOT DOT DOT
;
i
: DOT DOT
;
j
: DOT DASH DASH DASH
;
k
: DASH DOT DASH
;
l
: DOT DASH DOT DOT
;
m
: DASH DASH
;
n
: DASH DOT
;
o
: DASH DASH DASH
;
p
: DOT DASH DASH DOT
;
q
: DASH DASH DOT DASH
;
r
: DOT DASH DOT
;
s
: DOT DOT DOT
;
t
: DASH
;
u
: DOT DOT DASH
;
v
: DOT DOT DOT DASH
;
w
: DOT DASH DASH
;
x
: DASH DOT DOT DASH
;
y
: DASH DOT DASH DASH
;
z
: DASH DASH DOT DOT
;
one
: DOT DASH DASH DASH DASH
;
two
: DOT DOT DASH DASH DASH
;
three
: DOT DOT DOT DASH DASH
;
four
: DOT DOT DOT DOT DASH
;
five
: DOT DOT DOT DOT DOT
;
six
: DASH DOT DOT DOT DOT
;
seven
: DASH DASH DOT DOT DOT
;
eight
: DASH DASH DASH DOT DOT
;
nine
: DASH DASH DASH DASH DOT
;
zero
: DASH DASH DASH DASH DASH
;
DOT
: '.'
;
DASH
: '-'
;
SPACE
: ' '
;
WS
: [\t\r\n] -> skip
;
|
duel-address.asm | LeifBloomquist/ArtilleryDuel | 1 | 169042 | ; duel-address.asm
; Address book
ADDRESSBOOK
|
Task/Morse-code/Ada/morse-code-3.ada | LaudateCorpus1/RosettaCodeData | 1 | 851 | with Morse; use Morse;
procedure Morse_Tx is
begin
Morsebeep (Convert ("Science sans Conscience"));
end Morse_Tx;
|
oeis/087/A087192.asm | neoneye/loda-programs | 11 | 241012 | <filename>oeis/087/A087192.asm
; A087192: a(n) = ceiling(a(n-1)*4/3), with a(1) = 1.
; 1,2,3,4,6,8,11,15,20,27,36,48,64,86,115,154,206,275,367,490,654,872,1163,1551,2068,2758,3678,4904,6539,8719,11626,15502,20670,27560,36747,48996,65328,87104,116139,154852,206470,275294,367059,489412,652550,870067,1160090,1546787,2062383,2749844,3666459,4888612,6518150,8690867,11587823,15450431,20600575,27467434,36623246,48830995,65107994,86810659,115747546,154330062,205773416,274364555,365819407,487759210,650345614,867127486,1156169982,1541559976,2055413302,2740551070,3654068094,4872090792
lpb $0
sub $0,1
add $2,1
mov $1,$2
div $2,3
add $2,$1
lpe
add $1,1
mov $0,$1
|
include/spacelib2/spacelib2.asm | backwardspy/spacelib2 | 0 | 26344 | <filename>include/spacelib2/spacelib2.asm<gh_stars>0
.filenamespace sl
#import "lib/extensions.asm"
#import "lib/math.asm"
#import "lib/interrupts.asm"
#import "lib/bank.asm"
#import "lib/graphics.asm"
#import "lib/sprites.asm"
#import "lib/input.asm"
#import "lib/debug.asm"
|
src/assets/samples/sample6.asm | parraman/asm-simulator | 42 | 27011 | <filename>src/assets/samples/sample6.asm
; Example 5:
; The example defines two tasks:
; - A low-priority idle tasks that writes on the
; visual display in a loop
; - A high-priority user task that blocks until a
; key has been pressed and then writes the key
; into the textual display
JMP boot
JMP isr
JMP svc
bootStackTop EQU 0x19F ; Kernel booting SP
; This is the array of PCBs. It is a static array.
; The equivalent C code for the PCB structure would be
; something like this:
; typedef struct pcb {
; uint16_t PID; // Process ID
; uint8_t state; // state (1 -> RUNNABLE, 0 -> BLOCKED)
; uint8_t priority; // priority
; uint16_t initial_ip; // Initial IP
; uint16_t initial_usp; // Initial user stack
; uint16_t current_kernel_sp; // Current kernel stack
; } pcb_t;
; pcb_t pcb_vector[2];
pcb_vector:
pcb_1: ; PCB of the IDLE task
DW 1 ; [+0] pcb_vector[0].PID = 1
DB 1 ; [+2] pcb_vector[0].state = RUNNABLE
DB 0 ; [+3] pcb_vector[0].priority = 0
DW idle ; [+4] pcb_vector[0].initial_ip = idle
DW 0x27F ; [+6] pcb_vector[0].initial_usp = 0x27F
DW 0x1CD ; [+8] pcb_vector[0].current_kernel_sp = 0x1CD
pcb_2: ; PCB of User Task
DW 2 ; [+0] pcb_vector[1].PID = 2
DB 1 ; [+2] pcb_vector[1].state = RUNNABLE
DB 1 ; [+3] pcb_vector[1].priority = 1
DW user_task ; [+4] pcb_vector[1].initial_ip = user_task
DW 0x2DF ; [+6] pcb_vector[1].initial_usp = 0x2DF
DW 0x1FD ; [+8] pcb_vector[1].current_kernel_sp = 0x1FD
pcb_vector_end:
; pcb_t * current_task = NULL;
current_task: ; Pointer to the PCB of the current
DW 0 ; task
boot:
MOV SP, bootStackTop ; Set kernel booting SP = 0x19F
CALL task_init ; Initialize the tasks
MOV A, 1 ; Set bit 0 of IRQMASK
OUT 0 ; Unmask keypad IRQ
CALL schedule ; Call the first scheduling
CALL initial_dispatch ; Initial dispatch
HLT ; We are not supposed to come back
; task_init(): This method initializes the tasks so
; that, in their first context switch, their will
; start their execution from initial_switch()
task_init:
MOV A, pcb_vector ; For all pcbs
MOV B, pcb_vector_end ; in pcb_vector:
.loop_init:
MOV C, [A+8] ; Set start_switch()
MOV [C+1], initial_switch ; as the return address
ADD A, 10
CMP A, B
JNE .loop_init
RET
; pcb_t * schedule(): This method returns the PCB
; of the next task to be executed. In order to do so,
; it navigates through the pcb_vector array to
; return the first READY task with the highest
; priority
schedule:
MOV A, pcb_vector
MOV B, pcb_vector_end
MOV D, A
.loop_schedule:
ADD A, 10
CMP A, B
JE .end_schedule
; A little trick here: it gets the whole
; state + priority word. The number that
; will be compared shall be:
; number = (state << 8) + priority.
; The READY tasks will have a higher number,
; and then, from the READY tasks,
; the higher the priority, the higher the number.
; The only problem is that there MUST BE
; ALWAYS at least ONE TASK READY (but that's
; what the idle task is for, so... :)
MOV C, [A+2] ; If the number is bigger, then
CMP C, [D+2] ; the task will be selected
JBE .loop_schedule
MOV D, A
JMP .loop_schedule
.end_schedule:
MOV A, D ; It returns in A the pointer
RET ; to the next task
; dispatch(): this is the dispatch function,
; the function that will perform the context
; switch. The trick here is that, in order to
; change the tasks, it only needs to change the
; value of the SP. When the function returns
; it will do so at the return address located
; at the top of the stack. This address will belong
; to the function from which dispatch() was called
; the last time the task left the CPU.
dispatch:
CMP A, [current_task] ; It only switches
JE .ret_dispatch ; if next != current
MOV B, [current_task]
MOV [B+8], SP ; Saves current SP
MOV [current_task], A
MOV SP, [A+8] ; Recovers next SP
.ret_dispatch:
RET ; <- WHOOSHH!!
initial_dispatch:
MOV [current_task], A
MOV SP, [A+8]
RET
; initial_switch(): prepares the supervisor stack
; frame so that the user task can be successfuly
; loaded by changing the CPU to user mode
initial_switch:
MOV A, [current_task]
PUSH 0x0010 ; User Task SR: IRQMASK = 1
PUSH [A+6]
PUSH [A+4]
MOV A, 0
MOV B, 0
MOV C, 0
MOV D, 0
SRET
; pcb_t * blocked_task = NULL;
; Pointer to the blocked task if any
blocked_task:
DW 0
; Entry point for system calls. Only getchar() is
; defined
svc:
CLI ; Disable IRQs, enabled back when SRETing
CMP A, 0 ; A = syscall number
JNZ .not0 ; 0 -> getchar
CALL svc_getchar
.not0:
.return:
SRET ; Return to user space
; svc_getchar(): getchar system call. This
; function will check if there is already a key
; in the input buffer. If there is, it will return it.
; If there is no letter, then the task will be
; blocked until a key is pressed.
svc_getchar:
MOVB AL, [keypressed]
CMPB AL, 1 ; If keypressed ->
JE .ret_svc_getchar ; return the key right away
MOV A, [current_task] ; If not ->
MOVB [A+2], 0 ; current_task -> blocked
MOV [blocked_task], A
CALL schedule ; Schedule to select a
CALL dispatch ; ready task and dispatch
.ret_svc_getchar: ; it
MOV A, 0
MOVB AL, [keyvalue]
MOVB [keypressed], 0
RET
keypressed: ; 1 = key pressed
DB 0 ; 0 = No key pressed
keyvalue: ; The buffer with the
DB 0 ; key pressed in ASCII
; uint16_t need_sched = 0;
; This variable will be used to indicate
; if the CPU was in supervisor mode when the IRQ was
; triggered.
need_sched:
DW 0
isr:
PUSH A
PUSH B
PUSH C
PUSH D
; Here we check if the CPU was in supervisor
; mode when the IRQ was triggered. If it was
; in supervisor mode, then THERE IS NO NEED
; for scheduling, because the system call will
; reschedule when it blocks the task. If it was
; in user mode, then need_sched = 1, and
; schedule before leaving the ISR.
MOV [need_sched], 0
MOV A, [SP+13] ; Check if we were in sup. mode
AND A, 0x8000
JNZ .isr_continue
MOV [need_sched], 1
.isr_continue:
IN 6 ; Store the ASCII in the buffer
MOVB [keyvalue], AL
MOVB AL, 1
MOVB [keypressed], AL
MOV A, 1
OUT 2 ; Write to signal IRQEOI
MOV A, [blocked_task] ; If blocked_task != NULL
CMP A, 0 ; then blocked_task->state = READY
JE .isr_end
MOVB [A+2], 1
MOV [blocked_task], 0
MOV A, [need_sched] ; If need_sched == 1
CMP A, 1 ; then schedule, if not, IRET
JNE .isr_end
CALL schedule
CALL dispatch
.isr_end:
POP D
POP C
POP B
POP A
IRET
ORG 0x200 ; Following instructions
; will be assembled at 0x200
; The idle task will print into the visual display
; in a loop
idle:
MOV A, 0
MOV B, 0x300
MOV C, 0
.idle_loop:
MOVB [B], AL
INC B
INC C
CMP C, 10
JNE .idle_check_loop
MOV C, 0
ADDB AL, 10
.idle_check_loop:
CMP B, 0x400
JNE .idle_loop
MOV B, 0x300
JMP .idle_loop
ORG 0x280 ; Following instructions
; will be assembled at 0x280
; The user task will block until a key has been
; pressed
user_task:
CALL getchar
MOVB [0x2E0], AL
JMP user_task
getchar: ; User space wrapper
MOV A, 0 ; for getchar syscall
SVC ; Syscall #0
RET ; A -> syscall number
|
Lab_05/Lab_5.asm | dthornton22/CPE325_FA20_UAH | 1 | 87849 | <reponame>dthornton22/CPE325_FA20_UAH
;-------------------------------------------------------------------------------
; File: Lab_5.asm
; Description: This program calculates the first five powers of an integer b.
; This program uses software (SW) and hardware (HW) multiplication
; subroutines, and stores the result from each in an array.
; Input: Integer b in the range [-8, -1] U [2, 8] per assignment requirement
; Output: Two integer arrays containing the first five powers of b
; Author: <NAME> (<EMAIL>)
; Lab Section: 2
; Date: September 30, 2020
;-------------------------------------------------------------------------------
.cdecls C,LIST,"msp430.h" ; Include device header file
;-------------------------------------------------------------------------------
.def RESET ; Export program entry-point to
; make it known to linker.
.ref calc_power
;-------------------------------------------------------------------------------
; Memory allocation
.bss swarr, 10 ; 10 bytes for software array
.bss hwarr, 10 ; 10 bytes for hardware array
.data ; Declare variable in a data segment
b: .int 3 ; intput into the code
result: .int 1 ; result = 1 at start of code
;-------------------------------------------------------------------------------
.text ; Assemble into program memory.
.retain ; Override ELF conditional linking
; and retain current section.
.retainrefs ; And retain any sections that have
; references to current section.
;-------------------------------------------------------------------------------
RESET mov #__STACK_END, SP ; Initialize stackpointer
StopWDT mov #WDTPW|WDTHOLD, &WDTCTL ; Stop watchdog timer
;-------------------------------------------------------------------------------
; Main loop here
;-------------------------------------------------------------------------------
main:
push #swarr ; push the address of the software array to the stack
push #hwarr ; push the address of the hardware array to the stack
push result ; push result to the stack
mov b, R4 ; put b into R4
mov #5, R8 ; counter for number of powers
call #calc_power ; go to calc_power to do the operations
jmp $ ; infinite loop
lend:
nop
;-------------------------------------------------------------------------------
; Stack Pointer definition
;-------------------------------------------------------------------------------
.global __STACK_END
.sect .stack
;-------------------------------------------------------------------------------
; Interrupt Vectors
;-------------------------------------------------------------------------------
.sect ".reset" ; MSP430 RESET Vector
.short RESET
|
simd/i386/jcgryext-mmx.asm | 1camper/libjpeg-turbo | 522 | 162293 | ;
; jcgryext.asm - grayscale colorspace conversion (MMX)
;
; Copyright 2009 Pierre Ossman <<EMAIL>> for Cendio AB
; Copyright (C) 2011, 2016, <NAME>.
;
; Based on the x86 SIMD extension for IJG JPEG library
; Copyright (C) 1999-2006, MIYASAKA Masaru.
; For conditions of distribution and use, see copyright notice in jsimdext.inc
;
; This file should be assembled with NASM (Netwide Assembler),
; can *not* be assembled with Microsoft's MASM or any compatible
; assembler (including Borland's Turbo Assembler).
; NASM is available from http://nasm.sourceforge.net/ or
; http://sourceforge.net/project/showfiles.php?group_id=6208
;
; [TAB8]
%include "jcolsamp.inc"
; --------------------------------------------------------------------------
;
; Convert some rows of samples to the output colorspace.
;
; GLOBAL(void)
; jsimd_rgb_gray_convert_mmx(JDIMENSION img_width, JSAMPARRAY input_buf,
; JSAMPIMAGE output_buf, JDIMENSION output_row,
; int num_rows);
;
%define img_width(b) (b) + 8 ; JDIMENSION img_width
%define input_buf(b) (b) + 12 ; JSAMPARRAY input_buf
%define output_buf(b) (b) + 16 ; JSAMPIMAGE output_buf
%define output_row(b) (b) + 20 ; JDIMENSION output_row
%define num_rows(b) (b) + 24 ; int num_rows
%define original_ebp ebp + 0
%define wk(i) ebp - (WK_NUM - (i)) * SIZEOF_MMWORD
; mmword wk[WK_NUM]
%define WK_NUM 2
%define gotptr wk(0) - SIZEOF_POINTER ; void * gotptr
align 32
GLOBAL_FUNCTION(jsimd_rgb_gray_convert_mmx)
EXTN(jsimd_rgb_gray_convert_mmx):
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
and esp, byte (-SIZEOF_MMWORD) ; align to 64 bits
mov [esp], eax
mov ebp, esp ; ebp = aligned ebp
lea esp, [wk(0)]
pushpic eax ; make a room for GOT address
push ebx
; push ecx ; need not be preserved
; push edx ; need not be preserved
push esi
push edi
get_GOT ebx ; get GOT address
movpic POINTER [gotptr], ebx ; save GOT address
mov ecx, JDIMENSION [img_width(eax)] ; num_cols
test ecx, ecx
jz near .return
push ecx
mov esi, JSAMPIMAGE [output_buf(eax)]
mov ecx, JDIMENSION [output_row(eax)]
mov edi, JSAMPARRAY [esi+0*SIZEOF_JSAMPARRAY]
lea edi, [edi+ecx*SIZEOF_JSAMPROW]
pop ecx
mov esi, JSAMPARRAY [input_buf(eax)]
mov eax, INT [num_rows(eax)]
test eax, eax
jle near .return
alignx 16, 7
.rowloop:
pushpic eax
push edi
push esi
push ecx ; col
mov esi, JSAMPROW [esi] ; inptr
mov edi, JSAMPROW [edi] ; outptr0
movpic eax, POINTER [gotptr] ; load GOT address (eax)
cmp ecx, byte SIZEOF_MMWORD
jae short .columnloop
alignx 16, 7
%if RGB_PIXELSIZE == 3 ; ---------------
.column_ld1:
push eax
push edx
lea ecx, [ecx+ecx*2] ; imul ecx,RGB_PIXELSIZE
test cl, SIZEOF_BYTE
jz short .column_ld2
sub ecx, byte SIZEOF_BYTE
xor eax, eax
mov al, BYTE [esi+ecx]
.column_ld2:
test cl, SIZEOF_WORD
jz short .column_ld4
sub ecx, byte SIZEOF_WORD
xor edx, edx
mov dx, WORD [esi+ecx]
shl eax, WORD_BIT
or eax, edx
.column_ld4:
movd mmA, eax
pop edx
pop eax
test cl, SIZEOF_DWORD
jz short .column_ld8
sub ecx, byte SIZEOF_DWORD
movd mmG, DWORD [esi+ecx]
psllq mmA, DWORD_BIT
por mmA, mmG
.column_ld8:
test cl, SIZEOF_MMWORD
jz short .column_ld16
movq mmG, mmA
movq mmA, MMWORD [esi+0*SIZEOF_MMWORD]
mov ecx, SIZEOF_MMWORD
jmp short .rgb_gray_cnv
.column_ld16:
test cl, 2*SIZEOF_MMWORD
mov ecx, SIZEOF_MMWORD
jz short .rgb_gray_cnv
movq mmF, mmA
movq mmA, MMWORD [esi+0*SIZEOF_MMWORD]
movq mmG, MMWORD [esi+1*SIZEOF_MMWORD]
jmp short .rgb_gray_cnv
alignx 16, 7
.columnloop:
movq mmA, MMWORD [esi+0*SIZEOF_MMWORD]
movq mmG, MMWORD [esi+1*SIZEOF_MMWORD]
movq mmF, MMWORD [esi+2*SIZEOF_MMWORD]
.rgb_gray_cnv:
; mmA=(00 10 20 01 11 21 02 12)
; mmG=(22 03 13 23 04 14 24 05)
; mmF=(15 25 06 16 26 07 17 27)
movq mmD, mmA
psllq mmA, 4*BYTE_BIT ; mmA=(-- -- -- -- 00 10 20 01)
psrlq mmD, 4*BYTE_BIT ; mmD=(11 21 02 12 -- -- -- --)
punpckhbw mmA, mmG ; mmA=(00 04 10 14 20 24 01 05)
psllq mmG, 4*BYTE_BIT ; mmG=(-- -- -- -- 22 03 13 23)
punpcklbw mmD, mmF ; mmD=(11 15 21 25 02 06 12 16)
punpckhbw mmG, mmF ; mmG=(22 26 03 07 13 17 23 27)
movq mmE, mmA
psllq mmA, 4*BYTE_BIT ; mmA=(-- -- -- -- 00 04 10 14)
psrlq mmE, 4*BYTE_BIT ; mmE=(20 24 01 05 -- -- -- --)
punpckhbw mmA, mmD ; mmA=(00 02 04 06 10 12 14 16)
psllq mmD, 4*BYTE_BIT ; mmD=(-- -- -- -- 11 15 21 25)
punpcklbw mmE, mmG ; mmE=(20 22 24 26 01 03 05 07)
punpckhbw mmD, mmG ; mmD=(11 13 15 17 21 23 25 27)
pxor mmH, mmH
movq mmC, mmA
punpcklbw mmA, mmH ; mmA=(00 02 04 06)
punpckhbw mmC, mmH ; mmC=(10 12 14 16)
movq mmB, mmE
punpcklbw mmE, mmH ; mmE=(20 22 24 26)
punpckhbw mmB, mmH ; mmB=(01 03 05 07)
movq mmF, mmD
punpcklbw mmD, mmH ; mmD=(11 13 15 17)
punpckhbw mmF, mmH ; mmF=(21 23 25 27)
%else ; RGB_PIXELSIZE == 4 ; -----------
.column_ld1:
test cl, SIZEOF_MMWORD/8
jz short .column_ld2
sub ecx, byte SIZEOF_MMWORD/8
movd mmA, DWORD [esi+ecx*RGB_PIXELSIZE]
.column_ld2:
test cl, SIZEOF_MMWORD/4
jz short .column_ld4
sub ecx, byte SIZEOF_MMWORD/4
movq mmF, mmA
movq mmA, MMWORD [esi+ecx*RGB_PIXELSIZE]
.column_ld4:
test cl, SIZEOF_MMWORD/2
mov ecx, SIZEOF_MMWORD
jz short .rgb_gray_cnv
movq mmD, mmA
movq mmC, mmF
movq mmA, MMWORD [esi+0*SIZEOF_MMWORD]
movq mmF, MMWORD [esi+1*SIZEOF_MMWORD]
jmp short .rgb_gray_cnv
alignx 16, 7
.columnloop:
movq mmA, MMWORD [esi+0*SIZEOF_MMWORD]
movq mmF, MMWORD [esi+1*SIZEOF_MMWORD]
movq mmD, MMWORD [esi+2*SIZEOF_MMWORD]
movq mmC, MMWORD [esi+3*SIZEOF_MMWORD]
.rgb_gray_cnv:
; mmA=(00 10 20 30 01 11 21 31)
; mmF=(02 12 22 32 03 13 23 33)
; mmD=(04 14 24 34 05 15 25 35)
; mmC=(06 16 26 36 07 17 27 37)
movq mmB, mmA
punpcklbw mmA, mmF ; mmA=(00 02 10 12 20 22 30 32)
punpckhbw mmB, mmF ; mmB=(01 03 11 13 21 23 31 33)
movq mmG, mmD
punpcklbw mmD, mmC ; mmD=(04 06 14 16 24 26 34 36)
punpckhbw mmG, mmC ; mmG=(05 07 15 17 25 27 35 37)
movq mmE, mmA
punpcklwd mmA, mmD ; mmA=(00 02 04 06 10 12 14 16)
punpckhwd mmE, mmD ; mmE=(20 22 24 26 30 32 34 36)
movq mmH, mmB
punpcklwd mmB, mmG ; mmB=(01 03 05 07 11 13 15 17)
punpckhwd mmH, mmG ; mmH=(21 23 25 27 31 33 35 37)
pxor mmF, mmF
movq mmC, mmA
punpcklbw mmA, mmF ; mmA=(00 02 04 06)
punpckhbw mmC, mmF ; mmC=(10 12 14 16)
movq mmD, mmB
punpcklbw mmB, mmF ; mmB=(01 03 05 07)
punpckhbw mmD, mmF ; mmD=(11 13 15 17)
movq mmG, mmE
punpcklbw mmE, mmF ; mmE=(20 22 24 26)
punpckhbw mmG, mmF ; mmG=(30 32 34 36)
punpcklbw mmF, mmH
punpckhbw mmH, mmH
psrlw mmF, BYTE_BIT ; mmF=(21 23 25 27)
psrlw mmH, BYTE_BIT ; mmH=(31 33 35 37)
%endif ; RGB_PIXELSIZE ; ---------------
; mm0=(R0 R2 R4 R6)=RE, mm2=(G0 G2 G4 G6)=GE, mm4=(B0 B2 B4 B6)=BE
; mm1=(R1 R3 R5 R7)=RO, mm3=(G1 G3 G5 G7)=GO, mm5=(B1 B3 B5 B7)=BO
; (Original)
; Y = 0.29900 * R + 0.58700 * G + 0.11400 * B
;
; (This implementation)
; Y = 0.29900 * R + 0.33700 * G + 0.11400 * B + 0.25000 * G
movq mm6, mm1
punpcklwd mm1, mm3
punpckhwd mm6, mm3
pmaddwd mm1, [GOTOFF(eax,PW_F0299_F0337)] ; mm1=ROL*FIX(0.299)+GOL*FIX(0.337)
pmaddwd mm6, [GOTOFF(eax,PW_F0299_F0337)] ; mm6=ROH*FIX(0.299)+GOH*FIX(0.337)
movq mm7, mm6 ; mm7=ROH*FIX(0.299)+GOH*FIX(0.337)
movq mm6, mm0
punpcklwd mm0, mm2
punpckhwd mm6, mm2
pmaddwd mm0, [GOTOFF(eax,PW_F0299_F0337)] ; mm0=REL*FIX(0.299)+GEL*FIX(0.337)
pmaddwd mm6, [GOTOFF(eax,PW_F0299_F0337)] ; mm6=REH*FIX(0.299)+GEH*FIX(0.337)
movq MMWORD [wk(0)], mm0 ; wk(0)=REL*FIX(0.299)+GEL*FIX(0.337)
movq MMWORD [wk(1)], mm6 ; wk(1)=REH*FIX(0.299)+GEH*FIX(0.337)
movq mm0, mm5 ; mm0=BO
movq mm6, mm4 ; mm6=BE
movq mm4, mm0
punpcklwd mm0, mm3
punpckhwd mm4, mm3
pmaddwd mm0, [GOTOFF(eax,PW_F0114_F0250)] ; mm0=BOL*FIX(0.114)+GOL*FIX(0.250)
pmaddwd mm4, [GOTOFF(eax,PW_F0114_F0250)] ; mm4=BOH*FIX(0.114)+GOH*FIX(0.250)
movq mm3, [GOTOFF(eax,PD_ONEHALF)] ; mm3=[PD_ONEHALF]
paddd mm0, mm1
paddd mm4, mm7
paddd mm0, mm3
paddd mm4, mm3
psrld mm0, SCALEBITS ; mm0=YOL
psrld mm4, SCALEBITS ; mm4=YOH
packssdw mm0, mm4 ; mm0=YO
movq mm4, mm6
punpcklwd mm6, mm2
punpckhwd mm4, mm2
pmaddwd mm6, [GOTOFF(eax,PW_F0114_F0250)] ; mm6=BEL*FIX(0.114)+GEL*FIX(0.250)
pmaddwd mm4, [GOTOFF(eax,PW_F0114_F0250)] ; mm4=BEH*FIX(0.114)+GEH*FIX(0.250)
movq mm2, [GOTOFF(eax,PD_ONEHALF)] ; mm2=[PD_ONEHALF]
paddd mm6, MMWORD [wk(0)]
paddd mm4, MMWORD [wk(1)]
paddd mm6, mm2
paddd mm4, mm2
psrld mm6, SCALEBITS ; mm6=YEL
psrld mm4, SCALEBITS ; mm4=YEH
packssdw mm6, mm4 ; mm6=YE
psllw mm0, BYTE_BIT
por mm6, mm0 ; mm6=Y
movq MMWORD [edi], mm6 ; Save Y
sub ecx, byte SIZEOF_MMWORD
add esi, byte RGB_PIXELSIZE*SIZEOF_MMWORD ; inptr
add edi, byte SIZEOF_MMWORD ; outptr0
cmp ecx, byte SIZEOF_MMWORD
jae near .columnloop
test ecx, ecx
jnz near .column_ld1
pop ecx ; col
pop esi
pop edi
poppic eax
add esi, byte SIZEOF_JSAMPROW ; input_buf
add edi, byte SIZEOF_JSAMPROW
dec eax ; num_rows
jg near .rowloop
emms ; empty MMX state
.return:
pop edi
pop esi
; pop edx ; need not be preserved
; pop ecx ; need not be preserved
pop ebx
mov esp, ebp ; esp <- aligned ebp
pop esp ; esp <- original ebp
pop ebp
ret
; For some reason, the OS X linker does not honor the request to align the
; segment unless we do this.
align 32
|
arbitrary/extended_real-elementary_functions.adb | jscparker/math_packages | 30 | 21557 | <gh_stars>10-100
-----------------------------------------------------------------------
-- package body Extended_Real.Elementary_Functions, extended precision functions
-- Copyright (C) 2008-2018 <NAME>
--
-- Permission to use, copy, modify, and/or distribute this software for any
-- purpose with or without fee is hereby granted, provided that the above
-- copyright notice and this permission notice appear in all copies.
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
---------------------------------------------------------------------------
package body Extended_Real.Elementary_Functions is
Max_Available_Bits : constant e_Integer
:= Desired_No_Of_Bits_in_Radix * e_Real_Machine_Mantissa;
-- This equals: Bits_per_Mantissa = Bits_per_Digit * No_of_Digits_per_Mantissa
-- (e_Real_Machine_Mantissa = Mantissa'Length = No_of_Digits_per_Mantissa).
-- The following are frequently used global constants:
Radix : constant Real := e_Real_Machine_Radix;
Half_Digit : constant E_Digit := Make_E_Digit (0.5);
Two_Digit : constant E_Digit := Make_E_Digit (2.0);
Three_Digit : constant E_Digit := Make_E_Digit (3.0);
Four_Digit : constant E_Digit := Make_E_Digit (4.0);
Nine_Digit : constant E_Digit := Make_E_Digit (9.0);
Twelve_Digit : constant E_Digit := Make_E_Digit (12.0);
--One : constant e_Real := +1.0; -- in Extended_Real spec
--Zero : constant e_Real := +0.0;
Two : constant e_Real := +2.0;
Three : constant e_Real := +3.0;
Half : constant e_Real := +0.5;
Three_Quarters : constant e_Real := +(0.75);
Less_Than_Half_Pi : constant e_Real := +(3.14159265 / 2.0);
-- Global memory for important constants. They're initialized
-- on the first call to the functions that return them, and
-- there after are simply returned from memory:
-- Pi, Sqrt_2, etc
type Pi_mem is record
Val : e_Real; -- automatically initialized to Zero.
Initialized : Boolean := False;
end record;
Pi_Memory : Pi_Mem;
type Inverse_Pi_mem is record
Val : e_Real; -- automatically initialized to Zero.
Initialized : Boolean := False;
end record;
Inverse_Pi_Memory : Inverse_Pi_Mem;
type Quarter_Pi_mem is record
Val : e_Real; -- automatically initialized to Zero.
Initialized : Boolean := False;
end record;
Quarter_Pi_Memory : Quarter_Pi_Mem;
type Inverse_Sqrt_2_mem is record
Val : e_Real;
Initialized : Boolean := False;
end record;
Inverse_Sqrt_2_memory : Inverse_Sqrt_2_mem;
type Half_Inverse_Log_2_mem is record
Val : e_Real;
Initialized : Boolean := False;
end record;
Half_Inverse_Log_2_memory : Half_Inverse_Log_2_mem;
type Log_2_mem is record
Val : e_Real;
Initialized : Boolean := False;
end record;
Log_2_memory : Log_2_mem;
------------
-- Arcsin --
------------
-- The result of the Arcsin function is in the quadrant containing
-- the point (1.0, x), where x is the value of the parameter X. This
-- quadrant is I or IV; thus, the range of the Arcsin function is
-- approximately -Pi/2.0 to Pi/2.0 (-Cycle/4.0 to Cycle/4.0, if the
-- parameter Cycle is specified).
-- Argument_Error is raised by Arcsin when the absolute
-- value of the parameter X exceeds one.
--
-- Uses Newton's method: Y_k+1 = Y_k + (A - Sin(Y_k)) / Cos(Y_k)
-- to get Arcsin(A).
-- Requires call to Arcsin (Real) and assumes that this call gets
-- the first two radix digits correct: 48 bits usually. (It almost
-- always gets 53 bits correct.)
--
-- Arcsin(x) = x + x^3/6 + 3*x^5/40 ...
-- (so Arctan(x) = x if x < e_Real_Model_Epsilon)
function Arcsin (X : e_Real)
return e_Real
is
Y_0 : e_Real;
X_Abs : e_Real := Abs (X);
No_Correct_Bits : E_Integer;
Sign_Is_Negative : Boolean := False;
Scaling_Performed : Boolean := False;
begin
if Are_Equal (X_Abs, Positive_Infinity) then
raise E_Argument_Error;
end if;
if One < X_Abs then
raise E_Argument_Error;
end if;
if X_Abs < e_Real_Model_Epsilon then
return X; -- series solution: arcsin = x + x^3/6 + ...
end if;
Sign_Is_Negative := False;
if X < Zero then
Sign_Is_Negative := True;
end if;
if Are_Equal (X_Abs, One) then
Y_0 := Two_Digit * e_Quarter_Pi;
if Sign_Is_Negative then Y_0 := -Y_0; end if;
return Y_0;
end if;
-- STEP 2. We may have to scale the argument if it's near 1. Newton_Raphson
-- doesn't do well there. So we use identity:
--
-- arcsin(x) - arcsin(y) = arcsin(x*Sqrt(1-y*y) - y*Sqrt(1-x*x)),
--
-- so setting y = 1 (get the arccos(x) = Pi/2 - Arcsin(x)):
--
-- arcsin(x) = -arcsin(Sqrt(1-x*x)) + Pi/2.
--
-- Well, we can't use Sqrt(1-x*x) because there's too much error near
-- X = small. We can use Sqrt(1-X) * Sqrt(1+X) but don't want the 2 sqrts.
-- So! we want Arcsin (Sqrt(1-X) * Sqrt(1+X)) = Y, or
-- Sin(Y) = 2 * Sqrt((1-X)/2) * Sqrt((1+X)/2). Then Sin(Y) = 2*Sin(Z)Cos(Z)
-- where Z = Arcsin(Sqrt((1-X)/2)). So, Y = Arcsin (Sin(Z + Z)) = 2*Z.
-- The final answer is Arcsin(X) = Pi/2 - 2*Arcsin(Sqrt((1-X)/2)).
--
-- IMPORTANT: We can't scale if X_Abs <= 0.5 because we use this
-- routine with an argument of 0.5 to calculate Pi, and scaling
-- requires a knowledge of Pi.
Scaling_Performed := False;
if Three_Quarters < X_Abs then
X_Abs := Sqrt (Half - Half_Digit * X_Abs);
Scaling_Performed := True;
end if;
-- Need starting value for Newton's iteration of Arcsin (X_scaled).
-- Assume positive arg to improve likelihood that
-- external Arcsin fctn. does what we want.
Y_0 := Make_Extended (Arcsin (Make_Real (X_Abs)));
No_Correct_Bits := Real'Machine_Mantissa - 2;
loop
--Y_0 := Y_0 + (X_Abs - Sin(Y_0)) / Cos(Y_0);
Y_0 := Y_0 + Divide ((X_Abs - Sin(Y_0)) , Cos(Y_0));
-- Cos is never near 0.
No_Correct_Bits := No_Correct_Bits * 2;
exit when No_Correct_Bits >= Max_Available_Bits;
end loop;
if Scaling_Performed then
Y_0 := Two_Digit * (e_Quarter_Pi - Y_0);
end if;
if Sign_Is_Negative then
Y_0 := -Y_0;
end if;
return Y_0;
end Arcsin;
------------
-- Arccos --
------------
-- The result of the Arccos function is in the quadrant containing
-- the point (x, 1.0), where x is the value of the parameter X. This
-- quadrant is I or II; thus, the Arccos function ranges from 0.0 to
-- approximately Pi (Cycle/2.0, if the parameter Cycle is
-- specified).
--
-- Argument_Error is raised by Arccos when the absolute
-- value of the parameter X exceeds one.
--
-- In all cases use Arccos(X) = Pi/2 - Arcsin(X).
-- When Abs(X) < 0.5 we use Pi/2 - Arcsin(X). When
-- Abs(X) > 0.5 it's better to use the following formula for Arcsin:
-- Arcsin(X) = Pi/2 - 2*Arcsin(Sqrt((1-|X|)/2)). (X > 0.0)
-- Arcsin(X) = -Pi/2 + 2*Arcsin(Sqrt((1-|X|)/2)). (X < 0.0)
--
function Arccos (X : e_Real)
return e_Real
is
Result : e_Real;
X_Abs : constant e_Real := Abs (X);
begin
if X_Abs > One then
raise Constraint_Error;
end if;
if Are_Equal (X, Zero) then
return Two_Digit * e_Quarter_Pi;
end if;
if Are_Equal (X, One) then
return Zero;
end if;
if Are_Equal (X, -One) then
return e_Pi;
end if;
if Are_Equal (X, Positive_Infinity) then
raise E_Argument_Error;
end if;
if Are_Equal (X, Negative_Infinity) then
raise E_Argument_Error;
end if;
if X > Half then
Result := Two_Digit * Arcsin (Sqrt (Half - Half_Digit*X_Abs));
elsif X < -Half then
Result := Four_Digit*
(e_Quarter_Pi - Half_Digit*Arcsin (Sqrt (Half - Half_Digit*X_Abs)));
else
Result := (e_Quarter_Pi - Arcsin(X)) + e_Quarter_Pi;
end if;
-- e_Quarter_Pi is stored with more correct binary digits than
-- E_Half_Pi because it's slightly less than 1.0.
return Result;
end Arccos;
------------
-- Arctan --
------------
-- Newton's method avoids divisions:
--
-- Result := Result + Cos(Result) * (Cos(Result) * Arg - Sin(Result))
--
-- Arctan(x) = Pi/2 - Arctan(1/x)
-- Arctan(x) = -Pi/2 + Arctan(1/x) (x<0)
--
-- Arctan(x) = x - x^3/3 + x^5/5 - x^7/7 ...
-- (so Arctan(x) = x if x < e_Real_Model_Epsilon)
--
-- Arctan (X) = Arcsin(X / Sqrt(1 + X**2)).
--
-- Not really Ada95-ish for Arctan.
--
function Arctan
(X : e_Real)
return e_Real
is
Y_0, Arg, Cos_Y_0, Sin_Y_0 : e_Real;
X_Abs : constant e_Real := Abs (X);
X_real : Real;
Sign_Is_Negative : Boolean := False;
Argument_Reduced : Boolean := False;
No_Correct_Bits : E_Integer;
begin
if X_Abs < e_Real_Model_Epsilon then
return X; -- series solution: arctan = x - x^3/3 + ...
end if;
Sign_Is_Negative := False;
if X < Zero then
Sign_Is_Negative := True;
end if;
-- returns Pi/2 at +/- inf. (Note Reciprocal returns 1/inf as Zero.)
-- inf is regarded as large finite number. Raising exceptions
-- in these cases may also be good idea. Which is right?
if Are_Equal (X_Abs, Positive_Infinity) then
Y_0 := Two_Digit * e_Quarter_Pi;
if Sign_Is_Negative then Y_0 := -Y_0; end if;
return Y_0;
end if;
-- function Make_Real underflows to 0.0 as desired for small X_Abs.
if X_abs < Two then
Argument_Reduced := False;
Arg := X_abs;
else
-- use: Arctan(x) = Pi/2 - Arctan(1/x)
Argument_Reduced := True;
Arg := Reciprocal (X_abs);
end if;
X_real := Make_Real (Arg);
Y_0 := Make_Extended (Arctan (X_real));
No_Correct_Bits := Real'Machine_Mantissa - 2;
loop
Sin_Y_0 := Sin (Y_0);
Cos_Y_0 := Cos (Y_0); -- bst accuracy.
--Cos_Y_0 := Sqrt (One - Sin_Y_0*Sin_Y_0); -- fstr, not too bad accuracy-wise.
Y_0 := Y_0 + (Arg*Cos_Y_0 - Sin_Y_0) * Cos_Y_0;
No_Correct_Bits := No_Correct_Bits * 2;
exit when No_Correct_Bits >= Max_Available_Bits;
end loop;
if Argument_Reduced then
Y_0 := Two_Digit * (e_Quarter_Pi - Half_Digit*Y_0);
end if;
-- Lose a whole guard digit of precision when we double e_Quarter_Pi.
-- (It becomes slightly > 1, pushes a digit off the end of the mantissa.)
-- So do the subtraction 1st.
if Sign_Is_Negative then
Y_0 := -Y_0;
end if;
return Y_0;
end Arctan;
---------
-- Log --
---------
-- Uses Newton's method: Y_k+1 = Y_k + (A - Exp(Y_k)) / Exp(Y_k)
-- to get Log(A) = Natural Log, the inverse of Exp.
-- Requires call to Log (Real) and assumes that this call gets
-- the first two radix digits correct: 48 bits usually. (It almost
-- always gets 53 bits correct.) Argument reduction due to Brent:
-- 1st step is to get a rough approximate value of Log(X), called
-- Log_X_approx. Then get Y = Log(X/exp(Log_X_approx)).
-- The final answer is Log(X) = Y + Log_X_approx. (Disabled at present.)
-- This gets Y very near 0, which greatly speeds up subsequent
-- calls to Exp in the Newton iteration above. Actually,
-- the scaling business is commented out below. If you uncomment it,
-- the routine runs 60% faster, in some tests, but is less accurate.
-- We'll err on the side of accuracy and use an unscaled X. But
-- if you use extended floating point with 2 guard digits, it would
-- be sensible to use the scaled X, because the loss in accuracy is
-- negligable compared to the extra precision of another guard digit.
-- Test for X = One: must return Zero.
--
-- The exception Constraint_Error is raised, signaling a pole of the
-- mathematical function (analogous to dividing by zero), in the following
-- cases, provided that Float_Type'Machine_Overflows is True:
-- by the Log, Cot, and Coth functions, when the value of the
-- parameter X is zero;
function Log (X : e_Real)
return e_Real
is
Result, X_scaled, Y_0 : e_Real;
X_Exp : E_Integer;
No_Correct_Bits : E_Integer;
Log_X_approx_real : Real;
begin
if X < Zero then
raise E_Argument_Error;
end if;
if Are_Equal (X, Zero) then
raise Constraint_Error;
end if;
if Are_Equal (X, Positive_Infinity) then
raise E_Argument_Error;
end if;
if Are_Equal (X, Negative_Infinity) then
raise E_Argument_Error;
end if;
if Are_Equal (X, One) then
return Zero;
end if;
-- STEP 1. First argument reduction step. Get Log_X_approx_real using
-- a call to log(real). If X=0 or inf, then X_scaled=0..get exception.
X_Exp := Exponent (X);
X_scaled := Fraction (X); -- not zero or infinity.
Log_X_approx_real := Log (Make_Real(X_scaled)) + Log (Radix) * Real (X_Exp);
X_scaled := X;
-- Log_X_approx := Make_Extended (Log_X_approx_real);
-- X_scaled := X / Exp (Log_X_approx);
-- The above Scaling is the fastest, since then Exp does no scaling.
-- It is clearly less accurate, tho' tolerably so, especially if you
-- use two guard digits instead of 1. We use the unscaled X here,
-- because it (for example) returns a value of Log(2.0)
-- with an error that is about 50 times smaller than the above.
-- STEP 2. Need starting value for Newton's iteration of Log (X_scaled).
--Y_0 := Make_Extended (Log (Make_Real (X_scaled))); -- slightly > Zero
Y_0 := Make_Extended (Log_X_approx_real);
-- STEP 3. Start the iteration. Calculate the number of iterations
-- required as follows. num correct digits doubles each iteration.
-- 1st iteration gives 4 digits, etc. Each step set desired precision
-- to one digit more than that we expect from the Iteration.
No_Correct_Bits := Real'Machine_Mantissa - 2;
loop
Y_0 := Y_0 + (X_scaled * Exp(-Y_0) - One);
No_Correct_Bits := No_Correct_Bits * 2;
exit when No_Correct_Bits >= Max_Available_Bits;
end loop;
--Result := Y_0 + Log_X_approx; -- for use with scaled version (Step 2)
Result := Y_0;
return Result;
end Log;
--------------------------
-- Log (arbitrary base) --
--------------------------
-- The exception E_Argument_Error is raised, signaling a parameter
-- value outside the domain of the corresponding mathematical function,
-- in the following cases:
-- by the Log function with specified base, when the value of the
-- parameter Base is zero, one, or negative;
--
-- The exception Constraint_Error is raised, signaling a pole of the
-- mathematical function (analogous to dividing by zero), in the following
-- cases, provided that Float_Type'Machine_Overflows is True:
-- by the Log, Cot, and Coth functions, when the value of the
-- parameter X is zero.
--
-- Struggling to remember: Z = Log(X, Base) implies X = Base**Z
-- or X = Exp (Log(Base)*Z) which implies Log(X) = Log(Base) * Z, so
-- Log(X, Base) = Z = Log(X) / Log(Base).
--
function Log (X : e_Real; Base : e_Real) return e_Real is
Result : e_Real;
begin
if Are_Equal (Base,Zero) then
raise E_Argument_Error;
end if;
if Base < Zero then
raise E_Argument_Error;
end if;
if Are_Equal (Base,One) then
raise E_Argument_Error;
end if;
if Are_Equal (Base,Two) then
Result := Two_Digit * (Log(X) * e_Half_Inverse_Log_2);
-- Divide by e_log_2. Multiply by 0.5/Log(2) not 1/log(2), because
-- 0.5/Log(2) is slightly less than 1, hence contains more correct
-- digits. (And multiplication is preferred for efficiency.)
else
Result := Log(X) / Log(Base);
end if;
return Result;
end Log;
----------
-- "**' --
----------
-- Say X**N = Exp (Log (X) * N).
--
-- Exponentiation by a zero exponent yields the value one.
-- Exponentiation by a unit exponent yields the value of the left
-- operand. Exponentiation of the value one yields the value one.
-- Exponentiation of the value zero yields the value zero.
-- The results of the Sqrt and Arccosh functions and that of the
-- exponentiation operator are nonnegative.
--
-- Argument_Error is raised by "**" operator, when the value of the left
-- operand is negative or when both operands have the value zero;
--
function "**" (Left : e_Real; Right : e_Real) return e_Real is
Result : e_Real;
begin
-- Errors:
if Left < Zero then
raise E_Argument_Error;
end if;
if Are_Equal (Left, Zero) and then Are_Equal (Right, Zero) then
raise E_Argument_Error;
end if;
-- Special Cases. We now know that they aren't both Zero:
if Are_Equal (Right, Zero) then -- Left is not Zero
return One;
end if;
if Are_Equal (Left, Zero) then -- Right is not Zero
return Zero;
end if;
if Are_Equal (Right, One) then
return Left;
end if;
if Are_Equal (Left, One) then -- Still OK if Right = Zero
return One;
end if;
-- Should we optimize for integer N?
Result := Exp (Log (Left) * Right);
return Result;
end "**";
---------
-- Exp --
---------
-- Sum Taylor series for Exp(X).
-- Actually, we sum series for Exp(X) - 1 - X, because scaling makes
-- X small, and Exp(X) - 1 - X has more correct digits for small X.
-- [get max arg size and test for it.]
--
function Exp
(X : e_Real)
return e_Real
is
Order : Real := 0.0;
Delta_Exponent : E_Integer := 0;
Next_Term, Sum : e_Real;
X_Scaled_2, X_scaled_1 : e_Real;
Total_Digits_To_Use : E_Integer;
N : Integer;
N_e_Real : e_Real;
J : constant Integer := 11;
Scale_Factor_2 : constant Integer := 2**J;
-- Must be power of 2 for function call to Make_E_Digit.
-- The optimal value increases with desired precision. But higher
-- order terms in the series are cheap, so it's not *too* important.
Inverse_Two_To_The_J : constant E_Digit
:= Make_E_Digit (1.0 / Real (Scale_Factor_2));
We_Flipped_The_Sign_Of_X_scaled : Boolean := False;
First_Stage_Scaling_Performed : Boolean := False;
Second_Stage_Scaling_Performed : Boolean := False;
begin
if Are_Equal (X, Zero) then
return One;
end if;
if Are_Equal (X, Positive_Infinity) then
raise E_Argument_Error;
end if;
if Are_Equal (X, Negative_Infinity) then
raise E_Argument_Error;
end if;
-- STEP 1. Reduce argument in 2 stages: 1st Remainder(X, Log(2)),
-- then divide by 2**J.
-- So X_Scaled = Remainder (X, Log_2), or approximately:
-- X_Scaled = X - Unbiased_Rounding (X / Log(2)) * Log(2) = X - N * Log(2)
-- Then Exp(X) = Exp(X_Scaled) * Exp(N*Log(2)) = Exp(X_Scaled) * 2**N.
--
-- Second stage of argument reduction: divide X_Scaled by 2**J:
-- Exp(X) = Exp(X_Scaled/2**J)**2**J * 2**N.
--
-- E_log_2 is calculated by recursively calling this routine, but
-- with an argument very near 0.0, so First stage scaling is not
-- performed. (It also calls with arg of approx. log(2) = 0.69, so
-- must not allow 1st stage scaling for args that small.)
N := 0;
X_Scaled_1 := X;
First_Stage_Scaling_Performed := False;
if Three_Quarters < Abs (X) then
N_e_Real := Unbiased_Rounding (Two_Digit * (X_Scaled_1 * E_Half_Inverse_Log_2));
X_Scaled_1 := Remainder (X_Scaled_1, E_Log_2);
-- Use X_Scaled_1 := X_Scaled_1 - N_e_Real * E_Log_2; ?
-- Not much faster. Somewhat less accurate. Seems OK for small args.
if Make_Extended (Real (Integer'Last)) < Abs (N_e_Real) then
raise E_Argument_Error with "Argument too large in Exp.";
end if;
N := Integer (Make_Real (N_e_Real));
First_Stage_Scaling_Performed := True;
end if;
-- STEP 1b. We want to get Exp() slightly less than one, to maximize
-- the precision of the calculation. So make sure arg is negative.
We_Flipped_The_Sign_Of_X_scaled := False;
if not (X_scaled_1 < Zero) then
We_Flipped_The_Sign_Of_X_scaled := True;
X_scaled_1 := -X_scaled_1;
end if;
-- STEP 2. 2nd stage of argument reduction. Divide X_scaled by 2**J.
-- Don't scale if arg is already small to avoid complications due
-- to underflow of arg to zero. Arg may already be 0. It's OK.
if Exponent (X_Scaled_1) >= -2 then -- it'll do, Zero OK here
X_Scaled_2 := Inverse_Two_To_The_J * X_Scaled_1;
Second_Stage_Scaling_Performed := True;
else
X_scaled_2 := X_scaled_1;
Second_Stage_Scaling_Performed := False;
end if;
-- STEP 3. Start the sum. Calculate Exp(X_Scaled) - (1 + X_Scaled),
-- because for small X_Scaled, this contains more correct digits than Exp.
-- Start summing the series at order 2 instead of order 0.
-- We have verified above that X_scaled /= Zero.
Order := 2.0;
Next_Term := Half_Digit * X_Scaled_2 * X_Scaled_2;
Sum := Next_Term;
loop
Order := Order + 1.0;
if Order = Radix then
raise E_Argument_Error with "Too many terms needed in Exp taylor sum.";
end if;
-- Use relative Exponents of Sum and Next_Term to check convergence
-- of the sum. Exponent doesn't work for args of 0, so check.
-- Abs (Next_Term) <= Abs (Sum), so we need only check Next_Term.
if Are_Equal (Next_Term, Zero) then exit; end if;
Delta_Exponent := Exponent (Sum) - Exponent (Next_Term);
Total_Digits_To_Use := e_Real_Machine_Mantissa - Delta_Exponent + 1;
exit when Total_Digits_To_Use <= 0;
Next_Term := (X_Scaled_2 * Next_Term) / Make_E_Digit (Order);
Sum := Sum + Next_Term;
-- Sum can overflow to infinity? Not with our scaled arguments.
end loop;
-- STEP 4. Undo effect of 2nd stage of argument scaling. Recall we
-- divided the arg by 2**J, and found Exp(X_Scaled/2**J). Now to get
-- Exp(X_Scaled), must take Exp(X_Scaled/2**J)**2**J, which means
-- repeated squaring of Exp(X_Scaled/2**J) (J times). It's more complicated
-- than that because we calculated G(X) = Exp(X) - 1 - X (since G contains
-- more correct digits than Exp, expecially for small X.) So we
-- use G(2X) = Exp(2X) - 1 - 2X = (G + (1 + X))*(G + (1 + X)) - 1 - 2X
-- = G*G + 2*G*(1+X) + X*X
-- G(2X) = (G(X)+X)**2 + 2G(X).
-- G(4X) = (G(2X)+2X)**2 + 2G(2X).
-- Repeat J times to unscale G. The following also returns X_scaled*2**J.
if Second_Stage_Scaling_Performed then
for I in 1..J loop
Sum := (Sum + X_scaled_2)**2 + Two_Digit * Sum;
X_Scaled_2 := Two_Digit * X_Scaled_2;
end loop;
end if;
-- DO the following whether or not Second_Stage or First_Stage
-- scaling was performed (because the series sum neglected the
-- the 1 and the X. If there were no extra guard digit for
-- subtraction ((X_scaled_1 + Sum) is negative) then it would be best
-- to use (0.5 + (Sum + Xscaled)) + 0.5. Following is OK though to
-- get a number slightly less than one with full precision.
-- Recover Exp = G(X) + 1 + X = Sum + 1 + X = (Sum + X_scaled) + 1:
Sum := (Sum + X_scaled_1) + One;
-- Second stage unscaling. We now have Y = Exp(-|X_scaled_1|), which is
-- slightly less than 1.0. Keep
-- in Y < 1.0 form as we unscale: might preserve more precision that
-- way, cause we lose much precision if invert a number that's slightly
-- less than one.
if First_Stage_Scaling_Performed then
if We_Flipped_The_Sign_Of_X_scaled then
Sum := Sum * Two**(-N);
else
Sum := Sum * Two**(N);
end if;
end if;
if We_Flipped_The_Sign_Of_X_scaled then
Sum := Reciprocal (Sum);
-- X_scaled was positive. We flipped its sign so must invert the result.
end if;
return Sum;
end Exp;
---------------------------
-- Sin (arbitrary cycle) --
---------------------------
-- The exception E_Argument_Error is raised, signaling a parameter
-- value outside the domain of the corresponding mathematical function,
-- in the following cases:
-- by any forward or inverse trigonometric function with specified
-- cycle, when the value of the parameter Cycle is zero or negative;
-- The results of the Sin, Cos, Tan, and Cot functions with
-- specified cycle are exact when the mathematical result is zero;
-- those of the first two are also exact when the mathematical
-- result is +/-1.0.
function Sin
(X : e_Real;
Cycle : e_Real)
return e_Real
is
Fraction_Of_Cycle, Result : e_Real;
begin
-- The input parameter X is units of Cycle. For example X = Cycle
-- is same as X = 2Pi, so could call Sin (2 * Pi * X / Cycle), but we
-- want to apply the remainder function here to directly meet certain
-- requirements on returning exact results.
-- Recall: Remainder = X - Round (X/Cycle) * Cycle = X - N * Cycle
-- which is in the range -Cycle/2 .. Cycle/2. The formula will be
--
-- Sin (X, Cycle) = Sin (2 * Pi * X / Cycle)
-- = Sin (2 * Pi * (X - N * Cycle) / Cycle)
-- = Sin (2 * Pi * Remainder(X,Cycle) / Cycle)
if Are_Equal (Cycle, Zero) then
raise E_Argument_Error;
end if;
if Cycle < Zero then
raise E_Argument_Error;
end if;
Fraction_Of_Cycle := Remainder (X, Cycle) / Cycle;
if Are_Equal (Fraction_Of_Cycle, Zero) then
return Zero;
end if;
if Are_Equal (Abs (Fraction_Of_Cycle), Half) then
return Zero;
end if;
if Are_Equal (Fraction_Of_Cycle, Make_Extended(0.25)) then
return One;
end if;
if Are_Equal (Fraction_Of_Cycle, Make_Extended(-0.25)) then
return -One;
end if;
Result := Sin (Make_E_Digit(8.0) * (e_Quarter_Pi * Fraction_Of_Cycle));
-- Pi/4 is used instead of Pi/2, because it contains more correct
-- binary digits.
return Result;
end Sin;
---------
-- Sin --
---------
-- Sum Taylor series for Sin (X).
--
-- Max argument is at present set by requirement:
-- Exponent(X) < Present_Precision-1
function Sin
(X : e_Real)
return e_Real
is
Half_Sqrt_Of_Radix : constant Real := 2.0**(Desired_No_Of_Bits_in_Radix/2-1);
Order : Real := 0.0;
Delta_Exponent : E_Integer := 0;
Next_Term, Sum : e_Real;
X_Scaled_1, X_Scaled_2, X_Scaled_2_Squared : e_Real;
Total_Digits_To_Use : E_Integer;
N_e_Real, Half_N : e_Real;
J : constant Integer := 8;
Three_To_The_J : constant E_Digit := Make_E_Digit (3.0**J);
Factorial_Part : E_Digit;
Sign_Of_Term_Is_Pos : Boolean := True;
Arg_Is_Negative : Boolean := False;
N_Is_Odd : Boolean := False;
First_Stage_Scaling_Performed : Boolean := False;
Second_Stage_Scaling_Performed : Boolean := False;
begin
if Are_Equal (X, Zero) then
return Zero;
end if;
if Are_Equal (X, Positive_Infinity) then
raise E_Argument_Error;
end if;
if Are_Equal (X, Negative_Infinity) then
raise E_Argument_Error;
end if;
Arg_Is_Negative := False;
if X < Zero then
Arg_Is_Negative := True;
end if;
if Exponent(X) >= e_Real_Machine_Mantissa-1 then
raise E_Argument_Error;
end if;
-- Can't figure out N below. N_e_Real has to be
-- integer valued: 0, 1, ... 2**(Radix*e_Real_Machine_Mantissa) - 1
-- This determines Max allowed Argument.
-- If Exponent(N_e_Real) is too large, then can't tell if N is even or odd.
-- STEP 1. First argument reduction: Get modulo Pi by Remainder(X, Pi).
-- Get X in range -Pi/2..Pi/2.
-- X_scaled_1 := X - N_e_Real * e_Pi;
if Less_Than_Half_Pi < Abs(X) then
X_scaled_1 := Remainder (Abs(X), e_Pi);
N_e_Real := Unbiased_Rounding ((Abs(X)-X_scaled_1) * e_Inverse_Pi);
First_Stage_Scaling_Performed := True;
else
X_Scaled_1 := Abs(X);
N_e_Real := Zero;
First_Stage_Scaling_Performed := False;
end if;
-- Need to know if N is even or odd. N is Positive.
-- If Exponent(N_e_Real) is too large, then we can't tell if N is even or
-- odd. So raise Arg error. This determines Max Arg.
N_Is_Odd := False;
if not Are_Equal (N_e_Real, Zero) then
Half_N := Half_Digit * N_e_Real;
if Truncation (Half_N) < Half_N then
N_Is_Odd := True;
end if;
end if;
-- STEP 2. Second stage of argument reduction. Divide by 3**5 = 243
-- to get Arg less than about 0.01?. Call this 3**J in what follows.
-- Later we recursively use J repetitions of the formula
-- Sin(3*Theta) = Sin(Theta)*(3 - 4*Sin(Theta)**2), to get Sin(Theta*3**J)
-- Cos(3*Theta) = -Cos(Theta)*(3 - 4*Cos(Theta)**2), to get Cos(Theta*3**J)
-- to get Sin (Original_Arg).
--
-- MUST avoid underflow to Zero in this step. So only if X_Scaled is big.
-- Actually, X_scaled = 0 may pass through, but it's OK to start out 0.
if Exponent (X_Scaled_1) >= -2 then -- it'll do
X_Scaled_2 := X_scaled_1 / Three_To_The_J;
Second_Stage_Scaling_Performed := True;
else
X_Scaled_2 := X_scaled_1;
Second_Stage_Scaling_Performed := False;
end if;
-- STEP 3. Start the sum. Terms are labeled Order = 1, 2, 3
-- but the series is X - X**3/3! + X**5/5! + ...+- X**(2*Order-1)/(2*Order-1)!.
-- Summed G(X) = Sin(X) - X, which contains more correct digits at
-- the end. We need these extra digits when we unscale the result.
X_Scaled_2_Squared := X_scaled_2 * X_Scaled_2;
Order := 2.0;
Sign_Of_Term_Is_Pos := False;
Next_Term := X_Scaled_2 * X_Scaled_2_Squared / Make_E_Digit (6.0);
Sum := -Next_Term;
-- Above we make the 1st term in G, and begin the sum.
loop
Sign_Of_Term_Is_Pos := not Sign_Of_Term_Is_Pos;
Order := Order + 1.0;
-- Can't make Factorial part if, roughly, 2*Order-1.0 > Radix-1,
-- Because max argument of Make_E_Digit is Radix-1.
if Order >= Radix / 2.0 then
raise E_Argument_Error with "Too many terms needed in Exp taylor sum.";
end if;
-- Use relative Eponents of Sum and Next_Term to check convergence
-- of the sum. Exponent doesn't work for args of 0, so check.
-- Abs (Next_Term) <= Abs (Sum), so we need only check Next_Term.
if Are_Equal (Next_Term, Zero) then exit; end if;
Delta_Exponent := Exponent (Sum) - Exponent (Next_Term);
Total_Digits_To_Use := e_Real_Machine_Mantissa - Delta_Exponent + 1;
exit when Total_Digits_To_Use <= 0;
if Order < Half_Sqrt_Of_Radix then
Factorial_Part := Make_E_Digit ((2.0*Order-1.0)*(2.0*Order-2.0));
Next_Term := (X_Scaled_2_Squared * Next_Term) / Factorial_Part;
else
Factorial_Part := Make_E_Digit ((2.0*Order-1.0));
Next_Term := (X_Scaled_2_Squared * Next_Term) / Factorial_Part;
Factorial_Part := Make_E_Digit ((2.0*Order-2.0));
Next_Term := Next_Term / Factorial_Part;
end if;
if Sign_Of_Term_Is_Pos then
Sum := Sum + Next_Term;
else
Sum := Sum - Next_Term;
end if;
end loop;
-- STEP 4. Scale the result iteratively. Recall we divided the arg by 3**J,
-- so we recursively use J repetitions of the formula
-- Sin(3*X) = Sin(X)*(3 - 4*Sin(X)**2), to get Sin(X*3**J).
-- Actually, we summed G(X) = Sin(X) - X. So the formula for G(X) is
-- G(3X) = S(3X) - 3X = S(X)*(3 - 4S(X)**2) - 3X,
-- = (G+X)*(3 - 4(G+X)**2) - 3X,
-- = 3G - 4(G+X)**3, (Cancel out the 3X),
-- G(3X) = 3G(X) - 4(G(X)+X)**3.
-- G(9X) = 3G(3X) - 4(G(3X)+3X)**3, etc.
-- Still requires only 2 (full) mults per loop, just like the original formula.
-- Notice below that we output X_scaled * 3**J, which is required next step.
if Second_Stage_Scaling_Performed then
for I in 1..J loop
Sum := Three_Digit * Sum - Four_Digit * (Sum + X_scaled_2)**3;
X_scaled_2 := Three_Digit * X_scaled_2;
end loop;
end if;
-- STEP 5. We have Sin(X - N * Pi). Want Sin(X). If N is odd, then
-- flip sign of Sum. Next, flip sign again if the
-- original argument is neg: Arg_Is_Negative = True.
-- Remember, we summed for Sum = G = Sin - X, whether or not scaling
-- was performed. (X is called X_scaled, no matter what.)
-- So we recover Sin = G + X
Sum := Sum + X_scaled_1;
if First_Stage_Scaling_Performed then
if N_Is_Odd then
Sum := -Sum;
end if;
end if;
if Arg_Is_Negative then
Sum := -Sum;
end if;
return Sum;
end Sin;
---------------------------
-- Cos (arbitrary cycle) --
---------------------------
-- The exception E_Argument_Error is raised, signaling a parameter
-- value outside the domain of the corresponding mathematical function,
-- in the following cases:
-- by any forward or inverse trigonometric function with specified
-- cycle, when the value of the parameter Cycle is zero or negative;
-- The results of the Sin, Cos, Tan, and Cot functions with
-- specified cycle are exact when the mathematical result is zero;
-- those of the first two are also exact when the mathematical
-- result is +/-1.0.
--
function Cos (X : e_Real; Cycle : e_Real) return e_Real is
Fraction_Of_Cycle, Result : e_Real;
begin
-- The input parameter X is units of Cycle. For example X = Cycle
-- is same as X = 2Pi, so could use Cos (2 * Pi * X / Cycle), but we
-- want to apply the remainder function here to directly meet certain
-- requirements on returning exact results.
-- Recall: Remainder = X - Round (X/Cycle) * Cycle = X - N * Cycle
-- which is in the range -Cycle/2 .. Cycle/2. The formula will be
--
-- Cos (X, Cycle) = Cos (2 * Pi * X / Cycle)
-- = Cos (2 * Pi * (X - N * Cycle) / Cycle)
-- = Cos (2 * Pi * Remainder(X,Cycle) / Cycle)
if Are_Equal (Cycle, Zero) then
raise E_Argument_Error;
end if;
if Cycle < Zero then
raise E_Argument_Error;
end if;
-- Now get twice the fraction of the cycle, and handle special cases:
Fraction_Of_Cycle := Remainder (X, Cycle) / Cycle;
if Are_Equal (Fraction_Of_Cycle, Zero) then
return One;
end if;
if Are_Equal (Abs (Fraction_Of_Cycle), Half) then
return -One;
end if;
if Are_Equal (Abs (Fraction_Of_Cycle), Make_Extended(0.25)) then
return Zero;
end if;
Result := Cos (Make_E_Digit(8.0) * (e_Quarter_Pi * Fraction_Of_Cycle));
-- Use Pi/4 becase it contains more correct binary digits than Pi.
return Result;
end Cos;
---------
-- Cos --
---------
-- Sum Taylor series for Cos (X). Actually sum series for G = Cos(X) - 1.
-- Reason is, G contains more correct digits than Cos, which is
-- required when we undo effects of argument reduction.
-- Max argument is at present
-- set by requirement: Exponent(X) < Present_Precision-1
--
function Cos
(X : e_Real)
return e_Real
is
Half_Sqrt_Of_Radix : constant Real := 2.0**(Desired_No_Of_Bits_in_Radix/2-1);
Order : Real := 0.0;
Delta_Exponent : E_Integer := 0;
Next_Term, Sum, Sum_2, Sum_3 : e_Real;
X_Scaled_1, X_Scaled_Squared : e_Real;
Total_Digits_To_Use : E_Integer;
N_e_Real, Half_N : e_Real;
J : constant Integer := 8;
Three_To_The_J : constant E_Digit := Make_E_Digit (3.0**J);
Factorial_Part : E_Digit;
Sign_Of_Term_Is_Pos : Boolean := True;
N_Is_Odd : Boolean := False;
First_Stage_Scaling_Performed : Boolean := False;
Second_Stage_Scaling_Performed : Boolean := False;
begin
if Are_Equal (X, Zero) then
return One;
end if;
if Are_Equal (X, Positive_Infinity) then
raise E_Argument_Error;
end if;
if Are_Equal (X, Negative_Infinity) then
raise E_Argument_Error;
end if;
if Exponent(X) >= e_Real_Machine_Mantissa-1 then
raise E_Argument_Error;
end if;
-- Can't figure out N below. N_e_Real has to be
-- integer valued: 0, 1, ... 2**(Radix*e_Real_Machine_Mantissa) - 1
-- This determines Max allowed Argument.
-- STEP 1. First stage argument reduction.
-- Take X modulo Pi by Remainder(X, Pi). Get X in range -Pi/2..Pi/2.
-- X_scaled_1 := X - N_e_Real * e_Pi;
if Less_Than_Half_Pi < Abs(X) then
X_scaled_1 := Remainder (Abs(X), e_Pi);
N_e_Real := Unbiased_Rounding ((Abs(X)-X_scaled_1) * e_Inverse_Pi);
First_Stage_Scaling_Performed := True;
else
X_Scaled_1 := Abs(X);
N_e_Real := Zero;
First_Stage_Scaling_Performed := False;
end if;
-- Need to know if N is even or odd. N is Positive.
N_Is_Odd := False;
if not Are_Equal (N_e_Real, Zero) then
Half_N := Half_Digit * N_e_Real;
if Truncation (Half_N) < Half_N then
N_Is_Odd := True;
end if;
end if;
-- STEP 1b. If X_Scaled is nearing Pi/2 then it's too big for Taylor's.
-- Must call Sin (Pi/2 - X_Scaled). IMPORTANT: only do this for
-- X_scaled > Pi/6, because Arcsin(X => 0.5) = Pi/6 is used to calculate
-- Pi, and would get infinite recursive calls when Arcsin calls Cos
-- which calls Sin, while Sin and Cos call e_Quarter_Pi, which
-- calls Arcsin. e_Quarter_Pi is used instead of the less accurate Pi/2.
if One < X_Scaled_1 then
Sum := Sin ((e_Quarter_Pi - X_Scaled_1) + e_Quarter_Pi);
if N_Is_Odd then
Sum := -Sum;
end if;
return Sum;
end if;
-- STEP 2. Second stage of argument reduction. Divide by 3**8 = 81*81
-- to get argument less than about .02. Call this 3**J in what follows.
-- Later we recursively use J repetitions of the formula
-- Sin(3*Theta) = Sin(Theta)*(3 - 4*Sin(Theta)**2), to get Sin(Theta*3**J)
-- Cos(3*Theta) = -Cos(Theta)*(3 - 4*Cos(Theta)**2), to get Cos(Theta*3**J).
--
-- It's OK if X_scaled is 0 at this point, but not if the following
-- forces it to underflow to 0. Therefore only scale large args:
if Exponent (X_Scaled_1) >= -2 then -- it'll do
X_Scaled_1 := X_scaled_1 / Three_To_The_J;
Second_Stage_Scaling_Performed := True;
else
Second_Stage_Scaling_Performed := False;
end if;
-- STEP 3. Start the sum. Terms are labeled Order = 0, 1, 2, 3
-- but the series is 1 - X**2/2! + X**4/4! + ...+- X**(2*Order)/(2*Order)!.
-- Below we actually calculate Cos(X) - 1.
-- Start summing the series at order 1 instead of order 0.
Order := 1.0;
X_Scaled_Squared := X_scaled_1 * X_Scaled_1;
Next_Term := Half_Digit * X_Scaled_Squared;
Sum := -Next_Term;
Sign_Of_Term_Is_Pos := False;
loop
Sign_Of_Term_Is_Pos := not Sign_Of_Term_Is_Pos;
Order := Order + 1.0;
-- Can't make Factorial part if, roughly, 2*Order > Radix-1.
if Order >= (Radix-1.0) / 2.0 then
raise E_Argument_Error with "Too many terms needed in Exp taylor sum.";
end if;
-- Use relative Eponents of Sum and Next_Term to check convergence
-- of the sum. Exponent doesn't work for args of 0, so check.
-- Abs (Next_Term) <= Abs (Sum), so we need only check Next_Term.
-- If Next_Term is 0, we are finished anyway.
if Are_Equal (Next_Term, Zero) then exit; end if;
Delta_Exponent := Exponent (Sum) - Exponent (Next_Term);
Total_Digits_To_Use := e_Real_Machine_Mantissa - Delta_Exponent + 1;
exit when Total_Digits_To_Use <= 0;
if Order < Half_Sqrt_Of_Radix then
Factorial_Part := Make_E_Digit ((2.0*Order)*(2.0*Order-1.0));
Next_Term := (X_Scaled_Squared * Next_Term) / Factorial_Part;
else -- Do it the slow way. (Should rarely happen.)
Factorial_Part := Make_E_Digit (2.0*Order);
Next_Term := (X_Scaled_Squared * Next_Term) / Factorial_Part;
Factorial_Part := Make_E_Digit (2.0*Order-1.0);
Next_Term := Next_Term / Factorial_Part;
end if;
if Sign_Of_Term_Is_Pos then
Sum := Sum + Next_Term;
else
Sum := Sum - Next_Term;
end if;
end loop;
-- STEP 4. Scale the result iteratively. Recall we got Cos(Arg/3**J). Now
-- we want Cos(Arg). So we use J repetitions of the formula
-- Cos(3*Theta) = -Cos(Theta)*(3 - 4*Cos(Theta)**2), to get Cos(Theta*3**J).
-- Recall we summed for Cos(X) - 1, because we retain more correct digits
-- this way for small X. (The 1 would have shifted correct digits off the
-- array.) So we actually have is Sum = G(X) = Cos(X) - 1. So the formula
-- for Cos(3X) is (1+G)*(4(G+1)**2 - 3) = (1+G)*(1 + 8G + 4G**2). Then
-- G(3X) = Cos(3X) - 1 = 9G + 12G*2 + 4G**3. Next, unscale G:
if Second_Stage_Scaling_Performed then
for I in 1..J loop
--Sum := Sum * (Four_Digit * Sum * Sum - Three);
Sum_2 := Sum*Sum;
Sum_3 := Sum*Sum_2;
Sum := Nine_Digit * Sum + Twelve_Digit * Sum_2 + Four_Digit * Sum_3;
end loop;
end if;
-- STEP 5. We have Cos(X - N * Pi). Want Cos(X). If N is odd, then
-- flip sign of Sum. First remember we summed for G = Cos - 1, whether or
-- not scaling was performed. Must recover Cos next:
Sum := Sum + One; -- Get Cos(X) = G(X) + 1 = Sum + 1.
if First_Stage_Scaling_Performed then
if N_Is_Odd then
Sum := -Sum;
end if;
end if;
return Sum;
end Cos;
-------------------------
-- Reciprocal_Nth_Root --
-------------------------
-- Uses Newton's method to get A**(-1/N):
-- Y_k+1 = Y_k + (1 - A * Y_k**N) * Y_k / N.
-- Requires call to log(A) and assumes that this call gets
-- the first two radix digits correct: 48 bits usually. (It almost
-- always gets more correct.)
-- REMEMBER, this calculates to the max possible precision;
-- Does not reflect dynamic precision floating point.
-- N must be less than Radix - 1, which is usually 2**24 - 1.
function Reciprocal_Nth_Root
(X : e_Real;
N : Positive)
return e_Real is
Exponent_Of_X, Scaled_Exp_Of_X, Exp_Mod_N : E_Integer;
Result, X_Fraction, Scaled_X_Fraction, Y_0 : e_Real;
Shift_Sign, Ratio : Real := 0.0;
Log_Of_Scaled_X_Fraction, Real_X_Fraction : Real := 0.0;
No_Correct_Bits : E_Integer;
E_Digit_N, Inverse_E_Digit_N : E_Digit; -- already initialized
Optimization_Is_Possible : Boolean := False;
begin
if Are_Equal (X, Zero) then
raise E_Argument_Error;
end if;
if Are_Equal (X, Positive_Infinity) then
raise E_Argument_Error;
end if;
if Are_Equal (X, Negative_Infinity) then
raise E_Argument_Error;
end if;
if Real(N) > (Radix-1.0) then
raise E_Argument_Error;
end if;
-- STEP 0b. An optimization. If N is a power of two, we can speed
-- up the calculation by multiplying by 1/N rather than dividing by
-- N in the newton iteration.
Optimization_Is_Possible := False;
for I in 0..Desired_No_Of_Bits_In_Radix-2 loop
if 2**I = N then
Optimization_Is_Possible := True;
end if;
end loop;
if Optimization_Is_Possible then
Inverse_E_Digit_N := Make_E_Digit (1.0 / Real(N));
else
E_Digit_N := Make_E_Digit (Real(N));
end if;
-- STEP 1. Argument reduction. Break X into Fraction and Exponent.
-- Choose to decrement Abs(Exponent) by (Exponent MOD N),
-- and multiply fraction by Radix ** (Exponent MOD N).
-- The reason is of course, we want to divide decremented Exponent by N,
-- so we want Scaled_Exp_Of_X to be an integral multiple of -N.
Exponent_Of_X := Exponent (X); -- What if X is 0, inf, etc???
X_Fraction := Fraction (X);
Exp_Mod_N := Abs (Exponent_Of_X) MOD E_Integer(N); -- N never < 1.
-- Make sure that Scaled_Exp_Of_X is in range of e_Real, and also
-- make sure that it is scaled to an integral multiple of N.
if Exponent_Of_X < 0 then
Scaled_Exp_Of_X := Exponent_Of_X + Exp_Mod_N;
Shift_Sign := +1.0;
else
Scaled_Exp_Of_X := Exponent_Of_X - Exp_Mod_N;
Shift_Sign := -1.0;
end if;
-- Scale the fraction to compensate for the above shift in the Exponent:
if Exponent_Of_X < 0 then
Scaled_X_Fraction := Scaling (X_Fraction, - Exp_Mod_N);
else
Scaled_X_Fraction := Scaling (X_Fraction, + Exp_Mod_N);
end if;
-- STEP 2. Get starting value for Newton's iteration.
-- Want Real number estimate of Scaled_X_Fraction**(-1/N).
-- Get the first 2 radix digits correct (48 bits usually), and call it Y_0.
-- Must worry about exponents too large for type Real in the value
-- Scaled_X_Fraction prior to the **(-1/N) operation, so we do it indirectly.
-- Arg ** (-1/N): use exp (log (Arg**(-1/N))) = exp ( (-1/N)*log (Arg) ).
-- Need estimate: [ X_Fraction * Radix**(-Shift_Sign * Exp_Mod_N) ]**(-1/N).
-- First want natural Log(X_Fraction * Radix**(-Shift_Sign * Exp_Mod_N))
-- which equals Log(X_Fraction) - Shift_Sign * Log(Radix) * Exp_Mod_N.
-- Next divide this quantity by -N, and take exp():
-- Exp (-Log (X_Fraction) / N + Shift_Sign * Log(Radix) * Exp_Mod_N / N).
-- This is the estimate we want, and because Exp_Mod_N / N is always
-- < 1.0, the arguments should be well within range of Log and Exp,
-- because Exp (Shift_Sign * Log(Radix) * Exp_Mod_N / N) is less than Radix.
Real_X_Fraction := Make_Real (X_Fraction);
Ratio := Real (Exp_Mod_N) / Real(N);
Log_Of_Scaled_X_Fraction
:= -Log (Real_X_Fraction) / Real(N) + Shift_Sign * Ratio * Log (Radix);
Y_0 := Make_Extended (Exp (Log_Of_Scaled_X_Fraction));
-- Starting val in Newton's iteration.
-- STEP 3. Start the iteration. Calculate the number of iterations
-- required as follows. num correct digits doubles each iteration.
-- 1st iteration gives 4 digits, etc. Each step set desired precision
-- to one digit more than that we expect from the Iteration.
--
-- It is important to remember that e_Real_Machine_Mantissa includes
-- the 1 or 2 guard digits. The last of these may have a lot of error in
-- the end, the first of these may have some error. That's why they're
-- there. Also remember that when Set_No_Of_Digits_To_Use is
-- called, the precision it sets includes the 2 guard digits, both
-- of which may be wrong, so we add 2 to the setting below, just
-- in case.
No_Correct_Bits := Real'Machine_Mantissa - 2;
loop
if Optimization_Is_Possible then -- multiply by inverse of N:
Y_0 := Y_0 + Inverse_E_Digit_N * ((One - Scaled_X_Fraction * Y_0**N) * Y_0);
else -- divide by N:
Y_0 := Y_0 + (One - Scaled_X_Fraction * Y_0**N) * Y_0 / E_Digit_N;
end if;
No_Correct_Bits := No_Correct_Bits * 2;
exit when No_Correct_Bits > Max_Available_Bits;
end loop;
Result := Scaling (Y_0, (-Scaled_Exp_Of_X) / E_Integer (N));
-- Product of Y_0 = Scaled_X_Fraction**(-1/N) with
-- Radix**(-Scaled_Exponent(X) / N) equals X**(-1/N).
return Result;
end Reciprocal_Nth_Root;
------------
-- Divide --
------------
-- Uses Newton's method: Y_k+1 = Y_k + (1 - A*Y_k) * Y_k to get Z / A.
-- Requires call to 1 / Make_Real(A).
function Divide (Z, X : e_Real)
return e_Real
is
Exponent_Of_X : E_Integer;
Result, X_Fraction, Y_0 : e_Real;
No_Correct_Bits : E_Integer;
begin
if Are_Equal (X, Zero) then
raise E_Argument_Error;
end if;
if Are_Equal (X, Positive_Infinity) then -- like underflow
return Zero;
end if;
if Are_Equal (X, Negative_Infinity) then -- like underflow
return Zero;
end if;
-- Argument reduction. Break X into Fraction and Exponent.
-- Iterate to get inverse of fraction. Negate to get inverse of Exp.
Exponent_Of_X := Exponent (X);
X_Fraction := Fraction (X);
-- Get the first 2 radix digits correct (48 bits usually). Remember that the
-- Newton's iteration here produces 1/(X_Fraction). The result will be
-- the product of the newton's iteration and Radix to the power Exp_Scale_Val.
Y_0 := Make_Extended (1.0 / Make_Real (X_Fraction));
-- Starting val in Newton's iteration.
No_Correct_Bits := Real'Machine_Mantissa - 2;
-- Iterate:
loop
--Y_0:= Y_0 *(Two_Digit + (-X_Fraction) * Y_0); -- faster, much less accurate
Mult (Y_0, (Two - X_Fraction * Y_0)); -- faster, much less accurate
No_Correct_Bits := No_Correct_Bits * 2;
exit when No_Correct_Bits >= Max_Available_Bits / 2 + 1;
-- final correction is outside the loop.
end loop;
Result := Z * Y_0; -- Z / X
Result := Result + (Z - X_Fraction * Result) * Y_0; --bst so far
-- Y_0 := Y_0 + (One - X_Fraction * Y_0) * Y_0;
-- The iteration for Y_0 is the final step for 1/X. Multiplied by Z to get Result.
Result := Scaling (Result, -Exponent_Of_X);
-- Product of 1/Fraction(X) with Radix**(-Exponent(X)) equals 1/X.
return Result;
end Divide;
----------------
-- Reciprocal --
----------------
-- Uses Newton's method: Y_k+1 = Y_k + (1 - A*Y_k) * Y_k to get 1 / A.
function Reciprocal (X : e_Real)
return e_Real
is
Exponent_Of_X : E_Integer;
Result, X_Fraction, Y_0 : e_Real;
No_Correct_Bits : E_Integer;
begin
if Are_Equal (X, Zero) then
raise E_Argument_Error;
end if;
if Are_Equal (X, Positive_Infinity) then -- like underflow
return Zero;
end if;
if Are_Equal (X, Negative_Infinity) then -- like underflow
return Zero;
end if;
-- Argument reduction. Break X into Fraction and Exponent.
-- Iterate to get inverse of fraction. Negate to get inverse of Exp.
Exponent_Of_X := Exponent (X);
X_Fraction := Fraction (X);
-- Newton's iteration here produces 1/(X_Fraction). Final result will be
-- the product of the newton's iteration and Radix to the power Exp_Scale_Val.
Y_0 := Make_Extended (1.0 / Make_Real (X_Fraction));
-- Starting val in Newton's iteration.
No_Correct_Bits := Real'Machine_Mantissa - 2;
-- Iterate:
loop
--Y_0:= Y_0 *(Two_Digit + (-X_Fraction) * Y_0); -- faster, much less accurate
Mult (Y_0, (Two - X_Fraction * Y_0)); -- faster, much less accurate
No_Correct_Bits := No_Correct_Bits * 2;
exit when No_Correct_Bits > Max_Available_Bits / 2 + 1;
-- final correction is below.
end loop;
Y_0 := Y_0 + (One - X_Fraction * Y_0) * Y_0; -- accurate final step.
Result := Scaling (Y_0, -Exponent_Of_X);
-- Product of 1/Fraction(X) with Radix**(-Exponent(X)) equals 1/X.
return Result;
end Reciprocal;
---------------------
-- Reciprocal_Sqrt --
---------------------
-- Uses Newton's method: Y_k+1 = Y_k + (1 - A*Y_k**2) * Y_k / 2
-- to get 1 / sqrt(A). Multiply by A to get desired result; then refine.
function Reciprocal_Sqrt (X : e_Real)
return e_Real
is
Result : e_Real;
X_scaled, Y_0 : e_Real;
Exp_Scale_Val : E_Integer;
No_Correct_Bits : E_Integer;
begin
if X < Zero then
raise E_Argument_Error;
end if;
if Are_Equal (X, Positive_Infinity) then
raise E_Argument_Error;
end if;
if Are_Equal (X, Negative_Infinity) then
raise E_Argument_Error;
end if;
if Are_Equal (X, Zero) then
raise E_Argument_Error;
end if;
-- Break X into Fraction and Exponent. If Exponent is
-- odd then add or subtract 1. (Increase X if X < 1, decrease otherwise.)
-- Only important thing is scale X
-- down to somewhere near 1, and to scale X by an even power of Radix.
-- We break X up because the Newton's method works better on X_scaled than
-- than on X in general. Also we use Sqrt(Make_Real(X_scaled)) to start
-- things off for Newton's method, so we want X_scaled in range of Sqrt(Real).
Exp_Scale_Val := Exponent (X); -- what if X is 0, inf, etc..???
-- Exp is odd. Make it even, but keep things in range of e_Real:
if Abs (Exp_Scale_Val) mod 2 /= 0 then
if Exp_Scale_Val < 0 then
Exp_Scale_Val := Exp_Scale_Val + 1;
else
Exp_Scale_Val := Exp_Scale_Val - 1;
end if;
end if;
X_scaled := Scaling (X, -Exp_Scale_Val);
-- Take Sqrt by dividing the even Exp_Scale_Val by 2, and by taking
-- the SQRT of X_scaled. Start the iteration off with a call to SQRT
-- in the standard library for type Real.
Exp_Scale_Val := Exp_Scale_Val / 2;
Y_0 := Make_Extended (Sqrt (1.0 / Make_Real (X_scaled)));
-- Starting val in Newton's iteration.
No_Correct_Bits := Real'Machine_Mantissa - 2;
loop
--Y_0:= Y_0 + Half_Digit * ((One - X_scaled * (Y_0 * Y_0)) * Y_0);
--Y_0:= Y_0*(Half_Digit * (Three - X_scaled * (Y_0 * Y_0))); --inaccurate
Mult (Y_0, Half_Digit * (Three - X_scaled * (Y_0 * Y_0)));
No_Correct_Bits := No_Correct_Bits * 2;
exit when No_Correct_Bits > Max_Available_Bits / 2 + 1;
-- final correction is below.
end loop;
-- both work:
--Y_0 := Y_0 + Half_Digit * ((One - X_scaled * (Y_0 * Y_0)) * Y_0);
Y_0 := Y_0 - Half_Digit * (X_scaled * (Y_0 * Y_0) - One) * Y_0;
Result := Scaling (Y_0, -Exp_Scale_Val);
return Result;
end Reciprocal_Sqrt;
----------
-- Sqrt --
----------
-- Uses Newton's method: Y_k+1 = Y_k + (1 - A*Y_k**2) * Y_k / 2
-- to get 1 / sqrt(A). Multiply by A to get desired result; then refine.
-- Requires call to Sqrt(Real) and assumes that this call gets
-- the first radix digit correct. (It almost
-- always gets 53 bits correct.)
function Sqrt (X : e_Real)
return e_Real
is
Result, X_scaled, Y_0 : e_Real;
Exp_Scale_Val : E_Integer;
No_Correct_Bits : E_Integer;
begin
if X < Zero then
raise E_Argument_Error;
end if;
if Are_Equal (X, Positive_Infinity) then
raise E_Argument_Error;
end if;
if Are_Equal (X, Negative_Infinity) then
raise E_Argument_Error;
end if;
if Are_Equal (X, Zero) then
return Zero;
end if;
--if Are_Equal (X, One) then -- Ada9X.
--return One;
--end if;
-- Break X into Fraction and Exponent. If Exponent is
-- odd then add or subtract 1. (Increase X if X < 1, decrease otherwise.)
-- Only important thing is scale X
-- down to somewhere near 1, and to scale X by an even power of Radix.
-- We break X up because the Newton's method works better on X_scaled than
-- than on X in general. Also we use Sqrt(Make_Real(X_scaled)) to start
-- things off for Newton's method, so we want X_scaled in range of Sqrt(Real).
Exp_Scale_Val := Exponent (X); -- what if X is 0, inf, etc..???
-- This Exp is powers of Radix = 2**30 or 2**29.
-- Exp is odd. Make it even, but keep things in range of e_Real:
if Abs (Exp_Scale_Val) mod 2 /= 0 then
if Exp_Scale_Val < 0 then
Exp_Scale_Val := Exp_Scale_Val + 1;
else
Exp_Scale_Val := Exp_Scale_Val - 1;
end if;
end if;
X_scaled := Scaling (X, -Exp_Scale_Val);
Exp_Scale_Val := Exp_Scale_Val / 2;
Y_0 := Make_Extended (Sqrt (1.0 / Make_Real (X_scaled)));
-- Starting val in Newton's iteration.
No_Correct_Bits := Real'Machine_Mantissa - 2;
loop
--Y_0:= Y_0 + Half_Digit * ((One - X_scaled * Y_0 * Y_0) * Y_0);
--Y_0:= Y_0*(Half_Digit * (Three - X_scaled * Y_0 * Y_0)); --inaccurate
Mult (Y_0, Half_Digit * (Three - X_scaled * Y_0 * Y_0));
No_Correct_Bits := No_Correct_Bits * 2;
exit when No_Correct_Bits > Max_Available_Bits / 2 + 1;
-- Have the final correction outside the loop.
end loop;
Result := Y_0 * X_scaled; -- now it's SQRT(X_scaled); Y_0 = 1/SQRT(X_scaled)
Result := Result + Half_Digit * (X_scaled - Result*Result) * Y_0; --important
Result := Scaling (Result, Exp_Scale_Val); -- equals SQRT(X).
return Result;
end Sqrt;
-------------
-- Make_Pi --
-------------
-- This is an important independent test of Arcsin (hence Sin and Arcos).
-- Once we verify that Arcsin (hence Sin) is correct, can test other
-- arguments with (eg) Sin (A + B) = etc.
-- Has much greater error than 4*Arcsin(1/Sqrt(2)).
-- Need Pi to full precision for the trigonometic functions.
-- Here is the Salamin-Brent algorithm.
-- A_0 = 1.0, B_0 = 1.0/Sqrt(2.0), and D_0 = Sqrt(2.0) - 0.5.
--
-- A_k = (A_{k-1} + B_{k-1}) / 2
-- B_k = Sqrt (A_{k-1} * B_{k-1})
-- D_k = D_{k-1} - 2**k * (A_k - B_k)**2
--
-- Then P_k = (A_k + B_k)**2 / D_k converges quadratically to
-- Pi. All steps must be done at full precision.
--
-- function Make_Pi return e_Real is
-- A_0, B_0, D_0 : e_Real;
-- A_1, B_1, D_1 : e_Real;
-- C, Result : e_Real;
-- Two_To_The_k : E_Digit;
-- Two_To_The_20 : constant E_Digit := Make_E_Digit (2.0**20);
-- We_Are_Finished : Boolean := False;
-- No_Of_Correct_Digits : E_Integer;
-- Old_Precision : constant E_Integer := Present_Precision;
-- begin
--
-- A_0 := One;
-- B_0 := E_Inverse_Sqrt_2;
-- D_0 := Two * E_Inverse_Sqrt_2 - Half;
-- -- this give Pi_0 = 3.1877, or error of about 1.47 %. This is smaller
-- -- 1 part in 64, so 6 bits correct. There follows (k=1) 12, (k=2) 24.
-- -- So requires two more iterations to get one digit, 3 to get 2
-- -- digits. Seems to work better than this estimate.
--
-- No_Of_Correct_Digits := 1;
--
-- -- The following loop should get us up to half a million digits. In
-- -- the unlikely case you need more, then another loop follows.
-- -- k in 1..7 gives you 33 Radix 2**24 digits.
--
-- for k in 1..20 loop
--
-- Two_To_The_k := Make_E_Digit (2.0**k);
--
-- A_1 := Half_Digit * (A_0 + B_0);
-- B_1 := Sqrt (A_0 * B_0);
-- C := (A_1 - B_1);
-- D_1 := D_0 - Two_To_The_k * (C * C);
--
-- if k >= 3 then
-- -- We did 3rd iteration to get 2 correct digits.
-- -- No_Correct.. was initialized to 1.
-- No_Of_Correct_Digits := No_Of_Correct_Digits * 2;
-- end if;
-- -- Should be OK overflow-wise here. Range of E_Integer is 4 times
-- -- the limit set by Max_Available_Precision.
--
-- if No_Of_Correct_Digits > e_Real_Machine_Mantissa then
-- We_Are_Finished := True;
-- exit;
-- end if;
--
-- A_0 := A_1; B_0 := B_1; D_0 := D_1;
--
--
-- end loop;
--
-- -- We want to optimize the calculation of D_1 above by multiplying
-- -- by an E_Digit on the left (Two_To_The_k) instead of an e_Real.
-- -- Stop doing this at Two_To_The_k = 2**20 to stay in range of E_Digit.
-- -- Below we finish up if necessary by multiplying twice..still much
-- -- more efficient than e_Real*e_Real.
--
-- if not We_Are_Finished then -- keep trying
-- for k in 21..40 loop
--
-- Two_To_The_k := Make_E_Digit (2.0**(k-20));
--
-- A_1 := Half_Digit * (A_0 + B_0);
-- B_1 := Sqrt (A_0 * B_0);
-- C := (A_1 - B_1);
-- D_1 := D_0 - Two_To_The_k * (Two_To_The_20 * (C * C));
--
-- No_Of_Correct_Digits := No_Of_Correct_Digits * 2;
-- exit when No_Of_Correct_Digits > e_Real_Machine_Mantissa;
--
-- A_0 := A_1; B_0 := B_1; D_0 := D_1;
--
-- end loop;
-- end if;
--
-- C := (A_1 + B_1);
-- Result := C * C / D_1;
--
-- Set_No_Of_Digits_To_Use (Old_Precision); -- Restore precision.
--
-- return Result;
--
-- end Make_Pi;
----------------
-- Make_Log_2 --
----------------
-- Important independent test of Log(X). Verify that Log(X) is correct
-- at X = 2, and use (eg) Log(XY) = Log(X) + Log(Y) to test other vals.
-- This is for testing other routines: Has greater error than Log(X).
-- Log_2, hopefully, for testing purposes.
-- A_0 = 1.0, B_0 = Two**(2-M);
--
-- A_k = (A_{k-1} + B_{k-1}) / 2
-- B_k = Sqrt (A_{k-1} * B_{k-1})
--
-- Then Log(2) = Pi / (2 * B_k * m) ???
--
-- Here M = N/2+1 where N = 29*e_Real_Machine_Mantissa = number of bits desired.
--
-- function Make_Log_2 return e_Real is
-- A_0, B_0 : e_Real;
-- A_1, B_1 : e_Real;
-- Result : e_Real;
-- We_Are_Finished : Boolean := False;
-- No_Of_Correct_Digits : E_Integer;
-- N : Integer := 24 * Integer(e_Real_Machine_Mantissa); -- Upper estimate.
-- M : Integer := N/2 + 24; -- Need only N/2 + 1
-- begin
--
-- A_0 := One;
-- B_0 := Two**(2-M); -- clean this up with the scaling ftcn.
--
-- No_Of_Correct_Digits := 1;
--
-- -- The following loop should get us up to half a million digits. In
-- -- the unlikely case you need more, then another loop follows.
--
-- for k in 1..16 loop -- I suspect far fewer than 20 iterations required.
--
-- A_1 := Half_Digit * (A_0 + B_0);
-- B_1 := Sqrt (A_0 * B_0);
--
-- A_0 := A_1; B_0 := B_1;
--
-- end loop;
--
-- Result := Half_Digit * e_Pi / (B_1 * Make_Extended(Real(M)));
--
-- Set_No_Of_Digits_To_Use (Old_Precision); -- Restore precision.
--
-- return Result;
--
-- end Make_Log_2;
----------
-- e_Pi --
----------
-- Returns Pi to Max Available Precision. Use Arcsin, cause it has
-- much lower error than Make_Pi.
-- Used for scaling trig functions, etc.
function e_Pi return e_Real is
begin
if not Pi_memory.Initialized then
--Pi_memory.Val := Make_Pi;
Pi_memory.Val := Four_Digit * e_Quarter_Pi;
-- Only works because arg is so small no scaling by E_pi is done.
Pi_memory.Initialized := True;
end if;
return Pi_memory.Val;
end e_Pi;
------------------
-- e_Inverse_Pi --
------------------
-- Returns Pi to Max Available Precision. Use Arcsin, cause it has
-- lower error than Make_Pi.
-- Used for scaling trig functions, etc.
function e_Inverse_Pi return e_Real is
begin
if not Inverse_Pi_memory.Initialized then
Inverse_Pi_memory.Val := (+0.25) / e_Quarter_Pi;
Inverse_Pi_memory.Initialized := True;
end if;
return Inverse_Pi_memory.Val;
end e_Inverse_Pi;
------------------
-- e_Quarter_Pi --
------------------
-- Returns Pi/4 to Max Available Precision.
-- Used for scaling trig functions, etc.
function e_Quarter_Pi return e_Real is
begin
if not Quarter_Pi_memory.Initialized then
Quarter_Pi_memory.Val := (+1.5) * Arcsin (Half);
Quarter_Pi_memory.Initialized := True;
end if;
return Quarter_Pi_memory.Val;
end e_Quarter_Pi;
----------------------
-- e_Inverse_Sqrt_2 --
----------------------
-- Returns 1/Sqrt(2.0) to Max Available Precision.
-- Used for making Pi.
function e_Inverse_Sqrt_2 return e_Real is
begin
if not Inverse_Sqrt_2_memory.Initialized then
Inverse_Sqrt_2_memory.Val := Reciprocal_Nth_Root (Two, 2);
Inverse_Sqrt_2_memory.Initialized := True;
end if;
return Inverse_Sqrt_2_memory.Val;
end e_Inverse_Sqrt_2;
--------------------------
-- e_Half_Inverse_Log_2 --
--------------------------
-- Returns Exp(1.0) to Max Available Precision.
-- Used for scaling arguments of Exp.
function e_Half_Inverse_Log_2 return e_Real is
begin
if not Half_Inverse_Log_2_memory.Initialized then
Half_Inverse_Log_2_memory.Val := Half / E_Log_2;
Half_Inverse_Log_2_memory.Initialized := True;
end if;
return Half_Inverse_Log_2_memory.Val;
end e_Half_Inverse_Log_2;
--------------
-- e_Log_2 --
--------------
-- Returns Log(2.0) to Max Available Precision.
-- Used for scaling Exp(X).
function e_Log_2 return e_Real is
begin
if not Log_2_memory.Initialized then
Log_2_memory.Val := Log (Two);
Log_2_memory.Initialized := True;
end if;
return Log_2_memory.Val;
end e_Log_2;
end Extended_Real.Elementary_Functions;
|
programs/oeis/078/A078654.asm | neoneye/loda | 22 | 163256 | <reponame>neoneye/loda
; A078654: a(n) = prime(k) where k = n-th prime congruent to 3 mod 4.
; 5,17,31,67,83,127,191,211,277,331,353,401,431,563,587,709,739,797,877,967,991,1063,1153,1217,1297,1409,1433,1499,1597,1669,1741,1847,2027,2063,2221,2341,2417,2477,2609,2647,2897,3001,3067,3109,3299,3319,3407,3469,3517,3559,3593,3761,3943,4091,4153,4273,4397,4463,4567,4663,4787,4801,4933,5107,5189,5441,5503,5623,5651,5701,6037,6229,6323,6353,6469,6661,6691,6863,6899,7057,7109,7193,7481,7607,7649,7753,7841,8101,8221,8287,8389,8527,8719,8747,8849,9041,9293,9403,9461,9619
seq $0,97538 ; Subtract 2 from primes == 3 (mod 4).
add $0,1
seq $0,40976 ; a(n) = prime(n) - 2.
add $0,2
|
examples/try_gc_controlled.adb | ytomino/boehmgc-ada | 3 | 6405 | <reponame>ytomino/boehmgc-ada
with Ada.Finalization;
with Ada.Text_IO;
with System.Address_Image;
with System.Storage_Elements;
with GC.Pools;
procedure try_gc_controlled is
package Dummies is
type Dummy is new Ada.Finalization.Controlled with null record;
overriding procedure Initialize (Object : in out Dummy);
overriding procedure Finalize (Object : in out Dummy);
end Dummies;
package body Dummies is
overriding procedure Initialize (Object : in out Dummy) is
begin
Ada.Text_IO.Put_Line (
"Initialize (" & System.Address_Image (Object'Address) & ")");
end Initialize;
overriding procedure Finalize (Object : in out Dummy) is
begin
Ada.Text_IO.Put_Line (
"Finalize (" & System.Address_Image (Object'Address) & ")");
end Finalize;
end Dummies;
type Dummy_Access is access Dummies.Dummy;
for Dummy_Access'Storage_Pool use GC.Pools.Controlled_Pool;
begin
loop
for I in 1 .. 1000 loop
declare
Gomi : constant Dummy_Access := new Dummies.Dummy;
pragma Unreferenced (Gomi);
begin
null;
end;
end loop;
Ada.Text_IO.Put_Line (
System.Storage_Elements.Storage_Count'Image (GC.Heap_Size));
end loop;
end try_gc_controlled;
|
src/Bi/Mp.agda | mietek/formal-logic | 26 | 6279 | -- Minimal propositional logic, de Bruijn approach, initial encoding
module Bi.Mp where
open import Lib using (List; _,_; LMem; lzero; lsuc)
-- Types
infixl 2 _&&_
infixl 1 _||_
infixr 0 _=>_
data Ty : Set where
UNIT : Ty
_=>_ : Ty -> Ty -> Ty
_&&_ : Ty -> Ty -> Ty
_||_ : Ty -> Ty -> Ty
FALSE : Ty
infixr 0 _<=>_
_<=>_ : Ty -> Ty -> Ty
a <=> b = (a => b) && (b => a)
NOT : Ty -> Ty
NOT a = a => FALSE
TRUE : Ty
TRUE = FALSE => FALSE
-- Context and truth judgement
Cx : Set
Cx = List Ty
isTrue : Ty -> Cx -> Set
isTrue a tc = LMem a tc
-- Terms
module Mp where
infixl 1 _$_
infixr 0 lam=>_
data Tm (tc : Cx) : Ty -> Set where
var : forall {a} -> isTrue a tc -> Tm tc a
lam=>_ : forall {a b} -> Tm (tc , a) b -> Tm tc (a => b)
_$_ : forall {a b} -> Tm tc (a => b) -> Tm tc a -> Tm tc b
pair' : forall {a b} -> Tm tc a -> Tm tc b -> Tm tc (a && b)
fst : forall {a b} -> Tm tc (a && b) -> Tm tc a
snd : forall {a b} -> Tm tc (a && b) -> Tm tc b
left : forall {a b} -> Tm tc a -> Tm tc (a || b)
right : forall {a b} -> Tm tc b -> Tm tc (a || b)
case' : forall {a b c} -> Tm tc (a || b) -> Tm (tc , a) c -> Tm (tc , b) c -> Tm tc c
syntax pair' x y = [ x , y ]
syntax case' xy x y = case xy => x => y
v0 : forall {tc a} -> Tm (tc , a) a
v0 = var lzero
v1 : forall {tc a b} -> Tm (tc , a , b) a
v1 = var (lsuc lzero)
v2 : forall {tc a b c} -> Tm (tc , a , b , c) a
v2 = var (lsuc (lsuc lzero))
Thm : Ty -> Set
Thm a = forall {tc} -> Tm tc a
open Mp public
-- Example theorems
c1 : forall {a b} -> Thm (a && b <=> b && a)
c1 =
[ lam=> [ snd v0 , fst v0 ]
, lam=> [ snd v0 , fst v0 ]
]
c2 : forall {a b} -> Thm (a || b <=> b || a)
c2 =
[ lam=>
(case v0
=> right v0
=> left v0)
, lam=>
(case v0
=> right v0
=> left v0)
]
i1 : forall {a} -> Thm (a && a <=> a)
i1 =
[ lam=> fst v0
, lam=> [ v0 , v0 ]
]
i2 : forall {a} -> Thm (a || a <=> a)
i2 =
[ lam=>
(case v0
=> v0
=> v0)
, lam=> left v0
]
l3 : forall {a} -> Thm ((a => a) <=> TRUE)
l3 =
[ lam=> lam=> v0
, lam=> lam=> v0
]
l1 : forall {a b c} -> Thm (a && (b && c) <=> (a && b) && c)
l1 =
[ lam=>
[ [ fst v0 , fst (snd v0) ]
, snd (snd v0)
]
, lam=>
[ fst (fst v0)
, [ snd (fst v0) , snd v0 ]
]
]
l2 : forall {a} -> Thm (a && TRUE <=> a)
l2 =
[ lam=> fst v0
, lam=> [ v0 , lam=> v0 ]
]
l4 : forall {a b c} -> Thm (a && (b || c) <=> (a && b) || (a && c))
l4 =
[ lam=>
(case snd v0
=> left [ fst v1 , v0 ]
=> right [ fst v1 , v0 ])
, lam=>
(case v0
=> [ fst v0 , left (snd v0) ]
=> [ fst v0 , right (snd v0) ])
]
l6 : forall {a b c} -> Thm (a || (b && c) <=> (a || b) && (a || c))
l6 =
[ lam=>
(case v0
=> [ left v0 , left v0 ]
=> [ right (fst v0) , right (snd v0) ])
, lam=>
(case fst v0
=> left v0
=>
case snd v1
=> left v0
=> right [ v1 , v0 ])
]
l7 : forall {a} -> Thm (a || TRUE <=> TRUE)
l7 =
[ lam=> lam=> v0
, lam=> right v0
]
l9 : forall {a b c} -> Thm (a || (b || c) <=> (a || b) || c)
l9 =
[ lam=>
(case v0
=> left (left v0)
=>
case v0
=> left (right v0)
=> right v0)
, lam=>
(case v0
=>
case v0
=> left v0
=> right (left v0)
=> right (right v0))
]
l11 : forall {a b c} -> Thm ((a => (b && c)) <=> (a => b) && (a => c))
l11 =
[ lam=>
[ lam=> fst (v1 $ v0)
, lam=> snd (v1 $ v0)
]
, lam=>
lam=> [ fst v1 $ v0 , snd v1 $ v0 ]
]
l12 : forall {a} -> Thm ((a => TRUE) <=> TRUE)
l12 =
[ lam=> lam=> v0
, lam=> lam=> v1
]
l13 : forall {a b c} -> Thm ((a => (b => c)) <=> ((a && b) => c))
l13 =
[ lam=>
lam=> v1 $ fst v0 $ snd v0
, lam=>
lam=>
lam=> v2 $ [ v1 , v0 ]
]
l16 : forall {a b c} -> Thm (((a && b) => c) <=> (a => (b => c)))
l16 =
[ lam=>
lam=>
lam=> v2 $ [ v1 , v0 ]
, lam=>
lam=> v1 $ fst v0 $ snd v0
]
l17 : forall {a} -> Thm ((TRUE => a) <=> a)
l17 =
[ lam=> v0 $ (lam=> v0)
, lam=> lam=> v1
]
l19 : forall {a b c} -> Thm (((a || b) => c) <=> (a => c) && (b => c))
l19 =
[ lam=>
[ lam=> v1 $ left v0
, lam=> v1 $ right v0
]
, lam=>
lam=>
(case v0
=> fst v2 $ v0
=> snd v2 $ v0)
]
|
source/machine-apple-darwin/s-zetest.adb | ytomino/drake | 33 | 12205 | with System.Address_To_Constant_Access_Conversions;
with System.Address_To_Named_Access_Conversions;
package body System.Zero_Terminated_Strings is
pragma Suppress (All_Checks);
use type C.size_t;
function strlen (s : not null access constant C.char) return C.size_t
with Import,
Convention => Intrinsic, External_Name => "__builtin_strlen";
procedure memcpy (s1, s2 : Address; n : C.size_t)
with Import,
Convention => Intrinsic, External_Name => "__builtin_memcpy";
-- implementation
function Value (Item : not null access constant C.char) return String is
begin
return Value (Item, strlen (Item));
end Value;
function Value (Item : not null access constant C.char; Length : C.size_t)
return String
is
type char_const_ptr is access constant C.char -- local type
with Convention => C;
for char_const_ptr'Storage_Size use 0;
package Conv is
new Address_To_Constant_Access_Conversions (C.char, char_const_ptr);
Item_All : String (1 .. Natural (Length));
for Item_All'Address use Conv.To_Address (char_const_ptr (Item));
begin
return Item_All;
end Value;
procedure To_C (Source : String; Result : not null access C.char) is
Dummy : C.size_t;
begin
To_C (Source, Result, Dummy);
end To_C;
procedure To_C (
Source : String;
Result : not null access C.char;
Result_Length : out C.size_t) is
begin
-- Source and Result should not be overlapped
Result_Length := Source'Length;
declare
type char_ptr is access all C.char -- local type
with Convention => C;
for char_ptr'Storage_Size use 0;
package Conv is
new Address_To_Named_Access_Conversions (C.char, char_ptr);
Result_All : aliased C.char_array (0 .. Result_Length);
for Result_All'Address use Conv.To_Address (char_ptr (Result));
begin
memcpy (Result_All'Address, Source'Address, Result_Length);
Result_All (Result_Length) := C.char'Val (0);
end;
end To_C;
end System.Zero_Terminated_Strings;
|
vm_programs/user_io.asm | skiff-vm/skiff | 0 | 101158 | <gh_stars>0
.init fn_main
.string int_prompt "Enter an int> "
.string flt_prompt "Enter a floating point number> "
.string txt_prompt "Enter some text (len 20 max)> "
.string out_prompt "You wrote> "
.string str "Hello world!"
.string str_0 "abcd"
.string str_1 " Josh"
.string str_2 "This is a test of the emergency alert system"
.string str_3 "!! Send'er bud"
.u8 a 200
.i8 b -10
.u16 c 300
.i16 d -300
.u32 e 70000
.i32 f 429496729
.u64 g 9000000000
.i64 h -922337203685477580
.float pi 3.14159
.float npi -3.14159
.code
; i5 Type
; i6 Location
; i7 Length
; i3 source slot
fn_print_item:
mov i0 @0
mov i1 @2 ; Word size in bytes
sw i8 i0 i0 ; Store `0` into command slot
add i0 i0 i1 ; Increase slot index
sqw i8 i0 i3 ; Indicate source slot is `0` (data directive)
mov i1 @8 ; Q Word size in bytes
add i0 i0 i1
sqw i8 i0 i6 ; Load Location
add i0 i0 i1
sw i8 i0 i5 ; Load type
mov i1 @2 ; Word size in bytes
add i0 i0 i1
sqw i8 i0 i7 ; Load length
mov i1 @8 ; Q Word size in bytes
add i0 i0 i1
mov i2 @1 ; Send to stdout
sw i8 i0 i2
mov i1 @2 ; Word size in bytes
add i0 i0 i1
mov i2 @1 ; Print new line
sw i8 i0 i2
push_qw i8 ; Load command slot into i0
pop_qw i0
mov i1 @0 ; Load command offset
syscall 1
ret
fn_print_items:
mov i3 @0 ; Source slot 0
mov i5 @9 ; ASCII
mov i6 &str ; Address
mov i7 #str ; Len
call fn_print_item
mov i6 &str_0 ; Address
mov i7 #str_0 ; Len
call fn_print_item
mov i6 &str_1 ; Address
mov i7 #str_1 ; Len
call fn_print_item
mov i6 &str_2 ; Address
mov i7 #str_2 ; Len
call fn_print_item
mov i6 &str_3 ; Address
mov i7 #str_3 ; Len
call fn_print_item
mov i5 @0 ; U8
mov i6 &a ; Address
mov i7 #a ; Len
call fn_print_item
mov i5 @1 ; I8
mov i6 &b ; Address
mov i7 #b ; Len
call fn_print_item
mov i5 @2 ; U16
mov i6 &c ; Address
mov i7 #c ; Len
call fn_print_item
mov i5 @3 ; I16
mov i6 &d ; Address
mov i7 #d ; Len
call fn_print_item
mov i5 @4 ; U32
mov i6 &e ; Address
mov i7 #e ; Len
call fn_print_item
mov i5 @5 ; I32
mov i6 &f ; Address
mov i7 #f ; Len
call fn_print_item
mov i5 @6 ; U64
mov i6 &g ; Address
mov i7 #g ; Len
call fn_print_item
mov i5 @7 ; I64
mov i6 &h ; Address
mov i7 #h ; Len
call fn_print_item
mov i5 @8 ; Float
mov i6 &pi ; Address
mov i7 #pi ; Len
call fn_print_item
mov i5 @8 ; Float
mov i6 &npi ; Address
mov i7 #npi ; Len
call fn_print_item
ret
; i5 Type
; i9 Destination
; i7 Length
fn_get_item:
mov i0 @0
mov i1 @2 ; Word size in bytes
sw i8 i0 x1 ; Store `1` into command slot
add i0 i0 i1 ; Increase slot index
sqw i8 i0 i9 ; Indicate input buffer (i9)
mov i1 @8 ; Q Word size in bytes
add i0 i0 i1
sqw i8 i0 x0 ; Load offset to start placing in buffer (0)
add i0 i0 i1
sw i8 i0 i5 ; Load type
mov i1 @2 ; Word size in bytes
add i0 i0 i1
sqw i8 i0 i7 ; Load length
push_qw i8 ; Load command slot into i0
pop_qw i0
mov i1 @0 ; Load command offset
syscall 1
ret
fn_get_string:
; prompt
mov i3 @0
mov i5 @9 ; ASCII
mov i6 &txt_prompt ; Address
mov i7 #txt_prompt ; Len
call fn_print_item
mov i5 @9 ; Get a string
mov i7 @20 ; String of length 20
call fn_get_item
asne x0 op ; Ensure we got something
push_qw op ; Save for printing it
mov i5 @9 ; ASCII
mov i6 &out_prompt ; Address
mov i7 #out_prompt ; Len
call fn_print_item
mov i3 @2 ; Source for printing input
mov i5 @9 ; ASCII
mov i6 @0 ; Address
pop_qw i7
call fn_print_item
ret
fn_get_float:
; prompt
mov i3 @0
mov i5 @9 ; ASCII
mov i6 &flt_prompt ; Address
mov i7 #flt_prompt ; Len
call fn_print_item
mov i5 @8 ; Get a float
mov i7 @8
call fn_get_item
asne x0 op ; Ensure we got something
mov i3 @0
mov i5 @9 ; ASCII
mov i6 &out_prompt ; Address
mov i7 #out_prompt ; Len
call fn_print_item
mov i3 @2 ; Source for printing input
mov i5 @8 ; float
mov i6 @0 ; Address
mov i7 @8 ; Len
call fn_print_item
ret
fn_get_int:
; prompt
mov i3 @0
mov i5 @9 ; ASCII
mov i6 &int_prompt ; Address
mov i7 #int_prompt ; Len
call fn_print_item
mov i5 @7 ; Get an int64_t
mov i7 @8
call fn_get_item
asne x0 op ; Ensure we got something
mov i3 @0
mov i5 @9 ; ASCII
mov i6 &out_prompt ; Address
mov i7 #out_prompt ; Len
call fn_print_item
mov i3 @2 ; Source for printing input
mov i5 @7 ; int
mov i6 @0 ; Address
mov i7 @8 ; Len
call fn_print_item
ret
fn_main:
mov i0 @1024 ; 16 Bytes for command slot
alloc i8 i0 ; Allocate slot and get id in i8
call fn_print_items
mov i0 @1024 ; Allocate an input buffer
alloc i9 i0
call fn_get_string
call fn_get_float
call fn_get_int
mov i0 @0
exit |
src/tcl-info.ads | thindil/tashy2 | 2 | 29366 | <gh_stars>1-10
-- Copyright (c) 2021 <NAME> <<EMAIL>>
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
with Tcl.Lists; use Tcl.Lists;
-- ****h* Tcl/Info
-- FUNCTION
-- Provide bindings for Tcl command info
-- SOURCE
package Tcl.Info is
-- ****
--## rule off REDUCEABLE_SCOPE
-- ****f* Info/Info.Get_Arguments
-- FUNCTION
-- Get the list of available arguments names for the selected Tcl procedure
-- PARAMETERS
-- Proc_Name - The name of the Tcl procedure which arguments name will be
-- taken
-- Interpreter - Tcl interpreter on which arguments names will be taken. By
-- default it is current default Tcl interpreter.
-- RESULT
-- Array with list of names of arguments for the selected Tcl procedure
-- HISTORY
-- 8.6.0 - Added
-- EXAMPLE
-- -- Get the names of arguments or Tcl procedure myproc on default interpreter
-- Arguments_Names: constant Array_List := Get_Arguments("myproc");
-- COMMANDS
-- info args Proc_Name
-- SOURCE
function Get_Arguments
(Proc_Name: String; Interpreter: Tcl_Interpreter := Get_Interpreter)
return Array_List is
(Split_List
(List =>
Tcl_Eval
(Tcl_Script => "info args " & Proc_Name,
Interpreter => Interpreter)
.Result,
Interpreter => Interpreter)) with
Pre =>
(Proc_Name'Length > 0 and Proc_Name'Length < Integer'Last - 10) and
Interpreter /= Null_Interpreter,
Test_Case => (Name => "Test_Info_Arguments", Mode => Nominal);
-- ****
-- ****f* Info/Info.Get_Procedure_Body
-- FUNCTION
-- Get the body of the selected Tcl procedure
-- PARAMETERS
-- Proc_Name - The name of the Tcl procedure which body will be taken
-- Interpreter - Tcl interpreter on which body will be taken. By default
-- it is current default Tcl interpreter.
-- RESULT
-- The String with body of the selected Tcl procedure
-- HISTORY
-- 8.6.0 - Added
-- EXAMPLE
-- -- Get the body of Tcl procedure myproc2 on default interpreter
-- Proc_Body: constant String := Get_Procedure_Body("myproc2");
-- COMMANDS
-- info body Proc_Name
-- SOURCE
function Get_Procedure_Body
(Proc_Name: String; Interpreter: Tcl_Interpreter := Get_Interpreter)
return String is
(Tcl_Eval
(Tcl_Script => "info body " & Proc_Name, Interpreter => Interpreter)
.Result) with
Pre =>
(Proc_Name'Length > 0 and Proc_Name'Length < Integer'Last - 10) and
Interpreter /= Null_Interpreter,
Test_Case => (Name => "Test_Info_Procedure_Body", Mode => Nominal);
-- ****
-- ****f* Info/Info.Get_Commands_Count
-- FUNCTION
-- Get the number of invoked commands on the selected Tcl interpreter
-- PARAMETERS
-- Interpreter - Tcl interpreter on which the amount of invoked commands
-- will be counted. By default it is current default Tcl
-- interpreter.
-- RESULT
-- The amount of invoked commands on the selected Tcl interpreter
-- HISTORY
-- 8.6.0 - Added
-- EXAMPLE
-- -- Get the amount of invoked command on the default Tcl interpreter
-- Amount: constant Natural := Get_Commands_Count;
-- COMMANDS
-- info cmdcount
-- SOURCE
function Get_Commands_Count
(Interpreter: Tcl_Interpreter := Get_Interpreter) return Natural with
Pre => Interpreter /= Null_Interpreter,
Test_Case => (Name => "Test_Info_Commands_Count", Mode => Nominal);
-- ****
-- ****f* Info/Info.Get_Commands
-- FUNCTION
-- Get the list of names of Tcl commands which match the pattern
-- PARAMETERS
-- Pattern - The pattern on which Tcl commands will be matched. Can
-- be empty. Default value is empty.
-- Interpreter - Tcl interpreter on which Tcl commands will be searched.
-- By default it is current default Tcl interpreter.
-- RESULT
-- If Pattern is empty, return list of names of all visible in the
-- current Tcl namespace commands. Otherwise return only list of names
-- of commands which match the Pattern.
-- HISTORY
-- 8.6.0 - Added
-- EXAMPLE
-- -- Get the names of all available commands in default Tcl interpreter
-- Commands_Names: constant Array_List := Get_Commands;
-- COMMANDS
-- info commands ?Pattern?
-- SOURCE
function Get_Commands
(Pattern: String := ""; Interpreter: Tcl_Interpreter := Get_Interpreter)
return Array_List is
(Split_List
(List =>
Tcl_Eval
(Tcl_Script => "info commands " & Pattern,
Interpreter => Interpreter)
.Result,
Interpreter => Interpreter)) with
Pre => Interpreter /= Null_Interpreter and
Pattern'Length < Integer'Last - 14,
Test_Case => (Name => "Test_Info_Command", Mode => Nominal);
-- ****
-- ****f* Info/Info.Complete
-- FUNCTION
-- Check if the selected Tcl command is complete (no unclosed quotes,
-- braces, brackets, etc)
-- PARAMETERS
-- Command - The name of Tcl command to check
-- Interpreter - Tcl interpreter on which Tcl commands will be checked.
-- By default it is current default Tcl interpreter.
-- RESULT
-- If command is not complete, return False. Otherwise return True
-- HISTORY
-- 8.6.0 - Added
-- EXAMPLE
-- -- Check if command mycommand is complete on default interpreter
-- Is_Complete: constant Tcl_Boolean_Result := Complete("mycommand");
-- COMMANDS
-- info complete Command
-- SOURCE
function Complete
(Command: String; Interpreter: Tcl_Interpreter := Get_Interpreter)
return Tcl_Boolean_Result is
(Tcl_Eval
(Tcl_Script => "info complete " & Command,
Interpreter => Interpreter)) with
Pre => (Command'Length > 0 and Command'Length < Integer'Last - 14) and
Interpreter /= Null_Interpreter,
Test_Case => (Name => "Test_Info_Complete", Mode => Nominal);
-- ****
-- ****f* Info/Info.Get_Coroutine
-- FUNCTION
-- Get the name of currently executed coroutine
-- PARAMETERS
-- Interpreter - Tcl interpreter on which coroutine will be checked.
-- By default it is current default Tcl interpreter.
-- RESULT
-- The name of currently executed coroutine or empty string if no
-- coroutine is run currently.
-- HISTORY
-- 8.6.0 - Added
-- EXAMPLE
-- -- Get the name of the currently executed coroutine on My_Interpreter interpreter
-- Coroutine_Name: constant String := Get_Coroutine(My_Interpreter);
-- COMMANDS
-- info coroutine
-- SOURCE
function Get_Coroutine
(Interpreter: Tcl_Interpreter := Get_Interpreter) return String is
(Tcl_Eval(Tcl_Script => "info coroutine", Interpreter => Interpreter)
.Result) with
Pre => Interpreter /= Null_Interpreter,
Test_Case => (Name => "Test_Info_Coroutine", Mode => Nominal);
-- ****
-- ****f* Info/Info.Get_Default
-- FUNCTION
-- Get the default value for the selected argument in the selected Tcl
-- procedure
-- PARAMETERS
-- Proc_Name - The name of the Tcl procedure to check
-- Argument - The name of the argument in the Proc_Name procedure to
-- check
-- Var_Name - The name of Tcl variable in which the default value
-- will be put
-- Interpreter - Tcl interpreter on which procedure will be checked.
-- By default it is current default Tcl interpreter.
-- RESULT
-- If the selected argument in the selected procedure has default value,
-- return True and put the default value to the Tcl variable Var_Name.
-- Otherwise return False;
-- HISTORY
-- 8.6.0 - Added
-- EXAMPLE
-- -- Get the default value of argument myarg in procedure myproc on the default
-- -- interpreter and put it in Tcl variable myvar
-- Has_Default: constant Tcl_Boolean_Result := Get_Default("myproc", "myarg", "myvar");
-- info default Proc_Name Argument Var_Name
-- SOURCE
function Get_Default
(Proc_Name, Argument, Var_Name: String;
Interpreter: Tcl_Interpreter := Get_Interpreter)
return Tcl_Boolean_Result is
(Tcl_Eval
(Tcl_Script =>
"info default " & Proc_Name & " " & Argument & " " & Var_Name,
Interpreter => Interpreter)) with
Pre =>
(Proc_Name'Length > 0 and Argument'Length > 0 and Var_Name'Length > 0 and
Interpreter /= Null_Interpreter)
and then Proc_Name'Length + Argument'Length + Var_Name'Length <
Long_Long_Integer(Integer'Last - 15),
Test_Case => (Name => "Test_Info_Default", Mode => Nominal);
-- ****
-- ****f* Info/Info.Get_Error_Stack
-- FUNCTION
-- Get the call stack of the last error on the selected Tcl interpreter
-- PARAMETERS
-- Interpreter - Tcl interpreter on which error stack will be checked.
-- By default it is current default Tcl interpreter.
-- RESULT
-- Full call stack of the last error on the selected Tcl interpreter
-- HISTORY
-- 8.6.0 - Added
-- EXAMPLE
-- -- Get the error call stack on the default interpreter
-- Error_Stack: constant String := Get_Error_Stack;
-- COMMANDS
-- info errorstack Interpreter
-- SOURCE
function Get_Error_Stack
(Interpreter: Tcl_Interpreter := Get_Interpreter) return String is
(Tcl_Eval(Tcl_Script => "info errorstack", Interpreter => Interpreter)
.Result) with
Pre => Interpreter /= Null_Interpreter,
Test_Case => (Name => "Test_Info_ErrorStack", Mode => Nominal);
-- ****
-- ****f* Info/Info.Exists
-- FUNCTION
-- Check if the selected Tcl variable exists
-- PARAMETERS
-- Var_Name - Name of Tcl variable which existence will be checked
-- Interpreter - Tcl interpreter on which existence of the variable will be
-- checked. By default it is current default Tcl interpreter.
-- RESULT
-- True if the selected variable exists, otherwise False
-- HISTORY
-- 8.6.0 - Added
-- EXAMPLE
-- -- Check if the Tcl variable $myvar exists in the default Tcl interpreter
-- Var_Exists: constant Tcl_Boolean_Result := Exists("myvar");
-- COMMANDS
-- info exists Var_Name
-- SOURCE
function Exists
(Var_Name: String; Interpreter: Tcl_Interpreter := Get_Interpreter)
return Tcl_Boolean_Result is
(Tcl_Eval
(Tcl_Script => "info exists " & Var_Name,
Interpreter => Interpreter)) with
Pre => (Var_Name'Length > 0 and Var_Name'Length < Integer'Last - 12) and
Interpreter /= Null_Interpreter,
Test_Case => (Name => "Test_Info_Exists", Mode => Nominal);
-- ****
-- ****f* Info/Info.Get_Functions
-- FUNCTION
-- Get the list of names of Tcl math functions which match the pattern
-- PARAMETERS
-- Pattern - The pattern on which Tcl math functions will be
-- matched. Can be empty. Default value is empty.
-- Interpreter - Tcl interpreter on which Tcl math functions will be
-- searched. By default it is current default Tcl
-- interpreter.
-- RESULT
-- If Pattern is empty, return list of names of all visible in the
-- current Tcl namespace math functions. Otherwise return only list of
-- names of math functions which match the Pattern.
-- HISTORY
-- 8.6.0 - Added
-- EXAMPLE
-- -- Get the names of all available math functions in default Tcl interpreter
-- Functions_Names: constant Array_List := Get_Functions;
-- COMMANDS
-- info functions ?Pattern?
-- SOURCE
function Get_Functions
(Pattern: String := ""; Interpreter: Tcl_Interpreter := Get_Interpreter)
return Array_List is
(Split_List
(List =>
Tcl_Eval
(Tcl_Script => "info functions " & Pattern,
Interpreter => Interpreter)
.Result,
Interpreter => Interpreter)) with
Pre => Interpreter /= Null_Interpreter and
Pattern'Length < Integer'Last - 15,
Test_Case => (Name => "Test_Info_Functions", Mode => Nominal);
-- ****
-- ****f* Info/Info.Get_Globals
-- FUNCTION
-- Get the list of names of Tcl global variables which match the pattern
-- PARAMETERS
-- Pattern - The pattern on which Tcl global variables will be
-- matched. Can be empty. Default value is empty.
-- Interpreter - Tcl interpreter on which Tcl global variables will be
-- searched. By default it is current default Tcl
-- interpreter.
-- RESULT
-- If Pattern is empty, return list of names of all visible in the
-- current Tcl namespace global variables. Otherwise return only list of
-- names of global variables which match the Pattern.
-- HISTORY
-- 8.6.0 - Added
-- EXAMPLE
-- -- Get the names of all available global variables in default Tcl interpreter
-- Global_Variables_Names: constant Array_List := Get_Globals;
-- COMMANDS
-- info globals ?Pattern?
-- SOURCE
function Get_Globals
(Pattern: String := ""; Interpreter: Tcl_Interpreter := Get_Interpreter)
return Array_List is
(Split_List
(List =>
Tcl_Eval
(Tcl_Script => "info globals " & Pattern,
Interpreter => Interpreter)
.Result,
Interpreter => Interpreter)) with
Pre => Interpreter /= Null_Interpreter and
Pattern'Length < Integer'Last - 13,
Test_Case => (Name => "Test_Info_Globals", Mode => Nominal);
-- ****
-- ****f* Info/Info.Get_Host_Name
-- FUNCTION
-- Get the name of the computer on which the function is executed.
-- PARAMETERS
-- Interpreter - Tcl interpreter on which hostname of the computer will
-- be taken. By default it is current default Tcl
-- interpreter.
-- RESULT
-- String with name of the computer on which the function was executed
-- HISTORY
-- 8.6.0 - Added
-- EXAMPLE
-- -- Get the name of computer on default Tcl interpreter
-- Host_Name: constant String := Get_Host_Name;
-- COMMANDS
-- info hostname
-- SOURCE
function Get_Host_Name
(Interpreter: Tcl_Interpreter := Get_Interpreter) return String is
(Tcl_Eval(Tcl_Script => "info hostname", Interpreter => Interpreter)
.Result) with
Pre => Interpreter /= Null_Interpreter,
Test_Case => (Name => "Test_Info_HostName", Mode => Nominal);
-- ****
-- ****f* Info/Info.Get_Library
-- FUNCTION
-- Get the library directory where the standard Tcl scripts are stored.
-- It is a value of global variable $tcl_library
-- PARAMETERS
-- Interpreter - Tcl interpreter on which library directory will be
-- taken. By default it is current default Tcl interpreter.
-- RESULT
-- String with the full path to the library directory
-- HISTORY
-- 8.6.0 - Added
-- EXAMPLE
-- -- Get the library directory on default Tcl interpreter
-- Library_Path: constant String := Get_Library;
-- COMMANDS
-- info library
-- SOURCE
function Get_Library
(Interpreter: Tcl_Interpreter := Get_Interpreter) return String is
(Tcl_Eval(Tcl_Script => "info library", Interpreter => Interpreter)
.Result) with
Pre => Interpreter /= Null_Interpreter,
Test_Case => (Name => "Test_Info_Library", Mode => Nominal);
-- ****
-- ****f* Info/Info.Get_Locals
-- FUNCTION
-- Get the list of names of Tcl local variables which match the pattern
-- PARAMETERS
-- Pattern - The pattern on which Tcl local variables will be
-- matched. Can be empty. Default value is empty.
-- Interpreter - Tcl interpreter on which Tcl local variables will be
-- searched. By default it is current default Tcl
-- interpreter.
-- RESULT
-- If Pattern is empty, return list of names of all visible in the
-- current Tcl namespace local variables. Otherwise return only list of
-- names of local variables which match the Pattern.
-- HISTORY
-- 8.6.0 - Added
-- EXAMPLE
-- -- Get the names of all available local variables in default Tcl interpreter
-- Local_Variables_Names: constant Array_List := Get_Locals;
-- COMMANDS
-- info locals ?Pattern?
-- SOURCE
function Get_Locals
(Pattern: String := ""; Interpreter: Tcl_Interpreter := Get_Interpreter)
return Array_List is
(Split_List
(List =>
Tcl_Eval
(Tcl_Script => "info locals " & Pattern,
Interpreter => Interpreter)
.Result,
Interpreter => Interpreter)) with
Pre => Interpreter /= Null_Interpreter and
Pattern'Length < Integer'Last - 12,
Test_Case => (Name => "Test_Info_Locals", Mode => Nominal);
-- ****
-- ****f* Info/Info.Get_Name_Of_Executable
-- FUNCTION
-- Get the full path to the binary file from which the application was
-- invoked
-- PARAMETERS
-- Interpreter - Tcl interpreter on which name of executable will be
-- taken. By default it is current default Tcl interpreter.
-- HISTORY
-- 8.6.0 - Added
-- EXAMPLE
-- -- Get the name of executable on default interpreter
-- Full_Path: constant String := Get_Name_Of_Executable;
-- COMMANDS
-- info nameofexecutable
-- SOURCE
function Get_Name_Of_Executable
(Interpreter: Tcl_Interpreter := Get_Interpreter) return String is
(Tcl_Eval
(Tcl_Script => "info nameofexecutable", Interpreter => Interpreter)
.Result) with
Pre => Interpreter /= Null_Interpreter,
Test_Case => (Name => "Test_Info_Name_Of_Executable", Mode => Nominal);
-- ****
-- ****f* Info/Info.Get_Patch_Level
-- FUNCTION
-- Get the exact version of Tcl library. It is a value of global variable
-- $tcl_pathLevel
-- PARAMETERS
-- Interpreter - Tcl interpreter on which library version will be
-- taken. By default it is current default Tcl interpreter.
-- RESULT
-- String with the version of Tcl library
-- HISTORY
-- 8.6.0 - Added
-- EXAMPLE
-- -- Get the library version on default Tcl interpreter
-- Version: constant String := Get_Patch_Level;
-- COMMANDS
-- info patchlevel
-- SOURCE
function Get_Patch_Level
(Interpreter: Tcl_Interpreter := Get_Interpreter) return String is
(Tcl_Eval(Tcl_Script => "info patchlevel", Interpreter => Interpreter)
.Result) with
Pre => Interpreter /= Null_Interpreter,
Test_Case => (Name => "Test_Info_Patch_Level", Mode => Nominal);
-- ****
-- ****f* Info/Info.Get_Procedures
-- FUNCTION
-- Get the list of names of Tcl procedures in current namespace which
-- match the pattern
-- PARAMETERS
-- Pattern - The pattern on which Tcl procedures will be matched.
-- Can be empty. Default value is empty.
-- Interpreter - Tcl interpreter on which Tcl procedures will be
-- searched. By default it is current default Tcl
-- interpreter.
-- RESULT
-- If Pattern is empty, return list of names of all visible in the
-- current Tcl namespace procedures. Otherwise return only list of
-- names of procedures which match the Pattern.
-- HISTORY
-- 8.6.0 - Added
-- EXAMPLE
-- -- Get the names of all available procedures in default Tcl interpreter
-- Procedures_Names: constant Array_List := Get_Procedures;
-- COMMANDS
-- info procs ?Pattern?
-- SOURCE
function Get_Procedures
(Pattern: String := ""; Interpreter: Tcl_Interpreter := Get_Interpreter)
return Array_List is
(Split_List
(List =>
Tcl_Eval
(Tcl_Script => "info procs " & Pattern,
Interpreter => Interpreter)
.Result,
Interpreter => Interpreter)) with
Pre => Interpreter /= Null_Interpreter and
Pattern'Length < Integer'Last - 11,
Test_Case => (Name => "Test_Info_Procs", Mode => Nominal);
-- ****
-- ****f* Info/Info.Get_Script
-- FUNCTION
-- Get the name of currently evaluated Tcl script
-- PARAMETERS
-- File_Name - If specified, it value will be used as a return value.
-- Can be empty. Default value is empty.
-- Interpreter - Tcl interpreter on which script name will be
-- taken. By default it is current default Tcl interpreter.
-- RESULT
-- String with the name of currently evaluated Tcl script or empty
-- String if no script is evaluated.
-- HISTORY
-- 8.6.0 - Added
-- EXAMPLE
-- -- Get the name of the currently evaluated Tcl script on default Tcl interpreter
-- File_Name: constant String := Get_Script;
-- COMMANDS
-- info script ?File_Name?
-- SOURCE
function Get_Script
(File_Name: String := ""; Interpreter: Tcl_Interpreter := Get_Interpreter)
return String is
(Tcl_Eval
(Tcl_Script => "info script " & File_Name, Interpreter => Interpreter)
.Result) with
Pre => Interpreter /= Null_Interpreter and
File_Name'Length < Integer'Last - 12,
Test_Case => (Name => "Test_Info_Script", Mode => Nominal);
-- ****
-- ****f* Info/Info.Get_Tcl_Version
-- FUNCTION
-- Get the major and minor version of Tcl library. It is a value of
-- global variable $tcl_version
-- PARAMETERS
-- Interpreter - Tcl interpreter on which library version will be
-- taken. By default it is current default Tcl interpreter.
-- RESULT
-- String with the version of Tcl library
-- HISTORY
-- 8.6.0 - Added
-- EXAMPLE
-- -- Get the library version on default Tcl interpreter
-- Version: constant String := Get_Tcl_Version;
-- COMMANDS
-- info tclversion
-- SOURCE
function Get_Tcl_Version
(Interpreter: Tcl_Interpreter := Get_Interpreter) return String is
(Tcl_Eval(Tcl_Script => "info tclversion", Interpreter => Interpreter)
.Result) with
Pre => Interpreter /= Null_Interpreter,
Test_Case => (Name => "Test_Info_Tcl_Version", Mode => Nominal);
-- ****
-- ****f* Info/Info.Get_Variables
-- FUNCTION
-- Get the list of names of global and local Tcl variables which match
-- the pattern
-- PARAMETERS
-- Pattern - The pattern on which Tcl variables will be matched.
-- Can be empty. Default value is empty.
-- Interpreter - Tcl interpreter on which Tcl variables will be searched.
-- By default it is current default Tcl interpreter.
-- RESULT
-- If Pattern is empty, return list of names of all visible in the
-- current Tcl namespace local and global variables. Otherwise return
-- only list of names of local variables which match the Pattern.
-- HISTORY
-- 8.6.0 - Added
-- EXAMPLE
-- -- Get the names of all available variables in default Tcl interpreter
-- Variables_Names: constant Array_List := Get_Variables;
-- COMMANDS
-- info vars ?Pattern?
-- SOURCE
function Get_Variables
(Pattern: String := ""; Interpreter: Tcl_Interpreter := Get_Interpreter)
return Array_List is
(Split_List
(List =>
Tcl_Eval
(Tcl_Script => "info vars " & Pattern, Interpreter => Interpreter)
.Result,
Interpreter => Interpreter)) with
Pre => Interpreter /= Null_Interpreter and
Pattern'Length < Integer'Last - 10,
Test_Case => (Name => "Test_Info_Vars", Mode => Nominal);
-- ****
--## rule on REDUCEABLE_SCOPE
end Tcl.Info;
|
routines/math/db_unknown.asm | undisbeliever/snesdev-common | 3 | 29755 | ;; DB unknown routines
;; Will set DB to $80, call the math routine and exit.
.macro JSR_DB routine
PHB
PHK
PLB
JSR routine
PLB
.endmacro
ROUTINE Multiply_U8Y_U8X_UY_DB
JSR_DB Multiply_U8Y_U8X_UY
RTS
ROUTINE Multiply_U16Y_U8A_U16Y_DB
ROUTINE Multiply_S16Y_U8A_S16Y_DB
ROUTINE Multiply_U16Y_U8A_U32_DB
JSR_DB Multiply_U16Y_U8A_U16Y
RTS
ROUTINE Multiply_U16Y_U16X_U16Y_DB
ROUTINE Multiply_U16Y_S16X_16Y_DB
ROUTINE Multiply_S16Y_U16X_16Y_DB
ROUTINE Multiply_S16Y_S16X_S16Y_DB
JSR_DB Multiply_S16Y_S16X_S16Y
RTS
ROUTINE Multiply_U16Y_U16X_U32XY_DB
ROUTINE Multiply_U16Y_S16X_32XY_DB
ROUTINE Multiply_S16Y_U16X_32XY_DB
JSR_DB Multiply_U16Y_U16X_U32XY
RTS
ROUTINE Multiply_S16Y_S16X_S32XY_DB
JSR_DB Multiply_S16Y_S16X_S32XY
RTS
ROUTINE Multiply_U32_S16Y_32XY_DB
ROUTINE Multiply_S32_S16Y_S32XY_DB
JSR_DB Multiply_U32_S16Y_32XY
RTS
ROUTINE Multiply_U32_U16Y_U32XY_DB
ROUTINE Multiply_S32_U16Y_S32XY_DB
JSR_DB Multiply_U32_U16Y_U32XY
RTS
ROUTINE Multiply_U32_U32XY_U32XY_DB
ROUTINE Multiply_U32_S32XY_32XY_DB
ROUTINE Multiply_S32_U32XY_32XY_DB
ROUTINE Multiply_S32_S32XY_S32XY_DB
JSR_DB Multiply_U32_U32XY_U32XY
RTS
ROUTINE Multiply_U32XY_U8A_U32XY_DB
ROUTINE Multiply_S32XY_U8A_S32XY_DB
JSR_DB Multiply_U32XY_U8A_U32XY
RTS
ROUTINE Divide_S16Y_U16X_DB
JSR_DB Divide_S16Y_U16X
RTS
ROUTINE Divide_U16Y_S16X_DB
JSR_DB Divide_U16Y_S16X
RTS
ROUTINE Divide_S16Y_S16X_DB
JSR_DB Divide_S16Y_S16X
RTS
ROUTINE Divide_U16Y_U16X_DB
JSR_DB Divide_U16Y_U16X
RTS
ROUTINE Divide_U16Y_U8A_DB
JSR_DB Divide_U16Y_U8A
RTS
ROUTINE Divide_S32_S32_DB
JSR_DB Divide_S32_S32
RTS
ROUTINE Divide_U32_U32_DB
JSR_DB Divide_U32_U32
RTS
ROUTINE Divide_U32_U8A_DB
JSR_DB Divide_U32_U8A
RTS
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.