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 |
|---|---|---|---|---|
source/comparetiming.applescript | II-H/bookends-tools | 76 | 2784 | <gh_stars>10-100
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
-- this is ~2 seconds
tell application "Bookends"
tell front library window
set mypub to first publication item whose id is "59232"
set myfmt to format mypub using "APA 7th Edition" as RTF
end tell
end tell
-- this is ~0.05 seconds
tell application "Bookends"
tell front library window
return «event ToySGUID» "59232" given «class RRTF»:"true", string:"APA 7th Edition"
end tell
end tell
|
data/phone/text/dana_caller.asm | Dev727/ancientplatinum | 28 | 9418 | <filename>data/phone/text/dana_caller.asm
UnknownText_0x64f74:
text "My @"
text_ram wStringBuffer4
text " is"
line "getting prettier!"
para "I've been taking"
line "photos galore!"
done
UnknownText_0x64fb2:
text "It took only an"
line "instant to KO a"
cont "wild @"
text_ram wStringBuffer4
text "."
para "It must be because"
line "you gave me some"
para "battling tips last"
line "time."
done
UnknownText_0x6501c:
text "You know what?"
line "A wild @"
text_ram wStringBuffer4
text_start
para "got away from me"
line "again."
para "It was so close!"
line "Really, just a"
para "little bit more,"
line "and I would've…"
done
UnknownText_0x65091:
text "Right now, I'm on"
line "@"
text_ram wStringBuffer5
text "."
para "If you're close"
line "by, let's battle!"
para "I'll be waiting"
line "for you!"
done
UnknownText_0x650e2:
text "See you!"
done
UnknownText_0x650ec:
text "You know what?"
line "I got a good gift!"
para "As I promised,"
line "it's yours!"
para "I'm sure you'd"
line "like it. Come get"
para "it! I'm waiting on"
line "@"
text_ram wStringBuffer5
text "!"
done
UnknownText_0x65161:
text "Oh! You wanted a"
line "gift, right?"
para "I got one, but I"
line "want to keep this."
para "Can you wait a bit"
line "longer?"
done
UnknownText_0x651bf:
text "Hi! You haven't"
line "forgotten about"
para "your promise to"
line "battle me?"
para "I'm waiting on"
line "@"
text_ram wStringBuffer5
text "!"
done
UnknownText_0x6520f:
text "Hello?"
para "If you don't come"
line "get your present"
para "soon, I'll give it"
line "to someone else."
para "I'm waiting on"
line "@"
text_ram wStringBuffer5
text "!"
done
|
test/Succeed/Issue2374.agda | cruhland/agda | 1,989 | 502 | <filename>test/Succeed/Issue2374.agda
-- Andreas, 2016-12-31, issue #2374
-- Use hiding info to disambiguate overloaded projections.
-- {-# OPTIONS -v tc.lhs.split:40 #-}
postulate A B : Set
module M where
record R : Set₂ where
field
F : Set₁
module Order1 where
open M.R
open M.R {{...}}
test : M.R
F test = Set
inst : M.R
F {{inst}} = Set
module Order2 where
open M.R {{...}}
open M.R
test : M.R
F test = Set
inst : M.R
F {{inst}} = Set
module N (A : Set) where
record R : Set₂ where
field
F : Set₁
module Par1 where
open N.R {A = A}
module RB = N.R {A = B}; open RB {{...}}
test : N.R A
F test = Set
inst : N.R B
F {{inst}} = Set
module Par2 where
module RA = N.R {A = A}; open RA {{...}}
open N.R {A = B}
test : N.R B
F test = Set
inst : N.R A
F {{inst}} = Set
-- All should be accepted.
|
llvm-gcc-4.2-2.9/gcc/ada/a-envvar.adb | vidkidz/crossbridge | 1 | 9017 | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . E N V I R O N M E N T _ V A R I A B L E S --
-- --
-- B o d y --
-- --
-- Copyright (C) 2005, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with System;
with Interfaces.C.Strings;
with Ada.Unchecked_Deallocation;
package body Ada.Environment_Variables is
-----------
-- Clear --
-----------
procedure Clear (Name : String) is
procedure Clear_Env_Var (Name : System.Address);
pragma Import (C, Clear_Env_Var, "__gnat_unsetenv");
F_Name : String (1 .. Name'Length + 1);
begin
F_Name (1 .. Name'Length) := Name;
F_Name (F_Name'Last) := ASCII.NUL;
Clear_Env_Var (F_Name'Address);
end Clear;
-----------
-- Clear --
-----------
procedure Clear is
procedure Clear_Env;
pragma Import (C, Clear_Env, "__gnat_clearenv");
begin
Clear_Env;
end Clear;
------------
-- Exists --
------------
function Exists (Name : String) return Boolean is
use System;
procedure Get_Env_Value_Ptr (Name, Length, Ptr : Address);
pragma Import (C, Get_Env_Value_Ptr, "__gnat_getenv");
Env_Value_Ptr : aliased Address;
Env_Value_Length : aliased Integer;
F_Name : aliased String (1 .. Name'Length + 1);
begin
F_Name (1 .. Name'Length) := Name;
F_Name (F_Name'Last) := ASCII.NUL;
Get_Env_Value_Ptr
(F_Name'Address, Env_Value_Length'Address, Env_Value_Ptr'Address);
if Env_Value_Ptr = System.Null_Address then
return False;
end if;
return True;
end Exists;
-------------
-- Iterate --
-------------
procedure Iterate
(Process : not null access procedure (Name, Value : String))
is
use Interfaces.C.Strings;
type C_String_Array is array (Natural) of aliased chars_ptr;
type C_String_Array_Access is access C_String_Array;
function Get_Env return C_String_Array_Access;
pragma Import (C, Get_Env, "__gnat_environ");
type String_Access is access all String;
procedure Free is new Ada.Unchecked_Deallocation (String, String_Access);
Env_Length : Natural := 0;
Env : constant C_String_Array_Access := Get_Env;
begin
-- If the environment is null return directly
if Env = null then
return;
end if;
-- First get the number of environment variables
loop
exit when Env (Env_Length) = Null_Ptr;
Env_Length := Env_Length + 1;
end loop;
declare
Env_Copy : array (1 .. Env_Length) of String_Access;
begin
-- Copy the environment
for Iterator in 1 .. Env_Length loop
Env_Copy (Iterator) := new String'(Value (Env (Iterator - 1)));
end loop;
-- Iterate on the environment copy
for Iterator in 1 .. Env_Length loop
declare
Current_Var : constant String := Env_Copy (Iterator).all;
Value_Index : Natural := Env_Copy (Iterator)'First;
begin
loop
exit when Current_Var (Value_Index) = '=';
Value_Index := Value_Index + 1;
end loop;
Process
(Current_Var (Current_Var'First .. Value_Index - 1),
Current_Var (Value_Index + 1 .. Current_Var'Last));
end;
end loop;
-- Free the copy of the environment
for Iterator in 1 .. Env_Length loop
Free (Env_Copy (Iterator));
end loop;
end;
end Iterate;
---------
-- Set --
---------
procedure Set (Name : String; Value : String) is
F_Name : String (1 .. Name'Length + 1);
F_Value : String (1 .. Value'Length + 1);
procedure Set_Env_Value (Name, Value : System.Address);
pragma Import (C, Set_Env_Value, "__gnat_setenv");
begin
F_Name (1 .. Name'Length) := Name;
F_Name (F_Name'Last) := ASCII.NUL;
F_Value (1 .. Value'Length) := Value;
F_Value (F_Value'Last) := ASCII.NUL;
Set_Env_Value (F_Name'Address, F_Value'Address);
end Set;
-----------
-- Value --
-----------
function Value (Name : String) return String is
use System;
procedure Get_Env_Value_Ptr (Name, Length, Ptr : Address);
pragma Import (C, Get_Env_Value_Ptr, "__gnat_getenv");
procedure Strncpy (Astring_Addr, Cstring : Address; N : Integer);
pragma Import (C, Strncpy, "strncpy");
Env_Value_Ptr : aliased Address;
Env_Value_Length : aliased Integer;
F_Name : aliased String (1 .. Name'Length + 1);
begin
F_Name (1 .. Name'Length) := Name;
F_Name (F_Name'Last) := ASCII.NUL;
Get_Env_Value_Ptr
(F_Name'Address, Env_Value_Length'Address, Env_Value_Ptr'Address);
if Env_Value_Ptr = System.Null_Address then
raise Constraint_Error;
end if;
if Env_Value_Length > 0 then
declare
Result : aliased String (1 .. Env_Value_Length);
begin
Strncpy (Result'Address, Env_Value_Ptr, Env_Value_Length);
return Result;
end;
else
return "";
end if;
end Value;
end Ada.Environment_Variables;
|
Lenguajes de interfaz/prac09.asm | Abel-RM/materias-tec | 0 | 22795 | <filename>Lenguajes de interfaz/prac09.asm
title prac09
model small
.data
msj db 'Esta es na llamada a un procedimiento que imprime este mensaje$',0ah,0dh
.code
main proc far
.startup
call imprime
main endp
.exit
imprime proc near
mov bx,0001h
lea dx, msj
mov ah, 09h
int 21h
mov bx,0001h
mov ah,02h
mov dl,7h
int 21h
ret
imprime endp
end
|
src/features/system_calls.asm | FranchuFranchu/fran-os | 1 | 98717 | <reponame>FranchuFranchu/fran-os
; Doc for this in macros/sysenter_vectors.asm
; How to add a system call:
; Add an entry in macros/sysenter_vectors.yaml
; Add a function here
; Guidelines for system calls:
; These registers must be preserved
; - ECX
; - EDX
%include "features/file descriptors/structure.asm"
kernel_syscall_no_operation:
ret
kernel_syscall_debug_print_eax:
call kernel_debug_print_eax
ret
kernel_syscall_terminate_process:
jmp kernel_sleep
kernel_syscall_read:
ret
kernel_syscall_write:
; We haven't implemented file descriptors yet
xchg eax, ecx
call kernel_terminal_write
xchg eax, ecx
ret
kernel_syscall_seek:
ret
kernel_syscall_open:
; EDI is the backend number
; Make sure it's not too large
mov ebx, edi
cmp ebx, kernel_file_descriptor_backend_map_size
jg .out_of_range
; Load the backend struct pointer
mov ebx, [kernel_file_descriptor_backend_map+edi*4]
cmp ebx, 0
; If it's zero, then it's null
jz .null_backend
mov ebx, [ebx+kernel_file_descriptor_backend_struct.open]
; EBX now has the open function
; Allocate a file descriptor
push ebx
mov ebx, fd_list
call kernel_data_structure_vec_first_free
; Store the file descriptor number in EDI.
mov edi, ebx
; Then get the pointer to the file descriptor structure
; its null or garbage right now though, since we havent allocated anything for the data
mov ebx, [fd_list+kernel_data_structure_vec.data]
; Allocate the struct
push eax
mov eax, file_descriptor.size
call kernel_malloc
; Now eax contains the fd pointer
; Store it
mov [ebx+edi*4], eax
pop eax
; (for handing over to the open function)
mov edi, eax
pop ebx
call ebx
; Get the fd number back again
mov edi, [edi+file_descriptor.number]
ret
.out_of_range:
mov eax, -2
ret
.null_backend:
mov eax, -3
ret
; TODO make this process-specific
fd_list: db kernel_data_structure_vec.size
kernel_syscall_close:
ret
kernel_syscall_execute:
ret
kernel_syscall_fork_and_execute:
ret
kernel_syscall_fork_process:
ret
kernel_syscall_fork_thread:
ret
kernel_syscall_set_file_descriptor_interactions:
ret
kernel_syscall_get_file_descriptor_interactions:
ret
kernel_syscall_wait_for_interaction:
ret
|
Fire Alarm - Smoke Detector/assets/alarm_1.asm | sanils2002/ASSEMBLY-PROJECTS | 0 | 171408 | MVI C,00H
MVI A,01H
LXI H,207FH
MOV B,M
INX H
BACK: CMP M
JNZ NEXT
INR C
NEXT: INX H
DCR B
JNZ BACK
MOV A,C
STA 4000H
HLT
|
oeis/040/A040828.asm | neoneye/loda-programs | 11 | 83561 | ; A040828: Continued fraction for sqrt(858).
; Submitted by <NAME>
; 29,3,2,3,58,3,2,3,58,3,2,3,58,3,2,3,58,3,2,3,58,3,2,3,58,3,2,3,58,3,2,3,58,3,2,3,58,3,2,3,58,3,2,3,58,3,2,3,58,3,2,3,58,3,2,3,58,3,2,3,58,3,2,3,58,3,2,3,58,3,2,3,58,3,2,3,58,3,2,3,58,3,2,3
seq $0,40304 ; Continued fraction for sqrt(322).
dif $0,8
mov $1,$0
div $1,3
add $1,1
mul $1,2
mov $2,$0
add $2,$1
dif $2,$1
mov $0,$2
|
Task/Even-or-odd/AppleScript/even-or-odd-2.applescript | LaudateCorpus1/RosettaCodeData | 1 | 2959 | <filename>Task/Even-or-odd/AppleScript/even-or-odd-2.applescript
-- even :: Integral a => a -> Bool
on even(n)
n mod 2 = 0
end even
-- odd :: Integral a => a -> Bool
on odd(n)
not even(n)
end odd
-- GENERIC FUNCTIONS FOR TEST ----------------------------------
-- filter :: (a -> Bool) -> [a] -> [a]
on filter(f, xs)
tell mReturn(f)
set lst to {}
set lng to length of xs
repeat with i from 1 to lng
set v to item i of xs
if lambda(v, i, xs) then set end of lst to v
end repeat
return lst
end tell
end filter
-- Lift 2nd class handler function into 1st class script wrapper
-- mReturn :: Handler -> Script
on mReturn(f)
if class of f is script then
f
else
script
property lambda : f
end script
end if
end mReturn
-- TEST ---------------------------------------------------------
on run
set xs to [-6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6]
{filter(even, xs), filter(odd, xs)}
end run
|
libsrc/_DEVELOPMENT/math/float/math32/c/sccz80/cm32_sccz80_fsadd.asm | jpoikela/z88dk | 640 | 105446 | <gh_stars>100-1000
; float __fsadd (float left, float right)
SECTION code_clib
SECTION code_fp_math32
PUBLIC cm32_sccz80_fsadd
EXTERN cm32_sccz80_switch_arg, cm32_sccz80_fsreadl
EXTERN m32_fsadd
; add two sccz80 floats
;
; enter : stack = sccz80_float left, sccz80_float right, ret
;
; exit : DEHL = sccz80_float(left+right)
;
; uses : af, bc, de, hl, af', bc', de', hl'
.cm32_sccz80_fsadd
call cm32_sccz80_switch_arg
call cm32_sccz80_fsreadl
jp m32_fsadd ; enter stack = sccz80_float right, sccz80_float left, ret
; DEHL = sccz80_float right
; return DEHL = sccz80_float
|
lib/core/comp/_long.asm | locodarwin/xc-basic3 | 11 | 245588 | PROCESSOR 6502
; Compare two long ints on stack for equality
MAC cmplongeq ; @push
tsx
lda.wx stack+6
cmp.wx stack+3
bne .false
lda.wx stack+5
cmp.wx stack+2
bne .false
lda.wx stack+4
cmp.wx stack+1
bne .false
txa
clc
adc #6
tax
txs
ptrue
bne .q
.false:
txa
clc
adc #6
tax
txs
pfalse
.q
ENDM
; Compare two long ints on stack for inequality
MAC cmplongneq ; @push
tsx
lda.wx stack+6
cmp.wx stack+3
bne .true
lda.wx stack+5
cmp.wx stack+2
bne .true
lda.wx stack+4
cmp.wx stack+1
bne .true
txa
clc
adc #6
tax
txs
pfalse
beq .q
.true:
txa
clc
adc #6
tax
txs
ptrue
.q
ENDM
; Helper macro for long int comparisons
MAC _lcomparison
tsx
lda.wx stack+6
cmp.wx stack+3
lda.wx stack+5
sbc.wx stack+2
lda.wx stack+4
sbc.wx stack+1
bvc *+4
eor #$80
ENDM
; Compare two long ints on stack for less than
MAC cmplonglt ; @push
_lcomparison
bmi .true
txa
clc
adc #6
tax
txs
pfalse
beq .q
.true:
txa
clc
adc #6
tax
txs
ptrue
.q
ENDM
; Compare two long ints on stack for greater than or equal
MAC cmplonggte ; @push
_lcomparison
bpl .true
txa
clc
adc #6
tax
txs
pfalse
beq .q
.true:
txa
clc
adc #6
tax
txs
ptrue
.q
ENDM
; Compare two long ints on stack for less than or equal
MAC cmplonglte ; @push
tsx
lda.wx stack+3
cmp.wx stack+6
lda.wx stack+2
sbc.wx stack+5
lda.wx stack+1
sbc.wx stack+4
bvc .1
eor #$80
.1
bmi .phf
txa
clc
adc #6
tax
txs
ptrue
bne .q
.phf:
txa
clc
adc #6
tax
txs
pfalse
.q
ENDM
; Compare two long ints on stack for greater than
MAC cmplonggt ; @push
tsx
lda.wx stack+3
cmp.wx stack+6
lda.wx stack+2
sbc.wx stack+5
lda.wx stack+1
sbc.wx stack+4
bvc .1
eor #$80
.1
bmi .pht
txa
clc
adc #6
tax
txs
pfalse
beq .q
.pht:
txa
clc
adc #6
tax
txs
ptrue
.q
ENDM |
maps/NationalPark.asm | Dev727/ancientplatinum | 28 | 90819 | <reponame>Dev727/ancientplatinum
object_const_def ; object_event constants
const NATIONALPARK_LASS1
const NATIONALPARK_POKEFAN_F1
const NATIONALPARK_TEACHER1
const NATIONALPARK_YOUNGSTER1
const NATIONALPARK_YOUNGSTER2
const NATIONALPARK_TEACHER2
const NATIONALPARK_PERSIAN
const NATIONALPARK_YOUNGSTER3
const NATIONALPARK_POKEFAN_F2
const NATIONALPARK_POKEFAN_M
const NATIONALPARK_LASS2
const NATIONALPARK_POKE_BALL1
const NATIONALPARK_GAMEBOY_KID
const NATIONALPARK_POKE_BALL2
NationalPark_MapScripts:
db 0 ; scene scripts
db 0 ; callbacks
NationalParkLassScript:
jumptextfaceplayer NationalParkLassText
NationalParkPokefanFScript:
jumptextfaceplayer NationalParkPokefanFText
NationalParkTeacher1Script:
faceplayer
opentext
checkevent EVENT_GOT_QUICK_CLAW
iftrue .GotQuickClaw
writetext NationalParkTeacher1Text
buttonsound
verbosegiveitem QUICK_CLAW
iffalse .NoRoom
setevent EVENT_GOT_QUICK_CLAW
.GotQuickClaw:
writetext NationalParkTeacher1Text_GotQuickClaw
waitbutton
.NoRoom:
closetext
end
NationalParkYoungster1Script:
jumptextfaceplayer NationalParkYoungster1Text
NationalParkYoungster2Script:
jumptextfaceplayer NationalParkYoungster2Text
NationalParkTeacher2Script:
jumptextfaceplayer NationalParkTeacher2Text
NationalParkPersian:
faceplayer
opentext
writetext NationalParkPersianText
cry PERSIAN
waitbutton
closetext
end
NationalParkGameboyKidScript:
faceplayer
opentext
writetext NationalParkGameboyKidText
waitbutton
closetext
turnobject NATIONALPARK_GAMEBOY_KID, DOWN
end
TrainerSchoolboyJack1:
trainer SCHOOLBOY, JACK1, EVENT_BEAT_SCHOOLBOY_JACK, SchoolboyJack1SeenText, SchoolboyJack1BeatenText, 0, .Script
.Script:
loadvar VAR_CALLERID, PHONE_SCHOOLBOY_JACK
endifjustbattled
opentext
checkflag ENGINE_JACK
iftrue .Rematch
checkcellnum PHONE_SCHOOLBOY_JACK
iftrue .NumberAccepted
checkevent EVENT_JACK_ASKED_FOR_PHONE_NUMBER
iftrue .AskAgain
writetext UnknownText_0x5c4f3
buttonsound
setevent EVENT_JACK_ASKED_FOR_PHONE_NUMBER
scall .AskNumber1
sjump .RequestNumber
.AskAgain:
scall .AskNumber2
.RequestNumber:
askforphonenumber PHONE_SCHOOLBOY_JACK
ifequal PHONE_CONTACTS_FULL, .PhoneFull
ifequal PHONE_CONTACT_REFUSED, .NumberDeclined
gettrainername STRING_BUFFER_3, SCHOOLBOY, JACK1
scall .RegisteredNumber
sjump .NumberAccepted
.Rematch:
scall .RematchStd
winlosstext SchoolboyJack1BeatenText, 0
readmem wJackFightCount
ifequal 4, .Fight4
ifequal 3, .Fight3
ifequal 2, .Fight2
ifequal 1, .Fight1
ifequal 0, .LoadFight0
.Fight4:
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue .LoadFight4
.Fight3:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight3
.Fight2:
checkevent EVENT_CLEARED_RADIO_TOWER
iftrue .LoadFight2
.Fight1:
checkflag ENGINE_FLYPOINT_OLIVINE
iftrue .LoadFight1
.LoadFight0:
loadtrainer SCHOOLBOY, JACK1
startbattle
reloadmapafterbattle
loadmem wJackFightCount, 1
clearflag ENGINE_JACK
end
.LoadFight1:
loadtrainer SCHOOLBOY, JACK2
startbattle
reloadmapafterbattle
loadmem wJackFightCount, 2
clearflag ENGINE_JACK
end
.LoadFight2:
loadtrainer SCHOOLBOY, JACK3
startbattle
reloadmapafterbattle
loadmem wJackFightCount, 3
clearflag ENGINE_JACK
end
.LoadFight3:
loadtrainer SCHOOLBOY, JACK4
startbattle
reloadmapafterbattle
loadmem wJackFightCount, 4
clearflag ENGINE_JACK
end
.LoadFight4:
loadtrainer SCHOOLBOY, JACK5
startbattle
reloadmapafterbattle
clearflag ENGINE_JACK
end
.AskNumber1:
jumpstd asknumber1m
end
.AskNumber2:
jumpstd asknumber2m
end
.RegisteredNumber:
jumpstd registerednumberm
end
.NumberAccepted:
jumpstd numberacceptedm
end
.NumberDeclined:
jumpstd numberdeclinedm
end
.PhoneFull:
jumpstd phonefullm
end
.RematchStd:
jumpstd rematchm
end
TrainerPokefanmWilliam:
trainer POKEFANM, WILLIAM, EVENT_BEAT_POKEFANM_WILLIAM, PokefanmWilliamSeenText, PokefanmWilliamBeatenText, 0, .Script
.Script:
endifjustbattled
opentext
writetext PokefanmWilliamAfterBattleText
waitbutton
closetext
end
TrainerPokefanfBeverly1:
trainer POKEFANF, BEVERLY1, EVENT_BEAT_POKEFANF_BEVERLY, PokefanfBeverly1SeenText, PokefanfBeverly1BeatenText, 0, .Script
.Script:
loadvar VAR_CALLERID, PHONE_POKEFAN_BEVERLY
endifjustbattled
opentext
checkflag ENGINE_BEVERLY_HAS_NUGGET
iftrue .GiveNugget
checkcellnum PHONE_POKEFAN_BEVERLY
iftrue .NumberAccepted
checkpoke MARILL
iffalse .NoMarill
checkevent EVENT_BEVERLY_ASKED_FOR_PHONE_NUMBER
iftrue .AskAgain
writetext UnknownText_0x5c5bd
buttonsound
setevent EVENT_BEVERLY_ASKED_FOR_PHONE_NUMBER
scall .AskNumber1
sjump .RequestNumber
.AskAgain:
scall .AskNumber2
.RequestNumber:
askforphonenumber PHONE_POKEFAN_BEVERLY
ifequal PHONE_CONTACTS_FULL, .PhoneFull
ifequal PHONE_CONTACT_REFUSED, .NumberDeclined
gettrainername STRING_BUFFER_3, POKEFANF, BEVERLY1
scall .RegisteredNumber
sjump .NumberAccepted
.GiveNugget:
scall .Gift
verbosegiveitem NUGGET
iffalse .NoRoom
clearflag ENGINE_BEVERLY_HAS_NUGGET
sjump .NumberAccepted
.NoRoom:
sjump .PackFull
.NoMarill:
writetext UnknownText_0x5c68a
waitbutton
closetext
end
.AskNumber1:
jumpstd asknumber1f
end
.AskNumber2:
jumpstd asknumber2f
end
.RegisteredNumber:
jumpstd registerednumberf
end
.NumberAccepted:
jumpstd numberacceptedf
end
.NumberDeclined:
jumpstd numberdeclinedf
end
.PhoneFull:
jumpstd phonefullf
end
.Gift:
jumpstd giftf
end
.PackFull:
jumpstd packfullf
end
TrainerLassKrise:
trainer LASS, KRISE, EVENT_BEAT_LASS_KRISE, LassKriseSeenText, LassKriseBeatenText, 0, .Script
.Script:
endifjustbattled
opentext
writetext LassKriseAfterBattleText
waitbutton
closetext
end
NationalParkRelaxationSquareSign:
jumptext NationalParkRelaxationSquareText
NationalParkBattleNoticeSign:
jumptext NationalParkBattleNoticeText
NationalParkTrainerTipsSign:
jumptext NationalParkTrainerTipsText
NationalParkParlyzHeal:
itemball PARLYZ_HEAL
NationalParkTMDig:
itemball TM_DIG
NationalParkHiddenFullHeal:
hiddenitem FULL_HEAL, EVENT_NATIONAL_PARK_HIDDEN_FULL_HEAL
NationalParkLassText:
text "Look! Check out my"
line "bag!"
para "I printed out my"
line "favorites from my"
para "#DEX and stuck"
line "them on my bag."
done
NationalParkPokefanFText:
text "This is MAIL I got"
line "from my daughter."
cont "It cheers me up."
done
NationalParkTeacher1Text:
text "Pay attention,"
line "please!"
para "…Oops, I have to"
line "quit thinking like"
para "a teacher all the"
line "time."
para "You must be a"
line "#MON trainer."
para "Since you're work-"
line "ing so hard, I"
para "want you to have"
line "this."
done
NationalParkTeacher1Text_GotQuickClaw:
text "Let a #MON hold"
line "that QUICK CLAW."
para "Sometimes it will"
line "strike first"
cont "during battle."
done
NationalParkYoungster1Text:
text "I'm playing with"
line "stickers I printed"
cont "from my #DEX."
done
NationalParkYoungster2Text:
text "I get the other"
line "guy's #DEX"
cont "sticker if I win."
done
NationalParkTeacher2Text:
text "I take walks in"
line "the PARK, but I"
para "never go into the"
line "grass."
para "Trainers always"
line "want to battle…"
done
NationalParkPersianText:
text "PERSIAN: Fufushaa!"
done
NationalParkGameboyKidText:
text "I'm printing out"
line "my #DEX."
para "You can also print"
line "out stuff like"
para "MAIL and your PC"
line "BOXES."
done
SchoolboyJack1SeenText:
text "The world of"
line "#MON is deep."
para "There are still"
line "lots of things we"
cont "don't know."
para "But I know more"
line "than you do!"
done
SchoolboyJack1BeatenText:
text "Wha-wha-what?"
done
UnknownText_0x5c4f3:
text "There is a lot"
line "to learn."
para "For example…"
para "There are 50 kinds"
line "of TMs."
para "Traded #MON"
line "level up faster."
done
PokefanfBeverly1SeenText:
text "My #MON are"
line "simply darling."
para "Let me tell you"
line "how proud my"
cont "darlings make me."
done
PokefanfBeverly1BeatenText:
text "I can beat you in"
line "pride, but…"
done
UnknownText_0x5c5bd:
text "I must say, your"
line "#MON are quite"
cont "cute, too."
done
PokefanmWilliamSeenText:
text "We adore our #-"
line "MON, even if they"
cont "dislike us."
para "That's what being"
line "a FAN is about."
done
PokefanmWilliamBeatenText:
text "M-my #MON!"
done
PokefanmWilliamAfterBattleText:
text "I lost the battle,"
line "but my #MON win"
para "the prize for"
line "being most lovely."
done
UnknownText_0x5c68a:
text "My friend keeps a"
line "MARILL!"
para "I find them very"
line "endearing."
para "Oh, I wish for a"
line "MARILL of my own…"
done
LassKriseSeenText:
text "Hello? Why are you"
line "staring at me?"
para "Oh, a battle?"
done
LassKriseBeatenText:
text "…Hmmm…"
done
LassKriseAfterBattleText:
text "I thought you were"
line "staring at me"
cont "because I'm cute!"
done
NationalParkRelaxationSquareText:
text "RELAXATION SQUARE"
line "NATIONAL PARK"
done
NationalParkBattleNoticeText:
text "What is this"
line "notice?"
para "Please battle only"
line "in the grass."
para "NATIONAL PARK"
line "WARDEN'S OFFICE"
done
NationalParkTrainerTipsText:
text "TRAINER TIPS"
para "Print out MAIL by"
line "opening it then"
cont "pressing START."
done
NationalPark_MapEvents:
db 0, 0 ; filler
db 4 ; warp events
warp_event 33, 18, ROUTE_36_NATIONAL_PARK_GATE, 1
warp_event 33, 19, ROUTE_36_NATIONAL_PARK_GATE, 2
warp_event 10, 47, ROUTE_35_NATIONAL_PARK_GATE, 1
warp_event 11, 47, ROUTE_35_NATIONAL_PARK_GATE, 2
db 0 ; coord events
db 4 ; bg events
bg_event 14, 44, BGEVENT_READ, NationalParkRelaxationSquareSign
bg_event 27, 31, BGEVENT_READ, NationalParkBattleNoticeSign
bg_event 6, 47, BGEVENT_ITEM, NationalParkHiddenFullHeal
bg_event 12, 4, BGEVENT_READ, NationalParkTrainerTipsSign
db 14 ; object events
object_event 15, 24, SPRITE_LASS, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, NationalParkLassScript, -1
object_event 14, 4, SPRITE_POKEFAN_F, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NationalParkPokefanFScript, -1
object_event 27, 40, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, NationalParkTeacher1Script, -1
object_event 11, 41, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NationalParkYoungster1Script, -1
object_event 10, 41, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, NationalParkYoungster2Script, -1
object_event 17, 41, SPRITE_TEACHER, SPRITEMOVEDATA_WANDER, 1, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NationalParkTeacher2Script, -1
object_event 26, 40, SPRITE_GROWLITHE, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NationalParkPersian, -1
object_event 27, 23, SPRITE_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSchoolboyJack1, -1
object_event 18, 29, SPRITE_POKEFAN_F, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 2, TrainerPokefanfBeverly1, -1
object_event 16, 9, SPRITE_POKEFAN_M, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 2, TrainerPokefanmWilliam, -1
object_event 8, 14, SPRITE_LASS, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerLassKrise, -1
object_event 35, 12, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, NationalParkParlyzHeal, EVENT_NATIONAL_PARK_PARLYZ_HEAL
object_event 26, 6, SPRITE_GAMEBOY_KID, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NationalParkGameboyKidScript, -1
object_event 1, 43, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, NationalParkTMDig, EVENT_NATIONAL_PARK_TM_DIG
|
org.alloytools.alloy.diff/misc/inheritance/problemSubset.als | jringert/alloy-diff | 1 | 277 | <filename>org.alloytools.alloy.diff/misc/inheritance/problemSubset.als
sig A {
}
sig B in A {
b1 : set A,
b2 : set A
}
// the two different facts need to be aware of whick As are identified as Bs. Because both have to apply to the same As.
fact oneB1 {
all b : B | one b.b1
}
fact oneB2 {
all b : B | one b.b2
}
run {one A and one B}
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_280.asm | ljhsiun2/medusa | 9 | 171115 | <gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r13
push %r8
push %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0x19dd, %r12
clflush (%r12)
dec %rax
mov $0x6162636465666768, %rbp
movq %rbp, (%r12)
nop
nop
and %r12, %r12
lea addresses_WT_ht+0x1d0ad, %rbx
nop
inc %r13
mov (%rbx), %r12d
nop
nop
inc %r13
lea addresses_WT_ht+0xcedd, %rax
nop
nop
nop
nop
nop
add $19750, %r8
mov (%rax), %r12w
nop
nop
nop
cmp %r13, %r13
lea addresses_WC_ht+0x90dd, %r8
nop
sub %rcx, %rcx
movb (%r8), %bl
nop
nop
nop
and %rbx, %rbx
lea addresses_normal_ht+0xccad, %r13
nop
nop
nop
nop
nop
inc %rbx
mov $0x6162636465666768, %r8
movq %r8, (%r13)
sub $43877, %rbp
lea addresses_WT_ht+0x1ae3d, %rbp
nop
nop
nop
inc %r13
mov (%rbp), %r8
nop
nop
nop
nop
add %rax, %rax
lea addresses_A_ht+0x9d5d, %rcx
clflush (%rcx)
nop
nop
nop
nop
nop
sub %r12, %r12
mov (%rcx), %ebp
nop
sub %r12, %r12
lea addresses_WC_ht+0xffdd, %rbx
nop
nop
nop
nop
nop
add %rax, %rax
mov $0x6162636465666768, %r13
movq %r13, %xmm1
movups %xmm1, (%rbx)
nop
nop
inc %rbp
lea addresses_D_ht+0x11edd, %rbx
nop
nop
nop
add %rbp, %rbp
movb $0x61, (%rbx)
nop
nop
nop
nop
nop
xor $47291, %rcx
lea addresses_WT_ht+0x935, %rbx
nop
nop
cmp $10517, %r13
mov $0x6162636465666768, %rax
movq %rax, %xmm2
vmovups %ymm2, (%rbx)
cmp %rbx, %rbx
lea addresses_UC_ht+0x1033d, %rsi
lea addresses_WT_ht+0x1d89d, %rdi
nop
nop
nop
nop
and %rax, %rax
mov $80, %rcx
rep movsb
nop
nop
nop
nop
nop
xor %r8, %r8
lea addresses_normal_ht+0x12edd, %rsi
lea addresses_WC_ht+0xa19d, %rdi
nop
nop
nop
nop
nop
cmp $27924, %rbp
mov $52, %rcx
rep movsq
add $27638, %rsi
lea addresses_UC_ht+0x11d4d, %rdi
nop
nop
nop
and %rax, %rax
movb (%rdi), %bl
cmp %rdi, %rdi
lea addresses_WT_ht+0xca5d, %r8
nop
sub $54929, %r13
movb $0x61, (%r8)
nop
nop
nop
nop
add %r12, %r12
lea addresses_normal_ht+0x1dfed, %rdi
nop
nop
nop
nop
xor $17508, %r8
mov $0x6162636465666768, %rax
movq %rax, (%rdi)
nop
nop
nop
nop
cmp $2964, %r13
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r8
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r13
push %rbp
push %rcx
push %rdi
push %rdx
// Faulty Load
lea addresses_A+0x86dd, %rbp
nop
nop
nop
nop
nop
xor %r11, %r11
movups (%rbp), %xmm2
vpextrq $1, %xmm2, %rdi
lea oracles, %rdx
and $0xff, %rdi
shlq $12, %rdi
mov (%rdx,%rdi,1), %rdi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r13
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_A', 'same': False, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_A', 'same': True, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 8, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 4, 'congruent': 2, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 2, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 1, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 8, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 8, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'same': False, 'size': 4, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 16, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 1, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 32, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 1, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 1, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 8, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'35': 21829}
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
*/
|
sys/iface.nasm | DerickEddington/cabna | 0 | 101303 | %include "cabna/sys/conv.nasm"
extern start_threads
extern thread_main_semaphore
extern alloc_task
extern free_pet
extern sched_task
extern exec_avail
extern notify_receiver
extern supply_retval
%ifdef statistics_collection
extern print_stats
%endif
%macro def_start 0
proc _start:
xor ebp, ebp ; Unix ABI says to do this.
jmp start_threads
%endmacro
%macro thread_main_race 1
mov eax, [thread_main_semaphore]
test eax, eax
jz %1
xor eax, eax
xchg [thread_main_semaphore], eax ; Locking automatically done for xchg.
test eax, eax
jz %1
%endmacro
%macro thread_main_race 0
thread_main_race exec_avail
%endmacro
|
src/fsmaker-sink-hexdump.adb | Fabien-Chouteau/fsmaker | 0 | 30774 | <reponame>Fabien-Chouteau/fsmaker
with System.Storage_Elements; use System.Storage_Elements;
with Interfaces.C.Extensions; use Interfaces.C.Extensions;
with Interfaces; use Interfaces;
package body FSmaker.Sink.Hexdump is
------------
-- Create --
------------
function Create (Dst : not null Sink.Acc_Any) return Sink.Class is
begin
return Instance'(Dst => Dst, others => <>);
end Create;
-----------
-- Write --
-----------
function Write (This : in out Instance;
Addr : System.Address;
Len : Natural)
return Natural
is
---------
-- Put --
---------
procedure Put (Str : String) is
begin
if This.Dst.Write (Str'Address, Str'Length) /= Str'Length then
raise Program_Error with "hexdump write error";
end if;
end Put;
--------------
-- Put_Line --
--------------
procedure Put_Line (Str : String) is
begin
Put (Str & ASCII.LF);
end Put_Line;
--------------
-- Hex_Dump --
--------------
procedure Hex_Dump (Data : Storage_Array) is
function UInt8_To_Char (Val : Storage_Element) return Character;
procedure Start_New_Line;
-- Hexdump format:
-- 0000_0000_0000_0000: 57 69 6B 69 70 65 64 69 61 2C 20 74 68 65 20 66 Wikipedia, the f
-- Addr : ^^^^^^^^^^^^^^^^^^^^
-- Hex : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-- ASCII: ^^^^^^^^^^^^^^^^^
Addr_Len : constant := 16 + 3 + 1;
Hex_Len : constant := 3 * 16;
ASCII_Len : constant := 1 + 16;
Str : String (1 .. Addr_Len + Hex_Len + ASCII_Len) := (others => ' ');
UInt4_To_Char : constant array (Unsigned_4) of Character
:= (0 => '0',
1 => '1',
2 => '2',
3 => '3',
4 => '4',
5 => '5',
6 => '6',
7 => '7',
8 => '8',
9 => '9',
10 => 'A',
11 => 'B',
12 => 'C',
13 => 'D',
14 => 'E',
15 => 'F');
-------------------
-- UInt8_To_Char --
-------------------
function UInt8_To_Char (Val : Storage_Element) return Character is
begin
case Val is
when 0 .. 31 | 127 .. 255 =>
return '.';
when others =>
return Character'Val (Val);
end case;
end UInt8_To_Char;
Index : Natural;
Cnt : Natural;
Addr : Natural := 0;
--------------------
-- Start_New_Line --
--------------------
procedure Start_New_Line is
Addr_Val : Interfaces.Unsigned_64 :=
Interfaces.Unsigned_64 (This.Addr + Addr);
begin
-- Address
for X in reverse 1 .. 19 loop
if X in 5 | 10 | 15 then
Str (X) := '_';
else
Str (X) := UInt4_To_Char (Unsigned_4 (Addr_Val and 16#0F#));
Addr_Val := Shift_Right (Addr_Val, 4);
end if;
end loop;
Str (20) := ':';
Str (21 .. Str'Last) := (others => ' ');
Cnt := 0;
Index := Str'First + Addr_Len;
end Start_New_Line;
begin
Start_New_Line;
for Elt of Data loop
-- Hex
Str (Index + 1) := UInt4_To_Char (Unsigned_4 (Shift_Right (Interfaces.Unsigned_8 (Elt), 4)));
Str (Index + 2) := UInt4_To_Char (Unsigned_4 (Elt and 16#0F#));
-- ASCII
Str (Str'Last - (15 - Cnt)) := UInt8_To_Char (Elt);
Index := Index + 3;
Cnt := Cnt + 1;
Addr := Addr + 1;
if Cnt = 16 then
Put_Line (Str);
Start_New_Line;
end if;
end loop;
if Cnt /= 0 then
Put_Line (Str);
end if;
This.Addr := This.Addr + Addr;
end Hex_Dump;
Data : Storage_Array (1 .. Storage_Offset (Len)) with Address => Addr;
begin
Hex_Dump (Data);
return Len;
end Write;
-----------
-- Close --
-----------
procedure Close (This : in out Instance) is
begin
This.Dst.Close;
end Close;
end FSmaker.Sink.Hexdump;
|
alloy4fun_models/trashltl/models/16/Nmay3sEskwP8DuEYy.als | Kaixi26/org.alloytools.alloy | 0 | 2638 | <filename>alloy4fun_models/trashltl/models/16/Nmay3sEskwP8DuEYy.als<gh_stars>0
open main
pred idNmay3sEskwP8DuEYy_prop17 {
all f: File |always ((eventually f in Trash) implies File' = File - f)
}
pred __repair { idNmay3sEskwP8DuEYy_prop17 }
check __repair { idNmay3sEskwP8DuEYy_prop17 <=> prop17o } |
oeis/201/A201314.asm | neoneye/loda-programs | 11 | 172239 | <filename>oeis/201/A201314.asm
; A201314: Primes of the form n^2 - 17.
; Submitted by <NAME>
; 19,47,83,127,179,239,307,383,467,659,883,1279,1427,1583,1747,2099,2287,2687,3119,3347,3583,4079,4339,5167,6067,7039,7727,8447,8819,9199,9587,10799,12527,12979,13907,14867,15359,15859,16883,17939,19583,20147,20719,22483,23087,25583,26227,26879,27539,29567,30259,31667,33107,35327,36083,36847,37619,39983,40787,44927,45779,46639,47507,48383,50159,51059,52883,61487,62483,63487,64499,65519,71807,72883,76159,77267,85247,89983,92399,94847,97327,99839,101107,104959,108883,111539,119699,123887,125299
mov $1,9
mov $2,332202
mov $5,7
lpb $2
mov $3,$6
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,2
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
sub $2,18
add $5,$1
mov $6,$5
lpe
mov $0,$5
add $0,1
|
Modul 3/latih11fixed.asm | hyuwah/fu-praktikum-smd | 0 | 246335 | ;--------------------------------------------------------------------
; Praktikum SMD 2015
; M.Wahyudin (140310120031)
;
; Name : LATIH11.ASM Penyesuaian
; Desc : Membaca penekanan keypad 4x3 (7pin)
; Metode polling dan scanning kolom
; Input : Keypad di P3
; Output: LED di P1
; 4-display segmen di P2
;--------------------------------------------------------------------
;mov P0,#0h/#fh; pada mcu8051ide untuk menyalakan multi 7segmen ca/cc
mulai:
mov P3, #01111111b ; penetapan port 3 untuk keypad
polls: ;metode polling untuk mendeteksi tombol yang ditekan
;scanning kolom 1
clr p3.0
setb p3.1
setb p3.2
jnb p3.3, dapat ; tombol 1 (76h)
jnb p3.4, dapat ; tombol 4 (6eh)
jnb p3.5, dapat ; tombol 7 (5eh)
jnb p3.6, dapat ; tombol * (3eh)
setb p3.0
;scanning kolom 2
setb p3.0
clr p3.1
setb p3.2
jnb p3.3, dapat ; tombol 2 (75h)
jnb p3.4, dapat ; tombol 5 (6dh)
jnb p3.5, dapat ; tombol 8 (5dh)
jnb p3.6, dapat ; tombol 0 (3dh)
setb p3.1
;scanning kolom 3
setb p3.0
setb p3.1
clr p3.2
jnb p3.3, dapat ; tombol 3 (73h)
jnb p3.4, dapat ; tombol 6 (6bh)
jnb p3.5, dapat ; tombol 9 (5bh)
jnb p3.6, dapat ; tombol # (3bh)
setb p3.2
jmp polls ;terus loop sampai dapat tombol yang ditekan
dapat: mov A, P3 ; Menyalin kondisi P3 saat tombol terdeteksi
mov 30h, A ; Menyalin data dari P3 ke register 30h
mov P1, A ; Menyalin ke display led
lcall konversi
mov P2, A ; Menyalin A konversi ke display multi 7segmen
jmp mulai
konversi:
mov R0, #255 ; Set R0 awal agar dibawah mulai dari 0
putar:
inc R0
cjne R0, #12, lanjut ; Sebelum R0 = 12 loncat ke lanjut
ret
lanjut:
mov A, R0
add A, #5
movc A, @A+pc ; proses lookup table
cjne A, 30h, putar ; Sebelum A = nilai di 30h, ke putar
mov A, R0 ; R0 akan berisi 0 - 12, disalin ke A
ret ; kembali ke pemanggilan konversi
tabel: db 3Dh, 76h, 75h, 73h, 6Eh, 6Dh, 6Bh, 5Eh, 5Dh, 5Bh, 3Eh, 3Bh
;perubahan 63h menjadi 6Eh
end
|
lib/avx512/zuc_x16_avx512.asm | edtubbs/intel-ipsec-mb | 0 | 9841 | ;;
;; Copyright (c) 2020-2021, Intel Corporation
;;
;; 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 Intel Corporation nor the names of its contributors
;; may be used to endorse or promote products derived from this software
;; without specific prior written permission.
;;
;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
;; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
;; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
;; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
;; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
;; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
;; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;;
%include "include/os.asm"
%include "include/reg_sizes.asm"
%include "include/zuc_sbox.inc"
%include "include/transpose_avx512.asm"
%include "include/const.inc"
%include "include/mb_mgr_datastruct.asm"
%include "include/cet.inc"
%define APPEND(a,b) a %+ b
%define APPEND3(a,b,c) a %+ b %+ c
%ifndef CIPHER_16
%define USE_GFNI 0
%define CIPHER_16 asm_ZucCipher_16_avx512
%define ZUC128_INIT asm_ZucInitialization_16_avx512
%define ZUC256_INIT asm_Zuc256Initialization_16_avx512
%define ZUC128_REMAINDER_16 asm_Eia3RemainderAVX512_16
%define ZUC256_REMAINDER_16 asm_Eia3_256_RemainderAVX512_16
%define ZUC_KEYGEN64B_16 asm_ZucGenKeystream64B_16_avx512
%define ZUC_KEYGEN8B_16 asm_ZucGenKeystream8B_16_avx512
%define ZUC_KEYGEN4B_16 asm_ZucGenKeystream4B_16_avx512
%define ZUC_KEYGEN_16 asm_ZucGenKeystream_16_avx512
%define ZUC_KEYGEN64B_SKIP8_16 asm_ZucGenKeystream64B_16_skip8_avx512
%define ZUC_KEYGEN8B_SKIP8_16 asm_ZucGenKeystream8B_16_skip8_avx512
%define ZUC_KEYGEN_SKIP8_16 asm_ZucGenKeystream_16_skip8_avx512
%define ZUC_ROUND64B_16 asm_Eia3Round64BAVX512_16
%endif
section .data
default rel
align 64
EK_d64:
dd 0x0044D700, 0x0026BC00, 0x00626B00, 0x00135E00, 0x00578900, 0x0035E200, 0x00713500, 0x0009AF00
dd 0x004D7800, 0x002F1300, 0x006BC400, 0x001AF100, 0x005E2600, 0x003C4D00, 0x00789A00, 0x0047AC00
align 64
EK256_d64:
dd 0x00220000, 0x002F0000, 0x00240000, 0x002A0000, 0x006D0000, 0x00400000, 0x00400000, 0x00400000
dd 0x00400000, 0x00400000, 0x00400000, 0x00400000, 0x00400000, 0x00520000, 0x00100000, 0x00300000
align 64
EK256_EIA3_4:
dd 0x00220000, 0x002F0000, 0x00250000, 0x002A0000,
dd 0x006D0000, 0x00400000, 0x00400000, 0x00400000,
dd 0x00400000, 0x00400000, 0x00400000, 0x00400000,
dd 0x00400000, 0x00520000, 0x00100000, 0x00300000
align 64
EK256_EIA3_8:
dd 0x00230000, 0x002F0000, 0x00240000, 0x002A0000,
dd 0x006D0000, 0x00400000, 0x00400000, 0x00400000,
dd 0x00400000, 0x00400000, 0x00400000, 0x00400000,
dd 0x00400000, 0x00520000, 0x00100000, 0x00300000
align 64
EK256_EIA3_16:
dd 0x00230000, 0x002F0000, 0x00250000, 0x002A0000,
dd 0x006D0000, 0x00400000, 0x00400000, 0x00400000,
dd 0x00400000, 0x00400000, 0x00400000, 0x00400000,
dd 0x00400000, 0x00520000, 0x00100000, 0x00300000
align 64
shuf_mask_key:
dd 0x00FFFFFF, 0x01FFFFFF, 0x02FFFFFF, 0x03FFFFFF, 0x04FFFFFF, 0x05FFFFFF, 0x06FFFFFF, 0x07FFFFFF,
dd 0x08FFFFFF, 0x09FFFFFF, 0x0AFFFFFF, 0x0BFFFFFF, 0x0CFFFFFF, 0x0DFFFFFF, 0x0EFFFFFF, 0x0FFFFFFF,
align 64
shuf_mask_iv:
dd 0xFFFFFF00, 0xFFFFFF01, 0xFFFFFF02, 0xFFFFFF03, 0xFFFFFF04, 0xFFFFFF05, 0xFFFFFF06, 0xFFFFFF07,
dd 0xFFFFFF08, 0xFFFFFF09, 0xFFFFFF0A, 0xFFFFFF0B, 0xFFFFFF0C, 0xFFFFFF0D, 0xFFFFFF0E, 0xFFFFFF0F,
align 64
shuf_mask_key256_first_high:
dd 0x00FFFFFF, 0x01FFFFFF, 0x02FFFFFF, 0x03FFFFFF, 0x04FFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
dd 0x08FFFFFF, 0x09FFFFFF, 0xFFFFFFFF, 0x0BFFFFFF, 0x0CFFFFFF, 0x0DFFFFFF, 0x0EFFFFFF, 0x0FFFFFFF,
align 64
shuf_mask_key256_first_low:
dd 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFF05FF, 0xFFFF06FF, 0xFFFF07FF,
dd 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFF0AFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
align 64
shuf_mask_key256_second:
dd 0xFFFF0500, 0xFFFF0601, 0xFFFF0702, 0xFFFF0803, 0xFFFF0904, 0xFFFFFF0A, 0xFFFFFF0B, 0xFFFFFFFF,
dd 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFF0C, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF0FFFFF, 0xFF0F0E0D,
align 64
shuf_mask_iv256_first_high:
dd 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00FFFFFF, 0x01FFFFFF, 0x0AFFFFFF,
dd 0xFFFFFFFF, 0xFFFFFFFF, 0x05FFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
align 64
shuf_mask_iv256_first_low:
dd 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFF02,
dd 0xFFFF030B, 0xFFFF0C04, 0xFFFFFFFF, 0xFFFF060D, 0xFFFF070E, 0xFFFF0F08, 0xFFFFFF09, 0xFFFFFFFF,
align 64
shuf_mask_iv256_second:
dd 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF01FFFF, 0xFF02FFFF, 0xFF03FFFF,
dd 0xFF04FFFF, 0xFF05FFFF, 0xFF06FFFF, 0xFF07FFFF, 0xFF08FFFF, 0xFFFFFFFF, 0xFFFF00FF, 0xFFFFFFFF,
align 64
key_mask_low_4:
dq 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff
dq 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xff0fffffffff0fff
align 64
iv_mask_low_6:
dq 0x3f3f3f3f3f3f3fff, 0x000000000000003f
align 64
mask31:
dd 0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF,
dd 0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF,
dd 0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF,
dd 0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF,
align 64
swap_mask:
db 0x03, 0x02, 0x01, 0x00, 0x07, 0x06, 0x05, 0x04
db 0x0b, 0x0a, 0x09, 0x08, 0x0f, 0x0e, 0x0d, 0x0c
db 0x03, 0x02, 0x01, 0x00, 0x07, 0x06, 0x05, 0x04
db 0x0b, 0x0a, 0x09, 0x08, 0x0f, 0x0e, 0x0d, 0x0c
db 0x03, 0x02, 0x01, 0x00, 0x07, 0x06, 0x05, 0x04
db 0x0b, 0x0a, 0x09, 0x08, 0x0f, 0x0e, 0x0d, 0x0c
db 0x03, 0x02, 0x01, 0x00, 0x07, 0x06, 0x05, 0x04
db 0x0b, 0x0a, 0x09, 0x08, 0x0f, 0x0e, 0x0d, 0x0c
align 64
S1_S0_shuf:
db 0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, 0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F
db 0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, 0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F
db 0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, 0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F
db 0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, 0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F
align 64
S0_S1_shuf:
db 0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, 0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
db 0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, 0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
db 0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, 0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
db 0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, 0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
align 64
rev_S1_S0_shuf:
db 0x00, 0x08, 0x01, 0x09, 0x02, 0x0A, 0x03, 0x0B, 0x04, 0x0C, 0x05, 0x0D, 0x06, 0x0E, 0x07, 0x0F
db 0x00, 0x08, 0x01, 0x09, 0x02, 0x0A, 0x03, 0x0B, 0x04, 0x0C, 0x05, 0x0D, 0x06, 0x0E, 0x07, 0x0F
db 0x00, 0x08, 0x01, 0x09, 0x02, 0x0A, 0x03, 0x0B, 0x04, 0x0C, 0x05, 0x0D, 0x06, 0x0E, 0x07, 0x0F
db 0x00, 0x08, 0x01, 0x09, 0x02, 0x0A, 0x03, 0x0B, 0x04, 0x0C, 0x05, 0x0D, 0x06, 0x0E, 0x07, 0x0F
align 64
rev_S0_S1_shuf:
db 0x08, 0x00, 0x09, 0x01, 0x0A, 0x02, 0x0B, 0x03, 0x0C, 0x04, 0x0D, 0x05, 0x0E, 0x06, 0x0F, 0x07
db 0x08, 0x00, 0x09, 0x01, 0x0A, 0x02, 0x0B, 0x03, 0x0C, 0x04, 0x0D, 0x05, 0x0E, 0x06, 0x0F, 0x07
db 0x08, 0x00, 0x09, 0x01, 0x0A, 0x02, 0x0B, 0x03, 0x0C, 0x04, 0x0D, 0x05, 0x0E, 0x06, 0x0F, 0x07
db 0x08, 0x00, 0x09, 0x01, 0x0A, 0x02, 0x0B, 0x03, 0x0C, 0x04, 0x0D, 0x05, 0x0E, 0x06, 0x0F, 0x07
align 64
bit_reverse_table_l:
db 0x00, 0x08, 0x04, 0x0c, 0x02, 0x0a, 0x06, 0x0e, 0x01, 0x09, 0x05, 0x0d, 0x03, 0x0b, 0x07, 0x0f
db 0x00, 0x08, 0x04, 0x0c, 0x02, 0x0a, 0x06, 0x0e, 0x01, 0x09, 0x05, 0x0d, 0x03, 0x0b, 0x07, 0x0f
db 0x00, 0x08, 0x04, 0x0c, 0x02, 0x0a, 0x06, 0x0e, 0x01, 0x09, 0x05, 0x0d, 0x03, 0x0b, 0x07, 0x0f
db 0x00, 0x08, 0x04, 0x0c, 0x02, 0x0a, 0x06, 0x0e, 0x01, 0x09, 0x05, 0x0d, 0x03, 0x0b, 0x07, 0x0f
align 64
bit_reverse_table_h:
db 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0
db 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0
db 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0
db 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0
align 64
bit_reverse_and_table:
db 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f
db 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f
db 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f
db 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f
align 64
bit_reverse_table:
times 8 db 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80
align 64
data_mask_64bits:
dd 0xffffffff, 0xffffffff, 0x00000000, 0x00000000
dd 0xffffffff, 0xffffffff, 0x00000000, 0x00000000
dd 0xffffffff, 0xffffffff, 0x00000000, 0x00000000
dd 0xffffffff, 0xffffffff, 0x00000000, 0x00000000
align 64
shuf_mask_tags_0_1_2_3:
dd 0x01, 0x05, 0x09, 0x0D, 0x11, 0x15, 0x19, 0x1D, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
dd 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x05, 0x09, 0x0D, 0x11, 0x15, 0x19, 0x1D
align 64
shuf_mask_tags_0_4_8_12:
dd 0x01, 0x11, 0xFF, 0xFF, 0x05, 0x15, 0xFF, 0xFF, 0x09, 0x19, 0xFF, 0xFF, 0x0D, 0x1D, 0xFF, 0xFF
dd 0xFF, 0xFF, 0x01, 0x11, 0xFF, 0xFF, 0x05, 0x15, 0xFF, 0xFF, 0x09, 0x19, 0xFF, 0xFF, 0x0D, 0x1D
align 64
all_ffs:
dw 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff
dw 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff
dw 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff
dw 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff
align 64
all_threes:
dw 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003
dw 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003
align 64
all_fffcs:
dw 0xfffc, 0xfffc, 0xfffc, 0xfffc, 0xfffc, 0xfffc, 0xfffc, 0xfffc
dw 0xfffc, 0xfffc, 0xfffc, 0xfffc, 0xfffc, 0xfffc, 0xfffc, 0xfffc
dw 0xfffc, 0xfffc, 0xfffc, 0xfffc, 0xfffc, 0xfffc, 0xfffc, 0xfffc
dw 0xfffc, 0xfffc, 0xfffc, 0xfffc, 0xfffc, 0xfffc, 0xfffc, 0xfffc
align 64
all_3fs:
dw 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f
dw 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f
align 16
bit_mask_table:
db 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
db 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80
db 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0
db 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0
db 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0
db 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8
db 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc
db 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe
byte64_len_to_mask_table:
dq 0xffffffffffffffff, 0x0000000000000001
dq 0x0000000000000003, 0x0000000000000007
dq 0x000000000000000f, 0x000000000000001f
dq 0x000000000000003f, 0x000000000000007f
dq 0x00000000000000ff, 0x00000000000001ff
dq 0x00000000000003ff, 0x00000000000007ff
dq 0x0000000000000fff, 0x0000000000001fff
dq 0x0000000000003fff, 0x0000000000007fff
dq 0x000000000000ffff, 0x000000000001ffff
dq 0x000000000003ffff, 0x000000000007ffff
dq 0x00000000000fffff, 0x00000000001fffff
dq 0x00000000003fffff, 0x00000000007fffff
dq 0x0000000000ffffff, 0x0000000001ffffff
dq 0x0000000003ffffff, 0x0000000007ffffff
dq 0x000000000fffffff, 0x000000001fffffff
dq 0x000000003fffffff, 0x000000007fffffff
dq 0x00000000ffffffff, 0x00000001ffffffff
dq 0x00000003ffffffff, 0x00000007ffffffff
dq 0x0000000fffffffff, 0x0000001fffffffff
dq 0x0000003fffffffff, 0x0000007fffffffff
dq 0x000000ffffffffff, 0x000001ffffffffff
dq 0x000003ffffffffff, 0x000007ffffffffff
dq 0x00000fffffffffff, 0x00001fffffffffff
dq 0x00003fffffffffff, 0x00007fffffffffff
dq 0x0000ffffffffffff, 0x0001ffffffffffff
dq 0x0003ffffffffffff, 0x0007ffffffffffff
dq 0x000fffffffffffff, 0x001fffffffffffff
dq 0x003fffffffffffff, 0x007fffffffffffff
dq 0x00ffffffffffffff, 0x01ffffffffffffff
dq 0x03ffffffffffffff, 0x07ffffffffffffff
dq 0x0fffffffffffffff, 0x1fffffffffffffff
dq 0x3fffffffffffffff, 0x7fffffffffffffff
dq 0xffffffffffffffff
align 64
add_64:
dq 64, 64, 64, 64, 64, 64, 64, 64
align 32
all_512w:
dw 512, 512, 512, 512, 512, 512, 512, 512
dw 512, 512, 512, 512, 512, 512, 512, 512
align 64
bswap_mask:
db 0x03, 0x02, 0x01, 0x00, 0x07, 0x06, 0x05, 0x04
db 0x0b, 0x0a, 0x09, 0x08, 0x0f, 0x0e, 0x0d, 0x0c
db 0x03, 0x02, 0x01, 0x00, 0x07, 0x06, 0x05, 0x04
db 0x0b, 0x0a, 0x09, 0x08, 0x0f, 0x0e, 0x0d, 0x0c
db 0x03, 0x02, 0x01, 0x00, 0x07, 0x06, 0x05, 0x04
db 0x0b, 0x0a, 0x09, 0x08, 0x0f, 0x0e, 0x0d, 0x0c
db 0x03, 0x02, 0x01, 0x00, 0x07, 0x06, 0x05, 0x04
db 0x0b, 0x0a, 0x09, 0x08, 0x0f, 0x0e, 0x0d, 0x0c
align 64
all_31w:
dw 31, 31, 31, 31, 31, 31, 31, 31
dw 31, 31, 31, 31, 31, 31, 31, 31
align 64
all_ffe0w:
dw 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0
dw 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0
align 32
permw_mask:
dw 0, 4, 8, 12, 1, 5, 8, 13, 2, 6, 10, 14, 3, 7, 11, 15
extr_bits_0_4_8_12:
db 00010001b, 00010001b, 00000000b, 00000000b
extr_bits_1_5_9_13:
db 00010010b, 00100010b, 00000000b, 00000000b
extr_bits_2_6_10_14:
db 01000100b, 01000100b, 00000000b, 00000000b
extr_bits_3_7_11_15:
db 10001000b, 10001000b, 00000000b, 00000000b
alignr_mask:
dw 0xffff, 0xffff, 0xffff, 0xffff
dw 0x0000, 0xffff, 0xffff, 0xffff
dw 0xffff, 0x0000, 0xffff, 0xffff
dw 0x0000, 0x0000, 0xffff, 0xffff
dw 0xffff, 0xffff, 0x0000, 0xffff
dw 0x0000, 0xffff, 0x0000, 0xffff
dw 0xffff, 0x0000, 0x0000, 0xffff
dw 0x0000, 0x0000, 0x0000, 0xffff
dw 0xffff, 0xffff, 0xffff, 0x0000
dw 0x0000, 0xffff, 0xffff, 0x0000
dw 0xffff, 0x0000, 0xffff, 0x0000
dw 0x0000, 0x0000, 0xffff, 0x0000
dw 0xffff, 0xffff, 0x0000, 0x0000
dw 0x0000, 0xffff, 0x0000, 0x0000
dw 0xffff, 0x0000, 0x0000, 0x0000
dw 0x0000, 0x0000, 0x0000, 0x0000
mov_mask:
db 10101010b, 10101011b, 10101110b, 10101111b
db 10111010b, 10111011b, 10111110b, 10111111b
db 11101010b, 11101011b, 11101110b, 11101111b
db 11111010b, 11111011b, 11111110b, 11111111b
section .text
align 64
%ifdef LINUX
%define arg1 rdi
%define arg2 rsi
%define arg3 rdx
%define arg4 rcx
%else
%define arg1 rcx
%define arg2 rdx
%define arg3 r8
%define arg4 r9
%endif
%define OFS_R1 (16*(4*16))
%define OFS_R2 (OFS_R1 + (4*16))
%define OFS_X0 (OFS_R2 + (4*16))
%define OFS_X1 (OFS_X0 + (4*16))
%define OFS_X2 (OFS_X1 + (4*16))
%ifidn __OUTPUT_FORMAT__, win64
%define XMM_STORAGE 16*10
%define GP_STORAGE 8*8
%else
%define XMM_STORAGE 0
%define GP_STORAGE 6*8
%endif
%define LANE_STORAGE 64
%define VARIABLE_OFFSET XMM_STORAGE + GP_STORAGE + LANE_STORAGE
%define GP_OFFSET XMM_STORAGE
%macro FUNC_SAVE 0
mov r11, rsp
sub rsp, VARIABLE_OFFSET
and rsp, ~15
%ifidn __OUTPUT_FORMAT__, win64
; xmm6:xmm15 need to be maintained for Windows
vmovdqa [rsp + 0*16], xmm6
vmovdqa [rsp + 1*16], xmm7
vmovdqa [rsp + 2*16], xmm8
vmovdqa [rsp + 3*16], xmm9
vmovdqa [rsp + 4*16], xmm10
vmovdqa [rsp + 5*16], xmm11
vmovdqa [rsp + 6*16], xmm12
vmovdqa [rsp + 7*16], xmm13
vmovdqa [rsp + 8*16], xmm14
vmovdqa [rsp + 9*16], xmm15
mov [rsp + GP_OFFSET + 48], rdi
mov [rsp + GP_OFFSET + 56], rsi
%endif
mov [rsp + GP_OFFSET], r12
mov [rsp + GP_OFFSET + 8], r13
mov [rsp + GP_OFFSET + 16], r14
mov [rsp + GP_OFFSET + 24], r15
mov [rsp + GP_OFFSET + 32], rbx
mov [rsp + GP_OFFSET + 40], r11 ;; rsp pointer
%endmacro
%macro FUNC_RESTORE 0
%ifidn __OUTPUT_FORMAT__, win64
vmovdqa xmm6, [rsp + 0*16]
vmovdqa xmm7, [rsp + 1*16]
vmovdqa xmm8, [rsp + 2*16]
vmovdqa xmm9, [rsp + 3*16]
vmovdqa xmm10, [rsp + 4*16]
vmovdqa xmm11, [rsp + 5*16]
vmovdqa xmm12, [rsp + 6*16]
vmovdqa xmm13, [rsp + 7*16]
vmovdqa xmm14, [rsp + 8*16]
vmovdqa xmm15, [rsp + 9*16]
mov rdi, [rsp + GP_OFFSET + 48]
mov rsi, [rsp + GP_OFFSET + 56]
%endif
mov r12, [rsp + GP_OFFSET]
mov r13, [rsp + GP_OFFSET + 8]
mov r14, [rsp + GP_OFFSET + 16]
mov r15, [rsp + GP_OFFSET + 24]
mov rbx, [rsp + GP_OFFSET + 32]
mov rsp, [rsp + GP_OFFSET + 40]
%endmacro
; This macro reorder the LFSR registers
; after N rounds (1 <= N <= 15), since the registers
; are shifted every round
;
; The macro clobbers ZMM0-15
;
%macro REORDER_LFSR 3
%define %%STATE %1
%define %%NUM_ROUNDS %2
%define %%LANE_MASK %3
%if %%NUM_ROUNDS != 16
%assign i 0
%rep 16
vmovdqa32 APPEND(zmm,i){%%LANE_MASK}, [%%STATE + 64*i]
%assign i (i+1)
%endrep
%assign i 0
%assign j %%NUM_ROUNDS
%rep 16
vmovdqa32 [%%STATE + 64*i]{%%LANE_MASK}, APPEND(zmm,j)
%assign i (i+1)
%assign j ((j+1) % 16)
%endrep
%endif ;; %%NUM_ROUNDS != 16
%endmacro
;
; Perform a partial 16x16 transpose (as opposed to a full 16x16 transpose),
; where the output is chunks of 16 bytes from 4 different buffers interleaved
; in each register (all ZMM registers)
;
; Input:
; a0 a1 a2 a3 a4 a5 a6 a7 .... a15
; b0 b1 b2 b3 b4 b5 b6 b7 .... b15
; c0 c1 c2 c3 c4 c5 c6 c7 .... c15
; d0 d1 d2 d3 d4 d5 d6 d7 .... d15
;
; Output:
; a0 b0 c0 d0 a4 b4 c4 d4 .... d12
; a1 b1 c1 d1 a5 b5 c5 d5 .... d13
; a2 b2 c2 d2 a6 b6 c6 d6 .... d14
; a3 b3 c3 d3 a7 b7 c7 d7 .... d15
;
%macro TRANSPOSE16_U32_INTERLEAVED 26
%define %%IN00 %1 ; [in/out] Bytes 0-3 for all buffers (in) / Bytes 0-15 for buffers 3,7,11,15 (out)
%define %%IN01 %2 ; [in/out] Bytes 4-7 for all buffers (in) / Bytes 16-31 for buffers 3,7,11,15 (out)
%define %%IN02 %3 ; [in/out] Bytes 8-11 for all buffers (in) / Bytes 32-47 for buffers 3,7,11,15 (out)
%define %%IN03 %4 ; [in/out] Bytes 12-15 for all buffers (in) / Bytes 48-63 for buffers 3,7,11,15 (out)
%define %%IN04 %5 ; [in/clobbered] Bytes 16-19 for all buffers (in)
%define %%IN05 %6 ; [in/clobbered] Bytes 20-23 for all buffers (in)
%define %%IN06 %7 ; [in/clobbered] Bytes 24-27 for all buffers (in)
%define %%IN07 %8 ; [in/clobbered] Bytes 28-31 for all buffers (in)
%define %%IN08 %9 ; [in/clobbered] Bytes 32-35 for all buffers (in)
%define %%IN09 %10 ; [in/clobbered] Bytes 36-39 for all buffers (in)
%define %%IN10 %11 ; [in/clobbered] Bytes 40-43 for all buffers (in)
%define %%IN11 %12 ; [in/clobbered] Bytes 44-47 for all buffers (in)
%define %%IN12 %13 ; [in/out] Bytes 48-51 for all buffers (in) / Bytes 0-15 for buffers 2,6,10,14 (out)
%define %%IN13 %14 ; [in/out] Bytes 52-55 for all buffers (in) / Bytes 16-31 for buffers 2,6,10,14 (out)
%define %%IN14 %15 ; [in/out] Bytes 56-59 for all buffers (in) / Bytes 32-47 for buffers 2,6,10,14 (out)
%define %%IN15 %16 ; [in/out] Bytes 60-63 for all buffers (in) / Bytes 48-63 for buffers 2,6,10,14 (out)
%define %%T0 %17 ; [out] Bytes 32-47 for buffers 1,5,9,13 (out)
%define %%T1 %18 ; [out] Bytes 48-63 for buffers 1,5,9,13 (out)
%define %%T2 %19 ; [out] Bytes 32-47 for buffers 0,4,8,12 (out)
%define %%T3 %20 ; [out] Bytes 48-63 for buffers 0,4,8,12 (out)
%define %%K0 %21 ; [out] Bytes 0-15 for buffers 1,5,9,13 (out)
%define %%K1 %22 ; [out] Bytes 16-31for buffers 1,5,9,13 (out)
%define %%K2 %23 ; [out] Bytes 0-15 for buffers 0,4,8,12 (out)
%define %%K3 %24 ; [out] Bytes 16-31 for buffers 0,4,8,12 (out)
%define %%K4 %25 ; [clobbered] Temporary register
%define %%K5 %26 ; [clobbered] Temporary register
vpunpckldq %%K0, %%IN00, %%IN01
vpunpckhdq %%K1, %%IN00, %%IN01
vpunpckldq %%T0, %%IN02, %%IN03
vpunpckhdq %%T1, %%IN02, %%IN03
vpunpckldq %%IN00, %%IN04, %%IN05
vpunpckhdq %%IN01, %%IN04, %%IN05
vpunpckldq %%IN02, %%IN06, %%IN07
vpunpckhdq %%IN03, %%IN06, %%IN07
vpunpcklqdq %%K2, %%K0, %%T0
vpunpckhqdq %%K3, %%K0, %%T0
vpunpcklqdq %%T2, %%K1, %%T1
vpunpckhqdq %%T3, %%K1, %%T1
vpunpcklqdq %%K0, %%IN00, %%IN02
vpunpckhqdq %%K1, %%IN00, %%IN02
vpunpcklqdq %%T0, %%IN01, %%IN03
vpunpckhqdq %%T1, %%IN01, %%IN03
vpunpckldq %%K4, %%IN08, %%IN09
vpunpckhdq %%K5, %%IN08, %%IN09
vpunpckldq %%IN04, %%IN10, %%IN11
vpunpckhdq %%IN05, %%IN10, %%IN11
vpunpckldq %%IN06, %%IN12, %%IN13
vpunpckhdq %%IN07, %%IN12, %%IN13
vpunpckldq %%IN10, %%IN14, %%IN15
vpunpckhdq %%IN11, %%IN14, %%IN15
vpunpcklqdq %%IN12, %%K4, %%IN04
vpunpckhqdq %%IN13, %%K4, %%IN04
vpunpcklqdq %%IN14, %%K5, %%IN05
vpunpckhqdq %%IN15, %%K5, %%IN05
vpunpcklqdq %%IN00, %%IN06, %%IN10
vpunpckhqdq %%IN01, %%IN06, %%IN10
vpunpcklqdq %%IN02, %%IN07, %%IN11
vpunpckhqdq %%IN03, %%IN07, %%IN11
%endmacro
;
; bits_reorg16()
;
%macro bits_reorg16 16-17
%define %%STATE %1 ; [in] ZUC state
%define %%ROUND_NUM %2 ; [in] Round number
%define %%LANE_MASK %3 ; [in] Mask register with lanes to update
%define %%LFSR_0 %4 ; [clobbered] LFSR_0
%define %%LFSR_2 %5 ; [clobbered] LFSR_2
%define %%LFSR_5 %6 ; [clobbered] LFSR_5
%define %%LFSR_7 %7 ; [clobbered] LFSR_7
%define %%LFSR_9 %8 ; [clobbered] LFSR_9
%define %%LFSR_11 %9 ; [clobbered] LFSR_11
%define %%LFSR_14 %10 ; [clobbered] LFSR_14
%define %%LFSR_15 %11 ; [clobbered] LFSR_15
%define %%ZTMP %12 ; [clobbered] Temporary ZMM register
%define %%BLEND_KMASK %13 ; [in] Blend K-mask
%define %%X0 %14 ; [out] ZMM register containing X0 of all lanes (for init)
%define %%X1 %15 ; [out] ZMM register containing X1 of all lanes (for init)
%define %%X2 %16 ; [out] ZMM register containing X2 of all lanes (for init)
%define %%X3 %17 ; [out] ZMM register containing X3 of all lanes (not for init)
vmovdqa64 %%LFSR_15, [%%STATE + ((15 + %%ROUND_NUM) % 16)*64]
vmovdqa64 %%LFSR_14, [%%STATE + ((14 + %%ROUND_NUM) % 16)*64]
vmovdqa64 %%LFSR_11, [%%STATE + ((11 + %%ROUND_NUM) % 16)*64]
vmovdqa64 %%LFSR_9, [%%STATE + (( 9 + %%ROUND_NUM) % 16)*64]
vmovdqa64 %%LFSR_7, [%%STATE + (( 7 + %%ROUND_NUM) % 16)*64]
vmovdqa64 %%LFSR_5, [%%STATE + (( 5 + %%ROUND_NUM) % 16)*64]
%if (%0 == 17) ; Only needed when generating X3 (for "working" mode)
vmovdqa64 %%LFSR_2, [%%STATE + (( 2 + %%ROUND_NUM) % 16)*64]
vmovdqa64 %%LFSR_0, [%%STATE + (( 0 + %%ROUND_NUM) % 16)*64]
%endif
%if USE_GFNI == 1
vpsrld %%LFSR_15, 15
vpslld %%LFSR_14, 16
vpslld %%LFSR_9, 1
vpslld %%LFSR_5, 1
%if (%0 == 17)
vpslld %%LFSR_0, 1
vpshldd %%LFSR_15, %%LFSR_14, 16
vpshldd %%LFSR_11, %%LFSR_9, 16
vpshldd %%LFSR_7, %%LFSR_5, 16
vmovdqa32 [%%STATE + OFS_X0]{%%LANE_MASK}, %%LFSR_15 ; BRC_X0
vmovdqa32 [%%STATE + OFS_X1]{%%LANE_MASK}, %%LFSR_11 ; BRC_X1
vmovdqa32 [%%STATE + OFS_X2]{%%LANE_MASK}, %%LFSR_7 ; BRC_X2
vpshldd %%X3, %%LFSR_2, %%LFSR_0, 16
%else
vpshldd %%X0, %%LFSR_15, %%LFSR_14, 16
vpshldd %%X1, %%LFSR_11, %%LFSR_9, 16
vpshldd %%X2, %%LFSR_7, %%LFSR_5, 16
%endif
%else ; USE_GFNI == 1
vpxorq %%ZTMP, %%ZTMP
vpslld %%LFSR_15, 1
vpblendmw %%ZTMP{%%BLEND_KMASK}, %%LFSR_14, %%ZTMP
%if (%0 == 17)
vpblendmw %%LFSR_15{k1}, %%ZTMP, %%LFSR_15
vmovdqa32 [%%STATE + OFS_X0]{%%LANE_MASK}, %%LFSR_15 ; BRC_X0
vpslld %%LFSR_11, 16
vpsrld %%LFSR_9, 15
vporq %%LFSR_11, %%LFSR_9
vmovdqa32 [%%STATE + OFS_X1]{%%LANE_MASK}, %%LFSR_11 ; BRC_X1
vpslld %%LFSR_7, 16
vpsrld %%LFSR_5, 15
vporq %%LFSR_7, %%LFSR_5
vmovdqa32 [%%STATE + OFS_X2]{%%LANE_MASK}, %%LFSR_7 ; BRC_X2
vpslld %%LFSR_2, 16
vpsrld %%LFSR_0, 15
vporq %%X3, %%LFSR_2, %%LFSR_0 ; Store BRC_X3 in ZMM register
%else ; %0 == 17
vpblendmw %%X0{%%BLEND_KMASK}, %%ZTMP, %%LFSR_15
vpslld %%LFSR_11, 16
vpsrld %%LFSR_9, 15
vporq %%X1, %%LFSR_11, %%LFSR_9
vpslld %%LFSR_7, 16
vpsrld %%LFSR_5, 15
vporq %%X2, %%LFSR_7, %%LFSR_5
%endif ; %0 == 17
%endif ; USE_GFNI == 1
%endmacro
;
; nonlin_fun16()
;
; return
; W value, updates F_R1[] / F_R2[]
;
%macro nonlin_fun16 14-15
%define %%STATE %1 ; [in] ZUC state
%define %%LANE_MASK %2 ; [in] Mask register with lanes to update
%define %%MODE %3 ; [in] Mode = init or working
%define %%X0 %4 ; [in] ZMM register containing X0 of all lanes (for init)
%define %%X1 %5 ; [in] ZMM register containing X1 of all lanes (for init)
%define %%X2 %6 ; [in] ZMM register containing X2 of all lanes (for init)
%define %%R1 %7 ; [in/out] ZMM register to contain R1 for all lanes (for init)
%define %%R2 %8 ; [in/out] ZMM register to contain R2 for all lanes (for init)
%define %%ZTMP1 %9 ; [clobbered] Temporary ZMM register
%define %%ZTMP2 %10 ; [clobbered] Temporary ZMM register
%define %%ZTMP3 %11 ; [clobbered] Temporary ZMM register
%define %%ZTMP4 %12 ; [clobbered] Temporary ZMM register
%define %%ZTMP5 %13 ; [clobbered] Temporary ZMM register
%define %%ZTMP6 %14 ; [clobbered] Temporary ZMM register
%define %%W %15 ; [out] ZMM register to contain W for all lanes
%define %%W1 %%ZTMP5
%define %%W2 %%ZTMP6
%ifidn %%MODE, init
%if (%0 == 15)
vpxorq %%W, %%X0, %%R1
vpaddd %%W, %%R2 ; W = (BRC_X0 ^ F_R1) + F_R2
%endif
vpaddd %%W1, %%R1, %%X1 ; W1 = F_R1 + BRC_X1
vpxorq %%W2, %%R2, %%X2 ; W2 = F_R2 ^ BRC_X2
%else
%if (%0 == 15)
vmovdqa64 %%W, [%%STATE + OFS_X0]
vpxorq %%W, [%%STATE + OFS_R1]
vpaddd %%W, [%%STATE + OFS_R2] ; W = (BRC_X0 ^ F_R1) + F_R2
%endif
vmovdqa64 %%W1, [%%STATE + OFS_R1]
vmovdqa64 %%W2, [%%STATE + OFS_R2]
vpaddd %%W1, [%%STATE + OFS_X1] ; W1 = F_R1 + BRC_X1
vpxorq %%W2, [%%STATE + OFS_X2] ; W2 = F_R2 ^ BRC_X2
%endif
%if USE_GFNI == 1
vpshldd %%ZTMP1, %%W1, %%W2, 16
vpshldd %%ZTMP2, %%W2, %%W1, 16
%else
vpslld %%ZTMP3, %%W1, 16
vpsrld %%ZTMP4, %%W1, 16
vpslld %%ZTMP5, %%W2, 16
vpsrld %%ZTMP6, %%W2, 16
vporq %%ZTMP1, %%ZTMP3, %%ZTMP6
vporq %%ZTMP2, %%ZTMP4, %%ZTMP5
%endif
vprold %%ZTMP3, %%ZTMP1, 10
vprold %%ZTMP4, %%ZTMP1, 18
vprold %%ZTMP5, %%ZTMP1, 24
vprold %%ZTMP6, %%ZTMP1, 2
; ZMM1 = U = L1(P)
vpternlogq %%ZTMP1, %%ZTMP3, %%ZTMP4, 0x96 ; (A ^ B) ^ C
vpternlogq %%ZTMP1, %%ZTMP5, %%ZTMP6, 0x96 ; (A ^ B) ^ C
vprold %%ZTMP3, %%ZTMP2, 8
vprold %%ZTMP4, %%ZTMP2, 14
vprold %%ZTMP5, %%ZTMP2, 22
vprold %%ZTMP6, %%ZTMP2, 30
; ZMM2 = V = L2(Q)
vpternlogq %%ZTMP2, %%ZTMP3, %%ZTMP4, 0x96 ; (A ^ B) ^ C
vpternlogq %%ZTMP2, %%ZTMP5, %%ZTMP6, 0x96 ; (A ^ B) ^ C
; Shuffle U and V to have all S0 lookups in XMM1 and all S1 lookups in XMM2
; Compress all S0 and S1 input values in each register
; S0: Bytes 0-7,16-23,32-39,48-55 S1: Bytes 8-15,24-31,40-47,56-63
vpshufb %%ZTMP1, [rel S0_S1_shuf]
; S1: Bytes 0-7,16-23,32-39,48-55 S0: Bytes 8-15,24-31,40-47,56-63
vpshufb %%ZTMP2, [rel S1_S0_shuf]
vshufpd %%ZTMP3, %%ZTMP1, %%ZTMP2, 0xAA ; All S0 input values
vshufpd %%ZTMP4, %%ZTMP2, %%ZTMP1, 0xAA ; All S1 input values
; Compute S0 and S1 values
S0_comput_AVX512 %%ZTMP3, %%ZTMP1, %%ZTMP2, USE_GFNI
S1_comput_AVX512 %%ZTMP4, %%ZTMP1, %%ZTMP2, %%ZTMP5, %%ZTMP6, USE_GFNI
; Need to shuffle back %%ZTMP1 & %%ZTMP2 before storing output
; (revert what was done before S0 and S1 computations)
vshufpd %%ZTMP1, %%ZTMP3, %%ZTMP4, 0xAA
vshufpd %%ZTMP2, %%ZTMP4, %%ZTMP3, 0xAA
%ifidn %%MODE, init
vpshufb %%R1, %%ZTMP1, [rel rev_S0_S1_shuf]
vpshufb %%R2, %%ZTMP2, [rel rev_S1_S0_shuf]
%else
vpshufb %%ZTMP1, [rel rev_S0_S1_shuf]
vpshufb %%ZTMP2, [rel rev_S1_S0_shuf]
vmovdqa32 [%%STATE + OFS_R1]{%%LANE_MASK}, %%ZTMP1
vmovdqa32 [%%STATE + OFS_R2]{%%LANE_MASK}, %%ZTMP2
%endif
%endmacro
;
; store_kstr16()
;
%macro store_kstr16 17-23
%define %%DATA64B_L0 %1 ; [in] 64 bytes of keystream for lane 0
%define %%DATA64B_L1 %2 ; [in] 64 bytes of keystream for lane 1
%define %%DATA64B_L2 %3 ; [in] 64 bytes of keystream for lane 2
%define %%DATA64B_L3 %4 ; [in] 64 bytes of keystream for lane 3
%define %%DATA64B_L4 %5 ; [in] 64 bytes of keystream for lane 4
%define %%DATA64B_L5 %6 ; [in] 64 bytes of keystream for lane 5
%define %%DATA64B_L6 %7 ; [in] 64 bytes of keystream for lane 6
%define %%DATA64B_L7 %8 ; [in] 64 bytes of keystream for lane 7
%define %%DATA64B_L8 %9 ; [in] 64 bytes of keystream for lane 8
%define %%DATA64B_L9 %10 ; [in] 64 bytes of keystream for lane 9
%define %%DATA64B_L10 %11 ; [in] 64 bytes of keystream for lane 10
%define %%DATA64B_L11 %12 ; [in] 64 bytes of keystream for lane 11
%define %%DATA64B_L12 %13 ; [in] 64 bytes of keystream for lane 12
%define %%DATA64B_L13 %14 ; [in] 64 bytes of keystream for lane 13
%define %%DATA64B_L14 %15 ; [in] 64 bytes of keystream for lane 14
%define %%DATA64B_L15 %16 ; [in] 64 bytes of keystream for lane 15
%define %%KEY_OFF %17 ; [in] Offset to start writing Keystream
%define %%LANE_MASK %18 ; [in] Lane mask with lanes to generate all keystream words
%define %%ALIGN_MASK %19 ; [in] Address with alignr masks
%define %%MOV_MASK %20 ; [in] Address with move masks
%define %%TMP %21 ; [in] Temporary GP register
%define %%KMASK1 %22 ; [clobbered] Temporary K mask
%define %%KMASK2 %23 ; [clobbered] Temporary K mask
%if (%0 == 17)
vmovdqu64 [pKS + arg3*4], %%DATA64B_L0
vmovdqu64 [pKS + arg3*4 + 64], %%DATA64B_L1
vmovdqu64 [pKS + arg3*4 + 2*64], %%DATA64B_L2
vmovdqu64 [pKS + arg3*4 + 3*64], %%DATA64B_L3
vmovdqu64 [pKS + arg3*4 + 512], %%DATA64B_L4
vmovdqu64 [pKS + arg3*4 + 512 + 64], %%DATA64B_L5
vmovdqu64 [pKS + arg3*4 + 512 + 2*64], %%DATA64B_L6
vmovdqu64 [pKS + arg3*4 + 512 + 3*64], %%DATA64B_L7
vmovdqu64 [pKS + arg3*4 + 512*2], %%DATA64B_L8
vmovdqu64 [pKS + arg3*4 + 512*2 + 64], %%DATA64B_L9
vmovdqu64 [pKS + arg3*4 + 512*2 + 64*2], %%DATA64B_L10
vmovdqu64 [pKS + arg3*4 + 512*2 + 64*3], %%DATA64B_L11
vmovdqu64 [pKS + arg3*4 + 512*3], %%DATA64B_L12
vmovdqu64 [pKS + arg3*4 + 512*3 + 64], %%DATA64B_L13
vmovdqu64 [pKS + arg3*4 + 512*3 + 64*2], %%DATA64B_L14
vmovdqu64 [pKS + arg3*4 + 512*3 + 64*3], %%DATA64B_L15
%else
pext DWORD(%%TMP), DWORD(%%LANE_MASK), [rel extr_bits_0_4_8_12]
kmovq %%KMASK1, [%%ALIGN_MASK + 8*%%TMP]
kmovb %%KMASK2, [%%MOV_MASK + %%TMP]
; Shifting left 8 bytes of KS for lanes which first 8 bytes are skipped
vpalignr %%DATA64B_L3{%%KMASK1}, %%DATA64B_L3, %%DATA64B_L2, 8
vpalignr %%DATA64B_L2{%%KMASK1}, %%DATA64B_L2, %%DATA64B_L1, 8
vpalignr %%DATA64B_L1{%%KMASK1}, %%DATA64B_L1, %%DATA64B_L0, 8
vpalignr %%DATA64B_L0{%%KMASK1}, %%DATA64B_L0, %%DATA64B_L3, 8
vmovdqu64 [pKS + arg3*4]{%%KMASK2}, %%DATA64B_L0
vmovdqu64 [pKS + arg3*4 + 64], %%DATA64B_L1
vmovdqu64 [pKS + arg3*4 + 2*64], %%DATA64B_L2
vmovdqu64 [pKS + arg3*4 + 3*64], %%DATA64B_L3
pext DWORD(%%TMP), DWORD(%%LANE_MASK), [rel extr_bits_1_5_9_13]
kmovq %%KMASK1, [%%ALIGN_MASK + 8*%%TMP]
kmovb %%KMASK2, [%%MOV_MASK + %%TMP]
vpalignr %%DATA64B_L7{%%KMASK1}, %%DATA64B_L7, %%DATA64B_L6, 8
vpalignr %%DATA64B_L6{%%KMASK1}, %%DATA64B_L6, %%DATA64B_L5, 8
vpalignr %%DATA64B_L5{%%KMASK1}, %%DATA64B_L5, %%DATA64B_L4, 8
vpalignr %%DATA64B_L4{%%KMASK1}, %%DATA64B_L4, %%DATA64B_L7, 8
vmovdqu64 [pKS + arg3*4 + 512]{%%KMASK2}, %%DATA64B_L4
vmovdqu64 [pKS + arg3*4 + 512 + 64], %%DATA64B_L5
vmovdqu64 [pKS + arg3*4 + 512 + 64*2], %%DATA64B_L6
vmovdqu64 [pKS + arg3*4 + 512 + 64*3], %%DATA64B_L7
pext DWORD(%%TMP), DWORD(%%LANE_MASK), [rel extr_bits_2_6_10_14]
kmovq %%KMASK1, [%%ALIGN_MASK + 8*%%TMP]
kmovb %%KMASK2, [%%MOV_MASK + %%TMP]
vpalignr %%DATA64B_L11{%%KMASK1}, %%DATA64B_L11, %%DATA64B_L10, 8
vpalignr %%DATA64B_L10{%%KMASK1}, %%DATA64B_L10, %%DATA64B_L9, 8
vpalignr %%DATA64B_L9{%%KMASK1}, %%DATA64B_L9, %%DATA64B_L8, 8
vpalignr %%DATA64B_L8{%%KMASK1}, %%DATA64B_L8, %%DATA64B_L11, 8
vmovdqu64 [pKS + arg3*4 + 512*2]{%%KMASK2}, %%DATA64B_L8
vmovdqu64 [pKS + arg3*4 + 512*2 + 64], %%DATA64B_L9
vmovdqu64 [pKS + arg3*4 + 512*2 + 64*2], %%DATA64B_L10
vmovdqu64 [pKS + arg3*4 + 512*2 + 64*3], %%DATA64B_L11
pext DWORD(%%TMP), DWORD(%%LANE_MASK), [rel extr_bits_3_7_11_15]
kmovq %%KMASK1, [%%ALIGN_MASK + 8*%%TMP]
kmovb %%KMASK2, [%%MOV_MASK + %%TMP]
vpalignr %%DATA64B_L15{%%KMASK1}, %%DATA64B_L15, %%DATA64B_L14, 8
vpalignr %%DATA64B_L14{%%KMASK1}, %%DATA64B_L14, %%DATA64B_L13, 8
vpalignr %%DATA64B_L13{%%KMASK1}, %%DATA64B_L13, %%DATA64B_L12, 8
vpalignr %%DATA64B_L12{%%KMASK1}, %%DATA64B_L12, %%DATA64B_L15, 8
vmovdqu64 [pKS + arg3*4 + 512*3]{%%KMASK2}, %%DATA64B_L12
vmovdqu64 [pKS + arg3*4 + 512*3 + 64], %%DATA64B_L13
vmovdqu64 [pKS + arg3*4 + 512*3 + 64*2], %%DATA64B_L14
vmovdqu64 [pKS + arg3*4 + 512*3 + 64*3], %%DATA64B_L15
%endif
%endmacro
;
; add_mod31()
; add two 32-bit args and reduce mod (2^31-1)
;
%macro add_mod31 4
%define %%IN_OUT %1 ; [in/out] ZMM register with first input and output
%define %%IN2 %2 ; [in] ZMM register with second input
%define %%ZTMP %3 ; [clobbered] Temporary ZMM register
%define %%MASK31 %4 ; [in] ZMM register containing 0x7FFFFFFF's in all dwords
vpaddd %%IN_OUT, %%IN2
vpsrld %%ZTMP, %%IN_OUT, 31
vpandq %%IN_OUT, %%MASK31
vpaddd %%IN_OUT, %%ZTMP
%endmacro
;
; rot_mod31()
; rotate (mult by pow of 2) 32-bit arg and reduce mod (2^31-1)
;
%macro rot_mod31 4
%define %%IN_OUT %1 ; [in/out] ZMM register with input and output
%define %%ZTMP %2 ; [clobbered] Temporary ZMM register
%define %%MASK31 %3 ; [in] ZMM register containing 0x7FFFFFFF's in all dwords
%define %%N_BITS %4 ; [immediate] Number of bits to rotate for each dword
vpslld %%ZTMP, %%IN_OUT, %%N_BITS
vpsrld %%IN_OUT, %%IN_OUT, (31 - %%N_BITS)
vpternlogq %%IN_OUT, %%ZTMP, %%MASK31, 0xA8 ; (A | B) & C
%endmacro
;
; lfsr_updt16()
;
%macro lfsr_updt16 13
%define %%STATE %1 ; [in] ZUC state
%define %%ROUND_NUM %2 ; [in] Round number
%define %%LANE_MASK %3 ; [in] Mask register with lanes to update
%define %%LFSR_0 %4 ; [clobbered] LFSR_0
%define %%LFSR_4 %5 ; [clobbered] LFSR_2
%define %%LFSR_10 %6 ; [clobbered] LFSR_5
%define %%LFSR_13 %7 ; [clobbered] LFSR_7
%define %%LFSR_15 %8 ; [clobbered] LFSR_9
%define %%ZTMP %9 ; [clobbered] Temporary ZMM register
%define %%MASK_31 %10 ; [in] Mask_31
%define %%W %11 ; [in/clobbered] In init mode, contains W for all 16 lanes
%define %%KTMP %12 ; [clobbered] Temporary K mask
%define %%MODE %13 ; [constant] "init" / "work" mode
vmovdqa64 %%LFSR_0, [%%STATE + (( 0 + %%ROUND_NUM) % 16)*64]
vmovdqa64 %%LFSR_4, [%%STATE + (( 4 + %%ROUND_NUM) % 16)*64]
vmovdqa64 %%LFSR_10, [%%STATE + ((10 + %%ROUND_NUM) % 16)*64]
vmovdqa64 %%LFSR_13, [%%STATE + ((13 + %%ROUND_NUM) % 16)*64]
vmovdqa64 %%LFSR_15, [%%STATE + ((15 + %%ROUND_NUM) % 16)*64]
; Calculate LFSR feedback (S_16)
; In Init mode, W is added to the S_16 calculation
%ifidn %%MODE, init
add_mod31 %%W, %%LFSR_0, %%ZTMP, %%MASK_31
%else
vmovdqa64 %%W, %%LFSR_0
%endif
rot_mod31 %%LFSR_0, %%ZTMP, %%MASK_31, 8
add_mod31 %%W, %%LFSR_0, %%ZTMP, %%MASK_31
rot_mod31 %%LFSR_4, %%ZTMP, %%MASK_31, 20
add_mod31 %%W, %%LFSR_4, %%ZTMP, %%MASK_31
rot_mod31 %%LFSR_10, %%ZTMP, %%MASK_31, 21
add_mod31 %%W, %%LFSR_10, %%ZTMP, %%MASK_31
rot_mod31 %%LFSR_13, %%ZTMP, %%MASK_31, 17
add_mod31 %%W, %%LFSR_13, %%ZTMP, %%MASK_31
rot_mod31 %%LFSR_15, %%ZTMP, %%MASK_31, 15
add_mod31 %%W, %%LFSR_15, %%ZTMP, %%MASK_31
vmovdqa32 [%%STATE + (( 0 + %%ROUND_NUM) % 16)*64]{%%LANE_MASK}, %%W
; LFSR_S16 = (LFSR_S15++) = eax
%endmacro
;
; Initialize LFSR registers for a single lane, for ZUC-128
;
; From spec, s_i (LFSR) registers need to be loaded as follows:
;
; For 0 <= i <= 15, let s_i= k_i || d_i || iv_i.
; Where k_i is each byte of the key, d_i is a 15-bit constant
; and iv_i is each byte of the IV.
;
%macro INIT_LFSR_128 4
%define %%KEY %1 ;; [in] Key pointer
%define %%IV %2 ;; [in] IV pointer
%define %%LFSR %3 ;; [out] ZMM register to contain initialized LFSR regs
%define %%ZTMP %4 ;; [clobbered] ZMM temporary register
vbroadcasti64x2 %%LFSR, [%%KEY]
vbroadcasti64x2 %%ZTMP, [%%IV]
vpshufb %%LFSR, [rel shuf_mask_key]
vpsrld %%LFSR, 1
vpshufb %%ZTMP, [rel shuf_mask_iv]
vpternlogq %%LFSR, %%ZTMP, [rel EK_d64], 0xFE ; A OR B OR C
%endmacro
;
; Initialize LFSR registers for a single lane, for ZUC-256
;
%macro INIT_LFSR_256 11
%define %%KEY %1 ;; [in] Key pointer
%define %%IV %2 ;; [in] IV pointer
%define %%LFSR %3 ;; [out] ZMM register to contain initialized LFSR regs
%define %%ZTMP1 %4 ;; [clobbered] ZMM temporary register
%define %%ZTMP2 %5 ;; [clobbered] ZMM temporary register
%define %%ZTMP3 %6 ;; [clobbered] ZMM temporary register
%define %%ZTMP4 %7 ;; [clobbered] ZMM temporary register
%define %%ZTMP5 %8 ;; [clobbered] ZMM temporary register
%define %%CONSTANTS %9 ;; [in] Address to constants
%define %%SHIFT_MASK %10 ;; [in] Mask register to shift K_31
%define %%IV_MASK %11 ;; [in] Mask register to read IV (last 10 bytes)
vmovdqu8 XWORD(%%ZTMP4){%%IV_MASK}, [%%IV + 16]
; Zero out first 2 bits of IV bytes 17-24
vpandq XWORD(%%ZTMP4), [rel iv_mask_low_6]
vshufi32x4 %%ZTMP4, %%ZTMP4, 0
vbroadcasti64x2 %%ZTMP1, [%%KEY]
vbroadcasti64x2 %%ZTMP2, [%%KEY + 16]
vbroadcasti64x2 %%ZTMP3, [%%IV]
vpshufb %%ZTMP5, %%ZTMP1, [rel shuf_mask_key256_first_high]
vpshufb %%LFSR, %%ZTMP3, [rel shuf_mask_iv256_first_high]
vporq %%LFSR, %%ZTMP5
vpsrld %%LFSR, 1
vpshufb %%ZTMP5, %%ZTMP2, [rel shuf_mask_key256_second]
vpsrld %%ZTMP5{%%SHIFT_MASK}, 4
vpandq %%ZTMP5, [rel key_mask_low_4]
vpshufb %%ZTMP1, [rel shuf_mask_key256_first_low]
vpshufb %%ZTMP3, [rel shuf_mask_iv256_first_low]
vpshufb %%ZTMP4, [rel shuf_mask_iv256_second]
vpternlogq %%LFSR, %%ZTMP5, %%ZTMP1, 0xFE
vpternlogq %%LFSR, %%ZTMP3, %%ZTMP4, 0xFE
vporq %%LFSR, [%%CONSTANTS]
%endmacro
%macro INIT_16_AVX512 1
%define %%KEY_SIZE %1 ; [in] Key size (128 or 256)
%ifdef LINUX
%define pKe rdi
%define pIv rsi
%define pState rdx
%define lane_mask ecx
%else
%define pKe rcx
%define pIv rdx
%define pState r8
%define lane_mask r9d
%endif
%define tag_sz r10d ; Only used in ZUC-256 (caller written in assembly, so using a hardcoded register)
%define tag_sz_q r10
%define %%X0 zmm16
%define %%X1 zmm17
%define %%X2 zmm18
%define %%W zmm19
%define %%R1 zmm20
%define %%R2 zmm21
FUNC_SAVE
mov rax, pState
kmovw k2, lane_mask
%if %%KEY_SIZE == 256
; Get pointer to constants (depending on tag size, this will point at
; constants for encryption, authentication with 4-byte, 8-byte or 16-byte tags)
lea r13, [rel EK256_d64]
bsf tag_sz, tag_sz
dec tag_sz
shl tag_sz, 6
add r13, tag_sz_q
mov r11, 0x4000 ; Mask to shift 4 bits only in the 15th dword
kmovq k1, r11
mov r11, 0x3ff ; Mask to read 10 bytes of IV
kmovq k3, r11
%endif
; Set LFSR registers for Packet 1
mov r9, [pKe] ; Load Key 1 pointer
mov r10, [pIv] ; Load IV 1 pointer
%if %%KEY_SIZE == 128
INIT_LFSR_128 r9, r10, zmm0, zmm1
%else
INIT_LFSR_256 r9, r10, zmm0, zmm3, zmm5, zmm7, zmm9, zmm11, r13, k1, k3
%endif
; Set LFSR registers for Packets 2-15
%assign idx 1
%assign reg_lfsr 2
%assign reg_tmp 3
%rep 14
mov r9, [pKe+8*idx] ; Load Key N pointer
mov r10, [pIv+8*idx] ; Load IV N pointer
%if %%KEY_SIZE == 128
INIT_LFSR_128 r9, r10, APPEND(zmm, reg_lfsr), APPEND(zmm, reg_tmp)
%else
INIT_LFSR_256 r9, r10, APPEND(zmm, reg_lfsr), zmm3, zmm5, zmm7, zmm9, zmm11, r13, k1, k3
%endif
%assign idx (idx + 1)
%assign reg_lfsr (reg_lfsr + 2)
%assign reg_tmp (reg_tmp + 2)
%endrep
; Set LFSR registers for Packet 16
mov r9, [pKe+8*15] ; Load Key 16 pointer
mov r10, [pIv+8*15] ; Load IV 16 pointer
%if %%KEY_SIZE == 128
INIT_LFSR_128 r9, r10, zmm30, zmm31
%else
INIT_LFSR_256 r9, r10, zmm30, zmm3, zmm5, zmm7, zmm9, zmm11, r13, k1, k3
%endif
; Store LFSR registers in memory (reordering first, so all S0 regs
; are together, then all S1 regs... until S15)
TRANSPOSE16_U32 zmm0, zmm2, zmm4, zmm6, zmm8, zmm10, zmm12, zmm14, \
zmm16, zmm18, zmm20, zmm22, zmm24, zmm26, zmm28, zmm30, \
zmm1, zmm3, zmm5, zmm7, zmm9, zmm11, zmm13, zmm15, \
zmm17, zmm19, zmm21, zmm23, zmm25, zmm27
%assign i 0
%assign j 0
%rep 16
vmovdqa32 [pState + 64*i]{k2}, APPEND(zmm, j)
%assign i (i+1)
%assign j (j+2)
%endrep
; Load read-only registers
vmovdqa64 zmm12, [rel mask31]
mov edx, 0xAAAAAAAA
kmovd k1, edx
; Zero out R1, R2
vpxorq %%R1, %%R1
vpxorq %%R2, %%R2
; Shift LFSR 32-times, update state variables
%assign N 0
%rep 32
bits_reorg16 rax, N, k2, zmm0, zmm2, zmm5, zmm7, zmm9, zmm11, zmm14, \
zmm15, zmm1, k1, %%X0, %%X1, %%X2
nonlin_fun16 rax, k2, init, %%X0, %%X1, %%X2, %%R1, %%R2, \
zmm1, zmm2, zmm3, zmm4, zmm5, zmm6, %%W
vpsrld %%W,1 ; Shift out LSB of W
lfsr_updt16 rax, N, k2, zmm1, zmm4, zmm10, zmm13, zmm15, \
zmm2, zmm12, %%W, k7, init ; W used in LFSR update
%assign N N+1
%endrep
; And once more, initial round from keygen phase = 33 times
bits_reorg16 rax, 0, k2, zmm0, zmm2, zmm5, zmm7, zmm9, zmm11, zmm14, \
zmm15, zmm1, k1, %%X0, %%X1, %%X2
nonlin_fun16 rax, k2, init, %%X0, %%X1, %%X2, %%R1, %%R2, \
zmm1, zmm2, zmm3, zmm4, zmm5, zmm6
lfsr_updt16 rax, 0, k2, zmm1, zmm4, zmm10, zmm13, zmm15, \
zmm2, zmm12, %%W, k7, work
; Update R1, R2
vmovdqa32 [rax + OFS_R1]{k2}, %%R1
vmovdqa32 [rax + OFS_R2]{k2}, %%R2
FUNC_RESTORE
%endmacro
;;
;; void asm_ZucInitialization_16_avx512(ZucKey16_t *pKeys, ZucIv16_t *pIvs,
;; ZucState16_t *pState)
;;
MKGLOBAL(ZUC128_INIT,function,internal)
ZUC128_INIT:
endbranch64
INIT_16_AVX512 128
ret
;;
;; void asm_Zuc256Initialization_16_avx512(ZucKey16_t *pKeys, ZucIv16_t *pIvs,
;; ZucState16_t *pState, uint32_t tag_sz)
;;
MKGLOBAL(ZUC256_INIT,function,internal)
ZUC256_INIT:
endbranch64
INIT_16_AVX512 256
ret
;
; Generate N*4 bytes of keystream
; for 16 buffers (where N is number of rounds)
;
%macro KEYGEN_16_AVX512 2-3
%define %%NUM_ROUNDS %1 ; [in] Number of 4-byte rounds
%define %%STORE_SINGLE %2 ; [in] If 1, KS will be stored continuosly in a single buffer
%define %%LANE_MASK %3 ; [in] Lane mask with lanes to generate all keystream words
%define pState arg1
%define pKS arg2
%define keyOff arg3
FUNC_SAVE
; Load state pointer in RAX
mov rax, pState
; Load read-only registers
vmovdqa64 zmm12, [rel mask31]
mov r10d, 0xAAAAAAAA
kmovd k1, r10d
%if (%0 == 3)
kmovd k2, DWORD(%%LANE_MASK)
knotd k4, k2
mov r10d, 0x0000FFFF
kmovd k3, r10d
%else
mov r10d, 0x0000FFFF
kmovd k2, r10d
kmovd k3, k2
%endif
; Store all 4 bytes of keystream in a single 64-byte buffer
%if (%%NUM_ROUNDS == 1)
bits_reorg16 rax, 1, k2, zmm0, zmm2, zmm5, zmm7, zmm9, zmm11, zmm14, \
zmm15, zmm1, k1, none, none, none, zmm16
nonlin_fun16 rax, k2, working, none, none, none, none, none, \
zmm1, zmm2, zmm3, zmm4, zmm5, zmm6, zmm0
; OFS_X3 XOR W (zmm0)
vpxorq zmm16, zmm0
lfsr_updt16 rax, 1, k2, zmm1, zmm4, zmm10, zmm13, zmm15, \
zmm2, zmm12, zmm0, k7, work
%else ;; %%NUM_ROUNDS != 1
; Generate N*4B of keystream in N rounds
; Generate first bytes of KS for all lanes
%assign N 1
%assign idx 16
%rep (%%NUM_ROUNDS-2)
bits_reorg16 rax, N, k3, zmm0, zmm2, zmm5, zmm7, zmm9, zmm11, zmm14, \
zmm15, zmm1, k1, none, none, none, APPEND(zmm, idx)
nonlin_fun16 rax, k3, working, none, none, none, none, none, \
zmm1, zmm2, zmm3, zmm4, zmm5, zmm6, zmm0
; OFS_X3 XOR W (zmm0)
vpxorq APPEND(zmm, idx), zmm0
lfsr_updt16 rax, N, k3, zmm1, zmm4, zmm10, zmm13, zmm15, \
zmm2, zmm12, zmm0, k7, work
%assign N N+1
%assign idx (idx + 1)
%endrep
; Generate rest of the KS bytes (last 8 bytes) for selected lanes
%rep 2
bits_reorg16 rax, N, k2, zmm0, zmm2, zmm5, zmm7, zmm9, zmm11, zmm14, \
zmm15, zmm1, k1, none, none, none, APPEND(zmm, idx)
nonlin_fun16 rax, k2, working, none, none, none, none, none, \
zmm1, zmm2, zmm3, zmm4, zmm5, zmm6, zmm0
; OFS_X3 XOR W (zmm0)
vpxorq APPEND(zmm, idx), zmm0
lfsr_updt16 rax, N, k2, zmm1, zmm4, zmm10, zmm13, zmm15, \
zmm2, zmm12, zmm0, k7, work
%assign N N+1
%assign idx (idx + 1)
%endrep
%endif ;; (%%NUM_ROUNDS == 1)
%if (%%STORE_SINGLE == 1)
vmovdqa32 [pKS]{k2}, zmm16
%else
; ZMM16-31 contain the keystreams for each round
; Perform a 32-bit 16x16 transpose to have up to 64 bytes
; (NUM_ROUNDS * 4B) of each lane in a different register
TRANSPOSE16_U32_INTERLEAVED zmm16, zmm17, zmm18, zmm19, zmm20, zmm21, zmm22, zmm23, \
zmm24, zmm25, zmm26, zmm27, zmm28, zmm29, zmm30, zmm31, \
zmm0, zmm1, zmm2, zmm3, zmm4, zmm5, zmm6, zmm7, \
zmm8, zmm9
%if (%0 == 3)
lea r12, [rel alignr_mask]
lea r13, [rel mov_mask]
store_kstr16 zmm6, zmm4, zmm28, zmm16, zmm7, zmm5, zmm29, zmm17, \
zmm2, zmm0, zmm30, zmm18, zmm3, zmm1, zmm31, zmm19, keyOff, \
%%LANE_MASK, r12, r13, r10, k3, k5
%else
store_kstr16 zmm6, zmm4, zmm28, zmm16, zmm7, zmm5, zmm29, zmm17, \
zmm2, zmm0, zmm30, zmm18, zmm3, zmm1, zmm31, zmm19, keyOff
%endif
%endif ;; %%STORE_SINGLE == 1
; Reorder LFSR registers
%if (%0 == 3)
REORDER_LFSR rax, %%NUM_ROUNDS, k2
%if (%%NUM_ROUNDS >= 2)
REORDER_LFSR rax, (%%NUM_ROUNDS - 2), k4 ; 2 less rounds for "old" buffers
%endif
%else
REORDER_LFSR rax, %%NUM_ROUNDS, k2
%endif
FUNC_RESTORE
%endmacro
;;
;; void asm_ZucGenKeystream64B_16_avx512(state16_t *pSta, u32* pKeyStr[16],
;; const u32 key_off)
;;
MKGLOBAL(ZUC_KEYGEN64B_16,function,internal)
ZUC_KEYGEN64B_16:
endbranch64
KEYGEN_16_AVX512 16, 0
ret
;;
;; void asm_ZucGenKeystream64B_16_skip8_avx512(state16_t *pSta, u32* pKeyStr[16],
;; const u32 key_off,
;; const u16 lane_mask)
;;
MKGLOBAL(ZUC_KEYGEN64B_SKIP8_16,function,internal)
ZUC_KEYGEN64B_SKIP8_16:
endbranch64
KEYGEN_16_AVX512 16, 0, arg4
ret
;;
;; void asm_ZucGenKeystream8B_16_avx512(state16_t *pSta, u32* pKeyStr[16],
;; const u32 key_off)
;;
MKGLOBAL(ZUC_KEYGEN8B_16,function,internal)
ZUC_KEYGEN8B_16:
endbranch64
KEYGEN_16_AVX512 2, 0
ret
;;
;; void asm_ZucGenKeystream4B_16_avx512(state16_t *pSta, u32 pKeyStr[16],
;; const u32 lane_mask)
;;
MKGLOBAL(ZUC_KEYGEN4B_16,function,internal)
ZUC_KEYGEN4B_16:
endbranch64
KEYGEN_16_AVX512 1, 1, arg3
ret
%macro KEYGEN_VAR_16_AVX512 1-2
%define %%NUM_ROUNDS %1 ; [in] Number of 4-byte rounds (GP dowrd register)
%define %%LANE_MASK %2 ; [in] Lane mask with lanes to generate full keystream (rest 2 words less)
cmp %%NUM_ROUNDS, 16
je %%_num_rounds_is_16
cmp %%NUM_ROUNDS, 8
je %%_num_rounds_is_8
jb %%_rounds_is_1_7
; Final blocks 9-16
cmp %%NUM_ROUNDS, 12
je %%_num_rounds_is_12
jb %%_rounds_is_9_11
; Final blocks 13-15
cmp %%NUM_ROUNDS, 14
je %%_num_rounds_is_14
ja %%_num_rounds_is_15
jb %%_num_rounds_is_13
%%_rounds_is_9_11:
cmp %%NUM_ROUNDS, 10
je %%_num_rounds_is_10
ja %%_num_rounds_is_11
jb %%_num_rounds_is_9
%%_rounds_is_1_7:
cmp %%NUM_ROUNDS, 4
je %%_num_rounds_is_4
jb %%_rounds_is_1_3
; Final blocks 5-7
cmp %%NUM_ROUNDS, 6
je %%_num_rounds_is_6
ja %%_num_rounds_is_7
jb %%_num_rounds_is_5
%%_rounds_is_1_3:
cmp %%NUM_ROUNDS, 2
je %%_num_rounds_is_2
ja %%_num_rounds_is_3
; Rounds = 1 if fall-through
%assign I 1
%rep 16
APPEND(%%_num_rounds_is_,I):
%if (%0 == 2)
KEYGEN_16_AVX512 I, 0, %%LANE_MASK
%else
KEYGEN_16_AVX512 I, 0
%endif
jmp %%_done
%assign I (I + 1)
%endrep
%%_done:
%endmacro
;;
;; void asm_ZucGenKeystream_16_avx512(state16_t *pSta, u32* pKeyStr[16],
;; const u32 key_off,
;; const u32 numRounds)
;;
MKGLOBAL(ZUC_KEYGEN_16,function,internal)
ZUC_KEYGEN_16:
endbranch64
KEYGEN_VAR_16_AVX512 arg4
ret
;;
;; void asm_ZucGenKeystream_16_skip8_avx512(state16_t *pSta, u32* pKeyStr[16],
;; const u32 key_off,
;; const u16 lane_mask,
;; u32 numRounds)
;;
MKGLOBAL(ZUC_KEYGEN_SKIP8_16,function,internal)
ZUC_KEYGEN_SKIP8_16:
%ifdef LINUX
%define arg5 r8d
%else
%define arg5 [rsp + 40]
%endif
endbranch64
mov r10d, arg5
KEYGEN_VAR_16_AVX512 r10d, arg4
ret
%macro CIPHER64B 5
%define %%NROUNDS %1
%define %%BYTE_MASK %2
%define %%LANE_MASK %3
%define %%OFFSET %4
%define %%LAST_ROUND %5
; Generate N*4B of keystream in N rounds
%assign N 1
%assign idx 16
%rep %%NROUNDS
bits_reorg16 rax, N, %%LANE_MASK, zmm0, zmm2, zmm5, zmm7, zmm9, zmm11, \
zmm14, zmm15, zmm1, k1, none, none, none, APPEND(zmm, idx)
nonlin_fun16 rax, %%LANE_MASK, working, none, none, none, none, none, \
zmm1, zmm2, zmm3, zmm4, zmm5, zmm6, zmm0
; OFS_X3 XOR W (zmm0)
vpxorq APPEND(zmm, idx), zmm0
; Shuffle bytes within KS words to XOR with plaintext later
vpshufb APPEND(zmm, idx), [rel swap_mask]
lfsr_updt16 rax, N, %%LANE_MASK, zmm1, zmm4, zmm10, zmm13, zmm15, \
zmm2, zmm12, zmm0, k7, work
%assign N (N + 1)
%assign idx (idx + 1)
%endrep
; ZMM16-31 contain the keystreams for each round
; Perform a 32-bit 16x16 transpose to have the 64 bytes
; of each lane in a different register
TRANSPOSE16_U32 zmm16, zmm17, zmm18, zmm19, zmm20, zmm21, zmm22, zmm23, \
zmm24, zmm25, zmm26, zmm27, zmm28, zmm29, zmm30, zmm31, \
zmm0, zmm1, zmm2, zmm3, zmm4, zmm5, zmm6, zmm7, \
zmm8, zmm9, zmm10, zmm11, zmm12, zmm13
;; XOR Input buffer with keystream
%if %%LAST_ROUND == 1
lea rbx, [rel byte64_len_to_mask_table]
%endif
;; Read all 16 streams using registers r12-15 into registers zmm0-15
%assign i 0
%assign j 0
%assign k 12
%rep 16
%if %%LAST_ROUND == 1
;; Read number of bytes left to encrypt for the lane stored in stack
;; and construct byte mask to read from input pointer
movzx r12d, word [rsp + j*2]
kmovq %%BYTE_MASK, [rbx + r12*8]
%endif
mov APPEND(r, k), [pIn + i]
vmovdqu8 APPEND(zmm, j){%%BYTE_MASK}{z}, [APPEND(r, k) + %%OFFSET]
%assign k 12 + ((j + 1) % 4)
%assign j (j + 1)
%assign i (i + 8)
%endrep
;; XOR Input (zmm0-15) with Keystreams (zmm16-31)
%assign i 0
%assign j 16
%rep 16
vpxorq zmm %+j, zmm %+i
%assign i (i + 1)
%assign j (j + 1)
%endrep
;; Write output for all 16 buffers (zmm16-31) using registers r12-15
%assign i 0
%assign j 16
%assign k 12
%rep 16
%if %%LAST_ROUND == 1
;; Read length to encrypt for the lane stored in stack
;; and construct byte mask to write to output pointer
movzx r12d, word [rsp + (j-16)*2]
kmovq %%BYTE_MASK, [rbx + r12*8]
%endif
mov APPEND(r, k), [pOut + i]
vmovdqu8 [APPEND(r, k) + %%OFFSET]{%%BYTE_MASK}, APPEND(zmm, j)
%assign k 12 + ((j + 1) % 4)
%assign j (j + 1)
%assign i (i + 8)
%endrep
%endmacro
;;
;; void asm_ZucCipher_16_avx512(state16_t *pSta, u64 *pIn[16],
;; u64 *pOut[16], u16 lengths[16],
;; u64 min_length);
MKGLOBAL(CIPHER_16,function,internal)
CIPHER_16:
%ifdef LINUX
%define pState rdi
%define pIn rsi
%define pOut rdx
%define lengths rcx
%define arg5 r8
%else
%define pState rcx
%define pIn rdx
%define pOut r8
%define lengths r9
%define arg5 [rsp + 40]
%endif
%define min_length r10
%define buf_idx r11
mov min_length, arg5
FUNC_SAVE
; Convert all lengths set to UINT16_MAX (indicating that lane is not valid) to min length
vpbroadcastw ymm0, min_length
vmovdqa ymm1, [lengths]
vpcmpw k1, ymm1, [rel all_ffs], 0
vmovdqu16 ymm1{k1}, ymm0 ; YMM1 contain updated lengths
; Round up to nearest multiple of 4 bytes
vpaddw ymm0, [rel all_threes]
vpandq ymm0, [rel all_fffcs]
; Calculate remaining bytes to encrypt after function call
vpsubw ymm2, ymm1, ymm0
vpxorq ymm3, ymm3
vpcmpw k1, ymm2, ymm3, 1 ; Get mask of lengths < 0
; Set to zero the lengths of the lanes which are going to be completed
vmovdqu16 ymm2{k1}, ymm3 ; YMM2 contain final lengths
vmovdqa [lengths], ymm2 ; Update in memory the final updated lengths
; Calculate number of bytes to encrypt after round of 64 bytes (up to 63 bytes),
; for each lane, and store it in stack to be used in the last round
vpsubw ymm1, ymm2 ; Bytes to encrypt in all lanes
vpandq ymm1, [rel all_3fs] ; Number of final bytes (up to 63 bytes) for each lane
sub rsp, 32
vmovdqu [rsp], ymm1
; Load state pointer in RAX
mov rax, pState
; Load read-only registers
mov r12d, 0xAAAAAAAA
kmovd k1, r12d
mov r12, 0xFFFFFFFFFFFFFFFF
kmovq k2, r12
mov r12d, 0x0000FFFF
kmovd k3, r12d
xor buf_idx, buf_idx
;; Perform rounds of 64 bytes, where LFSR reordering is not needed
loop:
cmp min_length, 64
jl exit_loop
vmovdqa64 zmm12, [rel mask31]
CIPHER64B 16, k2, k3, buf_idx, 0
sub min_length, 64
add buf_idx, 64
jmp loop
exit_loop:
mov r15, min_length
add r15, 3
shr r15, 2 ;; numbers of rounds left (round up length to nearest multiple of 4B)
jz _no_final_rounds
vmovdqa64 zmm12, [rel mask31]
cmp r15, 8
je _num_final_rounds_is_8
jl _final_rounds_is_1_7
; Final blocks 9-16
cmp r15, 12
je _num_final_rounds_is_12
jl _final_rounds_is_9_11
; Final blocks 13-16
cmp r15, 16
je _num_final_rounds_is_16
cmp r15, 15
je _num_final_rounds_is_15
cmp r15, 14
je _num_final_rounds_is_14
cmp r15, 13
je _num_final_rounds_is_13
_final_rounds_is_9_11:
cmp r15, 11
je _num_final_rounds_is_11
cmp r15, 10
je _num_final_rounds_is_10
cmp r15, 9
je _num_final_rounds_is_9
_final_rounds_is_1_7:
cmp r15, 4
je _num_final_rounds_is_4
jl _final_rounds_is_1_3
; Final blocks 5-7
cmp r15, 7
je _num_final_rounds_is_7
cmp r15, 6
je _num_final_rounds_is_6
cmp r15, 5
je _num_final_rounds_is_5
_final_rounds_is_1_3:
cmp r15, 3
je _num_final_rounds_is_3
cmp r15, 2
je _num_final_rounds_is_2
jmp _num_final_rounds_is_1
; Perform encryption of last bytes (<= 64 bytes) and reorder LFSR registers
; if needed (if not all 16 rounds of 4 bytes are done)
%assign I 1
%rep 16
APPEND(_num_final_rounds_is_,I):
CIPHER64B I, k2, k3, buf_idx, 1
REORDER_LFSR rax, I, k3
add buf_idx, min_length
jmp _no_final_rounds
%assign I (I + 1)
%endrep
_no_final_rounds:
add rsp, 32
;; update in/out pointers
add buf_idx, 3
and buf_idx, 0xfffffffffffffffc
vpbroadcastq zmm0, buf_idx
vpaddq zmm1, zmm0, [pIn]
vpaddq zmm2, zmm0, [pIn + 64]
vmovdqa64 [pIn], zmm1
vmovdqa64 [pIn + 64], zmm2
vpaddq zmm1, zmm0, [pOut]
vpaddq zmm2, zmm0, [pOut + 64]
vmovdqa64 [pOut], zmm1
vmovdqa64 [pOut + 64], zmm2
FUNC_RESTORE
ret
;;
;;extern void asm_Eia3Round64B_16(uint32_t *T, const void *KS,
;; const void **DATA, uint16_t *LEN);
;;
;; Updates authentication tag T of 16 buffers based on keystream KS and DATA.
;; - it processes 64 bytes of DATA of buffers
;; - reads data in 16 byte chunks from different buffers
;; (first buffers 0,4,8,12; then 1,5,9,13; etc) and bit reverses them
;; - reads KS (when utilizing VPCLMUL instructions, it reads 64 bytes directly,
;; containing 16 bytes of KS for 4 different buffers)
;; - employs clmul for the XOR & ROL part
;; - copies top 64 bytes of KS to bottom (for the next round)
;; - Updates Data pointers for next rounds
;; - Updates array of lengths
;;
;; @param [in] T: Array of digests for all 16 buffers
;; @param [in] KS: Pointer to 128 bytes of keystream for all 16 buffers (2048 bytes in total)
;; @param [in] DATA: Array of pointers to data for all 16 buffers
;; @param [in] LEN: Array of lengths for all 16 buffers
;;
align 64
MKGLOBAL(ZUC_ROUND64B_16,function,internal)
ZUC_ROUND64B_16:
endbranch64
%ifdef LINUX
%define T rdi
%define KS rsi
%define DATA rdx
%define LEN rcx
%else
%define T rcx
%define KS rdx
%define DATA r8
%define LEN r9
%endif
%if USE_GFNI == 1
%define DATA_ADDR0 rbx
%define DATA_ADDR1 r10
%define DATA_ADDR2 r11
%define DATA_ADDR3 r12
%define DATA_TRANS0 zmm19
%define DATA_TRANS1 zmm20
%define DATA_TRANS2 zmm21
%define DATA_TRANS3 zmm22
%define DATA_TRANS0x xmm19
%define DATA_TRANS1x xmm20
%define DATA_TRANS2x xmm21
%define DATA_TRANS3x xmm22
%define KS_TRANS0 zmm23
%define KS_TRANS1 zmm24
%define KS_TRANS2 zmm25
%define KS_TRANS3 zmm26
%define KS_TRANS4 zmm27
%define KS_TRANS0x xmm23
%define KS_TRANS1x xmm24
%define KS_TRANS2x xmm25
%define KS_TRANS3x xmm26
%define KS_TRANS4x xmm27
%define DIGEST_0 zmm28
%define DIGEST_1 zmm29
%define DIGEST_2 zmm30
%define DIGEST_3 zmm31
%define ZTMP1 zmm0
%define ZTMP2 zmm1
%define ZTMP3 zmm2
%define ZTMP4 zmm3
%define ZTMP5 zmm4
%define ZTMP6 zmm5
%define ZTMP7 zmm6
%define ZTMP8 zmm7
%define YTMP1 YWORD(ZTMP1)
%define MASK_64 zmm8
FUNC_SAVE
vmovdqa64 MASK_64, [rel data_mask_64bits]
;; Read first buffers 0,4,8,12; then 1,5,9,13, and so on,
;; since the keystream is laid out this way, which chunks of
;; 16 bytes interleved. First the 128 bytes for
;; buffers 0,4,8,12 (total of 512 bytes), then the 128 bytes
;; for buffers 1,5,9,13, and so on
%assign IDX 0
%rep 4
vpxorq APPEND(DIGEST_, IDX), APPEND(DIGEST_, IDX)
mov DATA_ADDR0, [DATA + IDX*8 + 0*32]
mov DATA_ADDR1, [DATA + IDX*8 + 1*32]
mov DATA_ADDR2, [DATA + IDX*8 + 2*32]
mov DATA_ADDR3, [DATA + IDX*8 + 3*32]
vmovdqu64 KS_TRANS0, [KS + IDX*64*2*4]
%assign I 0
%assign J 1
%rep 4
vmovdqu64 XWORD(APPEND(DATA_TRANS, I)), [DATA_ADDR0 + 16*I]
vinserti32x4 APPEND(DATA_TRANS, I), [DATA_ADDR1 + 16*I], 1
vinserti32x4 APPEND(DATA_TRANS, I), [DATA_ADDR2 + 16*I], 2
vinserti32x4 APPEND(DATA_TRANS, I), [DATA_ADDR3 + 16*I], 3
vmovdqu64 APPEND(KS_TRANS, J), [KS + IDX*64*2*4 + 64*J]
;; Reverse bits of next 16 bytes from all 4 buffers
vgf2p8affineqb ZTMP1, APPEND(DATA_TRANS,I), [rel bit_reverse_table], 0x00
;; ZUC authentication part
;; - 4x32 data bits
;; - set up KS
vpalignr ZTMP2, APPEND(KS_TRANS, J), APPEND(KS_TRANS, I), 8
vpshufd ZTMP3, APPEND(KS_TRANS, I), 0x61
vpshufd ZTMP4, ZTMP2, 0x61
;; - set up DATA
vpandq ZTMP2, ZTMP1, MASK_64
vpshufd APPEND(DATA_TRANS, I), ZTMP2, 0xdc
vpsrldq ZTMP1, 8
vpshufd ZTMP2, ZTMP1, 0xdc
;; - clmul
;; - xor the results from 4 32-bit words together
vpclmulqdq ZTMP5, APPEND(DATA_TRANS, I), ZTMP3, 0x00
vpclmulqdq ZTMP6, APPEND(DATA_TRANS, I), ZTMP3, 0x11
vpclmulqdq ZTMP7, ZTMP2, ZTMP4, 0x00
vpclmulqdq ZTMP8, ZTMP2, ZTMP4, 0x11
vpternlogq ZTMP5, ZTMP6, ZTMP8, 0x96
vpternlogq APPEND(DIGEST_, IDX), ZTMP5, ZTMP7, 0x96
%assign J (J + 1)
%assign I (I + 1)
%endrep
; Memcpy KS 64-127 bytes to 0-63 bytes
vmovdqa64 ZTMP4, [KS + IDX*4*64*2 + 64*4]
vmovdqa64 ZTMP1, [KS + IDX*4*64*2 + 64*5]
vmovdqa64 ZTMP2, [KS + IDX*4*64*2 + 64*6]
vmovdqa64 ZTMP3, [KS + IDX*4*64*2 + 64*7]
vmovdqa64 [KS + IDX*4*64*2], ZTMP4
vmovdqa64 [KS + IDX*4*64*2 + 64], ZTMP1
vmovdqa64 [KS + IDX*4*64*2 + 64*2], ZTMP2
vmovdqa64 [KS + IDX*4*64*2 + 64*3], ZTMP3
%assign IDX (IDX + 1)
%endrep
;; - update tags
mov r12, 0x3333
mov r13, 0xCCCC
kmovq k1, r12
kmovq k2, r13
vmovdqu64 ZTMP1, [T] ; Input tags
vmovdqa64 ZTMP2, [rel shuf_mask_tags_0_4_8_12]
vmovdqa64 ZTMP3, [rel shuf_mask_tags_0_4_8_12 + 64]
; Get result tags for 16 buffers in different position in each lane
; and blend these tags into an ZMM register.
; Then, XOR the results with the previous tags and write out the result.
vpermt2d DIGEST_0{k1}{z}, ZTMP2, DIGEST_1
vpermt2d DIGEST_2{k2}{z}, ZTMP3, DIGEST_3
vpternlogq ZTMP1, DIGEST_0, DIGEST_2, 0x96 ; A XOR B XOR C
vmovdqu64 [T], ZTMP1
; Update data pointers
vmovdqu64 ZTMP1, [DATA]
vmovdqu64 ZTMP2, [DATA + 64]
vpaddq ZTMP1, [rel add_64]
vpaddq ZTMP2, [rel add_64]
vmovdqu64 [DATA], ZTMP1
vmovdqu64 [DATA + 64], ZTMP2
; Update array of lengths (subtract 512 bits from all lengths if valid lane)
vmovdqa YTMP1, [LEN]
vpcmpw k1, YTMP1, [rel all_ffs], 4
vpsubw YTMP1{k1}, [rel all_512w]
vmovdqa [LEN], YTMP1
%else ; USE_GFNI == 1
%define DIGEST_0 zmm28
%define DIGEST_1 zmm29
%define DIGEST_2 zmm30
%define DIGEST_3 zmm31
%define DATA_ADDR r10
FUNC_SAVE
vmovdqa xmm5, [bit_reverse_table_l]
vmovdqa xmm6, [bit_reverse_table_h]
vmovdqa xmm7, [bit_reverse_and_table]
vmovdqa xmm10, [data_mask_64bits]
;; Read first buffers 0,4,8,12; then 1,5,9,13, and so on,
;; since the keystream is laid out this way, which chunks of
;; 16 bytes interleved. First the 128 bytes for
;; buffers 0,4,8,12 (total of 512 bytes), then the 128 bytes
;; for buffers 1,5,9,13, and so on
%assign I 0
%rep 4
%assign J 0
%rep 4
vpxor xmm9, xmm9
mov DATA_ADDR, [DATA + 8*(J*4 + I)]
%assign K 0
%rep 4
;; read 16 bytes and reverse bits
vmovdqu xmm0, [DATA_ADDR + 16*K]
vpand xmm1, xmm0, xmm7
vpandn xmm2, xmm7, xmm0
vpsrld xmm2, 4
vpshufb xmm8, xmm6, xmm1 ; bit reverse low nibbles (use high table)
vpshufb xmm4, xmm5, xmm2 ; bit reverse high nibbles (use low table)
vpor xmm8, xmm4
; xmm8 - bit reversed data bytes
;; ZUC authentication part
;; - 4x32 data bits
;; - set up KS
%if K != 0
vmovdqa xmm11, xmm12
vmovdqu xmm12, [KS + (16*J + I*512) + (K + 1)*(16*4)]
%else
vmovdqu xmm11, [KS + (16*J + I*512)]
vmovdqu xmm12, [KS + (16*J + I*512) + (16*4)]
%endif
vpalignr xmm13, xmm12, xmm11, 8
vpshufd xmm2, xmm11, 0x61
vpshufd xmm3, xmm13, 0x61
;; - set up DATA
vpand xmm13, xmm10, xmm8
vpshufd xmm0, xmm13, 0xdc
vpsrldq xmm8, 8
vpshufd xmm1, xmm8, 0xdc
;; - clmul
;; - xor the results from 4 32-bit words together
vpclmulqdq xmm13, xmm0, xmm2, 0x00
vpclmulqdq xmm14, xmm0, xmm2, 0x11
vpclmulqdq xmm15, xmm1, xmm3, 0x00
vpclmulqdq xmm8, xmm1, xmm3, 0x11
vpternlogq xmm13, xmm14, xmm8, 0x96
vpternlogq xmm9, xmm13, xmm15, 0x96
%assign K (K + 1)
%endrep
vinserti32x4 APPEND(DIGEST_, I), xmm9, J
%assign J (J + 1)
%endrep
; Memcpy KS 64-127 bytes to 0-63 bytes
vmovdqa64 zmm23, [KS + I*4*64*2 + 64*4]
vmovdqa64 zmm24, [KS + I*4*64*2 + 64*5]
vmovdqa64 zmm25, [KS + I*4*64*2 + 64*6]
vmovdqa64 zmm26, [KS + I*4*64*2 + 64*7]
vmovdqa64 [KS + I*4*64*2], zmm23
vmovdqa64 [KS + I*4*64*2 + 64], zmm24
vmovdqa64 [KS + I*4*64*2 + 64*2], zmm25
vmovdqa64 [KS + I*4*64*2 + 64*3], zmm26
%assign I (I + 1)
%endrep
;; - update tags
mov r12, 0x3333
mov r13, 0xCCCC
kmovq k1, r12
kmovq k2, r13
vmovdqu64 zmm4, [T] ; Input tags
vmovdqa64 zmm0, [rel shuf_mask_tags_0_4_8_12]
vmovdqa64 zmm1, [rel shuf_mask_tags_0_4_8_12 + 64]
; Get result tags for 16 buffers in different position in each lane
; and blend these tags into an ZMM register.
; Then, XOR the results with the previous tags and write out the result.
vpermt2d DIGEST_0{k1}{z}, zmm0, DIGEST_1
vpermt2d DIGEST_2{k2}{z}, zmm1, DIGEST_3
vpternlogq zmm4, DIGEST_0, DIGEST_2, 0x96 ; A XOR B XOR C
vmovdqu64 [T], zmm4
; Update data pointers
vmovdqu64 zmm0, [DATA]
vmovdqu64 zmm1, [DATA + 64]
vpaddq zmm0, [rel add_64]
vpaddq zmm1, [rel add_64]
vmovdqu64 [DATA], zmm0
vmovdqu64 [DATA + 64], zmm1
; Update array of lengths (if lane is valid, so length < UINT16_MAX)
vmovdqa ymm2, [LEN]
vpcmpw k1, ymm2, [rel all_ffs], 4 ; k1 -> valid lanes
vpsubw ymm2{k1}, [rel all_512w]
vmovdqa [LEN], ymm2
%endif ;; USE_GFNI == 0
FUNC_RESTORE
ret
%macro REMAINDER_16 1
%define %%KEY_SIZE %1 ; [constant] Key size (128 or 256)
%ifdef LINUX
%define T rdi
%define KS rsi
%define DATA rdx
%define LEN rcx
%define arg5 r8d
%else
%define T rcx
%define KS rdx
%define DATA r8
%define LEN r9
%define arg5 [rsp + 40]
%endif
%define DIGEST_0 zmm28
%define DIGEST_1 zmm29
%define DIGEST_2 zmm30
%define DIGEST_3 zmm31
%define DATA_ADDR r12
%define KS_ADDR r13
%define N_BYTES r14
%define OFFSET r15
%define MIN_LEN r10d
%define MIN_LEN_Q r10
%define IDX rax
%define TMP rbx
mov MIN_LEN, arg5
FUNC_SAVE
vpbroadcastw ymm0, MIN_LEN
; Get mask of non-NULL lanes (lengths not set to UINT16_MAX, indicating that lane is not valid)
vmovdqa ymm1, [LEN]
vpcmpw k1, ymm1, [rel all_ffs], 4
; Round up to nearest multiple of 32 bits
vpaddw ymm0{k1}, [rel all_31w]
vpandq ymm0, [rel all_ffe0w]
; Calculate remaining bits to authenticate after function call
vpsubw ymm2{k1}, ymm1, ymm0
vpxorq ymm3, ymm3
vpcmpw k2, ymm2, ymm3, 1 ; Get mask of lengths < 0
; Set to zero the lengths of the lanes which are going to be completed
vmovdqu16 ymm2{k2}, ymm3 ; YMM2 contain final lengths
vmovdqu16 [LEN]{k1}, ymm2 ; Update in memory the final updated lengths
; Calculate number of bits to authenticate (up to 511 bits),
; for each lane, and store it in stack to be used later
vpsubw ymm1{k1}{z}, ymm2 ; Bits to authenticate in all lanes (zero out length of NULL lanes)
sub rsp, 32
vmovdqu [rsp], ymm1
xor OFFSET, OFFSET
%if USE_GFNI != 1
vmovdqa xmm5, [bit_reverse_table_l]
vmovdqa xmm6, [bit_reverse_table_h]
vmovdqa xmm7, [bit_reverse_and_table]
%endif
vmovdqa xmm10, [data_mask_64bits]
;; Read first buffers 0,4,8,12; then 1,5,9,13, and so on,
;; since the keystream is laid out this way, which chunks of
;; 16 bytes interleved. First the 128 bytes for
;; buffers 0,4,8,12 (total of 512 bytes), then the 128 bytes
;; for buffers 1,5,9,13, and so on
%assign I 0
%rep 4
%assign J 0
%rep 4
; Read length to authenticate for each buffer
movzx TMP, word [rsp + 2*(I*4 + J)]
vpxor xmm9, xmm9
xor OFFSET, OFFSET
mov DATA_ADDR, [DATA + 8*(I*4 + J)]
%assign K 0
%rep 4
cmp TMP, 128
jb APPEND3(%%Eia3RoundsAVX512_dq_end,I,J)
;; read 16 bytes and reverse bits
vmovdqu xmm0, [DATA_ADDR + OFFSET]
%if USE_GFNI == 1
vgf2p8affineqb xmm8, xmm0, [rel bit_reverse_table], 0x00
%else
vpand xmm1, xmm0, xmm7
vpandn xmm2, xmm7, xmm0
vpsrld xmm2, 4
vpshufb xmm8, xmm6, xmm1 ; bit reverse low nibbles (use high table)
vpshufb xmm4, xmm5, xmm2 ; bit reverse high nibbles (use low table)
vpor xmm8, xmm4
%endif
; xmm8 - bit reversed data bytes
;; ZUC authentication part
;; - 4x32 data bits
;; - set up KS
%if K != 0
vmovdqa xmm11, xmm12
vmovdqu xmm12, [KS + (16*I + J*512) + OFFSET*4 + (16*4)]
%else
vmovdqu xmm11, [KS + (16*I + J*512) + (0*4)]
vmovdqu xmm12, [KS + (16*I + J*512) + (16*4)]
%endif
vpalignr xmm13, xmm12, xmm11, 8
vpshufd xmm2, xmm11, 0x61
vpshufd xmm3, xmm13, 0x61
;; - set up DATA
vpand xmm13, xmm10, xmm8
vpshufd xmm0, xmm13, 0xdc
vpsrldq xmm8, 8
vpshufd xmm1, xmm8, 0xdc
;; - clmul
;; - xor the results from 4 32-bit words together
vpclmulqdq xmm13, xmm0, xmm2, 0x00
vpclmulqdq xmm14, xmm0, xmm2, 0x11
vpclmulqdq xmm15, xmm1, xmm3, 0x00
vpclmulqdq xmm8, xmm1, xmm3, 0x11
vpternlogq xmm13, xmm14, xmm8, 0x96
vpternlogq xmm9, xmm13, xmm15, 0x96
add OFFSET, 16
sub TMP, 128
%assign K (K + 1)
%endrep
APPEND3(%%Eia3RoundsAVX512_dq_end,I,J):
or TMP, TMP
jz APPEND3(%%Eia3RoundsAVX_end,I,J)
; Get number of bytes
mov N_BYTES, TMP
add N_BYTES, 7
shr N_BYTES, 3
lea r11, [rel byte64_len_to_mask_table]
kmovq k1, [r11 + N_BYTES*8]
;; Set up KS
shl OFFSET, 2
vmovdqu xmm1, [KS + (16*I + J*512) + OFFSET]
vmovdqu xmm2, [KS + (16*I + J*512) + OFFSET + 16*4]
shr OFFSET, 2
vpalignr xmm13, xmm2, xmm1, 8
vpshufd xmm11, xmm1, 0x61
vpshufd xmm12, xmm13, 0x61
;; read up to 16 bytes of data, zero bits not needed if partial byte and bit-reverse
vmovdqu8 xmm0{k1}{z}, [DATA_ADDR + OFFSET]
; check if there is a partial byte (less than 8 bits in last byte)
mov rax, TMP
and rax, 0x7
shl rax, 4
lea r11, [rel bit_mask_table]
add r11, rax
; Get mask to clear last bits
vmovdqa xmm3, [r11]
; Shift left 16-N bytes to have the last byte always at the end of the XMM register
; to apply mask, then restore by shifting right same amount of bytes
mov r11, 16
sub r11, N_BYTES
; r13 = DATA_ADDR can be used at this stage
XVPSLLB xmm0, r11, xmm4, r13
vpandq xmm0, xmm3
XVPSRLB xmm0, r11, xmm4, r13
%if USE_GFNI == 1
vgf2p8affineqb xmm8, xmm0, [rel bit_reverse_table], 0x00
%else
; Bit reverse input data
vpand xmm1, xmm0, xmm7
vpandn xmm2, xmm7, xmm0
vpsrld xmm2, 4
vpshufb xmm8, xmm6, xmm1 ; bit reverse low nibbles (use high table)
vpshufb xmm3, xmm5, xmm2 ; bit reverse high nibbles (use low table)
vpor xmm8, xmm3
%endif
;; Set up DATA
vpand xmm13, xmm10, xmm8
vpshufd xmm0, xmm13, 0xdc ; D 0-3 || Os || D 4-7 || 0s
vpsrldq xmm8, 8
vpshufd xmm1, xmm8, 0xdc ; D 8-11 || 0s || D 12-15 || 0s
;; - clmul
;; - xor the results from 4 32-bit words together
vpclmulqdq xmm13, xmm0, xmm11, 0x00
vpclmulqdq xmm14, xmm0, xmm11, 0x11
vpclmulqdq xmm15, xmm1, xmm12, 0x00
vpclmulqdq xmm8, xmm1, xmm12, 0x11
vpternlogq xmm9, xmm14, xmm13, 0x96
vpternlogq xmm9, xmm15, xmm8, 0x96
APPEND3(%%Eia3RoundsAVX_end,I,J):
vinserti32x4 APPEND(DIGEST_, I), xmm9, J
%assign J (J + 1)
%endrep
%assign I (I + 1)
%endrep
;; - update tags
mov TMP, 0x00FF
kmovq k1, TMP
mov TMP, 0xFF00
kmovq k2, TMP
vmovdqu64 zmm4, [T] ; Input tags
vmovdqa64 zmm0, [rel shuf_mask_tags_0_1_2_3]
vmovdqa64 zmm1, [rel shuf_mask_tags_0_1_2_3 + 64]
; Get result tags for 16 buffers in different position in each lane
; and blend these tags into an ZMM register.
; Then, XOR the results with the previous tags and write out the result.
vpermt2d DIGEST_0{k1}{z}, zmm0, DIGEST_1
vpermt2d DIGEST_2{k2}{z}, zmm1, DIGEST_3
vpternlogq zmm4, DIGEST_0, DIGEST_2, 0x96 ; A XOR B XOR C
vmovdqa64 [T], zmm4 ; Store temporary digests
; These last steps should be done only for the buffers that
; have no more data to authenticate
xor IDX, IDX
%%start_loop:
; Update data pointer
movzx r11d, word [rsp + IDX*2]
shr r11d, 3 ; length authenticated in bytes
add [DATA + IDX*8], r11
cmp word [LEN + 2*IDX], 0
jnz %%skip_comput
mov r11, IDX
and r11, 0x3
shl r11, 9 ; * 512
mov r12, IDX
shr r12, 2
shl r12, 4 ; * 16
add r11, r12
lea KS_ADDR, [KS + r11]
; Read digest
mov r12d, [T + 4*IDX]
; Read keyStr[MIN_LEN / 32]
movzx TMP, word [rsp + 2*IDX]
mov r15, TMP
shr r15, 5
mov r11, r15
shr r15, 2
shl r15, (4+2)
and r11, 0x3
shl r11, 2
add r15, r11
mov r11, r15
and r11, 0xf
cmp r11, 12
je %%_read_2dwords
mov r11, [KS_ADDR + r15]
jmp %%_ks_qword_read
;; The 8 bytes of KS are separated
%%_read_2dwords:
mov r11d, [KS_ADDR + r15]
mov r15d, [KS_ADDR + r15 + (4+48)]
shl r15, 32
or r11, r15
%%_ks_qword_read:
; Rotate left by MIN_LEN % 32
mov r15, rcx
mov rcx, TMP
and rcx, 0x1F
rol r11, cl
mov rcx, r15
; XOR with current digest
xor r12d, r11d
%if %%KEY_SIZE == 128
; Read keystr[L - 1] (last dword of keyStr)
add TMP, (31 + 64)
shr TMP, 5 ; L
dec TMP
mov r11, TMP
shr r11, 2
shl r11, (4+2)
and TMP, 0x3
shl TMP, 2
add TMP, r11
mov r11d, [KS_ADDR + TMP]
; XOR with current digest
xor r12d, r11d
%endif
; byte swap and write digest out
bswap r12d
mov [T + 4*IDX], r12d
%%skip_comput:
inc IDX
cmp IDX, 16
jne %%start_loop
add rsp, 32
; Memcpy last 8 bytes of KS into start
add MIN_LEN, 31
shr MIN_LEN, 5
shl MIN_LEN, 2 ; Offset where to copy the last 8 bytes from
mov r12d, MIN_LEN
shr MIN_LEN, 4
shl MIN_LEN, (4+2)
and r12d, 0xf
add MIN_LEN, r12d
cmp r12d, 12
je %%_copy_2dwords
%assign %%i 0
%rep 4
%assign %%j 0
%rep 4
mov TMP, [KS + 512*%%i + 16*%%j + MIN_LEN_Q]
mov [KS + 512*%%i + 16*%%j], TMP
%assign %%j (%%j + 1)
%endrep
%assign %%i (%%i + 1)
%endrep
jmp %%_ks_copied
;; The 8 bytes of KS are separated
%%_copy_2dwords:
%assign %%i 0
%rep 4
%assign %%j 0
%rep 4
mov DWORD(TMP), [KS + 512*%%i + 16*%%j + MIN_LEN_Q]
mov [KS + 512*%%i + 16*%%j], DWORD(TMP)
mov DWORD(TMP), [KS + 512*%%i + 16*%%j + (48+4) + MIN_LEN_Q]
mov [KS + 512*%%i + 16*%%j + 4], DWORD(TMP)
%assign %%j (%%j + 1)
%endrep
%assign %%i (%%i + 1)
%endrep
%%_ks_copied:
vzeroupper
FUNC_RESTORE
ret
%endmacro
;;
;; extern void asm_Eia3RemainderAVX512_16(uint32_t *T, const void **ks, const void **data, uint64_t n_bits)
;;
;; @param [in] T: Array of digests for all 16 buffers
;; @param [in] KS : Array of pointers to key stream for all 16 buffers
;; @param [in] DATA : Array of pointers to data for all 16 buffers
;; @param [in] N_BITS (number data bits to process)
;;
align 64
MKGLOBAL(ZUC128_REMAINDER_16,function,internal)
ZUC128_REMAINDER_16:
endbranch64
REMAINDER_16 128
;;
;; extern void asm_Eia3_256_RemainderAVX512_16(uint32_t *T, const void **ks, const void **data, uint64_t n_bits)
;;
;; @param [in] T: Array of digests for all 16 buffers
;; @param [in] KS : Array of pointers to key stream for all 16 buffers
;; @param [in] DATA : Array of pointers to data for all 16 buffers
;; @param [in] N_BITS (number data bits to process)
;;
align 64
MKGLOBAL(ZUC256_REMAINDER_16,function,internal)
ZUC256_REMAINDER_16:
endbranch64
REMAINDER_16 256
; Following functions only need AVX512 instructions (no VAES, GFNI, etc.)
%if USE_GFNI == 0
;;
;; extern void asm_Eia3RemainderAVX512(uint32_t *T, const void *ks,
;; const void *data, uint64_t n_bits)
;;
;; Returns authentication update value to be XOR'ed with current authentication tag
;;
;; @param [in] T (digest pointer)
;; @param [in] KS (key stream pointer)
;; @param [in] DATA (data pointer)
;; @param [in] N_BITS (number data bits to process)
;;
align 64
MKGLOBAL(asm_Eia3RemainderAVX512,function,internal)
asm_Eia3RemainderAVX512:
endbranch64
%ifdef LINUX
%define T rdi
%define KS rsi
%define DATA rdx
%define N_BITS rcx
%else
%define T rcx
%define KS rdx
%define DATA r8
%define N_BITS r9
%endif
%define N_BYTES rbx
%define OFFSET r15
FUNC_SAVE
vmovdqa xmm5, [bit_reverse_table_l]
vmovdqa xmm6, [bit_reverse_table_h]
vmovdqa xmm7, [bit_reverse_and_table]
vmovdqa xmm10, [data_mask_64bits]
vpxor xmm9, xmm9
xor OFFSET, OFFSET
%assign I 0
%rep 3
cmp N_BITS, 128
jb Eia3RoundsAVX512_dq_end
;; read 16 bytes and reverse bits
vmovdqu xmm0, [DATA + OFFSET]
vpand xmm1, xmm0, xmm7
vpandn xmm2, xmm7, xmm0
vpsrld xmm2, 4
vpshufb xmm8, xmm6, xmm1 ; bit reverse low nibbles (use high table)
vpshufb xmm4, xmm5, xmm2 ; bit reverse high nibbles (use low table)
vpor xmm8, xmm4
; xmm8 - bit reversed data bytes
;; ZUC authentication part
;; - 4x32 data bits
;; - set up KS
%if I != 0
vmovdqa xmm11, xmm12
vmovdqu xmm12, [KS + OFFSET + (4*4)]
%else
vmovdqu xmm11, [KS + (0*4)]
vmovdqu xmm12, [KS + (4*4)]
%endif
vpalignr xmm13, xmm12, xmm11, 8
vpshufd xmm2, xmm11, 0x61
vpshufd xmm3, xmm13, 0x61
;; - set up DATA
vpand xmm13, xmm10, xmm8
vpshufd xmm0, xmm13, 0xdc
vpsrldq xmm8, 8
vpshufd xmm1, xmm8, 0xdc
;; - clmul
;; - xor the results from 4 32-bit words together
vpclmulqdq xmm13, xmm0, xmm2, 0x00
vpclmulqdq xmm14, xmm0, xmm2, 0x11
vpclmulqdq xmm15, xmm1, xmm3, 0x00
vpclmulqdq xmm8, xmm1, xmm3, 0x11
vpternlogq xmm13, xmm14, xmm8, 0x96
vpternlogq xmm9, xmm13, xmm15, 0x96
add OFFSET, 16
sub N_BITS, 128
%assign I (I + 1)
%endrep
Eia3RoundsAVX512_dq_end:
or N_BITS, N_BITS
jz Eia3RoundsAVX_end
; Get number of bytes
mov N_BYTES, N_BITS
add N_BYTES, 7
shr N_BYTES, 3
lea r10, [rel byte64_len_to_mask_table]
kmovq k1, [r10 + N_BYTES*8]
;; Set up KS
vmovdqu xmm1, [KS + OFFSET]
vmovdqu xmm2, [KS + OFFSET + 16]
vpalignr xmm13, xmm2, xmm1, 8
vpshufd xmm11, xmm1, 0x61
vpshufd xmm12, xmm13, 0x61
;; read up to 16 bytes of data, zero bits not needed if partial byte and bit-reverse
vmovdqu8 xmm0{k1}{z}, [DATA + OFFSET]
; check if there is a partial byte (less than 8 bits in last byte)
mov rax, N_BITS
and rax, 0x7
shl rax, 4
lea r10, [rel bit_mask_table]
add r10, rax
; Get mask to clear last bits
vmovdqa xmm3, [r10]
; Shift left 16-N bytes to have the last byte always at the end of the XMM register
; to apply mask, then restore by shifting right same amount of bytes
mov r10, 16
sub r10, N_BYTES
XVPSLLB xmm0, r10, xmm4, r11
vpandq xmm0, xmm3
XVPSRLB xmm0, r10, xmm4, r11
; Bit reverse input data
vpand xmm1, xmm0, xmm7
vpandn xmm2, xmm7, xmm0
vpsrld xmm2, 4
vpshufb xmm8, xmm6, xmm1 ; bit reverse low nibbles (use high table)
vpshufb xmm3, xmm5, xmm2 ; bit reverse high nibbles (use low table)
vpor xmm8, xmm3
;; Set up DATA
vpand xmm13, xmm10, xmm8
vpshufd xmm0, xmm13, 0xdc ; D 0-3 || Os || D 4-7 || 0s
vpsrldq xmm8, 8
vpshufd xmm1, xmm8, 0xdc ; D 8-11 || 0s || D 12-15 || 0s
;; - clmul
;; - xor the results from 4 32-bit words together
vpclmulqdq xmm13, xmm0, xmm11, 0x00
vpclmulqdq xmm14, xmm0, xmm11, 0x11
vpclmulqdq xmm15, xmm1, xmm12, 0x00
vpclmulqdq xmm8, xmm1, xmm12, 0x11
vpternlogq xmm9, xmm14, xmm13, 0x96
vpternlogq xmm9, xmm15, xmm8, 0x96
Eia3RoundsAVX_end:
mov r11d, [T]
vmovq rax, xmm9
shr rax, 32
xor eax, r11d
; Read keyStr[N_BITS / 32]
lea r10, [N_BITS + OFFSET*8] ; Restore original N_BITS
shr r10, 5
mov r11, [KS + r10*4]
; Rotate left by N_BITS % 32
mov r12, rcx ; Save RCX
mov rcx, N_BITS
and rcx, 0x1F
rol r11, cl
mov rcx, r12 ; Restore RCX
; XOR with previous digest calculation
xor eax, r11d
; Read keyStr[L - 1] (last double word of keyStr)
lea r10, [N_BITS + OFFSET*8] ; Restore original N_BITS
add r10, (31 + 64)
shr r10, 5 ; L
dec r10
mov r11d, [KS + r10 * 4]
; XOR with previous digest calculation and bswap it
xor eax, r11d
bswap eax
mov [T], eax
FUNC_RESTORE
ret
;;
;;extern void asm_Eia3Round64BAVX512(uint32_t *T, const void *KS, const void *DATA)
;;
;; Updates authentication tag T based on keystream KS and DATA.
;; - it processes 64 bytes of DATA
;; - reads data in 16 byte chunks and bit reverses them
;; - reads and re-arranges KS
;; - employs clmul for the XOR & ROL part
;;
;; @param [in] T (digest pointer)
;; @param [in] KS (key stream pointer)
;; @param [in] DATA (data pointer)
;;
align 64
MKGLOBAL(asm_Eia3Round64BAVX512,function,internal)
asm_Eia3Round64BAVX512:
endbranch64
%ifdef LINUX
%define T rdi
%define KS rsi
%define DATA rdx
%else
%define T rcx
%define KS rdx
%define DATA r8
%endif
FUNC_SAVE
vmovdqa xmm5, [bit_reverse_table_l]
vmovdqa xmm6, [bit_reverse_table_h]
vmovdqa xmm7, [bit_reverse_and_table]
vmovdqa xmm10, [data_mask_64bits]
vpxor xmm9, xmm9
%assign I 0
%rep 4
;; read 16 bytes and reverse bits
vmovdqu xmm0, [DATA + 16*I]
vpand xmm1, xmm0, xmm7
vpandn xmm2, xmm7, xmm0
vpsrld xmm2, 4
vpshufb xmm8, xmm6, xmm1 ; bit reverse low nibbles (use high table)
vpshufb xmm4, xmm5, xmm2 ; bit reverse high nibbles (use low table)
vpor xmm8, xmm4
; xmm8 - bit reversed data bytes
;; ZUC authentication part
;; - 4x32 data bits
;; - set up KS
%if I != 0
vmovdqa xmm11, xmm12
vmovdqu xmm12, [KS + (I*16) + (4*4)]
%else
vmovdqu xmm11, [KS + (I*16) + (0*4)]
vmovdqu xmm12, [KS + (I*16) + (4*4)]
%endif
vpalignr xmm13, xmm12, xmm11, 8
vpshufd xmm2, xmm11, 0x61
vpshufd xmm3, xmm13, 0x61
;; - set up DATA
vpand xmm13, xmm10, xmm8
vpshufd xmm0, xmm13, 0xdc
vpsrldq xmm8, 8
vpshufd xmm1, xmm8, 0xdc
;; - clmul
;; - xor the results from 4 32-bit words together
vpclmulqdq xmm13, xmm0, xmm2, 0x00
vpclmulqdq xmm14, xmm0, xmm2, 0x11
vpclmulqdq xmm15, xmm1, xmm3, 0x00
vpclmulqdq xmm8, xmm1, xmm3, 0x11
vpternlogq xmm13, xmm14, xmm8, 0x96
vpternlogq xmm9, xmm13, xmm15, 0x96
%assign I (I + 1)
%endrep
;; - update T
vmovq rax, xmm9
shr rax, 32
mov r10d, [T]
xor eax, r10d
mov [T], eax
FUNC_RESTORE
ret
%endif ; USE_GFNI == 0
;----------------------------------------------------------------------------------------
;----------------------------------------------------------------------------------------
%ifdef LINUX
section .note.GNU-stack noalloc noexec nowrite progbits
%endif
|
mc-sema/validator/x86_64/tests/CVTSS2SDrm.asm | randolphwong/mcsema | 2 | 4644 | BITS 64
;TEST_FILE_META_BEGIN
;TEST_TYPE=TEST_F
;TEST_IGNOREFLAGS=
;TEST_FILE_META_END
;TEST_BEGIN_RECORDING
lea rcx, [rsp-4]
mov DWORD [rcx], 0x3fc00000
cvtss2sd xmm0, [rcx]
mov ecx, [rcx]
;TEST_END_RECORDING
xor ecx, ecx
cvtsi2sd xmm0, ecx
|
src/util-texts-formats.adb | Letractively/ada-util | 60 | 6188 | -----------------------------------------------------------------------
-- Util-texts-formats -- Text Format ala Java MessageFormat
-- Copyright (C) 2001, 2002, 2003, 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.
-----------------------------------------------------------------------
package body Util.Texts.Formats is
type Code is mod 2**32;
-- ------------------------------
-- Format the message and replace occurrences of argument patterns by
-- their associated value.
-- Returns the formatted message in the stream
-- ------------------------------
procedure Format (Message : in Input;
Arguments : in Value_List;
Into : in out Stream) is
C : Code;
Old_Pos : Natural;
N : Natural;
Pos : Natural := Message'First;
begin
while Pos <= Message'Last loop
C := Char'Pos (Message (Pos));
if C = Character'Pos ('{') then
N := 0;
Pos := Pos + 1;
Old_Pos := Pos;
while Pos <= Message'Last loop
C := Char'Pos (Message (Pos));
if C >= Character'Pos ('0') and C <= Character'Pos ('9') then
N := N * 10 + Natural (C - Character'Pos ('0'));
Pos := Pos + 1;
elsif C = Character'Pos ('}') then
if N >= Arguments'Length then
Put (Into, '{');
Pos := Old_Pos;
else
Format (Arguments (N + Arguments'First), Into);
Pos := Pos + 1;
end if;
exit;
else
Put (Into, '{');
Pos := Old_Pos;
exit;
end if;
end loop;
else
Put (Into, Character'Val (C));
Pos := Pos + 1;
end if;
end loop;
end Format;
procedure Format (Argument : in Value;
Into : in out Stream) is
Content : constant Input := To_Input (Argument);
C : Code;
begin
for I in Content'Range loop
C := Char'Pos (Content (I));
Put (Into, Character'Val (C));
end loop;
end Format;
end Util.Texts.Formats;
|
Transynther/x86/_processed/NC/_ht_st_un_/i9-9900K_12_0xa0_notsx.log_23_1547.asm | ljhsiun2/medusa | 9 | 3012 | <reponame>ljhsiun2/medusa<gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r15
push %r9
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x1a78a, %rdx
nop
nop
xor %rsi, %rsi
mov (%rdx), %ax
nop
and %r15, %r15
lea addresses_UC_ht+0x1b2b9, %r15
nop
xor %r11, %r11
mov $0x6162636465666768, %rdx
movq %rdx, (%r15)
nop
nop
sub %rax, %rax
lea addresses_UC_ht+0x1be59, %r9
inc %rcx
movw $0x6162, (%r9)
nop
nop
nop
nop
cmp $11358, %r11
lea addresses_D_ht+0x1bab9, %rax
nop
nop
nop
nop
nop
sub $43333, %rdx
movb $0x61, (%rax)
nop
nop
dec %rdx
lea addresses_WT_ht+0x7ff2, %rsi
lea addresses_D_ht+0x12879, %rdi
nop
nop
dec %rax
mov $17, %rcx
rep movsw
nop
inc %r9
lea addresses_UC_ht+0x1a90, %rsi
lea addresses_D_ht+0x18b59, %rdi
nop
nop
nop
nop
and %r15, %r15
mov $92, %rcx
rep movsb
nop
nop
nop
dec %rsi
lea addresses_WT_ht+0x14919, %r11
nop
add $28510, %r15
mov (%r11), %rdi
nop
nop
nop
nop
nop
cmp %r15, %r15
lea addresses_UC_ht+0x16eeb, %rax
nop
nop
nop
nop
nop
add $19177, %r15
mov (%rax), %rcx
nop
nop
add $1745, %r11
lea addresses_WT_ht+0xce39, %rdi
clflush (%rdi)
nop
nop
and $4140, %rdx
movw $0x6162, (%rdi)
nop
sub $42647, %rdx
lea addresses_D_ht+0x117ff, %r15
nop
nop
inc %rdx
mov (%r15), %r9
nop
nop
nop
nop
cmp $37234, %r11
lea addresses_A_ht+0x195f9, %rsi
lea addresses_UC_ht+0x16519, %rdi
nop
nop
nop
cmp $25485, %r9
mov $39, %rcx
rep movsw
nop
cmp %r9, %r9
lea addresses_WC_ht+0x1af33, %rcx
nop
nop
nop
sub %rax, %rax
mov $0x6162636465666768, %rdx
movq %rdx, (%rcx)
nop
nop
nop
add %r9, %r9
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r15
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r13
push %r14
push %rbp
push %rcx
push %rdx
// Load
mov $0x2184cf0000000eb9, %rcx
nop
nop
nop
nop
xor $56761, %rdx
movups (%rcx), %xmm6
vpextrq $0, %xmm6, %r11
nop
nop
nop
nop
and $47125, %r11
// Load
lea addresses_WC+0xd1b9, %rbp
nop
nop
nop
nop
and %r13, %r13
vmovups (%rbp), %ymm0
vextracti128 $1, %ymm0, %xmm0
vpextrq $0, %xmm0, %r12
nop
nop
nop
nop
cmp %r12, %r12
// Faulty Load
mov $0x6cfb410000000ab9, %r12
nop
sub %rcx, %rcx
movups (%r12), %xmm3
vpextrq $1, %xmm3, %rbp
lea oracles, %r12
and $0xff, %rbp
shlq $12, %rbp
mov (%r12,%rbp,1), %rbp
pop %rdx
pop %rcx
pop %rbp
pop %r14
pop %r13
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 9}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 5}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 16, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WT_ht', 'AVXalign': True, 'size': 2, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 11}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': True, 'congruent': 3}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': True, 'congruent': 11}}
{'src': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}}
{'src': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 4, 'same': False}}
{'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 8, 'NT': True, 'same': False, 'congruent': 5}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 1}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': True, 'size': 2, 'NT': False, 'same': False, 'congruent': 5}}
{'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': True, 'congruent': 1}}
{'08': 7, '88': 2, '45': 8, '0d': 2, '35': 1, 'ea': 2, '80': 1}
ea 45 45 45 08 ea 35 08 45 45 80 08 88 08 88 45 45 08 08 45 0d 0d 08
*/
|
src/skill-equals.ads | skill-lang/adaCommon | 0 | 11183 | -- ___ _ ___ _ _ --
-- / __| |/ (_) | | Common SKilL implementation --
-- \__ \ ' <| | | |__ equals used in skill --
-- |___/_|\_\_|_|____| by: <NAME> --
-- --
pragma Ada_2012;
with Ada.Containers;
with Ada.Strings.Hash;
with Skill.Types;
with Skill.Types.Pools;
with Interfaces;
-- the trick of this package is to instantiate equals codes as Skill.Equals.equals
-- independent of the type! :)
package Skill.Equals is
-- pragma Preelaborate;
use type Skill.Types.String_Access;
use Interfaces;
function Equals
(A, B : Skill.Types.String_Access) return Boolean is
(A = B
or else ((null /= A and null /= B) and then A.all = B.all)
);
use type Skill.Types.Pools.Pool;
function Equals
(A, B : Skill.Types.Pools.Pool) return Boolean is
(A = B);
function Equals
(A, B : Interfaces.Integer_8) return Boolean is
(A = B);
function Equals
(A, B : Interfaces.Integer_16) return Boolean is
(A = B);
function Equals
(A, B : Interfaces.Integer_32) return Boolean is
(A = B);
function Equals
(A, B : Interfaces.Integer_64) return Boolean is
(A = B);
end Skill.Equals;
|
oeis/337/A337297.asm | neoneye/loda-programs | 0 | 768 | <reponame>neoneye/loda-programs
; A337297: Sum of the coordinates of all pairs of divisors of n, (d1,d2), such that d1 < d2.
; 0,3,4,14,6,36,8,45,26,54,12,140,14,72,72,124,18,195,20,210,96,108,24,420,62,126,120,280,30,504,32,315,144,162,144,728,38,180,168,630,42,672,44,420,390,216,48,1116,114,465,216,490,54,840,216,840,240,270,60,1848,62,288
add $0,1
mov $2,$0
lpb $0
mov $3,$2
dif $3,$0
cmp $3,$2
cmp $3,0
add $1,$3
mul $3,$0
sub $0,1
add $4,$3
lpe
add $4,1
mul $1,$4
mov $0,$1
|
commands/navigation/open-terminal-from-finder.applescript | maheshthedev/script-commands | 0 | 447 | <reponame>maheshthedev/script-commands
#!/usr/bin/osascript
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Open Current Finder Directory in Terminal
# @raycast.mode silent
# @raycast.packageName Navigation
#
# Optional parameters:
# @raycast.icon 📟
#
# Documentation:
# @raycast.description Open current Finder directory in Terminal
# @raycast.author <NAME>
# @raycast.authorURL https://github.com/japanese-goblinn
tell application "Finder"
-- Check if there's a selection; works if there's a window open or not.
if selection is not {} then
set i to item 1 of (get selection)
-- If it's an alias, set the item to the original item.
if class of i is alias file then
set i to original item of i
end if
-- If it's a folder, use its path.
if class of i is folder then
set p to i
else
-- If it's an item, use its container's path.
set p to container of i
end if
else if (exists window 1) and current view of window 1 is in {list view, flow view} then
-- If a window exist, use its folder property as the path.
set p to folder of window 1
else
-- Fallback to the Desktop, as nothing is open or selected.
set p to path to desktop folder
end if
set command to "cd " & quoted form of POSIX path of (p as alias) & ";clear;"
end tell
tell application "Terminal"
if not (exists window 1) then reopen
activate
if busy of window 1 then
tell application "System Events" to keystroke "t" using command down
end if
do script command in window 1
end tell
return ""
|
oeis/163/A163303.asm | neoneye/loda-programs | 11 | 86782 | <filename>oeis/163/A163303.asm
; A163303: a(n) = n^3 + 73*n^2 + n + 67.
; 67,142,369,754,1303,2022,2917,3994,5259,6718,8377,10242,12319,14614,17133,19882,22867,26094,29569,33298,37287,41542,46069,50874,55963,61342,67017,72994,79279,85878,92797,100042,107619,115534,123793,132402,141367,150694,160389,170458,180907,191742,202969,214594,226623,239062,251917,265194,278899,293038,307617,322642,338119,354054,370453,387322,404667,422494,440809,459618,478927,498742,519069,539914,561283,583182,605617,628594,652119,676198,700837,726042,751819,778174,805113,832642,860767,889494
mov $1,$0
pow $1,3
mov $4,$0
add $0,$1
add $0,67
mov $3,$4
mul $3,$4
mov $2,$3
mul $2,73
add $0,$2
|
src/SystemF/BigStep/Types.agda | ajrouvoet/implicits.agda | 4 | 8945 | module SystemF.BigStep.Types where
open import Prelude
-- types are indexed by the number of open tvars
infixl 10 _⇒_
data Type (n : ℕ) : Set where
Unit : Type n
ν : (i : Fin n) → Type n
_⇒_ : Type n → Type n → Type n
∀' : Type (suc n) → Type n
open import Data.Fin.Substitution
open import Data.Vec
module App {T} (l : Lift T Type )where
open Lift l hiding (var)
_/_ : ∀ {m n} → Type m → Sub T m n → Type n
Unit / s = Unit
ν i / s = lift (lookup i s)
(a ⇒ b) / s = (a / s) ⇒ (b / s)
∀' x / s = ∀' (x / (s ↑))
open Application (record { _/_ = _/_ }) using (_/✶_)
open import Data.Star
Unit-/✶-↑✶ : ∀ k {m n} (ρs : Subs T m n) → Unit /✶ ρs ↑✶ k ≡ Unit
Unit-/✶-↑✶ k ε = refl
Unit-/✶-↑✶ k (x ◅ ρs) = cong₂ _/_ (Unit-/✶-↑✶ k ρs) refl
∀-/✶-↑✶ : ∀ k {m n t} (ρs : Subs T m n) →
∀' t /✶ ρs ↑✶ k ≡ ∀' (t /✶ ρs ↑✶ suc k)
∀-/✶-↑✶ k ε = refl
∀-/✶-↑✶ k (ρ ◅ ρs) = cong₂ _/_ (∀-/✶-↑✶ k ρs) refl
⇒-/✶-↑✶ : ∀ k {m n t₁ t₂} (ρs : Subs T m n) →
t₁ ⇒ t₂ /✶ ρs ↑✶ k ≡ (t₁ /✶ ρs ↑✶ k) ⇒ (t₂ /✶ ρs ↑✶ k)
⇒-/✶-↑✶ k ε = refl
⇒-/✶-↑✶ k (ρ ◅ ρs) = cong₂ _/_ (⇒-/✶-↑✶ k ρs) refl
tmSubst : TermSubst Type
tmSubst = record { var = ν; app = App._/_ }
open TermSubst tmSubst hiding (var; subst) public
module Lemmas where
open import Data.Fin.Substitution.Lemmas
tyLemmas : TermLemmas Type
tyLemmas = record
{ termSubst = tmSubst
; app-var = refl
; /✶-↑✶ = Lemma./✶-↑✶
}
where
module Lemma {T₁ T₂} {lift₁ : Lift T₁ Type} {lift₂ : Lift T₂ Type} where
open Lifted lift₁ using () renaming (_↑✶_ to _↑✶₁_; _/✶_ to _/✶₁_)
open Lifted lift₂ using () renaming (_↑✶_ to _↑✶₂_; _/✶_ to _/✶₂_)
/✶-↑✶ : ∀ {m n} (ρs₁ : Subs T₁ m n) (ρs₂ : Subs T₂ m n) →
(∀ k x → ν x /✶₁ ρs₁ ↑✶₁ k ≡ ν x /✶₂ ρs₂ ↑✶₂ k) →
∀ k t → t /✶₁ ρs₁ ↑✶₁ k ≡ t /✶₂ ρs₂ ↑✶₂ k
/✶-↑✶ ρs₁ ρs₂ hyp k Unit =
begin _ ≡⟨ App.Unit-/✶-↑✶ _ k ρs₁ ⟩ Unit ≡⟨ sym $ App.Unit-/✶-↑✶ _ k ρs₂ ⟩ _ ∎
/✶-↑✶ ρs₁ ρs₂ hyp k (ν i) = hyp k i
/✶-↑✶ ρs₁ ρs₂ hyp k (a ⇒ b) = begin
_ ≡⟨ App.⇒-/✶-↑✶ _ k ρs₁ ⟩
(a /✶₁ ρs₁ ↑✶₁ k) ⇒ (b /✶₁ ρs₁ ↑✶₁ k) ≡⟨ cong₂ _⇒_ (/✶-↑✶ ρs₁ ρs₂ hyp k a)
((/✶-↑✶ ρs₁ ρs₂ hyp k b)) ⟩
(a /✶₂ ρs₂ ↑✶₂ k) ⇒ (b /✶₂ ρs₂ ↑✶₂ k) ≡⟨ sym $ App.⇒-/✶-↑✶ _ k ρs₂ ⟩
_ ∎
/✶-↑✶ ρs₁ ρs₂ hyp k (∀' x) = begin
_ ≡⟨ App.∀-/✶-↑✶ _ k ρs₁ ⟩
∀' (x /✶₁ ρs₁ ↑✶₁ (suc k)) ≡⟨ cong ∀' (/✶-↑✶ ρs₁ ρs₂ hyp (suc k) x) ⟩
∀' (x /✶₂ ρs₂ ↑✶₂ (suc k)) ≡⟨ sym $ App.∀-/✶-↑✶ _ k ρs₂ ⟩
_ ∎
open TermLemmas tyLemmas public hiding (var)
|
programs/oeis/136/A136775.asm | karttu/loda | 0 | 96553 | <reponame>karttu/loda<filename>programs/oeis/136/A136775.asm
; A136775: Number of multiplex juggling sequences of length n, base state <1,1> and hand capacity 2.
; 1,3,11,40,145,525,1900,6875,24875,90000,325625,1178125,4262500,15421875,55796875,201875000,730390625,2642578125,9560937500,34591796875,125154296875,452812500000,1638291015625,5927392578125,21445507812500,77590576171875,280725341796875,1015673828125000,3674742431640625
mov $9,$0
mov $11,2
lpb $11,1
mov $0,$9
sub $11,1
add $0,$11
sub $0,1
mov $5,$0
mov $7,2
lpb $7,1
mov $0,$5
sub $7,1
add $0,$7
sub $0,1
mov $4,$0
mov $10,3
sub $10,$0
sub $0,$0
add $0,$4
mov $3,0
add $10,$4
lpb $0,1
sub $0,1
mul $10,5
sub $10,$3
add $3,$10
lpe
mov $8,$7
sub $10,3
div $10,3
add $10,1
lpb $8,1
mov $6,$10
sub $8,1
lpe
lpe
lpb $5,1
mov $5,0
sub $6,$10
lpe
mov $2,$11
mov $10,$6
lpb $2,1
mov $1,$10
sub $2,1
lpe
lpe
lpb $9,1
sub $1,$10
mov $9,0
lpe
|
firmware/coreboot/3rdparty/libgfxinit/gfxtest/hw-gfx-gma-gfx_test.adb | fabiojna02/OpenCellular | 1 | 3709 | with Ada.Numerics.Discrete_Random;
with Ada.Unchecked_Conversion;
with Ada.Command_Line;
with Interfaces.C;
with HW.Time;
with HW.Debug;
with HW.PCI.Dev;
with HW.MMIO_Range;
with HW.GFX.GMA;
with HW.GFX.GMA.Config;
with HW.GFX.GMA.Display_Probing;
package body HW.GFX.GMA.GFX_Test
is
pragma Disable_Atomic_Synchronization;
Primary_Delay_MS : constant := 8_000;
Secondary_Delay_MS : constant := 4_000;
Seed : constant := 12345;
package Rand_P is new Ada.Numerics.Discrete_Random (Natural);
Gen : Rand_P.Generator;
function Rand return Int32 is (Int32 (Rand_P.Random (Gen)));
Start_X : constant := 0;
Start_Y : constant := 0;
package Dev is new PCI.Dev (PCI.Address'(0, 2, 0));
type GTT_PTE_Type is mod 2 ** (Config.GTT_PTE_Size * 8);
type GTT_Registers_Type is array (GTT_Range) of GTT_PTE_Type;
package GTT is new MMIO_Range
(Base_Addr => 0,
Element_T => GTT_PTE_Type,
Index_T => GTT_Range,
Array_T => GTT_Registers_Type);
GTT_Backup : GTT_Registers_Type;
procedure Backup_GTT
is
begin
for Idx in GTT_Range loop
GTT.Read (GTT_Backup (Idx), Idx);
end loop;
end Backup_GTT;
procedure Restore_GTT
is
begin
for Idx in GTT_Range loop
GTT.Write (Idx, GTT_Backup (Idx));
end loop;
end Restore_GTT;
type Pixel_Type is record
Red : Byte;
Green : Byte;
Blue : Byte;
Alpha : Byte;
end record;
for Pixel_Type use record
Blue at 0 range 0 .. 7;
Green at 1 range 0 .. 7;
Red at 2 range 0 .. 7;
Alpha at 3 range 0 .. 7;
end record;
White : constant Pixel_Type := (255, 255, 255, 255);
Black : constant Pixel_Type := ( 0, 0, 0, 255);
Red : constant Pixel_Type := (255, 0, 0, 255);
Green : constant Pixel_Type := ( 0, 255, 0, 255);
Blue : constant Pixel_Type := ( 0, 0, 255, 255);
function Pixel_To_Word (P : Pixel_Type) return Word32
with
SPARK_Mode => Off
is
function To_Word is new Ada.Unchecked_Conversion (Pixel_Type, Word32);
begin
return To_Word (P);
end Pixel_To_Word;
Max_W : constant := 4096;
Max_H : constant := 2160;
FB_Align : constant := 16#0004_0000#;
Cursor_Align : constant := 16#0001_0000#;
Max_Cursor_Wid : constant := 256;
subtype Screen_Index is Natural range 0 .. 3 *
(Max_W * Max_H + FB_Align / 4 +
3 * Max_Cursor_Wid * Max_Cursor_Wid + Cursor_Align / 4)
- 1;
type Screen_Type is array (Screen_Index) of Word32;
function Screen_Offset (FB : Framebuffer_Type) return Natural is
(Natural (Phys_Offset (FB) / 4));
package Screen is new MMIO_Range (0, Word32, Screen_Index, Screen_Type);
Screen_Backup : Screen_Type;
procedure Backup_Screen (FB : Framebuffer_Type)
is
First : constant Screen_Index := Screen_Offset (FB);
Last : constant Screen_Index := First + Natural (FB_Size (FB)) / 4 - 1;
begin
for Idx in Screen_Index range First .. Last loop
Screen.Read (Screen_Backup (Idx), Idx);
end loop;
end Backup_Screen;
procedure Restore_Screen (FB : Framebuffer_Type)
is
First : constant Screen_Index := Screen_Offset (FB);
Last : constant Screen_Index := First + Natural (FB_Size (FB)) / 4 - 1;
begin
for Idx in Screen_Index range First .. Last loop
Screen.Write (Idx, Screen_Backup (Idx));
end loop;
end Restore_Screen;
function Drawing_Width (FB : Framebuffer_Type) return Natural is
(Natural (FB.Width + 2 * Start_X));
function Drawing_Height (FB : Framebuffer_Type) return Natural is
(Natural (FB.Height + 2 * Start_Y));
function Corner_Fill
(X, Y : Natural;
FB : Framebuffer_Type;
Pipe : Pipe_Index)
return Pixel_Type
is
Xrel : constant Integer :=
(if X < 32 then X else X - (Drawing_Width (FB) - 32));
Yrel : constant Integer :=
(if Y < 32 then Y else Y - (Drawing_Height (FB) - 32));
function Color (Idx : Natural) return Pixel_Type is
(case (Idx + Pipe_Index'Pos (Pipe)) mod 4 is
when 0 => Blue, when 1 => Black,
when 3 => Green, when others => Red);
begin
return
(if Xrel mod 16 = 0 or Xrel = 31 or Yrel mod 16 = 0 or Yrel = 31 then
White
elsif Yrel < 16 then
(if Xrel < 16 then Color (0) else Color (1))
else
(if Xrel < 16 then Color (3) else Color (2)));
end Corner_Fill;
function Fill
(X, Y : Natural;
Framebuffer : Framebuffer_Type;
Pipe : Pipe_Index)
return Pixel_Type
is
use type HW.Byte;
Xp : constant Natural := X * 256 / Drawing_Width (Framebuffer);
Yp : constant Natural := Y * 256 / Drawing_Height (Framebuffer);
Xn : constant Natural := 255 - Xp;
Yn : constant Natural := 255 - Yp;
function Map (X, Y : Natural) return Byte is
begin
return Byte (X * Y / 255);
end Map;
begin
return
(case Pipe is
when GMA.Primary => (Map (Xn, Yn), Map (Xp, Yn), Map (Xp, Yp), 255),
when GMA.Secondary => (Map (Xn, Yp), Map (Xn, Yn), Map (Xp, Yn), 255),
when GMA.Tertiary => (Map (Xp, Yp), Map (Xn, Yp), Map (Xn, Yn), 255));
end Fill;
procedure Test_Screen
(Framebuffer : Framebuffer_Type;
Pipe : GMA.Pipe_Index)
is
P : Pixel_Type;
-- We have pixel offset wheras the framebuffer has a byte offset
Offset_Y : Natural := Screen_Offset (Framebuffer);
Offset : Natural;
function Top_Test (X, Y : Natural) return Boolean
is
C : constant Natural := Drawing_Width (Framebuffer) / 2;
S_Y : constant Natural := 3 * (Y - Start_Y) / 2;
Left : constant Integer := X - C + S_Y;
Right : constant Integer := X - C - S_Y;
begin
return
(Y - Start_Y) < 12 and
((-1 <= Left and Left <= 0) or
(0 <= Right and Right <= 1));
end Top_Test;
begin
for Y in 0 .. Drawing_Height (Framebuffer) - 1 loop
Offset := Offset_Y;
for X in 0 .. Drawing_Width (Framebuffer) - 1 loop
if (X < 32 or X >= Drawing_Width (Framebuffer) - 32) and
(Y < 32 or Y >= Drawing_Height (Framebuffer) - 32)
then
P := Corner_Fill (X, Y, Framebuffer, Pipe);
elsif Framebuffer.Rotation /= No_Rotation and then
Top_Test (X, Y)
then
P := White;
elsif Y mod 16 = 0 or X mod 16 = 0 then
P := Black;
else
P := Fill (X, Y, Framebuffer, Pipe);
end if;
Screen.Write (Offset, Pixel_To_Word (P));
Offset := Offset + 1;
end loop;
Offset_Y := Offset_Y + Natural (Framebuffer.Stride);
end loop;
end Test_Screen;
function Donut (X, Y, Max : Cursor_Pos) return Byte
is
ZZ : constant Int32 := Max * Max * 2;
Dist_Center : constant Int32 := ((X * X + Y * Y) * 255) / ZZ;
Dist_Circle : constant Int32 := Dist_Center - 20;
begin
return Byte (255 - Int32'Min (255, 6 * abs Dist_Circle + 64));
end Donut;
procedure Draw_Cursor (Pipe : Pipe_Index; Cursor : Cursor_Type)
is
use type HW.Byte;
Width : constant Width_Type := Cursor_Width (Cursor.Size);
Screen_Offset : Natural :=
Natural (Shift_Left (Word32 (Cursor.GTT_Offset), 12) / 4);
begin
if Cursor.Mode /= ARGB_Cursor then
return;
end if;
for Y in Cursor_Pos range -Width / 2 .. Width / 2 - 1 loop
for X in Cursor_Pos range -Width / 2 .. Width / 2 - 1 loop
declare
D : constant Byte := Donut (X, Y, Width / 2);
begin
-- Hardware seems to expect pre-multiplied alpha (i.e.
-- color components already contain the alpha).
Screen.Write
(Index => Screen_Offset,
Value => Pixel_To_Word (
(Red => (if Pipe = Secondary then D / 2 else 0),
Green => (if Pipe = Tertiary then D / 2 else 0),
Blue => (if Pipe = Primary then D / 2 else 0),
Alpha => D)));
Screen_Offset := Screen_Offset + 1;
end;
end loop;
end loop;
end Draw_Cursor;
procedure Calc_Framebuffer
(FB : out Framebuffer_Type;
Mode : in Mode_Type;
Rotation : in Rotation_Type;
Offset : in out Word32)
is
Width : constant Width_Type := Mode.H_Visible;
Height : constant Height_Type := Mode.V_Visible;
begin
Offset := (Offset + FB_Align - 1) and not (FB_Align - 1);
if Rotation = Rotated_90 or Rotation = Rotated_270 then
FB :=
(Width => Height,
Height => Width,
Start_X => Start_X,
Start_Y => Start_Y,
BPC => 8,
Stride => Div_Round_Up (Height + 2 * Start_X, 32) * 32,
V_Stride => Div_Round_Up (Width + 2 * Start_Y, 32) * 32,
Tiling => Y_Tiled,
Rotation => Rotation,
Offset => Offset + Word32 (GTT_Rotation_Offset) * GTT_Page_Size);
else
FB :=
(Width => Width,
Height => Height,
Start_X => Start_X,
Start_Y => Start_Y,
BPC => 8,
Stride => Div_Round_Up (Width + 2 * Start_X, 16) * 16,
V_Stride => Height + 2 * Start_Y,
Tiling => Linear,
Rotation => Rotation,
Offset => Offset);
end if;
Offset := Offset + Word32 (FB_Size (FB));
end Calc_Framebuffer;
type Cursor_Array is array (Cursor_Size) of Cursor_Type;
Cursors : array (Pipe_Index) of Cursor_Array;
procedure Prepare_Cursors
(Cursors : out Cursor_Array;
Offset : in out Word32)
is
GMA_Phys_Base : constant PCI.Index := 16#5c#;
GMA_Phys_Base_Mask : constant := 16#fff0_0000#;
Phys_Base : Word32;
Success : Boolean;
begin
Dev.Read32 (Phys_Base, GMA_Phys_Base);
Phys_Base := Phys_Base and GMA_Phys_Base_Mask;
Success := Phys_Base /= GMA_Phys_Base_Mask and Phys_Base /= 0;
if not Success then
Debug.Put_Line ("Failed to read stolen memory base.");
return;
end if;
for Size in Cursor_Size loop
Offset := (Offset + Cursor_Align - 1) and not (Cursor_Align - 1);
declare
Width : constant Width_Type := Cursor_Width (Size);
GTT_End : constant Word32 := Offset + Word32 (Width * Width) * 4;
begin
Cursors (Size) :=
(Mode => ARGB_Cursor,
Size => Size,
Center_X => Width,
Center_Y => Width,
GTT_Offset => GTT_Range (Shift_Right (Offset, 12)));
while Offset < GTT_End loop
GMA.Write_GTT
(GTT_Page => GTT_Range (Offset / GTT_Page_Size),
Device_Address => GTT_Address_Type (Phys_Base + Offset),
Valid => True);
Offset := Offset + GTT_Page_Size;
end loop;
end;
end loop;
end Prepare_Cursors;
Pipes : GMA.Pipe_Configs;
procedure Prepare_Configs (Rotation : Rotation_Type)
is
use type HW.GFX.GMA.Port_Type;
Offset : Word32 := 0;
Success : Boolean;
begin
GMA.Display_Probing.Scan_Ports (Pipes);
for Pipe in GMA.Pipe_Index loop
if Pipes (Pipe).Port /= GMA.Disabled then
Calc_Framebuffer
(FB => Pipes (Pipe).Framebuffer,
Mode => Pipes (Pipe).Mode,
Rotation => Rotation,
Offset => Offset);
GMA.Setup_Default_FB
(FB => Pipes (Pipe).Framebuffer,
Clear => False,
Success => Success);
if not Success then
Pipes (Pipe).Port := GMA.Disabled;
end if;
end if;
Prepare_Cursors (Cursors (Pipe), Offset);
Pipes (Pipe).Cursor := Cursors (Pipe) (Cursor_Size'Val (Rand mod 3));
end loop;
GMA.Dump_Configs (Pipes);
end Prepare_Configs;
procedure Script_Cursors
(Pipes : in out GMA.Pipe_Configs;
Time_MS : in Natural)
is
type Corner is (UL, UR, LR, LL);
type Cursor_Script_Entry is record
Rel : Corner;
X, Y : Int32;
end record;
Cursor_Script : constant array (Natural range 0 .. 19) of Cursor_Script_Entry :=
((UL, 16, 16), (UL, 16, 16), (UL, 16, 16), (UL, -32, 0), (UL, 16, 16),
(UR, -16, 16), (UR, -16, 16), (UR, -16, 16), (UR, 0, -32), (UR, -16, 16),
(LR, -16, -16), (LR, -16, -16), (LR, -16, -16), (LR, 32, 0), (LR, -16, -16),
(LL, 16, -16), (LL, 16, -16), (LL, 16, -16), (LL, 0, 32), (LL, 16, -16));
Deadline : constant Time.T := Time.MS_From_Now (Time_MS);
Timed_Out : Boolean := False;
Cnt : Word32 := 0;
begin
loop
for Pipe in Pipe_Index loop
exit when Pipes (Pipe).Port = GMA.Disabled;
declare
C : Cursor_Type renames Pipes (Pipe).Cursor;
FB : Framebuffer_Type renames Pipes (Pipe).Framebuffer;
Width : constant Width_Type := Rotated_Width (FB);
Height : constant Height_Type := Rotated_Height (FB);
CS : Cursor_Script_Entry renames Cursor_Script
(Natural (Cnt) mod (Cursor_Script'Last + 1));
begin
C.Center_X := CS.X;
C.Center_Y := CS.Y;
case CS.Rel is
when UL => null;
when UR => C.Center_X := CS.X + Width;
when LR => C.Center_X := CS.X + Width;
C.Center_Y := CS.Y + Height;
when LL => C.Center_Y := CS.Y + Height;
end case;
GMA.Place_Cursor (Pipe, C.Center_X, C.Center_Y);
end;
end loop;
Timed_Out := Time.Timed_Out (Deadline);
exit when Timed_Out;
Time.M_Delay (160);
Cnt := Cnt + 1;
end loop;
end Script_Cursors;
type Cursor_Info is record
X_Velo, Y_Velo : Int32;
X_Acc, Y_Acc : Int32;
Color : Pipe_Index;
Size : Cursor_Size;
end record;
function Cursor_Rand return Int32 is (Rand mod 51 - 25);
Cursor_Infos : array (Pipe_Index) of Cursor_Info :=
(others =>
(Color => Pipe_Index'Val (Rand mod 3),
Size => Cursor_Size'Val (Rand mod 3),
X_Velo => 3 * Cursor_Rand,
Y_Velo => 3 * Cursor_Rand,
others => Cursor_Rand));
procedure Move_Cursors
(Pipes : in out GMA.Pipe_Configs;
Time_MS : in Natural)
is
procedure Select_New_Cursor
(P : in Pipe_Index;
C : in out Cursor_Type;
CI : in out Cursor_Info)
is
Old_C : constant Cursor_Type := C;
begin
-- change either size or color
if Rand mod 2 = 0 then
CI.Color := Pipe_Index'Val
((Pipe_Index'Pos (CI.Color) + 1 + Rand mod 2) mod 3);
else
CI.Size := Cursor_Size'Val
((Cursor_Size'Pos (CI.Size) + 1 + Rand mod 2) mod 3);
end if;
C := Cursors (CI.Color) (CI.Size);
C.Center_X := Old_C.Center_X;
C.Center_Y := Old_C.Center_Y;
GMA.Update_Cursor (P, C);
end Select_New_Cursor;
Deadline : constant Time.T := Time.MS_From_Now (Time_MS);
Timed_Out : Boolean := False;
Cnt : Word32 := 0;
begin
for Pipe in Pipe_Index loop
exit when Pipes (Pipe).Port = GMA.Disabled;
Select_New_Cursor (Pipe, Pipes (Pipe).Cursor, Cursor_Infos (Pipe));
end loop;
loop
for Pipe in Pipe_Index loop
exit when Pipes (Pipe).Port = GMA.Disabled;
declare
C : Cursor_Type renames Pipes (Pipe).Cursor;
CI : Cursor_Info renames Cursor_Infos (Pipe);
FB : Framebuffer_Type renames Pipes (Pipe).Framebuffer;
Width : constant Width_Type := Rotated_Width (FB);
Height : constant Height_Type := Rotated_Height (FB);
Update : Boolean := False;
begin
if Cnt mod 16 = 0 then
CI.X_Acc := Cursor_Rand;
CI.Y_Acc := Cursor_Rand;
end if;
CI.X_Velo := CI.X_Velo + CI.X_Acc;
CI.Y_Velo := CI.Y_Velo + CI.Y_Acc;
C.Center_X := C.Center_X + CI.X_Velo / 100;
C.Center_Y := C.Center_Y + CI.Y_Velo / 100;
if C.Center_X not in 0 .. Width - 1 then
C.Center_X := Int32'Max (0, Int32'Min (Width, C.Center_X));
CI.X_Velo := -CI.X_Velo;
Update := True;
end if;
if C.Center_Y not in 0 .. Height - 1 then
C.Center_Y := Int32'Max (0, Int32'Min (Height, C.Center_Y));
CI.Y_Velo := -CI.Y_Velo;
Update := True;
end if;
if Update then
Select_New_Cursor (Pipe, C, CI);
else
GMA.Place_Cursor (Pipe, C.Center_X, C.Center_Y);
end if;
end;
end loop;
Timed_Out := Time.Timed_Out (Deadline);
exit when Timed_Out;
Time.M_Delay (16); -- ~60 fps
Cnt := Cnt + 1;
end loop;
end Move_Cursors;
procedure Print_Usage
is
begin
Debug.Put_Line
("Usage: " & Ada.Command_Line.Command_Name &
" <delay seconds>" &
" [(0|90|180|270)]");
Debug.New_Line;
end Print_Usage;
procedure Main
is
use type HW.GFX.GMA.Port_Type;
use type HW.Word64;
use type Interfaces.C.int;
Res_Addr : Word64;
Delay_MS : Natural;
Rotation : Rotation_Type := No_Rotation;
Dev_Init,
Initialized : Boolean;
function iopl (level : Interfaces.C.int) return Interfaces.C.int;
pragma Import (C, iopl, "iopl");
begin
if Ada.Command_Line.Argument_Count < 1 then
Print_Usage;
return;
end if;
Delay_MS := Natural'Value (Ada.Command_Line.Argument (1)) * 1_000;
if Ada.Command_Line.Argument_Count >= 2 then
declare
Rotation_Degree : constant String := Ada.Command_Line.Argument (2);
begin
if Rotation_Degree = "0" then Rotation := No_Rotation;
elsif Rotation_Degree = "90" then Rotation := Rotated_90;
elsif Rotation_Degree = "180" then Rotation := Rotated_180;
elsif Rotation_Degree = "270" then Rotation := Rotated_270;
else Print_Usage; return; end if;
end;
end if;
if iopl (3) /= 0 then
Debug.Put_Line ("Failed to change i/o privilege level.");
return;
end if;
Dev.Initialize (Dev_Init);
if not Dev_Init then
Debug.Put_Line ("Failed to map PCI config.");
return;
end if;
Dev.Map (Res_Addr, PCI.Res0, Offset => Config.GTT_Offset);
if Res_Addr = 0 then
Debug.Put_Line ("Failed to map PCI resource0.");
return;
end if;
GTT.Set_Base_Address (Res_Addr);
Dev.Map (Res_Addr, PCI.Res2, WC => True);
if Res_Addr = 0 then
Debug.Put_Line ("Failed to map PCI resource2.");
return;
end if;
Screen.Set_Base_Address (Res_Addr);
GMA.Initialize
(Clean_State => True,
Success => Initialized);
if Initialized then
Backup_GTT;
Prepare_Configs (Rotation);
GMA.Update_Outputs (Pipes);
for Pipe in GMA.Pipe_Index loop
if Pipes (Pipe).Port /= GMA.Disabled then
Backup_Screen (Pipes (Pipe).Framebuffer);
Test_Screen
(Framebuffer => Pipes (Pipe).Framebuffer,
Pipe => Pipe);
end if;
for Size in Cursor_Size loop
Draw_Cursor (Pipe, Cursors (Pipe) (Size));
end loop;
end loop;
if Delay_MS < Primary_Delay_MS + Secondary_Delay_MS then
Script_Cursors (Pipes, Delay_MS);
else -- getting bored?
Script_Cursors (Pipes, Primary_Delay_MS);
Delay_MS := Delay_MS - Primary_Delay_MS;
declare
New_Pipes : GMA.Pipe_Configs := Pipes;
function Rand_Div (Num : Position_Type) return Position_Type is
(case Rand mod 4 is
when 3 => Rand mod Num / 3,
when 2 => Rand mod Num / 2,
when 1 => Rand mod Num,
when others => 0);
begin
Rand_P.Reset (Gen, Seed);
while Delay_MS >= Secondary_Delay_MS loop
New_Pipes := Pipes;
for Pipe in GMA.Pipe_Index loop
exit when Pipes (Pipe).Port = Disabled;
declare
New_FB : Framebuffer_Type renames
New_Pipes (Pipe).Framebuffer;
Cursor : Cursor_Type renames New_Pipes (Pipe).Cursor;
Width : constant Width_Type :=
Pipes (Pipe).Framebuffer.Width;
Height : constant Height_Type :=
Pipes (Pipe).Framebuffer.Height;
begin
New_FB.Start_X := Position_Type'Min
(Width - 320, Rand_Div (Width));
New_FB.Start_Y := Position_Type'Min
(Height - 320, Rand_Div (Height));
New_FB.Width := Width_Type'Max
(320, Width - New_FB.Start_X - Rand_Div (Width));
New_FB.Height := Height_Type'Max
(320, Height - New_FB.Start_Y - Rand_Div (Height));
Cursor.Center_X := Rotated_Width (New_FB) / 2;
Cursor.Center_Y := Rotated_Height (New_FB) / 2;
GMA.Update_Cursor (Pipe, Cursor);
end;
end loop;
GMA.Dump_Configs (New_Pipes);
GMA.Update_Outputs (New_Pipes);
Move_Cursors (New_Pipes, Secondary_Delay_MS);
Delay_MS := Delay_MS - Secondary_Delay_MS;
end loop;
Move_Cursors (New_Pipes, Delay_MS);
end;
end if;
for Pipe in GMA.Pipe_Index loop
if Pipes (Pipe).Port /= GMA.Disabled then
Restore_Screen (Pipes (Pipe).Framebuffer);
end if;
end loop;
Restore_GTT;
end if;
end Main;
end HW.GFX.GMA.GFX_Test;
|
projects/batfish/src/main/antlr4/org/batfish/grammar/cisco_nxos/CiscoNxosLexer.g4 | nickgian/batfish | 0 | 6578 | lexer grammar CiscoNxosLexer;
options {
superClass = 'org.batfish.grammar.cisco_nxos.parsing.CiscoNxosBaseLexer';
}
tokens {
BANNER_BODY,
BANNER_DELIMITER,
HSRP_VERSION_1,
HSRP_VERSION_2,
LOCAL,
MAC_ADDRESS_LITERAL,
MOTD,
PASSWORD_0,
PASSWORD_0_TEXT,
PASSWORD_3,
PASSWORD_3_MALFORMED_TEXT,
PASSWORD_3_TEXT,
PASSWORD_7,
PASSWORD_7_MALFORMED_TEXT,
PASSWORD_7_TEXT,
QUOTED_TEXT,
REMARK_TEXT,
SNMP_VERSION_1,
SNMP_VERSION_2,
SNMP_VERSION_2C,
SUBDOMAIN_NAME,
WORD
}
AAA
:
'aaa'
;
ACCESS
:
'access'
;
ACCESS_CLASS
:
'access-class' -> pushMode ( M_Word )
;
ACCESS_GROUP
:
'access-group'
{
if (lastTokenType() == IP || lastTokenType() == PORT) {
pushMode(M_Word);
}
}
;
ACCESS_LIST
:
'access-list' -> pushMode ( M_Word )
;
ACCESS_MAP
:
'access-map'
;
ACCOUNTING
:
'accounting'
;
ACK
:
'ack'
;
ACL_COMMON_IP_OPTIONS
:
'acl_common_ip_options'
;
ACL_GLOBAL_OPTIONS
:
'acl_global_options'
;
ACL_ICMP
:
'acl_icmp'
;
ACL_IGMP
:
'acl_igmp'
;
ACL_INDICES
:
'acl_indices'
;
ACL_SIMPLE_PROTOCOLS
:
'acl_simple_protocols'
;
ACL_TCP
:
'acl_tcp'
;
ACL_UDP
:
'acl_udp'
;
ACTION
:
'action'
;
ACTIVE
:
'active'
;
ADD
:
'add'
;
ADDITIONAL_PATHS
:
'additional-paths'
;
ADDITIVE
:
'additive'
;
ADDRESS
:
'address'
// All other instances are followed by tokens in default mode
{
if (secondToLastTokenType() == MATCH && (lastTokenType() == IP || lastTokenType() == IPV6)) {
pushMode(M_MatchIpAddress);
} else if (secondToLastTokenType() == OBJECT_GROUP) {
pushMode(M_Word);
}
}
;
ADDRESS_FAMILY
:
'address-family'
;
ADDRGROUP
:
'addrgroup' -> pushMode ( M_Word )
;
ADMINISTRATIVELY_PROHIBITED
:
'administratively-prohibited'
;
ADVERTISE
:
'advertise'
;
ADVERTISE_MAP
:
'advertise-map'
;
AES_128
:
'aes-128'
;
AF11
:
'af11'
;
AF12
:
'af12'
;
AF13
:
'af13'
;
AF21
:
'af21'
;
AF22
:
'af22'
;
AF23
:
'af23'
;
AF31
:
'af31'
;
AF32
:
'af32'
;
AF33
:
'af33'
;
AF41
:
'af41'
;
AF42
:
'af42'
;
AF43
:
'af43'
;
AGGREGATE_ADDRESS
:
'aggregate-address'
;
AGGRESSIVE
:
'aggressive'
;
AH_MD5
:
'ah-md5' -> pushMode ( M_Password )
;
AHP
:
'ahp'
;
ALIAS
:
'alias'
;
ALL
:
'all'
;
ALLOW
:
'allow'
;
ALLOWAS_IN
:
'allowas-in'
;
ALLOWED
:
'allowed'
;
ALTERNATE_ADDRESS
:
'alternate-address'
;
ALWAYS
:
'always'
;
ALWAYS_COMPARE_MED
:
'always-compare-med'
;
ANY
:
'any'
;
AREA
:
'area'
;
ARP
:
'arp'
;
AS_OVERRIDE
:
'as-override'
;
AS_PATH
:
'as-path'
// All other instances are followed by keywords
{
if (lastTokenType() == MATCH) {
pushMode(M_Words);
}
}
;
AS_SET
:
'as-set'
;
ASSOCIATE
:
'associate'
;
ASSOCIATE_VRF
:
'associate-vrf'
;
ATTRIBUTE_MAP
:
'attribute-map' -> pushMode ( M_Word )
;
AUTH
:
'auth'
;
AUTHENTICATE
:
'authenticate'
;
AUTHENTICATION
:
'authentication'
;
AUTHENTICATION_KEY
:
'authentication-key'
;
AUTHORIZATION
:
'authorization'
;
AUTHPRIV
:
'authpriv'
;
AUTO
:
'auto'
;
AUTO_COST
:
'auto-cost'
;
AUTOCONFIG
:
'autoconfig'
;
AUTONOMOUS_SYSTEM
:
'autonomous-system'
;
AUTOSTATE
:
'autostate'
;
BACKUP
:
'backup'
;
BANDWIDTH
:
'bandwidth'
;
BANNER
:
'banner' -> pushMode ( M_Banner )
;
BASH_SHELL
:
'bash-shell'
;
BASIC
:
'basic'
;
BC
:
'bc'
;
BEACON
:
'beacon'
;
BESTPATH
:
'bestpath'
;
BESTPATH_LIMIT
:
'bestpath-limit'
;
BFD
:
'bfd'
;
BFD_INSTANCE
:
'bfd-instance'
;
BGP
:
'bgp'
;
BIDIR
:
'bidir'
;
BIDIR_RP_LIMIT
:
'bidir-rp-limit'
;
BIFF
:
'biff'
;
BLOCK
:
'block'
;
BOOT
:
'boot'
;
BOOTPC
:
'bootpc'
;
BOOTPS
:
'bootps'
;
BORDER
:
'border'
;
BOTH
:
'both'
;
BPDUFILTER
:
'bpdufilter'
;
BPDUGUARD
:
'bpduguard'
;
BPS
:
'bps'
;
BREAKOUT
:
'breakout'
;
BRIDGE
:
'bridge'
;
BROADCAST
:
'broadcast'
;
BUFFER_LIMIT
:
'buffer-limit'
;
BYTES
:
'bytes'
;
CALLHOME
:
'callhome'
;
CAPABILITY
:
'capability'
;
CARRIER_DELAY
:
'carrier-delay'
;
CAUSE
:
'cause'
;
CCMCLIRUNNINGCONFIGCHANGED
:
[Cc] [Cc] [Mm] [Cc] [Ll] [Ii] [Rr] [Uu] [Nn] [Nn] [Ii] [Nn] [Gg] [Cc] [Oo]
[Nn] [Ff] [Ii] [Gg] [Cc] [Hh] [Aa] [Nn] [Gg] [Ee] [Dd]
;
CDP
:
'cdp'
;
CFS
:
'cfs'
;
CHAIN
:
'chain' -> pushMode ( M_Word )
;
CHANNEL_GROUP
:
'channel-group'
;
CHARGEN
:
'chargen'
;
CIR
:
'cir'
;
CLASS
:
'class' -> pushMode ( M_Class )
;
CLASS_DEFAULT
:
'class-default'
;
CLASS_MAP
:
'class-map' -> pushMode ( M_ClassMap )
;
CLEAR
:
'clear'
;
CLI
:
'cli'
;
CLIENT_IDENTITY
:
'client-identity'
;
CLIENT_TO_CLIENT
:
'client-to-client'
;
CLOCK
:
'clock'
;
CLUSTER_ID
:
'cluster-id'
;
CMD
:
'cmd'
;
COMMAND
:
'command'
;
COMMANDS
:
'commands'
;
COMMIT
:
'commit'
;
COMMUNITY
:
'community'
// All other instances are followed by keywords or tokens in default mode
{
switch (lastTokenType()) {
case MATCH:
pushMode(M_Words);
break;
case SNMP_SERVER:
pushMode(M_Word);
break;
default:
break;
}
}
;
COMM_LIST
:
'comm-list' -> pushMode ( M_Word )
;
COMMUNITY_LIST
:
'community-list'
;
COMPARE_ROUTERID
:
'compare-routerid'
;
CONFIG
:
'config'
;
CONFIG_COMMANDS
:
'config-commands'
;
CONFIGURATION
:
'configuration'
;
CONFED
:
'confed'
;
CONFEDERATION
:
'confederation'
;
CONFORM
:
'conform'
;
CONGESTION_CONTROL
:
'congestion-control'
;
CONNECT
:
'connect'
;
CONNECTION_MODE
:
'connection-mode'
;
CONSOLE
:
'console'
;
CONTACT
:
// followed by arbitrary contact information
'contact' -> pushMode ( M_Remark )
;
CONTEXT
:
'context' -> pushMode ( M_Word )
;
CONTINUE
:
'continue'
;
CONTROL
:
'control'
;
CONTROL_PLANE
:
'control-plane'
;
CONVERSION_ERROR
:
'conversion-error'
;
COPY
:
'copy'
;
COPY_ATTRIBUTES
:
'copy-attributes'
;
COS
:
'cos'
;
COST
:
'cost'
;
COST_COMMUNITY
:
'cost-community'
;
COUNTER
:
'counter'
;
COUNTERS
:
'counters'
;
CRITICAL
:
'critical'
;
CRON
:
'cron'
;
CRYPTO
:
'crypto'
;
CS1
:
'cs1'
;
CS2
:
'cs2'
;
CS3
:
'cs3'
;
CS4
:
'cs4'
;
CS5
:
'cs5'
;
CS6
:
'cs6'
;
CS7
:
'cs7'
;
DAEMON
:
'daemon'
;
DAMPEN_IGP_METRIC
:
'dampen-igp-metric'
;
DAMPENING
:
'dampening'
;
DAYTIME
:
'daytime'
;
DEAD_INTERVAL
:
'dead-interval'
;
DEADTIME
:
'deadtime'
;
DEBOUNCE
:
'debounce'
;
DECREMENT
:
'decrement'
;
DEFAULT
:
'default'
;
DEFAULT_COST
:
'default-cost'
;
DEFAULT_GRACETIME
:
'default-gracetime'
;
DEFAULT_INFORMATION
:
'default-information'
;
DEFAULT_INFORMATION_ORIGINATE
:
'default-information-originate'
;
DEFAULT_LIFETIME
:
'default-lifetime'
;
DEFAULT_METRIC
:
'default-metric'
;
DEFAULT_ORIGINATE
:
'default-originate'
;
DEFAULT_WARNTIME
:
'default-warntime'
;
DELAY
:
'delay'
;
DELAYED_LINK_STATE_CHANGE
:
'delayed-link-state-change'
;
DELETE
:
'delete'
;
DENY
:
'deny'
;
DENY_ALL
:
'deny-all'
;
DESCRIPTION
:
'description' -> pushMode ( M_Remark )
;
DEST_IP
:
'dest-ip'
;
DEST_MISS
:
'dest-miss'
;
DESTINATION
:
'destination'
;
DETAIL
:
'detail'
;
DHCP
:
'dhcp'
;
DHCP_SNOOPING_VLAN
:
'dhcp-snooping-vlan'
;
DIR
:
'dir'
;
DIRECT
:
'direct'
;
DIRECTED_REQUEST
:
'directed-request'
;
DIRECTLY_CONNECTED_SOURCES
:
'directly-connected-sources'
;
DISABLE
:
'disable'
;
DISABLE_CONNECTED_CHECK
:
'disable-connected-check'
;
DISABLE_PEER_AS_CHECK
:
'disable-peer-as-check'
;
DISCARD
:
'discard'
;
DISCARD_ROUTE
:
'discard-route'
;
DISTANCE
:
'distance'
;
DISTRIBUTE
:
'distribute'
;
DNS
:
'dns' -> pushMode(M_Words)
;
DNSIX
:
'dnsix'
;
DOD_HOST_PROHIBITED
:
'dod-host-prohibited'
;
DOD_NET_PROHIBITED
:
'dod-net-prohibited'
;
DOMAIN
:
'domain'
;
DOMAIN_LOOKUP
:
'domain-lookup'
;
DOMAIN_NAME
:
'domain-name' -> pushMode(M_Word)
;
DONT_CAPABILITY_NEGOTIATE
:
'dont-capability-negotiate'
;
DOT1Q
:
[Dd] [Oo] [Tt] '1' [Qq]
;
DOT1Q_TUNNEL
:
'dot1q-tunnel'
;
DR_DELAY
:
'dr-delay'
;
DR_PRIORITY
:
'dr-priority'
;
DRIP
:
'drip'
;
DROP
:
'drop'
;
DROP_ON_FAIL
:
'drop-on-fail'
;
DSCP
:
'dscp'
;
DST_MAC
:
'dst-mac'
;
DUAL_AS
:
'dual-as'
;
DUPLEX
:
'duplex'
;
DVMRP
:
'dvmrp'
;
DYNAMIC_CAPABILITY
:
'dynamic-capability'
;
EBGP_MULTIHOP
:
'ebgp-multihop'
;
ECHO
:
'echo'
;
ECHO_REPLY
:
'echo-reply'
;
EDGE
:
'edge'
;
EF
:
'ef'
;
EGP
:
'egp'
;
EIBGP
:
'eibgp'
;
EIGRP
:
'eigrp'
// All other instances are followed by keywords or tokens in default mode
{
switch (lastTokenType()) {
case KEY_CHAIN:
pushMode(M_TwoWords);
break;
case MODE:
case REDISTRIBUTE:
case ROUTER:
pushMode(M_Word);
break;
default:
break;
}
}
;
ENABLE
:
'enable'
;
ENCAPSULATION
:
'encapsulation'
;
ENFORCE_BGP_MDT_SAFI
:
'enforce-bgp-mdt-safi'
;
ENFORCE_FIRST_AS
:
'enforce-first-as'
;
ENTRIES
:
'entries'
;
EQ
:
'eq'
;
ERRDISABLE
:
'errdisable'
;
ERROR_ENABLE
:
'error-enable'
;
ERRORS
:
'errors'
;
ESP
:
'esp'
;
ESTABLISHED
:
'established'
;
ETHERNET
:
[Ee] [Tt] [Hh] [Ee] [Rr] [Nn] [Ee] [Tt]
;
EVENT
:
'event'
;
EVENT_HISTORY
:
'event-history'
;
EVENT_NOTIFY
:
'event-notify'
;
EVENTS
:
'events'
;
EVPN
:
'evpn'
;
EXCEPT
:
'except'
;
EXCEPTION
:
'exception'
;
EXEC
:
'exec'
;
EXEC_TIMEOUT
:
'exec-timeout'
;
EXEMPT
:
'exempt'
;
EXIST_MAP
:
'exist-map'
;
EXPANDED
:
'expanded' -> pushMode ( M_Expanded )
;
EXPLICIT_TRACKING
:
'explicit-tracking'
;
EXPORT
:
'export'
;
EXTENDED
:
'extended'
;
EXTERNAL
:
'external'
;
EXTERNAL_LSA
:
'external-lsa'
;
FACILITY
:
'facility'
;
FAST_EXTERNAL_FALLOVER
:
'fast-external-fallover'
;
FAST_LEAVE
:
'fast-leave'
;
FAST_SELECT_HOT_STANDBY
:
'fast-select-hot-standby'
;
FCOE
:
'fcoe'
;
FCOE_FIB_MISS
:
'fcoe-fib-miss'
;
FEATURE
:
'feature'
;
FEATURE_CONTROL
:
'feature-control'
;
FEATUREOPSTATUSCHANGE
:
[Ff] [Ee] [Aa] [Tt] [Uu] [Rr] [Ee] [Oo] [Pp] [Ss] [Tt] [Aa] [Tt] [Uu] [Ss]
[Cc] [Hh] [Aa] [Nn] [Gg] [Ee]
;
FEX
:
'fex'
;
FEX_FABRIC
:
'fex-fabric'
;
FILTER
:
'filter'
;
FILTER_LIST
:
'filter-list'
;
FILTERING
:
'filtering'
;
FIN
:
'fin'
;
FINGER
:
'finger'
;
FLASH
:
'flash'
;
FLASH_OVERRIDE
:
'flash-override'
;
FLOW
:
'flow'
;
FLOWCONTROL
:
'flowcontrol'
;
FORCE
:
'force'
;
FORCE_ORDER
:
'force-order'
;
FORWARD
:
'forward'
;
FORWARDING_THRESHOLD
:
'forwarding-threshold'
;
FLUSH_ROUTES
:
'flush-routes'
;
FOUR_BYTE_AS
:
'four-byte-as'
;
FRAGMENTS
:
'fragments'
;
FTP_DATA
:
'ftp-data'
;
FTP
:
'ftp'
;
FULL
:
'full'
;
GBPS
:
[Gg] [Bb] [Pp] [Ss]
;
GENERAL_PARAMETER_PROBLEM
:
'general-parameter-problem'
;
GE
:
'ge'
;
GET
:
'get'
;
GLEAN
:
'glean'
;
GLOBAL
:
'global'
;
GOPHER
:
'gopher'
;
GRACE_PERIOD
:
'grace-period'
;
GRACEFUL_RESTART
:
'graceful-restart'
;
GRACEFUL_RESTART_HELPER
:
'graceful-restart-helper'
;
GRATUITOUS
:
'gratuitous'
;
GRE
:
'gre'
;
GROUP
:
'group'
// When preceded by 'default, followed by list of AAA server groups.
// If preceded by 'community' and then a secret, followed by the name of a user group.
// Otherwise, stay in default mode.
{
if (lastTokenType() == DEFAULT) {
pushMode(M_AaaGroup);
} else if (secondToLastTokenType() == COMMUNITY && lastTokenType() == WORD) {
pushMode(M_Word);
}
}
;
GROUP_TIMEOUT
:
'group-timeout'
;
GT
:
'gt'
;
GUARD
:
'guard'
;
HARDWARE
:
'hardware'
;
HEAD
:
'head'
;
HELLO_AUTHENTICATION
:
'hello-authentication'
;
HELLO_INTERVAL
:
'hello-interval'
;
HELPER_DISABLE
:
'helper-disable'
;
HEX_UINT32
:
F_HexUint32
;
HMM
:
'hmm'
;
HOST
:
'host'
{
if (lastTokenType() == TACACS_SERVER) {
pushMode(M_TacacsServerHost);
}
}
;
HOST_ISOLATED
:
'host-isolated'
;
HOST_PRECEDENCE_UNREACHABLE
:
'host-precedence-unreachable'
;
HOST_QUERY
:
'host-query'
;
HOST_REACHABILITY
:
'host-reachability'
;
HOST_REDIRECT
:
'host-redirect'
;
HOST_REPORT
:
'host-report'
;
HOST_TOS_REDIRECT
:
'host-tos-redirect'
;
HOST_TOS_UNREACHABLE
:
'host-tos-unreachable'
;
HOST_UNKNOWN
:
'host-unknown'
;
HOST_UNREACHABLE
:
'host-unreachable'
;
HOSTNAME
:
'hostname'
// Mode is needed so as not to interfere with interface names.
// E.g. 'Ethernet1' should be ETHERNET UINT8 rather than SUBDOMAIN_NAME
// May be revisited as grammar is fleshed out.
{
if (lastTokenType() == NEWLINE || lastTokenType() == -1) {
pushMode(M_Hostname);
}
}
;
HSRP
:
'hsrp'
;
HTTP
:
'http' -> pushMode(M_Words)
;
HTTP_METHOD
:
'http-method'
;
HTTP_SERVER
:
'http-server'
;
HW_HASH
:
'hw-hash'
;
IBGP
:
'ibgp'
;
ICMP
:
'icmp'
;
ICMP_ECHO
:
'icmp-echo' -> pushMode(M_Words)
;
IDENT
:
'ident'
;
IDENTIFIER
:
'identifier'
;
IGMP
:
'igmp'
;
IGNORE
:
'ignore'
;
IGP
:
'igp'
;
IMMEDIATE
:
'immediate'
;
IMPORT
:
'import'
;
IN
:
'in'
;
INBOUND
:
'inbound'
;
INCLUDE_STUB
:
'include-stub'
;
INCOMPLETE
:
'incomplete'
;
INCONSISTENCY
:
'inconsistency'
;
INFORM
:
'inform'
;
INFORMATION
:
'information'
;
INFORMATION_REPLY
:
'information-reply'
;
INFORMATION_REQUEST
:
'information-request'
;
INFORMS
:
'informs'
;
INGRESS_REPLICATION
:
'ingress-replication'
;
INHERIT
:
'inherit'
;
INJECT_MAP
:
'inject-map'
;
INPUT
:
'input'
{
if (lastTokenType() == QOS || lastTokenType() == QUEUING || lastTokenType() == SERVICE_POLICY) {
pushMode(M_Word);
}
}
;
INSPECTION
:
'inspection'
;
INSTALL
:
'install'
;
INTER_AREA_PREFIX_LSA
:
'inter-area-prefix-lsa'
;
INTERFACE
:
// most common abbreviation
'int'
(
'erface'
)?
;
INTERFACE_VLAN
:
'interface-vlan'
;
INTERNAL
:
'internal'
;
INTERNET
:
'internet'
;
INTERVAL
:
'interval'
;
IP
:
'ip'
;
IPV4
:
'ipv4'
;
IPV6
:
'ipv6'
;
IPV6_DEST_MISS
:
'ipv6-dest-miss'
;
IPV6_RPF_FAILURE
:
'ipv6-rpf-failure'
;
IPV6_SG_RPF_FAILURE
:
'ipv6-sg-rpf-failure'
;
IRC
:
'irc'
;
ISAKMP
:
'isakmp'
;
ISIS
:
'isis' -> pushMode ( M_Word )
;
ISOLATE
:
'isolate'
;
JP_INTERVAL
:
'jp-interval'
;
JP_POLICY
:
'jp-policy' -> pushMode ( M_PrefixListOrWord )
;
KBPS
:
'kbps'
;
KERNEL
:
'kern' 'el'?
;
KEY
:
'key'
{
switch(lastTokenType()) {
case TACACS_SERVER:
// preceded by 'tacacs-server' (for global key), follow with password
pushMode(M_Password);
break;
case IP_ADDRESS:
case IPV6_ADDRESS:
case WORD:
// preceded by 'tacacs-server host <ip|ipv6|dns>' (server-specific key), follow with password
if (secondToLastTokenType() == HOST) {
pushMode(M_Password);
}
break;
default:
break;
}
}
;
KEY_CHAIN
:
'key-chain'
{
if (lastTokenType() != AUTHENTICATION || secondToLastTokenType() != IP) {
pushMode(M_Word);
}
}
;
KEY_STRING
:
'key-string' -> pushMode ( M_Remark )
;
KICKSTART
:
'kickstart'
// name of image follows if preceded by 'boot'
{
if (lastTokenType() == BOOT) {
pushMode(M_Word);
}
}
;
KLOGIN
:
'klogin'
;
KSHELL
:
'kshell'
;
L2
:
[lL] '2'
;
L2VPN
:
'l2vpn'
;
L3
:
'L3'
;
LABEL
:
'label' -> pushMode(M_Word)
;
LACP
:
'lacp'
;
LARGE
:
'large'
;
LAST_AS
:
'last-as'
;
LAST_MEMBER_QUERY_INTERVAL
:
'last-member-query-interval'
;
LATENCY
:
'latency'
;
LE
:
'le'
;
LEVEL
:
'level'
;
LICENSE
:
'license'
;
LINE
:
'line'
;
LINE_PROTOCOL
:
'line-protocol'
;
LINK
:
'link'
;
LINK_FLAP
:
'link-flap'
;
LINK_LOCAL_GROUPS_SUPPRESSION
:
'link-local-groups-suppression'
;
LINK_STATE
:
'link-state'
;
LINK_STATUS
:
'link-status'
;
LINK_TYPE
:
'link-type'
;
LINK_UP
:
'link-up'
;
LISP
:
'lisp'
;
LLDP
:
'lldp'
;
LOAD_DEFER
:
'load-defer'
;
LOAD_INTERVAL
:
'load-interval'
;
LOAD_SHARE
:
'load-share'
;
LOCAL_AS
:
[Ll] [Oo] [Cc] [Aa] [Ll] '-' [Aa] [Ss]
;
LOCAL_PREFERENCE
:
'local-preference'
;
LOCAL0
:
'local0'
;
LOCAL1
:
'local1'
;
LOCAL2
:
'local2'
;
LOCAL3
:
'local3'
;
LOCAL4
:
'local4'
;
LOCAL5
:
'local5'
;
LOCAL6
:
'local6'
;
LOCAL7
:
'local7'
;
LOCALIZEDKEY
:
'localizedkey'
;
LOCATION
:
// followed by arbitrary location description
'location' -> pushMode ( M_Remark )
;
LOG
:
'log'
;
LOG_ADJACENCY_CHANGES
:
'log-adjacency-changes'
;
LOG_BUFFER
:
'log-buffer'
;
LOG_NEIGHBOR_CHANGES
:
'log-neighbor-changes'
;
LOGGING
:
'logging'
;
LOGIN
:
'login'
;
LOGIN_ATTEMPTS
:
'login-attempts'
;
LONG
:
'long'
;
LOOP
:
'loop'
;
LOOP_INCONSISTENCY
:
'loop-inconsistency'
;
LOOPBACK
:
// most common abbreviation
[Ll] [Oo]
(
[Oo] [Pp] [Bb] [Aa] [Cc] [Kk]
)?
;
LOW_MEMORY
:
'low-memory'
;
LOWER
:
'lower'
;
LPD
:
'lpd'
;
LPR
:
'lpr'
;
LSA
:
'lsa'
;
LSA_ARRIVAL
:
'lsa-arrival'
;
LSA_GROUP_PACING
:
'lsa-group-pacing'
;
LT
:
'lt'
;
MAC
:
'mac'
;
MAC_ADDRESS
:
'mac-address'
;
MAIL
:
'mail'
;
MAINTENANCE
:
'maintenance'
;
MANAGED_CONFIG_FLAG
:
'managed-config-flag'
;
MANAGEMENT
:
'management'
;
MANAGEMENT_ADDRESS
:
'management-address'
;
MAP
:
'map'
;
MAPPING
:
'mapping'
;
MASK
:
'mask'
;
MASK_REPLY
:
'mask-reply'
;
MASK_REQUEST
:
'mask-request'
;
MATCH
:
'match'
;
MATCH_ALL
:
'match-all'
;
MATCH_ANY
:
'match-any'
;
MAX_LENGTH
:
'max-length'
;
MAX_LINKS
:
'max-links'
;
MAX_LSA
:
'max-lsa'
;
MAX_METRIC
:
'max-metric'
;
MAXAS_LIMIT
:
'maxas-limit'
;
MAXIMUM
:
'maximum'
;
MAXIMUM_PATHS
:
'maximum-paths'
;
MAXIMUM_PEERS
:
'maximum-peers'
;
MAXIMUM_PREFIX
:
'maximum-prefix'
;
MAXPOLL
:
'maxpoll'
;
MBPS
:
[Mm] [Bb] [Pp] [Ss]
;
MCAST_GROUP
:
'mcast-group'
;
MD5
:
'md5'
// password follows if preceded by 'auth' or 'authentication-key <number>'
{
if (lastTokenType() == AUTH || secondToLastTokenType() == AUTHENTICATION_KEY) {
pushMode(M_Word);
}
}
;
MDIX
:
'mdix'
;
MDT
:
'mdt'
;
MED
:
'med'
;
MEDIA
:
'media'
;
MEDIUM
:
'medium'
;
MEMBER
:
'member'
// All other instances are followed by keywords or tokens in default mode
{
if (lastTokenType() == VRF) {
pushMode(M_Word);
}
}
;
MERGE_FAILURE
:
'merge-failure'
;
MESSAGE_DIGEST
:
'message-digest'
;
MESSAGE_DIGEST_KEY
:
'message-digest-key' -> pushMode ( M_Password )
;
METHOD
:
'method'
;
METRIC
:
'metric'
;
METRIC_TYPE
:
'metric-type'
;
MGMT
:
[Mm] [Gg] [Mm] [Tt]
;
MIN_LENGTH
:
'min-length'
;
MIN_LINKS
:
'min-links'
;
MIN_RX
:
'min_rx'
;
MINIMUM
:
'minimum'
;
MINPOLL
:
'minpoll'
;
MISSING_AS_WORST
:
'missing-as-worst'
;
MLD
:
'mld'
;
MOBILE_IP
:
'mobile-ip'
;
MOBILE_REDIRECT
:
'mobile-redirect'
;
MODE
:
'mode'
;
MODULE
:
'module'
;
MODULUS
:
'modulus'
;
MONITOR
:
'monitor'
{
if (lastTokenType() == FLOW) {
pushMode(M_Word);
}
}
;
MROUTER
:
'mrouter'
;
MSEC
:
'msec'
;
MST
:
'mst'
;
MTU
:
'mtu'
;
MTU_FAILURE
:
'mtu-failure'
;
MULTICAST
:
'multicast'
;
MULTIPATH_RELAX
:
'multipath-relax'
;
MULTIPLIER
:
'multiplier'
;
MVPN
:
'mvpn'
;
NAME
:
'name'
// If preceded by 'alias', name and then arbitrary text definition follow.
// Otherwise, just a name follows.
{
if (lastTokenType() == ALIAS) {
pushMode(M_AliasName);
} else {
pushMode(M_Word);
}
}
;
NAME_LOOKUP
:
'name-lookup'
;
NAME_SERVER
:
'name-server'
;
NAMESERVER
:
'nameserver'
;
NAT_FLOW
:
'nat-flow'
;
NATIVE
:
'native'
;
ND
:
'nd'
;
ND_NA
:
'nd-na'
;
ND_NS
:
'nd-ns'
;
NEGOTIATE
:
'negotiate'
;
NEIGHBOR
:
'neighbor'
;
NEIGHBOR_POLICY
:
'neighbor-policy' -> pushMode ( M_PrefixListOrWord )
;
NEQ
:
'neq'
;
NETBIOS_DGM
:
'netbios-dgm'
;
NETBIOS_NS
:
'netbios-ns'
;
NETBIOS_SS
:
'netbios-ss'
;
NET_REDIRECT
:
'net-redirect'
;
NET_TOS_REDIRECT
:
'net-tos-redirect'
;
NET_TOS_UNREACHABLE
:
'net-tos-unreachable'
;
NET_UNREACHABLE
:
'net-unreachable'
;
NETWORK
:
'network'
;
NETWORK_QOS
:
'network-qos'
;
NETWORK_UNKNOWN
:
'network-unknown'
;
NEVER
:
'never'
;
NEWROOT
:
'newroot'
;
NEWS
:
'news'
;
NEXT_HOP
:
'next-hop'
;
NEXT_HOP_SELF
:
'next-hop-self'
;
NEXT_HOP_THIRD_PARTY
:
'next-hop-third-party'
;
NEXTHOP
:
'nexthop'
;
NNTP
:
'nntp'
;
NO
:
'no'
;
NO_ADVERTISE
:
'no-advertise'
;
NO_EXPORT
:
'no-export'
;
NO_PREPEND
:
'no-prepend'
;
NO_REDISTRIBUTION
:
'no-redistribution'
;
NO_ROOM_FOR_OPTION
:
'no-room-for-option'
;
NO_SUMMARY
:
'no-summary'
;
NON_CRITICAL
:
'non-critical'
;
NON_DETERMINISTIC
:
'non-deterministic'
;
NON_EXIST_MAP
:
'non-exist-map'
;
NON500_ISAKMP
:
'non500-isakmp'
;
NONE
:
'none'
;
NORMAL
:
'normal'
;
NOS
:
'nos'
;
NOT_ADVERTISE
:
'not-advertise'
;
NOTIFY_LICENSEFILE_EXPIRY
:
'notify-licensefile-expiry'
;
NOTIFY_LICENSEFILE_MISSING
:
'notify-licensefile-missing'
;
NSSA
:
'nssa'
;
NTP
:
'ntp'
;
NULL
:
'null'
;
NULL0
:
[Nn] [Uu] [Ll] [Ll] ' '* '0'
;
NV
:
'nv'
;
NVE
:
'nve'
;
NXAPI
:
'nxapi'
;
NXOS
:
'nxos'
// name of image follows if preceded by 'boot'
{
if (lastTokenType() == BOOT) {
pushMode(M_Word);
}
}
;
OBJECT_GROUP
:
'object-group'
;
OBJSTORE
:
'objstore'
;
OFF
:
'off'
;
ON
:
'on'
;
ON_STARTUP
:
'on-startup'
;
OPTION
:
'option'
;
OPTION_MISSING
:
'option-missing'
;
ORIGIN
:
'origin'
;
ORIGINATE
:
'originate'
;
OSPF
:
'ospf'
// All other instances are followed by keywords or tokens in default mode
{
if (lastTokenType() == REDISTRIBUTE || lastTokenType() == ROUTER) {
pushMode(M_Word);
}
}
;
OSPFV3
:
'ospfv3'
// All other instances are followed by keywords or tokens in default mode
{
if (lastTokenType() == REDISTRIBUTE || lastTokenType() == ROUTER) {
pushMode(M_Word);
}
}
;
OTHER_CONFIG_FLAG
:
'other-config-flag'
;
OUT
:
'out'
;
OUTPUT
:
'output'
{
if (lastTokenType() == QOS || lastTokenType() == QUEUING || lastTokenType() == SERVICE_POLICY) {
pushMode(M_Word);
}
}
;
OVERLAY
:
'overlay'
;
OVERRIDE
:
'override'
;
PACKET
:
'packet'
;
PACKET_LENGTH
:
'packet-length'
;
PACKET_TOO_BIG
:
'packet-too-big'
;
PACKETS
:
'packets'
;
PARAM
:
'param'
;
PARAMETER_PROBLEM
:
'parameter-problem'
;
PASSIVE
:
'passive'
;
PASSIVE_INTERFACE
:
'passive-interface'
;
PASSWORD
:
'password' -> pushMode ( M_Password )
;
PATHCOST
:
'pathcost'
;
PAUSE
:
'pause'
;
PBR
:
'pbr'
;
PBR_STATISTICS
:
'pbr-statistics'
;
PCP
:
'pcp'
;
PEER
:
'peer' -> pushMode ( M_Word )
;
PEER_IP
:
'peer-ip'
;
PEER_LINK
:
'peer-link'
;
PEER_POLICY
:
'peer-policy' -> pushMode ( M_Word )
;
PEER_SESSION
:
'peer-session' -> pushMode ( M_Word )
;
PEER_VTEP
:
'peer-vtep'
;
PEERS
:
'peers'
;
PER_ENTRY
:
'per-entry'
;
PER_LINK
:
'per-link'
;
PER_VLAN
:
'per-vlan'
;
PERCENT
:
'percent'
;
PERIODIC
:
'periodic'
;
PERMIT
:
'permit'
;
PERMIT_ALL
:
'permit-all'
;
PIM
:
'pim'
;
PIM_AUTO_RP
:
'pim-auto-rp'
;
PIM6
:
'pim6'
;
PING
:
'ping'
;
PINNING
:
'pinning'
;
PLANNED_ONLY
:
'planned-only'
;
POAP
:
'poap'
;
POINT_TO_POINT
:
'point-to-point'
;
POLICE
:
'police'
;
POLICY
:
'policy'
;
POLICY_MAP
:
'policy-map' -> pushMode ( M_PolicyMap )
;
POP2
:
'pop2'
;
POP3
:
'pop3'
;
PORT
:
'port'
;
PORT_CHANNEL
:
[Pp] [Oo] [Rr] [Tt] '-' [Cc] [Hh] [Aa] [Nn] [Nn] [Ee] [Ll]
;
PORT_PRIORITY
:
'port-priority'
;
PORT_UNREACHABLE
:
'port-unreachable'
;
PORTGROUP
:
'portgroup' -> pushMode ( M_Word )
;
POST
:
'post'
;
PPS
:
'pps'
;
PRECEDENCE
:
'precedence'
;
PRECEDENCE_UNREACHABLE
:
'precedence-unreachable'
;
PREEMPT
:
'preempt'
;
PREFER
:
'prefer'
;
PREFIX_LIST
:
'prefix-list' -> pushMode ( M_Word )
;
PREFIX_PEER_TIMEOUT
:
'prefix-peer-timeout'
;
PREFIX_PEER_WAIT
:
'prefix-peer-wait'
;
PREPEND
:
'prepend'
;
PRIORITY
:
'priority'
;
PRIORITY_FLOW_CONTROL
:
'priority-flow-control'
;
PRIV
:
'priv' -> pushMode ( M_Priv )
;
PRIVATE_VLAN
:
'private-vlan'
;
PROTOCOL
:
'protocol'
;
PROTOCOL_UNREACHABLE
:
'protocol-unreachable'
;
PROXY
:
'proxy'
;
PROXY_ARP
:
'proxy-arp'
;
PROXY_LEAVE
:
'proxy-leave'
;
PSECURE_VIOLATION
:
'psecure-violation'
;
PSH
:
'psh'
;
PUT
:
'put'
;
QOS
:
'qos'
;
QOS_GROUP
:
'qos-group'
;
QUERIER
:
'querier'
;
QUERIER_TIMEOUT
:
'querier-timeout'
;
QUERY_INTERVAL
:
'query-interval'
;
QUERY_MAX_RESPONSE_TIME
:
'query-max-response-time'
;
QUERY_ONLY
:
'query-only' -> pushMode(M_Word)
;
QUEUE_LIMIT
:
'queue-limit'
;
QUEUING
:
'queuing'
;
RADIUS
:
'radius'
// Other instances are followed by tokens in default mode, or occur in non-default mode.
{
if (lastTokenType() == SERVER) {
pushMode(M_Word);
}
}
;
RANDOM_DETECT
:
'random-detect'
;
RANGE
:
'range'
;
RD
:
'rd'
;
REACHABILITY
:
'reachability'
;
REACTION_CONFIGURATION
:
'reaction-configuration' -> pushMode( M_Remark )
;
REACTION_TRIGGER
:
'reaction-trigger'
;
READ
:
'read'
;
REASSEMBLY_TIMEOUT
:
'reassembly-timeout'
;
RECEIVE
:
'receive'
;
RECONNECT_INTERVAL
:
'reconnect-interval'
;
RECOVERY
:
'recovery'
;
REDIRECT
:
'redirect'
;
REDIRECTS
:
'redirects'
;
REDISTRIBUTE
:
'redistribute'
;
REFERENCE_BANDWIDTH
:
'reference-bandwidth'
;
REFLECTION
:
'reflection'
;
RELAY
:
'relay'
;
RELOAD
:
'reload'
;
REMARK
:
'remark' -> pushMode ( M_Remark )
;
REMOTE_AS
:
'remote-as'
;
REMOVE
:
'remove'
;
REMOVE_PRIVATE_AS
:
'remove-private-as'
;
REPLACE_AS
:
'replace-as'
;
REPORT_FLOOD
:
'report-flood'
;
REPORT_POLICY
:
'report-policy'
;
REPORT_SUPPRESSION
:
'report-suppression'
;
REQUEST
:
'request'
;
RESET
:
'reset'
;
RESPONDER
:
'responder' -> pushMode( M_Remark )
;
RESTART
:
'restart'
;
RESTART_TIME
:
'restart-time'
;
RETAIN
:
'retain'
;
RETRANSMIT_INTERVAL
:
'retransmit-interval'
;
RIP
:
'rip'
// All other instances are followed by keywords or tokens in default mode
{
switch (lastTokenType()) {
case REDISTRIBUTE:
case ROUTER:
pushMode(M_Word);
break;
default:
break;
}
}
;
ROBUSTNESS_VARIABLE
:
'robustness-variable'
;
ROLE
:
'role'
;
ROOT
:
'root'
;
ROOT_INCONSISTENCY
:
'root-inconsistency'
;
ROUTABLE
:
'routable'
;
ROUTE
:
'route'
;
ROUTE_FILTER
:
'route-filter'
;
ROUTE_MAP
:
'route-map' -> pushMode ( M_Word )
;
ROUTE_PREFERENCE
:
'route-preference'
;
ROUTE_REFLECTOR_CLIENT
:
'route-reflector-client'
;
ROUTE_TARGET
:
'route-target'
;
ROUTER
:
'router'
;
ROUTER_ADVERTISEMENT
:
'router-advertisement'
;
ROUTER_ID
:
'router-id'
;
ROUTER_LSA
:
'router-lsa'
;
ROUTER_SOLICITATION
:
'router-solicitation'
;
ROUTINE
:
'routine'
;
RP_ADDRESS
:
'rp-address'
;
RPF_FAILURE
:
'rpf-failure'
;
RSA
:
'rsa'
;
RST
:
'rst'
;
RULE
:
'rule'
;
RX
:
'rx'
;
SAMPLER
:
'sampler' -> pushMode(M_Word)
;
SCHEDULE
:
'schedule' -> pushMode( M_Remark )
;
SCHEDULER
:
'scheduler'
;
SCP_SERVER
:
'scp-server'
;
SECONDARY
:
'secondary'
;
SECURE
:
'secure'
;
SECURITY_VIOLATION
:
'security-violation'
;
SELECTION
:
'selection'
;
SEND
:
'send'
;
SEND_COMMUNITY
:
'send-community'
;
SEQ
:
'seq'
;
SERVE
:
'serve' -> pushMode(M_Word)
;
SERVE_ONLY
:
'serve-only' -> pushMode(M_Word)
;
SERVER
:
'server'
;
SERVER_STATE_CHANGE
:
'server-state-change'
;
SERVICE
:
'service'
;
SERVICE_POLICY
:
'service-policy'
;
SESSION
:
'session'
;
SET
:
'set'
;
SFLOW
:
'sflow'
;
SFTP_SERVER
:
'sftp-server'
;
SG_EXPIRY_TIMER
:
'sg-expiry-timer'
;
SG_RPF_FAILURE
:
'sg-rpf-failure'
;
SHA
:
'sha'
// if preceded by 'auth', password follows
{
if (lastTokenType() == AUTH) {
pushMode(M_Word);
}
}
;
SHAPE
:
'shape'
;
SHOW
:
'show'
;
SHUT
:
'shut'
;
SHUTDOWN
:
'shutdown'
;
SINGLE_CONNECTION
:
'single-connection'
;
SIZE
:
'size'
;
SLA
:
'sla'
;
SMALL
:
'small'
;
SMART_RELAY
:
'smart-relay'
;
SMTP
:
'smtp'
;
SMTP_SEND_FAIL
:
'smtp-send-fail'
;
SNMP
:
'snmp'
;
SNMP_SERVER
:
'snmp-server'
;
SNMPTRAP
:
'snmptrap'
;
SNOOPING
:
'snooping'
;
SOFT_RECONFIGURATION
:
'soft-reconfiguration'
;
SOO
:
'soo'
;
SOURCE
:
'source'
;
SOURCE_INTERFACE
:
'source-interface'
;
SOURCE_PROTOCOL
:
'source-protocol' -> pushMode(M_Words)
;
SOURCE_QUENCH
:
'source-quench'
;
SOURCE_ROUTE_FAILED
:
'source-route-failed'
;
SPANNING_TREE
:
'spanning-tree'
;
SPARSE_MODE
:
'sparse-mode'
;
SPEED
:
'speed'
;
SPF
:
'spf'
;
SPINE_ANYCAST_GATEWAY
:
'spine-anycast-gateway'
;
SRC_IP
:
'src-ip'
;
SRC_MAC
:
'src-mac'
;
SSH
:
'ssh'
;
STALEPATH_TIME
:
'stalepath-time'
;
STANDARD
:
'standard' -> pushMode ( M_Word )
;
STARTUP_QUERY_COUNT
:
'startup-query-count'
;
STARTUP_QUERY_INTERVAL
:
'startup-query-interval'
;
STATE
:
'state'
;
STATE_CHANGE
:
'state-change'
;
STATE_CHANGE_NOTIF
:
'state-change-notif'
;
STATIC
:
'static'
;
STATIC_GROUP
:
'static-group'
;
STATISTICS
:
'statistics'
;
STICKY_ARP
:
'sticky-arp'
;
STORM_CONTROL
:
'storm-control'
;
STPX
:
'stpx'
;
STRICT_RFC_COMPLIANT
:
'strict-rfc-compliant'
;
STUB
:
'stub'
;
STUB_PREFIX_LSA
:
'stub-prefix-lsa'
;
SUB_OPTION
:
'sub-option'
;
SUBNET_BROADCAST
:
'subnet-broadcast'
;
SUMMARY_ADDRESS
:
'summary-address'
;
SUMMARY_LSA
:
'summary-lsa'
;
SUMMARY_ONLY
:
'summary-only'
;
SUMMER_TIME
:
'summer-time'
;
SUNRPC
:
'sunrpc'
;
SUP_1
:
'sup-1'
;
SUP_2
:
'sup-2'
;
SUPPRESS
:
'suppress'
;
SUPPRESS_ARP
:
'suppress-arp'
;
SUPPRESS_FIB_PENDING
:
'suppress-fib-pending'
;
SUPPRESS_INACTIVE
:
'suppress-inactive'
;
SUPPRESS_MAP
:
'suppress-map'
;
// sic
SUPRESS_FA
:
'supress-fa'
;
SUSPEND_INDIVIDUAL
:
'suspend-individual'
;
SWITCHNAME
:
'switchname'
{
if (lastTokenType() == NEWLINE || lastTokenType() == -1) {
pushMode(M_Hostname);
}
}
;
SWITCHPORT
:
'switchport'
;
SYN
:
'syn'
;
SYNC
:
'sync'
;
SYSLOG
:
'syslog'
;
SYSTEM
:
'system'
// name of image follows if preceded by 'boot'
{
if (lastTokenType() == BOOT) {
pushMode(M_Word);
}
}
;
TABLE_MAP
:
'table-map' -> pushMode ( M_Word )
;
TACACS
:
'tacacs'
;
TACACS_SERVER
:
'tacacs-server'
;
TACACSP
:
'tacacs+'
// Other instances are followed by tokens in default mode, or occur in non-default mode.
{
if (lastTokenType() == SERVER) {
pushMode(M_Word);
}
}
;
TAG
:
'tag'
;
TAIL_DROP
:
'tail-drop'
;
TALK
:
'talk'
;
TCP
:
'tcp'
;
TCP_CONNECT
:
'tcp-connect' -> pushMode( M_Remark )
;
TCP_FLAGS_MASK
:
'tcp-flags-mask'
;
TCP_OPTION_LENGTH
:
'tcp-option-length'
;
TELNET
:
'telnet'
;
TEMPLATE
:
'template'
;
TENG_4X
:
'10g-4x'
;
TERMINAL
:
'terminal'
;
TEST
:
'test'
;
TEXT
:
'text' -> pushMode ( M_Word )
;
TFTP
:
'tftp'
;
THRESHOLD
:
'threshold'
;
THROTTLE
:
'throttle'
;
TIME
:
'time'
;
TIME_EXCEEDED
:
'time-exceeded'
;
TIMEOUT
:
'timeout'
;
TIMERS
:
'timers'
;
TIMESTAMP_REPLY
:
'timestamp-reply'
;
TIMESTAMP_REQUEST
:
'timestamp-request'
;
TIMEZONE
:
'timezone' -> pushMode ( M_Remark )
;
TLV_SET
:
'tlv-set'
;
TOPOLOGYCHANGE
:
'topologychange'
;
TRACEROUTE
:
'traceroute'
;
TRACE
:
'trace'
;
TRACK
:
'track'
;
TRAFFIC_FILTER
:
'traffic-filter' -> pushMode ( M_Word )
;
TRANSLATE
:
'translate'
;
TRANSMIT
:
'transmit'
;
TRANSMIT_DELAY
:
'transmit-delay'
;
TRANSPORT
:
'transport'
;
TRAP
:
'trap'
// if not preceded by 'enable', followed by 'version' or SNMP community secret
{
switch(lastTokenType()) {
case ACTION:
case ENABLE:
case LOGGING:
case SOURCE_INTERFACE:
break;
default:
pushMode(M_SnmpHostTraps);
break;
}
}
;
TRAPS
:
'traps'
// if not preceded by 'enable', followed by 'version' or SNMP community secret
{
switch(lastTokenType()) {
case ENABLE:
case LOGGING:
case SOURCE_INTERFACE:
break;
default:
pushMode(M_SnmpHostTraps);
break;
}
}
;
TRIGGER_DELAY
:
'trigger-delay'
;
TRUNK
:
'trunk'
;
TRUNK_STATUS
:
'trunk-status'
;
TRUST
:
'trust'
;
TRUSTED
:
'trusted'
;
TRUSTPOINT
:
'trustpoint'
;
TTL
:
'ttl'
;
TTL_EXCEEDED
:
'ttl-exceeded'
;
TTL_FAILURE
:
'ttl-failure'
;
TX
:
'tx'
;
TYPE
:
'type'
// Other instances are followed by tokens in default mode, or occur in non-default mode.
{
if (lastTokenType() == CLASS) {
pushMode(M_ClassType);
} else if (lastTokenType() == SERVICE_POLICY) {
pushMode(M_ServicePolicyType);
}
}
;
TYPE_1
:
'type-1'
;
TYPE_2
:
'type-2'
;
TYPE7
:
'type7'
;
UDLD
:
'udld'
;
UDP
:
'udp'
;
UDP_ECHO
:
'udp-echo' -> pushMode ( M_Remark )
;
UDP_JITTER
:
'udp-jitter' -> pushMode ( M_Remark )
;
UNCHANGED
:
'unchanged'
;
UNICAST
:
'unicast'
;
UNREACHABLE
:
'unreachable'
;
UNREACHABLES
:
'unreachables'
;
UNSUPPRESS_MAP
:
'unsuppress-map'
;
UPDATE
:
'update'
;
UPDATE_SOURCE
:
'update-source'
;
UPGRADE
:
'upgrade'
;
UPGRADEJOBSTATUSNOTIFY
:
[Uu] [Pp] [Gg] [Rr] [Aa] [Dd] [Ee] [Jj] [Oo] [Bb] [Ss] [Tt] [Aa] [Tt] [Uu]
[Ss] [Nn] [Oo] [Tt] [Ii] [Ff] [Yy]
;
UPGRADEOPNOTIFYONCOMPLETION
:
[Uu] [Pp] [Gg] [Rr] [Aa] [Dd] [Ee] [Oo] [Pp] [Nn] [Oo] [Tt] [Ii] [Ff] [Yy]
[Oo] [Nn] [Cc] [Oo] [Mm] [Pp] [Ll] [Ee] [Tt] [Ii] [Oo] [Nn]
;
UPPER
:
'upper'
;
URG
:
'urg'
;
USE_ACL
:
'use-acl' -> pushMode ( M_Word )
;
USE_BIA
:
'use-bia'
;
USE_IPV4ACL
:
'use-ipv4acl' -> pushMode ( M_Word )
;
USE_IPV6ACL
:
'use-ipv6acl' -> pushMode ( M_Word )
;
USE_VRF
:
'use-vrf' -> pushMode ( M_Word )
;
USER
:
'user'
{
if (lastTokenType() == SNMP_SERVER) {
pushMode(M_SnmpUser);
}
}
;
USERNAME
:
'username' -> pushMode ( M_Remark )
;
USERPASSPHRASE
:
'userpassphrase'
;
UUCP
:
'uucp'
;
V3_REPORT_SUPPRESSION
:
'v3-report-suppression'
;
VALIDATE
:
'validate'
;
VERIFY
:
'verify'
;
VERSION
:
'version'
// If preceded by 'traps', snmp version follows.
// Otherwise, arbitrary version string follows.
{
switch(lastTokenType()) {
case TRAPS:
pushMode(M_SnmpVersion);
break;
case HSRP:
pushMode(M_HsrpVersion);
break;
default:
pushMode(M_Remark);
break;
}
}
;
VETHERNET
:
'vethernet'
;
VIOLATE
:
'violate'
;
VIRTUAL_LINK
:
'virtual-link'
;
VLAN
:
[Vv] [Ll] [Aa] [Nn]
;
VN_SEGMENT
:
'vn-segment'
;
VN_SEGMENT_VLAN_BASED
:
'vn-segment-vlan-based'
;
VNI
:
'vni'
;
VPC
:
'vpc'
;
VPNV4
:
'vpnv4'
;
VPNV6
:
'vpnv6'
;
VRF
:
'vrf' -> pushMode ( M_Vrf )
;
VTP
:
'vtp'
;
VTY
:
'vty'
;
WAIT_FOR
:
'wait-for'
;
WAIT_IGP_CONVERGENCE
:
'wait-igp-convergence'
;
WARNING_ONLY
:
'warning-only'
;
WEIGHT
:
'weight'
;
WHOIS
:
'whois'
;
WHO
:
'who'
;
WITHDRAW
:
'withdraw'
;
WWW
:
'www'
;
XCONNECT
:
'xconnect'
;
XDMCP
:
'xdmcp'
;
// Other Tokens
ASTERISK
:
'*'
;
BLANK_LINE
:
(
F_Whitespace
)* F_Newline
{lastTokenType() == NEWLINE|| lastTokenType() == -1}?
F_Newline* -> channel ( HIDDEN )
;
COLON
:
':'
;
COMMA
:
','
;
COMMENT_LINE
:
(
F_Whitespace
)* [!#]
{lastTokenType() == NEWLINE || lastTokenType() == -1}?
F_NonNewline*
(
F_Newline+
| EOF
) -> channel ( HIDDEN )
;
DASH
:
'-'
;
DOUBLE_QUOTE
:
'"' -> pushMode ( M_DoubleQuote )
;
FORWARD_SLASH
:
'/'
;
SUBNET_MASK
:
F_SubnetMask
;
IP_ADDRESS
:
F_IpAddress
;
IP_PREFIX
:
F_IpPrefix
;
IPV6_ADDRESS
:
F_Ipv6Address
;
IPV6_PREFIX
:
F_Ipv6Prefix
;
MAC_ADDRESS_LITERAL
:
F_MacAddress
;
NEWLINE
:
F_Newline+
;
PERIOD
:
'.'
;
UINT8
:
F_Uint8
;
UINT16
:
F_Uint16
;
UINT32
:
F_Uint32
;
WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
// Fragments
fragment
F_Digit
:
[0-9]
;
fragment
F_HexDigit
:
[0-9A-Fa-f]
;
fragment
F_HexUint32
:
'0x' F_HexDigit F_HexDigit? F_HexDigit? F_HexDigit? F_HexDigit? F_HexDigit? F_HexDigit? F_HexDigit?
;
fragment
F_IpAddress
:
F_Uint8 '.' F_Uint8 '.' F_Uint8 '.' F_Uint8
;
fragment
F_IpPrefix
:
F_IpAddress '/' F_IpPrefixLength
;
fragment
F_IpPrefixLength
:
F_Digit
| [12] F_Digit
| [3] [012]
;
fragment
F_Ipv6Address
:
'::' F_Ipv6HexWordLE7
| F_Ipv6HexWord '::' F_Ipv6HexWordLE6
| F_Ipv6HexWord2 '::' F_Ipv6HexWordLE5
| F_Ipv6HexWord3 '::' F_Ipv6HexWordLE4
| F_Ipv6HexWord4 '::' F_Ipv6HexWordLE3
| F_Ipv6HexWord5 '::' F_Ipv6HexWordLE2
| F_Ipv6HexWord6 '::' F_Ipv6HexWordLE1
| F_Ipv6HexWord7 '::'
| F_Ipv6HexWord8
;
fragment
F_Ipv6HexWord
:
F_HexDigit F_HexDigit? F_HexDigit? F_HexDigit?
;
fragment
F_Ipv6HexWord2
:
F_Ipv6HexWord ':' F_Ipv6HexWord
;
fragment
F_Ipv6HexWord3
:
F_Ipv6HexWord2 ':' F_Ipv6HexWord
;
fragment
F_Ipv6HexWord4
:
F_Ipv6HexWord3 ':' F_Ipv6HexWord
;
fragment
F_Ipv6HexWord5
:
F_Ipv6HexWord4 ':' F_Ipv6HexWord
;
fragment
F_Ipv6HexWord6
:
F_Ipv6HexWord5 ':' F_Ipv6HexWord
;
fragment
F_Ipv6HexWord7
:
F_Ipv6HexWord6 ':' F_Ipv6HexWord
;
fragment
F_Ipv6HexWord8
:
F_Ipv6HexWord6 ':' F_Ipv6HexWordFinal2
;
fragment
F_Ipv6HexWordFinal2
:
F_Ipv6HexWord2
| F_IpAddress
;
fragment
F_Ipv6HexWordFinal3
:
F_Ipv6HexWord ':' F_Ipv6HexWordFinal2
;
fragment
F_Ipv6HexWordFinal4
:
F_Ipv6HexWord ':' F_Ipv6HexWordFinal3
;
fragment
F_Ipv6HexWordFinal5
:
F_Ipv6HexWord ':' F_Ipv6HexWordFinal4
;
fragment
F_Ipv6HexWordFinal6
:
F_Ipv6HexWord ':' F_Ipv6HexWordFinal5
;
fragment
F_Ipv6HexWordFinal7
:
F_Ipv6HexWord ':' F_Ipv6HexWordFinal6
;
fragment
F_Ipv6HexWordLE1
:
F_Ipv6HexWord?
;
fragment
F_Ipv6HexWordLE2
:
F_Ipv6HexWordLE1
| F_Ipv6HexWordFinal2
;
fragment
F_Ipv6HexWordLE3
:
F_Ipv6HexWordLE2
| F_Ipv6HexWordFinal3
;
fragment
F_Ipv6HexWordLE4
:
F_Ipv6HexWordLE3
| F_Ipv6HexWordFinal4
;
fragment
F_Ipv6HexWordLE5
:
F_Ipv6HexWordLE4
| F_Ipv6HexWordFinal5
;
fragment
F_Ipv6HexWordLE6
:
F_Ipv6HexWordLE5
| F_Ipv6HexWordFinal6
;
fragment
F_Ipv6HexWordLE7
:
F_Ipv6HexWordLE6
| F_Ipv6HexWordFinal7
;
fragment
F_Ipv6Prefix
:
F_Ipv6Address '/' F_Ipv6PrefixLength
;
fragment
F_Ipv6PrefixLength
:
F_Digit
| F_PositiveDigit F_Digit
| '1' [01] F_Digit
| '12' [0-8]
;
fragment
F_MacAddress
:
F_HexDigit F_HexDigit F_HexDigit F_HexDigit '.'
F_HexDigit F_HexDigit F_HexDigit F_HexDigit '.'
F_HexDigit F_HexDigit F_HexDigit F_HexDigit
;
fragment
F_Newline
:
[\n\r]
;
fragment
F_NonNewline
:
~[\n\r]
;
fragment
F_NonWhitespace
:
~[ \t\u000C\u00A0\n\r]
;
fragment
F_PositiveDigit
:
[1-9]
;
fragment
F_StandardCommunity
:
F_Uint16 ':' F_Uint16
;
fragment
F_SubnetMask
:
F_SubnetMaskOctet '.0.0.0'
| '255.' F_SubnetMaskOctet . '.0.0'
| '255.255.' F_SubnetMaskOctet . '.0'
| '255.255.255.' F_SubnetMaskOctet
;
fragment
F_SubnetMaskOctet
:
'0'
| '128'
| '192'
| '224'
| '240'
| '248'
| '252'
| '254'
| '255'
;
fragment
F_Uint8
:
F_Digit
| F_PositiveDigit F_Digit
| '1' F_Digit F_Digit
| '2' [0-4] F_Digit
| '25' [0-5]
;
fragment
F_Uint16
:
F_Digit
| F_PositiveDigit F_Digit F_Digit? F_Digit?
| [1-5] F_Digit F_Digit F_Digit F_Digit
| '6' [0-4] F_Digit F_Digit F_Digit
| '65' [0-4] F_Digit F_Digit
| '655' [0-2] F_Digit
| '6553' [0-5]
;
fragment
F_Uint32
:
// 0-4294967295
F_Digit
| F_PositiveDigit F_Digit F_Digit? F_Digit? F_Digit? F_Digit? F_Digit?
F_Digit? F_Digit?
| [1-3] F_Digit F_Digit F_Digit F_Digit F_Digit F_Digit F_Digit F_Digit
F_Digit
| '4' [0-1] F_Digit F_Digit F_Digit F_Digit F_Digit F_Digit F_Digit F_Digit
| '42' [0-8] F_Digit F_Digit F_Digit F_Digit F_Digit F_Digit F_Digit
| '429' [0-3] F_Digit F_Digit F_Digit F_Digit F_Digit F_Digit
| '4294' [0-8] F_Digit F_Digit F_Digit F_Digit F_Digit
| '42949' [0-5] F_Digit F_Digit F_Digit F_Digit
| '429496' [0-6] F_Digit F_Digit F_Digit
| '4294967' [0-1] F_Digit F_Digit
| '42949672' [0-8] F_Digit
| '429496729' [0-5]
;
fragment
F_Whitespace
:
' '
| '\t'
| '\u000C'
| '\u00A0'
;
fragment
F_Word
:
F_WordChar+
;
fragment
F_WordChar
:
[0-9A-Za-z!@#$%^&*()_=+.;:{}/]
| '-'
;
mode M_AaaGroup;
M_AaaGroup_LOCAL
:
'local' -> type ( LOCAL ) , popMode
;
M_AaaGroup_WORD
:
F_Word -> type ( WORD )
;
M_AaaGroup_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
mode M_AliasName;
M_AliasName_WORD
:
F_Word -> type ( WORD ) , mode ( M_Remark )
;
M_AliasName_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
mode M_Banner;
M_Banner_EXEC
:
'exec' -> type ( EXEC ) , mode ( M_BannerDelimiter )
;
M_Banner_MOTD
:
'motd' -> type ( MOTD ) , mode ( M_BannerDelimiter )
;
M_Banner_NEWLINE
:
F_Newline+ -> type ( NEWLINE ) , popMode
;
M_Banner_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
mode M_BannerDelimiter;
M_BannerDelimiter_BANNER_DELIMITER
:
F_NonWhitespace
{
setBannerDelimiter();
}
-> type ( BANNER_DELIMITER ) , mode ( M_BannerText )
;
M_BannerDelimiter_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
mode M_BannerText;
M_BannerText_BANNER_DELIMITER
:
{bannerDelimiterFollows()}?
.
{
unsetBannerDelimiter();
}
-> type ( BANNER_DELIMITER ) , mode ( M_BannerCleanup )
;
M_BannerText_BODY
:
.
{
if (bannerDelimiterFollows()) {
setType(BANNER_BODY);
} else {
more();
}
}
;
mode M_BannerCleanup;
M_BannerCleanup_IGNORED
:
F_NonNewline+ -> channel ( HIDDEN )
;
M_BannerCleanup_NEWLINE
:
F_Newline+ -> type ( NEWLINE ) , popMode
;
mode M_Class;
M_Class_TYPE
:
'type' -> type ( TYPE ) , mode ( M_ClassType )
;
M_Class_WORD
:
F_NonWhitespace+ -> type ( WORD ) , popMode
;
M_Class_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
mode M_ClassType;
// control-plane omitted on purpose
M_ClassType_NETWORK_QOS
:
'network-qos' -> type ( NETWORK_QOS ) , mode ( M_Word )
;
M_ClassType_QOS
:
'qos' -> type ( QOS ) , mode ( M_Word )
;
M_ClassType_QUEUING
:
'queuing' -> type ( QUEUING ) , mode ( M_Word )
;
M_ClassType_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
mode M_ClassMap;
M_ClassMap_MATCH_ALL
:
'match-all' -> type ( MATCH_ALL ) , mode ( M_Word )
;
M_ClassMap_MATCH_ANY
:
'match-any' -> type ( MATCH_ANY ) , mode ( M_Word )
;
M_ClassMap_TYPE
:
'type' -> type ( TYPE ) , mode ( M_ClassMapType )
;
M_ClassMap_WORD
:
F_NonWhitespace+ -> type ( WORD ) , popMode
;
M_ClassMap_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
mode M_ClassMapType;
M_ClassMapType_CONTROL_PLANE
:
'control-plane' -> type ( CONTROL_PLANE ) , mode ( M_ClassMapType2 )
;
M_ClassMapType_NETWORK_QOS
:
'network-qos' -> type ( NETWORK_QOS ) , mode ( M_ClassMapType2 )
;
M_ClassMapType_QOS
:
'qos' -> type ( QOS ) , mode ( M_ClassMapType2 )
;
M_ClassMapType_QUEUING
:
'queuing' -> type ( QUEUING ) , mode ( M_ClassMapType2 )
;
M_ClassMapType_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
mode M_ClassMapType2;
M_ClassMapType2_MATCH_ALL
:
'match-all' -> type ( MATCH_ALL ) , mode ( M_Word )
;
M_ClassMapType2_MATCH_ANY
:
'match-any' -> type ( MATCH_ANY ) , mode ( M_Word )
;
M_ClassMapType2_WORD
:
F_NonWhitespace+ -> type ( WORD ) , popMode
;
M_ClassMapType2_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
mode M_DoubleQuote;
M_DoubleQuote_DOUBLE_QUOTE
:
'"' -> type ( DOUBLE_QUOTE ) , popMode
;
M_DoubleQuote_NEWLINE
:
// Break out if termination does not occur on same line
F_Newline+ -> type ( NEWLINE ) , popMode
;
M_DoubleQuote_QUOTED_TEXT
:
~["\r\n]+ -> type ( QUOTED_TEXT )
;
mode M_Expanded;
M_Expanded_WORD
:
F_Word -> type ( WORD ) , mode(M_Expanded2)
;
M_Expanded_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
mode M_Expanded2;
M_Expanded2_DENY
:
'deny' -> type ( DENY ), mode(M_Expanded3)
;
M_Expanded2_PERMIT
:
'permit' -> type ( PERMIT ), mode(M_Expanded3)
;
M_Expanded2_SEQ
:
'seq' -> type ( SEQ )
;
M_Expanded2_UINT8
:
F_Uint8 -> type(UINT8)
;
M_Expanded2_UINT16
:
F_Uint16 -> type(UINT16)
;
M_Expanded2_UINT32
:
F_Uint32 -> type(UINT32)
;
M_Expanded2_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
mode M_Expanded3;
M_Expanded3_WS
:
F_Whitespace+ -> channel ( HIDDEN ), mode(M_Expanded4)
;
mode M_Expanded4;
M_Expanded4_DOUBLE_QUOTE
:
'"' -> type(DOUBLE_QUOTE), mode(M_DoubleQuote)
;
M_Expanded4_REMARK_TEXT
:
~["\r\n] F_NonWhitespace* (F_Whitespace+ F_NonWhitespace+)* -> type(REMARK_TEXT), popMode
;
mode M_Hostname;
M_Hostname_SUBDOMAIN_NAME
:
(
(
[A-Za-z0-9_]
| '-'
)+ '.'
)*
(
[A-Za-z0-9_]
| '-'
)+ -> type ( SUBDOMAIN_NAME ) , popMode
;
M_Hostname_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
mode M_HsrpVersion;
M_HsrpVersion_VERSION_1
:
'1' -> type ( HSRP_VERSION_1 ) , popMode
;
M_HsrpVersion_VERSION_2
:
'2' -> type ( HSRP_VERSION_2 ) , popMode
;
M_HsrpVersion_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
mode M_MatchIpAddress;
M_MatchIpAddress_PREFIX_LIST
:
'prefix-list' -> type ( PREFIX_LIST ) , mode ( M_Words )
;
M_MatchIpAddress_WORD
:
F_Word -> type ( WORD ) , mode ( M_Words )
;
M_MatchIpAddress_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
mode M_Password;
M_Password_PASSWORD_0
:
'0' ' '+ -> type ( PASSWORD_0 )
;
M_Password_PASSWORD_3
:
'3' ' '+ -> type ( PASSWORD_3 ) , mode ( M_Password3 )
;
M_Password_PASSWORD_7
:
'7' ' '+ -> type ( PASSWORD_7 ) , mode ( M_Password7 )
;
M_Password_PASSWORD_0_TEXT
:
F_NonWhitespace+ -> type ( PASSWORD_0_TEXT ) , popMode
;
M_Password_WS
:
F_Whitespace+ -> channel(HIDDEN)
;
mode M_Password3;
M_Password3_PASSWORD_3_TEXT
:
// TODO: differentiate from malformed
F_NonNewline+ -> type ( PASSWORD_3_TEXT ) , popMode
;
M_Password3_PASSWORD_3_MALFORMED_TEXT
:
F_NonNewline+ -> type ( PASSWORD_3_MALFORMED_TEXT ) , popMode
;
mode M_Password7;
M_Password7_PASSWORD_7_TEXT
:
// TODO: differentiate from malformed
F_NonNewline+ -> type ( PASSWORD_7_TEXT ) , popMode
;
M_Password7_PASSWORD_7_MALFORMED_TEXT
:
F_NonNewline+ -> type ( PASSWORD_7_MALFORMED_TEXT ) , popMode
;
mode M_PolicyMap;
M_PolicyMap_TYPE
:
'type' -> type ( TYPE ) , mode ( M_PolicyMapType )
;
M_PolicyMap_WORD
:
F_NonWhitespace+ -> type ( WORD ) , popMode
;
M_PolicyMap_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
mode M_PolicyMapType;
M_PolicyMapType_CONTROL_PLANE
:
'control-plane' -> type ( CONTROL_PLANE ) , mode ( M_Word )
;
M_PolicyMapType_NETWORK_QOS
:
'network-qos' -> type ( NETWORK_QOS ) , mode ( M_Word )
;
M_PolicyMapType_QOS
:
'qos' -> type ( QOS ) , mode ( M_Word )
;
M_PolicyMapType_QUEUING
:
'queuing' -> type ( QUEUING ) , mode ( M_Word )
;
M_PolicyMapType_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
mode M_PrefixListOrWord;
M_PrefixListOrWord_NEWLINE
:
F_Newline+ -> type ( NEWLINE ) , popMode
;
M_PrefixListOrWord_PREFIX_LIST
:
'prefix-list' -> type ( PREFIX_LIST ) , mode ( M_Word )
;
M_PrefixListOrWord_WORD
:
F_Word -> type ( WORD ) , popMode
;
M_PrefixListOrWord_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
mode M_Priv;
M_Priv_AES_128
:
'aes-128' -> type ( AES_128 ) , mode ( M_Word )
;
M_Priv_WORD
:
F_Word -> type ( WORD ) , popMode
;
M_Priv_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
mode M_Remark;
M_Remark_REMARK_TEXT
:
F_NonWhitespace+ (F_Whitespace+ F_NonWhitespace+)* -> type ( REMARK_TEXT ) , popMode
;
M_Remark_NEWLINE
:
F_Newline+ -> type ( NEWLINE ) , popMode
;
M_Remark_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
mode M_ServicePolicyType;
// control-plane omitted on purpose
M_ServicePolicyType_NETWORK_QOS
:
'network-qos' -> type ( NETWORK_QOS ) , mode ( M_Word )
;
M_ServicePolicyType_QOS
:
'qos' -> type ( QOS ) , popMode
;
M_ServicePolicyType_QUEUING
:
'queuing' -> type ( QUEUING ) , popMode
;
M_ServicePolicyType_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
mode M_SnmpHostTraps;
M_SnmpHostTraps_VERSION
:
'version' -> type ( VERSION ) , mode ( M_SnmpVersion )
;
M_SnmpHostTraps_WORD
:
F_Word -> type ( WORD ) , popMode
;
M_SnmpHostTraps_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
mode M_SnmpUser;
M_SnmpUser_WORD
:
F_Word -> type ( WORD ) , mode ( M_SnmpUserGroup )
;
M_SnmpUser_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
mode M_SnmpUserGroup;
M_SnmpUserGroup_AUTH
:
'auth' -> type ( AUTH ) , popMode
;
M_SnmpUserGroup_WORD
:
F_Word -> type ( WORD ) , popMode
;
M_SnmpUserGroup_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
mode M_SnmpVersion;
M_SnmpVersion_SNMP_VERSION_1
:
'1' -> type ( SNMP_VERSION_1 ) , mode ( M_Word )
;
M_SnmpVersion_SNMP_VERSION_2
:
'2' -> type ( SNMP_VERSION_2 ) , mode ( M_Word )
;
M_SnmpVersion_SNMP_VERSION_2C
:
'2' [Cc] -> type ( SNMP_VERSION_2C ) , mode ( M_Word )
;
M_SnmpVersion_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
mode M_TacacsServerHost;
M_TacacsServerHost_IP_ADDRESS
:
F_IpAddress -> type(IP_ADDRESS), popMode
;
M_TacacsServerHost_IPV6_ADDRESS
:
F_Ipv6Address -> type(IPV6_ADDRESS), popMode
;
M_TacacsServerHost_WORD
:
F_Word -> type ( WORD ) , popMode
;
M_TacacsServerHost_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
mode M_Vrf;
M_Vrf_CONTEXT
:
'context' -> type ( CONTEXT )
;
M_Vrf_MEMBER
:
'member' -> type ( MEMBER )
;
M_Vrf_NEWLINE
:
F_Newline+ -> type ( NEWLINE ) , popMode
;
M_Vrf_WORD
:
F_Word -> type ( WORD ) , popMode
;
M_Vrf_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
// Keep in sync with M_Word
mode M_TwoWords;
M_TwoWords_NEWLINE
:
F_Newline+ -> type ( NEWLINE ) , popMode
;
M_TwoWords_WORD
:
F_Word -> type ( WORD ) , mode ( M_Word )
;
M_TwoWords_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
// Keep in sync with M_TwoWords
mode M_Word;
M_Word_NEWLINE
:
F_Newline+ -> type ( NEWLINE ) , popMode
;
M_Word_WORD
:
F_Word -> type ( WORD ) , popMode
;
M_Word_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
mode M_Words;
M_Words_NEWLINE
:
F_Newline+ -> type ( NEWLINE ) , popMode
;
M_Words_WORD
:
F_Word -> type ( WORD )
;
M_Words_WS
:
F_Whitespace+ -> channel ( HIDDEN )
;
|
SOURCE ASM FILES/FPSHack_12_CutsceneNPCMovementHotfix.asm | Meowmaritus/Wind-Waker-60FPS-Hack | 14 | 97480 | #To be inserted at 8021cc4c
########################################
##FPSHack_12_CutsceneNPCMovementHotfix##
########################################
lis r17, 0x817F
li r18, 2
stw r18, 0x0050 (r17) #Save IsEventCut
lwz r18, 0x0000 (r17) # Load LowHzUpdate
cmpwi r18, 0
bne- 0x000C
li r3, 0
blr
stwu sp, -0x0020 (sp) #Vanilla
|
libsrc/_DEVELOPMENT/font/fzx/fonts/dkud2/Script/_ff_dkud2_Script1.asm | meesokim/z88dk | 0 | 19372 |
SECTION rodata_font_fzx
PUBLIC _ff_dkud2_Script1
_ff_dkud2_Script1:
BINARY "font/fzx/fonts/dkud2/Script/script.fzx"
|
private/test.adb | albinjal/ada_basic | 3 | 4086 | <gh_stars>1-10
with Ada.Text_Io; use Ada.Text_Io;
procedure Test is
begin
Put_Line("Lul");
end Test;
|
arch/x86/boot/loader.asm | liuwei987/re-os | 0 | 165632 | org 0x10000
jmp short start_loader
BS_OEMName db 'MINEboot'
BPB_BytesPerSec dw 512
BPB_SecPerClus db 1
BPB_RsvdSecCnt dw 1
BPB_NumFATs db 2
BPB_RootEntCnt dw 224
BPB_TotSec16 dw 2880
BPB_Media db 0xf0
BPB_FATSz16 dw 9
BPB_SecPerTrk dw 18
BPB_NumHeads dw 2
BPB_hiddSec dd 0
BPB_TotSec32 dd 0
BS_DrvNum db 0
BS_Reserved1 db 0
BS_BootSig db 29h
BS_VolID dd 0
BS_VolLab db 'boot loader',0
BS_FileSysType db 'FAT12 '
RootDirSectors equ 14
SectorNumOfRootDirStart equ 19
SectorNumOfFAT1Start equ 1
SectorBalance equ 17
OffsetOfKernelFile equ 0x100000
BaseOfKernel equ 0x00
OffsetOfKernel equ 0x100000
BaseTmpKernel equ 0x0
OffsetTmpKernel equ 0x7e00
MemStructBufAddr equ 0x7e00
[SECTION gdt]
GDT: dd 0,0
DESC_CODE32: dd 0x0000FFFF,0x00CF9A00
DESC_DATA32: dd 0x0000FFFF,0x00CF9200
GdtLen equ $-GDT
GdtPtr: dw GdtLen - 1
dd GDT
SelectorCode32 equ DESC_CODE32 - GDT
SelectorData32 equ DESC_DATA32 - GDT
[SECTION gdt64]
GDT64: dq 0x0000000000000000
DESC_CODE64: dq 0x0020980000000000
DESC_DATA64: dq 0x0000920000000000
GdtLen64 equ $-GDT64
GdtPtr64: dw GdtLen64 - 1
dd GDT64
SelectorCode64 equ DESC_CODE64 - GDT64
SelectorData64 equ DESC_DATA64 - GDT64
[SECTION .s16]
[BITS 16]
start_loader:
mov ax, cs
mov ds, ax
mov es, ax
mov ax, 0x00
mov ss, ax
mov sp, 0x7c00
; Display start loader message
mov ax, 1301h
mov bx, 000fh
mov dx, 0200h
mov cx, 15
push ax
mov ax, ds
mov es, ax
pop ax
mov bp, StartLoaderMessage
int 10h
; enable address A20
push ax
in al, 92h
or al, 00000010b
out 92h, al
pop ax
cli
lgdt [GdtPtr]
mov eax, cr0
or eax, 1
mov cr0, eax
mov ax, SelectorData32
mov fs, ax
mov eax, cr0
and al, 11111110b
mov cr0, eax
sti
xor ah, ah
xor dl, dl
int 13h
; search kernel.bin
mov word [SectorNo], SectorNumOfRootDirStart
Search_In_Root_Dir_Begin:
cmp word [RootDirSizeForLoop], 0
jz No_Kernel_Bin
dec word [RootDirSizeForLoop]
mov ax, 00h
mov es, ax
mov bx, 8000h
mov ax, [SectorNo]
mov cl, 1
call Read_One_Sector
mov si, KernelFileName
mov di, 8000h
cld
mov dx, 10h
Search_For_Kernel_Bin:
cmp dx, 0
jz Goto_Next_Sector_In_Root_Dir
dec dx
mov cx, 11
Cmp_File_Name:
cmp cx, 0
jz File_Name_Found
dec cx
lodsb
cmp al, byte [es:di]
jz Go_On
jmp Different
Go_On:
inc di
jmp Cmp_File_Name
Different:
and di, 0ffe0h
add di, 20h
mov si, KernelFileName
jmp Search_For_Kernel_Bin
Goto_Next_Sector_In_Root_Dir:
add word [SectorNo], 1
jmp Search_In_Root_Dir_Begin
; display error message
No_Kernel_Bin:
mov ax, 1301h
mov bx, 008Ch
mov dx, 0300h ;row 3
mov cx, 21
push ax
mov ax, ds
mov es, ax
pop ax
mov bp, NoKernelMessage
int 10h
jmp $
File_Name_Found:
mov ax, RootDirSectors
and di, 0ffe0h
add di, 01ah
mov cx, word [es:di]
push cx
add cx, ax
add cx, SectorBalance
mov eax, BaseTmpKernel
mov es, eax
mov bx, OffsetTmpKernel
mov ax, cx
; read one sector data region to [es:bx][00:0x7E00]
Go_On_Loading_File:
push ax
push bx
mov ah, 0eh
mov al, '.'
mov bl, 0fh
int 10h
pop bx
pop ax
mov cl, 1
call Read_One_Sector
pop ax
; move 512 byte form [ds:esi][00:0x7E00] -> [fs:edi][00:0x100000]
push cx
push eax
push fs
push edi
push ds
push esi
mov cx, 200h
mov ax, BaseOfKernel
mov fs, ax
mov edi, dword [OffsetOfKernelFileCount]
mov ax, BaseTmpKernel
mov ds, ax
mov esi, OffsetTmpKernel
Move_kernel:
mov al, byte [ds:esi]
mov byte [fs:edi], al
inc esi
inc edi
loop Move_kernel
mov eax, 0x1000
mov ds, eax
mov dword [OffsetOfKernelFileCount], edi
pop esi
pop ds
pop edi
pop fs
pop eax
pop cx
;
call Get_FAT_Entry
cmp ax, 0fffh
jz File_Loaded
push ax
mov dx, RootDirSectors
add ax, dx
add ax, SectorBalance
jmp Go_On_Loading_File
File_Loaded:
mov ax, 0B800h
mov gs, ax
mov ah, 0fh
mov al, 'G'
mov [gs:((80 * 0 + 39) * 2)], ax
Kill_Motor:
push dx
mov dx, 03f2h
mov al, 0
out dx, al
pop dx
; get memory address size type
mov ax, 1301h
mov bx, 000fh
mov dx, 0400h
mov cx, 24
push ax
mov ax, ds
mov es, ax
pop ax
mov bp, StartGetMemStructMessage
int 10h
mov ebx, 0 ; 0 to start beginning of map
mov ax, 0x00
; store memory size in buffer start from [es:di](00:7E00)
mov es, ax
mov di, MemStructBufAddr
Get_Mem_Struct:
mov eax, 0x0e820 ; get system memory map
mov ecx, 20 ; size of buffer
mov edx, 0x534D4150 ; ('SMAP')
int 15h
jc Get_Mem_Fail
add di, 20
cmp ebx, 0
jne Get_Mem_Struct
jmp Get_Mem_OK
Get_Mem_Fail:
mov ax, 1301h
mov bx, 008ch
mov dx, 0500h
mov cx, 23
push ax
mov ax, ds
mov es, ax
pop ax
mov bp, GetMemStructErrMessage
int 10h
jmp $
Get_Mem_OK:
mov ax, 1301h
mov bx, 000fh
mov dx, 0600h
mov cx, 29
push ax
mov ax, ds
mov es, ax
pop ax
mov bp, GetMemStructOKMessage
int 10h
; get SVGA information
mov ax, 1301h
mov bx, 000fh
mov dx, 0800h
mov cx, 23
push ax
mov ax, ds
mov es, ax
pop ax
mov bp, StartGetSVGAVBEInfoMessage
int 10h
; stroe SVGA infor start from [es:di](00:0x8000)
mov ax, 0x00
mov es, ax
mov di, 0x8000
mov ax, 4f00h
int 10h
cmp ax, 004fh
jz .KO
; Fail
mov ax, 1301h
mov bx, 008ch
mov dx, 0900h
mov cx, 23
push ax
mov ax, ds
mov es, ax
pop ax
mov bp, GetSVGAVBEInfoErrMessage
int 10h
jmp $
.KO:
mov ax, 1301h
mov bx, 000fh
mov dx, 0a00h
mov cx, 29
push ax
mov ax, ds
mov es, ax
pop ax
mov bp, GetSVGAVBEInfoOKMessage
int 10h
; Get SVGA Mode Info
mov ax, 1301h
mov bx, 000fh
mov dx, 0c00h
mov cx, 24
push ax
mov ax, ds
mov es, ax
pop ax
mov bp, StartGetSVGAModeInfoMessage
int 10h
; store SVGA Mode Info start from [es:si](00:0x800e)
mov ax, 00
mov es, ax
mov si, 0x800e ;pointer to list of supported VESA and OEM video modes
mov esi, dword [es:si]
mov edi, 0x8200
SVGA_Mode_Info_Get:
mov cx, word [es:esi]
; display SVGA mode information
push ax
mov ax, 00h
mov al, ch
call DispAL
mov ax, 00h
mov al, cl
call DispAL
pop ax
cmp cx, 0ffffh
jz SVGA_Mode_Info_Finish
mov ax, 4f01h
int 10h
cmp ax, 004fh
jnz SVGA_Mode_Info_FAIL
add esi, 2
add edi, 0x100
jmp SVGA_Mode_Info_Get
SVGA_Mode_Info_FAIL:
mov ax, 1301h
mov bx, 008ch
mov dx, 0d00h
mov cx, 24
push ax
mov ax, ds
mov es, ax
pop ax
mov bp, GetSVGAModeInfoErrMessage
int 10h
Set_SVGA_Mode_VESA_VBE_FAIL:
jmp $
SVGA_Mode_Info_Finish:
mov ax, 1301h
mov bx, 000fh
mov dx, 0e00h
mov cx, 30
push ax
mov ax, ds
mov es, ax
pop ax
mov bp, GetSVGAModeInfoOKMessage
int 10h
; set the SVGA mode(VESA VBE)
mov ax, 4f02h
mov bx, 4180h ; mode (0x180 or 0x143)
int 10h
cmp ax, 004fh
jnz Set_SVGA_Mode_VESA_VBE_FAIL
; init IDT GDT goto protect mode
cli
db 0x66
lgdt [GdtPtr]
mov eax, cr0
or eax, 1
mov cr0, eax
jmp dword SelectorCode32:Go_To_Tmp_Protect
[SECTION .s32]
[BITS 32]
Go_To_Tmp_Protect:
; init tmp page table 0x90000
mov ax, 0x10
mov ds, ax
mov es, ax
mov fs, ax
mov ss, ax
mov esp, 0x7e00
call Support_Long_Mode
test eax, eax
jz No_Support
mov dword [0x90000], 0x91007
mov dword [0x90800], 0x91007
mov dword [0x91000], 0x92007
mov dword [0x92000], 0x000083
mov dword [0x92008], 0x200083
mov dword [0x92010], 0x400083
mov dword [0x92018], 0x600083
mov dword [0x92020], 0x800083
mov dword [0x92028], 0xa00083
; load GDTR
db 0x66
lgdt [GdtPtr64]
mov ax, 0x10
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
mov esp, 0x7e00
; load PAE
mov eax, cr4
bts eax, 5
mov cr4, eax
; load cr3
mov eax, 0x90000
mov cr3, eax
; enable long-mode
mov ecx, 0C0000080h ; IA32_EFER
rdmsr
bts eax, 8
wrmsr
; open PE and Paging
mov eax, cr0
bts eax, 0
bts eax, 31
mov cr0, eax
jmp SelectorCode64:OffsetOfKernelFile
Support_Long_Mode:
mov eax, 0x80000000
cpuid
cmp eax, 0x80000001
setnb al
jb Support_Long_Mode_Done
mov eax, 0x80000001
cpuid
bt edx, 29
setc al
Support_Long_Mode_Done:
movzx eax, al
ret
No_Support:
jmp $
[SECTION .s16lib]
[BITS 16]
Read_One_Sector:
push bp
mov bp, sp
sub esp, 2
mov byte [bp - 2], cl
push bx
mov bl, [BPB_SecPerTrk]
div bl
inc ah
mov cl, ah
mov dh, al
shr al, 1
mov ch, al
and dh, 1
pop bx
mov dl, [BS_DrvNum]
Go_On_Reading:
mov ah, 2
mov al, byte [bp - 2]
int 13h
jc Go_On_Reading
add esp, 2
pop bp
ret
Get_FAT_Entry:
push es
push bx
push ax
mov ax, 00
mov es, ax
pop ax
mov byte [Odd], 0
mov bx, 3
mul bx
mov bx, 2
div bx
cmp dx, 0
jz Even
mov byte [Odd], 1
Even:
xor dx, dx
mov bx, [BPB_BytesPerSec]
div bx
push dx
mov bx, 8000h
add ax, SectorNumOfFAT1Start
mov cl, 2
call Read_One_Sector
pop dx
add bx, dx
mov ax, [es:bx]
cmp byte [Odd], 1
jnz Even_2
shr ax, 4
Even_2:
and ax, 0FFFh
pop bx
pop es
ret
DispAL:
push ecx
push edx
push edi
mov edi, [DisplayPosition]
mov ah, 0fh
mov dl, al
shr al, 4
mov ecx, 2
.begin:
and al, 0fh
cmp al, 9
ja .1
add al, '0'
jmp .2
.1:
sub al, 0ah
add al, 'A'
.2:
mov [gs:edi], ax
add edi, 2
mov al, dl
loop .begin
mov [DisplayPosition], edi
pop edi
pop edx
pop ecx
ret
IDT:
times 0x50 dq 0
IDT_END:
IDT_POINTER:
dw IDT_END - IDT - 1
dd IDT
DisplayPosition dd 0
StartLoaderMessage: db "Start Loader..."
RootDirSizeForLoop: dw RootDirSectors
SectorNo: dw 0
Odd: db 0
OffsetOfKernelFileCount: dd OffsetOfKernelFile
NoKernelMessage: db "ERROR:No KERNEL Found"
KernelFileName: db "KERNEL BIN",0
StartGetMemStructMessage: db "Start Get Memory Struct."
GetMemStructErrMessage: db "Get Memory Struct ERROR"
GetMemStructOKMessage: db "Get Memory Struct SUCCESSFUL!"
StartGetSVGAVBEInfoMessage: db "Start Get SVGA VBE Info"
GetSVGAVBEInfoErrMessage: db "Get SVGA VBE Info ERROR"
GetSVGAVBEInfoOKMessage: db "Get SVGA VBE Info SUCCESSFUL!"
StartGetSVGAModeInfoMessage: db "Start Get SVGA Mode Info"
GetSVGAModeInfoErrMessage: db "Get SVGA Mode Info ERROR"
GetSVGAModeInfoOKMessage: db "Get SVGA Mode Info SUCCESSFUL!"
|
sample_input/sample_edit.ada | hajin-kim/PLS_TinyAda_Compiler | 0 | 11531 | procedure TEST is
COLUMN_MAX : constant := 10;
ROW_MAX : constant := COLUMN_MAX;
type COLUMN_INDEX is range 1..COLUMN_MAX;
type ROW_INDEX is range 1..ROW_MAX;
type MATRIX is array(COLUMN_INDEX, ROW_INDEX) of INTEGER;
A : MATRIX;
I : INTEGER;
procedure INIT_MATRIX(X : in INTEGER; Y : out MATRIX) is
I, J : INTEGER;
begin
I := 1;
while I <= COLUMN_MAX loop
J := 1;
while J <= ROW_MAX loop
Y(I, J) := X;
J := J + 1;
end loop;
I := I + 1;
end loop;
end INIT_MATRIX;
begin
I := 11;
if I = 1 then
print(1);
elsif true then
print("haha hoho");
elsif false then
print(I > 10);
else
print(4+5);
end if;
INIT_MATRIX(I, A);
print(I*3 / 4);
end TEST;
|
Scratch/print_string.asm | SwordYork/slef | 8 | 162632 | <filename>Scratch/print_string.asm
print_string:
pusha
no_empty:
mov al,[bx]
add bx,1
mov ah, 0x0e
int 0x10
cmp al,0
jne no_empty
popa
ret
|
alloy4fun_models/trashltl/models/11/MifgTPgwE4b4Wmb4i.als | Kaixi26/org.alloytools.alloy | 0 | 2047 | <reponame>Kaixi26/org.alloytools.alloy
open main
pred idMifgTPgwE4b4Wmb4i_prop12 {
eventually all f : File | f not in Trash implies f in Trash'
}
pred __repair { idMifgTPgwE4b4Wmb4i_prop12 }
check __repair { idMifgTPgwE4b4Wmb4i_prop12 <=> prop12o } |
src/color_16/lv-color_types.ads | Fabien-Chouteau/ada-lvlg | 3 | 10344 | with Interfaces; use Interfaces;
with Interfaces.C.Extensions;
package Lv.Color_Types is
type Color_T_Comp is record
Blue : Extensions.Unsigned_5;
Green : Extensions.Unsigned_6;
Red : Extensions.Unsigned_5;
end record
with Pack, Object_Size => 16;
pragma Convention (C_Pass_By_Copy, Color_T_Comp);
subtype Color_Int_T is Uint16_T;
type Color_T (Discr : unsigned := 0) is record
case Discr is
when 0 =>
Comp : aliased Color_T_Comp;
when others =>
Full : aliased Color_Int_T;
end case;
end record
with Pack, Object_Size => 16;
pragma Convention (C_Pass_By_Copy, Color_T);
pragma Unchecked_Union (Color_T);
function Color_Make
(R8, G8, B8 : Uint8_T) return Color_T is
(Discr => 0,
Comp => (Extensions.Unsigned_5 (Shift_Right (B8, 3)),
Extensions.Unsigned_6 (Shift_Right (G8, 2)),
Extensions.Unsigned_5 (Shift_Right (R8, 3))))
with Inline_Always;
end Lv.Color_Types;
|
target/cos_117/disasm/iop_overlay1/UCSHL.asm | jrrk2/cray-sim | 49 | 91225 | 0x0000 (0x000000) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0001 (0x000002) 0x2919- f:00024 d: 281 | OR[281] = A
0x0002 (0x000004) 0x1018- f:00010 d: 24 | A = 24 (0x0018)
0x0003 (0x000006) 0x2921- f:00024 d: 289 | OR[289] = A
0x0004 (0x000008) 0x1034- f:00010 d: 52 | A = 52 (0x0034)
0x0005 (0x00000A) 0x2922- f:00024 d: 290 | OR[290] = A
0x0006 (0x00000C) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0007 (0x00000E) 0x2923- f:00024 d: 291 | OR[291] = A
0x0008 (0x000010) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0009 (0x000012) 0x2924- f:00024 d: 292 | OR[292] = A
0x000A (0x000014) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x000B (0x000016) 0x2925- f:00024 d: 293 | OR[293] = A
0x000C (0x000018) 0x111A- f:00010 d: 282 | A = 282 (0x011A)
0x000D (0x00001A) 0x2926- f:00024 d: 294 | OR[294] = A
0x000E (0x00001C) 0x1121- f:00010 d: 289 | A = 289 (0x0121)
0x000F (0x00001E) 0x5800- f:00054 d: 0 | B = A
0x0010 (0x000020) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0011 (0x000022) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0012 (0x000024) 0x8602- f:00103 d: 2 | P = P + 2 (0x0014), A # 0
0x0013 (0x000026) 0x700B- f:00070 d: 11 | P = P + 11 (0x001E)
0x0014 (0x000028) 0x1007- f:00010 d: 7 | A = 7 (0x0007)
0x0015 (0x00002A) 0x2921- f:00024 d: 289 | OR[289] = A
0x0016 (0x00002C) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x0017 (0x00002E) 0x2922- f:00024 d: 290 | OR[290] = A
0x0018 (0x000030) 0x1121- f:00010 d: 289 | A = 289 (0x0121)
0x0019 (0x000032) 0x5800- f:00054 d: 0 | B = A
0x001A (0x000034) 0x1800-0x1318 f:00014 d: 0 | A = 4888 (0x1318)
0x001C (0x000038) 0x7C09- f:00076 d: 9 | R = OR[9]
0x001D (0x00003A) 0x721B- f:00071 d: 27 | P = P - 27 (0x0002)
0x001E (0x00003C) 0x211A- f:00020 d: 282 | A = OR[282]
0x001F (0x00003E) 0x290E- f:00024 d: 270 | OR[270] = A
0x0020 (0x000040) 0x1034- f:00010 d: 52 | A = 52 (0x0034)
0x0021 (0x000042) 0x290D- f:00024 d: 269 | OR[269] = A
0x0022 (0x000044) 0x210D- f:00020 d: 269 | A = OR[269]
0x0023 (0x000046) 0x8406- f:00102 d: 6 | P = P + 6 (0x0029), A = 0
0x0024 (0x000048) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0025 (0x00004A) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x0026 (0x00004C) 0x2F0D- f:00027 d: 269 | OR[269] = OR[269] - 1
0x0027 (0x00004E) 0x2D0E- f:00026 d: 270 | OR[270] = OR[270] + 1
0x0028 (0x000050) 0x7206- f:00071 d: 6 | P = P - 6 (0x0022)
0x0029 (0x000052) 0x2050- f:00020 d: 80 | A = OR[80]
0x002A (0x000054) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x002B (0x000056) 0x2908- f:00024 d: 264 | OR[264] = A
0x002C (0x000058) 0x3D08- f:00036 d: 264 | (OR[264]) = (OR[264]) + 1
0x002D (0x00005A) 0x2050- f:00020 d: 80 | A = OR[80]
0x002E (0x00005C) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x002F (0x00005E) 0x2908- f:00024 d: 264 | OR[264] = A
0x0030 (0x000060) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0031 (0x000062) 0x2920- f:00024 d: 288 | OR[288] = A
0x0032 (0x000064) 0x2050- f:00020 d: 80 | A = OR[80]
0x0033 (0x000066) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x0034 (0x000068) 0x2908- f:00024 d: 264 | OR[264] = A
0x0035 (0x00006A) 0x211A- f:00020 d: 282 | A = OR[282]
0x0036 (0x00006C) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0037 (0x00006E) 0x2120- f:00020 d: 288 | A = OR[288]
0x0038 (0x000070) 0x8402- f:00102 d: 2 | P = P + 2 (0x003A), A = 0
0x0039 (0x000072) 0x7007- f:00070 d: 7 | P = P + 7 (0x0040)
0x003A (0x000074) 0x2050- f:00020 d: 80 | A = OR[80]
0x003B (0x000076) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x003C (0x000078) 0x2908- f:00024 d: 264 | OR[264] = A
0x003D (0x00007A) 0x211A- f:00020 d: 282 | A = OR[282]
0x003E (0x00007C) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x003F (0x00007E) 0x700B- f:00070 d: 11 | P = P + 11 (0x004A)
0x0040 (0x000080) 0x211A- f:00020 d: 282 | A = OR[282]
0x0041 (0x000082) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x0042 (0x000084) 0x2908- f:00024 d: 264 | OR[264] = A
0x0043 (0x000086) 0x2120- f:00020 d: 288 | A = OR[288]
0x0044 (0x000088) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0045 (0x00008A) 0x2120- f:00020 d: 288 | A = OR[288]
0x0046 (0x00008C) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x0047 (0x00008E) 0x2908- f:00024 d: 264 | OR[264] = A
0x0048 (0x000090) 0x211A- f:00020 d: 282 | A = OR[282]
0x0049 (0x000092) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x004A (0x000094) 0x2118- f:00020 d: 280 | A = OR[280]
0x004B (0x000096) 0x140A- f:00012 d: 10 | A = A + 10 (0x000A)
0x004C (0x000098) 0x2908- f:00024 d: 264 | OR[264] = A
0x004D (0x00009A) 0x3108- f:00030 d: 264 | A = (OR[264])
0x004E (0x00009C) 0x123F- f:00011 d: 63 | A = A & 63 (0x003F)
0x004F (0x00009E) 0x2913- f:00024 d: 275 | OR[275] = A
0x0050 (0x0000A0) 0x2113- f:00020 d: 275 | A = OR[275]
0x0051 (0x0000A2) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0052 (0x0000A4) 0x2913- f:00024 d: 275 | OR[275] = A
0x0053 (0x0000A6) 0x311A- f:00030 d: 282 | A = (OR[282])
0x0054 (0x0000A8) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x0055 (0x0000AA) 0x2513- f:00022 d: 275 | A = A + OR[275]
0x0056 (0x0000AC) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x0057 (0x0000AE) 0x391A- f:00034 d: 282 | (OR[282]) = A
0x0058 (0x0000B0) 0x211A- f:00020 d: 282 | A = OR[282]
0x0059 (0x0000B2) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x005A (0x0000B4) 0x2908- f:00024 d: 264 | OR[264] = A
0x005B (0x0000B6) 0x3108- f:00030 d: 264 | A = (OR[264])
0x005C (0x0000B8) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x005E (0x0000BC) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x005F (0x0000BE) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0060 (0x0000C0) 0x211A- f:00020 d: 282 | A = OR[282]
0x0061 (0x0000C2) 0x1406- f:00012 d: 6 | A = A + 6 (0x0006)
0x0062 (0x0000C4) 0x291B- f:00024 d: 283 | OR[283] = A
0x0063 (0x0000C6) 0x2118- f:00020 d: 280 | A = OR[280]
0x0064 (0x0000C8) 0x391B- f:00034 d: 283 | (OR[283]) = A
0x0065 (0x0000CA) 0x311B- f:00030 d: 283 | A = (OR[283])
0x0066 (0x0000CC) 0x2918- f:00024 d: 280 | OR[280] = A
0x0067 (0x0000CE) 0x2118- f:00020 d: 280 | A = OR[280]
0x0068 (0x0000D0) 0x8602- f:00103 d: 2 | P = P + 2 (0x006A), A # 0
0x0069 (0x0000D2) 0x700F- f:00070 d: 15 | P = P + 15 (0x0078)
0x006A (0x0000D4) 0x3118- f:00030 d: 280 | A = (OR[280])
0x006B (0x0000D6) 0x2913- f:00024 d: 275 | OR[275] = A
0x006C (0x0000D8) 0x2113- f:00020 d: 275 | A = OR[275]
0x006D (0x0000DA) 0x391B- f:00034 d: 283 | (OR[283]) = A
0x006E (0x0000DC) 0x2113- f:00020 d: 275 | A = OR[275]
0x006F (0x0000DE) 0x8606- f:00103 d: 6 | P = P + 6 (0x0075), A # 0
0x0070 (0x0000E0) 0x211B- f:00020 d: 283 | A = OR[283]
0x0071 (0x0000E2) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0072 (0x0000E4) 0x2908- f:00024 d: 264 | OR[264] = A
0x0073 (0x0000E6) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0074 (0x0000E8) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0075 (0x0000EA) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0076 (0x0000EC) 0x3918- f:00034 d: 280 | (OR[280]) = A
0x0077 (0x0000EE) 0x701E- f:00070 d: 30 | P = P + 30 (0x0095)
0x0078 (0x0000F0) 0x211A- f:00020 d: 282 | A = OR[282]
0x0079 (0x0000F2) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x007A (0x0000F4) 0x2908- f:00024 d: 264 | OR[264] = A
0x007B (0x0000F6) 0x3108- f:00030 d: 264 | A = (OR[264])
0x007C (0x0000F8) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x007D (0x0000FA) 0x291C- f:00024 d: 284 | OR[284] = A
0x007E (0x0000FC) 0x211C- f:00020 d: 284 | A = OR[284]
0x007F (0x0000FE) 0x1604- f:00013 d: 4 | A = A - 4 (0x0004)
0x0080 (0x000100) 0x8402- f:00102 d: 2 | P = P + 2 (0x0082), A = 0
0x0081 (0x000102) 0x7003- f:00070 d: 3 | P = P + 3 (0x0084)
0x0082 (0x000104) 0x709D- f:00070 d: 157 | P = P + 157 (0x011F)
0x0083 (0x000106) 0x7012- f:00070 d: 18 | P = P + 18 (0x0095)
0x0084 (0x000108) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x0085 (0x00010A) 0x2921- f:00024 d: 289 | OR[289] = A
0x0086 (0x00010C) 0x211A- f:00020 d: 282 | A = OR[282]
0x0087 (0x00010E) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x0088 (0x000110) 0x2922- f:00024 d: 290 | OR[290] = A
0x0089 (0x000112) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x008A (0x000114) 0x2923- f:00024 d: 291 | OR[291] = A
0x008B (0x000116) 0x1121- f:00010 d: 289 | A = 289 (0x0121)
0x008C (0x000118) 0x5800- f:00054 d: 0 | B = A
0x008D (0x00011A) 0x1800-0x1318 f:00014 d: 0 | A = 4888 (0x1318)
0x008F (0x00011E) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0090 (0x000120) 0x2006- f:00020 d: 6 | A = OR[6]
0x0091 (0x000122) 0x140B- f:00012 d: 11 | A = A + 11 (0x000B)
0x0092 (0x000124) 0x2908- f:00024 d: 264 | OR[264] = A
0x0093 (0x000126) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0094 (0x000128) 0x722F- f:00071 d: 47 | P = P - 47 (0x0065)
0x0095 (0x00012A) 0x211A- f:00020 d: 282 | A = OR[282]
0x0096 (0x00012C) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0097 (0x00012E) 0x2908- f:00024 d: 264 | OR[264] = A
0x0098 (0x000130) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0099 (0x000132) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x009A (0x000134) 0x291C- f:00024 d: 284 | OR[284] = A
0x009B (0x000136) 0x2118- f:00020 d: 280 | A = OR[280]
0x009C (0x000138) 0x140B- f:00012 d: 11 | A = A + 11 (0x000B)
0x009D (0x00013A) 0x2908- f:00024 d: 264 | OR[264] = A
0x009E (0x00013C) 0x3108- f:00030 d: 264 | A = (OR[264])
0x009F (0x00013E) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x00A0 (0x000140) 0x291D- f:00024 d: 285 | OR[285] = A
0x00A1 (0x000142) 0x311A- f:00030 d: 282 | A = (OR[282])
0x00A2 (0x000144) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x00A3 (0x000146) 0x2913- f:00024 d: 275 | OR[275] = A
0x00A4 (0x000148) 0x0400- f:00002 d: 0 | I = 0
0x00A5 (0x00014A) 0x0000- f:00000 d: 0 | PASS
0x00A6 (0x00014C) 0x1030- f:00010 d: 48 | A = 48 (0x0030)
0x00A7 (0x00014E) 0x29C3- f:00024 d: 451 | OR[451] = A
0x00A8 (0x000150) 0x2113- f:00020 d: 275 | A = OR[275]
0x00A9 (0x000152) 0x29C4- f:00024 d: 452 | OR[452] = A
0x00AA (0x000154) 0x211A- f:00020 d: 282 | A = OR[282]
0x00AB (0x000156) 0x29C5- f:00024 d: 453 | OR[453] = A
0x00AC (0x000158) 0x211C- f:00020 d: 284 | A = OR[284]
0x00AD (0x00015A) 0x29C6- f:00024 d: 454 | OR[454] = A
0x00AE (0x00015C) 0x2118- f:00020 d: 280 | A = OR[280]
0x00AF (0x00015E) 0x29C7- f:00024 d: 455 | OR[455] = A
0x00B0 (0x000160) 0x211D- f:00020 d: 285 | A = OR[285]
0x00B1 (0x000162) 0x29C8- f:00024 d: 456 | OR[456] = A
0x00B2 (0x000164) 0x7DC2- f:00076 d: 450 | R = OR[450]
0x00B3 (0x000166) 0x211C- f:00020 d: 284 | A = OR[284]
0x00B4 (0x000168) 0x1604- f:00013 d: 4 | A = A - 4 (0x0004)
0x00B5 (0x00016A) 0x8402- f:00102 d: 2 | P = P + 2 (0x00B7), A = 0
0x00B6 (0x00016C) 0x7009- f:00070 d: 9 | P = P + 9 (0x00BF)
0x00B7 (0x00016E) 0x211D- f:00020 d: 285 | A = OR[285]
0x00B8 (0x000170) 0x1603- f:00013 d: 3 | A = A - 3 (0x0003)
0x00B9 (0x000172) 0x8602- f:00103 d: 2 | P = P + 2 (0x00BB), A # 0
0x00BA (0x000174) 0x7004- f:00070 d: 4 | P = P + 4 (0x00BE)
0x00BB (0x000176) 0x1003- f:00010 d: 3 | A = 3 (0x0003)
0x00BC (0x000178) 0x2919- f:00024 d: 281 | OR[281] = A
0x00BD (0x00017A) 0x70AC- f:00070 d: 172 | P = P + 172 (0x0169)
0x00BE (0x00017C) 0x7008- f:00070 d: 8 | P = P + 8 (0x00C6)
0x00BF (0x00017E) 0x211D- f:00020 d: 285 | A = OR[285]
0x00C0 (0x000180) 0x1603- f:00013 d: 3 | A = A - 3 (0x0003)
0x00C1 (0x000182) 0x8402- f:00102 d: 2 | P = P + 2 (0x00C3), A = 0
0x00C2 (0x000184) 0x7004- f:00070 d: 4 | P = P + 4 (0x00C6)
0x00C3 (0x000186) 0x1003- f:00010 d: 3 | A = 3 (0x0003)
0x00C4 (0x000188) 0x2919- f:00024 d: 281 | OR[281] = A
0x00C5 (0x00018A) 0x70A4- f:00070 d: 164 | P = P + 164 (0x0169)
0x00C6 (0x00018C) 0x211D- f:00020 d: 285 | A = OR[285]
0x00C7 (0x00018E) 0x1603- f:00013 d: 3 | A = A - 3 (0x0003)
0x00C8 (0x000190) 0x8402- f:00102 d: 2 | P = P + 2 (0x00CA), A = 0
0x00C9 (0x000192) 0x7005- f:00070 d: 5 | P = P + 5 (0x00CE)
0x00CA (0x000194) 0x1800-0x019D f:00014 d: 0 | A = 413 (0x019D)
0x00CC (0x000198) 0x291E- f:00024 d: 286 | OR[286] = A
0x00CD (0x00019A) 0x7044- f:00070 d: 68 | P = P + 68 (0x0111)
0x00CE (0x00019C) 0x211D- f:00020 d: 285 | A = OR[285]
0x00CF (0x00019E) 0x1604- f:00013 d: 4 | A = A - 4 (0x0004)
0x00D0 (0x0001A0) 0x8402- f:00102 d: 2 | P = P + 2 (0x00D2), A = 0
0x00D1 (0x0001A2) 0x7005- f:00070 d: 5 | P = P + 5 (0x00D6)
0x00D2 (0x0001A4) 0x1800-0x019E f:00014 d: 0 | A = 414 (0x019E)
0x00D4 (0x0001A8) 0x291E- f:00024 d: 286 | OR[286] = A
0x00D5 (0x0001AA) 0x703C- f:00070 d: 60 | P = P + 60 (0x0111)
0x00D6 (0x0001AC) 0x211D- f:00020 d: 285 | A = OR[285]
0x00D7 (0x0001AE) 0x1605- f:00013 d: 5 | A = A - 5 (0x0005)
0x00D8 (0x0001B0) 0x8402- f:00102 d: 2 | P = P + 2 (0x00DA), A = 0
0x00D9 (0x0001B2) 0x7005- f:00070 d: 5 | P = P + 5 (0x00DE)
0x00DA (0x0001B4) 0x1800-0x019F f:00014 d: 0 | A = 415 (0x019F)
0x00DC (0x0001B8) 0x291E- f:00024 d: 286 | OR[286] = A
0x00DD (0x0001BA) 0x7034- f:00070 d: 52 | P = P + 52 (0x0111)
0x00DE (0x0001BC) 0x211D- f:00020 d: 285 | A = OR[285]
0x00DF (0x0001BE) 0x1606- f:00013 d: 6 | A = A - 6 (0x0006)
0x00E0 (0x0001C0) 0x8402- f:00102 d: 2 | P = P + 2 (0x00E2), A = 0
0x00E1 (0x0001C2) 0x7005- f:00070 d: 5 | P = P + 5 (0x00E6)
0x00E2 (0x0001C4) 0x1800-0x019F f:00014 d: 0 | A = 415 (0x019F)
0x00E4 (0x0001C8) 0x291E- f:00024 d: 286 | OR[286] = A
0x00E5 (0x0001CA) 0x702C- f:00070 d: 44 | P = P + 44 (0x0111)
0x00E6 (0x0001CC) 0x211D- f:00020 d: 285 | A = OR[285]
0x00E7 (0x0001CE) 0x1607- f:00013 d: 7 | A = A - 7 (0x0007)
0x00E8 (0x0001D0) 0x8402- f:00102 d: 2 | P = P + 2 (0x00EA), A = 0
0x00E9 (0x0001D2) 0x7005- f:00070 d: 5 | P = P + 5 (0x00EE)
0x00EA (0x0001D4) 0x1800-0x019F f:00014 d: 0 | A = 415 (0x019F)
0x00EC (0x0001D8) 0x291E- f:00024 d: 286 | OR[286] = A
0x00ED (0x0001DA) 0x7024- f:00070 d: 36 | P = P + 36 (0x0111)
0x00EE (0x0001DC) 0x211D- f:00020 d: 285 | A = OR[285]
0x00EF (0x0001DE) 0x1608- f:00013 d: 8 | A = A - 8 (0x0008)
0x00F0 (0x0001E0) 0x8402- f:00102 d: 2 | P = P + 2 (0x00F2), A = 0
0x00F1 (0x0001E2) 0x7005- f:00070 d: 5 | P = P + 5 (0x00F6)
0x00F2 (0x0001E4) 0x1800-0x01A0 f:00014 d: 0 | A = 416 (0x01A0)
0x00F4 (0x0001E8) 0x291E- f:00024 d: 286 | OR[286] = A
0x00F5 (0x0001EA) 0x701C- f:00070 d: 28 | P = P + 28 (0x0111)
0x00F6 (0x0001EC) 0x211D- f:00020 d: 285 | A = OR[285]
0x00F7 (0x0001EE) 0x1609- f:00013 d: 9 | A = A - 9 (0x0009)
0x00F8 (0x0001F0) 0x8402- f:00102 d: 2 | P = P + 2 (0x00FA), A = 0
0x00F9 (0x0001F2) 0x7005- f:00070 d: 5 | P = P + 5 (0x00FE)
0x00FA (0x0001F4) 0x1800-0x01A0 f:00014 d: 0 | A = 416 (0x01A0)
0x00FC (0x0001F8) 0x291E- f:00024 d: 286 | OR[286] = A
0x00FD (0x0001FA) 0x7014- f:00070 d: 20 | P = P + 20 (0x0111)
0x00FE (0x0001FC) 0x211D- f:00020 d: 285 | A = OR[285]
0x00FF (0x0001FE) 0x160A- f:00013 d: 10 | A = A - 10 (0x000A)
0x0100 (0x000200) 0x8402- f:00102 d: 2 | P = P + 2 (0x0102), A = 0
0x0101 (0x000202) 0x7005- f:00070 d: 5 | P = P + 5 (0x0106)
0x0102 (0x000204) 0x1800-0x01A0 f:00014 d: 0 | A = 416 (0x01A0)
0x0104 (0x000208) 0x291E- f:00024 d: 286 | OR[286] = A
0x0105 (0x00020A) 0x700C- f:00070 d: 12 | P = P + 12 (0x0111)
0x0106 (0x00020C) 0x211D- f:00020 d: 285 | A = OR[285]
0x0107 (0x00020E) 0x1620- f:00013 d: 32 | A = A - 32 (0x0020)
0x0108 (0x000210) 0x8202- f:00101 d: 2 | P = P + 2 (0x010A), C = 1
0x0109 (0x000212) 0x7005- f:00070 d: 5 | P = P + 5 (0x010E)
0x010A (0x000214) 0x1800-0x01A1 f:00014 d: 0 | A = 417 (0x01A1)
0x010C (0x000218) 0x291E- f:00024 d: 286 | OR[286] = A
0x010D (0x00021A) 0x7004- f:00070 d: 4 | P = P + 4 (0x0111)
0x010E (0x00021C) 0x1005- f:00010 d: 5 | A = 5 (0x0005)
0x010F (0x00021E) 0x2919- f:00024 d: 281 | OR[281] = A
0x0110 (0x000220) 0x7059- f:00070 d: 89 | P = P + 89 (0x0169)
0x0111 (0x000222) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x0112 (0x000224) 0x2921- f:00024 d: 289 | OR[289] = A
0x0113 (0x000226) 0x211E- f:00020 d: 286 | A = OR[286]
0x0114 (0x000228) 0x2922- f:00024 d: 290 | OR[290] = A
0x0115 (0x00022A) 0x211A- f:00020 d: 282 | A = OR[282]
0x0116 (0x00022C) 0x2923- f:00024 d: 291 | OR[291] = A
0x0117 (0x00022E) 0x2118- f:00020 d: 280 | A = OR[280]
0x0118 (0x000230) 0x2924- f:00024 d: 292 | OR[292] = A
0x0119 (0x000232) 0x1121- f:00010 d: 289 | A = 289 (0x0121)
0x011A (0x000234) 0x5800- f:00054 d: 0 | B = A
0x011B (0x000236) 0x1800-0x1318 f:00014 d: 0 | A = 4888 (0x1318)
0x011D (0x00023A) 0x7C09- f:00076 d: 9 | R = OR[9]
0x011E (0x00023C) 0x72B9- f:00071 d: 185 | P = P - 185 (0x0065)
0x011F (0x00023E) 0x2050- f:00020 d: 80 | A = OR[80]
0x0120 (0x000240) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0121 (0x000242) 0x2908- f:00024 d: 264 | OR[264] = A
0x0122 (0x000244) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0123 (0x000246) 0x2913- f:00024 d: 275 | OR[275] = A
0x0124 (0x000248) 0x2113- f:00020 d: 275 | A = OR[275]
0x0125 (0x00024A) 0xB434- f:00132 d: 52 | R = OR[52], A = 0
0x0126 (0x00024C) 0x0000- f:00000 d: 0 | PASS
0x0127 (0x00024E) 0x2050- f:00020 d: 80 | A = OR[80]
0x0128 (0x000250) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0129 (0x000252) 0x2908- f:00024 d: 264 | OR[264] = A
0x012A (0x000254) 0x3F08- f:00037 d: 264 | (OR[264]) = (OR[264]) - 1
0x012B (0x000256) 0x211A- f:00020 d: 282 | A = OR[282]
0x012C (0x000258) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x012D (0x00025A) 0x2908- f:00024 d: 264 | OR[264] = A
0x012E (0x00025C) 0x3108- f:00030 d: 264 | A = (OR[264])
0x012F (0x00025E) 0x291F- f:00024 d: 287 | OR[287] = A
0x0130 (0x000260) 0x211A- f:00020 d: 282 | A = OR[282]
0x0131 (0x000262) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x0132 (0x000264) 0x2908- f:00024 d: 264 | OR[264] = A
0x0133 (0x000266) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0134 (0x000268) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0135 (0x00026A) 0x211A- f:00020 d: 282 | A = OR[282]
0x0136 (0x00026C) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x0137 (0x00026E) 0x2908- f:00024 d: 264 | OR[264] = A
0x0138 (0x000270) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0139 (0x000272) 0x2920- f:00024 d: 288 | OR[288] = A
0x013A (0x000274) 0x211A- f:00020 d: 282 | A = OR[282]
0x013B (0x000276) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x013C (0x000278) 0x2908- f:00024 d: 264 | OR[264] = A
0x013D (0x00027A) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x013E (0x00027C) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x013F (0x00027E) 0x211F- f:00020 d: 287 | A = OR[287]
0x0140 (0x000280) 0x8402- f:00102 d: 2 | P = P + 2 (0x0142), A = 0
0x0141 (0x000282) 0x7007- f:00070 d: 7 | P = P + 7 (0x0148)
0x0142 (0x000284) 0x2050- f:00020 d: 80 | A = OR[80]
0x0143 (0x000286) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x0144 (0x000288) 0x2908- f:00024 d: 264 | OR[264] = A
0x0145 (0x00028A) 0x2120- f:00020 d: 288 | A = OR[288]
0x0146 (0x00028C) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0147 (0x00028E) 0x7006- f:00070 d: 6 | P = P + 6 (0x014D)
0x0148 (0x000290) 0x211F- f:00020 d: 287 | A = OR[287]
0x0149 (0x000292) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x014A (0x000294) 0x2908- f:00024 d: 264 | OR[264] = A
0x014B (0x000296) 0x2120- f:00020 d: 288 | A = OR[288]
0x014C (0x000298) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x014D (0x00029A) 0x2120- f:00020 d: 288 | A = OR[288]
0x014E (0x00029C) 0x8402- f:00102 d: 2 | P = P + 2 (0x0150), A = 0
0x014F (0x00029E) 0x7007- f:00070 d: 7 | P = P + 7 (0x0156)
0x0150 (0x0002A0) 0x2050- f:00020 d: 80 | A = OR[80]
0x0151 (0x0002A2) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x0152 (0x0002A4) 0x2908- f:00024 d: 264 | OR[264] = A
0x0153 (0x0002A6) 0x211F- f:00020 d: 287 | A = OR[287]
0x0154 (0x0002A8) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0155 (0x0002AA) 0x7006- f:00070 d: 6 | P = P + 6 (0x015B)
0x0156 (0x0002AC) 0x2120- f:00020 d: 288 | A = OR[288]
0x0157 (0x0002AE) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x0158 (0x0002B0) 0x2908- f:00024 d: 264 | OR[264] = A
0x0159 (0x0002B2) 0x211F- f:00020 d: 287 | A = OR[287]
0x015A (0x0002B4) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x015B (0x0002B6) 0x1019- f:00010 d: 25 | A = 25 (0x0019)
0x015C (0x0002B8) 0x2921- f:00024 d: 289 | OR[289] = A
0x015D (0x0002BA) 0x211A- f:00020 d: 282 | A = OR[282]
0x015E (0x0002BC) 0x2922- f:00024 d: 290 | OR[290] = A
0x015F (0x0002BE) 0x1121- f:00010 d: 289 | A = 289 (0x0121)
0x0160 (0x0002C0) 0x5800- f:00054 d: 0 | B = A
0x0161 (0x0002C2) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0162 (0x0002C4) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0163 (0x0002C6) 0x1003- f:00010 d: 3 | A = 3 (0x0003)
0x0164 (0x0002C8) 0x2921- f:00024 d: 289 | OR[289] = A
0x0165 (0x0002CA) 0x1121- f:00010 d: 289 | A = 289 (0x0121)
0x0166 (0x0002CC) 0x5800- f:00054 d: 0 | B = A
0x0167 (0x0002CE) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0168 (0x0002D0) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0169 (0x0002D2) 0x311A- f:00030 d: 282 | A = (OR[282])
0x016A (0x0002D4) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x016B (0x0002D6) 0x2913- f:00024 d: 275 | OR[275] = A
0x016C (0x0002D8) 0x211A- f:00020 d: 282 | A = OR[282]
0x016D (0x0002DA) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x016E (0x0002DC) 0x2908- f:00024 d: 264 | OR[264] = A
0x016F (0x0002DE) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0170 (0x0002E0) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0171 (0x0002E2) 0x2914- f:00024 d: 276 | OR[276] = A
0x0172 (0x0002E4) 0x0400- f:00002 d: 0 | I = 0
0x0173 (0x0002E6) 0x0000- f:00000 d: 0 | PASS
0x0174 (0x0002E8) 0x1031- f:00010 d: 49 | A = 49 (0x0031)
0x0175 (0x0002EA) 0x29C3- f:00024 d: 451 | OR[451] = A
0x0176 (0x0002EC) 0x2113- f:00020 d: 275 | A = OR[275]
0x0177 (0x0002EE) 0x29C4- f:00024 d: 452 | OR[452] = A
0x0178 (0x0002F0) 0x211A- f:00020 d: 282 | A = OR[282]
0x0179 (0x0002F2) 0x29C5- f:00024 d: 453 | OR[453] = A
0x017A (0x0002F4) 0x2114- f:00020 d: 276 | A = OR[276]
0x017B (0x0002F6) 0x29C6- f:00024 d: 454 | OR[454] = A
0x017C (0x0002F8) 0x2118- f:00020 d: 280 | A = OR[280]
0x017D (0x0002FA) 0x29C7- f:00024 d: 455 | OR[455] = A
0x017E (0x0002FC) 0x2119- f:00020 d: 281 | A = OR[281]
0x017F (0x0002FE) 0x29C8- f:00024 d: 456 | OR[456] = A
0x0180 (0x000300) 0x7DC2- f:00076 d: 450 | R = OR[450]
0x0181 (0x000302) 0x2118- f:00020 d: 280 | A = OR[280]
0x0182 (0x000304) 0x1408- f:00012 d: 8 | A = A + 8 (0x0008)
0x0183 (0x000306) 0x2908- f:00024 d: 264 | OR[264] = A
0x0184 (0x000308) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0185 (0x00030A) 0x2913- f:00024 d: 275 | OR[275] = A
0x0186 (0x00030C) 0x2118- f:00020 d: 280 | A = OR[280]
0x0187 (0x00030E) 0x1409- f:00012 d: 9 | A = A + 9 (0x0009)
0x0188 (0x000310) 0x2908- f:00024 d: 264 | OR[264] = A
0x0189 (0x000312) 0x3108- f:00030 d: 264 | A = (OR[264])
0x018A (0x000314) 0x2914- f:00024 d: 276 | OR[276] = A
0x018B (0x000316) 0x2118- f:00020 d: 280 | A = OR[280]
0x018C (0x000318) 0x1408- f:00012 d: 8 | A = A + 8 (0x0008)
0x018D (0x00031A) 0x2908- f:00024 d: 264 | OR[264] = A
0x018E (0x00031C) 0x2114- f:00020 d: 276 | A = OR[276]
0x018F (0x00031E) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0190 (0x000320) 0x2118- f:00020 d: 280 | A = OR[280]
0x0191 (0x000322) 0x1409- f:00012 d: 9 | A = A + 9 (0x0009)
0x0192 (0x000324) 0x2908- f:00024 d: 264 | OR[264] = A
0x0193 (0x000326) 0x2113- f:00020 d: 275 | A = OR[275]
0x0194 (0x000328) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0195 (0x00032A) 0x2119- f:00020 d: 281 | A = OR[281]
0x0196 (0x00032C) 0x127F- f:00011 d: 127 | A = A & 127 (0x007F)
0x0197 (0x00032E) 0x2919- f:00024 d: 281 | OR[281] = A
0x0198 (0x000330) 0x2118- f:00020 d: 280 | A = OR[280]
0x0199 (0x000332) 0x140B- f:00012 d: 11 | A = A + 11 (0x000B)
0x019A (0x000334) 0x2908- f:00024 d: 264 | OR[264] = A
0x019B (0x000336) 0x3108- f:00030 d: 264 | A = (OR[264])
0x019C (0x000338) 0x1A00-0xFF80 f:00015 d: 0 | A = A & 65408 (0xFF80)
0x019E (0x00033C) 0x2519- f:00022 d: 281 | A = A + OR[281]
0x019F (0x00033E) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x01A0 (0x000340) 0x101C- f:00010 d: 28 | A = 28 (0x001C)
0x01A1 (0x000342) 0x2921- f:00024 d: 289 | OR[289] = A
0x01A2 (0x000344) 0x2118- f:00020 d: 280 | A = OR[280]
0x01A3 (0x000346) 0x2922- f:00024 d: 290 | OR[290] = A
0x01A4 (0x000348) 0x1121- f:00010 d: 289 | A = 289 (0x0121)
0x01A5 (0x00034A) 0x5800- f:00054 d: 0 | B = A
0x01A6 (0x00034C) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x01A7 (0x00034E) 0x7C09- f:00076 d: 9 | R = OR[9]
0x01A8 (0x000350) 0x2006- f:00020 d: 6 | A = OR[6]
0x01A9 (0x000352) 0x140B- f:00012 d: 11 | A = A + 11 (0x000B)
0x01AA (0x000354) 0x2908- f:00024 d: 264 | OR[264] = A
0x01AB (0x000356) 0x3108- f:00030 d: 264 | A = (OR[264])
0x01AC (0x000358) 0x7347- f:00071 d: 327 | P = P - 327 (0x0065)
0x01AD (0x00035A) 0x0000- f:00000 d: 0 | PASS
0x01AE (0x00035C) 0x0000- f:00000 d: 0 | PASS
0x01AF (0x00035E) 0x0000- f:00000 d: 0 | PASS
|
data/pokemon/base_stats/hoenn/sharpedo.asm | Dev727/ancientplatinum | 0 | 172152 | db 0 ; 319 DEX NO
db 70, 120, 40, 95, 95, 40
; hp atk def spd sat sdf
db WATER, DARK ; type
db 60 ; catch rate
db 175 ; base exp
db NO_ITEM, NO_ITEM ; items
db GENDER_F50 ; gender ratio
db 100 ; unknown 1
db 20 ; step cycles to hatch
db 5 ; unknown 2
INCBIN "gfx/pokemon/hoenn/sharpedo/front.dimensions"
db 0, 0, 0, 0 ; padding
db GROWTH_SLOW ; growth rate
dn EGG_WATER_2, EGG_WATER_2 ; egg groups
; tm/hm learnset
tmhm
; end
|
oeis/247/A247325.asm | neoneye/loda-programs | 11 | 6070 | <gh_stars>10-100
; A247325: Number of paths from (0,0) to (n,2), with vertices (i,k) satisfying 0 <= k <= 3, consisting of segments given by the vectors (1,1), (1,2), (1,-1).
; Submitted by <NAME>
; 0,1,1,4,5,13,22,45,87,166,329,627,1232,2373,4621,8956,17377,33737,65422,127009,246363,478134,927685,1800119,3492960,6777593,13151433,25518580,49516525,96081013,186435302,361757509,701951407,1362062118,2642933937,5128331659,9950974640,19308800733,37466653301,72700019820,141066586729,273724565329,531133146526,1030606849625,1999781983507,3880362276598,7529426503245,14610043947183,28349222079424,55008622571441,106738327629393,207114267925988,401883005951637,779810836465309,1513139226077494
lpb $0
sub $0,1
sub $3,$4
add $1,$3
sub $3,$2
add $1,$3
add $4,1
mov $5,$4
mov $4,$2
mov $2,$3
add $4,$1
add $5,$4
mov $3,$5
lpe
sub $3,$1
mov $0,$3
|
alloy4fun_models/trainstlt/models/14/95g8pwd9Sjx8jjjfk.als | Kaixi26/org.alloytools.alloy | 0 | 5073 | <reponame>Kaixi26/org.alloytools.alloy
open main
pred id95g8pwd9Sjx8jjjfk_prop15 {
always (some t: Train| (no t.pos implies eventually some t.pos) or t.pos != t.pos')
}
pred __repair { id95g8pwd9Sjx8jjjfk_prop15 }
check __repair { id95g8pwd9Sjx8jjjfk_prop15 <=> prop15o } |
programs/oeis/037/A037577.asm | neoneye/loda | 22 | 179181 | <reponame>neoneye/loda<filename>programs/oeis/037/A037577.asm
; A037577: Base 5 digits are, in order, the first n terms of the periodic sequence with initial period 1,3.
; 1,8,41,208,1041,5208,26041,130208,651041,3255208,16276041,81380208,406901041,2034505208,10172526041,50862630208,254313151041,1271565755208,6357828776041,31789143880208,158945719401041,794728597005208,3973642985026041,19868214925130208,99341074625651041,496705373128255208,2483526865641276041,12417634328206380208,62088171641031901041,310440858205159505208,1552204291025797526041,7761021455128987630208,38805107275644938151041,194025536378224690755208,970127681891123453776041,4850638409455617268880208,24253192047278086344401041,121265960236390431722005208,606329801181952158610026041,3031649005909760793050130208,15158245029548803965250651041,75791225147744019826253255208,378956125738720099131266276041,1894780628693600495656331380208,9473903143468002478281656901041,47369515717340012391408284505208,236847578586700061957041422526041,1184237892933500309785207112630208,5921189464667501548926035563151041,29605947323337507744630177815755208,148029736616687538723150889078776041,740148683083437693615754445393880208
mov $1,5
pow $1,$0
mul $1,5
div $1,3
mov $0,$1
|
programs/oeis/099/A099306.asm | neoneye/loda | 22 | 27544 | <filename>programs/oeis/099/A099306.asm
; A099306: n''', the third arithmetic derivative of n.
; 0,0,0,0,4,0,0,0,32,1,0,0,80,0,5,16,176,0,7,0,48,1,0,0,112,1,12,27,176,0,0,0,368,6,0,32,96,0,7,80,156,0,0,0,240,32,7,0,608,6,16,44,96,0,216,80,272,1,0,0,272,0,9,24,2368,10,0,0,220,8,0,0,284,0,32,32,368,10,0,0,752,540,0,0,448,1,16,176,192,0,48,44,560,1,9,48,1312,0,21,16
mov $2,7
lpb $2
seq $0,3415 ; a(n) = n' = arithmetic derivative of n: a(0) = a(1) = 0, a(prime) = 1, a(mn) = m*a(n) + n*a(m).
div $2,2
lpe
|
programs/oeis/152/A152892.asm | karttu/loda | 1 | 21324 | ; A152892: Periodic sequence [0,3,1,0,1] of period 5.
; 0,3,1,0,1,0,3,1,0,1,0,3,1,0,1,0,3,1,0,1,0,3,1,0,1,0,3,1,0,1,0,3,1,0,1,0,3,1,0,1,0,3,1,0,1,0,3,1,0,1,0,3,1,0,1,0,3,1,0,1,0,3,1,0,1,0,3,1,0,1,0,3,1,0,1,0,3,1,0,1,0,3,1,0,1,0,3,1,0,1,0,3,1,0,1,0,3,1,0,1,0,3,1,0,1
mov $1,$0
pow $0,2
add $1,2
mul $1,$0
mod $1,5
|
libsrc/math/mbf32/c/sccz80/l_f32_mul.asm | rjcorrig/z88dk | 0 | 24382 |
SECTION code_fp_mbf32
PUBLIC l_f32_mul
EXTERN ___mbf32_setup_arith
EXTERN ___mbf32_FPMULT
EXTERN ___mbf32_return
EXTERN msbios
l_f32_mul:
call ___mbf32_setup_arith
ld ix,___mbf32_FPMULT
call msbios
jp ___mbf32_return
|
FormalAnalyzer/models/apps/ThermostatWindowCheck.als | Mohannadcse/IoTCOM_BehavioralRuleExtractor | 0 | 4498 | <gh_stars>0
module app_ThermostatWindowCheck
open IoTBottomUp as base
open cap_runIn
open cap_now
open cap_thermostatMode
open cap_contactSensor
open cap_thermostat
open cap_userInput
one sig app_ThermostatWindowCheck extends IoTApp {
sensors : some cap_contactSensor,
thrMode : some cap_thermostatMode,
thermostats : some cap_thermostatMode,
runIn : one cap_state,
sendPushMessage : one cap_userInput,
turnOffTherm : one cap_userInput,
state : one cap_state,
} {
rules = r
//capabilities = sensors + thermostats + sendPushMessage + turnOffTherm + state
}
abstract sig cap_userInput_attr_sendPushMessage_val extends cap_userInput_attr_value_val {}
one sig cap_userInput_attr_sendPushMessage_val_Yes extends cap_userInput_attr_sendPushMessage_val {}
one sig cap_userInput_attr_sendPushMessage_val_No extends cap_userInput_attr_sendPushMessage_val {}
abstract sig cap_userInput_attr_turnOffTherm_val extends cap_userInput_attr_value_val {}
one sig cap_userInput_attr_turnOffTherm_val_Yes extends cap_userInput_attr_turnOffTherm_val {}
one sig cap_userInput_attr_turnOffTherm_val_No extends cap_userInput_attr_turnOffTherm_val {}
one sig cap_state extends cap_runIn {} {
attributes = cap_state_attr + cap_runIn_attr
}
abstract sig cap_state_attr extends Attribute {}
abstract sig r extends Rule {}
one sig r0 extends r {}{
triggers = r0_trig
conditions = r0_cond
commands = r0_comm
}
abstract sig r0_trig extends Trigger {}
one sig r0_trig0 extends r0_trig {} {
capabilities = app_ThermostatWindowCheck.thermostats
attribute = cap_thermostatMode_attr_thermostatMode
no value
}
abstract sig r0_cond extends Condition {}
one sig r0_cond0 extends r0_cond {} {
capabilities = app_ThermostatWindowCheck.sensors
attribute = cap_contactSensor_attr_contact
value = cap_contactSensor_attr_contact_val_open
}
one sig r0_cond1 extends r0_cond {} {
capabilities = app_ThermostatWindowCheck.thermostats
attribute = cap_thermostatMode_attr_thermostatMode
value = cap_thermostatMode_attr_thermostatMode_val_heat
}
/*
one sig r0_cond2 extends r0_cond {} {
capabilities = app_ThermostatWindowCheck.user
attribute = cap_user_attr_turnOffTherm
value = cap_user_attr_turnOffTherm_val_Yes
}
*/
one sig r0_cond3 extends r0_cond {} {
capabilities = app_ThermostatWindowCheck.thermostats
attribute = cap_thermostatMode_attr_thermostatMode
value = cap_thermostatMode_attr_thermostatMode_val_cool
}
abstract sig r0_comm extends Command {}
/*
one sig r0_comm0 extends r0_comm {} {
capability = app_ThermostatWindowCheck.state
attribute = cap_turnOffTime_attr_turnOffTime
value = cap_turnOffTime_attr_turnOffTime_val_not_null
}
*/
one sig r0_comm1 extends r0_comm {} {
capability = app_ThermostatWindowCheck.runIn
attribute = cap_runIn_attr_runIn
value = cap_runIn_attr_runIn_val_on
}
one sig r1 extends r {}{
triggers = r1_trig
no conditions //= r1_cond
commands = r1_comm
}
abstract sig r1_trig extends Trigger {}
one sig r1_trig0 extends r1_trig {} {
capabilities = app_ThermostatWindowCheck.sensors
attribute = cap_contactSensor_attr_contact
value = cap_contactSensor_attr_contact_val_open
}
/*
abstract sig r1_cond extends Condition {}
one sig r1_cond0 extends r1_cond {} {
capabilities = app_ThermostatWindowCheck.user
attribute = cap_user_attr_turnOffTherm
value = cap_user_attr_turnOffTherm_val_Yes
}
*/
abstract sig r1_comm extends Command {}
/*
one sig r1_comm0 extends r1_comm {} {
capability = app_ThermostatWindowCheck.state
attribute = cap_turnOffTime_attr_turnOffTime
value = cap_turnOffTime_attr_turnOffTime_val_not_null
}
*/
one sig r1_comm1 extends r1_comm {} {
capability = app_ThermostatWindowCheck.runIn
attribute = cap_runIn_attr_runIn
value = cap_runIn_attr_runIn_val_on
}
one sig r2 extends r {}{
no triggers
conditions = r2_cond
commands = r2_comm
}
abstract sig r2_cond extends Condition {}
one sig r2_cond0 extends r2_cond {} {
capabilities = app_ThermostatWindowCheck.runIn
attribute = cap_runIn_attr_runIn
value = cap_runIn_attr_runIn_val_on
}
abstract sig r2_comm extends Command {}
one sig r2_comm0 extends r2_comm {} {
capability = app_ThermostatWindowCheck.thermostats
attribute = cap_thermostatMode_attr_thermostatMode
value = cap_thermostatMode_attr_thermostatMode_val_off
}
|
Transynther/x86/_processed/NONE/_st_/i7-7700_9_0xca.log_21829_741.asm | ljhsiun2/medusa | 9 | 1330 | <gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r15
push %r9
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_normal_ht+0xa173, %rsi
lea addresses_WT_ht+0xd1f3, %rdi
nop
add $50993, %r15
mov $13, %rcx
rep movsl
nop
sub %rdx, %rdx
lea addresses_D_ht+0x1dff3, %rsi
lea addresses_A_ht+0x132e3, %rdi
cmp %rdx, %rdx
mov $67, %rcx
rep movsq
nop
nop
nop
nop
nop
add $26499, %r15
lea addresses_UC_ht+0x6a93, %rbp
nop
nop
nop
cmp %r13, %r13
mov (%rbp), %rdx
add $40201, %rsi
lea addresses_WC_ht+0x12a73, %r13
clflush (%r13)
nop
nop
nop
nop
cmp %rbp, %rbp
movl $0x61626364, (%r13)
cmp %rdx, %rdx
lea addresses_D_ht+0x1263f, %rdi
sub $4126, %rbp
mov $0x6162636465666768, %r15
movq %r15, %xmm7
movups %xmm7, (%rdi)
nop
nop
nop
add %rdi, %rdi
lea addresses_A_ht+0x18aa3, %rbp
nop
add $11506, %rcx
mov (%rbp), %rdx
nop
xor $1235, %r15
lea addresses_normal_ht+0xe6b3, %r13
nop
nop
add $54183, %rbp
mov $0x6162636465666768, %rsi
movq %rsi, %xmm0
vmovups %ymm0, (%r13)
sub $45500, %rsi
lea addresses_WC_ht+0xfdf3, %rsi
lea addresses_normal_ht+0x6f49, %rdi
nop
nop
nop
sub %r9, %r9
mov $34, %rcx
rep movsq
nop
nop
nop
nop
nop
add $34154, %r9
lea addresses_UC_ht+0x8c3, %rsi
lea addresses_normal_ht+0x107f3, %rdi
nop
nop
and %rbp, %rbp
mov $9, %rcx
rep movsb
nop
nop
nop
nop
nop
inc %r13
lea addresses_WC_ht+0x1d373, %rdi
and $43860, %r9
mov $0x6162636465666768, %rcx
movq %rcx, %xmm2
vmovups %ymm2, (%rdi)
sub $55450, %rdx
lea addresses_A_ht+0x7213, %rbp
nop
inc %r9
movb $0x61, (%rbp)
nop
nop
nop
nop
sub %rsi, %rsi
lea addresses_WT_ht+0xb6f3, %rsi
sub %r9, %r9
mov $0x6162636465666768, %rcx
movq %rcx, (%rsi)
nop
nop
inc %rsi
lea addresses_UC_ht+0x8f3d, %r9
nop
nop
nop
nop
nop
inc %r13
mov (%r9), %rdx
xor $8230, %rcx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r15
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r14
push %r15
push %r8
push %rcx
push %rdi
// Store
lea addresses_PSE+0x123f3, %rcx
clflush (%rcx)
nop
nop
nop
nop
nop
cmp %r8, %r8
movb $0x51, (%rcx)
add $47357, %rcx
// Store
lea addresses_US+0x11b9b, %rcx
nop
nop
dec %r12
mov $0x5152535455565758, %r8
movq %r8, (%rcx)
nop
cmp $5240, %r14
// Store
lea addresses_D+0xe97b, %r8
nop
nop
nop
nop
nop
xor $15478, %r14
mov $0x5152535455565758, %rcx
movq %rcx, (%r8)
nop
nop
nop
nop
nop
dec %r12
// Load
lea addresses_RW+0x1a6c3, %r15
nop
xor $61800, %rdi
mov (%r15), %r8w
sub $37402, %r12
// Load
lea addresses_WC+0xc58a, %r14
nop
nop
sub $37021, %rdi
movb (%r14), %r15b
nop
nop
nop
nop
and %r12, %r12
// Load
lea addresses_normal+0x183f3, %r14
nop
sub %r11, %r11
movb (%r14), %r15b
inc %r12
// Store
lea addresses_WT+0x16bf3, %rcx
nop
nop
nop
sub $43502, %r12
mov $0x5152535455565758, %r14
movq %r14, (%rcx)
nop
nop
nop
nop
nop
xor %r12, %r12
// Faulty Load
lea addresses_WC+0x1b3f3, %r15
nop
nop
cmp $39568, %r8
mov (%r15), %r11
lea oracles, %r12
and $0xff, %r11
shlq $12, %r11
mov (%r12,%r11,1), %r11
pop %rdi
pop %rcx
pop %r8
pop %r15
pop %r14
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_WC'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_PSE'}}
{'OP': 'STOR', 'dst': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_US'}}
{'OP': 'STOR', 'dst': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_D'}}
{'src': {'congruent': 3, 'AVXalign': True, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'}
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_WC'}, 'OP': 'LOAD'}
{'src': {'congruent': 11, 'AVXalign': True, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_WT'}}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 8, 'NT': False, 'type': 'addresses_WC'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 7, 'same': True, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_WT_ht'}}
{'src': {'congruent': 10, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 4, 'same': False, 'type': 'addresses_A_ht'}}
{'src': {'congruent': 4, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_WC_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_D_ht'}}
{'src': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 3, 'AVXalign': False, 'same': True, 'size': 32, 'NT': False, 'type': 'addresses_normal_ht'}}
{'src': {'congruent': 8, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_normal_ht'}}
{'src': {'congruent': 2, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_normal_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_WC_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_A_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_WT_ht'}}
{'src': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'51': 21829}
51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51
*/
|
oeis/245/A245803.asm | neoneye/loda-programs | 11 | 94566 | ; A245803: Numerator of the partial sum of the number of prime factors function divided by n.
; Submitted by <NAME>
; 0,1,2,1,1,7,8,11,13,3,16,19,20,11,8,7,29,16,33,9,38,20,41,15,47,49,52,55,56,59,60,65,67,69,71,25,76,39,80,21,85,44,89,23,19,97,98,103,15,54,110,113,114,59,24,31,42,64,129,133,134,68,139,145,147,25,151,77,52,159,160,55
add $0,1
mov $1,$0
seq $1,22559 ; Sum of exponents in prime-power factorization of n!.
gcd $0,$1
div $1,$0
mov $0,$1
|
examples/fib3.asm | shockkolate/shk-asm | 0 | 9273 | fib:
CMP $10, $0, #1
BRA fib.end, !LE $10
fib.main:
MOV $0, $10
CMP $10, $0, #1
PSH $10
CAL fib
MOV $10, $0
POP $0
PSH $10
CAL fib
POP $10
ADD $0, $0, $10
fib.end:
RET
fib_str: DAT #0, #0, #0, #0, #0, #0
in_str: DAT #105, #110, #32, #61, #32, #0
out_str: DAT #111, #117, #116, #32, #61, #32, #0
main:
main.loop:
MOV $0, in_str
CAL puts
CAL getc
CMP $0, $0, #48
CAL fib
LOD $100, #1:#0 ; skip newline
MOV $1, fib_str
CAL itoa
MOV $0, out_str
CAL puts
MOV $0, fib_str
CAL puts
MOV $0, #10
CAL putc
;CAL getc ; skip newline
BRA main.loop
main.end:
RET
|
orka_transforms/src/orka-transforms-simd_quaternions.ads | onox/orka | 52 | 7232 | -- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2017 onox <<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 Orka.Transforms.SIMD_Vectors;
generic
with package Vectors is new Orka.Transforms.SIMD_Vectors (<>);
package Orka.Transforms.SIMD_Quaternions is
pragma Pure;
type Quaternion is new Vectors.Vector_Type;
subtype Vector4 is Vectors.Vector_Type;
type Axis_Angle is record
Axis : Vectors.Direction;
Angle : Vectors.Element_Type;
end record;
Zero_Rotation : constant Quaternion := (0.0, 0.0, 0.0, 1.0);
function "+" (Left, Right : Quaternion) return Quaternion;
function "*" (Left, Right : Quaternion) return Quaternion;
function "*" (Left : Vectors.Element_Type; Right : Quaternion) return Quaternion;
function "*" (Left : Quaternion; Right : Vectors.Element_Type) return Quaternion;
function Conjugate (Elements : Quaternion) return Quaternion;
function Inverse (Elements : Quaternion) return Quaternion;
function Norm (Elements : Quaternion) return Vectors.Element_Type;
function Normalize (Elements : Quaternion) return Quaternion;
function Normalized (Elements : Quaternion) return Boolean;
function To_Axis_Angle (Elements : Quaternion) return Axis_Angle;
function From_Axis_Angle (Value : Axis_Angle) return Quaternion;
function R
(Axis : Vector4;
Angle : Vectors.Element_Type) return Quaternion
with Pre => Vectors.Normalized (Axis),
Post => Normalized (R'Result);
-- Return a quaternion that will cause a rotation of Angle radians
-- about the given Axis
function R (Left, Right : Vector4) return Quaternion
with Post => Normalized (R'Result);
-- Return the rotation from direction Left to Right
function Difference (Left, Right : Quaternion) return Quaternion
with Post => Normalized (Difference'Result);
-- Return a quaternion describing the rotation from quaternion Left
-- to Right (Right is a composite rotation of Left and the result)
procedure Rotate_At_Origin
(Vector : in out Vector4;
Elements : Quaternion)
with Pre => Normalized (Elements);
function Lerp
(Left, Right : Quaternion;
Time : Vectors.Element_Type) return Quaternion
with Pre => Time in 0.0 .. 1.0,
Post => Normalized (Lerp'Result);
-- Return the interpolated normalized quaternion on the chord
-- between the Left and Right quaternions.
function Slerp
(Left, Right : Quaternion;
Time : Vectors.Element_Type) return Quaternion
with Pre => Time in 0.0 .. 1.0,
Post => Normalized (Slerp'Result);
-- Return the interpolated unit quaternion on the shortest arc
-- between the Left and Right quaternions.
end Orka.Transforms.SIMD_Quaternions;
|
oeis/112/A112606.asm | neoneye/loda-programs | 11 | 87105 | <reponame>neoneye/loda-programs<filename>oeis/112/A112606.asm
; A112606: Number of representations of n as a sum of six times a square and a triangular number.
; Submitted by <NAME>
; 1,1,0,1,0,0,3,2,0,2,1,0,2,0,0,1,2,0,0,0,0,3,0,0,2,2,0,4,1,0,2,0,0,0,4,0,1,0,0,2,0,0,2,0,0,3,0,0,0,0,0,2,2,0,2,3,0,2,0,0,4,2,0,0,2,0,1,0,0,4,0,0,2,0,0,2,0,0,1,2,0,0,2,0,2,0,0,0,0,0,4,1,0,0,0,0,2,4,0,4
mul $0,8
seq $0,123331 ; Expansion of (c(q)^2/(3c(q^2))-1)/2 in powers of q where c(q) is a cubic AGM function.
|
programs/oeis/053/A053384.asm | karttu/loda | 0 | 87291 | ; A053384: A053398(4, n).
; 2,2,2,2,3,3,3,3,2,2,2,2,4,4,4,4,2,2,2,2,3,3,3,3,2,2,2,2,5,5,5,5,2,2,2,2,3,3,3,3,2,2,2,2,4,4,4,4,2,2,2,2,3,3,3,3,2,2,2,2,6,6,6,6,2,2,2,2,3,3,3,3,2,2,2,2,4,4,4,4,2,2,2,2,3,3,3,3,2,2,2,2,5,5,5,5,2,2,2,2,3,3,3,3,2,2,2,2,4,4,4,4,2,2,2,2,3,3,3,3,2,2,2,2,7,7,7,7,2,2,2,2,3,3,3,3,2,2,2,2,4,4,4,4,2,2,2,2,3,3,3,3,2,2,2,2,5,5,5,5,2,2,2,2,3,3,3,3,2,2,2,2,4,4,4,4,2,2,2,2,3,3,3,3,2,2,2,2,6,6,6,6,2,2,2,2,3,3,3,3,2,2,2,2,4,4,4,4,2,2,2,2,3,3,3,3,2,2,2,2,5,5,5,5,2,2,2,2,3,3,3,3,2,2,2,2,4,4,4,4,2,2,2,2,3,3,3,3,2,2
div $0,2
add $0,2
mov $1,4
mov $2,2
lpb $0,1
div $0,$2
add $1,1
gcd $2,$0
lpe
sub $1,3
|
arch/ARM/STM32/svd/stm32l4x1/stm32_svd-dbgmcu.ads | morbos/Ada_Drivers_Library | 2 | 6249 | -- This spec has been automatically generated from STM32L4x1.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.DBGMCU is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype IDCODE_DEV_ID_Field is HAL.UInt12;
subtype IDCODE_REV_ID_Field is HAL.UInt16;
-- DBGMCU_IDCODE
type IDCODE_Register is record
-- Read-only. Device identifier
DEV_ID : IDCODE_DEV_ID_Field;
-- unspecified
Reserved_12_15 : HAL.UInt4;
-- Read-only. Revision identifie
REV_ID : IDCODE_REV_ID_Field;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IDCODE_Register use record
DEV_ID at 0 range 0 .. 11;
Reserved_12_15 at 0 range 12 .. 15;
REV_ID at 0 range 16 .. 31;
end record;
subtype CR_TRACE_MODE_Field is HAL.UInt2;
-- Debug MCU configuration register
type CR_Register is record
-- Debug Sleep mode
DBG_SLEEP : Boolean := False;
-- Debug Stop mode
DBG_STOP : Boolean := False;
-- Debug Standby mode
DBG_STANDBY : Boolean := False;
-- unspecified
Reserved_3_4 : HAL.UInt2 := 16#0#;
-- Trace pin assignment control
TRACE_IOEN : Boolean := False;
-- Trace pin assignment control
TRACE_MODE : CR_TRACE_MODE_Field := 16#0#;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR_Register use record
DBG_SLEEP at 0 range 0 .. 0;
DBG_STOP at 0 range 1 .. 1;
DBG_STANDBY at 0 range 2 .. 2;
Reserved_3_4 at 0 range 3 .. 4;
TRACE_IOEN at 0 range 5 .. 5;
TRACE_MODE at 0 range 6 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-- Debug MCU APB1 freeze register1
type APB1FZR1_Register is record
-- TIM2 counter stopped when core is halted
DBG_TIM2_STOP : Boolean := False;
-- unspecified
Reserved_1_3 : HAL.UInt3 := 16#0#;
-- TIM6 counter stopped when core is halted
DBG_TIM6_STOP : Boolean := False;
-- TIM7 counter stopped when core is halted
DBG_TIM7_STOP : Boolean := False;
-- unspecified
Reserved_6_9 : HAL.UInt4 := 16#0#;
-- RTC counter stopped when core is halted
DBG_RTC_STOP : Boolean := False;
-- Window watchdog counter stopped when core is halted
DBG_WWDG_STOP : Boolean := False;
-- Independent watchdog counter stopped when core is halted
DBG_IWDG_STOP : Boolean := False;
-- unspecified
Reserved_13_20 : HAL.UInt8 := 16#0#;
-- I2C1 SMBUS timeout counter stopped when core is halted
DBG_I2C1_STOP : Boolean := False;
-- I2C2 SMBUS timeout counter stopped when core is halted
DBG_I2C2_STOP : Boolean := False;
-- I2C3 SMBUS timeout counter stopped when core is halted
DBG_I2C3_STOP : Boolean := False;
-- unspecified
Reserved_24_24 : HAL.Bit := 16#0#;
-- bxCAN stopped when core is halted
DBG_CAN_STOP : Boolean := False;
-- unspecified
Reserved_26_30 : HAL.UInt5 := 16#0#;
-- LPTIM1 counter stopped when core is halted
DBG_LPTIM1_STOP : Boolean := False;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for APB1FZR1_Register use record
DBG_TIM2_STOP at 0 range 0 .. 0;
Reserved_1_3 at 0 range 1 .. 3;
DBG_TIM6_STOP at 0 range 4 .. 4;
DBG_TIM7_STOP at 0 range 5 .. 5;
Reserved_6_9 at 0 range 6 .. 9;
DBG_RTC_STOP at 0 range 10 .. 10;
DBG_WWDG_STOP at 0 range 11 .. 11;
DBG_IWDG_STOP at 0 range 12 .. 12;
Reserved_13_20 at 0 range 13 .. 20;
DBG_I2C1_STOP at 0 range 21 .. 21;
DBG_I2C2_STOP at 0 range 22 .. 22;
DBG_I2C3_STOP at 0 range 23 .. 23;
Reserved_24_24 at 0 range 24 .. 24;
DBG_CAN_STOP at 0 range 25 .. 25;
Reserved_26_30 at 0 range 26 .. 30;
DBG_LPTIM1_STOP at 0 range 31 .. 31;
end record;
-- Debug MCU APB1 freeze register 2
type APB1FZR2_Register is record
-- unspecified
Reserved_0_4 : HAL.UInt5 := 16#0#;
-- LPTIM2 counter stopped when core is halted
DBG_LPTIM2_STOP : Boolean := False;
-- unspecified
Reserved_6_31 : HAL.UInt26 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for APB1FZR2_Register use record
Reserved_0_4 at 0 range 0 .. 4;
DBG_LPTIM2_STOP at 0 range 5 .. 5;
Reserved_6_31 at 0 range 6 .. 31;
end record;
-- Debug MCU APB2 freeze register
type APB2FZR_Register is record
-- unspecified
Reserved_0_10 : HAL.UInt11 := 16#0#;
-- TIM1 counter stopped when core is halted
DBG_TIM1_STOP : Boolean := False;
-- unspecified
Reserved_12_15 : HAL.UInt4 := 16#0#;
-- TIM15 counter stopped when core is halted
DBG_TIM15_STOP : Boolean := False;
-- TIM16 counter stopped when core is halted
DBG_TIM16_STOP : Boolean := False;
-- unspecified
Reserved_18_31 : HAL.UInt14 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for APB2FZR_Register use record
Reserved_0_10 at 0 range 0 .. 10;
DBG_TIM1_STOP at 0 range 11 .. 11;
Reserved_12_15 at 0 range 12 .. 15;
DBG_TIM15_STOP at 0 range 16 .. 16;
DBG_TIM16_STOP at 0 range 17 .. 17;
Reserved_18_31 at 0 range 18 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- MCU debug component
type DBGMCU_Peripheral is record
-- DBGMCU_IDCODE
IDCODE : aliased IDCODE_Register;
-- Debug MCU configuration register
CR : aliased CR_Register;
-- Debug MCU APB1 freeze register1
APB1FZR1 : aliased APB1FZR1_Register;
-- Debug MCU APB1 freeze register 2
APB1FZR2 : aliased APB1FZR2_Register;
-- Debug MCU APB2 freeze register
APB2FZR : aliased APB2FZR_Register;
end record
with Volatile;
for DBGMCU_Peripheral use record
IDCODE at 16#0# range 0 .. 31;
CR at 16#4# range 0 .. 31;
APB1FZR1 at 16#8# range 0 .. 31;
APB1FZR2 at 16#C# range 0 .. 31;
APB2FZR at 16#10# range 0 .. 31;
end record;
-- MCU debug component
DBGMCU_Periph : aliased DBGMCU_Peripheral
with Import, Address => System'To_Address (16#E0042000#);
end STM32_SVD.DBGMCU;
|
CS442/Assignment2/asmCode.asm | BookerLoL/UWLCourses | 0 | 11949 | 1. int num1;
2. int num2;
3. num1 = 5 + 5;
4. num2 = 20 * 3 + num1 - num1;
5. num2 = num2 / 2;
6. print num1;
7. print num2; |
src/asf-parts.adb | Letractively/ada-asf | 0 | 25593 | <filename>src/asf-parts.adb
-----------------------------------------------------------------------
-- asf-parts -- ASF Parts
-- Copyright (C) 2011, 2012 <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.Directories;
with Ada.IO_Exceptions;
with Util.Log.Loggers;
package body ASF.Parts is
Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("ASF.Parts");
-- ------------------------------
-- Write the part data item to the file. This method is not guaranteed to succeed
-- if called more than once for the same part. This allows a particular implementation
-- to use, for example, file renaming, where possible, rather than copying all of
-- the underlying data, thus gaining a significant performance benefit.
-- ------------------------------
procedure Save (Data : in Part;
Path : in String) is
Old_Path : constant String := Part'Class (Data).Get_Local_Filename;
begin
Log.Info ("Saving uploaded file {0} to {1}", Old_Path, Path);
Ada.Directories.Rename (Old_Name => Old_Path,
New_Name => Path);
exception
when Ada.IO_Exceptions.Use_Error =>
Log.Error ("Cannot save uploaded file");
end Save;
-- ------------------------------
-- Deletes the underlying storage for a file item, including deleting any associated
-- temporary disk file.
-- ------------------------------
procedure Delete (Data : in out Part) is
Path : constant String := Part'Class (Data).Get_Local_Filename;
begin
Ada.Directories.Delete_File (Path);
end Delete;
end ASF.Parts;
|
Source_code/shifts.asm | alexcw234/dlxtetris | 0 | 6930 | ; ICS 331
; Tetris
; <NAME>
; Using DLX architecture
; Contains anything to do with shifting so I don't have to
; scroll through many things while working on the program
; Function that shifts pieces from the current shift to the desired shift
; Arguments Taken-
; R4 | Sublocation pointer to current shift (0xC)
; R5 | Address of the piece rotation block (0x1300)
; R6 | The direction to shift (normally from x input)
; If 0 is passed in, assume default.
: R7 | The sublocation pointer for the piece set (the _0 in R5)
; Arguments Passed-
; Calls no functions
; Temporaries-
; R8 | pieceRow counter
; R9 | Current row temp
; R10 |
; R11 | Temporary holder for new shift
; R12 |
; R13 |
; R14 | subtraciton result temp2
; R15 | subtraction result temp
;
; R16 | Address of piece block (0x1300 + piece designation)
; R17 | Address of current shift for piece & upper bound of orientations
; R18 | Current shift
; R19 | Default shift
; R20 | Desired shift
; R21 |
; R22 |
; R23 |
;
; R24 | Logical temporary
; R25 | Logical temporary 2
; Returns-
; N/A
;
; Function start, calculate needed address from arguments
pshift: add R16 R5 R7
add R17 R16 R4
; Now load current shift and default shift
lw R18 R17 0x0
lw R19 R17 0x1
; Is R6 0 (setup/new piece) or 1-3 (controller)
; If 0, we're resetting to default so
; R20 should be set to R19
; Otherwise, R20 should be adjusted from R18 accordingly
beqz R6 todeflt
bnez R6 tonrml
todeflt: addi R20 R19 0x0
beqz R0 endtodn
tonrml: addi R20 R18 0x0
; Calculate if R6 is 1 2 or 3
; SL for negative, SR for positive
addi R15 R6 -2
beqz R15 endtodn
slti R24 R16 0x0
bnez R24 ifSL
sgti R24 R16 0x0
bnez R24 ifSR
; For these if statements we first check if above/below bounds
; (note that we count shift from right corner)
ifSL: addi R11 R20 1
sgei R24 R11 0xFF
bnez R24 endtodn
addi R20 R11 0x0
beqz R0 endtodn
ifSR: addi R11 R20 -1
slti R24 R11 0x00
bnez R24 endtodn
addi R20 R11 0x0
beqz R0 endtodn
; At this point we have the current shift
; R18 and the desired shift R20
; Now we iterate over every orientation for that piece
endtodn: addi R8 R16 0x0
; Here's the outer while loop.
; Go until R18 = R20
shifting: sub R14 R20 R18
; if >0 shift left, if <0 shift right else end
slti R24 R14 0x0
sgti R25 R14 0x0
beqz R14 enshift
; Here's the inner while loop. R17 has the upper bound of iteration
; Go until pointer on 0x13_C
sh1: sub R15 R17 R8
beqz R15 endsh1
bnez R25 shftL
bnez R24 shftR
beqz R0 retsft
; Shifts
shftL: lw R9 R8 0x0
sll R9 R9
sw R9 R8 0x0
beqz R0 retsft
shftR: lw R9 R8 0x0
srl R9 R9
sw R9 R8 0x0
beqz R0 retsft
retsft: addi R8 R8 1
beqz R0 sh1
endsh1: addi R8 R16 0x0
; Adjust currentshift accordingly
bnez R25 eshftL
bnez R24 eshftR
beqz R0 ensh2
eshftL: addi R18 R18 1
beqz R0 ensh2
eshftR: addi R18 R18 -1
beqz R0 ensh2
ensh2: beqz R0 shifting
enshift: sw R18 R16 0xC
; current shift stored and all piecerows have been shifted
jr R31
|
game/data/fixed-bank-data.asm | benoitryder/super-tilt-bro | 0 | 162847 | #include "game/data/stages/stages-index.asm"
#include "game/data/characters/characters-index.asm"
#include "game/data/characters/characters-common-logic.asm"
#include "game/data/characters/characters-common-animations/characters-common-animations.asm"
#include "game/data/anim_empty.asm"
|
Working Disassembly/Levels/HPZ/Misc Object Data/Map - Emerald Misc Art.asm | TeamASM-Blur/Sonic-3-Blue-Balls-Edition | 5 | 28647 | <reponame>TeamASM-Blur/Sonic-3-Blue-Balls-Edition<filename>Working Disassembly/Levels/HPZ/Misc Object Data/Map - Emerald Misc Art.asm<gh_stars>1-10
Map_91006: dc.w word_91050-Map_91006
dc.w word_91070-Map_91006
dc.w word_91090-Map_91006
dc.w word_910B0-Map_91006
dc.w word_910D0-Map_91006
dc.w word_910F0-Map_91006
dc.w word_91110-Map_91006
dc.w word_91130-Map_91006
dc.w word_91150-Map_91006
dc.w word_911EE-Map_91006
dc.w word_911F6-Map_91006
dc.w word_911FE-Map_91006
dc.w word_9121E-Map_91006
dc.w word_91226-Map_91006
dc.w word_9122E-Map_91006
dc.w word_91236-Map_91006
dc.w word_9123E-Map_91006
dc.w word_91246-Map_91006
dc.w word_9124E-Map_91006
dc.w word_91256-Map_91006
dc.w word_9125E-Map_91006
dc.w word_91266-Map_91006
dc.w word_9126E-Map_91006
dc.w word_91276-Map_91006
dc.w word_9127E-Map_91006
dc.w word_91286-Map_91006
dc.w word_9128E-Map_91006
dc.w word_91296-Map_91006
dc.w word_9129E-Map_91006
dc.w word_912A6-Map_91006
dc.w word_912A8-Map_91006
dc.w word_912C2-Map_91006
dc.w word_91348-Map_91006
dc.w word_913B6-Map_91006
dc.w word_9140C-Map_91006
dc.w word_9144A-Map_91006
dc.w word_91470-Map_91006
word_91050: dc.w 5
dc.b $F0, 9, 0, 0, $FF, $E8
dc.b $F0, 9, 8, 0, 0, 0
dc.b 0, 4, 0, 6, $FF, $E8
dc.b 0, 5, 0, 8, $FF, $F8
dc.b 0, 4, 0, $C, 0, 8
word_91070: dc.w 5
dc.b $F0, 9, 0, $38, $FF, $E8
dc.b $F0, 9, 8, $38, 0, 0
dc.b 0, 4, 0, $3E, $FF, $E8
dc.b 0, 5, 0, $40, $FF, $F8
dc.b 0, 4, 0, $44, 0, 8
word_91090: dc.w 5
dc.b $F0, 9, 0, $E, $FF, $E8
dc.b $F0, 9, 8, $E, 0, 0
dc.b 0, 4, 0, $14, $FF, $E8
dc.b 0, 5, 0, $16, $FF, $F8
dc.b 0, 4, 0, $1A, 0, 8
word_910B0: dc.w 5
dc.b $F0, 9, 0, $46, $FF, $E8
dc.b $F0, 9, 8, $46, 0, 0
dc.b 0, 4, 0, $4C, $FF, $E8
dc.b 0, 5, 0, $4E, $FF, $F8
dc.b 0, 4, 0, $1A, 0, 8
word_910D0: dc.w 5
dc.b $F0, 9, 0, $1C, $FF, $E8
dc.b $F0, 9, 8, $1C, 0, 0
dc.b 0, 4, 0, $22, $FF, $E8
dc.b 0, 5, 0, $24, $FF, $F8
dc.b 0, 4, 0, $28, 0, 8
word_910F0: dc.w 5
dc.b $F0, 9, 0, $52, $FF, $E8
dc.b $F0, 9, 8, $52, 0, 0
dc.b 0, 4, 0, $58, $FF, $E8
dc.b 0, 5, 0, $5A, $FF, $F8
dc.b 0, 4, 0, $5E, 0, 8
word_91110: dc.w 5
dc.b $F0, 9, 0, $2A, $FF, $E8
dc.b $F0, 9, 8, $2A, 0, 0
dc.b 0, 4, 0, $30, $FF, $E8
dc.b 0, 5, 0, $32, $FF, $F8
dc.b 0, 4, 0, $36, 0, 8
word_91130: dc.w 5
dc.b $F0, 9, 0, $60, $FF, $E8
dc.b $F0, 9, 8, $60, 0, 0
dc.b 0, 4, 0, $66, $FF, $E8
dc.b 0, 5, 0, $68, $FF, $F8
dc.b 0, 4, 0, $6C, 0, 8
word_91150: dc.w $1A
dc.b $A0, 7, 0, $6E, $FF, $F0
dc.b $A0, 7, 8, $6E, 0, 0
dc.b $B0, 7, 0, $6E, $FF, $F0
dc.b $B0, 7, 8, $6E, 0, 0
dc.b $C0, 7, 0, $6E, $FF, $F0
dc.b $C0, 7, 8, $6E, 0, 0
dc.b $D0, 7, 0, $6E, $FF, $F0
dc.b $D0, 7, 8, $6E, 0, 0
dc.b $E0, 7, 0, $6E, $FF, $F0
dc.b $E0, 7, 8, $6E, 0, 0
dc.b $F0, 7, 0, $6E, $FF, $F0
dc.b $F0, 7, 8, $6E, 0, 0
dc.b 0, 7, 0, $6E, $FF, $F0
dc.b 0, 7, 8, $6E, 0, 0
dc.b $10, 7, 0, $6E, $FF, $F0
dc.b $10, 7, 8, $6E, 0, 0
dc.b $20, 7, 0, $6E, $FF, $F0
dc.b $20, 7, 8, $6E, 0, 0
dc.b $30, 7, 0, $6E, $FF, $F0
dc.b $30, 7, 8, $6E, 0, 0
dc.b $40, 7, 0, $6E, $FF, $F0
dc.b $40, 7, 8, $6E, 0, 0
dc.b $50, 7, 0, $6E, $FF, $F0
dc.b $50, 7, 8, $6E, 0, 0
dc.b $60, 7, 0, $6E, $FF, $F0
dc.b $60, 7, 8, $6E, 0, 0
word_911EE: dc.w 1
dc.b $FC, 0, 0, $76, $FF, $FC
word_911F6: dc.w 1
dc.b $F8, 5, 0, $77, $FF, $F8
word_911FE: dc.w 5
dc.b $E8, $E, 0, $7B, $FF, $E0
dc.b $E8, $E, 8, $7B, 0, 0
dc.b 0, 4, 0, $87, $FF, $E0
dc.b 0, $E, 0, $89, $FF, $F0
dc.b 0, 4, 0, $95, 0, $10
word_9121E: dc.w 1
dc.b $E8, 2, 0, $97, $FF, $F0
word_91226: dc.w 1
dc.b $F0, 1, 0, $9A, $FF, $F0
word_9122E: dc.w 1
dc.b $F0, 1, 0, $9C, $FF, $F8
word_91236: dc.w 1
dc.b $F0, 1, 8, $9C, 0, 0
word_9123E: dc.w 1
dc.b $F0, 1, 8, $9A, 0, 8
word_91246: dc.w 1
dc.b $E8, 2, 8, $97, 0, 8
word_9124E: dc.w 1
dc.b $FC, 0, 0, $9E, $FF, $FC
word_91256: dc.w 1
dc.b $F8, 5, 0, $9F, $FF, $F8
word_9125E: dc.w 1
dc.b $F8, 5, 0, $A3, $FF, $F8
word_91266: dc.w 1
dc.b $F4, $A, 0, $A7, $FF, $F4
word_9126E: dc.w 1
dc.b $F4, $A, 0, $B0, $FF, $F4
word_91276: dc.w 1
dc.b $F8, 5, 0, $B9, $FF, $F8
word_9127E: dc.w 1
dc.b $F8, 1, 0, $BD, $FF, $FC
word_91286: dc.w 1
dc.b $F8, 1, 0, $BF, $FF, $FC
word_9128E: dc.w 1
dc.b $F8, 1, 8, $BF, $FF, $FC
word_91296: dc.w 1
dc.b $FC, 0, 0, $C1, $FF, $FC
word_9129E: dc.w 1
dc.b $FC, 0, 8, $C1, $FF, $FC
word_912A6: dc.w 0
word_912A8: dc.w 4
dc.b $F0, $A, 0, 0, $FF, $E8
dc.b 8, 0, 0, 9, $FF, $F8
dc.b $F0, $A, 8, 0, 0, 0
dc.b 8, 0, 8, 9, 0, 0
word_912C2: dc.w $16
dc.b $C0, 7, 0, $6E, $FF, $F0
dc.b $C0, 7, 8, $6E, 0, 0
dc.b $D0, 7, 0, $6E, $FF, $F0
dc.b $D0, 7, 8, $6E, 0, 0
dc.b $E0, 7, 0, $6E, $FF, $F0
dc.b $E0, 7, 8, $6E, 0, 0
dc.b $F0, 7, 0, $6E, $FF, $F0
dc.b $F0, 7, 8, $6E, 0, 0
dc.b 0, 7, 0, $6E, $FF, $F0
dc.b 0, 7, 8, $6E, 0, 0
dc.b $10, 7, 0, $6E, $FF, $F0
dc.b $10, 7, 8, $6E, 0, 0
dc.b $20, 7, 0, $6E, $FF, $F0
dc.b $20, 7, 8, $6E, 0, 0
dc.b $30, 7, 0, $6E, $FF, $F0
dc.b $30, 7, 8, $6E, 0, 0
dc.b $40, 7, 0, $6E, $FF, $F0
dc.b $40, 7, 8, $6E, 0, 0
dc.b $50, 7, 0, $6E, $FF, $F0
dc.b $50, 7, 8, $6E, 0, 0
dc.b $60, 7, 0, $6E, $FF, $F0
dc.b $60, 7, 8, $6E, 0, 0
word_91348: dc.w $12
dc.b $E0, 7, 0, $6E, $FF, $F0
dc.b $E0, 7, 8, $6E, 0, 0
dc.b $F0, 7, 0, $6E, $FF, $F0
dc.b $F0, 7, 8, $6E, 0, 0
dc.b 0, 7, 0, $6E, $FF, $F0
dc.b 0, 7, 8, $6E, 0, 0
dc.b $10, 7, 0, $6E, $FF, $F0
dc.b $10, 7, 8, $6E, 0, 0
dc.b $20, 7, 0, $6E, $FF, $F0
dc.b $20, 7, 8, $6E, 0, 0
dc.b $30, 7, 0, $6E, $FF, $F0
dc.b $30, 7, 8, $6E, 0, 0
dc.b $40, 7, 0, $6E, $FF, $F0
dc.b $40, 7, 8, $6E, 0, 0
dc.b $50, 7, 0, $6E, $FF, $F0
dc.b $50, 7, 8, $6E, 0, 0
dc.b $60, 7, 0, $6E, $FF, $F0
dc.b $60, 7, 8, $6E, 0, 0
word_913B6: dc.w $E
dc.b 0, 7, 0, $6E, $FF, $F0
dc.b 0, 7, 8, $6E, 0, 0
dc.b $10, 7, 0, $6E, $FF, $F0
dc.b $10, 7, 8, $6E, 0, 0
dc.b $20, 7, 0, $6E, $FF, $F0
dc.b $20, 7, 8, $6E, 0, 0
dc.b $30, 7, 0, $6E, $FF, $F0
dc.b $30, 7, 8, $6E, 0, 0
dc.b $40, 7, 0, $6E, $FF, $F0
dc.b $40, 7, 8, $6E, 0, 0
dc.b $50, 7, 0, $6E, $FF, $F0
dc.b $50, 7, 8, $6E, 0, 0
dc.b $60, 7, 0, $6E, $FF, $F0
dc.b $60, 7, 8, $6E, 0, 0
word_9140C: dc.w $A
dc.b $20, 7, 0, $6E, $FF, $F0
dc.b $20, 7, 8, $6E, 0, 0
dc.b $30, 7, 0, $6E, $FF, $F0
dc.b $30, 7, 8, $6E, 0, 0
dc.b $40, 7, 0, $6E, $FF, $F0
dc.b $40, 7, 8, $6E, 0, 0
dc.b $50, 7, 0, $6E, $FF, $F0
dc.b $50, 7, 8, $6E, 0, 0
dc.b $60, 7, 0, $6E, $FF, $F0
dc.b $60, 7, 8, $6E, 0, 0
word_9144A: dc.w 6
dc.b $40, 7, 0, $6E, $FF, $F0
dc.b $40, 7, 8, $6E, 0, 0
dc.b $50, 7, 0, $6E, $FF, $F0
dc.b $50, 7, 8, $6E, 0, 0
dc.b $60, 7, 0, $6E, $FF, $F0
dc.b $60, 7, 8, $6E, 0, 0
word_91470: dc.w 2
dc.b $60, 7, 0, $6E, $FF, $F0
dc.b $60, 7, 8, $6E, 0, 0
|
Cubical/ZCohomology/Base.agda | ayberkt/cubical | 0 | 10053 | <reponame>ayberkt/cubical<filename>Cubical/ZCohomology/Base.agda
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.ZCohomology.Base where
open import Cubical.Data.Int.Base
open import Cubical.Data.Nat.Base
open import Cubical.Data.Sigma
open import Cubical.Foundations.Pointed.Base
open import Cubical.HITs.Nullification.Base
open import Cubical.HITs.SetTruncation.Base
open import Cubical.HITs.Sn.Base
open import Cubical.HITs.S1.Base
open import Cubical.HITs.Susp.Base
open import Cubical.HITs.Truncation.Base
private
variable
ℓ : Level
A : Type ℓ
--- Cohomology ---
{- EM-spaces Kₙ from Brunerie 2016 -}
coHomK : (n : ℕ) → Type₀
coHomK zero = Int
coHomK (suc n) = ∥ S₊ (suc n) ∥ (2 + suc n)
{- Cohomology -}
coHom : (n : ℕ) → Type ℓ → Type ℓ
coHom n A = ∥ (A → coHomK n) ∥₂
--- Reduced cohomology ---
coHom-pt : (n : ℕ) → coHomK n
coHom-pt 0 = 0
coHom-pt 1 = ∣ base ∣
coHom-pt (suc (suc n)) = ∣ north ∣
{- Pointed version of Kₙ -}
coHomK-ptd : (n : ℕ) → Pointed (ℓ-zero)
coHomK-ptd n = coHomK n , coHom-pt n
{- Reduced cohomology -}
coHomRed : (n : ℕ) → (A : Pointed ℓ) → Type ℓ
coHomRed n A = ∥ A →∙ coHomK-ptd n ∥₂
|
Programming for Embedded Systems/Labs/Lab 2/Task 1/Task 1/main.asm | sathwikkannam/courses-HKR | 0 | 240919 | ;This program stores integers in registers and adds the contents of two registers.
;It then stores the result into memory.
;The process is repeated for different register pairs: (R1, R2), (R17, R18), (R19, R20)
.include "m328pdef.inc" ;this file must correspond to the processor to be used
.list
tester:
LDI R17, 16 ;set R17=16 (0x10)
LDI R18, 32 ;set R18=32 (0x20)
MOV R1, R17 ;set R1 = R17
MOV R2, R18 ;set R2 = R18
ADD R1, R2 ;R1 = R1+R2
CLR R27 ;clear higher byte of memory index register (=00)
LDI R26, 80 ;set lower index register to destination memory address
ST x+, R19 ;store the sum in memory pointed by pair R27:R26
STS 128, R1 ;store the sum (R1) at a pre-specified address (128)
LDI R17, 127 ;(Refer to the comments above)
LDI R18, 126
ADD R17, R18
INC R26 ;increment the index so that it points to the next memory location
ST x+, R17 ;store the sum
LDI R19, 254 ;(Refer to the comments above)
LDI R20, 2
ADD R19, R20
INC R26 ;increment the index so that it points to the next memory location
ST x+, R19 ;store the sum
|
10x10squreprint.asm | tz01x/8086_emu.ind | 0 | 100827 |
; You may customize this and other start-up templates;
; The location of this template is c:\emu8086\inc\0_com_template.txt
ORG 100h ; for COM file.
mov bx,10
mov cx,10
outer_loop:
; push bx value to stack , because bx current state value is need letter
push bx
inner_loop:
; move ascii code 42 to dl and call print procedure that print DL register value to console
mov dl,42
call print
; same as before call print procedure for print a space in the console
mov dl,32
call print
dec bx
; compare bx if it is greater then zero or not, if is equal to zero then exit this loop sequence
cmp bx,0
jg inner_loop
;call print_ln procedure that print a newline to console
call print_ln
pop bx; pop from stack which contain bx value, so bx value get restore
loop outer_loop
RET ; return to OS.
print proc
;print procedure, print DL value to console
; ah set to 2 because interrupts 21h will print a single character or 8bit data to console
mov ah, 2
int 21h
ret
print endp
print_ln proc
;print_ln procedure, print newline value to console
; ah set to 2 because interrupts 21h will print a single character or 8bit data to console
mov ah,2
mov dl,10 ; newline ascii code
int 21h
mov dl,13
int 21h
ret
print_ln endp
|
util/cv/cvmth.asm | olifink/smsqe | 0 | 14151 | <filename>util/cv/cvmth.asm<gh_stars>0
* Convert text month to number v0.00 J.R.Oakley Mar 1988 QJUMP
*
section cv
*
xref cv_lctab
*
xdef cv_txtmn
xdef cv_mntxt
*+++
* Convert a string which should contain a text month name into
* a month number from 1 to 12. Leading spaces only are permitted.
*
* Registers:
* Entry Exit
* D1 month number
* D7 end of text preserved
* A0 start of text updated
* A2 list of months (36 chars) smashed
*---
cv_txtmn
*
cvmreg reg d0/d2-d6
movem.l cvmreg,-(sp)
move.w #%1111111111110,d0 ; all months still valid
moveq #' ',d1
rmlspc
cmp.l a0,d7 ; off end of buffer?
ble.s flsbit ; yes
cmp.b (a0)+,d1 ; is this a space?
beq.s rmlspc ; yes, ignore it
*
subq.l #1,a0 ; no, go back to it
addq.l #2,a2 ; point to first letter of "Jan"
move.l d7,d1 ; we have...
sub.l a0,d1 ; ...this many characters
beq.s flsbit ; none
cmp.w #2,d1 ; more than two?
bls.s slctab ; no
moveq #2,d1 ; yes, three letters to go
slctab
lea cv_lctab(pc),a1 ; lower case table is here
moveq #0,d2 ; clear out upper bits
moveq #0,d6
*
cmplp
move.b (a0)+,d2 ; character to check
move.b 0(a1,d2.w),d2 ; lowercase it
move.w d0,d3 ; get map of valid months
moveq #12,d4 ; test twelve of them
moveq #11*3,d5 ; start with letter at this offset
letlp
move.b 0(a2,d5.w),d6 ; get month letter
cmp.b 0(a1,d6.w),d2 ; compare with it in lower case
beq.s letok ; same
bclr d4,d3 ; different, this month won't do
letok
subq.w #1,d4 ; next month
subq.w #3,d5 ; and its Nth letter
bpl.s letlp ; there is one
tst.w d3 ; any months left?
beq.s flsbit ; no, find first match
move.w d3,d0 ; yes, carry on
addq.l #1,a2 ; using next month letter
dbra d1,cmplp
flsbit
moveq #-1,d1 ; start at month -1 (!)
flslp
addq.w #1,d1 ; next month
lsr.w #1,d0 ; is this bit
bcc.s flslp ; but it isn't valid
*
movem.l (sp)+,cvmreg
rts
*+++
* Convert a month number from 1 to 12 into the corresponding three-letter
* string.
*
* Registers:
* Entry Exit
* D1 month number preserved
* D7 end of buffer preserved
* A0 buffer pointer updated
* A2 list of months (36 chars) smashed
*---
cv_mntxt
movem.l cvmreg,-(sp)
add.w d1,a2
add.w d1,a2 ; get offset in text
subq.w #1,d1 ; including 2 chars for the length!
add.w d1,a2
moveq #2,d0
cpchar
cmp.l a0,d7 ; off end of buffer?
ble.s flsbit ; yes
move.b (a2)+,(a0)+ ; no, copy char
dbra d0,cpchar
movem.l (sp)+,cvmreg
rts
*
end
|
src/sound/septette_for_the_dead_princess/channel2.asm | Gegel85/RemiFlap | 0 | 6720 | musicChan2RemiliaTheme::
setRegisters $A5, $F4, $00, $00
repeat 3
setFrequency NOTE_G / 2, $80
wait CROTCHET
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_G / 2, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait CROTCHET
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_F, $80
wait QUAVER
continue
setFrequency NOTE_G / 2, $80
wait CROTCHET
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_G / 2, $80
wait CROTCHET
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_D / 2, $80
wait CROTCHET
; 5
setFrequency NOTE_Ab / 4, $80
wait CROTCHET
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_Ab / 4, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait CROTCHET
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_F, $80
wait QUAVER
setFrequency NOTE_D / 2, $80
wait CROTCHET
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_D / 2, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait CROTCHET
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_F, $80
wait QUAVER
setFrequency NOTE_G / 2, $80
wait CROTCHET
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_G / 2, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait CROTCHET
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_F, $80
wait QUAVER
setFrequency NOTE_G, $80
wait MINIM
wait QUAVER
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_F * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Eb * 2, $80
wait QUAVER
; 10
setFrequency NOTE_C * 2, $80
wait MINIM
wait QUAVER
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_F * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Bb * 2, $80
wait QUAVER
setFrequency NOTE_G * 2, $80
wait MINIM
wait QUAVER
setFrequency NOTE_G * 2, $80
wait QUAVER
setFrequency NOTE_Bb * 2, $80
wait QUAVER
setFrequency NOTE_C * 4, $80
wait QUAVER
setFrequency NOTE_F * 2, $80
wait CROTCHET
setFrequency NOTE_F * 2, $80
wait CROTCHET
wait QUAVER
setFrequency NOTE_F * 2, $80
wait QUAVER
setFrequency NOTE_G * 2, $80
wait QUAVER
setFrequency NOTE_Bb * 2, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait CROTCHET
setFrequency NOTE_Eb * 2, $80
wait CROTCHET
wait QUAVER
setFrequency NOTE_C * 2, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
; 15
setFrequency NOTE_Eb * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_F * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_B, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait MINIM
setFrequency NOTE_D * 2, $80
wait MINIM
.loop:
setFrequency NOTE_Eb * 2, $80
wait MINIM + QUAVER
setFrequency NOTE_D * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Eb * 2, $80
wait SEMIQUAVER
setFrequency NOTE_D * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_Ab, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIBREVE
wait CROTCHET
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_Eb, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
wait CROTCHET
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_Eb, $80
wait SEMIQUAVER
setFrequency NOTE_Ab, $80
wait SEMIQUAVER
; 20
wait CROTCHET
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_Eb, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIQUAVER
wait CROTCHET
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_Eb, $80
wait SEMIQUAVER
setFrequency NOTE_Ab, $80
wait SEMIQUAVER
wait CROTCHET
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_Eb, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
wait CROTCHET
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_Eb, $80
wait SEMIQUAVER
setFrequency NOTE_Ab, $80
wait SEMIQUAVER
wait CROTCHET
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_Eb, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIQUAVER
wait CROTCHET
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_Eb, $80
wait QUAVER
setFrequency NOTE_Eb * 4, $80
wait MINIM + QUAVER
setFrequency NOTE_D * 4, $80
wait SEMIQUAVER
setFrequency NOTE_C * 4, $80
wait SEMIQUAVER
setFrequency NOTE_Bb * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Ab * 2, $80
wait SEMIQUAVER
setFrequency NOTE_G * 2, $80
wait SEMIQUAVER
setFrequency NOTE_F * 2, $80
wait SEMIQUAVER
setFrequency NOTE_A * 2, $80
wait MINIM
wait QUAVER
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
; 25
setFrequency NOTE_Eb * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_F * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait MINIM
wait QUAVER
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_F * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Bb * 2, $80
wait QUAVER
setFrequency NOTE_G * 2, $80
wait MINIM
wait QUAVER
setFrequency NOTE_G * 2, $80
wait QUAVER
setFrequency NOTE_Bb * 2, $80
wait QUAVER
setFrequency NOTE_C * 4, $80
wait QUAVER
setFrequency NOTE_F * 2, $80
wait CROTCHET
setFrequency NOTE_F * 2, $80
wait CROTCHET
wait QUAVER
setFrequency NOTE_F * 2, $80
wait QUAVER
setFrequency NOTE_G * 2, $80
wait QUAVER
setFrequency NOTE_Bb * 2, $80
wait QUAVER
; 30
setFrequency NOTE_Eb * 2, $80
wait CROTCHET
setFrequency NOTE_Eb * 2, $80
wait CROTCHET
wait QUAVER
setFrequency NOTE_C * 2, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_F * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_B, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait MINIM
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_F * 2, $80
wait QUAVER
setFrequency NOTE_G * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Bb * 2, $80
wait QUAVER
setFrequency NOTE_F * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_G * 2, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait MINIM
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_F * 2, $80
wait QUAVER
; 35
setFrequency NOTE_G * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Bb * 2, $80
wait CROTCHET
setFrequency NOTE_C * 4, $80
wait QUAVER
setFrequency NOTE_Bb * 2, $80
wait QUAVER
setFrequency NOTE_Bb * 2, $80
wait QUAVER
setFrequency NOTE_A * 2, $80
wait MINIM
wait QUAVER
setFrequency NOTE_C * 4, $80
wait QUAVER
setFrequency NOTE_D * 4, $80
wait QUAVER
setFrequency NOTE_Eb * 4, $80
wait QUAVER
setFrequency NOTE_Ab * 2, $80
wait CROTCHET
setFrequency NOTE_Ab * 2, $80
wait CROTCHET
wait QUAVER
setFrequency NOTE_Ab * 2, $80
wait QUAVER
setFrequency NOTE_Bb * 2, $80
wait QUAVER
setFrequency NOTE_D * 4, $80
wait QUAVER
setFrequency NOTE_G * 2, $80
wait CROTCHET
setFrequency NOTE_G * 2, $80
wait CROTCHET
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_F * 2, $80
wait QUAVER
setFrequency NOTE_G * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Bb * 2, $80
wait QUAVER
setFrequency NOTE_F * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_D * 2, $80
wait QUAVER
; 40
setFrequency NOTE_Eb * 2, $80
wait MINIM
setFrequency NOTE_F * 2, $80
wait CROTCHET
setFrequency NOTE_Bb, $80
wait QUAVER
setFrequency NOTE_Db * 2, $80
wait QUAVER
repeat 2
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_Db * 2, $80
wait QUAVER
continue
setFrequency NOTE_Eb * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_Gb * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_F * 2, $80
wait QUAVER
repeat 2
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_Db * 2, $80
wait QUAVER
continue
setFrequency NOTE_Eb * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_Bb * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_Ab * 2, $80
wait QUAVER
setFrequency NOTE_Gb * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_F * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_Bb, $80
wait DOTTED_QUAVER
setFrequency NOTE_Ab, $80
wait QUAVER
setFrequency NOTE_Bb, $80
wait DOTTED_MINIM
setFrequency NOTE_Bb, $80
wait QUAVER
setFrequency NOTE_Db * 2, $80
wait QUAVER
; 45
repeat 2
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_Db * 2, $80
wait QUAVER
continue
setFrequency NOTE_Eb * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_Gb * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_F * 2, $80
wait QUAVER
repeat 2
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_Db * 2, $80
wait QUAVER
continue
setFrequency NOTE_Eb * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_Bb * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_Ab * 2, $80
wait QUAVER
setFrequency NOTE_Gb * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_F * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_F * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_Gb * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_Ab * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_F * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Bb * 2, $80
wait QUAVER
setFrequency NOTE_Bb * 2, $80
wait QUAVER
wait CROTCHET
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
; 50
setFrequency NOTE_C * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Bb, $80
wait QUAVER
setFrequency NOTE_A, $80
wait DOTTED_QUAVER
setFrequency NOTE_F, $80
wait DOTTED_QUAVER
setFrequency NOTE_G, $80
wait QUAVER
wait DOTTED_MINIM
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Bb, $80
wait QUAVER
setFrequency NOTE_A, $80
wait DOTTED_QUAVER
setFrequency NOTE_F * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
wait DOTTED_MINIM
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Bb, $80
wait QUAVER
setFrequency NOTE_A, $80
wait DOTTED_QUAVER
setFrequency NOTE_F, $80
wait DOTTED_QUAVER
setFrequency NOTE_G, $80
wait QUAVER
; 55
wait DOTTED_MINIM
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_A, $80
wait QUAVER
setFrequency NOTE_Bb, $80
wait QUAVER
setFrequency NOTE_A, $80
wait QUAVER
setFrequency NOTE_F, $80
wait QUAVER
setFrequency NOTE_G, $80
wait QUAVER + MINIM
setFrequency NOTE_D * 2, $80
wait DOTTED_MINIM
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
; 50
setFrequency NOTE_C * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Bb, $80
wait QUAVER
setFrequency NOTE_A, $80
wait DOTTED_QUAVER
setFrequency NOTE_F, $80
wait DOTTED_QUAVER
setFrequency NOTE_G, $80
wait QUAVER
wait DOTTED_MINIM
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Bb, $80
wait QUAVER
setFrequency NOTE_A, $80
wait DOTTED_QUAVER
setFrequency NOTE_F * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
wait DOTTED_MINIM
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Bb, $80
wait QUAVER
setFrequency NOTE_A, $80
wait DOTTED_QUAVER
setFrequency NOTE_F, $80
wait DOTTED_QUAVER
setFrequency NOTE_G, $80
wait QUAVER
; 55
wait DOTTED_MINIM
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_A, $80
wait QUAVER
setFrequency NOTE_Bb, $80
wait QUAVER
setFrequency NOTE_A, $80
wait QUAVER
setFrequency NOTE_F, $80
wait QUAVER
setFrequency NOTE_G, $80
wait QUAVER + MINIM
setFrequency NOTE_D * 2, $80
wait MINIM
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait SEMIQUAVER
setFrequency NOTE_D * 2, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait QUAVER
setFrequency NOTE_F, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
wait QUAVER
setFrequency NOTE_F, $80
wait QUAVER
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_A, $80
wait QUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
; 60
repeat 2
setFrequency NOTE_G, $80
wait QUAVER3
setFrequency NOTE_D * 2, $80
wait QUAVER3
setFrequency NOTE_C * 2, $80
wait QUAVER3
continue
setFrequency NOTE_A, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_F, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_F, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_F, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_Bb / 2, $80
wait SEMIQUAVER
setFrequency NOTE_C, $80
wait QUAVER3
setFrequency NOTE_A / 2, $80
wait QUAVER3
setFrequency NOTE_Bb / 2, $80
wait QUAVER3
setFrequency NOTE_G / 2, $80
wait QUAVER3
setFrequency NOTE_A / 2, $80
wait QUAVER3
setFrequency NOTE_F / 2, $80
wait QUAVER3
setFrequency NOTE_G / 2, $80
wait SEMIQUAVER
setFrequency NOTE_F / 2, $80
wait SEMIQUAVER
setFrequency NOTE_D / 2, $80
wait SEMIQUAVER
setFrequency NOTE_F / 2, $80
wait SEMIQUAVER
setFrequency NOTE_G / 2, $80
wait QUAVER
setFrequency NOTE_D, $80
wait QUAVER
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_Bb / 2, $80
wait SEMIQUAVER
setFrequency NOTE_A / 2, $80
wait SEMIQUAVER
setFrequency NOTE_F / 2, $80
wait SEMIQUAVER
setFrequency NOTE_G / 2, $80
wait QUAVER
setFrequency NOTE_G / 2, $80
wait SEMIQUAVER
setFrequency NOTE_A / 2, $80
wait SEMIQUAVER
setFrequency NOTE_G / 2, $80
wait SEMIQUAVER
setFrequency NOTE_A / 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb / 2, $80
wait SEMIQUAVER
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_F, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_A, $80
wait QUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIQUAVER
setFrequency NOTE_F, $80
wait SEMIQUAVER
setFrequency NOTE_E, $80
wait SEMIQUAVER
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_Bb / 2, $80
wait SEMIQUAVER
setFrequency NOTE_G / 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb / 2, $80
wait SEMIQUAVER
setFrequency NOTE_C, $80
wait QUAVER
setFrequency NOTE_E, $80
wait QUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_F, $80
wait SEMIQUAVER
; 65
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_F, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_F, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_D * 2, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait QUAVER
setFrequency NOTE_A, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_Bb / 2, $80
wait SEMIQUAVER
setFrequency NOTE_A / 2, $80
wait SEMIQUAVER
setFrequency NOTE_G / 2, $80
wait SEMIQUAVER
setFrequency NOTE_D / 2, $80
wait SEMIQUAVER
setFrequency NOTE_G / 2, $80
wait SEMIQUAVER
setFrequency NOTE_A / 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb / 2, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
wait QUAVER
setFrequency NOTE_F * 2, $80
wait QUAVER
setFrequency NOTE_G * 2, $80
wait QUAVER
setFrequency NOTE_A * 2, $80
wait QUAVER
setFrequency NOTE_G * 2, $80
wait SEMIQUAVER
setFrequency NOTE_C * 4, $80
wait SEMIQUAVER
setFrequency NOTE_Bb * 2, $80
wait SEMIQUAVER
setFrequency NOTE_C * 4, $80
wait SEMIQUAVER
setFrequency NOTE_A * 2, $80
wait SEMIQUAVER
setFrequency NOTE_C * 4, $80
wait SEMIQUAVER
setFrequency NOTE_G * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb * 2, $80
wait SEMIQUAVER
repeat 2
setFrequency NOTE_G * 2, $80
wait QUAVER3
setFrequency NOTE_D * 4, $80
wait QUAVER3
setFrequency NOTE_C * 4, $80
wait QUAVER3
continue
setFrequency NOTE_A * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb * 2, $80
wait SEMIQUAVER
setFrequency NOTE_G * 2, $80
wait SEMIQUAVER
setFrequency NOTE_A * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb * 2, $80
wait SEMIQUAVER
setFrequency NOTE_F * 2, $80
wait SEMIQUAVER
setFrequency NOTE_G * 2, $80
wait SEMIQUAVER
setFrequency NOTE_D * 2, $80
wait SEMIQUAVER
setFrequency NOTE_G * 2, $80
wait SEMIQUAVER
setFrequency NOTE_F * 2, $80
wait SEMIQUAVER
setFrequency NOTE_D * 2, $80
wait SEMIQUAVER
setFrequency NOTE_F * 2, $80
wait SEMIQUAVER
setFrequency NOTE_G * 2, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait SEMIQUAVER
setFrequency NOTE_D * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait QUAVER3
setFrequency NOTE_A, $80
wait QUAVER3
setFrequency NOTE_Bb, $80
wait QUAVER3
setFrequency NOTE_G, $80
wait QUAVER3
setFrequency NOTE_A, $80
wait QUAVER3
setFrequency NOTE_F, $80
wait QUAVER3
; 70
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_F, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_F, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIQUAVER
setFrequency NOTE_F, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait SEMIQUAVER
setFrequency NOTE_D * 2, $80
wait SEMIQUAVER
setFrequency NOTE_F * 2, $80
wait SEMIQUAVER
setFrequency NOTE_G * 2, $80
wait QUAVER
setFrequency NOTE_A * 2, $80
wait QUAVER
setFrequency NOTE_Bb * 2, $80
wait SEMIQUAVER
setFrequency NOTE_D * 4, $80
wait SEMIQUAVER
setFrequency NOTE_Bb * 2, $80
wait SEMIQUAVER
setFrequency NOTE_A * 2, $80
wait SEMIQUAVER
setFrequency NOTE_F * 2, $80
wait SEMIQUAVER
setFrequency NOTE_E * 2, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait QUAVER
setFrequency NOTE_E * 2, $80
wait QUAVER
setFrequency NOTE_G * 2, $80
wait SEMIQUAVER
setFrequency NOTE_A * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb * 2, $80
wait SEMIQUAVER
setFrequency NOTE_C * 4, $80
wait SEMIQUAVER
setFrequency NOTE_Bb * 2, $80
wait SEMIQUAVER
setFrequency NOTE_A * 2, $80
wait SEMIQUAVER
setFrequency NOTE_G * 2, $80
wait SEMIQUAVER
setFrequency NOTE_F * 2, $80
wait SEMIQUAVER
setFrequency NOTE_G * 2, $80
wait SEMIQUAVER
setFrequency NOTE_F * 2, $80
wait SEMIQUAVER
setFrequency NOTE_D * 2, $80
wait SEMIQUAVER
setFrequency NOTE_G * 2, $80
wait SEMIQUAVER
setFrequency NOTE_F * 2, $80
wait SEMIQUAVER
setFrequency NOTE_D * 2, $80
wait SEMIQUAVER
setFrequency NOTE_G * 2, $80
wait QUAVER
setFrequency NOTE_D * 4, $80
wait SEMIQUAVER
setFrequency NOTE_C * 4, $80
wait SEMIQUAVER
setFrequency NOTE_Bb * 2, $80
wait SEMIQUAVER
setFrequency NOTE_D * 4, $80
wait SEMIQUAVER
setFrequency NOTE_C * 4, $80
wait QUAVER
setFrequency NOTE_A * 2, $80
wait QUAVER
setFrequency NOTE_G / 2, $80
wait SEMIQUAVER
setFrequency NOTE_A / 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb / 2, $80
wait SEMIQUAVER
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_A / 2, $80
wait SEMIQUAVER
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_F, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait SEMIQUAVER
setFrequency NOTE_D * 2, $80
wait SEMIQUAVER
stopMusic
jump .loop |
source/amf/uml/amf-internals-factories-standard_profile_l2_factories.ads | svn2github/matreshka | 24 | 12873 | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012, <NAME> <<EMAIL>> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.CMOF.Associations;
with AMF.CMOF.Classes;
with AMF.CMOF.Data_Types;
with AMF.Factories.Standard_Profile_L2_Factories;
with AMF.Links;
with AMF.Standard_Profile_L2.Auxiliaries;
with AMF.Standard_Profile_L2.Calls;
with AMF.Standard_Profile_L2.Creates;
with AMF.Standard_Profile_L2.Derives;
with AMF.Standard_Profile_L2.Destroies;
with AMF.Standard_Profile_L2.Documents;
with AMF.Standard_Profile_L2.Entities;
with AMF.Standard_Profile_L2.Executables;
with AMF.Standard_Profile_L2.Focuses;
with AMF.Standard_Profile_L2.Frameworks;
with AMF.Standard_Profile_L2.Implementation_Classes;
with AMF.Standard_Profile_L2.Implements;
with AMF.Standard_Profile_L2.Instantiates;
with AMF.Standard_Profile_L2.Libraries;
with AMF.Standard_Profile_L2.Metaclasses;
with AMF.Standard_Profile_L2.Model_Libraries;
with AMF.Standard_Profile_L2.Processes;
with AMF.Standard_Profile_L2.Realizations;
with AMF.Standard_Profile_L2.Refines;
with AMF.Standard_Profile_L2.Responsibilities;
with AMF.Standard_Profile_L2.Scripts;
with AMF.Standard_Profile_L2.Sends;
with AMF.Standard_Profile_L2.Services;
with AMF.Standard_Profile_L2.Sources;
with AMF.Standard_Profile_L2.Specifications;
with AMF.Standard_Profile_L2.Subsystems;
with AMF.Standard_Profile_L2.Traces;
with AMF.Standard_Profile_L2.Types;
with AMF.Standard_Profile_L2.Utilities;
with League.Holders;
package AMF.Internals.Factories.Standard_Profile_L2_Factories is
type Standard_Profile_L2_Factory is
limited new AMF.Internals.Factories.Metamodel_Factory_Base
and AMF.Factories.Standard_Profile_L2_Factories.Standard_Profile_L2_Factory with null record;
overriding function Convert_To_String
(Self : not null access Standard_Profile_L2_Factory;
Data_Type : not null access AMF.CMOF.Data_Types.CMOF_Data_Type'Class;
Value : League.Holders.Holder) return League.Strings.Universal_String;
overriding function Create
(Self : not null access Standard_Profile_L2_Factory;
Meta_Class : not null access AMF.CMOF.Classes.CMOF_Class'Class)
return not null AMF.Elements.Element_Access;
overriding function Create_From_String
(Self : not null access Standard_Profile_L2_Factory;
Data_Type : not null access AMF.CMOF.Data_Types.CMOF_Data_Type'Class;
Image : League.Strings.Universal_String) return League.Holders.Holder;
overriding function Create_Link
(Self : not null access Standard_Profile_L2_Factory;
Association :
not null access AMF.CMOF.Associations.CMOF_Association'Class;
First_Element : not null AMF.Elements.Element_Access;
Second_Element : not null AMF.Elements.Element_Access)
return not null AMF.Links.Link_Access;
overriding function Get_Package
(Self : not null access constant Standard_Profile_L2_Factory)
return AMF.CMOF.Packages.Collections.Set_Of_CMOF_Package;
function Constructor
(Extent : AMF.Internals.AMF_Extent)
return not null AMF.Factories.Factory_Access;
function Get_Package return not null AMF.CMOF.Packages.CMOF_Package_Access;
function Create_Auxiliary
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Auxiliaries.Standard_Profile_L2_Auxiliary_Access;
function Create_Call
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Calls.Standard_Profile_L2_Call_Access;
function Create_Create
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Creates.Standard_Profile_L2_Create_Access;
function Create_Derive
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Derives.Standard_Profile_L2_Derive_Access;
function Create_Destroy
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Destroies.Standard_Profile_L2_Destroy_Access;
function Create_Document
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Documents.Standard_Profile_L2_Document_Access;
function Create_Entity
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Entities.Standard_Profile_L2_Entity_Access;
function Create_Executable
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Executables.Standard_Profile_L2_Executable_Access;
function Create_Focus
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Focuses.Standard_Profile_L2_Focus_Access;
function Create_Framework
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Frameworks.Standard_Profile_L2_Framework_Access;
function Create_Implement
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Implements.Standard_Profile_L2_Implement_Access;
function Create_Implementation_Class
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Implementation_Classes.Standard_Profile_L2_Implementation_Class_Access;
function Create_Instantiate
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Instantiates.Standard_Profile_L2_Instantiate_Access;
function Create_Library
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Libraries.Standard_Profile_L2_Library_Access;
function Create_Metaclass
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Metaclasses.Standard_Profile_L2_Metaclass_Access;
function Create_Model_Library
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Model_Libraries.Standard_Profile_L2_Model_Library_Access;
function Create_Process
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Processes.Standard_Profile_L2_Process_Access;
function Create_Realization
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Realizations.Standard_Profile_L2_Realization_Access;
function Create_Refine
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Refines.Standard_Profile_L2_Refine_Access;
function Create_Responsibility
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Responsibilities.Standard_Profile_L2_Responsibility_Access;
function Create_Script
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Scripts.Standard_Profile_L2_Script_Access;
function Create_Send
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Sends.Standard_Profile_L2_Send_Access;
function Create_Service
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Services.Standard_Profile_L2_Service_Access;
function Create_Source
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Sources.Standard_Profile_L2_Source_Access;
function Create_Specification
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Specifications.Standard_Profile_L2_Specification_Access;
function Create_Subsystem
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Subsystems.Standard_Profile_L2_Subsystem_Access;
function Create_Trace
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Traces.Standard_Profile_L2_Trace_Access;
function Create_Type
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Types.Standard_Profile_L2_Type_Access;
function Create_Utility
(Self : not null access Standard_Profile_L2_Factory)
return AMF.Standard_Profile_L2.Utilities.Standard_Profile_L2_Utility_Access;
end AMF.Internals.Factories.Standard_Profile_L2_Factories;
|
Transynther/x86/_processed/NONE/_st_zr_/i3-7100_9_0xca_notsx.log_1052_1906.asm | ljhsiun2/medusa | 9 | 29174 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r14
push %r8
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_normal_ht+0x19299, %r14
and $31258, %r8
vmovups (%r14), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $0, %xmm5, %rdx
nop
nop
nop
nop
nop
dec %r10
lea addresses_WC_ht+0x1eb19, %rsi
lea addresses_UC_ht+0x8b19, %rdi
cmp $17004, %r14
mov $56, %rcx
rep movsl
add $61430, %rdi
lea addresses_WT_ht+0x15319, %rsi
nop
nop
nop
nop
nop
add $44301, %rdx
movl $0x61626364, (%rsi)
sub %rdx, %rdx
lea addresses_UC_ht+0x379, %rdi
and %r8, %r8
movb (%rdi), %dl
nop
nop
nop
add $19176, %rdx
lea addresses_normal_ht+0x1a259, %r14
clflush (%r14)
nop
nop
nop
nop
dec %r8
movb $0x61, (%r14)
nop
nop
nop
nop
nop
inc %rdi
lea addresses_WC_ht+0x189b9, %rdi
nop
nop
xor $52045, %rdx
movb (%rdi), %r14b
nop
nop
cmp $57787, %r14
lea addresses_UC_ht+0x189b9, %rcx
nop
nop
nop
nop
and %r10, %r10
mov (%rcx), %r8d
cmp %rdx, %rdx
lea addresses_D_ht+0x59d9, %rsi
nop
dec %r8
mov $0x6162636465666768, %r10
movq %r10, (%rsi)
nop
nop
nop
nop
add $60037, %rdx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r8
pop %r14
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r13
push %r14
push %rbp
push %rcx
push %rdi
push %rsi
// Store
lea addresses_UC+0xcb19, %r13
nop
nop
nop
cmp %rbp, %rbp
movw $0x5152, (%r13)
dec %r10
// Store
lea addresses_WC+0x9319, %rdi
and $40604, %rsi
mov $0x5152535455565758, %rcx
movq %rcx, %xmm0
vmovups %ymm0, (%rdi)
nop
nop
nop
inc %r13
// Store
lea addresses_RW+0x17e99, %r14
nop
nop
nop
nop
add %rdi, %rdi
mov $0x5152535455565758, %r13
movq %r13, %xmm6
vmovups %ymm6, (%r14)
nop
nop
nop
xor %rdi, %rdi
// Load
mov $0xa89, %rbp
nop
nop
nop
nop
sub $30862, %r13
movups (%rbp), %xmm0
vpextrq $1, %xmm0, %rdi
xor %rbp, %rbp
// Store
lea addresses_RW+0x1fa99, %rcx
clflush (%rcx)
nop
nop
nop
nop
dec %r14
movl $0x51525354, (%rcx)
and $32734, %r13
// Store
lea addresses_US+0x159b9, %r13
nop
nop
nop
cmp $18077, %rbp
mov $0x5152535455565758, %rsi
movq %rsi, %xmm0
vmovups %ymm0, (%r13)
nop
and %r10, %r10
// Faulty Load
lea addresses_A+0xbb19, %rsi
dec %rbp
movb (%rsi), %r10b
lea oracles, %rcx
and $0xff, %r10
shlq $12, %r10
mov (%rcx,%r10,1), %r10
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r14
pop %r13
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_A', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 10, 'NT': False, 'type': 'addresses_UC', 'size': 2, 'AVXalign': True}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 11, 'NT': False, 'type': 'addresses_WC', 'size': 32, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_RW', 'size': 32, 'AVXalign': False}}
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_P', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_RW', 'size': 4, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_US', 'size': 32, 'AVXalign': False}}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_A', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_normal_ht', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 11, 'NT': False, 'type': 'addresses_WT_ht', 'size': 4, 'AVXalign': False}}
{'src': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_UC_ht', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': False}}
{'src': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_WC_ht', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_D_ht', 'size': 8, 'AVXalign': True}}
{'00': 897, '52': 155}
00 00 52 52 52 52 00 52 52 52 52 00 00 52 52 52 52 00 00 52 52 00 52 52 52 52 52 52 52 52 52 00 52 52 00 52 00 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 00 00 00 00 00 00 00 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 00 00 00 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 52 00 00 00 52 00 00 00 00 52 00 00 00 00 00 00 52 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 52 52 00 00 52 00 00 52 00 52 52 52 52 52 00 00 52 52 52 52 00 00 52 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52 52 00 00 00 00 00 00 52 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 00 52 00 52 00 00 00 00 00 52 52 00 52 52 52 52 52 52 52 52 00 52 00 52 52 52 00 00 00 00 52 52 52 52 00 00 00 00 00 00 00 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 00 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 00 00 00 00 00 00 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 52 00 00 00 00 00 00 00 52 00 00 00 00 00 00 00 00 52 00 00 00 00 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 00 00 00 00 52 52 00 00 00 00 00 52 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 00 00 00 00 52 00 00 00 52 52 52 00 00 00 00 00 00 00 52 00 00 52 52 52 00 00 00 00 52 52 52 00 52 52 52 00 00 00 52 00 52 52 52 52 52 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 00 00 00 00 00 00 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 00 00 00 00 00 00 00 00 00 52 00 00 52 52 00 00 52 52 52 52 52 00 00 52 52 52 00 52 52 52 52 52 52 52 52 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
src/create_reminder.applescript | gjvis/alfred-apple-reminders | 1 | 3692 | on alfred_script(query)
tell application "System Events" to set running_count to count (every process whose name is "Reminders")
tell application "Reminders" to make new reminder with properties { name: query }
if running_count < 1 then
tell application "Reminders" to quit
else
tell application "Reminders" to activate
end if
end alfred_script
|
PRG/maps/World1S.asm | narfman0/smb3_pp1 | 0 | 101782 | ; WARNING: Autogenerated file! Do not put extra data here; editor will not preserve it!
W1_InitIndex: .byte $00, (W1_ByRowType_S2 - W1_ByRowType), (W1_ByRowType_S3 - W1_ByRowType), (W1_ByRowType_S4 - W1_ByRowType)
W1_ByRowType: .byte $44, $63
W1_ByRowType_S2:
W1_ByRowType_S3:
W1_ByRowType_S4:
W1_ByScrCol: .byte $02, $04
W1_ByScrCol_S2:
W1_ByScrCol_S3:
W1_ByScrCol_S4:
W1_ObjSets: .word W1UNO, W403_UnderO
W1_ObjSets_S2:
W1_ObjSets_S3:
W1_ObjSets_S4:
W1_LevelLayout: .word W1UNL, W403_UnderL
W1_LevelLayout_S2:
W1_LevelLayout_S3:
W1_LevelLayout_S4:
|
Transynther/x86/_processed/NC/_st_sm_/i7-7700_9_0xca_notsx.log_5_131.asm | ljhsiun2/medusa | 9 | 92417 | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r13
push %r8
push %r9
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x89ae, %r13
nop
nop
nop
nop
cmp %r9, %r9
vmovups (%r13), %ymm3
vextracti128 $1, %ymm3, %xmm3
vpextrq $1, %xmm3, %rax
nop
add $30982, %r8
lea addresses_A_ht+0xc78, %rsi
lea addresses_WC_ht+0x1765b, %rdi
nop
nop
sub %r12, %r12
mov $126, %rcx
rep movsq
nop
nop
sub %rsi, %rsi
lea addresses_A_ht+0x5d4c, %r9
nop
nop
nop
nop
nop
dec %r12
vmovups (%r9), %ymm7
vextracti128 $1, %ymm7, %xmm7
vpextrq $1, %xmm7, %rax
nop
and $41249, %rsi
lea addresses_UC_ht+0x4058, %rsi
lea addresses_UC_ht+0x1ddb8, %rdi
nop
nop
sub $55306, %r13
mov $68, %rcx
rep movsq
nop
nop
nop
nop
nop
cmp $43382, %r9
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r8
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r14
push %r15
push %r8
push %rbp
push %rbx
push %rcx
push %rdx
// Store
mov $0x498, %rcx
sub $29994, %r14
mov $0x5152535455565758, %rbp
movq %rbp, %xmm0
movaps %xmm0, (%rcx)
nop
nop
nop
nop
nop
xor %rcx, %rcx
// Store
lea addresses_UC+0x10c78, %rcx
xor $37000, %rbp
movw $0x5152, (%rcx)
nop
nop
nop
nop
cmp %r14, %r14
// Store
lea addresses_WC+0xd818, %r15
nop
nop
sub %rbx, %rbx
mov $0x5152535455565758, %r14
movq %r14, %xmm4
vmovups %ymm4, (%r15)
nop
nop
nop
nop
nop
inc %r14
// Store
mov $0x6634500000000cf8, %r14
nop
cmp %rbp, %rbp
mov $0x5152535455565758, %r8
movq %r8, %xmm1
vmovups %ymm1, (%r14)
nop
nop
and $17522, %rcx
// Load
lea addresses_US+0x124f8, %rdx
nop
nop
nop
nop
sub %r8, %r8
movb (%rdx), %cl
nop
nop
nop
nop
xor $7880, %rcx
// Load
lea addresses_WC+0x1e4f8, %r8
and %r14, %r14
mov (%r8), %bx
nop
nop
nop
sub $55358, %rbp
// Faulty Load
mov $0x6634500000000cf8, %r15
nop
nop
nop
nop
add $1685, %r8
mov (%r15), %edx
lea oracles, %rcx
and $0xff, %rdx
shlq $12, %rdx
mov (%rcx,%rdx,1), %rdx
pop %rdx
pop %rcx
pop %rbx
pop %rbp
pop %r8
pop %r15
pop %r14
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': True, 'size': 16, 'congruent': 4, 'same': False, 'type': 'addresses_P'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 6, 'same': False, 'type': 'addresses_UC'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 5, 'same': False, 'type': 'addresses_WC'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': True, 'type': 'addresses_NC'}, 'OP': 'STOR'}
{'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 11, 'same': False, 'type': 'addresses_US'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 10, 'same': False, 'type': 'addresses_WC'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': True, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 7, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 5, 'same': True, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 5, 'same': True, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'}
{'58': 5}
58 58 58 58 58
*/
|
src/svm_defines_h.ads | JeremyGrosser/arm_cmsis_dsp | 0 | 18160 | <gh_stars>0
pragma Ada_2012;
pragma Style_Checks (Off);
pragma Warnings ("U");
with Interfaces.C; use Interfaces.C;
package svm_defines_h is
type arm_ml_kernel_type is
(ARM_ML_KERNEL_LINEAR,
ARM_ML_KERNEL_POLYNOMIAL,
ARM_ML_KERNEL_RBF,
ARM_ML_KERNEL_SIGMOID)
with Convention => C; -- ../CMSIS_5/CMSIS/DSP/Include/dsp/svm_defines.h:44
end svm_defines_h;
|
Userland/SampleCodeModule/asm/selfLib.asm | imanfredi/TP2-SO | 0 | 20488 | <filename>Userland/SampleCodeModule/asm/selfLib.asm
GLOBAL getChar
GLOBAL printString
GLOBAL putChar
GLOBAL clear
GLOBAL printError
GLOBAL nextScreen
GLOBAL needScreen
GLOBAL initVisualEnvironment
GLOBAL addNewProcess
GLOBAL getSecondsElapsed
GLOBAL getPid
GLOBAL free2
GLOBAL malloc2
GLOBAL sem_open
GLOBAL sem_close
GLOBAL sem_wait
GLOBAL sem_post
GLOBAL semInfo
GLOBAL memInfo
GLOBAL changeValue
GLOBAL pipeOpen
GLOBAL closePipe
GLOBAL writeInPipe
GLOBAL waitPid
extern strlen
getChar:
push rbp
mov rbp,rsp
mov rax,0 ;para leer el buffer
int 80h
mov rsp,rbp
pop rbp
ret
;Recibo en rdi el puntero al string
printString:
push rbp
mov rbp,rsp
push rsi
push rdx
push rdi
call strlen
mov rdx,rax
mov rax,1
mov rsi,rdi
mov rdi,1
int 80h
pop rdi
pop rdx
pop rsi
mov rsp,rbp
pop rbp
ret
printError:
push rbp
mov rbp,rsp
push rsi
push rdx
push rdi
call strlen
mov rdx,rax
mov rax,1
mov rsi,rdi
mov rdi,2
int 80h
pop rdi
pop rdx
pop rsi
mov rsp,rbp
pop rbp
ret
putChar:
push rbp
mov rbp,rsp
push rdi
push rsi
push rdx
mov [buffer],rdi ;muevo la letra que quiero escribir a un buffer
mov rax,1 ;muevo a 1 porque es la syscall de write
mov rdi,1 ;salida estandar
mov rsi, buffer ;recibe en rsi, el buffer
mov rdx, 1 ; quiero escribir solo un byte
int 80h
pop rdx
pop rsi
pop rdi
mov rsp,rbp
pop rbp
ret
clear:
push rbp
mov rbp,rsp
push rax
mov rax,2
int 80h
pop rax
mov rsp,rbp
pop rbp
ret
;Recibo en rdi la pantalla a la que quiero acceder y envio en rdi la pantalla que quiero acceder
nextScreen:
push rbp
mov rbp,rsp
push rax
push rdi
mov rax,3
int 80h
pop rdi
pop rax
mov rsp,rbp
pop rbp
ret
needScreen:
push rbp
mov rbp,rsp
mov rax,10
int 80h
mov rsp,rbp
pop rbp
ret
initVisualEnvironment:
push rbp
mov rbp,rsp
mov rax,11
int 80h
mov rsp,rbp
pop rbp
ret
addNewProcess:
push rbp
mov rbp,rsp
mov rax,12
int 80h
mov rsp,rbp
pop rbp
ret
getSecondsElapsed:
push rbp
mov rbp,rsp
mov rax,17
int 80h
mov rsp,rbp
pop rbp
ret
getPid:
push rbp
mov rbp,rsp
mov rax,18
int 80h
mov rsp,rbp
pop rbp
ret
malloc2:
push rbp
mov rbp,rsp
mov rax,20
int 80h
mov rsp,rbp
pop rbp
ret
free2:
push rbp
mov rbp,rsp
mov rax,21
int 80h
mov rsp,rbp
pop rbp
ret
sem_open:
push rbp
mov rbp,rsp
mov rax,22
int 80h
mov rsp,rbp
pop rbp
ret
sem_close:
push rbp
mov rbp,rsp
mov rax,23
int 80h
mov rsp,rbp
pop rbp
ret
sem_post:
push rbp
mov rbp,rsp
mov rax,24
int 80h
mov rsp,rbp
pop rbp
ret
sem_wait:
push rbp
mov rbp,rsp
mov rax,25
int 80h
mov rsp,rbp
pop rbp
ret
semInfo:
push rbp
mov rbp,rsp
mov rax,26
int 80h
mov rsp,rbp
pop rbp
ret
memInfo:
push rbp
mov rbp,rsp
mov rax,27
int 80h
mov rsp,rbp
pop rbp
ret
changeValue:
push rbp
mov rbp,rsp
mov rax,28
int 80h
mov rsp,rbp
pop rbp
ret
pipeOpen:
push rbp
mov rbp,rsp
mov rax,29
int 80h
mov rsp,rbp
pop rbp
ret
closePipe:
push rbp
mov rbp,rsp
mov rax,30
int 80h
mov rsp,rbp
pop rbp
ret
writeInPipe:
push rbp
mov rbp,rsp
mov rax,31
int 80h
mov rsp,rbp
pop rbp
ret
waitPid:
push rbp
mov rbp,rsp
mov rax,32
int 80h
mov rsp,rbp
pop rbp
ret
section .bss
buffer resb 2 |
src/gnat/prj-proc.adb | Letractively/ada-gen | 0 | 21296 | <filename>src/gnat/prj-proc.adb
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- P R J . P R O C --
-- --
-- B o d y --
-- --
-- Copyright (C) 2001-2010, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING3. If not, go to --
-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Err_Vars; use Err_Vars;
with Opt; use Opt;
with Osint; use Osint;
with Output; use Output;
with Prj.Attr; use Prj.Attr;
with Prj.Err; use Prj.Err;
with Prj.Ext; use Prj.Ext;
with Prj.Nmsc; use Prj.Nmsc;
with Snames;
with Ada.Strings.Fixed; use Ada.Strings.Fixed;
with GNAT.Case_Util; use GNAT.Case_Util;
with GNAT.HTable;
package body Prj.Proc is
package Processed_Projects is new GNAT.HTable.Simple_HTable
(Header_Num => Header_Num,
Element => Project_Id,
No_Element => No_Project,
Key => Name_Id,
Hash => Hash,
Equal => "=");
-- This hash table contains all processed projects
package Unit_Htable is new GNAT.HTable.Simple_HTable
(Header_Num => Header_Num,
Element => Source_Id,
No_Element => No_Source,
Key => Name_Id,
Hash => Hash,
Equal => "=");
-- This hash table contains all processed projects
procedure Add (To_Exp : in out Name_Id; Str : Name_Id);
-- Concatenate two strings and returns another string if both
-- arguments are not null string.
-- In the following procedures, we are expected to guess the meaning of
-- the parameters from their names, this is never a good idea, comments
-- should be added precisely defining every formal ???
procedure Add_Attributes
(Project : Project_Id;
Project_Name : Name_Id;
Project_Dir : Name_Id;
In_Tree : Project_Tree_Ref;
Decl : in out Declarations;
First : Attribute_Node_Id;
Project_Level : Boolean);
-- Add all attributes, starting with First, with their default values to
-- the package or project with declarations Decl.
procedure Check
(In_Tree : Project_Tree_Ref;
Project : Project_Id;
Node_Tree : Prj.Tree.Project_Node_Tree_Ref;
Flags : Processing_Flags);
-- Set all projects to not checked, then call Recursive_Check for the
-- main project Project. Project is set to No_Project if errors occurred.
-- Current_Dir is for optimization purposes, avoiding extra system calls.
-- If Allow_Duplicate_Basenames, then files with the same base names are
-- authorized within a project for source-based languages (never for unit
-- based languages)
procedure Copy_Package_Declarations
(From : Declarations;
To : in out Declarations;
New_Loc : Source_Ptr;
Restricted : Boolean;
In_Tree : Project_Tree_Ref);
-- Copy a package declaration From to To for a renamed package. Change the
-- locations of all the attributes to New_Loc. When Restricted is
-- True, do not copy attributes Body, Spec, Implementation, Specification
-- and Linker_Options.
function Expression
(Project : Project_Id;
In_Tree : Project_Tree_Ref;
Flags : Processing_Flags;
From_Project_Node : Project_Node_Id;
From_Project_Node_Tree : Project_Node_Tree_Ref;
Pkg : Package_Id;
First_Term : Project_Node_Id;
Kind : Variable_Kind) return Variable_Value;
-- From N_Expression project node From_Project_Node, compute the value
-- of an expression and return it as a Variable_Value.
function Imported_Or_Extended_Project_From
(Project : Project_Id;
With_Name : Name_Id) return Project_Id;
-- Find an imported or extended project of Project whose name is With_Name
function Package_From
(Project : Project_Id;
In_Tree : Project_Tree_Ref;
With_Name : Name_Id) return Package_Id;
-- Find the package of Project whose name is With_Name
procedure Process_Declarative_Items
(Project : Project_Id;
In_Tree : Project_Tree_Ref;
Flags : Processing_Flags;
From_Project_Node : Project_Node_Id;
From_Project_Node_Tree : Project_Node_Tree_Ref;
Pkg : Package_Id;
Item : Project_Node_Id);
-- Process declarative items starting with From_Project_Node, and put them
-- in declarations Decl. This is a recursive procedure; it calls itself for
-- a package declaration or a case construction.
procedure Recursive_Process
(In_Tree : Project_Tree_Ref;
Project : out Project_Id;
Flags : Processing_Flags;
From_Project_Node : Project_Node_Id;
From_Project_Node_Tree : Project_Node_Tree_Ref;
Extended_By : Project_Id);
-- Process project with node From_Project_Node in the tree. Do nothing if
-- From_Project_Node is Empty_Node. If project has already been processed,
-- simply return its project id. Otherwise create a new project id, mark it
-- as processed, call itself recursively for all imported projects and a
-- extended project, if any. Then process the declarative items of the
-- project.
function Get_Attribute_Index
(Tree : Project_Node_Tree_Ref;
Attr : Project_Node_Id;
Index : Name_Id) return Name_Id;
-- Copy the index of the attribute into Name_Buffer, converting to lower
-- case if the attribute is case-insensitive.
---------
-- Add --
---------
procedure Add (To_Exp : in out Name_Id; Str : Name_Id) is
begin
if To_Exp = No_Name or else To_Exp = Empty_String then
-- To_Exp is nil or empty. The result is Str
To_Exp := Str;
-- If Str is nil, then do not change To_Ext
elsif Str /= No_Name and then Str /= Empty_String then
declare
S : constant String := Get_Name_String (Str);
begin
Get_Name_String (To_Exp);
Add_Str_To_Name_Buffer (S);
To_Exp := Name_Find;
end;
end if;
end Add;
--------------------
-- Add_Attributes --
--------------------
procedure Add_Attributes
(Project : Project_Id;
Project_Name : Name_Id;
Project_Dir : Name_Id;
In_Tree : Project_Tree_Ref;
Decl : in out Declarations;
First : Attribute_Node_Id;
Project_Level : Boolean)
is
The_Attribute : Attribute_Node_Id := First;
begin
while The_Attribute /= Empty_Attribute loop
if Attribute_Kind_Of (The_Attribute) = Single then
declare
New_Attribute : Variable_Value;
begin
case Variable_Kind_Of (The_Attribute) is
-- Undefined should not happen
when Undefined =>
pragma Assert
(False, "attribute with an undefined kind");
raise Program_Error;
-- Single attributes have a default value of empty string
when Single =>
New_Attribute :=
(Project => Project,
Kind => Single,
Location => No_Location,
Default => True,
Value => Empty_String,
Index => 0);
-- Special cases of <project>'Name and
-- <project>'Project_Dir.
if Project_Level then
if Attribute_Name_Of (The_Attribute) =
Snames.Name_Name
then
New_Attribute.Value := Project_Name;
elsif Attribute_Name_Of (The_Attribute) =
Snames.Name_Project_Dir
then
New_Attribute.Value := Project_Dir;
end if;
end if;
-- List attributes have a default value of nil list
when List =>
New_Attribute :=
(Project => Project,
Kind => List,
Location => No_Location,
Default => True,
Values => Nil_String);
end case;
Variable_Element_Table.Increment_Last
(In_Tree.Variable_Elements);
In_Tree.Variable_Elements.Table
(Variable_Element_Table.Last
(In_Tree.Variable_Elements)) :=
(Next => Decl.Attributes,
Name => Attribute_Name_Of (The_Attribute),
Value => New_Attribute);
Decl.Attributes := Variable_Element_Table.Last
(In_Tree.Variable_Elements);
end;
end if;
The_Attribute := Next_Attribute (After => The_Attribute);
end loop;
end Add_Attributes;
-----------
-- Check --
-----------
procedure Check
(In_Tree : Project_Tree_Ref;
Project : Project_Id;
Node_Tree : Prj.Tree.Project_Node_Tree_Ref;
Flags : Processing_Flags)
is
begin
Process_Naming_Scheme (In_Tree, Project, Node_Tree, Flags);
-- Set the Other_Part field for the units
declare
Source1 : Source_Id;
Name : Name_Id;
Source2 : Source_Id;
Iter : Source_Iterator;
begin
Unit_Htable.Reset;
Iter := For_Each_Source (In_Tree);
loop
Source1 := Prj.Element (Iter);
exit when Source1 = No_Source;
if Source1.Unit /= No_Unit_Index then
Name := Source1.Unit.Name;
Source2 := Unit_Htable.Get (Name);
if Source2 = No_Source then
Unit_Htable.Set (K => Name, E => Source1);
else
Unit_Htable.Remove (Name);
end if;
end if;
Next (Iter);
end loop;
end;
end Check;
-------------------------------
-- Copy_Package_Declarations --
-------------------------------
procedure Copy_Package_Declarations
(From : Declarations;
To : in out Declarations;
New_Loc : Source_Ptr;
Restricted : Boolean;
In_Tree : Project_Tree_Ref)
is
V1 : Variable_Id;
V2 : Variable_Id := No_Variable;
Var : Variable;
A1 : Array_Id;
A2 : Array_Id := No_Array;
Arr : Array_Data;
E1 : Array_Element_Id;
E2 : Array_Element_Id := No_Array_Element;
Elm : Array_Element;
begin
-- To avoid references in error messages to attribute declarations in
-- an original package that has been renamed, copy all the attribute
-- declarations of the package and change all locations to New_Loc,
-- the location of the renamed package.
-- First single attributes
V1 := From.Attributes;
while V1 /= No_Variable loop
-- Copy the attribute
Var := In_Tree.Variable_Elements.Table (V1);
V1 := Var.Next;
-- Do not copy the value of attribute Linker_Options if Restricted
if Restricted and then Var.Name = Snames.Name_Linker_Options then
Var.Value.Values := Nil_String;
end if;
-- Remove the Next component
Var.Next := No_Variable;
-- Change the location to New_Loc
Var.Value.Location := New_Loc;
Variable_Element_Table.Increment_Last (In_Tree.Variable_Elements);
-- Put in new declaration
if To.Attributes = No_Variable then
To.Attributes :=
Variable_Element_Table.Last (In_Tree.Variable_Elements);
else
In_Tree.Variable_Elements.Table (V2).Next :=
Variable_Element_Table.Last (In_Tree.Variable_Elements);
end if;
V2 := Variable_Element_Table.Last (In_Tree.Variable_Elements);
In_Tree.Variable_Elements.Table (V2) := Var;
end loop;
-- Then the associated array attributes
A1 := From.Arrays;
while A1 /= No_Array loop
Arr := In_Tree.Arrays.Table (A1);
A1 := Arr.Next;
if not Restricted
or else
(Arr.Name /= Snames.Name_Body and then
Arr.Name /= Snames.Name_Spec and then
Arr.Name /= Snames.Name_Implementation and then
Arr.Name /= Snames.Name_Specification)
then
-- Remove the Next component
Arr.Next := No_Array;
Array_Table.Increment_Last (In_Tree.Arrays);
-- Create new Array declaration
if To.Arrays = No_Array then
To.Arrays := Array_Table.Last (In_Tree.Arrays);
else
In_Tree.Arrays.Table (A2).Next :=
Array_Table.Last (In_Tree.Arrays);
end if;
A2 := Array_Table.Last (In_Tree.Arrays);
-- Don't store the array as its first element has not been set yet
-- Copy the array elements of the array
E1 := Arr.Value;
Arr.Value := No_Array_Element;
while E1 /= No_Array_Element loop
-- Copy the array element
Elm := In_Tree.Array_Elements.Table (E1);
E1 := Elm.Next;
-- Remove the Next component
Elm.Next := No_Array_Element;
-- Change the location
Elm.Value.Location := New_Loc;
Array_Element_Table.Increment_Last (In_Tree.Array_Elements);
-- Create new array element
if Arr.Value = No_Array_Element then
Arr.Value :=
Array_Element_Table.Last (In_Tree.Array_Elements);
else
In_Tree.Array_Elements.Table (E2).Next :=
Array_Element_Table.Last (In_Tree.Array_Elements);
end if;
E2 := Array_Element_Table.Last (In_Tree.Array_Elements);
In_Tree.Array_Elements.Table (E2) := Elm;
end loop;
-- Finally, store the new array
In_Tree.Arrays.Table (A2) := Arr;
end if;
end loop;
end Copy_Package_Declarations;
-------------------------
-- Get_Attribute_Index --
-------------------------
function Get_Attribute_Index
(Tree : Project_Node_Tree_Ref;
Attr : Project_Node_Id;
Index : Name_Id) return Name_Id
is
Lower : Boolean;
begin
if Index = All_Other_Names then
return Index;
end if;
Get_Name_String (Index);
Lower := Case_Insensitive (Attr, Tree);
-- The index is always case insensitive if it does not include any dot.
-- ??? Why not use the properties from prj-attr, simply, maybe because
-- we don't know whether we have a file as an index?
if not Lower then
Lower := True;
for J in 1 .. Name_Len loop
if Name_Buffer (J) = '.' then
Lower := False;
exit;
end if;
end loop;
end if;
if Lower then
To_Lower (Name_Buffer (1 .. Name_Len));
return Name_Find;
else
return Index;
end if;
end Get_Attribute_Index;
----------------
-- Expression --
----------------
function Expression
(Project : Project_Id;
In_Tree : Project_Tree_Ref;
Flags : Processing_Flags;
From_Project_Node : Project_Node_Id;
From_Project_Node_Tree : Project_Node_Tree_Ref;
Pkg : Package_Id;
First_Term : Project_Node_Id;
Kind : Variable_Kind) return Variable_Value
is
The_Term : Project_Node_Id;
-- The term in the expression list
The_Current_Term : Project_Node_Id := Empty_Node;
-- The current term node id
Result : Variable_Value (Kind => Kind);
-- The returned result
Last : String_List_Id := Nil_String;
-- Reference to the last string elements in Result, when Kind is List
begin
Result.Project := Project;
Result.Location := Location_Of (First_Term, From_Project_Node_Tree);
-- Process each term of the expression, starting with First_Term
The_Term := First_Term;
while Present (The_Term) loop
The_Current_Term := Current_Term (The_Term, From_Project_Node_Tree);
case Kind_Of (The_Current_Term, From_Project_Node_Tree) is
when N_Literal_String =>
case Kind is
when Undefined =>
-- Should never happen
pragma Assert (False, "Undefined expression kind");
raise Program_Error;
when Single =>
Add (Result.Value,
String_Value_Of
(The_Current_Term, From_Project_Node_Tree));
Result.Index :=
Source_Index_Of
(The_Current_Term, From_Project_Node_Tree);
when List =>
String_Element_Table.Increment_Last
(In_Tree.String_Elements);
if Last = Nil_String then
-- This can happen in an expression like () & "toto"
Result.Values := String_Element_Table.Last
(In_Tree.String_Elements);
else
In_Tree.String_Elements.Table
(Last).Next := String_Element_Table.Last
(In_Tree.String_Elements);
end if;
Last := String_Element_Table.Last
(In_Tree.String_Elements);
In_Tree.String_Elements.Table (Last) :=
(Value => String_Value_Of
(The_Current_Term,
From_Project_Node_Tree),
Index => Source_Index_Of
(The_Current_Term,
From_Project_Node_Tree),
Display_Value => No_Name,
Location => Location_Of
(The_Current_Term,
From_Project_Node_Tree),
Flag => False,
Next => Nil_String);
end case;
when N_Literal_String_List =>
declare
String_Node : Project_Node_Id :=
First_Expression_In_List
(The_Current_Term,
From_Project_Node_Tree);
Value : Variable_Value;
begin
if Present (String_Node) then
-- If String_Node is nil, it is an empty list, there is
-- nothing to do
Value := Expression
(Project => Project,
In_Tree => In_Tree,
Flags => Flags,
From_Project_Node => From_Project_Node,
From_Project_Node_Tree => From_Project_Node_Tree,
Pkg => Pkg,
First_Term =>
Tree.First_Term
(String_Node, From_Project_Node_Tree),
Kind => Single);
String_Element_Table.Increment_Last
(In_Tree.String_Elements);
if Result.Values = Nil_String then
-- This literal string list is the first term in a
-- string list expression
Result.Values :=
String_Element_Table.Last (In_Tree.String_Elements);
else
In_Tree.String_Elements.Table
(Last).Next :=
String_Element_Table.Last (In_Tree.String_Elements);
end if;
Last :=
String_Element_Table.Last (In_Tree.String_Elements);
In_Tree.String_Elements.Table (Last) :=
(Value => Value.Value,
Display_Value => No_Name,
Location => Value.Location,
Flag => False,
Next => Nil_String,
Index => Value.Index);
loop
-- Add the other element of the literal string list
-- one after the other
String_Node :=
Next_Expression_In_List
(String_Node, From_Project_Node_Tree);
exit when No (String_Node);
Value :=
Expression
(Project => Project,
In_Tree => In_Tree,
Flags => Flags,
From_Project_Node => From_Project_Node,
From_Project_Node_Tree => From_Project_Node_Tree,
Pkg => Pkg,
First_Term =>
Tree.First_Term
(String_Node, From_Project_Node_Tree),
Kind => Single);
String_Element_Table.Increment_Last
(In_Tree.String_Elements);
In_Tree.String_Elements.Table
(Last).Next := String_Element_Table.Last
(In_Tree.String_Elements);
Last := String_Element_Table.Last
(In_Tree.String_Elements);
In_Tree.String_Elements.Table (Last) :=
(Value => Value.Value,
Display_Value => No_Name,
Location => Value.Location,
Flag => False,
Next => Nil_String,
Index => Value.Index);
end loop;
end if;
end;
when N_Variable_Reference | N_Attribute_Reference =>
declare
The_Project : Project_Id := Project;
The_Package : Package_Id := Pkg;
The_Name : Name_Id := No_Name;
The_Variable_Id : Variable_Id := No_Variable;
The_Variable : Variable_Value;
Term_Project : constant Project_Node_Id :=
Project_Node_Of
(The_Current_Term,
From_Project_Node_Tree);
Term_Package : constant Project_Node_Id :=
Package_Node_Of
(The_Current_Term,
From_Project_Node_Tree);
Index : Name_Id := No_Name;
begin
if Present (Term_Project) and then
Term_Project /= From_Project_Node
then
-- This variable or attribute comes from another project
The_Name :=
Name_Of (Term_Project, From_Project_Node_Tree);
The_Project := Imported_Or_Extended_Project_From
(Project => Project,
With_Name => The_Name);
end if;
if Present (Term_Package) then
-- This is an attribute of a package
The_Name :=
Name_Of (Term_Package, From_Project_Node_Tree);
The_Package := The_Project.Decl.Packages;
while The_Package /= No_Package
and then In_Tree.Packages.Table
(The_Package).Name /= The_Name
loop
The_Package :=
In_Tree.Packages.Table
(The_Package).Next;
end loop;
pragma Assert
(The_Package /= No_Package,
"package not found.");
elsif Kind_Of (The_Current_Term, From_Project_Node_Tree) =
N_Attribute_Reference
then
The_Package := No_Package;
end if;
The_Name :=
Name_Of (The_Current_Term, From_Project_Node_Tree);
if Kind_Of (The_Current_Term, From_Project_Node_Tree) =
N_Attribute_Reference
then
Index :=
Associative_Array_Index_Of
(The_Current_Term, From_Project_Node_Tree);
end if;
-- If it is not an associative array attribute
if Index = No_Name then
-- It is not an associative array attribute
if The_Package /= No_Package then
-- First, if there is a package, look into the package
if Kind_Of (The_Current_Term, From_Project_Node_Tree) =
N_Variable_Reference
then
The_Variable_Id :=
In_Tree.Packages.Table
(The_Package).Decl.Variables;
else
The_Variable_Id :=
In_Tree.Packages.Table
(The_Package).Decl.Attributes;
end if;
while The_Variable_Id /= No_Variable
and then
In_Tree.Variable_Elements.Table
(The_Variable_Id).Name /= The_Name
loop
The_Variable_Id :=
In_Tree.Variable_Elements.Table
(The_Variable_Id).Next;
end loop;
end if;
if The_Variable_Id = No_Variable then
-- If we have not found it, look into the project
if Kind_Of (The_Current_Term, From_Project_Node_Tree) =
N_Variable_Reference
then
The_Variable_Id := The_Project.Decl.Variables;
else
The_Variable_Id := The_Project.Decl.Attributes;
end if;
while The_Variable_Id /= No_Variable
and then
In_Tree.Variable_Elements.Table
(The_Variable_Id).Name /= The_Name
loop
The_Variable_Id :=
In_Tree.Variable_Elements.Table
(The_Variable_Id).Next;
end loop;
end if;
pragma Assert (The_Variable_Id /= No_Variable,
"variable or attribute not found");
The_Variable :=
In_Tree.Variable_Elements.Table
(The_Variable_Id).Value;
else
-- It is an associative array attribute
declare
The_Array : Array_Id := No_Array;
The_Element : Array_Element_Id := No_Array_Element;
Array_Index : Name_Id := No_Name;
begin
if The_Package /= No_Package then
The_Array :=
In_Tree.Packages.Table
(The_Package).Decl.Arrays;
else
The_Array := The_Project.Decl.Arrays;
end if;
while The_Array /= No_Array
and then In_Tree.Arrays.Table
(The_Array).Name /= The_Name
loop
The_Array := In_Tree.Arrays.Table
(The_Array).Next;
end loop;
if The_Array /= No_Array then
The_Element := In_Tree.Arrays.Table
(The_Array).Value;
Array_Index :=
Get_Attribute_Index
(From_Project_Node_Tree,
The_Current_Term,
Index);
while The_Element /= No_Array_Element
and then
In_Tree.Array_Elements.Table
(The_Element).Index /= Array_Index
loop
The_Element :=
In_Tree.Array_Elements.Table
(The_Element).Next;
end loop;
end if;
if The_Element /= No_Array_Element then
The_Variable :=
In_Tree.Array_Elements.Table
(The_Element).Value;
else
if Expression_Kind_Of
(The_Current_Term, From_Project_Node_Tree) =
List
then
The_Variable :=
(Project => Project,
Kind => List,
Location => No_Location,
Default => True,
Values => Nil_String);
else
The_Variable :=
(Project => Project,
Kind => Single,
Location => No_Location,
Default => True,
Value => Empty_String,
Index => 0);
end if;
end if;
end;
end if;
case Kind is
when Undefined =>
-- Should never happen
pragma Assert (False, "undefined expression kind");
null;
when Single =>
case The_Variable.Kind is
when Undefined =>
null;
when Single =>
Add (Result.Value, The_Variable.Value);
when List =>
-- Should never happen
pragma Assert
(False,
"list cannot appear in single " &
"string expression");
null;
end case;
when List =>
case The_Variable.Kind is
when Undefined =>
null;
when Single =>
String_Element_Table.Increment_Last
(In_Tree.String_Elements);
if Last = Nil_String then
-- This can happen in an expression such as
-- () & Var
Result.Values :=
String_Element_Table.Last
(In_Tree.String_Elements);
else
In_Tree.String_Elements.Table
(Last).Next :=
String_Element_Table.Last
(In_Tree.String_Elements);
end if;
Last :=
String_Element_Table.Last
(In_Tree.String_Elements);
In_Tree.String_Elements.Table (Last) :=
(Value => The_Variable.Value,
Display_Value => No_Name,
Location => Location_Of
(The_Current_Term,
From_Project_Node_Tree),
Flag => False,
Next => Nil_String,
Index => 0);
when List =>
declare
The_List : String_List_Id :=
The_Variable.Values;
begin
while The_List /= Nil_String loop
String_Element_Table.Increment_Last
(In_Tree.String_Elements);
if Last = Nil_String then
Result.Values :=
String_Element_Table.Last
(In_Tree.
String_Elements);
else
In_Tree.
String_Elements.Table (Last).Next :=
String_Element_Table.Last
(In_Tree.
String_Elements);
end if;
Last :=
String_Element_Table.Last
(In_Tree.String_Elements);
In_Tree.String_Elements.Table (Last) :=
(Value =>
In_Tree.String_Elements.Table
(The_List).Value,
Display_Value => No_Name,
Location =>
Location_Of
(The_Current_Term,
From_Project_Node_Tree),
Flag => False,
Next => Nil_String,
Index => 0);
The_List :=
In_Tree. String_Elements.Table
(The_List).Next;
end loop;
end;
end case;
end case;
end;
when N_External_Value =>
Get_Name_String
(String_Value_Of
(External_Reference_Of
(The_Current_Term, From_Project_Node_Tree),
From_Project_Node_Tree));
declare
Name : constant Name_Id := Name_Find;
Default : Name_Id := No_Name;
Value : Name_Id := No_Name;
Ext_List : Boolean := False;
Str_List : String_List_Access := null;
Def_Var : Variable_Value;
Default_Node : constant Project_Node_Id :=
External_Default_Of
(The_Current_Term,
From_Project_Node_Tree);
begin
-- If there is a default value for the external reference,
-- get its value.
if Present (Default_Node) then
Def_Var := Expression
(Project => Project,
In_Tree => In_Tree,
Flags => Flags,
From_Project_Node => From_Project_Node,
From_Project_Node_Tree => From_Project_Node_Tree,
Pkg => Pkg,
First_Term =>
Tree.First_Term
(Default_Node, From_Project_Node_Tree),
Kind => Single);
if Def_Var /= Nil_Variable_Value then
Default := Def_Var.Value;
end if;
end if;
Ext_List := Expression_Kind_Of
(The_Current_Term,
From_Project_Node_Tree) = List;
if Ext_List then
Value :=
Prj.Ext.Value_Of
(From_Project_Node_Tree, Name, No_Name);
if Value /= No_Name then
declare
Sep : constant String :=
Get_Name_String (Default);
First : Positive := 1;
Lst : Natural;
Done : Boolean := False;
Nmb : Natural;
begin
Get_Name_String (Value);
if Name_Len = 0
or else Sep'Length = 0
or else Name_Buffer (1 .. Name_Len) = Sep
then
Done := True;
end if;
if not Done and then Name_Len < Sep'Length then
Str_List :=
new String_List'
(1 => new String'
(Name_Buffer (1 .. Name_Len)));
Done := True;
end if;
if not Done then
if Name_Buffer (1 .. Sep'Length) = Sep then
First := Sep'Length + 1;
end if;
if Name_Len - First + 1 >= Sep'Length
and then
Name_Buffer (Name_Len - Sep'Length + 1 ..
Name_Len) = Sep
then
Name_Len := Name_Len - Sep'Length;
end if;
if Name_Len = 0 then
Str_List :=
new String_List'(1 => new String'(""));
Done := True;
end if;
end if;
if not Done then
-- Count the number of string
declare
Saved : constant Positive := First;
begin
Nmb := 1;
loop
Lst :=
Index
(Source =>
Name_Buffer (First .. Name_Len),
Pattern => Sep);
exit when Lst = 0;
Nmb := Nmb + 1;
First := Lst + Sep'Length;
end loop;
First := Saved;
end;
Str_List := new String_List (1 .. Nmb);
-- Populate the string list
Nmb := 1;
loop
Lst :=
Index
(Source =>
Name_Buffer (First .. Name_Len),
Pattern => Sep);
if Lst = 0 then
Str_List (Nmb) :=
new String'
(Name_Buffer (First .. Name_Len));
exit;
else
Str_List (Nmb) :=
new String'
(Name_Buffer (First .. Lst - 1));
Nmb := Nmb + 1;
First := Lst + Sep'Length;
end if;
end loop;
end if;
end;
end if;
else
-- Get the value
Value :=
Prj.Ext.Value_Of
(From_Project_Node_Tree, Name, Default);
if Value = No_Name then
if not Quiet_Output then
Error_Msg
(Flags, "?undefined external reference",
Location_Of
(The_Current_Term, From_Project_Node_Tree),
Project);
end if;
Value := Empty_String;
end if;
end if;
case Kind is
when Undefined =>
null;
when Single =>
if Ext_List then
null; -- error
else
Add (Result.Value, Value);
end if;
when List =>
if not Ext_List or else Str_List /= null then
String_Element_Table.Increment_Last
(In_Tree.String_Elements);
if Last = Nil_String then
Result.Values :=
String_Element_Table.Last
(In_Tree.String_Elements);
else
In_Tree.String_Elements.Table (Last).Next :=
String_Element_Table.Last
(In_Tree.String_Elements);
end if;
Last :=
String_Element_Table.Last
(In_Tree.String_Elements);
if Ext_List then
for Ind in Str_List'Range loop
Name_Len := 0;
Add_Str_To_Name_Buffer (Str_List (Ind).all);
Value := Name_Find;
In_Tree.String_Elements.Table (Last) :=
(Value => Value,
Display_Value => No_Name,
Location =>
Location_Of
(The_Current_Term,
From_Project_Node_Tree),
Flag => False,
Next => Nil_String,
Index => 0);
if Ind /= Str_List'Last then
String_Element_Table.Increment_Last
(In_Tree.String_Elements);
In_Tree.String_Elements.Table
(Last).Next :=
String_Element_Table.Last
(In_Tree.String_Elements);
Last :=
String_Element_Table.Last
(In_Tree.String_Elements);
end if;
end loop;
else
In_Tree.String_Elements.Table (Last) :=
(Value => Value,
Display_Value => No_Name,
Location =>
Location_Of
(The_Current_Term,
From_Project_Node_Tree),
Flag => False,
Next => Nil_String,
Index => 0);
end if;
end if;
end case;
end;
when others =>
-- Should never happen
pragma Assert
(False,
"illegal node kind in an expression");
raise Program_Error;
end case;
The_Term := Next_Term (The_Term, From_Project_Node_Tree);
end loop;
return Result;
end Expression;
---------------------------------------
-- Imported_Or_Extended_Project_From --
---------------------------------------
function Imported_Or_Extended_Project_From
(Project : Project_Id;
With_Name : Name_Id) return Project_Id
is
List : Project_List;
Result : Project_Id;
Temp_Result : Project_Id;
begin
-- First check if it is the name of an extended project
Result := Project.Extends;
while Result /= No_Project loop
if Result.Name = With_Name then
return Result;
else
Result := Result.Extends;
end if;
end loop;
-- Then check the name of each imported project
Temp_Result := No_Project;
List := Project.Imported_Projects;
while List /= null loop
Result := List.Project;
-- If the project is directly imported, then returns its ID
if Result.Name = With_Name then
return Result;
end if;
-- If a project extending the project is imported, then keep this
-- extending project as a possibility. It will be the returned ID
-- if the project is not imported directly.
declare
Proj : Project_Id;
begin
Proj := Result.Extends;
while Proj /= No_Project loop
if Proj.Name = With_Name then
Temp_Result := Result;
exit;
end if;
Proj := Proj.Extends;
end loop;
end;
List := List.Next;
end loop;
pragma Assert (Temp_Result /= No_Project, "project not found");
return Temp_Result;
end Imported_Or_Extended_Project_From;
------------------
-- Package_From --
------------------
function Package_From
(Project : Project_Id;
In_Tree : Project_Tree_Ref;
With_Name : Name_Id) return Package_Id
is
Result : Package_Id := Project.Decl.Packages;
begin
-- Check the name of each existing package of Project
while Result /= No_Package
and then In_Tree.Packages.Table (Result).Name /= With_Name
loop
Result := In_Tree.Packages.Table (Result).Next;
end loop;
if Result = No_Package then
-- Should never happen
Write_Line ("package """ & Get_Name_String (With_Name) &
""" not found");
raise Program_Error;
else
return Result;
end if;
end Package_From;
-------------
-- Process --
-------------
procedure Process
(In_Tree : Project_Tree_Ref;
Project : out Project_Id;
Success : out Boolean;
From_Project_Node : Project_Node_Id;
From_Project_Node_Tree : Project_Node_Tree_Ref;
Flags : Processing_Flags;
Reset_Tree : Boolean := True)
is
begin
Process_Project_Tree_Phase_1
(In_Tree => In_Tree,
Project => Project,
Success => Success,
From_Project_Node => From_Project_Node,
From_Project_Node_Tree => From_Project_Node_Tree,
Flags => Flags,
Reset_Tree => Reset_Tree);
if Project_Qualifier_Of (From_Project_Node, From_Project_Node_Tree) /=
Configuration
then
Process_Project_Tree_Phase_2
(In_Tree => In_Tree,
Project => Project,
Success => Success,
From_Project_Node => From_Project_Node,
From_Project_Node_Tree => From_Project_Node_Tree,
Flags => Flags);
end if;
end Process;
-------------------------------
-- Process_Declarative_Items --
-------------------------------
procedure Process_Declarative_Items
(Project : Project_Id;
In_Tree : Project_Tree_Ref;
Flags : Processing_Flags;
From_Project_Node : Project_Node_Id;
From_Project_Node_Tree : Project_Node_Tree_Ref;
Pkg : Package_Id;
Item : Project_Node_Id)
is
procedure Check_Or_Set_Typed_Variable
(Value : in out Variable_Value;
Declaration : Project_Node_Id);
-- Check whether Value is valid for this typed variable declaration. If
-- it is an error, the behavior depends on the flags: either an error is
-- reported, or a warning, or nothing. In the last two cases, the value
-- of the variable is set to a valid value, replacing Value.
---------------------------------
-- Check_Or_Set_Typed_Variable --
---------------------------------
procedure Check_Or_Set_Typed_Variable
(Value : in out Variable_Value;
Declaration : Project_Node_Id)
is
Loc : constant Source_Ptr :=
Location_Of (Declaration, From_Project_Node_Tree);
Reset_Value : Boolean := False;
Current_String : Project_Node_Id;
begin
-- Report an error for an empty string
if Value.Value = Empty_String then
Error_Msg_Name_1 := Name_Of (Declaration, From_Project_Node_Tree);
case Flags.Allow_Invalid_External is
when Error =>
Error_Msg (Flags, "no value defined for %%", Loc, Project);
when Warning =>
Reset_Value := True;
Error_Msg (Flags, "?no value defined for %%", Loc, Project);
when Silent =>
Reset_Value := True;
end case;
else
-- Loop through all the valid strings for the
-- string type and compare to the string value.
Current_String :=
First_Literal_String
(String_Type_Of (Declaration, From_Project_Node_Tree),
From_Project_Node_Tree);
while Present (Current_String)
and then String_Value_Of
(Current_String, From_Project_Node_Tree) /= Value.Value
loop
Current_String :=
Next_Literal_String (Current_String, From_Project_Node_Tree);
end loop;
-- Report error if string value is not one for the string type
if No (Current_String) then
Error_Msg_Name_1 := Value.Value;
Error_Msg_Name_2 :=
Name_Of (Declaration, From_Project_Node_Tree);
case Flags.Allow_Invalid_External is
when Error =>
Error_Msg
(Flags, "value %% is illegal for typed string %%",
Loc, Project);
when Warning =>
Error_Msg
(Flags, "?value %% is illegal for typed string %%",
Loc, Project);
Reset_Value := True;
when Silent =>
Reset_Value := True;
end case;
end if;
end if;
if Reset_Value then
Current_String :=
First_Literal_String
(String_Type_Of (Declaration, From_Project_Node_Tree),
From_Project_Node_Tree);
Value.Value := String_Value_Of
(Current_String, From_Project_Node_Tree);
end if;
end Check_Or_Set_Typed_Variable;
-- Local variables
Current_Declarative_Item : Project_Node_Id;
Current_Item : Project_Node_Id;
-- Start of processing for Process_Declarative_Items
begin
-- Loop through declarative items
Current_Item := Empty_Node;
Current_Declarative_Item := Item;
while Present (Current_Declarative_Item) loop
-- Get its data
Current_Item :=
Current_Item_Node
(Current_Declarative_Item, From_Project_Node_Tree);
-- And set Current_Declarative_Item to the next declarative item
-- ready for the next iteration.
Current_Declarative_Item :=
Next_Declarative_Item
(Current_Declarative_Item, From_Project_Node_Tree);
case Kind_Of (Current_Item, From_Project_Node_Tree) is
when N_Package_Declaration =>
-- Do not process a package declaration that should be ignored
if Expression_Kind_Of
(Current_Item, From_Project_Node_Tree) /= Ignored
then
-- Create the new package
Package_Table.Increment_Last (In_Tree.Packages);
declare
New_Pkg : constant Package_Id :=
Package_Table.Last (In_Tree.Packages);
The_New_Package : Package_Element;
Project_Of_Renamed_Package :
constant Project_Node_Id :=
Project_Of_Renamed_Package_Of
(Current_Item, From_Project_Node_Tree);
begin
-- Set the name of the new package
The_New_Package.Name :=
Name_Of (Current_Item, From_Project_Node_Tree);
-- Insert the new package in the appropriate list
if Pkg /= No_Package then
The_New_Package.Next :=
In_Tree.Packages.Table (Pkg).Decl.Packages;
In_Tree.Packages.Table (Pkg).Decl.Packages :=
New_Pkg;
else
The_New_Package.Next := Project.Decl.Packages;
Project.Decl.Packages := New_Pkg;
end if;
In_Tree.Packages.Table (New_Pkg) :=
The_New_Package;
if Present (Project_Of_Renamed_Package) then
-- Renamed or extending package
declare
Project_Name : constant Name_Id :=
Name_Of
(Project_Of_Renamed_Package,
From_Project_Node_Tree);
Renamed_Project :
constant Project_Id :=
Imported_Or_Extended_Project_From
(Project, Project_Name);
Renamed_Package : constant Package_Id :=
Package_From
(Renamed_Project, In_Tree,
Name_Of
(Current_Item,
From_Project_Node_Tree));
begin
-- For a renamed package, copy the declarations of
-- the renamed package, but set all the locations
-- to the location of the package name in the
-- renaming declaration.
Copy_Package_Declarations
(From =>
In_Tree.Packages.Table (Renamed_Package).Decl,
To =>
In_Tree.Packages.Table (New_Pkg).Decl,
New_Loc =>
Location_Of
(Current_Item, From_Project_Node_Tree),
Restricted => False,
In_Tree => In_Tree);
end;
else
-- Set the default values of the attributes
Add_Attributes
(Project,
Project.Name,
Name_Id (Project.Directory.Name),
In_Tree,
In_Tree.Packages.Table (New_Pkg).Decl,
First_Attribute_Of
(Package_Id_Of
(Current_Item, From_Project_Node_Tree)),
Project_Level => False);
end if;
-- Process declarative items (nothing to do when the
-- package is renaming, as the first declarative item is
-- null).
Process_Declarative_Items
(Project => Project,
In_Tree => In_Tree,
Flags => Flags,
From_Project_Node => From_Project_Node,
From_Project_Node_Tree => From_Project_Node_Tree,
Pkg => New_Pkg,
Item =>
First_Declarative_Item_Of
(Current_Item, From_Project_Node_Tree));
end;
end if;
when N_String_Type_Declaration =>
-- There is nothing to process
null;
when N_Attribute_Declaration |
N_Typed_Variable_Declaration |
N_Variable_Declaration =>
if Expression_Of (Current_Item, From_Project_Node_Tree) =
Empty_Node
then
-- It must be a full associative array attribute declaration
declare
Current_Item_Name : constant Name_Id :=
Name_Of
(Current_Item,
From_Project_Node_Tree);
-- The name of the attribute
Current_Location : constant Source_Ptr :=
Location_Of
(Current_Item,
From_Project_Node_Tree);
New_Array : Array_Id;
-- The new associative array created
Orig_Array : Array_Id;
-- The associative array value
Orig_Project_Name : Name_Id := No_Name;
-- The name of the project where the associative array
-- value is.
Orig_Project : Project_Id := No_Project;
-- The id of the project where the associative array
-- value is.
Orig_Package_Name : Name_Id := No_Name;
-- The name of the package, if any, where the associative
-- array value is.
Orig_Package : Package_Id := No_Package;
-- The id of the package, if any, where the associative
-- array value is.
New_Element : Array_Element_Id := No_Array_Element;
-- Id of a new array element created
Prev_Element : Array_Element_Id := No_Array_Element;
-- Last new element id created
Orig_Element : Array_Element_Id := No_Array_Element;
-- Current array element in original associative array
Next_Element : Array_Element_Id := No_Array_Element;
-- Id of the array element that follows the new element.
-- This is not always nil, because values for the
-- associative array attribute may already have been
-- declared, and the array elements declared are reused.
Prj : Project_List;
begin
-- First find if the associative array attribute already
-- has elements declared.
if Pkg /= No_Package then
New_Array := In_Tree.Packages.Table
(Pkg).Decl.Arrays;
else
New_Array := Project.Decl.Arrays;
end if;
while New_Array /= No_Array
and then In_Tree.Arrays.Table (New_Array).Name /=
Current_Item_Name
loop
New_Array := In_Tree.Arrays.Table (New_Array).Next;
end loop;
-- If the attribute has never been declared add new entry
-- in the arrays of the project/package and link it.
if New_Array = No_Array then
Array_Table.Increment_Last (In_Tree.Arrays);
New_Array := Array_Table.Last (In_Tree.Arrays);
if Pkg /= No_Package then
In_Tree.Arrays.Table (New_Array) :=
(Name => Current_Item_Name,
Location => Current_Location,
Value => No_Array_Element,
Next => In_Tree.Packages.Table
(Pkg).Decl.Arrays);
In_Tree.Packages.Table (Pkg).Decl.Arrays :=
New_Array;
else
In_Tree.Arrays.Table (New_Array) :=
(Name => Current_Item_Name,
Location => Current_Location,
Value => No_Array_Element,
Next => Project.Decl.Arrays);
Project.Decl.Arrays := New_Array;
end if;
end if;
-- Find the project where the value is declared
Orig_Project_Name :=
Name_Of
(Associative_Project_Of
(Current_Item, From_Project_Node_Tree),
From_Project_Node_Tree);
Prj := In_Tree.Projects;
while Prj /= null loop
if Prj.Project.Name = Orig_Project_Name then
Orig_Project := Prj.Project;
exit;
end if;
Prj := Prj.Next;
end loop;
pragma Assert (Orig_Project /= No_Project,
"original project not found");
if No (Associative_Package_Of
(Current_Item, From_Project_Node_Tree))
then
Orig_Array := Orig_Project.Decl.Arrays;
else
-- If in a package, find the package where the value
-- is declared.
Orig_Package_Name :=
Name_Of
(Associative_Package_Of
(Current_Item, From_Project_Node_Tree),
From_Project_Node_Tree);
Orig_Package := Orig_Project.Decl.Packages;
pragma Assert (Orig_Package /= No_Package,
"original package not found");
while In_Tree.Packages.Table
(Orig_Package).Name /= Orig_Package_Name
loop
Orig_Package := In_Tree.Packages.Table
(Orig_Package).Next;
pragma Assert (Orig_Package /= No_Package,
"original package not found");
end loop;
Orig_Array :=
In_Tree.Packages.Table (Orig_Package).Decl.Arrays;
end if;
-- Now look for the array
while Orig_Array /= No_Array
and then In_Tree.Arrays.Table (Orig_Array).Name /=
Current_Item_Name
loop
Orig_Array := In_Tree.Arrays.Table
(Orig_Array).Next;
end loop;
if Orig_Array = No_Array then
Error_Msg
(Flags,
"associative array value not found",
Location_Of (Current_Item, From_Project_Node_Tree),
Project);
else
Orig_Element :=
In_Tree.Arrays.Table (Orig_Array).Value;
-- Copy each array element
while Orig_Element /= No_Array_Element loop
-- Case of first element
if Prev_Element = No_Array_Element then
-- And there is no array element declared yet,
-- create a new first array element.
if In_Tree.Arrays.Table (New_Array).Value =
No_Array_Element
then
Array_Element_Table.Increment_Last
(In_Tree.Array_Elements);
New_Element := Array_Element_Table.Last
(In_Tree.Array_Elements);
In_Tree.Arrays.Table
(New_Array).Value := New_Element;
Next_Element := No_Array_Element;
-- Otherwise, the new element is the first
else
New_Element := In_Tree.Arrays.
Table (New_Array).Value;
Next_Element :=
In_Tree.Array_Elements.Table
(New_Element).Next;
end if;
-- Otherwise, reuse an existing element, or create
-- one if necessary.
else
Next_Element :=
In_Tree.Array_Elements.Table
(Prev_Element).Next;
if Next_Element = No_Array_Element then
Array_Element_Table.Increment_Last
(In_Tree.Array_Elements);
New_Element :=
Array_Element_Table.Last
(In_Tree.Array_Elements);
In_Tree.Array_Elements.Table
(Prev_Element).Next := New_Element;
else
New_Element := Next_Element;
Next_Element :=
In_Tree.Array_Elements.Table
(New_Element).Next;
end if;
end if;
-- Copy the value of the element
In_Tree.Array_Elements.Table
(New_Element) :=
In_Tree.Array_Elements.Table (Orig_Element);
In_Tree.Array_Elements.Table
(New_Element).Value.Project := Project;
-- Adjust the Next link
In_Tree.Array_Elements.Table
(New_Element).Next := Next_Element;
-- Adjust the previous id for the next element
Prev_Element := New_Element;
-- Go to the next element in the original array
Orig_Element :=
In_Tree.Array_Elements.Table
(Orig_Element).Next;
end loop;
-- Make sure that the array ends here, in case there
-- previously a greater number of elements.
In_Tree.Array_Elements.Table
(New_Element).Next := No_Array_Element;
end if;
end;
-- Declarations other that full associative arrays
else
declare
New_Value : Variable_Value :=
Expression
(Project => Project,
In_Tree => In_Tree,
Flags => Flags,
From_Project_Node => From_Project_Node,
From_Project_Node_Tree => From_Project_Node_Tree,
Pkg => Pkg,
First_Term =>
Tree.First_Term
(Expression_Of
(Current_Item, From_Project_Node_Tree),
From_Project_Node_Tree),
Kind =>
Expression_Kind_Of
(Current_Item, From_Project_Node_Tree));
-- The expression value
The_Variable : Variable_Id := No_Variable;
Current_Item_Name : constant Name_Id :=
Name_Of
(Current_Item,
From_Project_Node_Tree);
Current_Location : constant Source_Ptr :=
Location_Of
(Current_Item,
From_Project_Node_Tree);
begin
-- Process a typed variable declaration
if Kind_Of (Current_Item, From_Project_Node_Tree) =
N_Typed_Variable_Declaration
then
Check_Or_Set_Typed_Variable
(Value => New_Value,
Declaration => Current_Item);
end if;
-- Comment here ???
if Kind_Of (Current_Item, From_Project_Node_Tree) /=
N_Attribute_Declaration
or else
Associative_Array_Index_Of
(Current_Item, From_Project_Node_Tree) = No_Name
then
-- Case of a variable declaration or of a not
-- associative array attribute.
-- First, find the list where to find the variable
-- or attribute.
if Kind_Of (Current_Item, From_Project_Node_Tree) =
N_Attribute_Declaration
then
if Pkg /= No_Package then
The_Variable :=
In_Tree.Packages.Table
(Pkg).Decl.Attributes;
else
The_Variable := Project.Decl.Attributes;
end if;
else
if Pkg /= No_Package then
The_Variable :=
In_Tree.Packages.Table
(Pkg).Decl.Variables;
else
The_Variable := Project.Decl.Variables;
end if;
end if;
-- Loop through the list, to find if it has already
-- been declared.
while The_Variable /= No_Variable
and then
In_Tree.Variable_Elements.Table
(The_Variable).Name /= Current_Item_Name
loop
The_Variable :=
In_Tree.Variable_Elements.Table
(The_Variable).Next;
end loop;
-- If it has not been declared, create a new entry
-- in the list.
if The_Variable = No_Variable then
-- All single string attribute should already have
-- been declared with a default empty string value.
pragma Assert
(Kind_Of (Current_Item, From_Project_Node_Tree) /=
N_Attribute_Declaration,
"illegal attribute declaration for "
& Get_Name_String (Current_Item_Name));
Variable_Element_Table.Increment_Last
(In_Tree.Variable_Elements);
The_Variable := Variable_Element_Table.Last
(In_Tree.Variable_Elements);
-- Put the new variable in the appropriate list
if Pkg /= No_Package then
In_Tree.Variable_Elements.Table (The_Variable) :=
(Next =>
In_Tree.Packages.Table
(Pkg).Decl.Variables,
Name => Current_Item_Name,
Value => New_Value);
In_Tree.Packages.Table
(Pkg).Decl.Variables := The_Variable;
else
In_Tree.Variable_Elements.Table (The_Variable) :=
(Next => Project.Decl.Variables,
Name => Current_Item_Name,
Value => New_Value);
Project.Decl.Variables := The_Variable;
end if;
-- If the variable/attribute has already been
-- declared, just change the value.
else
In_Tree.Variable_Elements.Table
(The_Variable).Value := New_Value;
end if;
-- Associative array attribute
else
declare
Index_Name : Name_Id :=
Associative_Array_Index_Of
(Current_Item,
From_Project_Node_Tree);
Source_Index : constant Int :=
Source_Index_Of
(Current_Item,
From_Project_Node_Tree);
The_Array : Array_Id;
The_Array_Element : Array_Element_Id :=
No_Array_Element;
begin
if Index_Name /= All_Other_Names then
Index_Name := Get_Attribute_Index
(From_Project_Node_Tree,
Current_Item,
Associative_Array_Index_Of
(Current_Item, From_Project_Node_Tree));
end if;
-- Look for the array in the appropriate list
if Pkg /= No_Package then
The_Array :=
In_Tree.Packages.Table (Pkg).Decl.Arrays;
else
The_Array :=
Project.Decl.Arrays;
end if;
while
The_Array /= No_Array
and then
In_Tree.Arrays.Table (The_Array).Name /=
Current_Item_Name
loop
The_Array :=
In_Tree.Arrays.Table (The_Array).Next;
end loop;
-- If the array cannot be found, create a new entry
-- in the list. As The_Array_Element is initialized
-- to No_Array_Element, a new element will be
-- created automatically later
if The_Array = No_Array then
Array_Table.Increment_Last (In_Tree.Arrays);
The_Array := Array_Table.Last (In_Tree.Arrays);
if Pkg /= No_Package then
In_Tree.Arrays.Table (The_Array) :=
(Name => Current_Item_Name,
Location => Current_Location,
Value => No_Array_Element,
Next => In_Tree.Packages.Table
(Pkg).Decl.Arrays);
In_Tree.Packages.Table (Pkg).Decl.Arrays :=
The_Array;
else
In_Tree.Arrays.Table (The_Array) :=
(Name => Current_Item_Name,
Location => Current_Location,
Value => No_Array_Element,
Next => Project.Decl.Arrays);
Project.Decl.Arrays := The_Array;
end if;
-- Otherwise initialize The_Array_Element as the
-- head of the element list.
else
The_Array_Element :=
In_Tree.Arrays.Table (The_Array).Value;
end if;
-- Look in the list, if any, to find an element
-- with the same index and same source index.
while The_Array_Element /= No_Array_Element
and then
(In_Tree.Array_Elements.Table
(The_Array_Element).Index /= Index_Name
or else
In_Tree.Array_Elements.Table
(The_Array_Element).Src_Index /= Source_Index)
loop
The_Array_Element :=
In_Tree.Array_Elements.Table
(The_Array_Element).Next;
end loop;
-- If no such element were found, create a new one
-- and insert it in the element list, with the
-- proper value.
if The_Array_Element = No_Array_Element then
Array_Element_Table.Increment_Last
(In_Tree.Array_Elements);
The_Array_Element :=
Array_Element_Table.Last
(In_Tree.Array_Elements);
In_Tree.Array_Elements.Table
(The_Array_Element) :=
(Index => Index_Name,
Src_Index => Source_Index,
Index_Case_Sensitive =>
not Case_Insensitive
(Current_Item, From_Project_Node_Tree),
Value => New_Value,
Next =>
In_Tree.Arrays.Table (The_Array).Value);
In_Tree.Arrays.Table (The_Array).Value :=
The_Array_Element;
-- An element with the same index already exists,
-- just replace its value with the new one.
else
In_Tree.Array_Elements.Table
(The_Array_Element).Value := New_Value;
end if;
end;
end if;
end;
end if;
when N_Case_Construction =>
declare
The_Project : Project_Id := Project;
-- The id of the project of the case variable
The_Package : Package_Id := Pkg;
-- The id of the package, if any, of the case variable
The_Variable : Variable_Value := Nil_Variable_Value;
-- The case variable
Case_Value : Name_Id := No_Name;
-- The case variable value
Case_Item : Project_Node_Id := Empty_Node;
Choice_String : Project_Node_Id := Empty_Node;
Decl_Item : Project_Node_Id := Empty_Node;
begin
declare
Variable_Node : constant Project_Node_Id :=
Case_Variable_Reference_Of
(Current_Item,
From_Project_Node_Tree);
Var_Id : Variable_Id := No_Variable;
Name : Name_Id := No_Name;
begin
-- If a project was specified for the case variable,
-- get its id.
if Present (Project_Node_Of
(Variable_Node, From_Project_Node_Tree))
then
Name :=
Name_Of
(Project_Node_Of
(Variable_Node, From_Project_Node_Tree),
From_Project_Node_Tree);
The_Project :=
Imported_Or_Extended_Project_From (Project, Name);
end if;
-- If a package were specified for the case variable,
-- get its id.
if Present (Package_Node_Of
(Variable_Node, From_Project_Node_Tree))
then
Name :=
Name_Of
(Package_Node_Of
(Variable_Node, From_Project_Node_Tree),
From_Project_Node_Tree);
The_Package :=
Package_From (The_Project, In_Tree, Name);
end if;
Name := Name_Of (Variable_Node, From_Project_Node_Tree);
-- First, look for the case variable into the package,
-- if any.
if The_Package /= No_Package then
Var_Id := In_Tree.Packages.Table
(The_Package).Decl.Variables;
Name :=
Name_Of (Variable_Node, From_Project_Node_Tree);
while Var_Id /= No_Variable
and then
In_Tree.Variable_Elements.Table
(Var_Id).Name /= Name
loop
Var_Id := In_Tree.Variable_Elements.
Table (Var_Id).Next;
end loop;
end if;
-- If not found in the package, or if there is no
-- package, look at the project level.
if Var_Id = No_Variable
and then
No (Package_Node_Of
(Variable_Node, From_Project_Node_Tree))
then
Var_Id := The_Project.Decl.Variables;
while Var_Id /= No_Variable
and then
In_Tree.Variable_Elements.Table
(Var_Id).Name /= Name
loop
Var_Id := In_Tree.Variable_Elements.
Table (Var_Id).Next;
end loop;
end if;
if Var_Id = No_Variable then
-- Should never happen, because this has already been
-- checked during parsing.
Write_Line ("variable """ &
Get_Name_String (Name) &
""" not found");
raise Program_Error;
end if;
-- Get the case variable
The_Variable := In_Tree.Variable_Elements.
Table (Var_Id).Value;
if The_Variable.Kind /= Single then
-- Should never happen, because this has already been
-- checked during parsing.
Write_Line ("variable""" &
Get_Name_String (Name) &
""" is not a single string variable");
raise Program_Error;
end if;
-- Get the case variable value
Case_Value := The_Variable.Value;
end;
-- Now look into all the case items of the case construction
Case_Item :=
First_Case_Item_Of (Current_Item, From_Project_Node_Tree);
Case_Item_Loop :
while Present (Case_Item) loop
Choice_String :=
First_Choice_Of (Case_Item, From_Project_Node_Tree);
-- When Choice_String is nil, it means that it is
-- the "when others =>" alternative.
if No (Choice_String) then
Decl_Item :=
First_Declarative_Item_Of
(Case_Item, From_Project_Node_Tree);
exit Case_Item_Loop;
end if;
-- Look into all the alternative of this case item
Choice_Loop :
while Present (Choice_String) loop
if Case_Value =
String_Value_Of
(Choice_String, From_Project_Node_Tree)
then
Decl_Item :=
First_Declarative_Item_Of
(Case_Item, From_Project_Node_Tree);
exit Case_Item_Loop;
end if;
Choice_String :=
Next_Literal_String
(Choice_String, From_Project_Node_Tree);
end loop Choice_Loop;
Case_Item :=
Next_Case_Item (Case_Item, From_Project_Node_Tree);
end loop Case_Item_Loop;
-- If there is an alternative, then we process it
if Present (Decl_Item) then
Process_Declarative_Items
(Project => Project,
In_Tree => In_Tree,
Flags => Flags,
From_Project_Node => From_Project_Node,
From_Project_Node_Tree => From_Project_Node_Tree,
Pkg => Pkg,
Item => Decl_Item);
end if;
end;
when others =>
-- Should never happen
Write_Line ("Illegal declarative item: " &
Project_Node_Kind'Image
(Kind_Of
(Current_Item, From_Project_Node_Tree)));
raise Program_Error;
end case;
end loop;
end Process_Declarative_Items;
----------------------------------
-- Process_Project_Tree_Phase_1 --
----------------------------------
procedure Process_Project_Tree_Phase_1
(In_Tree : Project_Tree_Ref;
Project : out Project_Id;
Success : out Boolean;
From_Project_Node : Project_Node_Id;
From_Project_Node_Tree : Project_Node_Tree_Ref;
Flags : Processing_Flags;
Reset_Tree : Boolean := True)
is
begin
if Reset_Tree then
-- Make sure there are no projects in the data structure
Free_List (In_Tree.Projects, Free_Project => True);
end if;
Processed_Projects.Reset;
-- And process the main project and all of the projects it depends on,
-- recursively.
Recursive_Process
(Project => Project,
In_Tree => In_Tree,
Flags => Flags,
From_Project_Node => From_Project_Node,
From_Project_Node_Tree => From_Project_Node_Tree,
Extended_By => No_Project);
Success :=
Total_Errors_Detected = 0
and then
(Warning_Mode /= Treat_As_Error or else Warnings_Detected = 0);
end Process_Project_Tree_Phase_1;
----------------------------------
-- Process_Project_Tree_Phase_2 --
----------------------------------
procedure Process_Project_Tree_Phase_2
(In_Tree : Project_Tree_Ref;
Project : Project_Id;
Success : out Boolean;
From_Project_Node : Project_Node_Id;
From_Project_Node_Tree : Project_Node_Tree_Ref;
Flags : Processing_Flags)
is
Obj_Dir : Path_Name_Type;
Extending : Project_Id;
Extending2 : Project_Id;
Prj : Project_List;
-- Start of processing for Process_Project_Tree_Phase_2
begin
Success := True;
if Project /= No_Project then
Check (In_Tree, Project, From_Project_Node_Tree, Flags);
end if;
-- If main project is an extending all project, set object directory of
-- all virtual extending projects to object directory of main project.
if Project /= No_Project
and then
Is_Extending_All (From_Project_Node, From_Project_Node_Tree)
then
declare
Object_Dir : constant Path_Information :=
Project.Object_Directory;
begin
Prj := In_Tree.Projects;
while Prj /= null loop
if Prj.Project.Virtual then
Prj.Project.Object_Directory := Object_Dir;
end if;
Prj := Prj.Next;
end loop;
end;
end if;
-- Check that no extending project shares its object directory with
-- the project(s) it extends.
if Project /= No_Project then
Prj := In_Tree.Projects;
while Prj /= null loop
Extending := Prj.Project.Extended_By;
if Extending /= No_Project then
Obj_Dir := Prj.Project.Object_Directory.Name;
-- Check that a project being extended does not share its
-- object directory with any project that extends it, directly
-- or indirectly, including a virtual extending project.
-- Start with the project directly extending it
Extending2 := Extending;
while Extending2 /= No_Project loop
if Has_Ada_Sources (Extending2)
and then Extending2.Object_Directory.Name = Obj_Dir
then
if Extending2.Virtual then
Error_Msg_Name_1 := Prj.Project.Display_Name;
Error_Msg
(Flags,
"project %% cannot be extended by a virtual" &
" project with the same object directory",
Prj.Project.Location, Project);
else
Error_Msg_Name_1 := Extending2.Display_Name;
Error_Msg_Name_2 := Prj.Project.Display_Name;
Error_Msg
(Flags,
"project %% cannot extend project %%",
Extending2.Location, Project);
Error_Msg
(Flags,
"\they share the same object directory",
Extending2.Location, Project);
end if;
end if;
-- Continue with the next extending project, if any
Extending2 := Extending2.Extended_By;
end loop;
end if;
Prj := Prj.Next;
end loop;
end if;
Success :=
Total_Errors_Detected = 0
and then
(Warning_Mode /= Treat_As_Error or else Warnings_Detected = 0);
end Process_Project_Tree_Phase_2;
-----------------------
-- Recursive_Process --
-----------------------
procedure Recursive_Process
(In_Tree : Project_Tree_Ref;
Project : out Project_Id;
Flags : Processing_Flags;
From_Project_Node : Project_Node_Id;
From_Project_Node_Tree : Project_Node_Tree_Ref;
Extended_By : Project_Id)
is
procedure Process_Imported_Projects
(Imported : in out Project_List;
Limited_With : Boolean);
-- Process imported projects. If Limited_With is True, then only
-- projects processed through a "limited with" are processed, otherwise
-- only projects imported through a standard "with" are processed.
-- Imported is the id of the last imported project.
-------------------------------
-- Process_Imported_Projects --
-------------------------------
procedure Process_Imported_Projects
(Imported : in out Project_List;
Limited_With : Boolean)
is
With_Clause : Project_Node_Id;
New_Project : Project_Id;
Proj_Node : Project_Node_Id;
begin
With_Clause :=
First_With_Clause_Of
(From_Project_Node, From_Project_Node_Tree);
while Present (With_Clause) loop
Proj_Node :=
Non_Limited_Project_Node_Of
(With_Clause, From_Project_Node_Tree);
New_Project := No_Project;
if (Limited_With and then No (Proj_Node))
or else (not Limited_With and then Present (Proj_Node))
then
Recursive_Process
(In_Tree => In_Tree,
Project => New_Project,
Flags => Flags,
From_Project_Node =>
Project_Node_Of
(With_Clause, From_Project_Node_Tree),
From_Project_Node_Tree => From_Project_Node_Tree,
Extended_By => No_Project);
-- Imported is the id of the last imported project. If
-- it is nil, then this imported project is our first.
if Imported = null then
Project.Imported_Projects :=
new Project_List_Element'
(Project => New_Project,
Next => null);
Imported := Project.Imported_Projects;
else
Imported.Next := new Project_List_Element'
(Project => New_Project,
Next => null);
Imported := Imported.Next;
end if;
end if;
With_Clause :=
Next_With_Clause_Of (With_Clause, From_Project_Node_Tree);
end loop;
end Process_Imported_Projects;
-- Start of processing for Recursive_Process
begin
if No (From_Project_Node) then
Project := No_Project;
else
declare
Imported : Project_List;
Declaration_Node : Project_Node_Id := Empty_Node;
Name : constant Name_Id :=
Name_Of (From_Project_Node, From_Project_Node_Tree);
Name_Node : constant Tree_Private_Part.Project_Name_And_Node :=
Tree_Private_Part.Projects_Htable.Get
(From_Project_Node_Tree.Projects_HT, Name);
begin
Project := Processed_Projects.Get (Name);
if Project /= No_Project then
-- Make sure that, when a project is extended, the project id
-- of the project extending it is recorded in its data, even
-- when it has already been processed as an imported project.
-- This is for virtually extended projects.
if Extended_By /= No_Project then
Project.Extended_By := Extended_By;
end if;
return;
end if;
Project := new Project_Data'(Empty_Project);
In_Tree.Projects := new Project_List_Element'
(Project => Project,
Next => In_Tree.Projects);
Processed_Projects.Set (Name, Project);
Project.Name := Name;
Project.Display_Name := Name_Node.Display_Name;
Project.Qualifier :=
Project_Qualifier_Of (From_Project_Node, From_Project_Node_Tree);
Get_Name_String (Name);
-- If name starts with the virtual prefix, flag the project as
-- being a virtual extending project.
if Name_Len > Virtual_Prefix'Length
and then Name_Buffer (1 .. Virtual_Prefix'Length) =
Virtual_Prefix
then
Project.Virtual := True;
end if;
Project.Path.Display_Name :=
Path_Name_Of (From_Project_Node, From_Project_Node_Tree);
Get_Name_String (Project.Path.Display_Name);
Canonical_Case_File_Name (Name_Buffer (1 .. Name_Len));
Project.Path.Name := Name_Find;
Project.Location :=
Location_Of (From_Project_Node, From_Project_Node_Tree);
Project.Directory.Display_Name :=
Directory_Of (From_Project_Node, From_Project_Node_Tree);
Get_Name_String (Project.Directory.Display_Name);
Canonical_Case_File_Name (Name_Buffer (1 .. Name_Len));
Project.Directory.Name := Name_Find;
Project.Extended_By := Extended_By;
Add_Attributes
(Project,
Name,
Name_Id (Project.Directory.Name),
In_Tree,
Project.Decl,
Prj.Attr.Attribute_First,
Project_Level => True);
Process_Imported_Projects (Imported, Limited_With => False);
Declaration_Node :=
Project_Declaration_Of
(From_Project_Node, From_Project_Node_Tree);
Recursive_Process
(In_Tree => In_Tree,
Project => Project.Extends,
Flags => Flags,
From_Project_Node => Extended_Project_Of
(Declaration_Node,
From_Project_Node_Tree),
From_Project_Node_Tree => From_Project_Node_Tree,
Extended_By => Project);
Process_Declarative_Items
(Project => Project,
In_Tree => In_Tree,
Flags => Flags,
From_Project_Node => From_Project_Node,
From_Project_Node_Tree => From_Project_Node_Tree,
Pkg => No_Package,
Item => First_Declarative_Item_Of
(Declaration_Node,
From_Project_Node_Tree));
-- If it is an extending project, inherit all packages
-- from the extended project that are not explicitly defined
-- or renamed. Also inherit the languages, if attribute Languages
-- is not explicitly defined.
if Project.Extends /= No_Project then
declare
Extended_Pkg : Package_Id;
Current_Pkg : Package_Id;
Element : Package_Element;
First : constant Package_Id :=
Project.Decl.Packages;
Attribute1 : Variable_Id;
Attribute2 : Variable_Id;
Attr_Value1 : Variable;
Attr_Value2 : Variable;
begin
Extended_Pkg := Project.Extends.Decl.Packages;
while Extended_Pkg /= No_Package loop
Element := In_Tree.Packages.Table (Extended_Pkg);
Current_Pkg := First;
while Current_Pkg /= No_Package
and then In_Tree.Packages.Table (Current_Pkg).Name /=
Element.Name
loop
Current_Pkg :=
In_Tree.Packages.Table (Current_Pkg).Next;
end loop;
if Current_Pkg = No_Package then
Package_Table.Increment_Last
(In_Tree.Packages);
Current_Pkg := Package_Table.Last (In_Tree.Packages);
In_Tree.Packages.Table (Current_Pkg) :=
(Name => Element.Name,
Decl => No_Declarations,
Parent => No_Package,
Next => Project.Decl.Packages);
Project.Decl.Packages := Current_Pkg;
Copy_Package_Declarations
(From => Element.Decl,
To =>
In_Tree.Packages.Table (Current_Pkg).Decl,
New_Loc => No_Location,
Restricted => True,
In_Tree => In_Tree);
end if;
Extended_Pkg := Element.Next;
end loop;
-- Check if attribute Languages is declared in the
-- extending project.
Attribute1 := Project.Decl.Attributes;
while Attribute1 /= No_Variable loop
Attr_Value1 := In_Tree.Variable_Elements.
Table (Attribute1);
exit when Attr_Value1.Name = Snames.Name_Languages;
Attribute1 := Attr_Value1.Next;
end loop;
if Attribute1 = No_Variable or else
Attr_Value1.Value.Default
then
-- Attribute Languages is not declared in the extending
-- project. Check if it is declared in the project being
-- extended.
Attribute2 := Project.Extends.Decl.Attributes;
while Attribute2 /= No_Variable loop
Attr_Value2 := In_Tree.Variable_Elements.
Table (Attribute2);
exit when Attr_Value2.Name = Snames.Name_Languages;
Attribute2 := Attr_Value2.Next;
end loop;
if Attribute2 /= No_Variable and then
not Attr_Value2.Value.Default
then
-- As attribute Languages is declared in the project
-- being extended, copy its value for the extending
-- project.
if Attribute1 = No_Variable then
Variable_Element_Table.Increment_Last
(In_Tree.Variable_Elements);
Attribute1 := Variable_Element_Table.Last
(In_Tree.Variable_Elements);
Attr_Value1.Next := Project.Decl.Attributes;
Project.Decl.Attributes := Attribute1;
end if;
Attr_Value1.Name := Snames.Name_Languages;
Attr_Value1.Value := Attr_Value2.Value;
In_Tree.Variable_Elements.Table
(Attribute1) := Attr_Value1;
end if;
end if;
end;
end if;
Process_Imported_Projects (Imported, Limited_With => True);
end;
end if;
end Recursive_Process;
end Prj.Proc;
|
oeis/020/A020593.asm | neoneye/loda-programs | 11 | 174277 | ; A020593: Expansion of 1/((1-6x)(1-8x)(1-11x)).
; Submitted by <NAME>(s2)
; 1,25,423,6053,79079,977613,11662351,135834661,1556251287,17625401981,197992990559,2211194243349,24591484236775,272666167778029,3016684939110447,33322861263616517,367668910476901943,4053314434522328157,44658211693913532415,491814961306132248565,5414565291910561933191,59597045888311679234765,655862257811496297606863,7216843649977224935473893,79404155400536937906216919,873596739842494055826120253,9610772552341864704527404191,105728166411846321550791346901,1163087183359938229931439519527
add $0,1
mov $3,1
lpb $0
sub $0,1
add $2,$3
add $1,$2
mul $1,6
mul $2,11
mul $3,8
lpe
mov $0,$1
div $0,6
|
experiments/realbugs/student7.als | saiema/ARepair | 5 | 2109 | sig List {
header: set Node
}
sig Node {
link: set Node,
elem: set Int
}
// Correct
fact CardinalityConstraints {
all l: List | #l.header <= 1
all n: Node | #n.link <= 1
all n: Node | #n.elem = 1
}
// Overconstraint. Should allow no l.header
// Underconstraint. Should not allow link = n1 -> n2 + n2 -> n3 + n3 -> n1
// Overconstraint. Should allow link = n1 -> n2 + n2 -> n3 + n3 -> n3
pred Loop(This: List) {
// Fix: replace "&&" with "||" and replace "all n: Node| n in This.header.link.^(link)" with "one n: This.header.*link | n = n.link".
all n: Node| n in This.header.link.^(link)
// Fix: replace ">" with "=".
#header > 0
}
// Overconstraint. Should allow no n.link
pred Sorted(This: List) {
// Fix: replace "n.elem <= n.link.elem" with "some n.link => n.elem <= n.link.elem".
all n: Node | n.elem <= n.link.elem
}
pred RepOk(This: List) {
Loop[This]
Sorted[This]
}
// Underconstraint. x.~elem may not be in This. Correct if all nodes in List.
pred Count(This: List, x: Int, result: Int) {
RepOk[This]
result = #(x.~(elem))
}
abstract sig Boolean {}
one sig True, False extends Boolean {}
// Underconstraint. x.~elem may not be in This. Correct if all nodes in List.
pred Contains(This: List, x: Int, result: Boolean) {
RepOk[This]
some x.~(elem) => result = True else result = False
}
fact IGNORE {
one List
List.header.*link = Node
} |
programs/oeis/113/A113311.asm | jmorken/loda | 1 | 5286 | <reponame>jmorken/loda<filename>programs/oeis/113/A113311.asm
; A113311: Expansion of (1+x)^2/(1-x).
; 1,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4
mul $0,2
mov $1,$0
trn $0,3
sub $1,$0
add $1,1
|
3-mid/impact/source/3d/collision/dispatch/impact-d3-union_find.ads | charlie5/lace | 20 | 30865 | <reponame>charlie5/lace
-- #include "LinearMath/btAlignedObjectArray.h"
private
with ada.Containers.Vectors,
ada.unchecked_Deallocation;
package impact.d3.union_Find
--
-- UnionFind calculates connected subsets
--
-- Implements weighted Quick Union with path compression optimization: could use short ints
-- instead of ints (halving memory, would limit the number of rigid bodies to 64k, sounds reasonable).
--
is
type Item is tagged private;
type View is access all Item'Class;
USE_PATH_COMPRESSION : constant Boolean := True;
STATIC_SIMULATION_ISLAND_OPTIMIZATION : constant Boolean := True;
--
-- See for discussion of static island optimizations by Vroonsh here: http://code.google.com/p/bullet/issues/detail?id=406.
type btElement is
record
m_id,
m_sz : Integer;
end record;
--- Forge
--
procedure destruct (Self : in out Item);
--- Attributes
--
function getNumElements (Self : in Item) return Natural;
-- SIMD_FORCE_INLINE int getNumElements() const
-- {
-- return int(m_elements.size());
-- }
function isRoot (Self : in Item; x : in Integer) return Boolean;
-- SIMD_FORCE_INLINE bool isRoot(int x) const
-- {
-- return (x == m_elements[x].m_id);
-- }
function getElement (Self : in Item; index : in Integer) return access btElement;
-- btElement& getElement(int index)
-- {
-- return m_elements[index];
-- }
function find (Self : in Item; p, q : in Integer) return Boolean;
-- int find(int p, int q)
-- {
-- return (find(p) == find(q));
-- }
function find (Self : in Item; index : in Integer) return Integer;
-- int find(int x)
-- {
-- //btAssert(x < m_N);
-- //btAssert(x >= 0);
--
-- while (x != m_elements[x].m_id)
-- {
-- //not really a reason not to use path compression, and it flattens the trees/improves find performance dramatically
--
-- #ifdef USE_PATH_COMPRESSION
-- const btElement* elementPtr = &m_elements[m_elements[x].m_id];
-- m_elements[x].m_id = elementPtr->m_id;
-- x = elementPtr->m_id;
-- #else//
-- x = m_elements[x].m_id;
-- #endif
-- //btAssert(x < m_N);
-- //btAssert(x >= 0);
--
-- }
-- return x;
-- }
--- Operations
--
procedure sortIslands (Self : in out Item);
--
-- This is a special operation, destroying the content of impact.d3.union_Find.
--
-- It sorts the elements, based on island id, in order to make it easy to iterate over islands
procedure reset (Self : in out Item; N : in Integer);
procedure allocate (Self : in out Item; N : in Integer);
procedure Free (Self : in out Item);
procedure unite (Self : in out Item; p, q : in Integer);
-- void unite(int p, int q)
-- {
-- int i = find(p), j = find(q);
-- if (i == j)
-- return;
--
-- #ifndef USE_PATH_COMPRESSION
-- //weighted quick union, this keeps the 'trees' balanced, and keeps performance of unite O( log(n) )
-- if (m_elements[i].m_sz < m_elements[j].m_sz)
-- {
-- m_elements[i].m_id = j; m_elements[j].m_sz += m_elements[i].m_sz;
-- }
-- else
-- {
-- m_elements[j].m_id = i; m_elements[i].m_sz += m_elements[j].m_sz;
-- }
-- #else
-- m_elements[i].m_id = j; m_elements[j].m_sz += m_elements[i].m_sz;
-- #endif //USE_PATH_COMPRESSION
-- }
private
type btElement_view is access all btElement;
procedure free is new ada.unchecked_Deallocation (btElement, btElement_view);
package btElement_Vectors is new ada.Containers.Vectors (Natural, btElement_view);
subtype btElement_Vector is btElement_Vectors.Vector;
type Item is tagged
record
m_elements : btElement_Vector;
end record;
end impact.d3.union_Find;
|
source/asis/asis-ada_environments-containers.adb | faelys/gela-asis | 4 | 37 | <filename>source/asis/asis-ada_environments-containers.adb
------------------------------------------------------------------------------
-- G E L A A S I S --
-- ASIS implementation for Gela project, a portable Ada compiler --
-- http://gela.ada-ru.org --
-- - - - - - - - - - - - - - - - --
-- Read copyright and license at the end of this file --
------------------------------------------------------------------------------
-- $Revision: 209 $ $Date: 2013-11-30 21:03:24 +0200 (Сб., 30 нояб. 2013) $:
-- Purpose:
-- Trivial implementation of ASIS Ada_Environments.Containers
with Asis.Compilation_Units;
package body Asis.Ada_Environments.Containers is
package C renames Asis.Compilation_Units;
-----------------------------
-- Compilation_Unit_Bodies --
-----------------------------
function Compilation_Unit_Bodies
(The_Container : in Container)
return Asis.Compilation_Unit_List
is
begin
return C.Compilation_Unit_Bodies (The_Container.The_Context);
end Compilation_Unit_Bodies;
-----------------------
-- Compilation_Units --
-----------------------
function Compilation_Units
(The_Container : in Container)
return Asis.Compilation_Unit_List
is
begin
return C.Compilation_Units (The_Container.The_Context);
end Compilation_Units;
-------------------------
-- Defining_Containers --
-------------------------
function Defining_Containers
(The_Context : in Asis.Context)
return Container_List
is
begin
return (1 => (The_Context => The_Context));
end Defining_Containers;
-----------------------
-- Enclosing_Context --
-----------------------
function Enclosing_Context
(The_Container : in Container)
return Asis.Context
is
begin
return The_Container.The_Context;
end Enclosing_Context;
--------------
-- Is_Equal --
--------------
function Is_Equal
(Left : in Container;
Right : in Container)
return Boolean
is
begin
return Is_Identical (Left, Right);
end Is_Equal;
------------------
-- Is_Identical --
------------------
function Is_Identical
(Left : in Container;
Right : in Container)
return Boolean
is
begin
return Is_Equal (Left.The_Context, Right.The_Context);
end Is_Identical;
-------------------------------
-- Library_Unit_Declarations --
-------------------------------
function Library_Unit_Declarations
(The_Container : in Container)
return Asis.Compilation_Unit_List
is
begin
return C.Library_Unit_Declarations (The_Container.The_Context);
end Library_Unit_Declarations;
----------
-- Name --
----------
function Name (The_Container : in Container) return Wide_String is
begin
return Name (The_Container.The_Context);
end Name;
end Asis.Ada_Environments.Containers;
------------------------------------------------------------------------------
-- Copyright (c) 2006-2013, <NAME>
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain the above copyright notice,
-- this list of conditions and the following disclaimer.
-- * Redistributions in binary form must reproduce the above copyright
-- notice, this list of conditions and the following disclaimer in the
-- documentation and/or other materials provided with the distribution.
-- * Neither the name of the <NAME>, IE nor the names of its
-- contributors may be used to endorse or promote products derived from
-- this software without specific prior written permission.
--
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-- POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
|
oeis/105/A105084.asm | neoneye/loda-programs | 11 | 91309 | ; A105084: Triangle read by rows: a[n, m] = a[n - 1, m] + binomial[n, m]; n <=m
; Submitted by <NAME>
; 1,1,2,1,5,2,1,11,6,2,1,21,16,7,2,1,36,36,22,8,2,1,57,71,57,29,9,2,1,85,127,127,85,37,10,2,1,121,211,253,211,121,46,11,2,1,166,331,463,463,331,166,56,12,2,1,221,496,793,925,793,496,221,67,13,2,1,287,716,1288,1717
trn $0,1
lpb $0
add $1,1
sub $0,$1
lpe
add $0,3
add $1,2
bin $1,$0
mov $0,$1
add $0,1
|
programs/oeis/270/A270993.asm | karttu/loda | 1 | 165504 | <filename>programs/oeis/270/A270993.asm
; A270993: Values of A076336(n) such that A076336(n) = A076336(n+1) - 14.
; 7523267,18708077,29892887,41077697,52262507,63447317,74632127,85816937,97001747,108186557,119371367,130556177,141740987,152925797,164110607,175295417,186480227,197665037,208849847,220034657,231219467,242404277,253589087,264773897,275958707,287143517,298328327,309513137
mov $1,$0
mul $1,11184810
add $1,7523267
|
thirdparty/adasdl/thin/adasdl/AdaSDL_framebuff/sdltests/testwm_sprogs.adb | Lucretia/old_nehe_ada95 | 0 | 5906 | <filename>thirdparty/adasdl/thin/adasdl/AdaSDL_framebuff/sdltests/testwm_sprogs.adb
-- ----------------------------------------------------------------- --
-- --
-- This is free software; you can redistribute it and/or --
-- modify it under the terms of the GNU General Public --
-- License as published by the Free Software Foundation; either --
-- version 2 of the License, or (at your option) any later version. --
-- --
-- This software is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
-- General Public License for more details. --
-- --
-- You should have received a copy of the GNU General Public --
-- License along with this library; if not, write to the --
-- Free Software Foundation, Inc., 59 Temple Place - Suite 330, --
-- Boston, MA 02111-1307, USA. --
-- --
-- ----------------------------------------------------------------- --
-- ----------------------------------------------------------------- --
-- This is a translation, to the Ada programming language, of the --
-- original C test files written by <NAME> - www.libsdl.org --
-- translation made by <NAME> - www.adapower.net/~avargas --
-- ----------------------------------------------------------------- --
with Ada.Text_IO; use Ada.Text_IO;
with SDL.Active;
with SDL.Mouse;
with SDL.Keysym;
with SDL_Framebuffer;
package body Testwm_Sprogs is
package It renames Interfaces;
package A renames SDL.Active;
use type A.Active_State;
package Ks renames SDL.Keysym;
use type Ks.Key;
use type Ks.SDLMod;
use type C.int;
use type V.Surface_Flags;
use type V.Surface_ptr;
use type V.Palette_ptr;
use type V.GrabMode;
package Fb renames SDL_Framebuffer;
package M renames SDL.Mouse;
use type M.Mouse_Button_State;
visible : C.int := 1;
-- =============================================
procedure LoadIconSurface (
file : in string;
maskp : in out Icon_Mask_Array_Access;
icon : out V.Surface_ptr)
is
use type Interfaces.Unsigned_8;
mlen : C.int;
i : Integer;
pixels : Fb.Framebuffer_8bPointer;
use V.Color_PtrOps;
begin
-- Load the icon surface
icon := V.LoadBMP (file);
if icon = null then
Put_Line ("Couldn't load " & file & Er.Get_Error);
return;
end if;
-- Check width and height
if icon.w mod 8 /= 0 then
Put_Line ("Icon width must be a multiple of 8!");
V.FreeSurface (icon);
icon := null;
return;
end if;
if icon.format.palette = null then
Put_Line ("Icon must have a palette!");
V.FreeSurface (icon);
icon := null;
return;
end if;
-- Set the colorkey
V.SetColorKey (icon, V.SRCCOLORKEY,
Fb.Get_Framebuffer (icon).all);
-- Create the mask
pixels := Fb.Get_Framebuffer (icon);
Put_Line ("Transparent pixel: (" &
Uint8'Image (Fb.Get_Palette_Red (icon, pixels.all))
& "," &
Uint8'Image (Fb.Get_Palette_Green (icon, pixels.all))
& "," &
Uint8'Image (Fb.Get_Palette_Blue (icon, pixels.all))
& ")");
mlen := icon.w * icon.h;
maskp := new V.Icon_Mask_Array(0 .. Integer(mlen/8 - 1));
maskp.all := (others => 0);
i := 0;
while i < Integer (mlen) loop
if Fb.Go_Right_Unchecked (pixels, i).all /= pixels.all then
maskp (i / 8) := Uint8 (
It.Unsigned_8 (maskp (i / 8)) or 16#01#);
end if;
i := i + 1;
if i mod 8 /= 0 then
maskp (i / 8) := Shift_Left (maskp (i / 8), 1);
end if;
end loop;
end LoadIconSurface;
-- =============================================
procedure HotKey_ToggleFullScreen is
screen : V.Surface_ptr;
begin
screen := V.GetVideoSurface;
if V.WM_ToggleFullScreen (screen) /= 0 then
Put ("Toggled fullscreen mode - now ");
if (screen.flags and V.FULLSCREEN) /= 0 then
Put_Line ("fullscreen");
else
Put_Line ("windowed");
end if;
else
Put_Line ("Unable to toggle fullscreen mode");
end if;
end HotKey_ToggleFullScreen;
-- =============================================
procedure HotKey_ToggleGrab is
mode : V.GrabMode;
begin
Put_Line ("Ctrl-G: toggling input grab!");
mode := V.WM_GrabInput (V.GRAB_QUERY);
if mode = V.GRAB_ON then
Put_Line ("Grab was on");
else
Put_Line ("Grab was off");
end if;
if mode /= 0 then
mode := 0;
else
mode := 1;
end if;
mode := V.WM_GrabInput (mode);
if mode = V.GRAB_ON then
Put_Line ("Grab is now on");
else
Put_Line ("Grab is now off");
end if;
end HotKey_ToggleGrab;
-- =============================================
procedure HotKey_Iconify is
begin
Put_Line ("Ctrl-Z: iconifying window!");
V.WM_IconifyWindow;
end HotKey_Iconify;
-- =============================================
procedure HotKey_Quit is
event : Ev.Event;
begin
Put_Line ("Posting internal quit request");
event.the_type := Ev.ISUSEREVENT;
Ev.PushEvent (event);
end HotKey_Quit;
-- =============================================
reallyquit : C.int := 0;
function FilterEvents (event : Ev.Event_ptr) return C.int is
begin
case event.the_type is
when Ev.ISACTIVEEVENT =>
-- See what happened
Put("App ");
if event.active.gain /= 0 then
Put ("gained ");
else
Put ("lost ");
end if;
if (event.active.state and A.APPACTIVE) /= 0 then
Put ("active ");
end if;
if (event.active.state and A.APPMOUSEFOCUS) /= 0 then
Put ("mouse ");
end if;
Put_Line ("focus");
-- See if we are iconified or restored
if (event.active.state and A.APPACTIVE) /= 0 then
Put ("App has been ");
if event.active.gain /= 0 then
Put_Line ("restored");
else
Put_Line ("iconified");
end if;
end if;
return 0;
-- We want to toggle visibility on buttonpress
when Ev.MOUSEBUTTONDOWN | Ev.MOUSEBUTTONUP =>
if event.button.state = M.PRESSED then
if visible /= 0 then
visible := 0;
else
visible := 1;
end if;
M.ShowCursor (visible);
end if;
Put ("Mouse button " &
Uint8'Image (event.button.button) &
" has been");
if event.button.state = M.PRESSED then
Put_Line (" pressed");
else
Put_Line (" released");
end if;
return 0;
-- Show relative mouse motion
when Ev.MOUSEMOTION =>
Put_Line ("Mouse relative motion: {" &
Sint16'Image (event.motion.xrel) &
", " &
Sint16'Image (event.motion.yrel) &
"}");
return 0;
when Ev.KEYDOWN =>
if event.key.keysym.sym = Ks.K_ESCAPE then
HotKey_Quit;
end if;
if (event.key.keysym.sym = Ks.K_g) and
((event.key.keysym.the_mod and Ks.KMOD_CTRL) /= 0)
then
HotKey_ToggleGrab;
end if;
if (event.key.keysym.sym = Ks.K_z) and
((event.key.keysym.the_mod and Ks.KMOD_CTRL) /= 0)
then
HotKey_Iconify;
end if;
if (event.key.keysym.sym = Ks.K_RETURN) and
((event.key.keysym.the_mod and Ks.KMOD_ALT) /= 0)
then
HotKey_ToggleFullScreen;
end if;
return 0;
-- this is important! Queue it if we want to quit.
when Ev.QUIT =>
if reallyquit = 0 then
reallyquit := 1;
Put_Line ("Quit requested");
return 0;
end if;
Put_Line ("Quit demanded");
return 1;
-- This will never happen because events queued directly
-- to the event queue are not filtred.
when Ev.ISUSEREVENT =>
return 1;
-- Drop all other events
when others =>
return 0;
end case;
end FilterEvents;
end Testwm_Sprogs;
|
Numeral/PositiveInteger/Oper.agda | Lolirofle/stuff-in-agda | 6 | 4364 | module Numeral.PositiveInteger.Oper where
open import Numeral.PositiveInteger
infixl 10010 _+_
infixl 10020 _⋅_
infixl 10030 _^_
-- Addition
_+_ : ℕ₊ → ℕ₊ → ℕ₊
x + 𝟏 = 𝐒(x)
x + 𝐒(y) = 𝐒(x + y)
-- Multiplication
_⋅_ : ℕ₊ → ℕ₊ → ℕ₊
x ⋅ 𝟏 = x
x ⋅ 𝐒(y) = x + (x ⋅ y)
-- Exponentiation
_^_ : ℕ₊ → ℕ₊ → ℕ₊
x ^ 𝟏 = x
x ^ 𝐒(y) = x ⋅ (x ^ y)
-- Factorial
_! : ℕ₊ → ℕ₊
𝟏 ! = 𝟏
𝐒(x) ! = 𝐒(x) ⋅ (x !)
open import Data.Option
open import Data.Option.Functions
-- Truncated subtraction
_−₀_ : ℕ₊ → ℕ₊ → Option(ℕ₊)
𝟏 −₀ _ = None
𝐒(x) −₀ 𝟏 = Some x
𝐒(x) −₀ 𝐒(y) = x −₀ y
open import Data.Boolean
open import Type
_≤?_ : ℕ₊ → ℕ₊ → Bool
𝟏 ≤? _ = 𝑇
𝐒(x) ≤? 𝟏 = 𝐹
𝐒(x) ≤? 𝐒(y) = x ≤? y
|
filters/playsong.applescript | andreifilip123/play-song | 0 | 4067 | <filename>filters/playsong.applescript
-- playsong filter --
on loadConfig()
return (load script POSIX file (do shell script "./resources/compile-config.sh"))
end loadConfig
on getSongResultListFeedback(query)
global config
set query to trimWhitespace(query) of config
set musicApplication to musicApplication of config
tell application musicApplication
set theSongs to getResultsFromQuery(query, "name") of config
repeat with theSong in theSongs
set songId to (get database ID of theSong)
set songName to name of theSong
set songArtist to artist of theSong
set songArtworkPath to getSongArtworkPath(theSong) of config
addResult({uid:("song-" & songId), valid:"yes", title:songName, subtitle:songArtist, icon:songArtworkPath}) of config
end repeat
if config's resultListIsEmpty() then
addNoResultsItem(query, "song") of config
end if
end tell
return getResultListFeedback() of config
end getSongResultListFeedback
on run query
set config to loadConfig()
getSongResultListFeedback(query as text)
end run
|
Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/s-atocou__x86.adb | djamal2727/Main-Bearing-Analytical-Model | 0 | 20198 | <reponame>djamal2727/Main-Bearing-Analytical-Model
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . A T O M I C _ C O U N T E R S --
-- --
-- B o d y --
-- --
-- Copyright (C) 2011-2020, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This implementation of the package for x86 processor. GCC can't generate
-- code for atomic builtins for 386 CPU. Only increment/decrement instructions
-- are supported, thus this implementaton uses machine code insertions to
-- access the necessary instructions.
with System.Machine_Code;
package body System.Atomic_Counters is
-- Add comments showing in normal asm language what we generate???
---------------
-- Decrement --
---------------
function Decrement (Item : aliased in out Atomic_Unsigned) return Boolean is
Aux : Boolean;
begin
System.Machine_Code.Asm
(Template =>
"lock%; decl" & ASCII.HT & "%0" & ASCII.LF & ASCII.HT
& "sete %1",
Outputs =>
(Atomic_Unsigned'Asm_Output ("=m", Item),
Boolean'Asm_Output ("=qm", Aux)),
Inputs => Atomic_Unsigned'Asm_Input ("m", Item),
Volatile => True);
return Aux;
end Decrement;
procedure Decrement (Item : aliased in out Atomic_Unsigned) is
begin
if Decrement (Item) then
null;
end if;
end Decrement;
function Decrement (Item : in out Atomic_Counter) return Boolean is
begin
return Decrement (Item.Value);
end Decrement;
---------------
-- Increment --
---------------
procedure Increment (Item : aliased in out Atomic_Unsigned) is
begin
System.Machine_Code.Asm
(Template => "lock%; incl" & ASCII.HT & "%0",
Outputs => Atomic_Unsigned'Asm_Output ("=m", Item),
Inputs => Atomic_Unsigned'Asm_Input ("m", Item),
Volatile => True);
end Increment;
procedure Increment (Item : in out Atomic_Counter) is
begin
Increment (Item.Value);
end Increment;
----------------
-- Initialize --
----------------
procedure Initialize (Item : out Atomic_Counter) is
begin
Item.Value := 1;
end Initialize;
------------
-- Is_One --
------------
function Is_One (Item : Atomic_Counter) return Boolean is
begin
return Item.Value = 1;
end Is_One;
end System.Atomic_Counters;
|
oeis/183/A183979.asm | neoneye/loda-programs | 11 | 171976 | ; A183979: 1/4 the number of (n+1) X 3 binary arrays with all 2 X 2 subblock sums the same.
; Submitted by <NAME>
; 6,8,11,17,27,47,83,155,291,563,1091,2147,4227,8387,16643,33155,66051,131843,263171,525827,1050627,2100227,4198403,8394755,16785411,33566723,67125251,134242307,268468227,536920067,1073807363,2147581955,4295098371,8590131203,17180131331,34360131587,68720001027,137439739907,274878955523,549757386755,1099513724931,2199026401283,4398050705411,8796099313667,17592194433027,35184384671747,70368760954883,140737513521155,281475010265091,562950003752963,1125899973951491,2251799914348547,4503599761588227
mov $3,$0
seq $0,209726 ; 1/4 the number of (n+1) X 8 0..2 arrays with every 2 X 2 subblock having distinct clockwise edge differences.
mov $2,2
pow $2,$3
add $0,$2
sub $0,11
|
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0xca.log_21829_687.asm | ljhsiun2/medusa | 9 | 163114 | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r13
push %r8
push %r9
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0x10834, %r8
nop
add $56708, %r12
movups (%r8), %xmm5
vpextrq $0, %xmm5, %rsi
nop
nop
nop
cmp %r13, %r13
lea addresses_WC_ht+0x19afc, %r9
nop
and $38666, %rbx
mov (%r9), %r11
nop
nop
cmp $9029, %rbx
lea addresses_UC_ht+0x17334, %rsi
lea addresses_A_ht+0x2434, %rdi
nop
nop
nop
nop
and $37977, %r11
mov $93, %rcx
rep movsw
nop
xor %r8, %r8
lea addresses_WT_ht+0xee04, %rsi
lea addresses_WC_ht+0x14fb4, %rdi
nop
nop
nop
cmp $45283, %rbx
mov $27, %rcx
rep movsw
nop
nop
nop
nop
inc %rdi
lea addresses_A_ht+0x1bcf4, %r13
nop
nop
nop
nop
nop
sub $54002, %r9
and $0xffffffffffffffc0, %r13
vmovaps (%r13), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $0, %xmm3, %rdi
nop
nop
nop
nop
nop
and %rbx, %rbx
lea addresses_WT_ht+0x2834, %rsi
lea addresses_A_ht+0x1a34, %rdi
nop
nop
nop
nop
nop
sub $52189, %r13
mov $11, %rcx
rep movsq
nop
and %r11, %r11
lea addresses_A_ht+0x1815c, %rsi
lea addresses_WC_ht+0x536c, %rdi
clflush (%rsi)
nop
nop
nop
nop
dec %r8
mov $116, %rcx
rep movsq
nop
nop
nop
xor $10403, %rcx
lea addresses_WT_ht+0xcf04, %r8
inc %rdi
mov $0x6162636465666768, %r12
movq %r12, %xmm6
vmovups %ymm6, (%r8)
nop
nop
xor %r11, %r11
lea addresses_WC_ht+0x14384, %rsi
lea addresses_WC_ht+0xfbf4, %rdi
nop
nop
nop
and $14212, %r8
mov $84, %rcx
rep movsl
nop
nop
nop
add %rdi, %rdi
lea addresses_normal_ht+0x9cc, %rsi
lea addresses_normal_ht+0x1b834, %rdi
nop
xor %r9, %r9
mov $84, %rcx
rep movsq
nop
nop
nop
nop
and %rbx, %rbx
lea addresses_UC_ht+0xbe54, %rsi
lea addresses_WC_ht+0xb2e4, %rdi
dec %r12
mov $42, %rcx
rep movsb
nop
nop
nop
nop
cmp $15018, %rcx
lea addresses_normal_ht+0xb574, %r8
clflush (%r8)
nop
nop
sub $6165, %rcx
mov (%r8), %r13w
nop
nop
nop
nop
xor $28154, %rsi
lea addresses_normal_ht+0xf434, %rsi
nop
nop
nop
nop
add $62497, %rcx
mov (%rsi), %bx
nop
nop
xor %rcx, %rcx
lea addresses_WT_ht+0x4d74, %rcx
nop
nop
nop
nop
nop
xor $3813, %r12
mov $0x6162636465666768, %r11
movq %r11, %xmm2
vmovups %ymm2, (%rcx)
nop
nop
nop
and %rsi, %rsi
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r9
pop %r8
pop %r13
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r14
push %r15
push %rbp
push %rdi
push %rdx
push %rsi
// Store
lea addresses_RW+0x19d94, %r15
nop
nop
nop
nop
nop
dec %rbp
mov $0x5152535455565758, %rdi
movq %rdi, %xmm0
vmovaps %ymm0, (%r15)
sub %rsi, %rsi
// Load
lea addresses_US+0x13834, %rdx
nop
nop
nop
nop
nop
and $54739, %r12
mov (%rdx), %ebp
nop
nop
nop
and $58063, %r14
// Store
lea addresses_normal+0x10e74, %r15
sub %r12, %r12
mov $0x5152535455565758, %rdx
movq %rdx, (%r15)
nop
nop
nop
nop
nop
inc %r15
// Store
lea addresses_A+0x484a, %r15
clflush (%r15)
nop
nop
nop
add $64569, %r12
movb $0x51, (%r15)
nop
nop
add $60625, %rbp
// Faulty Load
mov $0x4af9c80000000034, %rdx
nop
nop
nop
cmp $16232, %rsi
mov (%rdx), %di
lea oracles, %rdx
and $0xff, %rdi
shlq $12, %rdi
mov (%rdx,%rdi,1), %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rbp
pop %r15
pop %r14
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 2, 'NT': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 5, 'AVXalign': True, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_RW'}}
{'src': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_US'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 8, 'NT': True, 'type': 'addresses_normal'}}
{'OP': 'STOR', 'dst': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_A'}}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 2, 'NT': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 11, 'AVXalign': False, 'same': True, 'size': 16, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 3, 'AVXalign': True, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 8, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_A_ht'}}
{'src': {'congruent': 4, 'same': True, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_WC_ht'}}
{'src': {'congruent': 0, 'AVXalign': True, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 11, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_A_ht'}}
{'src': {'congruent': 3, 'same': True, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_WC_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_WT_ht'}}
{'src': {'congruent': 4, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_WC_ht'}}
{'src': {'congruent': 3, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_normal_ht'}}
{'src': {'congruent': 3, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 4, 'same': False, 'type': 'addresses_WC_ht'}}
{'src': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 10, 'AVXalign': True, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_WT_ht'}}
{'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
*/
|
Library/GrObj/Body/bodyTest.asm | steakknife/pcgeos | 504 | 175915 | <filename>Library/GrObj/Body/bodyTest.asm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) Berkeley Softworks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: Body
FILE: bodyTest.asm
AUTHOR: <NAME>, Feb 13, 1992
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
Steve 2/13/92 Initial revision
DESCRIPTION:
$Id: bodyTest.asm,v 1.1 97/04/04 18:07:53 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
include timedate.def
BodyTestCode segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjBodyTest1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjBodyClass
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This method should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjBodyTest1 method dynamic GrObjBodyClass, MSG_GB_TEST_1
.enter
call MakeAttrsDefault
.leave
ret
GrObjBodyTest1 endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjBodyTest2
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjBodyClass
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This method should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjBodyTest2 method dynamic GrObjBodyClass, MSG_GB_TEST_2
.enter
call Show
.leave
ret
GrObjBodyTest2 endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjBodyTest3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjBodyClass
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This method should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/33/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjBodyTest3 method dynamic GrObjBodyClass, MSG_GB_TEST_3
.enter
sub sp, size GrObjBodyCustomDuplicateParams
mov bp, sp
mov ss:[bp].GBCDP_repetitions, 4
mov ss:[bp].GBCDP_move.PDF_x.DWF_int.high, 0
mov ss:[bp].GBCDP_move.PDF_x.DWF_int.low, 20
mov ss:[bp].GBCDP_move.PDF_x.DWF_frac, 0
mov ss:[bp].GBCDP_move.PDF_y.DWF_int.high, 0
mov ss:[bp].GBCDP_move.PDF_y.DWF_int.low, 10
mov ss:[bp].GBCDP_move.PDF_y.DWF_frac, 0
mov ss:[bp].GBCDP_rotation.WWF_int, 30
mov ss:[bp].GBCDP_rotation.WWF_frac, 0
mov ss:[bp].GBCDP_rotateAnchor, 0
mov ss:[bp].GBCDP_skew.GOASD_degrees.GOSD_xDegrees.WWF_int, 0
mov ss:[bp].GBCDP_skew.GOASD_degrees.GOSD_xDegrees.WWF_frac, 0
mov ss:[bp].GBCDP_skew.GOASD_degrees.GOSD_yDegrees.WWF_int, 0
mov ss:[bp].GBCDP_skew.GOASD_degrees.GOSD_yDegrees.WWF_frac, 0
mov ss:[bp].GBCDP_skew.GOASD_skewAnchor, 0
mov ss:[bp].GBCDP_scale.GOASD_scale.GOSD_xScale.WWF_int, 1
mov ss:[bp].GBCDP_scale.GOASD_scale.GOSD_xScale.WWF_frac, 0x2000
mov ss:[bp].GBCDP_scale.GOASD_scale.GOSD_yScale.WWF_int, 0
mov ss:[bp].GBCDP_scale.GOASD_scale.GOSD_yScale.WWF_frac, 0x8000
mov ss:[bp].GBCDP_scale.GOASD_scaleAnchor, 0
mov ax, MSG_META_CLIPBOARD_PASTE
call ObjCallInstanceNoLock
add sp, size GrObjBodyCustomDuplicateParams
.leave
ret
GrObjBodyTest3 endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjBodyTest4
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjBodyClass
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This method should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/43/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjBodyTest4 method dynamic GrObjBodyClass, MSG_GB_TEST_4
.enter
call SetNotGradient
.leave
ret
GrObjBodyTest4 endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjBodyTest5
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjBodyClass
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This method should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/53/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjBodyTest5 method dynamic GrObjBodyClass, MSG_GB_TEST_5
.enter
call SetSomeArrowheads
.leave
ret
GrObjBodyTest5 endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjBodyTest6
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjBodyClass
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This method should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/63/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjBodyTest6 method dynamic GrObjBodyClass, MSG_GB_TEST_6
.enter
call SetFilledArrowheads
.leave
ret
GrObjBodyTest6 endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjBodyTest7
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjBodyClass
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This method should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/73/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjBodyTest7 method dynamic GrObjBodyClass, MSG_GB_TEST_7
.enter
call SetBigArrowheads
.leave
ret
GrObjBodyTest7 endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjBodyTest8
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjBodyClass
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This method should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/83/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjBodyTest8 method dynamic GrObjBodyClass, MSG_GB_TEST_8
.enter
call SetNoArrowheads
.leave
ret
GrObjBodyTest8 endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjBodyTest9
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjBodyClass
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This method should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/93/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjBodyTest9 method dynamic GrObjBodyClass, MSG_GB_TEST_9
uses ax,cx,dx,bp
.enter
call SetPasteInside
.leave
ret
GrObjBodyTest9 endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjBodyTest10
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjBodyClass
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This method should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/103/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjBodyTest10 method dynamic GrObjBodyClass, MSG_GB_TEST_10
.enter
call DoPasteInside
.leave
ret
GrObjBodyTest10 endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CreateSomeObjects
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
*ds:si - body
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CreateSomeObjects proc far
ForceRef CreateSomeObjects
.enter
EC < call ECGrObjBodyCheckLMemObject >
call CreateTestObject
call CreateTestGroup
call CreateTestBitmap
call CreateTestText
call CreateTestMultText
.leave
ret
CreateSomeObjects endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CreateTestObject
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Sample code showing how to create a grobject and
add it to the body
PASS:
*ds:si - body
RETURN:
nothing
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CreateTestObject proc far
ForceRef CreateTestObject
uses ax,bx,cx,dx,bp,di,si
.enter
EC < call ECGrObjBodyCheckLMemObject >
push si ;body chunk
; Have the body create the new grobject in one of
; the blocks that it manages
;
mov cx,segment RectClass
mov dx,offset RectClass
mov ax,MSG_GB_INSTANTIATE_GROBJ
call ObjCallInstanceNoLock
; Specify the position and size of the new grobject and
; have initialize itself to the default attributes
;
mov bx,cx
mov si,dx
sub sp,size GrObjInitializeData
mov bp,sp
mov ss:[bp].GOID_position.PDF_x.DWF_int.high,0
mov ss:[bp].GOID_position.PDF_x.DWF_int.low,150
mov ss:[bp].GOID_position.PDF_x.DWF_frac,0
mov ss:[bp].GOID_position.PDF_y.DWF_int.high,0
mov ss:[bp].GOID_position.PDF_y.DWF_int.low,100
mov ss:[bp].GOID_position.PDF_y.DWF_frac,0
mov ss:[bp].GOID_width.WWF_int,190
mov ss:[bp].GOID_width.WWF_frac,0
mov ss:[bp].GOID_height.WWF_int,40
mov ss:[bp].GOID_height.WWF_frac,0
mov dx,size GrObjInitializeData
mov di,mask MF_FIXUP_DS
mov ax,MSG_GO_INITIALIZE
call ObjMessage
add sp,size GrObjInitializeData
; At this point do any additional initialization
; of grobject. Such as changing the attributes from the
; defaults, setting the radius of rounded rect, etc
;code here
; Notify object that it is complete and ready to go
;
mov ax,MSG_GO_NOTIFY_GROBJ_VALID
mov di,mask MF_FIXUP_DS
call ObjMessage
; Add the new grobject to the body and have it drawn.
; If you wish to add many grobjects and draw them all
; at once use MSG_GB_ADD_GROBJ instead.
;
mov cx,bx ;new handle
mov dx,si ;new chunk
pop si ;body chunk
mov bp,GOBAGOR_LAST or mask GOBAGOF_DRAW_LIST_POSITION
mov ax,MSG_GB_ADD_GROBJ_THEN_DRAW
call ObjCallInstanceNoLock
.leave
ret
CreateTestObject endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CreateTestGroup
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Sample code showing how to create a group, add children
to it and then add it to the body
PASS:
*ds:si - body
RETURN:
nothing
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CreateTestGroup proc far
ForceRef CreateTestGroup
uses ax,bx,cx,dx,bp,di,si
.enter
EC < call ECGrObjBodyCheckLMemObject >
push si ;body chunk
; Have the body create the new grobject in one of
; the blocks that it manages
;
mov cx,segment GroupClass
mov dx,offset GroupClass
mov ax,MSG_GB_INSTANTIATE_GROBJ
call ObjCallInstanceNoLock
; Allow the group to initialize its instance data. You
; don't need to set a position and size. The group will
; determine these when you expand it after the children
; have been added.
;
mov bx,cx ;group handle
mov si,dx ;group chunk
mov di,mask MF_FIXUP_DS
mov ax,MSG_GROUP_INITIALIZE
call ObjMessage
; Create each object where you want it in DOCUMENT coordinates
; and add it to the group. MSG_GROUP_EXPAND will
; expand the group to encompass all the children and
; set the children's positions relative to the group
;
call CreateObject1ForGroupTest
call CreateObject2ForGroupTest
; Expand the group to encompass all the children
;
mov di,mask MF_FIXUP_DS
mov ax,MSG_GROUP_EXPAND
call ObjMessage
; Notify object that it is complete and ready to go
;
mov ax,MSG_GO_NOTIFY_GROBJ_VALID
mov di,mask MF_FIXUP_DS
call ObjMessage
; Add the new grobject to the body and have it drawn.
; If you wish to add many grobjects and draw them all
; at once use MSG_GB_ADD_GROBJ instead.
;
mov cx,bx ;group handle
mov dx,si ;group chunk
pop si
mov bp,GOBAGOR_LAST or mask GOBAGOF_DRAW_LIST_POSITION
mov ax,MSG_GB_ADD_GROBJ_THEN_DRAW
call ObjCallInstanceNoLock
.leave
ret
CreateTestGroup endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CreateObject1ForGroupTest
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Sample code showing how to create a grobject and
add it to the grobj
PASS:
^lbx:si - group
RETURN:
nothing
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CreateObject1ForGroupTest proc far
ForceRef CreateObject1ForGroupTest
uses ax,cx,dx,bp,di
.enter
push bx,si ;group od
; Have the group create the new grobject in one of
; the blocks that its body manages
;
mov cx,segment LineClass
mov dx,offset LineClass
mov ax,MSG_GROUP_INSTANTIATE_GROBJ
mov di,mask MF_CALL
call ObjMessage
; Specify the position and size of the new grobject and
; have initialize itself to the default attributes.
; NOTE: Position the grobject where you want it in
; DOCUMENT coordinates. When you are done adding
; children the group will expand to encompass all
; the children add will adjust the position of the
; children to be relative to the group.
;
mov bx,cx
mov si,dx
sub sp,size GrObjInitializeData
mov bp,sp
mov ss:[bp].GOID_position.PDF_x.DWF_int.high,0
mov ss:[bp].GOID_position.PDF_x.DWF_int.low,150
mov ss:[bp].GOID_position.PDF_x.DWF_frac,0
mov ss:[bp].GOID_position.PDF_y.DWF_int.high,0
mov ss:[bp].GOID_position.PDF_y.DWF_int.low,100
mov ss:[bp].GOID_position.PDF_y.DWF_frac,0
mov ss:[bp].GOID_width.WWF_int,100
mov ss:[bp].GOID_width.WWF_frac,0
mov ss:[bp].GOID_height.WWF_int,200
mov ss:[bp].GOID_height.WWF_frac,0
mov dx,size GrObjInitializeData
mov di,mask MF_FIXUP_DS
mov ax,MSG_GO_INITIALIZE
call ObjMessage
add sp,size GrObjInitializeData
; At this point do any additional initialization
; of grobject. Such as changing the attributes from the
; defaults, setting the radius of rounded rect, etc
;code here
; Notify object that it is complete and ready to go
;
mov ax,MSG_GO_NOTIFY_GROBJ_VALID
mov di,mask MF_FIXUP_DS
call ObjMessage
mov cx,bx ;new handle
mov dx,si ;new chunk
; Add object to group
;
pop bx,si ;group od
mov bp,GAGOF_LAST
mov di,mask MF_FIXUP_DS
mov ax,MSG_GROUP_ADD_GROBJ
call ObjMessage
.leave
ret
CreateObject1ForGroupTest endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CreateObject2ForGroupTest
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Sample code showing how to create a grobject and
add it to the group
PASS:
^lbx:si - group
RETURN:
nothing
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CreateObject2ForGroupTest proc far
ForceRef CreateObject2ForGroupTest
uses ax,cx,dx,bp,di
.enter
push bx,si ;group od
; Have the group create the new grobject in one of
; the blocks that its body manages
;
mov cx,segment EllipseClass
mov dx,offset EllipseClass
mov di,mask MF_CALL
mov ax,MSG_GROUP_INSTANTIATE_GROBJ
call ObjMessage
; Specify the position and size of the new grobject and
; have initialize itself to the default attributes
; NOTE: Position the grobject where you want it in
; DOCUMENT coordinates. When you are done adding
; children the group will expand to encompass all
; the children add will adjust the position of the
; children to be relative to the group.
;
mov bx,cx
mov si,dx
sub sp,size GrObjInitializeData
mov bp,sp
mov ss:[bp].GOID_position.PDF_x.DWF_int.high,0
mov ss:[bp].GOID_position.PDF_x.DWF_int.low,100
mov ss:[bp].GOID_position.PDF_x.DWF_frac,0
mov ss:[bp].GOID_position.PDF_y.DWF_int.high,0
mov ss:[bp].GOID_position.PDF_y.DWF_int.low,150
mov ss:[bp].GOID_position.PDF_y.DWF_frac,0
mov ss:[bp].GOID_width.WWF_int,250
mov ss:[bp].GOID_width.WWF_frac,0
mov ss:[bp].GOID_height.WWF_int,70
mov ss:[bp].GOID_height.WWF_frac,0
mov dx,size GrObjInitializeData
mov di,mask MF_FIXUP_DS
mov ax,MSG_GO_INITIALIZE
call ObjMessage
add sp,size GrObjInitializeData
; At this point do any additional initialization
; of grobject. Such as changing the attributes from the
; defaults, setting the radius of rounded rect, etc
;code here
; Notify object that it is complete and ready to go
;
mov ax,MSG_GO_NOTIFY_GROBJ_VALID
mov di,mask MF_FIXUP_DS
call ObjMessage
mov cx,bx ;new handle
mov dx,si ;new chunk
; Add object to group
;
pop bx,si ;group od
mov bp,GAGOF_LAST
mov di,mask MF_FIXUP_DS
mov ax,MSG_GROUP_ADD_GROBJ
call ObjMessage
.leave
ret
CreateObject2ForGroupTest endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CreateTestBitmap
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Sample code showing how to create a grobject and
add it to the body
PASS:
*ds:si - body
RETURN:
nothing
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CreateTestBitmap proc far
ForceRef CreateTestBitmap
uses ax,bx,cx,dx,bp,di,si
.enter
EC < call ECGrObjBodyCheckLMemObject >
push si ;body chunk
; Have the body create the new grobject in one of
; the blocks that it manages
;
mov cx,segment BitmapGuardianClass
mov dx,offset BitmapGuardianClass
mov ax,MSG_GB_INSTANTIATE_GROBJ
call ObjCallInstanceNoLock
; Specify the position and size of the new grobject and
; have initialize itself to the default attributes
;
mov bx,cx
mov si,dx
sub sp,size GrObjInitializeData
mov bp,sp
mov ss:[bp].GOID_position.PDF_x.DWF_int.high,0
mov ss:[bp].GOID_position.PDF_x.DWF_int.low,250
mov ss:[bp].GOID_position.PDF_x.DWF_frac,0
mov ss:[bp].GOID_position.PDF_y.DWF_int.high,0
mov ss:[bp].GOID_position.PDF_y.DWF_int.low,250
mov ss:[bp].GOID_position.PDF_y.DWF_frac,0
mov ss:[bp].GOID_width.WWF_int,72
mov ss:[bp].GOID_width.WWF_frac,0
mov ss:[bp].GOID_height.WWF_int,72
mov ss:[bp].GOID_height.WWF_frac,0
mov dx,size GrObjInitializeData
mov di,mask MF_FIXUP_DS
mov ax,MSG_GO_INITIALIZE
call ObjMessage
add sp,size GrObjInitializeData
; At this point do any additional initialization
; of grobject. Such as changing the attributes from the
; defaults, setting the radius of rounded rect, etc
;code here
; Notify object that it is complete and ready to go
;
mov ax,MSG_GO_NOTIFY_GROBJ_VALID
mov di,mask MF_FIXUP_DS
call ObjMessage
; Add the new grobject to the body and have it drawn.
; If you wish to add many grobjects and draw them all
; at once use MSG_GB_ADD_GROBJ instead.
;
mov cx,bx ;new handle
mov dx,si ;new chunk
pop si ;body chunk
mov bp,GOBAGOR_LAST or mask GOBAGOF_DRAW_LIST_POSITION
mov ax,MSG_GB_ADD_GROBJ_THEN_DRAW
call ObjCallInstanceNoLock
.leave
ret
CreateTestBitmap endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CreateTestText
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Sample code showing how to create a grobject and
add it to the body. This creates a single char/para
attr text object.
PASS:
*ds:si - body
RETURN:
nothing
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CreateTestText proc far
ForceRef CreateTestText
uses ax,bx,cx,dx,bp,di,si
.enter
EC < call ECGrObjBodyCheckLMemObject >
push si ;body chunk
; Have the body create the new grobject in one of
; the blocks that it manages
;
mov cx,segment TextGuardianClass
mov dx,offset TextGuardianClass
mov ax,MSG_GB_INSTANTIATE_GROBJ
call ObjCallInstanceNoLock
; Specify the position and size of the new grobject and
; have initialize itself to the default attributes
;
mov bx,cx
mov si,dx
sub sp,size GrObjInitializeData
mov bp,sp
mov ss:[bp].GOID_position.PDF_x.DWF_int.high,0
mov ss:[bp].GOID_position.PDF_x.DWF_int.low,72
mov ss:[bp].GOID_position.PDF_x.DWF_frac,0
mov ss:[bp].GOID_position.PDF_y.DWF_int.high,0
mov ss:[bp].GOID_position.PDF_y.DWF_int.low,10
mov ss:[bp].GOID_position.PDF_y.DWF_frac,0
mov ss:[bp].GOID_width.WWF_int,144
mov ss:[bp].GOID_width.WWF_frac,0
mov ss:[bp].GOID_height.WWF_int,72
mov ss:[bp].GOID_height.WWF_frac,0
mov dx,size GrObjInitializeData
mov di,mask MF_FIXUP_DS
mov ax,MSG_GO_INITIALIZE
call ObjMessage
add sp,size GrObjInitializeData
; At this point do any additional initialization
; of grobject. Such as changing the attributes from the
; defaults, setting the radius of rounded rect, etc
;code here
; Notify object that it is complete and ready to go
;
mov ax,MSG_GO_NOTIFY_GROBJ_VALID
mov di,mask MF_FIXUP_DS
call ObjMessage
; Add the new grobject to the body and have it drawn.
; If you wish to add many grobjects and draw them all
; at once use MSG_GB_ADD_GROBJ instead.
;
mov cx,bx ;new handle
mov dx,si ;new chunk
pop si ;body chunk
mov bp,GOBAGOR_LAST or mask GOBAGOF_DRAW_LIST_POSITION
mov ax,MSG_GB_ADD_GROBJ_THEN_DRAW
call ObjCallInstanceNoLock
.leave
ret
CreateTestText endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CreateTestMultText
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Sample code showing how to create a grobject and
add it to the body. This creates a multi char/para
attr text object that uses the style arrays.
PASS:
*ds:si - body
RETURN:
nothing
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CreateTestMultText proc far
ForceRef CreateTestMultText
uses ax,bx,cx,dx,bp,di,si
.enter
EC < call ECGrObjBodyCheckLMemObject >
push si ;body chunk
; Have the body create the new grobject in one of
; the blocks that it manages
;
mov cx,segment MultTextGuardianClass
mov dx,offset MultTextGuardianClass
mov ax,MSG_GB_INSTANTIATE_GROBJ
call ObjCallInstanceNoLock
; Specify the position and size of the new grobject and
; have initialize itself to the default attributes
;
mov bx,cx
mov si,dx
sub sp,size GrObjInitializeData
mov bp,sp
mov ss:[bp].GOID_position.PDF_x.DWF_int.high,0
mov ss:[bp].GOID_position.PDF_x.DWF_int.low,400
mov ss:[bp].GOID_position.PDF_x.DWF_frac,0
mov ss:[bp].GOID_position.PDF_y.DWF_int.high,0
mov ss:[bp].GOID_position.PDF_y.DWF_int.low,10
mov ss:[bp].GOID_position.PDF_y.DWF_frac,0
mov ss:[bp].GOID_width.WWF_int,200
mov ss:[bp].GOID_width.WWF_frac,0
mov ss:[bp].GOID_height.WWF_int,72
mov ss:[bp].GOID_height.WWF_frac,0
mov dx,size GrObjInitializeData
mov di,mask MF_FIXUP_DS
mov ax,MSG_GO_INITIALIZE
call ObjMessage
add sp,size GrObjInitializeData
; At this point do any additional initialization
; of grobject. Such as changing the attributes from the
; defaults, setting the radius of rounded rect, etc
;code here
; Notify object that it is complete and ready to go
;
mov ax,MSG_GO_NOTIFY_GROBJ_VALID
mov di,mask MF_FIXUP_DS
call ObjMessage
; Add the new grobject to the body and have it drawn.
; If you wish to add many grobjects and draw them all
; at once use MSG_GB_ADD_GROBJ instead.
;
mov cx,bx ;new handle
mov dx,si ;new chunk
pop si ;body chunk
mov bp,GOBAGOR_LAST or mask GOBAGOF_DRAW_LIST_POSITION
mov ax,MSG_GB_ADD_GROBJ_THEN_DRAW
call ObjCallInstanceNoLock
.leave
ret
CreateTestMultText endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CheckPositionAndSize
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
^lcx:dx - grobject
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CheckPositionAndSize proc far
ForceRef CheckPositionAndSize
uses ax,bx,cx,dx,di,si,bp
.enter
mov bx,cx
mov si,dx
mov ax,MSG_GO_GET_SIZE
mov di,mask MF_FIXUP_DS or mask MF_CALL
call ObjMessage
checkSize:
ForceRef checkSize
sub sp,size PointDWFixed
mov bp,sp
mov ax,MSG_GO_GET_POSITION
mov di,mask MF_FIXUP_DS or mask MF_CALL
mov dx, size PointDWFixed
call ObjMessage
checkPosition:
ForceRef checkPosition
add sp,size PointDWFixed
.leave
ret
CheckPositionAndSize endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetPointerTool
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetPointerTool proc far
ForceRef SetPointerTool
.enter
mov cx,segment PointerClass
mov dx,offset PointerClass
mov di, mask MF_FIXUP_DS
mov ax,MSG_GH_SET_CURRENT_TOOL
call GrObjBodyMessageToHead
.leave
ret
SetPointerTool endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetRotatePointerTool
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetRotatePointerTool proc far
ForceRef SetRotatePointerTool
.enter
mov cx,segment RotatePointerClass
mov dx,offset RotatePointerClass
mov di, mask MF_FIXUP_DS
mov ax,MSG_GH_SET_CURRENT_TOOL
call GrObjBodyMessageToHead
.leave
ret
SetRotatePointerTool endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetArcTool
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetArcTool proc far
ForceRef SetArcTool
.enter
mov cx,segment ArcClass
mov dx,offset ArcClass
mov di, mask MF_FIXUP_DS
mov ax,MSG_GH_SET_CURRENT_TOOL
call GrObjBodyMessageToHead
.leave
ret
SetArcTool endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetRectTool
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetRectTool proc far
ForceRef SetRectTool
uses cx,dx,di,ax
.enter
mov cx,segment RectClass
mov dx,offset RectClass
mov di, mask MF_FIXUP_DS
mov ax,MSG_GH_SET_CURRENT_TOOL
call GrObjBodyMessageToHead
.leave
ret
SetRectTool endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetActionNotification
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 4/ 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetActionNotification proc far
ForceRef SetActionNotification
.enter
; For wacky testing of notification have object send
; testing message to body to randomly set the default
; area attributes after the object has been created.
mov ax,MSG_GO_SET_ACTION_NOTIFICATION_OUTPUT
mov cx,ds:[LMBH_handle]
mov dx,si
mov bp,MSG_GB_TEST_6
mov di,mask MF_RECORD
mov bx,segment GrObjClass
push si
mov si,offset GrObjClass
call ObjMessage
pop si
mov cx,di
mov ax,MSG_GH_CLASSED_EVENT_TO_FLOATER
mov di,mask MF_FIXUP_DS
call GrObjBodyMessageToHead
.leave
ret
SetActionNotification endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetBitmapGuardianTool
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetBitmapGuardianTool proc far
ForceRef SetBitmapGuardianTool
.enter
mov cx,segment BitmapGuardianClass
mov dx,offset BitmapGuardianClass
mov bp,VWTAS_INACTIVE
mov di, mask MF_FIXUP_DS
mov ax,MSG_GH_SET_CURRENT_TOOL
call GrObjBodyMessageToHead
.leave
ret
SetBitmapGuardianTool endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetBitmapPencilTool
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetBitmapPencilTool proc far
ForceRef SetBitmapPencilTool
.enter
mov cx,segment BitmapGuardianClass
mov dx,offset BitmapGuardianClass
mov bp,VWTAS_ACTIVE
mov di, mask MF_FIXUP_DS
mov ax,MSG_GH_SET_CURRENT_TOOL
call GrObjBodyMessageToHead
; Activate tool in child
; Pass class
;
push si
clr di ;MessageFlags
mov ax,MSG_BG_SET_TOOL_CLASS
mov cx,segment PencilToolClass
mov dx,offset PencilToolClass
ornf di,mask MF_RECORD
mov bx,segment BitmapGuardianClass
mov si,offset BitmapGuardianClass
call ObjMessage
mov cx,di ;event handle
mov ax,MSG_GH_CLASSED_EVENT_TO_FLOATER
mov di,mask MF_FIXUP_DS
pop si
call GrObjBodyMessageToHead
.leave
ret
SetBitmapPencilTool endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetBitmapLineTool
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetBitmapLineTool proc far
ForceRef SetBitmapLineTool
.enter
mov cx,segment BitmapGuardianClass
mov dx,offset BitmapGuardianClass
mov bp,VWTAS_ACTIVE
mov di, mask MF_FIXUP_DS
mov ax,MSG_GH_SET_CURRENT_TOOL
call GrObjBodyMessageToHead
; Activate tool in child
; Pass class
;
push si
clr di ;MessageFlags
mov ax,MSG_BG_SET_TOOL_CLASS
mov cx,segment LineToolClass
mov dx,offset LineToolClass
ornf di,mask MF_RECORD
mov bx,segment BitmapGuardianClass
mov si,offset BitmapGuardianClass
call ObjMessage
mov cx,di ;event handle
mov ax,MSG_GH_CLASSED_EVENT_TO_FLOATER
mov di,mask MF_FIXUP_DS
pop si
call GrObjBodyMessageToHead
.leave
ret
SetBitmapLineTool endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetLineTool
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetLineTool proc far
ForceRef SetLineTool
.enter
mov cx,segment LineClass
mov dx,offset LineClass
mov di, mask MF_FIXUP_DS
mov ax,MSG_GH_SET_CURRENT_TOOL
call GrObjBodyMessageToHead
.leave
ret
SetLineTool endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetRandomAttributes
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetRandomAttributes proc far
ForceRef SetRandomAttributes
.enter
call TimerGetDateAndTime
mov bx,dx
mov cl,ds:[bx]
add bx,cx
mov ch,ds:[bx]
add bx,cx
mov dl,ds:[bx]
mov ax,MSG_GO_SET_AREA_COLOR
clr di
call SendEncapsulatedGrObjClassMessageToBody
andnf cl, 0x07
mov ax,MSG_GO_SET_AREA_MASK
clr di
call SendEncapsulatedGrObjClassMessageToBody
mov cl, TRUE
mov ax,MSG_GO_SET_TRANSPARENCY
clr di
call SendEncapsulatedGrObjClassMessageToBody
.leave
ret
SetRandomAttributes endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetLineGreen
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetLineGreen proc far
ForceRef SetLineGreen
.enter
mov cl,0
mov ch,255
mov dl,0
mov ax,MSG_GO_SET_LINE_COLOR
clr di
call SendEncapsulatedGrObjClassMessageToBody
.leave
ret
SetLineGreen endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
RotateObjects
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
RotateObjects proc far
ForceRef RotateObjects
.enter
mov cx,15
clr dx
clr bp ;about center
mov ax,MSG_GO_ROTATE
clr di
call SendEncapsulatedGrObjClassMessageToBody
.leave
ret
RotateObjects endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetArcStartAngle
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetArcStartAngle proc far
ForceRef SetArcStartAngle
.enter
mov dx,90
clr cx
mov ax,MSG_ARC_SET_START_ANGLE
clr di
call SendEncapsulatedArcClassMessageToBody
.leave
ret
SetArcStartAngle endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetArcEndAngle
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetArcEndAngle proc far
ForceRef SetArcEndAngle
.enter
mov dx,275
clr cx
mov ax,MSG_ARC_SET_END_ANGLE
clr di
call SendEncapsulatedArcClassMessageToBody
.leave
ret
SetArcEndAngle endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MakeArcAChord
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MakeArcAChord proc far
ForceRef MakeArcAChord
.enter
mov cx,ACT_CHORD
mov ax,MSG_ARC_SET_ARC_CLOSE_TYPE
clr di
call SendEncapsulatedArcClassMessageToBody
.leave
ret
MakeArcAChord endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MakeArcAPie
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MakeArcAPie proc far
ForceRef MakeArcAPie
.enter
mov cx,ACT_PIE
mov ax,MSG_ARC_SET_ARC_CLOSE_TYPE
clr di
call SendEncapsulatedArcClassMessageToBody
.leave
ret
MakeArcAPie endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SkewObjects
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SkewObjects proc far
ForceRef SkewObjects
.enter
sub sp,size GrObjAnchoredSkewData
mov bp,sp
mov dx,size GrObjAnchoredSkewData
mov ss:[bp].GOASD_degrees.GOSD_xDegrees.WWF_int,10
mov ss:[bp].GOASD_degrees.GOSD_xDegrees.WWF_frac,0
mov ss:[bp].GOASD_degrees.GOSD_yDegrees.WWF_int,20
mov ss:[bp].GOASD_degrees.GOSD_yDegrees.WWF_frac,0
mov ss:[bp].GOASD_skewAnchor,HANDLE_MOVE
mov ax,MSG_GO_SKEW
mov di,mask MF_STACK
call SendEncapsulatedGrObjClassMessageToBody
add sp, size GrObjAnchoredSkewData
.leave
ret
SkewObjects endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ClearObjects
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ClearObjects proc far
ForceRef ClearObjects
.enter
mov ax,MSG_GO_CLEAR
clr di
call SendEncapsulatedGrObjClassMessageToBody
.leave
ret
ClearObjects endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetObjectsSize
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetObjectsSize proc far
ForceRef SetObjectsSize
uses bp,di
.enter
sub sp,size PointWWFixed
mov bp,sp
mov ss:[bp].PF_x.WWF_int,144
mov ss:[bp].PF_x.WWF_frac,0x4000
mov ss:[bp].PF_y.WWF_int,72
mov ss:[bp].PF_y.WWF_frac,0xc000
mov ax,MSG_GO_SET_SIZE
clr di
call SendEncapsulatedGrObjClassMessageToBody
add sp,size PointWWFixed
.leave
ret
SetObjectsSize endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetObjectsPosition
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetObjectsPosition proc far
ForceRef SetObjectsPosition
uses bp,di
.enter
sub sp,size PointDWFixed
mov bp,sp
mov ss:[bp].PDF_x.DWF_int.high,0
mov ss:[bp].PDF_x.DWF_int.low,144
mov ss:[bp].PDF_x.DWF_frac,0x4000
mov ss:[bp].PDF_y.DWF_int.high,0
mov ss:[bp].PDF_y.DWF_int.low,72
mov ss:[bp].PDF_y.DWF_frac,0xc000
mov ax,MSG_GO_SET_POSITION
clr di
call SendEncapsulatedGrObjClassMessageToBody
add sp,size PointDWFixed
.leave
ret
SetObjectsPosition endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetResizeClearMoveLocks
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetResizeClearMoveLocks proc far
ForceRef SetResizeClearMoveLocks
uses cx,dx,di
.enter
mov dx, mask GOL_MOVE
mov cx, mask GOL_RESIZE
mov ax,MSG_GO_CHANGE_LOCKS
clr di
call SendEncapsulatedGrObjClassMessageToBody
.leave
ret
SetResizeClearMoveLocks endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetMoveClearResizeLocks
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetMoveClearResizeLocks proc far
ForceRef SetMoveClearResizeLocks
uses cx,dx,di
.enter
mov cx, mask GOL_MOVE
mov dx, mask GOL_RESIZE
mov ax,MSG_GO_CHANGE_LOCKS
clr di
call SendEncapsulatedGrObjClassMessageToBody
.leave
ret
SetMoveClearResizeLocks endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
NudgeObjects
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
NudgeObjects proc far
ForceRef NudgeObjects
.enter
mov cx,1
mov dx,1
mov ax,MSG_GO_NUDGE
clr di
call SendEncapsulatedGrObjClassMessageToBody
.leave
ret
NudgeObjects endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SuspendActionNotification
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SuspendActionNotification proc far
ForceRef SuspendActionNotification
uses ax,di
.enter
mov ax,MSG_GO_SUSPEND_ACTION_NOTIFICATION
clr di
call SendEncapsulatedGrObjClassMessageToBody
.leave
ret
SuspendActionNotification endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
UnsuspendActionNotification
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UnsuspendActionNotification proc far
ForceRef UnsuspendActionNotification
uses ax,di
.enter
mov ax,MSG_GO_UNSUSPEND_ACTION_NOTIFICATION
clr di
call SendEncapsulatedGrObjClassMessageToBody
.leave
ret
UnsuspendActionNotification endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ClearActionNotification
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ClearActionNotification proc far
ForceRef ClearActionNotification
uses ax,di,cx
.enter
clr cx
mov ax,MSG_GO_SET_ACTION_NOTIFICATION_OUTPUT
clr di
call SendEncapsulatedGrObjClassMessageToBody
.leave
ret
ClearActionNotification endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SendEcapsulatedGrObjClassMessageToBody
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
ds:si - body
ax - message
cx,dx,bp - other data
di - O or MF_STACK
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SendEncapsulatedGrObjClassMessageToBody proc far
uses ax,bx,cx,dx,bp,di,si
.enter
push si
mov bx,segment GrObjClass
mov si,offset GrObjClass
ornf di,mask MF_RECORD
call ObjMessage
mov cx,di
mov ax,MSG_META_SEND_CLASSED_EVENT
mov dx,TO_TARGET
pop si
call ObjCallInstanceNoLock
.leave
ret
SendEncapsulatedGrObjClassMessageToBody endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SendEcapsulatedArcClassMessageToBody
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
ds:si - body
ax - message
cx,dx,bp - other data
di - O or MF_STACK
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SendEncapsulatedArcClassMessageToBody proc far
uses ax,bx,cx,dx,bp,di,si
.enter
push si
mov bx,segment ArcClass
mov si,offset ArcClass
ornf di,mask MF_RECORD
call ObjMessage
mov cx,di
mov ax,MSG_META_SEND_CLASSED_EVENT
mov dx,TO_TARGET
pop si
call ObjCallInstanceNoLock
.leave
ret
SendEncapsulatedArcClassMessageToBody endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
InsertDeleteSpace
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
InsertDeleteSpace proc far
ForceRef InsertDeleteSpace
uses ax,bp
.enter
sub sp,size InsertDeleteSpaceParams
mov bp,sp
mov ss:[bp].IDSP_space.PDF_x.DWF_int.high,0xffff
mov ss:[bp].IDSP_space.PDF_x.DWF_int.low,0xffa0
mov ss:[bp].IDSP_space.PDF_x.DWF_frac,0
mov ss:[bp].IDSP_space.PDF_y.DWF_int.high,0xffff
mov ss:[bp].IDSP_space.PDF_y.DWF_int.low,0xffc0
mov ss:[bp].IDSP_space.PDF_y.DWF_frac,0
mov ss:[bp].IDSP_position.PDF_x.DWF_int.high,0
mov ss:[bp].IDSP_position.PDF_y.DWF_int.high,0
mov ss:[bp].IDSP_position.PDF_x.DWF_int.low,72
mov ss:[bp].IDSP_position.PDF_y.DWF_int.low,100
mov ss:[bp].IDSP_position.PDF_x.DWF_frac,0
mov ss:[bp].IDSP_position.PDF_y.DWF_frac,0
mov ss:[bp].IDSP_type, 0xffff ;set em all
mov ax,MSG_VIS_LAYER_INSERT_OR_DELETE_SPACE
call ObjCallInstanceNoLock
add sp,size InsertDeleteSpaceParams
.leave
ret
InsertDeleteSpace endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MakeInstructionObject
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MakeInstructionObject proc far
ForceRef MakeInstructionObject
.enter
mov ax,MSG_GO_MAKE_INSTRUCTION
clr di
call SendEncapsulatedGrObjClassMessageToBody
.leave
ret
MakeInstructionObject endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MakeNotInstructionObject
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MakeNotInstructionObject proc far
ForceRef MakeNotInstructionObject
.enter
mov ax,MSG_GO_MAKE_NOT_INSTRUCTION
clr di
call SendEncapsulatedGrObjClassMessageToBody
.leave
ret
MakeNotInstructionObject endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetWrapTextType
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetWrapTextType proc far
ForceRef SetWrapTextType
.enter
mov cl,GOWTT_WRAP_AROUND_RECT
mov ax,MSG_GO_SET_WRAP_TEXT_TYPE
clr di
call SendEncapsulatedGrObjClassMessageToBody
.leave
ret
SetWrapTextType endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetSomeBits
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetSomeBits proc far
ForceRef SetSomeBits
.enter
mov cl,TRUE
mov ax,MSG_GO_SET_PASTE_INSIDE
clr di
call SendEncapsulatedGrObjClassMessageToBody
mov cl,TRUE
mov ax,MSG_GO_SET_INSERT_DELETE_MOVE_ALLOWED
clr di
call SendEncapsulatedGrObjClassMessageToBody
mov cl,FALSE
mov ax,MSG_GO_SET_INSERT_DELETE_RESIZE_ALLOWED
clr di
call SendEncapsulatedGrObjClassMessageToBody
mov cl,TRUE
mov ax,MSG_GO_SET_INSERT_DELETE_DELETE_ALLOWED
clr di
call SendEncapsulatedGrObjClassMessageToBody
.leave
ret
SetSomeBits endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MakeInstructionsSelectableAndEditable
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjBodyClass
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This method should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/93/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MakeInstructionsSelectableAndEditable proc far
ForceRef MakeInstructionsSelectableAndEditable
uses ax,cx,dx,bp
.enter
mov ax,MSG_GB_MAKE_INSTRUCTIONS_SELECTABLE_AND_EDITABLE
call ObjCallInstanceNoLock
.leave
ret
MakeInstructionsSelectableAndEditable endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MakeInstructionsUnselectableAndUneditable
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjBodyClass
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This method should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/93/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MakeInstructionsUnselectableAndUneditable proc far
ForceRef MakeInstructionsUnselectableAndUneditable
uses ax,cx,dx,bp
.enter
mov ax,MSG_GB_MAKE_INSTRUCTIONS_UNSELECTABLE_AND_UNEDITABLE
call ObjCallInstanceNoLock
.leave
ret
MakeInstructionsUnselectableAndUneditable endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetGrObjDrawFlags
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjBodyClass
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This method should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/93/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetGrObjDrawFlags proc far
ForceRef SetGrObjDrawFlags
.enter
mov cx,mask GODF_DRAW_WRAP_TEXT_AROUND_ONLY
mov dx,mask GODF_DRAW_OBJECTS_ONLY
mov ax,MSG_GB_SET_GROBJ_DRAW_FLAGS
call ObjCallInstanceNoLock
.leave
ret
SetGrObjDrawFlags endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ClearInstructions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ClearInstructions proc far
ForceRef ClearInstructions
.enter
mov ax,MSG_GB_DELETE_INSTRUCTIONS
call ObjCallInstanceNoLock
.leave
ret
ClearInstructions endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetBasicGradientInfo
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetBasicGradientInfo proc far
ForceRef SetBasicGradientInfo
uses ax,cx,dx,di
.enter
mov ax,MSG_META_SUSPEND
call ObjCallInstanceNoLock
mov cl,GOAAET_GRADIENT
mov ax,MSG_GO_SET_AREA_ATTR_ELEMENT_TYPE
clr di
call SendEncapsulatedGrObjClassMessageToBody
mov cl,GOGT_LEFT_TO_RIGHT
mov ax,MSG_GO_SET_GRADIENT_TYPE
clr di
call SendEncapsulatedGrObjClassMessageToBody
mov cx,40
mov ax,MSG_GO_SET_NUMBER_OF_GRADIENT_INTERVALS
clr di
call SendEncapsulatedGrObjClassMessageToBody
mov ax,MSG_META_UNSUSPEND
call ObjCallInstanceNoLock
.leave
ret
SetBasicGradientInfo endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetGradientTopToBottom
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetGradientTopToBottom proc far
ForceRef SetGradientTopToBottom
uses ax,cx,di
.enter
mov cl,GOGT_TOP_TO_BOTTOM
mov ax,MSG_GO_SET_GRADIENT_TYPE
clr di
call SendEncapsulatedGrObjClassMessageToBody
.leave
ret
SetGradientTopToBottom endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetGradientIntervals
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetGradientIntervals proc far
ForceRef SetGradientIntervals
uses ax,cx,dx,di
.enter
mov cx,100
mov ax,MSG_GO_SET_NUMBER_OF_GRADIENT_INTERVALS
clr di
call SendEncapsulatedGrObjClassMessageToBody
.leave
ret
SetGradientIntervals endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetNotGradient
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetNotGradient proc far
ForceRef SetNotGradient
uses ax,cx,di
.enter
mov cl,GOAAET_BASE
mov ax,MSG_GO_SET_AREA_ATTR_ELEMENT_TYPE
clr di
call SendEncapsulatedGrObjClassMessageToBody
.leave
ret
SetNotGradient endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetSomeArrowheads
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetSomeArrowheads proc far
ForceRef SetSomeArrowheads
uses ax,cx,di
.enter
mov cl,TRUE
mov ax,MSG_GO_SET_ARROWHEAD_ON_END
clr di
call SendEncapsulatedGrObjClassMessageToBody
mov cl,FALSE
mov ax,MSG_GO_SET_ARROWHEAD_FILLED
clr di
call SendEncapsulatedGrObjClassMessageToBody
.leave
ret
SetSomeArrowheads endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetFilledArrowheads
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetFilledArrowheads proc far
ForceRef SetFilledArrowheads
uses ax,cx,di
.enter
mov cl,TRUE
mov ax,MSG_GO_SET_ARROWHEAD_ON_END
clr di
call SendEncapsulatedGrObjClassMessageToBody
mov cl,TRUE
mov ax,MSG_GO_SET_ARROWHEAD_FILLED
clr di
call SendEncapsulatedGrObjClassMessageToBody
.leave
ret
SetFilledArrowheads endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetBigArrowheads
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetBigArrowheads proc far
ForceRef SetBigArrowheads
uses ax,cx,di
.enter
mov cl,TRUE
mov ax,MSG_GO_SET_ARROWHEAD_ON_END
clr di
call SendEncapsulatedGrObjClassMessageToBody
mov cl,25
mov ax,MSG_GO_SET_ARROWHEAD_ANGLE
clr di
call SendEncapsulatedGrObjClassMessageToBody
mov cl,25
mov ax,MSG_GO_SET_ARROWHEAD_LENGTH
clr di
call SendEncapsulatedGrObjClassMessageToBody
.leave
ret
SetBigArrowheads endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetNoArrowheads
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetNoArrowheads proc far
ForceRef SetNoArrowheads
uses ax,cx,di
.enter
mov cl,FALSE
mov ax,MSG_GO_SET_ARROWHEAD_ON_END
clr di
call SendEncapsulatedGrObjClassMessageToBody
.leave
ret
SetNoArrowheads endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetPasteInside
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetPasteInside proc far
ForceRef SetPasteInside
.enter
mov cl,TRUE
mov ax,MSG_GO_SET_PASTE_INSIDE
clr di
call SendEncapsulatedGrObjClassMessageToBody
.leave
ret
SetPasteInside endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MakeAttrsDefault
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MakeAttrsDefault proc far
ForceRef MakeAttrsDefault
.enter
mov ax,MSG_GO_MAKE_ATTRS_DEFAULT
clr di
call SendEncapsulatedGrObjClassMessageToBody
.leave
ret
MakeAttrsDefault endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DoPasteInside
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DoPasteInside proc far
ForceRef DoPasteInside
.enter
mov ax,MSG_GB_PASTE_INSIDE
call ObjCallInstanceNoLock
.leave
ret
DoPasteInside endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Hide
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
Hide proc far
ForceRef Hide
.enter
mov ax,MSG_GB_HIDE_UNSELECTED_GROBJS
call ObjCallInstanceNoLock
.leave
ret
Hide endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Show
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN:
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
Show proc far
ForceRef Show
.enter
mov ax,MSG_GB_SHOW_ALL_GROBJS
call ObjCallInstanceNoLock
.leave
ret
Show endp
BodyTestCode ends
|
maps/MapData.asm | sleepingburrito/BackIsle | 1 | 98498 | ;maps are 6x6 screen
;screen is 20x18 tiles
;map data has meta data for walls and tile pattern id and bank
SECTION "MapData",ROMX,BANK[3]
include "maps/Floor0TileMap.asm"
include "maps/Floor0MetaData.asm"
;SECTION "MapData",ROMX,BANK[4]
;include "maps/Floor1TileMap.asm"
;include "maps/Floor1MetaData.asm"
;SECTION "MapData",ROMX,BANK[5]
;include "maps/Floor2TileMap.asm"
;include "maps/Floor2MetaData.asm" |
tests/parsing/while.asm | fengjixuchui/sjasmplus | 220 | 177483 | <gh_stars>100-1000
; docs example:
ptr = $4000
WHILE ptr < $4020
DB low ptr
ptr = ptr + 1
EDUP
; other tests
DEVICE ZXSPECTRUMNEXT : ORG $8000
searchMem:
DB 0, 0, 0, 0
needle:
DB 1
DB 0, 0, 0, 0
searchMemEnd:
ptr = searchMem
WHILE (ptr < searchMemEnd) && ({b ptr} == 0) ; search for "1" in memory
; ^ keep in mind {b ..} reads as zero until last pass
ptr = ptr + 1
ENDW
ASSERT needle == ptr
WHILE needle <= ptr + 3 ; nested whiles
WHILE needle <= ptr + 1
ptr = ptr - 1
ENDW
ptr = ptr - 1
ENDW
ASSERT needle == ptr + 4
; syntax errors/warnings
WHILE
ENDW
WHILE @
nop
ENDW
WHILE fwdLabel < $8000
ASSERT 0
ENDW
fwdLabel:
; test the infinite-loop guardian (default 100k)
cnt = 0
OPT push listmc
WHILE cnt <= 100000
cnt = cnt + 1
ENDW
OPT pop
; test custom-explicit infinite-loop guardian
cnt = 0
WHILE cnt < 2, 2 ; looping twice with guardian "2" => without error
cnt = cnt + 1
ENDW
cnt = 0
WHILE cnt < 4, 2 ; looping trice with guardian "2" => error
cnt = cnt + 1
ENDW
cnt = 0
WHILE cnt < 2, @ ; syntax error in guardian-couner value
cnt = cnt + 1
ENDW
|
tutorial/src/window1_callbacks.ads | Blady-Com/Gate3 | 1 | 27377 | <filename>tutorial/src/window1_callbacks.ads
-----------------------------------------------------------------------------
-- Legal licensing note : !!! Edit the file gate3_license.txt !!!
--
-- Copyright (c) <NAME> - 2013
-- Berry
-- FRANCE
-- Send bug reports or feedback to : <EMAIL>
--
-- 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.
-- NB: this is the MIT License, as found 12-Sep-2007 on the site
-- http://www.opensource.org/licenses/mit-license.php
-----------------------------------------------------------------------------
with Gtkada.Builder; use Gtkada.Builder;
package Window1_Callbacks is
function On_Window1_Delete_Event (Builder : access Gtkada_Builder_Record'Class)
return Boolean;
procedure Gtk_Main_Quit (Builder : access Gtkada_Builder_Record'Class);
procedure On_Button2_Clicked (Builder : access Gtkada_Builder_Record'Class);
end Window1_Callbacks;
|
YTPlaylistHelper.applescript | andrewmarkallen/YTPlaylistHelper | 1 | 1342 | to saveToPlaylist(playlistName)
tell application "Safari" to tell document 1
do JavaScript "
document.querySelector('[aria-label=\"Save\"]').click();
var attempts = 0;
var playlists = null;
var checkExist = setInterval(function() {
attempts += 1;
playlists = document.getElementById(\"playlists\")
if(playlists.className == \"style-scope ytd-add-to-playlist-renderer scrollable\") {
var selectorString = \"#checkbox-label > yt-formatted-string[title|='" & playlistName & "']\";
var checkButton = playlists.querySelector(selectorString);
if (checkButton != null)
{
checkButton.click();
clearInterval(checkExist);
}
}
if (attempts > 20) {
console.log(\"Not found: " & playlistName & " \");
clearInterval(checkExist);
}
},50);
"
end tell
end saveToPlaylist
saveToPlaylist("PLAYLIST_NAME")
|
gfx/pokemon/jolteon/anim.asm | Dev727/ancientplatinum | 28 | 161090 | <gh_stars>10-100
frame 1, 05
frame 2, 38
frame 1, 08
frame 0, 20
setrepeat 2
frame 0, 06
frame 4, 06
dorepeat 5
endanim
|
source/amf/mof/amf-internals-element_collections.adb | svn2github/matreshka | 24 | 26544 | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2010-2012, <NAME> <<EMAIL>> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with AMF.Internals.Collections.Elements.Proxies;
with AMF.Internals.Links;
with AMF.Internals.Tables.AMF_Tables;
with AMF.Internals.Tables.CMOF_Attributes;
package body AMF.Internals.Element_Collections is
use AMF.Internals.Tables;
use type AMF.Internals.Tables.AMF_Tables.Collection_Element_Identifier;
---------
-- Add --
---------
procedure Add (Self : AMF_Collection_Of_Element; Item : AMF_Element) is
Owner : constant AMF_Element
:= AMF_Tables.Collections.Table (Self).Owner;
Property : constant CMOF_Element
:= AMF_Tables.Collections.Table (Self).Property;
Association : constant CMOF_Element
:= AMF.Internals.Tables.CMOF_Attributes.Internal_Get_Association
(Property);
Member_End : constant AMF_Collection_Of_Element
:= AMF.Internals.Tables.CMOF_Attributes.Internal_Get_Member_End
(Association);
begin
if Element (Member_End, 1) = Property then
AMF.Internals.Links.Create_Link (Association, Owner, Item);
else
AMF.Internals.Links.Create_Link (Association, Item, Owner);
end if;
end Add;
--------------------------
-- Allocate_Collections --
--------------------------
function Allocate_Collections
(Count : Natural) return AMF.Internals.AMF_Collection_Of_Element
is
First : constant AMF_Collection_Of_Element
:= AMF_Tables.Collections.Last + 1;
begin
AMF_Tables.Collections.Set_Last
(First + AMF_Collection_Of_Element (Count));
-- Initialize first allocated collection.
AMF_Tables.Collections.Table (First) :=
(Kind => AMF_Tables.C_None,
Proxy =>
new AMF.Internals.Collections.Elements.Proxies.Shared_Element_Collection_Proxy'
(Collection => First),
Owner => 0,
Property => 0,
Head => 0,
Tail => 0);
return First;
end Allocate_Collections;
-------------
-- Element --
-------------
function Element
(Self : AMF_Collection_Of_Element;
Index : Positive) return AMF_Element
is
Current : AMF_Tables.Collection_Element_Identifier
:= AMF_Tables.Collections.Table (Self).Head;
begin
for J in 2 .. Index loop
exit when Current = 0;
Current := AMF_Tables.Collection_Elements.Table (Current).Next;
end loop;
if Current = 0 then
raise Constraint_Error;
else
return AMF_Tables.Collection_Elements.Table (Current).Element;
end if;
end Element;
---------------------------------------
-- Initialize_Ordered_Set_Collection --
---------------------------------------
procedure Initialize_Ordered_Set_Collection
(Element : AMF_Element;
Property : CMOF_Element;
Collection : AMF_Collection_Of_Element) is
begin
AMF_Tables.Collections.Table (Collection) :=
(Kind => AMF_Tables.C_Ordered_Set,
Proxy =>
new AMF.Internals.Collections.Elements.Proxies.Shared_Element_Collection_Proxy'
(Collection => Collection),
Owner => Element,
Property => Property,
Head => 0,
Tail => 0);
end Initialize_Ordered_Set_Collection;
-------------------------------
-- Initialize_Set_Collection --
-------------------------------
procedure Initialize_Set_Collection
(Element : AMF_Element;
Property : CMOF_Element;
Collection : AMF_Collection_Of_Element) is
begin
AMF_Tables.Collections.Table (Collection) :=
(Kind => AMF_Tables.C_Set,
Proxy =>
new AMF.Internals.Collections.Elements.Proxies.Shared_Element_Collection_Proxy'
(Collection => Collection),
Owner => Element,
Property => Property,
Head => 0,
Tail => 0);
end Initialize_Set_Collection;
---------------------
-- Internal_Append --
---------------------
procedure Internal_Append
(Collection : AMF_Collection_Of_Element;
Element : AMF_Element;
Link : AMF_Link)
is
Previous : constant AMF_Tables.Collection_Element_Identifier
:= AMF_Tables.Collections.Table (Collection).Tail;
New_Element : AMF_Tables.Collection_Element_Identifier;
begin
AMF_Tables.Collection_Elements.Increment_Last;
New_Element := AMF_Tables.Collection_Elements.Last;
-- Initialize new element.
AMF_Tables.Collection_Elements.Table (New_Element) :=
(Element, Link, Previous, 0);
-- Connect list.
AMF_Tables.Collections.Table (Collection).Tail := New_Element;
if AMF_Tables.Collections.Table (Collection).Head = 0 then
-- List is empty, sets list's head to point to element.
AMF_Tables.Collections.Table (Collection).Head := New_Element;
else
-- List is not empty, attach new element to last element in the list.
AMF_Tables.Collection_Elements.Table (Previous).Next := New_Element;
end if;
end Internal_Append;
------------
-- Length --
------------
function Length (Self : AMF_Collection_Of_Element) return Natural is
Current : AMF_Tables.Collection_Element_Identifier
:= AMF_Tables.Collections.Table (Self).Head;
Aux : Natural := 0;
begin
while Current /= 0 loop
Aux := Aux + 1;
Current := AMF_Tables.Collection_Elements.Table (Current).Next;
end loop;
return Aux;
end Length;
----------
-- Wrap --
----------
function Wrap
(Collection : AMF_Collection_Of_Element)
return AMF.Internals.Collections.Elements.Shared_Element_Collection_Access is
begin
return
AMF.Internals.Collections.Elements.Shared_Element_Collection_Access
(AMF_Tables.Collections.Table (Collection).Proxy);
end Wrap;
end AMF.Internals.Element_Collections;
|
LibraBFT/Concrete/Obligations.agda | cwjnkins/bft-consensus-agda | 0 | 11047 | <filename>LibraBFT/Concrete/Obligations.agda
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9.
Copyright (c) 2020, 2021, Oracle and/or its affiliates.
Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl
-}
open import LibraBFT.Prelude
open import LibraBFT.Concrete.System.Parameters
open import LibraBFT.Concrete.System
open import LibraBFT.Impl.Consensus.Types
import LibraBFT.Concrete.Properties.VotesOnce as VO
import LibraBFT.Concrete.Properties.PreferredRound as PR
open import LibraBFT.Yasm.Yasm ℓ-RoundManager ℓ-VSFP ConcSysParms PeerCanSignForPK (λ {st} {part} {pk} → PeerCanSignForPK-stable {st} {part} {pk})
-- This module collects in one place the obligations an
-- implementation must meet in order to enjoy the properties
-- proved in Abstract.Properties.
module LibraBFT.Concrete.Obligations where
record ImplObligations : Set (ℓ+1 ℓ-RoundManager) where
field
-- Structural obligations:
sps-cor : StepPeerState-AllValidParts
-- Semantic obligations:
--
-- VotesOnce:
vo₁ : VO.ImplObligation₁
vo₂ : VO.ImplObligation₂
-- PreferredRound:
pr₁ : PR.ImplObligation₁
|
test/Succeed/Issue2833.agda | cruhland/agda | 1,989 | 16263 | {-# OPTIONS --allow-unsolved-metas #-}
open import Agda.Builtin.Nat
record R : Set where
field
r₁ : Nat
r₂ : Nat
open R
h : (n : Nat) → R
r₁ (h zero) = {!!}
r₂ (h zero) = {!!}
h (suc n) = {!!}
|
scripts/hide_extension.applescript | Bilalh/Media2 | 1 | 827 | <gh_stars>1-10
#!/usr/bin/env osascript
on run argv
set thePath to item 1 of argv as string
set file_alias to the POSIX file thePath as alias
tell application "Finder"
if extension hidden of file_alias is false then
set extension hidden of file_alias to true
end if
end tell
end run |
libsrc/_DEVELOPMENT/l/z80/l_fast_ldir.asm | teknoplop/z88dk | 0 | 161516 | <filename>libsrc/_DEVELOPMENT/l/z80/l_fast_ldir.asm<gh_stars>0
INCLUDE "clib_cfg.asm"
IF __CLIB_OPT_FASTCOPY & $c0
SECTION smc_clib
SECTION smc_l
ELSE
SECTION code_clib
SECTION code_l
ENDIF
PUBLIC l_fast_memcpy
PUBLIC l_fast_ldir, l_fast_ldir_0
IF __CLIB_OPT_FASTCOPY & $c0
PUBLIC l_fast_memcpy_smc
ENDIF
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
IF __CLIB_OPT_FASTCOPY & $40
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; library can use self-modifying code
defc l_fast_memcpy = l_fast_memcpy_smc
; call to this subroutine is faster
; than raw ldir if number of loops >= 19
l_fast_memcpy_smc:
; enter : hl = void *src
; de = void *dst
; bc = size_t n > 0
;
; exit : hl = src + n
; de = dst + n
; bc = 0
;
; uses : af, bc, de, hl
ld a,$10
sub c
and $0f
add a,a
ld (joffset+1),a
joffset:
jr l_fast_ldir_0
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ELSE
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; call to this subroutine is faster
; than raw ldir if number of loops >= 25
l_fast_memcpy:
; enter : hl = void *src
; de = void *dst
; bc = size_t n >= 16
;
; exit : hl = src + n
; de = dst + n
; bc = 0
;
; uses : af, bc, de, hl
ld a,c
and $0f
try_8:
cp 8
jp c, try_4
sub 8
ldi
ldi
ldi
ldi
ldi
ldi
ldi
ldi
try_4:
cp 4
jp c, try_2
sub 4
ldi
ldi
ldi
ldi
try_2:
cp 2
jp c, try_1
sub 2
ldi
ldi
try_1:
jp z, l_fast_ldir_0
ldi
;; fall through to l_fast_ldir_0
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ENDIF
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; call directly into this loop is faster
; than raw ldir if number of loops >= 8
l_fast_ldir_0:
ldi
ldi
ldi
ldi
ldi
ldi
ldi
ldi
ldi
ldi
ldi
ldi
ldi
ldi
ldi
ldi
jp pe, l_fast_ldir_0
l_fast_ldir:
ret
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
IF (__CLIB_OPT_FASTCOPY & $c0) = $80
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; call to this subroutine is faster
; than raw ldir if number of loops >= 19
l_fast_memcpy_smc:
; enter : hl = void *src
; de = void *dst
; bc = size_t n > 0
;
; exit : hl = src + n
; de = dst + n
; bc = 0
;
; uses : af, bc, de, hl
ld a,$10
sub c
and $0f
add a,a
sub 49
ld (joffset+1),a
joffset:
jr l_fast_ldir_0
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ENDIF
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
oeis/038/A038571.asm | neoneye/loda-programs | 11 | 28238 | ; A038571: Number of times n must be differentiated to reach 0.
; 0,1,2,1,3,2,2,1,4,3,2,3,3,2,2,1,5,4,4,3,3,2,3,4,4,3,2,3,3,2,2,1,6,5,4,5,4,5,3,4,4,3,2,3,3,4,4,5,5,4,4,3,3,2,3,4,4,3,2,3,3,2,2,1,7,6,6,5,4,5,6,5,4,5,6,5,3,4,4,5,5,4,4,3,3,2,3,4,4,3,5,4,5,4,5,6,6,5,4,5
lpb $0
mov $2,$0
seq $2,38554 ; Derivative of n: write n in binary, replace each pair of adjacent bits with their mod 2 sum (a(0)=a(1)=0 by convention). Also n XOR (n shift 1).
mov $0,$2
add $3,243
lpe
mov $0,$3
div $0,243
|
lib/scroll1x1-global.asm | c64lib/text | 1 | 160740 | #import "scroll1x1.asm"
#importonce
.filenamespace c64lib
.macro @c64lib_scroll1x1(tempZero1) { scroll1x1(tempZero1) }
|
ada/src/afrl/cmasi/afrl-cmasi-operatingregion.ads | joffreyhuguet/LmcpGen | 0 | 6848 | <filename>ada/src/afrl/cmasi/afrl-cmasi-operatingregion.ads
with avtas.lmcp.types; use avtas.lmcp.types;
with afrl.cmasi.object; use afrl.cmasi.object;
with afrl.cmasi.enumerations; use afrl.cmasi.enumerations;
with Ada.Containers.Vectors;
package afrl.cmasi.operatingRegion is
type OperatingRegion is new afrl.cmasi.object.Object with private;
type OperatingRegion_Acc is access all OperatingRegion;
type OperatingRegion_Class_Acc is access all OperatingRegion'Class;
package Vect_Int64_t is new Ada.Containers.Vectors
(Index_Type => Natural,
Element_Type => Int64_t);
type Vect_Int64_t_Acc is access all Vect_Int64_t.Vector;
function getFullLmcpTypeName(this : OperatingRegion) return String;
function getLmcpTypeName(this : OperatingRegion) return String;
function getLmcpType(this : OperatingRegion) return UInt32_t;
function getID(this : OperatingRegion'Class) return Int64_t;
procedure setID(this : out OperatingRegion'Class; ID : in Int64_t);
function getKeepInAreas(this : OperatingRegion'Class) return Vect_Int64_t_Acc;
function getKeepOutAreas(this : OperatingRegion'Class) return Vect_Int64_t_Acc;
private
type OperatingRegion is new afrl.cmasi.object.Object with record
ID : Int64_t := 0;
KeepInAreas : Vect_Int64_t_Acc := new Vect_Int64_t.Vector;
KeepOutAreas : Vect_Int64_t_Acc := new Vect_Int64_t.Vector;
end record;
end afrl.cmasi.operatingRegion;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.