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 |
|---|---|---|---|---|
grammars/EMail2.g4 | SadraGoudarzdashti/IUSTCompiler | 3 | 7818 | <gh_stars>1-10
/*
grammer EMail2 (version 2)
@author: <NAME>, (http://webpages.iust.ac.ir/morteza_zakeri/)
@date: 20201025
- Compiler generator: ANTRL4.x
- Target language(s): Python3.x,
-Changelog:
-- v2
--- fix version 1 bugs to accept 'dot' in frist part of email
-- v1
---
- Reference: Compiler book by Dr. Saeed Parsa (http://parsa.iust.ac.ir/)
- Course website: http://parsa.iust.ac.ir/courses/compilers/
- Laboratory website: http://reverse.iust.ac.ir/
*/
grammar EMail2;
start: EMAIL EOF;
EMAIL: LOCAL_SUBPART ('.' LOCAL_SUBPART)* '@' DOMAIN_SUBPART ('.' DOMAIN_SUBPART)+;
fragment LOCAL_SUBPART : [a-zA-Z0-9!$&()*+,;=:_~-]+;
fragment DOMAIN_SUBPART : [a-zA-Z0-9-]+;
|
libsrc/target/c128/stdio/conio_vars.asm | witchcraft2001/z88dk | 4 | 166459 |
SECTION data_clib
PUBLIC __c128_attr
__c128_attr: defb 1
|
Exercises/Two.agda | UoG-Agda/Agda101 | 0 | 15229 | <reponame>UoG-Agda/Agda101
module Two where
open import Relation.Binary.PropositionalEquality
open ≡-Reasoning
import Data.Nat as ℕ
import Data.Nat.Properties as ℕₚ
open ℕ using (ℕ; zero; suc; _+_)
-- Our language consists of constants and addition
data Expr : Set where
const : ℕ → Expr
plus : Expr → Expr → Expr
-- Straightforward semantics
eval-expr : Expr → ℕ
eval-expr (const n) = n
eval-expr (plus e1 e2) = eval-expr e1 + eval-expr e2
-- Tail recursive semantics
eval-expr-tail' : Expr → ℕ → ℕ
eval-expr-tail' (const n) acc = n + acc
eval-expr-tail' (plus e1 e2) acc = eval-expr-tail' e2 (eval-expr-tail' e1 acc)
eval-expr-tail : Expr → ℕ
eval-expr-tail e = eval-expr-tail' e 0
--
-- Task: prove that eval-expr-tail is equivalent to eval-expr.
--
-- The tail recursive evaluation does not depend on its accumulator
eval-expr-tail-correct-lemma : ∀ e acc → eval-expr-tail' e acc ≡ eval-expr-tail' e 0 + acc
eval-expr-tail-correct-lemma e acc = ?
-- The tail recursive evaluation agrees with the straightforward evaluation
eval-expr-tail-correct : ∀ e → eval-expr-tail e ≡ eval-expr e
eval-expr-tail-correct e = ?
|
scripts/itunes/en/dislikeTrack.applescript | dnedry2/vscode-itunes | 16 | 3460 | if application "iTunes" is running then
tell application "iTunes"
set disliked of current track to true
end tell
end if
|
programs/oeis/057/A057347.asm | karttu/loda | 1 | 99088 | ; A057347: Leap years in the Islamic calendar starting year 1 AH (Anno Hegirae) = 622 CE (Common Era or AD). There are 11 leap years in a 30 year cycle.
; 2,5,7,10,13,16,18,21,24,26,29,32,35,37,40,43,46,48,51,54,56,59,62,65,67,70,73,76,78,81,84,86,89,92,95,97,100,103,106,108,111,114,116,119,122,125,127,130,133,136,138,141,144,146,149,152,155,157,160,163,166
add $0,17
mov $1,30
mul $1,$0
div $1,11
sub $1,44
|
test/Fail/SafeFlagPrimTrustMe-2.agda | cruhland/agda | 1,989 | 3246 | <reponame>cruhland/agda
module SafeFlagPrimTrustMe-2 where
open import Agda.Builtin.TrustMe
|
tests/zmq-examples-json_data-test.adb | persan/zeromq-Ada | 33 | 17726 |
with GNAT.Strings;
with Ada.Text_IO;
procedure ZMQ.Examples.JSON_Data.Test is
use GNAT.Strings;
V : Data_Type;
Src : JSON_Value;
Tgt : JSON_Value;
V1 : Data_Type;
S : GNAT.Strings.String_Access;
begin
V := (Sensor_Name => To_Unbounded_String ("bannme"),
OK => True,
Location => (1.0, 2.0, 3.0),
Orientation => (1.1, 2.2, 3.3));
Src := Create (V);
S := new String'(Src.Write);
Tgt := Read (S.all, "");
Read (Tgt, V1);
V1.OK := False;
Ada.Text_IO.Put_Line (Create (V1).Write (Compact => False));
Free (S);
end ZMQ.Examples.JSON_Data.Test;
|
middleware/src/monitor/monitor-block_drivers.ads | rocher/Ada_Drivers_Library | 192 | 25319 | <reponame>rocher/Ada_Drivers_Library<gh_stars>100-1000
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2017, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with HAL; use HAL;
with HAL.Block_Drivers; use HAL.Block_Drivers;
package Monitor.Block_Drivers is
type Put_Line_Procedure is access procedure (Str : String);
type Block_Driver_Monitor
(Driver_Under_Monitoring : not null Any_Block_Driver;
Put_Line : not null Put_Line_Procedure)
is new Block_Driver with private;
overriding
function Read
(This : in out Block_Driver_Monitor;
Block_Number : UInt64;
Data : out Block)
return Boolean;
overriding
function Write
(This : in out Block_Driver_Monitor;
Block_Number : UInt64;
Data : Block)
return Boolean;
procedure Enable (This : in out Block_Driver_Monitor);
-- Enable monitor's output (default)
procedure Disable (This : in out Block_Driver_Monitor);
-- Disable monitor's output
private
type Block_Driver_Monitor
(Driver_Under_Monitoring : not null Any_Block_Driver;
Put_Line : not null Put_Line_Procedure)
is new Block_Driver with record
Enabled : Boolean := True;
end record;
end Monitor.Block_Drivers;
|
Pigeon.g4 | CIDARLAB/pigeon | 1 | 1122 | grammar Pigeon;
/*
Parser Rules
*/
script
: pigeoncommands+
(arccommands+)?
EOF
;
pigeoncommands
: promoter
| repressor
| codingseq
| transcription
| stop
| operator
| degredationtag
| righttriangle
| lefttriangle
| bar
| three
| five
| gene
| fseq
| zring
| xbar
| box
| scar
| vector
;
promoter : (invert 'p' | 'p') WS? label? WS? color? WS? ignorecolor? NL+ ;
repressor : (invert 'r' | 'r') WS? label? WS? color? WS? ignorecolor? NL+ ;
codingseq : (invert 'c' | 'c') WS? label? WS? color? WS? ignorecolor? NL+ ;
transcription : (invert 't' | 't') WS? label? WS? color? WS? ignorecolor? NL+ ;
gene : (invert 'g' | 'g') WS? label? WS? color? WS? ignorecolor? NL+ ;
fseq : (invert 'f' | 'f') WS? label? WS? color? WS? ignorecolor? NL+ ;
stop : 's' WS* label? WS* color? WS* ignorecolor? NL+;
operator : 'o' WS* label? WS* color? WS* ignorecolor? NL+;
degredationtag : 'd' WS* label? WS* color? WS* ignorecolor? NL+;
righttriangle : '>' WS* label? WS* color? WS* ignorecolor? NL+ ; // not sure this need labels
lefttriangle : '<' WS* label? WS* color? WS* ignorecolor? NL+ ; // not sure this needs labels
bar : '|' WS* label? WS* color? WS* ignorecolor? NL+ ;
three : invert? '3' WS* label? WS* color? WS* ignorecolor? NL+ ;
five : invert? '5' WS* label? WS* color? WS* ignorecolor? NL+ ;
zring : invert? 'z' WS* label? WS* color? WS* ignorecolor? NL+ ;
xbar : 'x' WS* label? WS* color? WS* ignorecolor? NL+ ;
box : '?' WS* label? WS* color? WS* ignorecolor? NL+ ;
scar: '=' WS* label? WS* color? WS* ignorecolor? NL+ ;
vector: 'v' WS? label? NL+;
invert : '<';
color: (INT | '3' | '5');
label: ( ID INT? ID? | INT ID | commands INT | commands '3' | commands '5' | '<' ID | '>' ID);
ignorecolor : 'nl';
commands : ('?'|'3'|'5'|'p'|'r'|'c'|'g'|'f'
|'t'|'s'|'o'|'>'|'<'|'|'|'z'|'x'|'d');
arccommands
: rep
| ind
| rep2
;
rep : label WS 'rep' WS label NL+;
rep2: label WS 'rep' WS label'-'label NL+;
ind : label WS 'ind' WS label NL+;
/*
Lexer Rules
*/
ID : ('a'..'z'|'A'..'Z'| '_'| '-'| '[' | ']')('a'..'z'|'A'..'Z'|'0'..'9'| '_'| '-'| '[' | ']')* ;
INT : [0-9]+ ;
LINE_COMMENT : '#' ~[\r\n]* -> skip;
WS : ' '+;
NL : ( '\r' ? '\n' | '\r' )+;
|
tpantlr2-code/code/reference/Enum3.g4 | cgonul/antlr-poc | 10 | 6463 | <filename>tpantlr2-code/code/reference/Enum3.g4<gh_stars>1-10
lexer grammar Enum3;
ENUM: [a-z]+ {getText().equals("enum")}?
{System.out.println("enum!");}
;
ID : [a-z]+ {System.out.println("ID "+getText());} ;
WS : [ \n] -> skip ;
|
rpython/translator/c/src/stacklet/switch_x86_msvc.asm | yxzoro/pypy | 11 | 7001 | <reponame>yxzoro/pypy
.386
.model flat, c
.code
slp_switch_raw PROC save_state:DWORD, restore_state:DWORD, extra:DWORD
;save registers. EAX ECX and EDX are available for function use and thus
;do not have to be stored.
push ebx
push esi
push edi
push ebp
mov esi, restore_state ; /* save 'restore_state' for later */
mov edi, extra ; /* save 'extra' for later */
mov eax, esp
push edi ; /* arg 2: extra */
push eax ; /* arg 1: current (old) stack pointer */
mov ecx, save_state
call ecx ; /* call save_state() */
test eax, eax; /* skip the restore if the return value is null */
jz exit
mov esp, eax; /* change the stack pointer */
push edi ; /* arg 2: extra */
push eax ; /* arg 1: current (new) stack pointer */
call esi ; /* call restore_state() */
exit:
add esp, 8
pop ebp
pop edi
pop esi
pop ebx
ret
slp_switch_raw ENDP
end |
programs/oeis/301/A301694.asm | neoneye/loda | 22 | 178368 | ; A301694: Expansion of (1 + 5*x + 4*x^2 + 5*x^3 + x^4)/((1 - x)*(1 - x^3)).
; 1,6,10,16,22,26,32,38,42,48,54,58,64,70,74,80,86,90,96,102,106,112,118,122,128,134,138,144,150,154,160,166,170,176,182,186,192,198,202,208,214,218,224,230,234,240,246,250,256,262,266,272,278,282,288,294,298,304,310,314,320,326,330,336,342,346,352,358,362,368,374,378,384,390,394,400,406,410,416,422,426,432,438,442,448,454,458,464,470,474,480,486,490,496,502,506,512,518,522,528
mul $0,8
add $0,1
div $0,3
mov $1,1
sub $1,$0
trn $0,$1
add $0,1
|
tools/ayacc/src/ayacc-print_statistics.adb | svn2github/matreshka | 24 | 20291 | <gh_stars>10-100
separate (Ayacc)
procedure Print_Statistics is
use Text_IO, Parse_Table, Rule_Table, Symbol_Table;
begin
if Options.Summary then
Put_Line(Rule'Image(Last_Rule - First_Rule + 1) & " Productions");
Put_Line(Grammar_Symbol'Image
(Last_Symbol(Nonterminal) - First_Symbol(Nonterminal) + 1) &
" Nonterminals");
Put_Line(Grammar_Symbol'Image
(Last_Symbol(Terminal) - First_Symbol(Terminal) + 1) &
" Terminals");
Put_Line(Integer'Image(Number_of_States) & " States");
Put_Line (Integer'Image(Shift_Reduce_Conflicts) &
" Shift/Reduce conflicts");
Put_Line (Integer'Image(Reduce_Reduce_Conflicts) &
" Reduce/Reduce conflicts");
else
if Shift_Reduce_Conflicts /= 0 then
Put_Line (Integer'Image(Shift_Reduce_Conflicts) &
" Shift/Reduce Conflicts");
end if;
if Reduce_Reduce_Conflicts /= 0 then
Put_Line (Integer'Image(Reduce_Reduce_Conflicts) &
" Reduce/Reduce Conflicts");
end if;
end if;
end Print_Statistics;
|
oeis/313/A313772.asm | neoneye/loda-programs | 11 | 172175 | ; A313772: Coordination sequence Gal.6.328.2 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings.
; Submitted by <NAME>(s3)
; 1,5,10,15,21,25,31,35,41,46,51,56,61,66,71,77,81,87,91,97,102,107,112,117,122,127,133,137,143,147,153,158,163,168,173,178,183,189,193,199,203,209,214,219,224,229,234,239,245,249
mov $1,$0
mul $0,7
add $0,5
div $0,11
mul $1,49
sub $1,6
div $1,11
add $1,1
add $0,$1
|
src/tests/opencltests.ads | sebsgit/textproc | 0 | 15188 | with AUnit; use AUnit;
with AUnit.Test_Cases; use AUnit.Test_Cases;
package OpenCLTests is
type TestCase is new AUnit.Test_Cases.Test_Case with null record;
procedure Register_Tests(T: in out TestCase);
function Name(T: TestCase) return Message_String;
procedure testLoad(T : in out Test_Cases.Test_Case'Class);
procedure testObjectAPI(T: in out Test_Cases.Test_Case'Class);
end OpenCLTests;
|
test/Compiler/with-stdlib/HelloWorldPrim.agda | redfish64/autonomic-agda | 3 | 16960 | <filename>test/Compiler/with-stdlib/HelloWorldPrim.agda
module HelloWorldPrim where
open import IO.Primitive
open import Data.String
main = putStrLn (toCostring "Hello World!")
|
src/frontend/Experimental_Ada_ROSE_Connection/parser/asis_adapter/source/asis_adapter-tool.ads | ouankou/rose | 488 | 20283 | <reponame>ouankou/rose<gh_stars>100-1000
-- This is the main Asis_Adapter class.
private with Asis_Adapter.Context;
with a_nodes_h;
package Asis_Adapter.Tool is
type Class is tagged limited private;
-- Runs in the current directory.
-- Uses project file "default.gpr" in containing directory of File_Name.
-- Creates .adt file in project file Object_Dir.
-- Creates .dot file in Output_Dir. If Output_Dir = "", uses current directory.
--
-- LEAKS. Only intended to be called once per program execution:
procedure Process
(This : in out Class;
File_Name : in String;
GNAT_Home : in String;
AsisArgs : in String;
Output_Dir : in String := "";
Process_Predefined_Units : in Boolean;
Process_Implementation_Units : in Boolean;
Debug : in Boolean);
-- Call Process first:
function Get_Nodes
(This : in out Class)
return a_nodes_h.Nodes_Struct;
private
-- For debuggng:
Parent_Name : constant String := Module_Name;
Module_Name : constant String := Parent_Name & ".Tool";
type Class is tagged limited -- Initialized
record
My_Context : Asis_Adapter.Context.Class; -- Initialized
Outputs : Outputs_Record; -- Initialized
end record;
end Asis_Adapter.Tool;
|
oeis/236/A236225.asm | neoneye/loda-programs | 11 | 29841 | ; A236225: Sum of the seventeenth powers of the first n primes.
; 131072,129271235,763068724360,233393582711567,505680422082005338,9156096341463343271,836396358227800107448,6316783216012602293387,147366822776675571219490,7404514559506748686057599,29954631333669491864740510,486442572159704647268887427,3100562839660479875472625708,8974965946020899894352179351,35622902452983093333674372038,241065162109264486139761605051,1513056629126772227843475996470,3754909954381657570390192967091,14802604191050016618406327560118,44409435432312288615251540867709
lpb $0
mov $2,$0
sub $0,1
seq $2,138032 ; a(n) = prime(n)^17.
add $3,$2
lpe
mov $0,$3
add $0,131072
|
AVR/multiply_by_2n.asm | StxGuy/EmbeddedSystems | 0 | 662 | .device ATmega328
.org 0x00 ; Program starts at 0x00
rjmp INICIO
; Multiply or divide by 2^n
INICIO: nop
ldi R16,0x08
ldi R17,0x02
LOOP: lsr R16 ; or lsl to multiply
dec R17
breq FIM
rjmp LOOP
FIM: jmp FIM
|
bb-runtimes/runtimes/ravenscar-full-stm32g474/gnat/s-gcmain.ads | JCGobbi/Nucleo-STM32G474RE | 0 | 18387 | ------------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- S Y S T E M . G E N E R I C _ C _ M A T H _ I N T E R F A C E --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2021, 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. --
-- --
-- --
-- --
-- --
-- --
-- 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 is the Ada Cert Math specific version of s-gcmain.ads.
-- @llrset s-gcmain.ads
-- Generic C Math Interface
-- ========================
-- Provide the elementary mathematical functions support library packages.
-- This package is an implementation of the Ada elementary functions
-- using the C math library. The C library is assumed to be conforming
-- with ISO/IEC 9899:1999 (C99). In particular, all identities specified
-- in chapter F.9 must hold. Furthermore, the accuracy of the various
-- functions is assumed to be sufficient for the strict mode specified
-- in Annex G of the Ada standard.
-- For environments where this is not true, the generic Ada implementations
-- should be used. These only require the standard arithmetic operations.
-- Typically, the generic functions are imported from C as follows.
-- For the C type "float":
-- function Sin (X : Float) return Float;
-- pragma Import (C, Sin, "sinf");
-- or for the C type "double":
-- function Sin (X : Long_Float) return Long_Float;
-- pragma Import (C, Sin, "sin");
-- or for the C type "long double":
-- function Sin (X : Long_Long_Float) return Long_Long_Float
-- pragma Import (C, Sin, "sinl");
generic
type Float_Type is digits <>;
with function C_Sqrt (X : Float_Type) return Float_Type is <>;
with function C_Log (X : Float_Type) return Float_Type is <>;
with function C_Exp (X : Float_Type) return Float_Type is <>;
with function C_Pow (X, Y : Float_Type) return Float_Type is <>;
with function C_Sin (X : Float_Type) return Float_Type is <>;
with function C_Cos (X : Float_Type) return Float_Type is <>;
with function C_Tan (X : Float_Type) return Float_Type is <>;
with function C_Asin (X : Float_Type) return Float_Type is <>;
with function C_Acos (X : Float_Type) return Float_Type is <>;
with function C_Atan2 (Y, X : Float_Type) return Float_Type is <>;
with function C_Sinh (X : Float_Type) return Float_Type is <>;
with function C_Cosh (X : Float_Type) return Float_Type is <>;
with function C_Tanh (X : Float_Type) return Float_Type is <>;
with function C_Asinh (X : Float_Type) return Float_Type is <>;
with function C_Acosh (X : Float_Type) return Float_Type is <>;
with function C_Atanh (Y : Float_Type) return Float_Type is <>;
package System.Generic_C_Math_Interface is
pragma Pure (Generic_C_Math_Interface);
-- pragma Assert (Float_Type'Signed_Zeros);
-- Assertion fails on e500v2 targets
pragma Assert (Float_Type'Machine_Radix = 2);
function Sqrt (X : Float_Type'Base) return Float_Type'Base;
-- @llr Sqrt (Float_Type)
-- This function shall return the square root of <X>
function Log (X : Float_Type'Base) return Float_Type'Base;
-- @llr Log (Float_Type)
-- This function shall return the logarithm of <X>
function Log (X, Base : Float_Type'Base) return Float_Type'Base;
-- @llr Log (Float_Type; Float_Type)
-- This function shall compute the logarithm of <X> with the specified base
function Exp (X : Float_Type'Base) return Float_Type'Base;
-- @llr Exp (Float_Type)
-- This function shall compute the exponent of <X>
function "**" (Left, Right : Float_Type'Base) return Float_Type'Base;
-- @llr "**" (Float_Type; Float_Type)
-- This function shall compute <Left> to the power of <Right>
function Sin (X : Float_Type'Base) return Float_Type'Base;
-- @llr Sin (Float_Type)
-- This function shall return the sine of <X>
function Sin (X, Cycle : Float_Type'Base) return Float_Type'Base;
-- @llr Sin (Float_Type; Float_Type)
-- This function shall return the sine of <X> with the specified base
function Cos (X : Float_Type'Base) return Float_Type'Base;
-- @llr Cos (Float_Type)
-- This function shall return the cosine of <X>
function Cos (X, Cycle : Float_Type'Base) return Float_Type'Base;
-- @llr Cos (Float_Type; Float_Type)
-- This function shall return the cosine of <X> with the specified base
function Tan (X : Float_Type'Base) return Float_Type'Base;
-- @llr Tan (Float_Type)
-- This function shall return the tangent of <X>
function Tan (X, Cycle : Float_Type'Base) return Float_Type'Base;
-- @llr Tan (Float_Type; Float_Type)
-- This function shall return the tangent of <X> with the specified base
function Cot (X : Float_Type'Base) return Float_Type'Base;
-- @llr Cot (Float_Type)
-- This function shall return the cotangent of <X>
function Cot (X, Cycle : Float_Type'Base) return Float_Type'Base;
-- @llr Cot (Float_Type; Float_Type)
-- This function shall return the cotangent of <X> with the specified base
function Arcsin (X : Float_Type'Base) return Float_Type'Base;
-- @llr Arcsin (Float_Type)
-- This function shall return the inverse sine of <X>
function Arcsin (X, Cycle : Float_Type'Base) return Float_Type'Base;
-- @llr Arcsin (Float_Type; Float_Type)
-- This function shall return the inverse sine of <X> with the specified
-- base
function Arccos (X : Float_Type'Base) return Float_Type'Base;
-- @llr Arccos (Float_Type)
-- This function shall return the inverse cosine of <X>
function Arccos (X, Cycle : Float_Type'Base) return Float_Type'Base;
-- @llr Arccos (Float_Type; Float_Type)
-- This function shall return the inverse cosine of <X> with the specified
-- base
function Arctan
(Y : Float_Type'Base;
X : Float_Type'Base := 1.0) return Float_Type'Base;
-- @llr Arctan (Float_Type; Float_Type)
-- This function shall compute the principal value of the inverse tangent
-- of <Y> / <X>
function Arctan
(Y : Float_Type'Base;
X : Float_Type'Base := 1.0;
Cycle : Float_Type'Base) return Float_Type'Base;
-- @llr Arctan (Float_Type; Float_Type; Float_Type)
-- This function shall compute the principal value of the inverse tangent
-- of <Y> / <X> with the specified base
function Arccot
(X : Float_Type'Base;
Y : Float_Type'Base := 1.0) return Float_Type'Base;
-- @llr Arccot (Float_Type; Float_Type)
-- This function shall compute the principal value of the inverse cotangent
-- of <Y> / <X>
function Arccot
(X : Float_Type'Base;
Y : Float_Type'Base := 1.0;
Cycle : Float_Type'Base) return Float_Type'Base;
-- @llr Arccot (Float_Type; Float_Type; FLoat_Type)
-- This function shall compute the principal value of the inverse cotangent
-- of <Y> / <X> with the specified base
function Sinh (X : Float_Type'Base) return Float_Type'Base;
-- @llr Sinh (Float_Type)
-- This function shall return the hyperbolic sine of <X>
function Cosh (X : Float_Type'Base) return Float_Type'Base;
-- @llr Cosh (Float_Type)
-- This function shall return the hyperbolic cosine of <X>
function Tanh (X : Float_Type'Base) return Float_Type'Base;
-- @llr Tanh (Float_Type)
-- This function shall return the hyperbolic tangent of <X>
function Coth (X : Float_Type'Base) return Float_Type'Base;
-- @llr Coth (Float_Type)
-- This function shall return the hyperbolic cotangent of <X>
function Arcsinh (X : Float_Type'Base) return Float_Type'Base;
-- @llr Arcsinh (Float_Type)
-- This function shall return the inverse hyperbolic sine of <X>
function Arccosh (X : Float_Type'Base) return Float_Type'Base;
-- @llr Arccosh (Float_Type)
-- This function shall return the inverse hyperbolic cosine of <X>
function Arctanh (X : Float_Type'Base) return Float_Type'Base;
-- @llr Arctanh (Float_Type)
-- This function shall return the inverse hyperbolic tangent of <X>
function Arccoth (X : Float_Type'Base) return Float_Type'Base;
-- @llr Arccoth (Float_Type)
-- This function shall return the inverse hyperbolic cotangent of <X>
end System.Generic_C_Math_Interface;
|
programs/oeis/033/A033367.asm | neoneye/loda | 22 | 20913 | ; A033367: a(n) = floor(47/n).
; 47,23,15,11,9,7,6,5,5,4,4,3,3,3,3,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
add $0,1
mov $1,47
div $1,$0
mov $0,$1
|
Directory_Structure/Projects/lh5801_examples/screenInvert.lh5801.asm | Jeff-Birt/TASM_vsCode_Extension | 4 | 166935 | <gh_stars>1-10
; Program to invert screen
; You can use the BASIC loader below to POKE it into memory, and RUN it
; Compare assembled program to BASIC loader values
; Program from Pocket Computer Newsletter, Machine Language Programming, 1983
;
; 100:POKE &78C0,&48,&76,&4A,&00,&05,&BD,&FF,&41
; 110:POKE &78C8,&4E,&4E,&99,&08,&4C,&77,&8B,&04
; 120:POKE &78D0,&48,&77,&9E,&12,&9A
; 130:INPUT "YOUR MESSAGE?",X$
; 140:CALL &78C0
; 150:FOR X=1 TO 50:NEXT X
; 160:GOTO 140
; 170:END
#define BRB(n) &+2-n ; calculate backward branch
#define BRF(n) &+n ; calculate forward branch
.ORG $78C0
; using Sharp Assembler Syntax
; begin:
; LDI XH,$76 ; Load Immedate X reg Hi (76h is left half of display)
; dispLR:
; LDI XL,$00 ; Load Immedate X reg Low (begining of this half)
; loop:
; LDA (X) ; Load Accumulator with value in register X
; EAI $FF ; XOR Accumulator with X register
; SIN X ; Store A into address X and inc X
; CPI XL,$4E ; Compare XL with immediate value 4Eh
; BZR loop ; Loop back to 'loop' if above compare != 0
; CPI XH,$77 ; Compare XH with immedate value 77H
; BZS done ; skip ahead if we are done
; LDI XH,$77 ; Load XH with immedate value 77H
; BCH dispLR ; Branch back to get second half of display
; done:
; RTN ; Return from subroutine
; .END
; using Z80 Assembler Syntax
begin:
LD B,$76 ; Load Immedate X reg Hi (76h is left half of display)
dispLR:
LD C,$00 ; Load Immedate X reg Low (begining of this half)
loop:
LD A,(BC) ; Load Accumulator with value in register X
XOR A,$FF ; XOR Accumulator with X register
LDI (BC),A ; Store A into address X and inc X
CP C,$4E ; Compare XL with immediate value 4Eh
JR NZ, loop ; Loop back to 'loop' if above compare != 0
CP B,$77 ; Compare XH with immedate value 77H
JR Z, done ; skip ahead if we are done
LD B,$77 ; Load XH with immedate value 77H
JR dispLR ; Branch back to get second half of display
done:
RET ; Return from subroutine
.END |
src/gnat/prj-util.adb | My-Colaborations/dynamo | 15 | 25595 | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- P R J . U T I L --
-- --
-- B o d y --
-- --
-- Copyright (C) 2001-2014, 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 Ada.Containers.Indefinite_Ordered_Sets;
with Ada.Directories;
with Ada.Unchecked_Deallocation;
with GNAT.Case_Util; use GNAT.Case_Util;
with GNAT.Regexp; use GNAT.Regexp;
with ALI; use ALI;
with Osint; use Osint;
with Output; use Output;
with Opt;
with Prj.Com;
with Snames; use Snames;
with Table;
with Targparm; use Targparm;
with GNAT.HTable;
package body Prj.Util is
package Source_Info_Table is new Table.Table
(Table_Component_Type => Source_Info_Iterator,
Table_Index_Type => Natural,
Table_Low_Bound => 1,
Table_Initial => 10,
Table_Increment => 100,
Table_Name => "Makeutl.Source_Info_Table");
package Source_Info_Project_HTable is new GNAT.HTable.Simple_HTable
(Header_Num => Prj.Header_Num,
Element => Natural,
No_Element => 0,
Key => Name_Id,
Hash => Prj.Hash,
Equal => "=");
procedure Free is new Ada.Unchecked_Deallocation
(Text_File_Data, Text_File);
-----------
-- Close --
-----------
procedure Close (File : in out Text_File) is
Len : Integer;
Status : Boolean;
begin
if File = null then
Prj.Com.Fail ("Close attempted on an invalid Text_File");
end if;
if File.Out_File then
if File.Buffer_Len > 0 then
Len := Write (File.FD, File.Buffer'Address, File.Buffer_Len);
if Len /= File.Buffer_Len then
Prj.Com.Fail ("Unable to write to an out Text_File");
end if;
end if;
Close (File.FD, Status);
if not Status then
Prj.Com.Fail ("Unable to close an out Text_File");
end if;
else
-- Close in file, no need to test status, since this is a file that
-- we read, and the file was read successfully before we closed it.
Close (File.FD);
end if;
Free (File);
end Close;
------------
-- Create --
------------
procedure Create (File : out Text_File; Name : String) is
FD : File_Descriptor;
File_Name : String (1 .. Name'Length + 1);
begin
File_Name (1 .. Name'Length) := Name;
File_Name (File_Name'Last) := ASCII.NUL;
FD := Create_File (Name => File_Name'Address,
Fmode => GNAT.OS_Lib.Text);
if FD = Invalid_FD then
File := null;
else
File := new Text_File_Data;
File.FD := FD;
File.Out_File := True;
File.End_Of_File_Reached := True;
end if;
end Create;
---------------
-- Duplicate --
---------------
procedure Duplicate
(This : in out Name_List_Index;
Shared : Shared_Project_Tree_Data_Access)
is
Old_Current : Name_List_Index;
New_Current : Name_List_Index;
begin
if This /= No_Name_List then
Old_Current := This;
Name_List_Table.Increment_Last (Shared.Name_Lists);
New_Current := Name_List_Table.Last (Shared.Name_Lists);
This := New_Current;
Shared.Name_Lists.Table (New_Current) :=
(Shared.Name_Lists.Table (Old_Current).Name, No_Name_List);
loop
Old_Current := Shared.Name_Lists.Table (Old_Current).Next;
exit when Old_Current = No_Name_List;
Shared.Name_Lists.Table (New_Current).Next := New_Current + 1;
Name_List_Table.Increment_Last (Shared.Name_Lists);
New_Current := New_Current + 1;
Shared.Name_Lists.Table (New_Current) :=
(Shared.Name_Lists.Table (Old_Current).Name, No_Name_List);
end loop;
end if;
end Duplicate;
-----------------
-- End_Of_File --
-----------------
function End_Of_File (File : Text_File) return Boolean is
begin
if File = null then
Prj.Com.Fail ("End_Of_File attempted on an invalid Text_File");
end if;
return File.End_Of_File_Reached;
end End_Of_File;
-------------------
-- Executable_Of --
-------------------
function Executable_Of
(Project : Project_Id;
Shared : Shared_Project_Tree_Data_Access;
Main : File_Name_Type;
Index : Int;
Ada_Main : Boolean := True;
Language : String := "";
Include_Suffix : Boolean := True) return File_Name_Type
is
pragma Assert (Project /= No_Project);
The_Packages : constant Package_Id := Project.Decl.Packages;
Builder_Package : constant Prj.Package_Id :=
Prj.Util.Value_Of
(Name => Name_Builder,
In_Packages => The_Packages,
Shared => Shared);
Executable : Variable_Value :=
Prj.Util.Value_Of
(Name => Name_Id (Main),
Index => Index,
Attribute_Or_Array_Name => Name_Executable,
In_Package => Builder_Package,
Shared => Shared);
Lang : Language_Ptr;
Spec_Suffix : Name_Id := No_Name;
Body_Suffix : Name_Id := No_Name;
Spec_Suffix_Length : Natural := 0;
Body_Suffix_Length : Natural := 0;
procedure Get_Suffixes
(B_Suffix : File_Name_Type;
S_Suffix : File_Name_Type);
-- Get the non empty suffixes in variables Spec_Suffix and Body_Suffix
function Add_Suffix (File : File_Name_Type) return File_Name_Type;
-- Return the name of the executable, based on File, and adding the
-- executable suffix if needed
------------------
-- Get_Suffixes --
------------------
procedure Get_Suffixes
(B_Suffix : File_Name_Type;
S_Suffix : File_Name_Type)
is
begin
if B_Suffix /= No_File then
Body_Suffix := Name_Id (B_Suffix);
Body_Suffix_Length := Natural (Length_Of_Name (Body_Suffix));
end if;
if S_Suffix /= No_File then
Spec_Suffix := Name_Id (S_Suffix);
Spec_Suffix_Length := Natural (Length_Of_Name (Spec_Suffix));
end if;
end Get_Suffixes;
----------------
-- Add_Suffix --
----------------
function Add_Suffix (File : File_Name_Type) return File_Name_Type is
Saved_EEOT : constant Name_Id := Executable_Extension_On_Target;
Result : File_Name_Type;
Suffix_From_Project : Variable_Value;
begin
if Include_Suffix then
if Project.Config.Executable_Suffix /= No_Name then
Executable_Extension_On_Target :=
Project.Config.Executable_Suffix;
end if;
Result := Executable_Name (File);
Executable_Extension_On_Target := Saved_EEOT;
return Result;
elsif Builder_Package /= No_Package then
-- If the suffix is specified in the project itself, as opposed to
-- the config file, it needs to be taken into account. However,
-- when the project was processed, in both cases the suffix was
-- stored in Project.Config, so get it from the project again.
Suffix_From_Project :=
Prj.Util.Value_Of
(Variable_Name => Name_Executable_Suffix,
In_Variables =>
Shared.Packages.Table (Builder_Package).Decl.Attributes,
Shared => Shared);
if Suffix_From_Project /= Nil_Variable_Value
and then Suffix_From_Project.Value /= No_Name
then
Executable_Extension_On_Target := Suffix_From_Project.Value;
Result := Executable_Name (File);
Executable_Extension_On_Target := Saved_EEOT;
return Result;
end if;
end if;
return File;
end Add_Suffix;
-- Start of processing for Executable_Of
begin
if Ada_Main then
Lang := Get_Language_From_Name (Project, "ada");
elsif Language /= "" then
Lang := Get_Language_From_Name (Project, Language);
end if;
if Lang /= null then
Get_Suffixes
(B_Suffix => Lang.Config.Naming_Data.Body_Suffix,
S_Suffix => Lang.Config.Naming_Data.Spec_Suffix);
end if;
if Builder_Package /= No_Package then
if Executable = Nil_Variable_Value and then Ada_Main then
Get_Name_String (Main);
-- Try as index the name minus the implementation suffix or minus
-- the specification suffix.
declare
Name : constant String (1 .. Name_Len) :=
Name_Buffer (1 .. Name_Len);
Last : Positive := Name_Len;
Truncated : Boolean := False;
begin
if Body_Suffix /= No_Name
and then Last > Natural (Length_Of_Name (Body_Suffix))
and then Name (Last - Body_Suffix_Length + 1 .. Last) =
Get_Name_String (Body_Suffix)
then
Truncated := True;
Last := Last - Body_Suffix_Length;
end if;
if Spec_Suffix /= No_Name
and then not Truncated
and then Last > Spec_Suffix_Length
and then Name (Last - Spec_Suffix_Length + 1 .. Last) =
Get_Name_String (Spec_Suffix)
then
Truncated := True;
Last := Last - Spec_Suffix_Length;
end if;
if Truncated then
Name_Len := Last;
Name_Buffer (1 .. Name_Len) := Name (1 .. Last);
Executable :=
Prj.Util.Value_Of
(Name => Name_Find,
Index => 0,
Attribute_Or_Array_Name => Name_Executable,
In_Package => Builder_Package,
Shared => Shared);
end if;
end;
end if;
-- If we have found an Executable attribute, return its value,
-- possibly suffixed by the executable suffix.
if Executable /= Nil_Variable_Value
and then Executable.Value /= No_Name
and then Length_Of_Name (Executable.Value) /= 0
then
return Add_Suffix (File_Name_Type (Executable.Value));
end if;
end if;
Get_Name_String (Main);
-- If there is a body suffix or a spec suffix, remove this suffix,
-- otherwise remove any suffix ('.' followed by other characters), if
-- there is one.
if Body_Suffix /= No_Name
and then Name_Len > Body_Suffix_Length
and then Name_Buffer (Name_Len - Body_Suffix_Length + 1 .. Name_Len) =
Get_Name_String (Body_Suffix)
then
-- Found the body termination, remove it
Name_Len := Name_Len - Body_Suffix_Length;
elsif Spec_Suffix /= No_Name
and then Name_Len > Spec_Suffix_Length
and then
Name_Buffer (Name_Len - Spec_Suffix_Length + 1 .. Name_Len) =
Get_Name_String (Spec_Suffix)
then
-- Found the spec termination, remove it
Name_Len := Name_Len - Spec_Suffix_Length;
else
-- Remove any suffix, if there is one
Get_Name_String (Strip_Suffix (Main));
end if;
return Add_Suffix (Name_Find);
end Executable_Of;
---------------------------
-- For_Interface_Sources --
---------------------------
procedure For_Interface_Sources
(Tree : Project_Tree_Ref;
Project : Project_Id)
is
use Ada;
use type Ada.Containers.Count_Type;
package Dep_Names is new Containers.Indefinite_Ordered_Sets (String);
function Load_ALI (Filename : String) return ALI_Id;
-- Load an ALI file and return its id
--------------
-- Load_ALI --
--------------
function Load_ALI (Filename : String) return ALI_Id is
Result : ALI_Id := No_ALI_Id;
Text : Text_Buffer_Ptr;
Lib_File : File_Name_Type;
begin
if Directories.Exists (Filename) then
Name_Len := 0;
Add_Str_To_Name_Buffer (Filename);
Lib_File := Name_Find;
Text := Osint.Read_Library_Info (Lib_File);
Result :=
ALI.Scan_ALI
(Lib_File,
Text,
Ignore_ED => False,
Err => True,
Read_Lines => "UD");
Free (Text);
end if;
return Result;
end Load_ALI;
-- Local declarations
Iter : Source_Iterator;
Sid : Source_Id;
ALI : ALI_Id;
First_Unit : Unit_Id;
Second_Unit : Unit_Id;
Body_Needed : Boolean;
Deps : Dep_Names.Set;
-- Start of processing for For_Interface_Sources
begin
if Project.Qualifier = Aggregate_Library then
Iter := For_Each_Source (Tree);
else
Iter := For_Each_Source (Tree, Project);
end if;
-- First look at each spec, check if the body is needed
loop
Sid := Element (Iter);
exit when Sid = No_Source;
-- Skip sources that are removed/excluded and sources not part of
-- the interface for standalone libraries.
if Sid.Kind = Spec
and then (not Sid.Project.Externally_Built
or else Sid.Project = Project)
and then not Sid.Locally_Removed
and then (Project.Standalone_Library = No
or else Sid.Declared_In_Interfaces)
-- Handle case of non-compilable languages
and then Sid.Dep_Name /= No_File
then
Action (Sid);
-- Check ALI for dependencies on body and sep
ALI :=
Load_ALI
(Get_Name_String (Get_Object_Directory (Sid.Project, True))
& Get_Name_String (Sid.Dep_Name));
if ALI /= No_ALI_Id then
First_Unit := ALIs.Table (ALI).First_Unit;
Second_Unit := No_Unit_Id;
Body_Needed := True;
-- If there is both a spec and a body, check if both needed
if Units.Table (First_Unit).Utype = Is_Body then
Second_Unit := ALIs.Table (ALI).Last_Unit;
-- If the body is not needed, then reset First_Unit
if not Units.Table (Second_Unit).Body_Needed_For_SAL then
Body_Needed := False;
end if;
elsif Units.Table (First_Unit).Utype = Is_Spec_Only then
Body_Needed := False;
end if;
-- Handle all the separates, if any
if Body_Needed then
if Other_Part (Sid) /= null then
Deps.Include (Get_Name_String (Other_Part (Sid).File));
end if;
for Dep in ALIs.Table (ALI).First_Sdep ..
ALIs.Table (ALI).Last_Sdep
loop
if Sdep.Table (Dep).Subunit_Name /= No_Name then
Deps.Include
(Get_Name_String (Sdep.Table (Dep).Sfile));
end if;
end loop;
end if;
end if;
end if;
Next (Iter);
end loop;
-- Now handle the bodies and separates if needed
if Deps.Length /= 0 then
if Project.Qualifier = Aggregate_Library then
Iter := For_Each_Source (Tree);
else
Iter := For_Each_Source (Tree, Project);
end if;
loop
Sid := Element (Iter);
exit when Sid = No_Source;
if Sid.Kind /= Spec
and then Deps.Contains (Get_Name_String (Sid.File))
then
Action (Sid);
end if;
Next (Iter);
end loop;
end if;
end For_Interface_Sources;
--------------
-- Get_Line --
--------------
procedure Get_Line
(File : Text_File;
Line : out String;
Last : out Natural)
is
C : Character;
procedure Advance;
-------------
-- Advance --
-------------
procedure Advance is
begin
if File.Cursor = File.Buffer_Len then
File.Buffer_Len :=
Read
(FD => File.FD,
A => File.Buffer'Address,
N => File.Buffer'Length);
if File.Buffer_Len = 0 then
File.End_Of_File_Reached := True;
return;
else
File.Cursor := 1;
end if;
else
File.Cursor := File.Cursor + 1;
end if;
end Advance;
-- Start of processing for Get_Line
begin
if File = null then
Prj.Com.Fail ("Get_Line attempted on an invalid Text_File");
elsif File.Out_File then
Prj.Com.Fail ("Get_Line attempted on an out file");
end if;
Last := Line'First - 1;
if not File.End_Of_File_Reached then
loop
C := File.Buffer (File.Cursor);
exit when C = ASCII.CR or else C = ASCII.LF;
Last := Last + 1;
Line (Last) := C;
Advance;
if File.End_Of_File_Reached then
return;
end if;
exit when Last = Line'Last;
end loop;
if C = ASCII.CR or else C = ASCII.LF then
Advance;
if File.End_Of_File_Reached then
return;
end if;
end if;
if C = ASCII.CR
and then File.Buffer (File.Cursor) = ASCII.LF
then
Advance;
end if;
end if;
end Get_Line;
----------------
-- Initialize --
----------------
procedure Initialize
(Iter : out Source_Info_Iterator;
For_Project : Name_Id)
is
Ind : constant Natural := Source_Info_Project_HTable.Get (For_Project);
begin
if Ind = 0 then
Iter := (No_Source_Info, 0);
else
Iter := Source_Info_Table.Table (Ind);
end if;
end Initialize;
--------------
-- Is_Valid --
--------------
function Is_Valid (File : Text_File) return Boolean is
begin
return File /= null;
end Is_Valid;
----------
-- Next --
----------
procedure Next (Iter : in out Source_Info_Iterator) is
begin
if Iter.Next = 0 then
Iter.Info := No_Source_Info;
else
Iter := Source_Info_Table.Table (Iter.Next);
end if;
end Next;
----------
-- Open --
----------
procedure Open (File : out Text_File; Name : String) is
FD : File_Descriptor;
File_Name : String (1 .. Name'Length + 1);
begin
File_Name (1 .. Name'Length) := Name;
File_Name (File_Name'Last) := ASCII.NUL;
FD := Open_Read (Name => File_Name'Address,
Fmode => GNAT.OS_Lib.Text);
if FD = Invalid_FD then
File := null;
else
File := new Text_File_Data;
File.FD := FD;
File.Buffer_Len :=
Read (FD => FD,
A => File.Buffer'Address,
N => File.Buffer'Length);
if File.Buffer_Len = 0 then
File.End_Of_File_Reached := True;
else
File.Cursor := 1;
end if;
end if;
end Open;
---------
-- Put --
---------
procedure Put
(Into_List : in out Name_List_Index;
From_List : String_List_Id;
In_Tree : Project_Tree_Ref;
Lower_Case : Boolean := False)
is
Shared : constant Shared_Project_Tree_Data_Access := In_Tree.Shared;
Current_Name : Name_List_Index;
List : String_List_Id;
Element : String_Element;
Last : Name_List_Index :=
Name_List_Table.Last (Shared.Name_Lists);
Value : Name_Id;
begin
Current_Name := Into_List;
while Current_Name /= No_Name_List
and then Shared.Name_Lists.Table (Current_Name).Next /= No_Name_List
loop
Current_Name := Shared.Name_Lists.Table (Current_Name).Next;
end loop;
List := From_List;
while List /= Nil_String loop
Element := Shared.String_Elements.Table (List);
Value := Element.Value;
if Lower_Case then
Get_Name_String (Value);
To_Lower (Name_Buffer (1 .. Name_Len));
Value := Name_Find;
end if;
Name_List_Table.Append
(Shared.Name_Lists, (Name => Value, Next => No_Name_List));
Last := Last + 1;
if Current_Name = No_Name_List then
Into_List := Last;
else
Shared.Name_Lists.Table (Current_Name).Next := Last;
end if;
Current_Name := Last;
List := Element.Next;
end loop;
end Put;
procedure Put (File : Text_File; S : String) is
Len : Integer;
begin
if File = null then
Prj.Com.Fail ("Attempted to write on an invalid Text_File");
elsif not File.Out_File then
Prj.Com.Fail ("Attempted to write an in Text_File");
end if;
if File.Buffer_Len + S'Length > File.Buffer'Last then
-- Write buffer
Len := Write (File.FD, File.Buffer'Address, File.Buffer_Len);
if Len /= File.Buffer_Len then
Prj.Com.Fail ("Failed to write to an out Text_File");
end if;
File.Buffer_Len := 0;
end if;
File.Buffer (File.Buffer_Len + 1 .. File.Buffer_Len + S'Length) := S;
File.Buffer_Len := File.Buffer_Len + S'Length;
end Put;
--------------
-- Put_Line --
--------------
procedure Put_Line (File : Text_File; Line : String) is
L : String (1 .. Line'Length + 1);
begin
L (1 .. Line'Length) := Line;
L (L'Last) := ASCII.LF;
Put (File, L);
end Put_Line;
---------------------------
-- Read_Source_Info_File --
---------------------------
procedure Read_Source_Info_File (Tree : Project_Tree_Ref) is
File : Text_File;
Info : Source_Info_Iterator;
Proj : Name_Id;
procedure Report_Error;
------------------
-- Report_Error --
------------------
procedure Report_Error is
begin
Write_Line ("errors in source info file """ &
Tree.Source_Info_File_Name.all & '"');
Tree.Source_Info_File_Exists := False;
end Report_Error;
begin
Source_Info_Project_HTable.Reset;
Source_Info_Table.Init;
if Tree.Source_Info_File_Name = null then
Tree.Source_Info_File_Exists := False;
return;
end if;
Open (File, Tree.Source_Info_File_Name.all);
if not Is_Valid (File) then
if Opt.Verbose_Mode then
Write_Line ("source info file " & Tree.Source_Info_File_Name.all &
" does not exist");
end if;
Tree.Source_Info_File_Exists := False;
return;
end if;
Tree.Source_Info_File_Exists := True;
if Opt.Verbose_Mode then
Write_Line ("Reading source info file " &
Tree.Source_Info_File_Name.all);
end if;
Source_Loop :
while not End_Of_File (File) loop
Info := (new Source_Info_Data, 0);
Source_Info_Table.Increment_Last;
-- project name
Get_Line (File, Name_Buffer, Name_Len);
Proj := Name_Find;
Info.Info.Project := Proj;
Info.Next := Source_Info_Project_HTable.Get (Proj);
Source_Info_Project_HTable.Set (Proj, Source_Info_Table.Last);
if End_Of_File (File) then
Report_Error;
exit Source_Loop;
end if;
-- language name
Get_Line (File, Name_Buffer, Name_Len);
Info.Info.Language := Name_Find;
if End_Of_File (File) then
Report_Error;
exit Source_Loop;
end if;
-- kind
Get_Line (File, Name_Buffer, Name_Len);
Info.Info.Kind := Source_Kind'Value (Name_Buffer (1 .. Name_Len));
if End_Of_File (File) then
Report_Error;
exit Source_Loop;
end if;
-- display path name
Get_Line (File, Name_Buffer, Name_Len);
Info.Info.Display_Path_Name := Name_Find;
Info.Info.Path_Name := Info.Info.Display_Path_Name;
if End_Of_File (File) then
Report_Error;
exit Source_Loop;
end if;
-- optional fields
Option_Loop :
loop
Get_Line (File, Name_Buffer, Name_Len);
exit Option_Loop when Name_Len = 0;
if Name_Len <= 2 then
Report_Error;
exit Source_Loop;
else
if Name_Buffer (1 .. 2) = "P=" then
Name_Buffer (1 .. Name_Len - 2) :=
Name_Buffer (3 .. Name_Len);
Name_Len := Name_Len - 2;
Info.Info.Path_Name := Name_Find;
elsif Name_Buffer (1 .. 2) = "U=" then
Name_Buffer (1 .. Name_Len - 2) :=
Name_Buffer (3 .. Name_Len);
Name_Len := Name_Len - 2;
Info.Info.Unit_Name := Name_Find;
elsif Name_Buffer (1 .. 2) = "I=" then
Info.Info.Index := Int'Value (Name_Buffer (3 .. Name_Len));
elsif Name_Buffer (1 .. Name_Len) = "N=Y" then
Info.Info.Naming_Exception := Yes;
elsif Name_Buffer (1 .. Name_Len) = "N=I" then
Info.Info.Naming_Exception := Inherited;
else
Report_Error;
exit Source_Loop;
end if;
end if;
end loop Option_Loop;
Source_Info_Table.Table (Source_Info_Table.Last) := Info;
end loop Source_Loop;
Close (File);
exception
when others =>
Close (File);
Report_Error;
end Read_Source_Info_File;
--------------------
-- Source_Info_Of --
--------------------
function Source_Info_Of (Iter : Source_Info_Iterator) return Source_Info is
begin
return Iter.Info;
end Source_Info_Of;
--------------
-- Value_Of --
--------------
function Value_Of
(Variable : Variable_Value;
Default : String) return String
is
begin
if Variable.Kind /= Single
or else Variable.Default
or else Variable.Value = No_Name
then
return Default;
else
return Get_Name_String (Variable.Value);
end if;
end Value_Of;
function Value_Of
(Index : Name_Id;
In_Array : Array_Element_Id;
Shared : Shared_Project_Tree_Data_Access) return Name_Id
is
Current : Array_Element_Id;
Element : Array_Element;
Real_Index : Name_Id := Index;
begin
Current := In_Array;
if Current = No_Array_Element then
return No_Name;
end if;
Element := Shared.Array_Elements.Table (Current);
if not Element.Index_Case_Sensitive then
Get_Name_String (Index);
To_Lower (Name_Buffer (1 .. Name_Len));
Real_Index := Name_Find;
end if;
while Current /= No_Array_Element loop
Element := Shared.Array_Elements.Table (Current);
if Real_Index = Element.Index then
exit when Element.Value.Kind /= Single;
exit when Element.Value.Value = Empty_String;
return Element.Value.Value;
else
Current := Element.Next;
end if;
end loop;
return No_Name;
end Value_Of;
function Value_Of
(Index : Name_Id;
Src_Index : Int := 0;
In_Array : Array_Element_Id;
Shared : Shared_Project_Tree_Data_Access;
Force_Lower_Case_Index : Boolean := False;
Allow_Wildcards : Boolean := False) return Variable_Value
is
Current : Array_Element_Id;
Element : Array_Element;
Real_Index_1 : Name_Id;
Real_Index_2 : Name_Id;
begin
Current := In_Array;
if Current = No_Array_Element then
return Nil_Variable_Value;
end if;
Element := Shared.Array_Elements.Table (Current);
Real_Index_1 := Index;
if not Element.Index_Case_Sensitive or else Force_Lower_Case_Index then
if Index /= All_Other_Names then
Get_Name_String (Index);
To_Lower (Name_Buffer (1 .. Name_Len));
Real_Index_1 := Name_Find;
end if;
end if;
while Current /= No_Array_Element loop
Element := Shared.Array_Elements.Table (Current);
Real_Index_2 := Element.Index;
if not Element.Index_Case_Sensitive
or else Force_Lower_Case_Index
then
if Element.Index /= All_Other_Names then
Get_Name_String (Element.Index);
To_Lower (Name_Buffer (1 .. Name_Len));
Real_Index_2 := Name_Find;
end if;
end if;
if Src_Index = Element.Src_Index and then
(Real_Index_1 = Real_Index_2 or else
(Real_Index_2 /= All_Other_Names and then
Allow_Wildcards and then
Match (Get_Name_String (Real_Index_1),
Compile (Get_Name_String (Real_Index_2),
Glob => True))))
then
return Element.Value;
else
Current := Element.Next;
end if;
end loop;
return Nil_Variable_Value;
end Value_Of;
function Value_Of
(Name : Name_Id;
Index : Int := 0;
Attribute_Or_Array_Name : Name_Id;
In_Package : Package_Id;
Shared : Shared_Project_Tree_Data_Access;
Force_Lower_Case_Index : Boolean := False;
Allow_Wildcards : Boolean := False) return Variable_Value
is
The_Array : Array_Element_Id;
The_Attribute : Variable_Value := Nil_Variable_Value;
begin
if In_Package /= No_Package then
-- First, look if there is an array element that fits
The_Array :=
Value_Of
(Name => Attribute_Or_Array_Name,
In_Arrays => Shared.Packages.Table (In_Package).Decl.Arrays,
Shared => Shared);
The_Attribute :=
Value_Of
(Index => Name,
Src_Index => Index,
In_Array => The_Array,
Shared => Shared,
Force_Lower_Case_Index => Force_Lower_Case_Index,
Allow_Wildcards => Allow_Wildcards);
-- If there is no array element, look for a variable
if The_Attribute = Nil_Variable_Value then
The_Attribute :=
Value_Of
(Variable_Name => Attribute_Or_Array_Name,
In_Variables => Shared.Packages.Table
(In_Package).Decl.Attributes,
Shared => Shared);
end if;
end if;
return The_Attribute;
end Value_Of;
function Value_Of
(Index : Name_Id;
In_Array : Name_Id;
In_Arrays : Array_Id;
Shared : Shared_Project_Tree_Data_Access) return Name_Id
is
Current : Array_Id;
The_Array : Array_Data;
begin
Current := In_Arrays;
while Current /= No_Array loop
The_Array := Shared.Arrays.Table (Current);
if The_Array.Name = In_Array then
return Value_Of
(Index, In_Array => The_Array.Value, Shared => Shared);
else
Current := The_Array.Next;
end if;
end loop;
return No_Name;
end Value_Of;
function Value_Of
(Name : Name_Id;
In_Arrays : Array_Id;
Shared : Shared_Project_Tree_Data_Access) return Array_Element_Id
is
Current : Array_Id;
The_Array : Array_Data;
begin
Current := In_Arrays;
while Current /= No_Array loop
The_Array := Shared.Arrays.Table (Current);
if The_Array.Name = Name then
return The_Array.Value;
else
Current := The_Array.Next;
end if;
end loop;
return No_Array_Element;
end Value_Of;
function Value_Of
(Name : Name_Id;
In_Packages : Package_Id;
Shared : Shared_Project_Tree_Data_Access) return Package_Id
is
Current : Package_Id;
The_Package : Package_Element;
begin
Current := In_Packages;
while Current /= No_Package loop
The_Package := Shared.Packages.Table (Current);
exit when The_Package.Name /= No_Name
and then The_Package.Name = Name;
Current := The_Package.Next;
end loop;
return Current;
end Value_Of;
function Value_Of
(Variable_Name : Name_Id;
In_Variables : Variable_Id;
Shared : Shared_Project_Tree_Data_Access) return Variable_Value
is
Current : Variable_Id;
The_Variable : Variable;
begin
Current := In_Variables;
while Current /= No_Variable loop
The_Variable := Shared.Variable_Elements.Table (Current);
if Variable_Name = The_Variable.Name then
return The_Variable.Value;
else
Current := The_Variable.Next;
end if;
end loop;
return Nil_Variable_Value;
end Value_Of;
----------------------------
-- Write_Source_Info_File --
----------------------------
procedure Write_Source_Info_File (Tree : Project_Tree_Ref) is
Iter : Source_Iterator := For_Each_Source (Tree);
Source : Prj.Source_Id;
File : Text_File;
begin
if Opt.Verbose_Mode then
Write_Line ("Writing new source info file " &
Tree.Source_Info_File_Name.all);
end if;
Create (File, Tree.Source_Info_File_Name.all);
if not Is_Valid (File) then
Write_Line ("warning: unable to create source info file """ &
Tree.Source_Info_File_Name.all & '"');
return;
end if;
loop
Source := Element (Iter);
exit when Source = No_Source;
if not Source.Locally_Removed and then
Source.Replaced_By = No_Source
then
-- Project name
Put_Line (File, Get_Name_String (Source.Project.Name));
-- Language name
Put_Line (File, Get_Name_String (Source.Language.Name));
-- Kind
Put_Line (File, Source.Kind'Img);
-- Display path name
Put_Line (File, Get_Name_String (Source.Path.Display_Name));
-- Optional lines:
-- Path name (P=)
if Source.Path.Name /= Source.Path.Display_Name then
Put (File, "P=");
Put_Line (File, Get_Name_String (Source.Path.Name));
end if;
-- Unit name (U=)
if Source.Unit /= No_Unit_Index then
Put (File, "U=");
Put_Line (File, Get_Name_String (Source.Unit.Name));
end if;
-- Multi-source index (I=)
if Source.Index /= 0 then
Put (File, "I=");
Put_Line (File, Source.Index'Img);
end if;
-- Naming exception ("N=T");
if Source.Naming_Exception = Yes then
Put_Line (File, "N=Y");
elsif Source.Naming_Exception = Inherited then
Put_Line (File, "N=I");
end if;
-- Empty line to indicate end of info on this source
Put_Line (File, "");
end if;
Next (Iter);
end loop;
Close (File);
end Write_Source_Info_File;
---------------
-- Write_Str --
---------------
procedure Write_Str
(S : String;
Max_Length : Positive;
Separator : Character)
is
First : Positive := S'First;
Last : Natural := S'Last;
begin
-- Nothing to do for empty strings
if S'Length > 0 then
-- Start on a new line if current line is already longer than
-- Max_Length.
if Positive (Column) >= Max_Length then
Write_Eol;
end if;
-- If length of remainder is longer than Max_Length, we need to
-- cut the remainder in several lines.
while Positive (Column) + S'Last - First > Max_Length loop
-- Try the maximum length possible
Last := First + Max_Length - Positive (Column);
-- Look for last Separator in the line
while Last >= First and then S (Last) /= Separator loop
Last := Last - 1;
end loop;
-- If we do not find a separator, we output the maximum length
-- possible.
if Last < First then
Last := First + Max_Length - Positive (Column);
end if;
Write_Line (S (First .. Last));
-- Set the beginning of the new remainder
First := Last + 1;
end loop;
-- What is left goes to the buffer, without EOL
Write_Str (S (First .. S'Last));
end if;
end Write_Str;
end Prj.Util;
|
TotalParserCombinators/Derivative/RightInverse.agda | nad/parser-combinators | 1 | 16882 | <filename>TotalParserCombinators/Derivative/RightInverse.agda
------------------------------------------------------------------------
-- The derivative operator does not remove any ambiguity
------------------------------------------------------------------------
module TotalParserCombinators.Derivative.RightInverse where
open import Data.List
open import Data.Maybe
open import Relation.Binary.HeterogeneousEquality as H using (_≅_; refl)
open import Relation.Binary.PropositionalEquality
open import TotalParserCombinators.Derivative.SoundComplete
import TotalParserCombinators.InitialBag as I
open import TotalParserCombinators.Lib
open import TotalParserCombinators.Parser
open import TotalParserCombinators.Semantics hiding (_≅_)
mutual
sound∘complete : ∀ {Tok R xs x s t} {p : Parser Tok R xs} →
(x∈p : x ∈ p · t ∷ s) →
sound p (complete x∈p) ≡ x∈p
sound∘complete x∈p = H.≅-to-≡ (sound∘complete′ x∈p refl)
sound∘complete′ :
∀ {Tok R xs x s′ s t} {p : Parser Tok R xs}
(x∈p : x ∈ p · s′) (eq : s′ ≡ t ∷ s) →
sound p (complete′ p x∈p eq) ≅ x∈p
sound∘complete′ token refl = refl
sound∘complete′ (∣-left x∈p₁) refl rewrite sound∘complete x∈p₁ = refl
sound∘complete′ (∣-right _ x∈p₂) refl rewrite sound∘complete x∈p₂ = refl
sound∘complete′ (<$> x∈p) refl rewrite sound∘complete x∈p = refl
sound∘complete′ (_⊛_ {s₁ = _ ∷ _} {fs = nothing} {xs = just _} f∈p₁ x∈p₂) refl
rewrite sound∘complete f∈p₁ = refl
sound∘complete′ (_⊛_ {s₁ = _ ∷ _} {fs = just _} {xs = just _} f∈p₁ x∈p₂) refl
rewrite sound∘complete f∈p₁ = refl
sound∘complete′ {Tok} (_⊛_ {s₁ = []} {fs = just _} {xs = just _} f∈p₁ x∈p₂) refl
rewrite Return⋆.sound∘complete {Tok = Tok} (I.complete f∈p₁)
| I.sound∘complete f∈p₁
| sound∘complete x∈p₂ = refl
sound∘complete′ {p = _⊛_ {xs = nothing} _ _}
(_⊛_ {s₁ = _ ∷ _} {fs = nothing} {xs = nothing} f∈p₁ x∈p₂) refl
rewrite sound∘complete f∈p₁ = refl
sound∘complete′ (_⊛_ {s₁ = _ ∷ _} {fs = just _} {xs = nothing} f∈p₁ x∈p₂) refl
rewrite sound∘complete f∈p₁ = refl
sound∘complete′ {Tok} (_⊛_ {s₁ = []} {fs = just _} {xs = nothing} f∈p₁ x∈p₂) refl
rewrite Return⋆.sound∘complete {Tok = Tok} (I.complete f∈p₁)
| I.sound∘complete f∈p₁
| sound∘complete x∈p₂ = refl
sound∘complete′ (_>>=_ {s₁ = _ ∷ _} {xs = nothing} {f = just _} x∈p₁ y∈p₂x) refl
rewrite sound∘complete x∈p₁ = refl
sound∘complete′ (_>>=_ {s₁ = _ ∷ _} {xs = just _} {f = just _} x∈p₁ y∈p₂x) refl
rewrite sound∘complete x∈p₁ = refl
sound∘complete′ {Tok} (_>>=_ {s₁ = []} {xs = just _} {f = just _} x∈p₁ y∈p₂x) refl
rewrite Return⋆.sound∘complete {Tok = Tok} (I.complete x∈p₁)
| I.sound∘complete x∈p₁
| sound∘complete y∈p₂x = refl
sound∘complete′ {p = _>>=_ {xs = nothing} _ _}
(_>>=_ {s₁ = _ ∷ _} {xs = nothing} {f = nothing} x∈p₁ y∈p₂x) refl
rewrite sound∘complete x∈p₁ = refl
sound∘complete′ (_>>=_ {s₁ = _ ∷ _} {xs = just _} {f = nothing} x∈p₁ y∈p₂x) refl
rewrite sound∘complete x∈p₁ = refl
sound∘complete′ {Tok} (_>>=_ {s₁ = []} {xs = just _} {f = nothing} x∈p₁ y∈p₂x) refl
rewrite Return⋆.sound∘complete {Tok = Tok} (I.complete x∈p₁)
| I.sound∘complete x∈p₁
| sound∘complete y∈p₂x = refl
sound∘complete′ (nonempty x∈p) refl rewrite sound∘complete x∈p = refl
sound∘complete′ (cast x∈p) refl rewrite sound∘complete x∈p = refl
sound∘complete′ (_⊛_ {s₁ = []} {fs = nothing} f∈p₁ _) _ with I.complete f∈p₁
... | ()
sound∘complete′ (_>>=_ {s₁ = []} {xs = nothing} x∈p₁ _) _ with I.complete x∈p₁
... | ()
sound∘complete′ return ()
|
programs/oeis/175/A175777.asm | neoneye/loda | 22 | 21887 | ; A175777: Partial sums of floor(n^2/16).
; 0,0,0,0,1,2,4,7,11,16,22,29,38,48,60,74,90,108,128,150,175,202,232,265,301,340,382,427,476,528,584,644,708,776,848,924,1005,1090,1180,1275,1375,1480,1590,1705,1826,1952,2084,2222,2366,2516,2672,2834,3003,3178,3360,3549,3745,3948,4158,4375,4600,4832,5072,5320,5576,5840,6112,6392,6681,6978,7284,7599,7923,8256,8598,8949,9310,9680,10060,10450,10850,11260,11680,12110,12551,13002,13464,13937,14421,14916,15422,15939,16468,17008,17560,18124,18700,19288,19888,20500
lpb $0
mov $2,$0
sub $0,2
seq $2,11861 ; a(n) = floor(n(n-1)/8).
add $1,$2
lpe
mov $0,$1
|
t/g4-grammars/test.g4 | spebern/ANTLRv4-Translator | 0 | 4452 | /*
* [The "BSD license"]
* Copyright (c) 2014 <NAME>
* Copyright (c) 2014 <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR 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.
*/
/** A grammar for ANTLR v4 tokens */
lexer grammar ANTLRv4Lexer;
@members {
/** Track whether we are inside of a rule and whether it is lexical parser.
* _currentRuleType==Token.INVALID_TYPE means that we are outside of a rule.
* At the first sign of a rule name reference and _currentRuleType==invalid,
* we can assume that we are starting a parser rule. Similarly, seeing
* a token reference when not already in rule means starting a token
* rule. The terminating ';' of a rule, flips this back to invalid type.
*
* This is not perfect logic but works. For example, "grammar T;" means
* that we start and stop a lexical rule for the "T;". Dangerous but works.
*
* The whole point of this state information is to distinguish
* between [..arg actions..] and [charsets]. Char sets can only occur in
* lexical rules and arg actions cannot occur.
*/
private int _currentRuleType = Token.INVALID_TYPE;
public int getCurrentRuleType() {
return _currentRuleType;
}
public void setCurrentRuleType(int ruleType) {
this._currentRuleType = ruleType;
}
protected void handleBeginArgAction() {
if (inLexerRule()) {
pushMode(LexerCharSet);
more();
}
else {
pushMode(ArgAction);
more();
}
}
@Override
public Token emit() {
if (_type == ID) {
String firstChar = _input.getText(Interval.of(_tokenStartCharIndex, _tokenStartCharIndex));
if (Character.isUpperCase(firstChar.charAt(0))) {
_type = TOKEN_REF;
} else {
_type = RULE_REF;
}
if (_currentRuleType == Token.INVALID_TYPE) { // if outside of rule def
_currentRuleType = _type; // set to inside lexer or parser rule
}
}
else if (_type == SEMI) { // exit rule def
_currentRuleType = Token.INVALID_TYPE;
}
return super.emit();
}
private boolean inLexerRule() {
return _currentRuleType == TOKEN_REF;
}
private boolean inParserRule() { // not used, but added for clarity
return _currentRuleType == RULE_REF;
}
}
|
libsrc/target/gb/gbdk/asm_plot.asm | Frodevan/z88dk | 640 | 95203 | <gh_stars>100-1000
SECTION code_driver
PUBLIC asm_plot
PUBLIC asm_drawing_wrbyte
GLOBAL __fgcolour
GLOBAL __bgcolour
GLOBAL __draw_mode
GLOBAL y_table
INCLUDE "target/gb/def/gb_globals.def"
;; Draw a point at (B,C) with mode and color D
asm_plot:
LD HL,y_table
LD D,0x00
LD E,C
ADD HL,DE
ADD HL,DE
LD A,(HL+)
LD H,(HL)
LD L,A
LD A,B
AND 0xf8
LD E,A
ADD HL,DE
ADD HL,DE
LD A,B
AND 7
ADD 0x10 ; Table of bits is located at 0x0010
LD C,A
LD B,0x00
LD A,(BC)
LD B,A
CPL
LD C,A
;; Fall into
asm_drawing_wrbyte:
if 0
LD A,(mod_col) ; Restore color and mode
LD D,A
BIT 5,D
JR NZ,wrbyte_10
BIT 6,D
JR NZ,wrbyte_20
BIT 7,D
JR NZ,wrbyte_30
else
LD A,(__fgcolour)
LD D,A
LD A,(__draw_mode)
CP M_OR
JR Z,wrbyte_10
CP M_XOR
JR Z,wrbyte_20
CP M_AND
JR Z,wrbyte_30
endif
; Fall through to SOLID by default
wrbyte_1:
;; Solid
LD E,B
if 0
BIT 2,D
else
BIT 0,D
endif
JR NZ,wrbyte_2
PUSH BC
LD B,0x00
wrbyte_2:
if 0
BIT 3,D
else
BIT 1,D
endif
JR NZ,wrbyte_3
LD E,0x00
wrbyte_3:
LDH A,(STAT)
BIT 1,A
JR NZ,wrbyte_3
LD A,(HL)
AND C
OR B
LD (HL+),A
LD A,(HL)
AND C
OR E
LD (HL),A
LD A,B
OR A
RET NZ
POP BC
RET
wrbyte_10:
;; Or
LD C,B
if 0
BIT 2,D
else
BIT 0,D
endif
JR NZ,wrbyte_11
LD B,0x00
wrbyte_11:
if 0
BIT 3,D
else
BIT 1,D
endif
JR NZ,wrbyte_12
LD C,0x00
wrbyte_12:
LDH A,(STAT)
BIT 1,A
JR NZ,wrbyte_12
LD A,(HL)
OR B
LD (HL+),A
LD A,(HL)
OR C
LD (HL),A
RET
wrbyte_20:
;; Xor
LD C,B
if 0
BIT 2,D
else
BIT 0,D
endif
JR NZ,wrbyte_21
LD B,0x00
wrbyte_21:
if 0
BIT 3,D
else
BIT 1,D
endif
JR NZ,wrbyte_22
LD C,0x00
wrbyte_22:
LDH A,(STAT)
BIT 1,A
JR NZ,wrbyte_22
LD A,(HL)
XOR B
LD (HL+),A
LD A,(HL)
XOR C
LD (HL),A
RET
wrbyte_30:
;; And
LD B,C
if 0
BIT 2,D
else
BIT 0,D
endif
JR Z,wrbyte_31
LD B,0xFF
wrbyte_31:
if 0
BIT 3,D
else
BIT 1,D
endif
JR Z,wrbyte_32
LD C,0xFF
wrbyte_32:
LDH A,(STAT)
BIT 1,A
JR NZ,wrbyte_32
LD A,(HL)
AND B
LD (HL+),A
LD A,(HL)
AND C
LD (HL),A
RET |
Sound Test.asm | NatsumiFox/AMPS | 20 | 26258 | ; ===========================================================================
; ---------------------------------------------------------------------------
; Sound Test Screen
; ---------------------------------------------------------------------------
if FEATURE_SOUNDTEST=0
inform 3,"FEATURE_SOUNDTEST must be 1 in order for this sound test to work"
endif
SoundTest:
; --- Setup/clearing ---
move #$2700,sr ; disable interrupts
move.l #NullBlank,(HBlankRout).w ; set H-blank routine
move.l #VB_SoundTest_NoHB,(VBlankRout).w ; set V-blank routine
lea ($C00000).l,a5 ; load VDP data port
lea $04(a5),a6 ; load VDP control port
move.w #$8000|%00000100,(a6) ; 00LH 01CD - Leftover SMS bar (0N|1Y) | H-Interrupt (0N|1Y) | H,V Counter (0N|1Y) | Disable video signal (0N|1Y)
move.w #$8100|%01110100,(a6) ; SDVM P100 - SMS mode (0N|1Y) | Display (0N|1Y) | V-Interrupt (0N|1Y) | DMA (0N|1Y) | V-resolution (0-1C|1-1E)
move.w #$8200|((($C000)>>$0A)&$FF),(a6) ; 00FE DCBA - Scroll Plane A Map Table VRam address
move.w #$8300|((($F000)>>$0A)&$FF),(a6) ; 00FE DCB0 / 00FE DC00 (20 H-resol) - Window Plane A Map Table VRam address
move.w #$8400|((($E000)>>$0D)&$FF),(a6) ; 0000 0FED - Scroll Plane B Map Table VRam address
move.w #$8500|((($F800)>>$09)&$FF),(a6) ; 0FED CBA9 / 0FED CBA0 (20 H-resol) - Sprite Plane Map Table VRam address
move.w #$8600|%00000000,(a6) ; 0000 0000 - Unknown/Unused Register
move.w #$8700|$20,(a6) ; 00PP CCCC - Backdrop Colour: Palette Line | Colour ID
move.w #$8800|%00000000,(a6) ; 0000 0000 - Unknown/Unused Register
move.w #$8900|%00000000,(a6) ; 0000 0000 - Unknown/Unused Register
move.w #$8A00|$DF,(a6) ; 7654 3210 - H-Interrupt Register
move.w #$8B00|%00000011,(a6) ; 0000 EVHH - External Interrupt (0N|1Y) | V-Scroll (0-Full|1-2Celled) | H-Scroll: (00-Full|10-Celled|11-Sliced)
move.w #$8C00|%10000001,(a6) ; APHE SNNB - H-resol (0N|1Y) | Pixel int (0N|1Y) | H-sync (0N|1Y) | Extern-pix (0N|1Y) | S/H (0N|1Y) | Interlace (00N|01Y|11-Split) | H-resol (0-20|1-28)
move.w #$8D00|((($FC00)>>$0A)&$FF),(a6) ; 00FE DCBA - Horizontal Scroll Table VRam address
move.w #$8E00|%00000000,(a6) ; 0000 0000 - Unknown/Unused Register
move.w #$8F00|$02,(a6) ; 7654 3210 - Auto Increament
move.w #$9000|%00010001,(a6) ; 00VV 00HH - Plane Y Size (00-20|01-40|11-80) | Plane X size (00-20|01-40|11-80)
move.w #$9100|$00,(a6) ; 7654 3210 - Window Horizontal Position
move.w #$9200|$00,(a6) ; 7654 3210 - Window Vertical Position
; --- 68k Memory ---
moveq #$00,d0 ; clear d0
lea ($FFFF0000).l,a1 ; main RAM
move.w #$FFE0/$20-1,d1 ; set size of RAM
ST_ClearMain:
rept 8
move.l d0,(a1)+ ; clear RAM
endr
dbf d1,ST_ClearMain ; repeat til main RAM is clear
; --- Loading data ---
lea (Pal_Sound).l,a0 ; load palette data
lea ($FFFFFB00).w,a1 ; load palette RAM
moveq #(((Pal_Sound_End-Pal_Sound)/4)/2)-1,d1 ; set size of palette to laod
ST_LoadPal:
move.l (a0)+,(a1)+ ; load palette
move.l (a0)+,(a1)+ ; ''
dbf d1,ST_LoadPal ; repeat until entire palette is loaded
DMA (Map_Piano-Art_Piano), Art_Piano, $40000000
DMA (Art_End-Art_Extras), Art_Extras, $6C000002
DMA (Art_Font-Art_Keys), Art_Keys, $50000002
DMA (Map_Font-Art_Font), Art_Font, $58000002
lea Map_Piano,a0 ; load plane A map address
lea ($FFFF6000).l,a1 ; load map dumping area to a1
move.w #(Art_Keys-Map_Piano)/$10-1,d0 ; clear map add value
ST_CopyMap:
rept 4
move.l (a0)+,(a1)+ ; copy $10 bytes at once
endr
dbf d0,ST_CopyMap ; loop until done
lea ($FFFF6000).l,a1 ; load mappings
move.l #$60000003,d0 ; set VRAM address
moveq #$28-1,d1 ; set width
moveq #$1C-1,d2 ; set height
jsr MapScreen ; load mappings to plane in VRAM
lea ($FFFF7220).l,a1 ; load mappings of brighter bottom font bar area
moveq #$28-1,d1 ; set width
moveq #$0F-1,d2 ; set height
jsr MapScreen ; load mappings to plane in VRAM
; --- Final subroutines ---
lea ($FFFF6050).l,a0 ; load piano mappings
lea ($FFFF8000).w,a1 ; load plane buffer
moveq #$16-1,d2 ; set number of rows to copy
ST_LoadMapRow:
lea (a1),a2 ; load address to a2
lea $80(a1),a1 ; advance to next row for next pass
rept $28/2
move.l (a0)+,(a2)+ ; copy mappings to buffer
endr
dbf d2,ST_LoadMapRow ; repeat for all rows
bset.b #$00,($FFFFA000).w ; set to redraw the plane
bsr.w ST_SetupKeyColours ; setup the colour fades/variations for the keys
; --- Final variables ---
moveq #$FFFFFFFF,d0 ; set "previous" X and Y menu positions to something null
move.l d0,($FFFFA020+4).w ; ''
move.l d0,($FFFFA030+4).w ; ''
move.w #$0118,($FFFFA026).w ; set X position of text scroll
move.b #$80,($FFFF9000+$0B).w ; set PCM1 and2 as already rendered (this'll force FM6 to render if no music is playing)
move.w #$00,($FFFFA020).w ; set ID of initial song
; reloading a5/a6 just in case...
lea ($C00000).l,a5 ; load VDP data port
lea $04(a5),a6 ; load VDP control port
move.w #$8000|%00010100,(a6) ; 00LH 01CD - Leftover SMS bar (0N|1Y) | H-Interrupt (0N|1Y) | H,V Counter (0N|1Y) | Disable video signal (0N|1Y)
move.w #$8100|%01110100,(a6) ; SDVM P100 - SMS mode (0N|1Y) | Display (0N|1Y) | V-Interrupt (0N|1Y) | DMA (0N|1Y) | V-resolution (0-1C|1-1E)
move.l #VB_SoundTest,(VBlankRout).w ; set V-blank routine
move.b #mus_Stop,mQueue.w ; set sound ID to "Stop music"
or.b #1<<mfbNoPAL,mFlags.w ; disable PAL fix
jsr SB_SoundTest ; rub subroutines
; ---------------------------------------------------------------------------
; Main Loop - Sound Test
; ---------------------------------------------------------------------------
ML_SoundTest:
st.b ($FFFFF62A).w ; set 68k as ready
vsync ; wait for V-blank
bsr.s SB_SoundTest ; run subroutines
bra.s ML_SoundTest
tst.b ($FFFFF605).w ; has start been pressed?
bpl.s ML_SoundTest ; if not, branch
move.l #NullBlank,(HBlankRout).w ; set H-blank routine
move.l #NullBlank,(VBlankRout).w ; set V-blank routine
move.b #$04,($FFFFF600).w ; set game mode to 04 (Title Screen)
rts ; return
; ---------------------------------------------------------------------------
; Subroutines - Sound Test
; ---------------------------------------------------------------------------
SB_SoundTest:
bsr.w ST_DrawFont ; draw the font (doing this BEFORE the control so scroll remains in sync)
bsr.w ST_Control ; read controls and perform options
bsr.s ST_DrawBars ; draw the transparent bars correctly
bsr.w ST_DrawPaino ; draw the piano background boards correctly
bsr.w ST_DrawKeys ; draw the keys on the piano
; ---------------------------------------------------------------------------
; Subroutine to scroll the text font of the music/sound being played
; ---------------------------------------------------------------------------
ST_ScrollFont:
moveq #$00,d0 ; clear d0
move.w ($FFFFA026).w,d0 ; load text position
swap d0 ; send to FG word
lea ($FFFFCEF4).w,a1 ; load scroll buffer area where text is
move.l d0,(a1)+ ; set scroll position of text
move.l d0,(a1)+ ; ''
move.l d0,(a1)+ ; ''
move.l d0,(a1)+ ; ''
move.l d0,(a1)+ ; ''
move.l d0,(a1)+ ; ''
move.l d0,(a1)+ ; ''
move.l d0,(a1)+ ; ''
move.l d0,(a1)+ ; ''
move.l d0,(a1)+ ; ''
move.l d0,(a1)+ ; ''
move.l d0,(a1)+ ; ''
move.l d0,(a1)+ ; ''
move.l d0,(a1)+ ; ''
rts ; return
; ===========================================================================
; ---------------------------------------------------------------------------
; Drawing the transparent font bars
; ---------------------------------------------------------------------------
ST_DrawBars:
move.l #$002D0000,d0 ; clear all registers
move.l d0,d1 ; ''
move.l d0,d2 ; ''
move.l d0,d3 ; ''
move.l d0,d4 ; ''
move.l d0,d5 ; ''
move.l d0,d6 ; ''
move.l d0,d7 ; ''
lea ($FFFF5E00+($28*4)).l,a1 ; load bar VSRAM buffer
movem.l d0-d7,-(a1) ; clear buffer
movem.l d0-d7,-(a1) ; ''
movem.l d0-d7,-(a1) ; ''
movem.l d0-d7,-(a1) ; ''
movem.l d0-d7,-(a1) ; ''
lea ($FFFFA010).l,a0 ; load bar to display
lea (STDB_Dark).l,a2 ; load brightness to use
bsr.s STDB_Draw ; draw the bar
lea ($FFFFA014).l,a0 ; load bar to display
lea (STDB_LightIn).l,a2 ; load brightness to use
bsr.s STDB_Draw ; draw the bar
lea ($FFFFA018).l,a0 ; load bar to display
lea (STDB_Dark).l,a2 ; load brightness to use
bsr.s STDB_Draw ; draw the bar
lea ($FFFFA01C).l,a0 ; load bar to display
lea (STDB_LightIn).l,a2 ; load brightness to use
STDB_Draw:
moveq #$00,d6 ; clear d6
move.b $02(a0),d6 ; load size
subq.w #$01,d6 ; minus 1 for dbf
bmi.s STDB_NoDraw ; if there is no size, branch
moveq #$00,d0 ; clear d0
move.b (a0),d0 ; load bar position
cmpi.b #$28,d0 ; is it too far down?
bhs.s STDB_NoDraw ; if so, branch
add.w d0,d0 ; multiply by long-word
add.w d0,d0 ; ''
lea ($FFFF5E00).l,a1 ; load buffer
adda.w d0,a1 ; advance to correct starting point
cmpi.b #$28+$02,d6 ; is the size too large?
bls.s STDB_NoMaxSize ; if not, branch
moveq #$28+$02,d6 ; set to maximum size
STDB_NoMaxSize:
move.l $04(a2),(a1)+ ; draw edge
dbf d6,STDB_NoSingle ; if not finished, branch
rts ; return
STDB_NoSingle:
subq.w #$02,d6 ; minus size of minimum without middle
bmi.s STDB_End ; if there's no middle, branch
STDB_NoEnd:
move.l (a2),(a1)+ ; draw ligh section
dbf d6,STDB_NoEnd ; repeat until all done
STDB_End:
addq.w #$01,d6 ; adjust counter
bmi.s STDB_NoEdge ; if it was 0001 originaly, branch
move.l $04(a2),(a1)+ ; draw egde again
STDB_NoEdge:
move.l $08(a2),(a1)+ ; draw black line
STDB_NoDraw:
rts ; return
; --- Bright bar colours ---
STDB_Light: dc.l $00050050 ; middle
dc.l $002D0028 ; edges
dc.l $00550078 ; black line
; --- Dark bar colours ---
STDB_Dark: dc.l $002D0028 ; middle
dc.l $002D0028 ; edges
dc.l $00550078 ; black line
; --- Bright bar colours (WITHOUT THE EDGE) ---
; For being displayed INSIDE a dark bar ONLY
STDB_LightIn: dc.l $00050050 ; middle
dc.l $00050050 ; edges
dc.l $00050050 ; black line
; ===========================================================================
; ---------------------------------------------------------------------------
; Subroutine to draw the font onto the bars correctly
; ---------------------------------------------------------------------------
ST_DrawFont:
; --- The song name ---
move.w ($FFFFA020).w,d0 ; load top menu X position
move.w ($FFFFA022).w,d1 ; is a change in progress?
bne.s STDF_Name ; if so, branch
cmp.w ($FFFFA024).w,d0 ; has it changed?
beq.s STDF_NoName ; if not, branch
move.w d0,($FFFFA024).w ; update change
STDF_Name:
add.w d0,d0 ; multiply by size of long-word
add.w d0,d0 ; ''
lea dSoundNames,a0 ; load font list
movea.l (a0,d0.w),a0 ; load correct string
adda.w d1,a0 ; advance to correct character
add.w d1,d1 ; multiply by size of word for VRAM
addq.w #$02,($FFFFA022).w ; advance to next character for next frame
subi.w #$0010,($FFFFA026).w ; decrease position
move.b (a0)+,d3 ; load character
bne.s STDF_NoNameFinish ; if valid, branch
clr.w ($FFFFA022).w ; clear change position
STDF_NoNameFinish:
move.l #$00034C04,d0 ; prepare VRAM address
add.w d1,d0
swap d0
move #$2700,sr ; disable interrupts
move.w #$8F80,(a6) ; set to increment a single line
bsr.w ST_DrawChar ; render the character
move.b (a0)+,d3 ; load character
bne.s STDF_NoNameFinish2 ; if valid, branch
clr.w ($FFFFA022).w ; clear change position
moveq #' ',d3
STDF_NoNameFinish2:
bsr.w ST_DrawChar ; render the character
moveq #' ',d3 ; set to load the space character
bsr.w ST_DrawChar ; ''
move.w #$8F02,(a6) ; revert increment mode
move #$2300,sr ; re-enable interrupts
STDF_NoName:
; --- The options ---
move.w ($FFFFA030).w,d0 ; load top menu X position
cmp.w ($FFFFA034).w,d0 ; has it changed?
beq.s STDF_NoOption ; if not, branch
move.w d0,($FFFFA034).w ; update change
lsl.w #$03,d0 ; multiply by size of 2 long-words
lea (STC_Opt).l,a0 ; load font list
movea.l (a0,d0.w),a0 ; load correct string
move.l #$4D020003,d0
move #$2700,sr ; disable interrupts
move.w #$8F80,(a6) ; set to increment a single line
bsr.s ST_DrawText
move.w #$8F02,(a6) ; revert increment mode
move #$2300,sr ; re-enable interrupts
STDF_NoOption:
rts ; return
; ---------------------------------------------------------------------------
; Drawing text correctly to VRAM
; ---------------------------------------------------------------------------
ST_DrawText:
move.l d0,d1 ; get dark VRAM address
addi.l #(($05*$80)<<$10),d1 ; ''
move.l #$00020000,d2 ; set advance amount
lea (Map_Font).l,a2 ; load mappings address
move.b (a0)+,d3 ; load character
STDT_NextChar:
bsr.s STDT_RenderChar ; draw character
move.b (a0)+,d3 ; load next character
bne.s STDT_NextChar ; if not finished, branch
rts ; return
; ---------------------------------------------------------------------------
; Subroutine to render a single character
; ---------------------------------------------------------------------------
ST_DrawChar:
move.l d0,d1 ; get dark VRAM address
addi.l #(($05*$80)<<$10),d1 ; ''
move.l #$00020000,d2 ; set advance amount
lea (Map_Font).l,a2 ; load mappings address
STDT_RenderChar:
moveq #$00,d4 ; set size as single tile
lea (a2),a1 ; reload font mappings
cmpi.b #' ',d3 ; is it a space?
beq.w STDT_Space ; if so, branch
addq.w #$04,a1 ; skip to next special character
cmpi.b #'<',d3 ; is it a *insert symbol here*?
beq.w STDT_Space ; if so, branch
addq.w #$04,a1 ; skip to next special character
cmpi.b #'>',d3 ; is it a *insert symbol here*?
beq.w STDT_Space ; if so, branch
cmpi.b #'#',d3 ; is it a variable?
bne.s STDT_NoVar ; if not, branch
moveq #$00,d3 ; clear d3
move.b (a0)+,d3 ; load variable number
subi.b #'0',d3 ; ''
add.w d3,d3 ; multiply by word
moveq #$FFFFFFFF,d4 ; load RAM address of variable
move.w STDT_VarList(pc,d3.w),d4 ; ''
move.l d4,a1 ; ''
move.b (a1),d3 ; load variable
move.b d3,d4 ; get first nybble
lsr.b #$04,d4 ; ''
andi.w #$000F,d4 ; ''
addq.b #$03,d4 ; adjust it
add.w d4,d4 ; multiply by long-word
add.w d4,d4 ; ''
lea (a2,d4.w),a1 ; load correct font mappings
move.l d1,(a6) ; set VRAM for dark
move.l $2E*4(a1),(a5) ; write character
move.l d0,(a6) ; set VRAM address
move.l (a1)+,(a5) ; write character
add.l d2,d0 ; advance addresses
add.l d2,d1 ; ''
moveq #$00,d4 ; clear nybble size
andi.w #$000F,d3 ; get second nybble
addq.b #$03,d3 ; adjust it
lea (a2),a1 ; load font mappings address
bra.s STDT_Special ; continue normally
STDT_VarList: dc.w mTempo ; #0 - Pitch
dc.w mSpeed ; #1 - Tempo
dc.w $F016 ; #2 - Volume
dc.w $0000 ; #3 - Unused...
; #4
; #5 ...etc up to #9...
STDT_NoVar:
cmpi.b #'-',d3 ; is it a dash symbol?
bne.s STDT_NoDash ; if not, branch
lea $27*4(a2),a1
bra.s STDT_Space
STDT_NoDash:
cmpi.b #'Z',d3 ; is it a regular letter or number?
bls.s STDT_Letter ; if so, branch
subi.b #'a',d3 ; subtract "a" for rendering button graphics
add.w d3,d3 ; multiply by 2 (since the tiles are twice the size
lea $28*4(a2),a1 ; advance to button graphics
moveq #$01,d4 ; set size as double tile
bra.s STDT_Special ; render the buttons
STDT_Letter:
cmpi.b #'9',d3 ; is it a number?
bls.s STDT_Number ; if so, branch
subq.b #'A'-('9'+1),d3 ; adjust to letters
STDT_Number:
subi.b #'0'-1,d3 ; adjust character
STDT_Special:
ext.w d3 ; clear upper byte
add.w d3,d3 ; multiply by long-word
add.w d3,d3 ; ''
adda.w d3,a1 ; advance to correct character
STDT_Space:
move.l d1,(a6) ; set VRAM for dark
move.l $2E*4(a1),(a5) ; write character
move.l d0,(a6) ; set VRAM address
move.l (a1)+,(a5) ; write character
add.l d2,d0 ; advance addresses
add.l d2,d1 ; ''
dbf d4,STDT_Space ; repeat for size
rts ; return
; ===========================================================================
; ---------------------------------------------------------------------------
; Subroutine to control the menu correctly
; ---------------------------------------------------------------------------
ST_Control:
move.l ($FFFFA004).w,d0 ; load routine
bne.s STC_ValidRoutine ; if the routine is valid, branch
move.l #STC_Intro,d0 ; set starting routine
move.l d0,($FFFFA004).w ; ''
STC_ValidRoutine:
movea.l d0,a0 ; set address
jmp (a0) ; run address
; ===========================================================================
; ---------------------------------------------------------------------------
; The intro
; ---------------------------------------------------------------------------
STC_Intro:
move.l #$0C000000,($FFFFA010).w ; set starting position/size of bars
move.l #$0C000000,($FFFFA014).w ; ''
move.l #$1C000000,($FFFFA018).w ; ''
move.l #$1C000000,($FFFFA01C).w ; ''
move.l #STC_Intro_BarsIn,($FFFFA004).w ; set next routine
rts ; return
; --- Top bar in ---
STC_Intro_BarsIn:
lea ($FFFFA010).w,a1 ; load bar
move.b (a1),d0 ; load position
addq.b #$02,$02(a1) ; increase size
subq.b #$01,d0 ; decrease position
cmpi.b #$05,d0 ; has it reached 5?
bhi.s STC_IBI_NoFinish ; if so, branch
move.l #STC_IBI_NextBar,($FFFFA004).w ; set next routine
STC_IBI_NoFinish:
move.b d0,(a1) ; set position
rts ; return
; --- Bottom bar in ---
STC_IBI_NextBar:
lea ($FFFFA018).w,a1 ; load bar
move.b (a1),d0 ; load position
addq.b #$02,$02(a1) ; increase size
subq.b #$01,d0 ; decrease position
cmpi.b #$15,d0 ; has it reached 15?
bhi.s STC_IBI_NoFinishNext ; if so, branch
move.l #STC_IBI_Highlight,($FFFFA004).w ; set next routine
STC_IBI_NoFinishNext:
move.b d0,(a1) ; set position
rts ; return
; --- Highlighter ---
STC_IBI_Highlight:
lea ($FFFFA014).w,a1 ; load bar
move.w (a1),d0 ; load position
addq.b #$01,$02(a1) ; increase size
subi.w #$0080,d0 ; decrease position
cmpi.w #$0600,d0 ; has it reached 5?
bhi.s STC_IBI_NoFinishHigh ; if so, branch
move.l #STC_TopBar,($FFFFA004).w ; set next routine
subq.b #$01,$02(a1) ; decrease size once
STC_IBI_NoFinishHigh:
move.w d0,(a1) ; set position
rts ; return
; ===========================================================================
; ---------------------------------------------------------------------------
; Controls for top bar
; ---------------------------------------------------------------------------
STC_TopBar:
bsr.w STC_MoveHighlight ; move the highlight bar correctly
move.b ($FFFFF605).w,d5 ; load pressed buttons
btst.l #$01,d5 ; was down pressed?
beq.s STC_TB_NoDown ; if not, branch
andi.w #%1111110011111100,($FFFFF604).w ; clear up/down buttons
move.l #STC_BottomBar,($FFFFA004).w ; set next routine
jmp STC_BottomBar ; run the routine
STC_TB_NoDown:
andi.b #%00001100,d5 ; get only left/right
beq.s STC_TB_NoPress ; if neither were pressed, branch
clr.w ($FFFFA022).w ; reset draw position
move.w #$0118,($FFFFA026).w ; set X position of text scroll
move.b #$40,($FFFFA00F).w ; reset held timer
bra.s STC_TB_NoHeld ; continue
STC_TB_Release:
move.b #$40,($FFFFA00F).w ; reset held timer
bra.s STC_TB_NoRight ; continue
STC_TB_NoPress:
move.b ($FFFFF604).w,d5 ; load held buttons
andi.b #%00001100,d5 ; get only left/right
beq.s STC_TB_Release ; if neither were pressed, branch
subq.b #$01,($FFFFA00F).w ; decrease hold timer
bcc.s STC_TB_NoRight ; if still running, branch
clr.w ($FFFFA022).w ; reset draw position
move.w #$0118,($FFFFA026).w ; set X position of text scroll
move.b #$06,($FFFFA00F).w ; reset hold timer
STC_TB_NoHeld:
lsr.b #$03,d5 ; shift left into carry
bcc.s STC_TB_NoLeft ; if left was not pressed, branch
moveq #$01,d0 ; load the amount to move
bsr.w STC_SkipLeft ; run code
STC_TB_NoLeft:
lsr.b #$01,d5 ; shift right into carry
bcc.s STC_TB_NoRight ; if right was not pressed, branch
moveq #$01,d0 ; load the amount to move
bsr.w STC_SkipRight ; run code
STC_TB_NoRight:
bra.w STC_BB_NoRight
STC_TB_Play:
addq.b #2,($FFFF900F).w ; force FM6/PCM1 toggle to update
move.w #$FFFF,($FFFFA034).w ; invalidate the "options" text area (so it renders the changing numbers)
move.w ($FFFFA020).w,d0 ; load list position
; add.w d0,d0 ; multiply by size of long-word
; add.w d0,d0 ; ''
; move.b STC_List(pc,d0.w),d0 ; load correct ID
STC_TB_PlaySFX:
; cmpi.b #$A0,d0 ; is it a music track from 80 to 9F?
; bhs.s STC_TB_NoDelay ; if not, branch
; move.b #$03,($FFFFA001).w ; set the "postpone" draw timer
STC_TB_NoDelay:
add.b #MusOff,d0 ; add music offset
move.b d0,mQueue.w ; play the sound
STC_TB_NoPlay:
rts ; return
; ===========================================================================
; ---------------------------------------------------------------------------
; Controls for bottom bar
; ---------------------------------------------------------------------------
STC_BottomBar:
bsr.w STC_MoveHighlight ; move the highlight bar
move.b ($FFFFF605).w,d5 ; load pressed buttons
btst.l #$00,d5 ; was up pressed?
beq.s STC_BB_NoUp ; if not, branch
andi.w #%1111110011111100,($FFFFF604).w ; clear up/down buttons
move.l #STC_TopBar,($FFFFA004).w ; set next routine
jmp STC_TopBar ; run the routine
STC_BB_NoUp:
andi.b #%00001100,d5 ; get only left/right
beq.s STC_BB_NoRight ; if neither were pressed, branch
lsr.b #$03,d5 ; shift left into carry
bcc.s STC_BB_NoLeft ; if left was not pressed, branch
subq.w #$01,($FFFFA030).w ; decrease bottom menu X position
bcc.s STC_BB_NoLeft ; if it hasn't gone below the bottom, branch
move.w #((STC_Opt_End-STC_Opt)/$08)-1,($FFFFA030).w ; set to end of list
STC_BB_NoLeft:
lsr.b #$01,d5 ; shift right into carry
bcc.s STC_BB_NoRight ; if right was not pressed, branch
addq.w #$01,($FFFFA030).w ; increase bottom menu X position
cmpi.w #((STC_Opt_End-STC_Opt)/$08),($FFFFA030).w ; has it reached the end of the list?
blo.s STC_BB_NoRight ; if not, branch
clr.w ($FFFFA030).w ; set to beginning of list
STC_BB_NoRight:
move.b ($FFFFF605).w,d5 ; reload pressed buttons
bmi.w STC_TB_Play ; if start was pressed, branch
andi.b #%01100000,d5 ; get A or C
beq.s STC_BB_NoPress ; if nothing was pressed, branch
move.b #$20,($FFFFA100).w ; reset hold timer
bra.s STC_BB_YesPlay ; continue into playing routine
STC_BB_NoPress:
move.b ($FFFFF604).w,d5 ; reload pressed buttons
andi.b #%01100000,d5 ; get A or C
beq.s STC_BB_NoPlay ; if nothing was pressed, branch
subq.b #$01,($FFFFA100).w ; decrease timer
bpl.s STC_BB_NoPlay ; if timer is still running, branch
sf.b ($FFFFA100).w ; keep timer at 00
subq.b #$01,($FFFFA101).w ; decrease speed
bpl.s STC_BB_NoPlay ; if still delay timer is still running, branch
move.b #$01,($FFFFA101).w ; reset delay timer
STC_BB_YesPlay:
move.w #$FFFF,($FFFFA034).w ; invalidate the "options" text area (so it renders the changing numbers)
move.w ($FFFFA030).w,d0 ; load list position
lsl.w #$03,d0 ; multiply by size of 2 long-words
movea.l STC_Opt+$04(pc,d0.w),a0 ; load correct address
jmp (a0) ; run address
STC_BB_NoPlay:
rts ; return
; ---------------------------------------------------------------------------
; Sound Test - options
; ---------------------------------------------------------------------------
STC_Opt: dc.l STC_ST_Fade, STC_Fade
dc.l STC_ST_Tempo, STC_Tempo
dc.l STC_ST_Volume, STC_Volume
if FEATURE_UNDERWATER
dc.l STC_ST_UWater, STC_UWater
endif
dc.l STC_ST_Speed, STC_Speed
dc.l STC_ST_Shoes, STC_Shoes
dc.l STC_ST_Skip, STC_Skip
; dc.l STC_ST_FM1, STC_FM1
; dc.l STC_ST_FM2, STC_FM2
; dc.l STC_ST_FM3, STC_FM3
; dc.l STC_ST_FM4, STC_FM4
; dc.l STC_ST_FM5, STC_FM5
; dc.l STC_ST_FM6, STC_FM6
; dc.l STC_ST_PCM1, STC_PCM1
; dc.l STC_ST_PCM2, STC_PCM2
; dc.l STC_ST_PSG1, STC_PSG1
; dc.l STC_ST_PSG2, STC_PSG2
; dc.l STC_ST_PSG3, STC_PSG3
STC_Opt_End:
if FEATURE_UNDERWATER
STC_ST_UWater: dc.b " a ON < UNDERWATER > OFF c ",$00
endif
STC_ST_Skip: dc.b " a LEFT < SKIP SONGS > RIGHT c ",$00
STC_ST_Tempo: dc.b " a DOWN < TEMPO #0 > UP c ",$00
STC_ST_Shoes: dc.b " a DOWN < SHOES #1 > UP c ",$00
STC_ST_Volume: dc.b " a LOUD < VOLUME #2 > QUIET c ",$00
STC_ST_Speed: dc.b " a ON < SPEEDSHOES > OFF c ",$00
STC_ST_Fade: dc.b " a OR c < FADE OUT > a OR c ",$00
STC_ST_FM1: dc.b " a OR c < FM 1 MUTE > a OR c ",$00
STC_ST_FM2: dc.b " a OR c < FM 2 MUTE > a OR c ",$00
STC_ST_FM3: dc.b " a OR c < FM 3 MUTE > a OR c ",$00
STC_ST_FM4: dc.b " a OR c < FM 4 MUTE > a OR c ",$00
STC_ST_FM5: dc.b " a OR c < FM 5 MUTE > a OR c ",$00
STC_ST_FM6: dc.b " a OR c < FM 6 MUTE > a OR c ",$00
STC_ST_PCM1: dc.b " a OR c < PCM 1 MUTE > a OR c ",$00
STC_ST_PCM2: dc.b " a OR c < PCM 2 MUTE > a OR c ",$00
STC_ST_PSG1: dc.b " a OR c < PSG 1 MUTE > a OR c ",$00
STC_ST_PSG2: dc.b " a OR c < PSG 2 MUTE > a OR c ",$00
STC_ST_PSG3: dc.b " a OR c < PSG 3 MUTE > a OR c ",$00
even
; --- Skip songs ---
STC_Skip:
clr.w ($FFFFA022).w ; reset draw position
move.w #$0118,($FFFFA026).w ; set X position of text scroll
moveq #$10,d0 ; load number of songs to skip
add.b d5,d5 ; shift button A to MSB
bpl.s STC_SkipRight ; if it was not A, branch for B
STC_SkipLeft:
sub.w d0,($FFFFA020).w ; decrease top menu X position
bcc.s STC_SkipDone ; if it hasn't gone below the bottom, branch
move.w #SFXlast-MusOff-1,($FFFFA020).w ; set to end of list
STC_SkipDone:
rts
STC_SkipRight:
add.w d0,($FFFFA020).w ; increase top menu X position
cmpi.w #SFXlast-MusOff,($FFFFA020).w ; has it reached the end of the list?
blo.s STC_SkipDone ; if not, branch
clr.w ($FFFFA020).w ; set to beginning of list
rts
if FEATURE_UNDERWATER
; --- Underwater mode ---
STC_UWater:
add.b d5,d5 ; shift button A to MSB
bpl.s .b ; if it was not A, branch for B
move.b #Mus_ToWater,mQueue+1.w ; play underwater effect
rts
.b
move.b #Mus_OutWater,mQueue+1.w ; remove underwater effect
rts
endif
; --- Speed shoes ---
STC_Speed:
add.b d5,d5 ; shift button A to MSB
bpl.s .b ; if it was not A, branch for B
move.b #Mus_ShoesOn,mQueue+1.w ; play speed shoes effect
rts
.b
move.b #Mus_ShoesOff,mQueue+1.w ; remove speed shoes effect
rts
; --- Tempo control ---
STC_Tempo:
add.b d5,d5 ; shift button A to MSB
bpl.s STC_T_NoA ; if it was not A, branch for B
subq.b #$02,mTempo.w ; decrease the music tempo
STC_T_NoA:
addq.b #$01,mTempo.w ; increase the music tempo
rts ; return
; --- Speed tempo control ---
STC_Shoes:
add.b d5,d5 ; shift button A to MSB
bpl.s STC_S_NoA ; if it was not A, branch for B
subq.b #$02,mSpeed.w ; decrease the music tempo
STC_S_NoA:
addq.b #$01,mSpeed.w ; increase the music tempo
rts ; return
; --- Volume control ---
STC_Volume:
add.b d5,d5 ; shift button A to MSB
bpl.s STC_V_NoA ; if it was not A, branch for B
subq.b #$01,($FFFFF016).w ; decrease the music volume
bpl.s STC_UpdateVolume ; if still valid, branch
sf.b ($FFFFF016).w ; keep volume at 00
STC_UpdateVolume:
move.b $FFFFF016.w,d0 ; load volume to d0
move.b d0,mMasterVolFM.w ; save FM master volume
move.b d0,mMasterVolPSG.w ; save PSG master volume
move.b d0,mMasterVolDAC.w ; save DAC master volume
jmp dUpdateVolumeAll ; request volume update for every channel
STC_V_NoA:
addq.b #$01,($FFFFF016).w ; increase the music volume
cmpi.b #$7F,($FFFFF016).w ; is it at maximum volume?
bls.s STC_UpdateVolume ; if not, branch
move.b #$7F,($FFFFF016).w ; force to maximum volume
bra.s STC_UpdateVolume ; continue and trigger volume to update
; --- Fade out ---
STC_Fade:
move.b #mus_Fadeout,mQueue.w
rts
; --- Channel control ---
STC_FM1:
not.b ($FFFFF0A0+$21).w
rts
STC_FM2:
not.b ($FFFFF0D0+$21).w
rts
STC_FM3:
not.b ($FFFFF100+$21).w
rts
STC_FM4:
not.b ($FFFFF130+$21).w
rts
STC_FM5:
not.b ($FFFFF160+$21).w
rts
STC_FM6:
not.b ($FFFFF190+$21).w
rts
STC_PCM1:
not.b ($FFFFF040+$21).w
rts
STC_PCM2:
not.b ($FFFFF070+$21).w
rts
STC_PSG1:
not.b ($FFFFF1C0+$21).w
rts
STC_PSG2:
not.b ($FFFFF1F0+$21).w
rts
STC_PSG3:
not.b ($FFFFF220+$21).w
rts
; ===========================================================================
; ---------------------------------------------------------------------------
; Subroutine to move the highlighter to the correct position
; ---------------------------------------------------------------------------
STC_MoveHighlight:
lea ($FFFFA014).w,a1 ; load highlighters
cmpi.l #STC_TopBar,($FFFFA004).w ; is the routine set to bottom bar?
bne.s STC_MH_MoveDown ; if not, branch
tst.b $0A(a1) ; has the top bar's size been reduced to 0?
beq.s STC_MH_Finish ; if so, branch
subq.b #$01,$0A(a1) ; decrease size
addi.w #$0080,$08(a1) ; increase position
addq.b #$01,$02(a1) ; increase size
subi.w #$0080,(a1) ; decrease position
STC_MH_Finish:
rts ; return
STC_MH_MoveDown:
tst.b $02(a1) ; has the top bar's size been reduced to 0?
beq.s STC_MH_Finish ; if so, branch
subq.b #$01,$02(a1) ; decrease size
addi.w #$0080,(a1) ; increase position
addq.b #$01,$0A(a1) ; increase size
subi.w #$0080,$08(a1) ; decrease position
rts ; return
; ===========================================================================
; ---------------------------------------------------------------------------
; Subroutine to create all possible colour fading values for all channels and types
; ---------------------------------------------------------------------------
ST_SetupKeyColours:
lea (ST_ColourList).l,a0 ; load colours list
lea ($FFFF5800).l,a3 ; load palette RAM data
moveq #$06-1,d7 ; number of key colours (2 FM, 2 PCM, 2 PSG (one for BGM, one for SFX))
STSKC_NextKey:
move.l d7,-(sp) ; store counter
moveq #$02-1,d6 ; set to do twice (once for white, once for black)
lea (ST_ColourBlank).l,a1 ; load blank colours list to fade to
STSKC_NextBlack:
move.l d6,-(sp) ; store counter
; normal
lea (a3),a2 ; load first colour address
bsr.s STSKC_CreateColour ; create white variations
addq.w #$02,a3 ; advance for next colour
lea (a3),a2 ; load second colour address
bsr.s STSKC_CreateColour ; create white variations
lea $1E(a3),a3 ; advance for next colour
; attack
subq.w #$04,a1 ; go back and redo colours but for attack keys
lea (a3),a2 ; load first colour address
bsr.s STSKC_CreateColour ; create white variations
addq.w #$02,a3 ; advance for next colour
lea (a3),a2 ; load second colour address
bsr.s STSKC_CreateColour ; create white variations
lea $1E(a3),a3 ; advance for next colour
subq.w #$08,a0 ; go back and redo colour but for black keys
move.l (sp)+,d6 ; reload counter
dbf d6,STSKC_NextBlack ; repeat for black keys
addq.w #$08,a0 ; continue to next colours
move.l (sp)+,d7 ; restore counter
dbf d7,STSKC_NextKey ; repeat for all keys
rts ; return
STSKC_CreateColour:
clr.w (a2) ; clear multiplication area
move.w (a0)+,d0 ; load colour source
move.w (a1)+,d1 ; load colour destination
; --- Blue fraction ---
move.w d0,d2 ; load blue
sf.b d2 ; ''
move.w d1,d3 ; load destination
sf.b d3 ; ''
sub.w d2,d3 ; get distance
ext.l d3 ; extend to long-word
divs.w #$07,d3 ; divide by 7 colours
; --- Green fraction ---
move.b d0,d2 ; load green
andi.l #$000000E0,d2 ; ''
move.b d2,(a2) ; multiply by 100
move.w (a2),d2 ; ''
move.b d1,d4 ; load distance
andi.l #$000000E0,d4 ; ''
move.b d4,(a2) ; multiply by 100
move.w (a2),d4 ; ''
sub.l d2,d4 ; get distance
divs.w #$07,d4 ; divide by 7 colours
ext.l d4 ; clear remainder
asl.l #$08,d4 ; align into position
; --- Red fraction ---
move.b d0,d2 ; load red
andi.l #$0000000E,d2 ; ''
move.b d2,(a2) ; multiply by 100
move.w (a2),d2 ; ''
move.b d1,d5 ; load distance
andi.l #$0000000E,d5 ; ''
move.b d5,(a2) ; multiply by 100
move.w (a2),d5 ; ''
sub.l d2,d5 ; get distance
divs.w #$07,d5 ; divide by 7 colours
ext.l d5 ; clear remainder
asl.l #$08,d5 ; align into position
; --- creating starting colours ---
move.w d0,d2 ; get red
andi.l #$0000000E,d2 ; ''
swap d2 ; align to quotient
move.w d0,d1 ; get green
andi.l #$000000E0,d1 ; ''
swap d1 ; align to quotient
andi.w #$0E00,d0 ; get blue
moveq #$08-1,d7 ; set number of colours to do
bra.s STSKC_StartColour ; branch into loop
STSKC_NextColour:
add.w d3,d0 ; advance blue
add.l d4,d1 ; advance green
add.l d5,d2 ; advance red
STSKC_StartColour:
swap d1 ; get quotients
swap d2 ; ''
move.w d0,d6 ; get blue
andi.w #$0F00,d6 ; ''
or.b d1,d6 ; get green
andi.w #$0FF0,d6 ; ''
or.b d2,d6 ; get red
andi.w #$0FFF,d6 ; ''
move.w d6,(a2) ; save colour
andi.w #$0111,d6 ; get half fractions
add.w (a2),d6 ; add to colour
andi.w #$0EEE,d6 ; get only the colour
move.w d6,(a2)+ ; save to palette correctly
addq.w #$02,a2 ; skip slot
swap d1 ; restore quotients
swap d2 ; ''
dbf d7,STSKC_NextColour ; repeat for all 8 colours
rts ; return
; Light, Dark
ST_ColourBlank: dc.w $0EEA,$0886 ; white keys
dc.w $0EEA,$0000 ; black keys
; Normal Attack
ST_ColourList: dc.w $000E,$0008, $00AE,$0068 ; FM BGM
dc.w $080C,$0206, $0C8E,$0628 ; FM SFX
dc.w $0E00,$0800, $0E0C,$0806 ; PCM BGM
dc.w $0000,$0000, $0000,$0000 ; PCM SFX
dc.w $00A0,$0060, $08C0,$0680 ; PSG BGM
dc.w $008E,$0048, $00CC,$008C ; PSG SFX
; ===========================================================================
; ---------------------------------------------------------------------------
; Subroutine to draw the key sprites on the piano
; ---------------------------------------------------------------------------
ST_DrawKeys:
lea (ST_BGMRAM).l,a4 ; load channel RAM list
lea ($FFFFF800).w,a1 ; load sprite RAM
moveq #$00,d7 ; clear key counter
tst.b ($FFFFA001).w ; is render being delayed?
bne.w STDK_FinishKeys ; if so, branch
moveq #$00,d5 ; reset keyboard ID
moveq #$00,d6 ; reset sprite count
STDK_NextKey:
moveq #$00,d4 ; set to use BGM colours
movea.w (a4),a2 ; load channel
cmp.b #ctDAC1,cType(a2) ; check for DAC1
bne.s STDK_NoDAC1 ; if not, branch
tst.b ($FFFF900F).w ; special: check if FM6 is enabled
beq.w STDK_NoChannel ; if yes, skip
STDK_NoDAC1:
btst #cfbInt,(a2) ; is the channel being interrupted by SFX?
bne.s STDK_CheckSPE ; if so, branch
bra.s STDK_NoSPE ; if not, branch
tst.b $21(a2) ; is the channel muted?
beq.s STDK_NoSPE ; if not, branch
tst.b (a2)
bpl.s STDK_NoSPE
move.w d5,d1 ; adjust Y position
lsl.w #$04,d1 ; ''
addi.w #$0088,d1 ; ''
move.w d1,(a1)+ ; Y position
move.b #$09,(a1)+ ; shape
addq.b #$01,d6 ; sprite link
move.b d6,(a1)+ ; ''
move.w #($AC00/$20),(a1)+ ; VRAM
move.w #$0088,(a1)+ ; X pos
bra.w STDK_NoChannel ; continue
STDK_CheckSPE:
addi.w #$0080,d4 ; advance to SFX colours
STDK_CheckSFX:
move.w ST_SFXRAM-ST_BGMRAM(a4),d0 ; load SFX channel
beq.s STDK_NoChannel ; if there is no SFX channel, branch
movea.w d0,a2 ; set address
STDK_NoSPE:
; --- Reading channel ---
move.b (a2),d0 ; load channel status
bpl.s STDK_NoChannel ; if the channel is not running, branch
btst #ctbDAC,cType(a2) ; check if this a DAC channel
bne.s STDK_SkipRest ; if so, do not check resting
btst #cfbRest,d0 ; is the channel resting?
bne.s STDK_NoChannel ; if so, branch
STDK_SkipRest:
btst #cfbHold,d0 ; is soft key on?
bne.s STDK_NoHitKey ; if so, branch
move.b cLastDur(a2),d0 ; load main timer
sub.b cDuration(a2),d0 ; minus current timer
cmpi.b #$03,d0 ; has the key been hit recently?
bgt.s STDK_NoHitKey ; if not, branch
addi.w #$0020,d4 ; advance to key hit colours
STDK_NoHitKey:
move.w d7,d0 ; load channel counter
lsl.w #$03,d0 ; multiply by size of two long-words
lea (STDK_ChanRouts).l,a0 ; load routine/palette list
adda.w d0,a0 ; load correct routine list
move.l (a0)+,a3 ; load palette RAM to edit
move.l (a0)+,a0 ; load routine
jsr (a0) ; run routine
beq.s STDK_NoChannel ; if there's no frequency to read, branch
cmpi.b #$5F-$0C,d2 ; has the note gone outside of the keyboard?
bhi.s STDK_NoChannel ; if so, branch and ignore
; This is to allow SFX to display the highest octave (by moving the note down an octave)
; bls.s STDK_InRange ; if not, branch
; bmi.s STDK_NoChannel ; if negative, branch (outside of keyboard to the left)
; tst.b d4 ; is this an SFX?
; bpl.s STDK_NoChannel ; if not, branch and don't display keys
; subi.b #$0C,d2 ; move the note down an octave
; cmpi.b #$5F-$0C,d2 ; has the note gone outside of the keyboard?
; bhi.s STDK_NoChannel ; if not, branch
STDK_InRange:
bsr.w STDK_GetPos ; load the correct X and VRAM positions
addi.w #$00A0,d0 ; adjust X position
move.w d5,d1 ; adjust Y position
lsl.w #$04,d1 ; ''
addi.w #$0088,d1 ; ''
move.w d7,d3 ; adjust VRAM
add.w d3,d3 ; ''
add.w STDK_NoteVRAM(pc,d3.w),d2 ; ''
move.w d1,(a1)+ ; Y position
move.b #$01,(a1)+ ; shape
addq.b #$01,d6 ; sprite link
move.b d6,(a1)+ ; ''
move.w d2,(a1)+ ; VRAM
move.w d0,(a1)+ ; X pos
STDK_NoChannel:
addq.w #$02,a4 ; advance to next channel
addq.b #$01,d7 ; increase key counter
addq.b #$01,d5 ; increase keyboard ID
cmpi.b #10,d7 ; have all 10 keys been accounted for?
blo.w STDK_NextKey ; if not, branch
cmpi.b #11,d7 ; has FM6 been checked for?
bhs.s STDK_FinishKeys ; if so, branch
moveq #$05,d5 ; set to use PCM 1's keyboard (for FM6)
tst.b ($FFFF900F).w ; check if PCM is streaming
beq.w STDK_NextKey ; if not, do another check for FM 6
STDK_FinishKeys:
moveq #$00,d0 ; set end of sprite list
move.l d0,(a1)+ ; ''
rts ; return
; ---------------------------------------------------------------------------
;
; ---------------------------------------------------------------------------
STDK_NoteVRAM: dc.w $2480 ; FM 1
dc.w $2488 ; FM 2
dc.w $2490 ; FM 3
dc.w $2498 ; FM 4
dc.w $24A0 ; FM 5
dc.w $4480 ; PCM 1
dc.w $4488 ; PCM 2
dc.w $4490 ; PSG 1
dc.w $4498 ; PSG 2
dc.w $44A0 ; PSG 3/4
dc.w $24A8 ; FM 6
; ---------------------------------------------------------------------------
; Channel specific controls
; ---------------------------------------------------------------------------
STDK_ChanRouts: dc.l $FFFFFB22, STDK_ChanFM
dc.l $FFFFFB26, STDK_ChanFM
dc.l $FFFFFB2A, STDK_ChanFM
dc.l $FFFFFB2E, STDK_ChanFM
dc.l $FFFFFB32, STDK_ChanFM
dc.l $FFFFFB42, STDK_ChanPCM
dc.l $FFFFFB46, STDK_ChanPCM
dc.l $FFFFFB4A, STDK_ChanPSG
dc.l $FFFFFB4E, STDK_ChanPSG
dc.l $FFFFFB52, STDK_ChanPSG
dc.l $FFFFFB36, STDK_ChanFM
; --- FM ---
STDK_ChanFM:
moveq #-$0C,d0 ; prepare volume offset to d0
add.b cChipVol(a2),d0 ; add chip volume to d0
bpl.s STDK_VolFM_Max ; branch if positive
cmp.b #-$10,d0 ; check if we underflowed
slt d0 ; if yes, clear d0, else set it to $FF
STDK_VolFM_Max:
andi.b #$7C,d0 ; get volume range 7C
cmpi.b #$40,d0 ; is the volume below 40?
blo.s STDK_VolFM_Min ; if not, branch
moveq #$3C,d0 ; set to maximum 3C
STDK_VolFM_Min:
add.b d0,d4 ; add to key palette
lea dFreqFM,a0 ; load FM frequency table
tst.w cFreq(a2) ; check note frequency
beq.s STDK_InvalidFM ; if it's 0000, branch
move.w cChipFreq(a2),d0 ; load chip frequency
bsr.w STDK_GetNoteFM ; load the correct note
lea ($FFFF5800).l,a0 ; load FM colours for keys
andi.b #%11011,ccr ; clear the Z flag (so it's non-zero)
STDK_InvalidFM:
rts ; return
; --- PCM ---
STDK_ChanPCM:
move.b cChipVol(a2),d0 ; load chip volume to d0
bpl.s STDK_VolPCM_Max ; if positive, branch
moveq #$7F,d0 ; set to maximum volume
STDK_VolPCM_Max:
andi.b #$7C,d0 ; get volume range 7C
cmpi.b #$40,d0 ; is the volume below 40?
blo.s STDK_VolPCM_Min ; if not, branch
moveq #$3C,d0 ; set to maximum 3C
STDK_VolPCM_Min:
; lsr.b #$02,d0
; andi.b #%00011100,d0
add.b d0,d4 ; add to key palette
lea dFreqDAC,a0 ; load PCM frequency table
move.w cChipFreq(a2),d0 ; load chip frequency
tst.w d0 ; check frequency
bpl.s STDK_VolPCM_Frq ; branch if result is positive
neg.w d0 ; negate frequency
STDK_VolPCM_Frq:
bsr.w STDK_GetNote ; load the correct note
lea ($FFFF5900).l,a0 ; load PCM colours for keys
andi.b #%11011,ccr ; clear the Z flag (so it's non-zero)
rts ; return
; --- PSG ---
STDK_ChanPSG:
move.b cChipVol(a2),d0 ; load chip volume to d0
lsr.b #2,d0 ; quarter volume output
andi.b #$3C,d0 ; get volume range 3C
cmpi.b #$40,d0 ; is the volume below 40?
blo.s STDK_VolPSG_Min ; if not, branch
moveq #$7C,d0 ; set to maximum 7C
STDK_VolPSG_Min:
add.b d0,d4 ; add to key palette
lea dFreqPSG-2,a0 ; load PSG frequency table
tst.w cFreq(a2) ; check frequency
bmi.s STDK_InvalidPSG ; if it's not FFFF, branch
move.w cChipFreq(a2),d0 ; load chip frequency
bsr.w STDK_GetNoteRev ; load the correct note
lea ($FFFF5A00).l,a0 ; load PSG colours for keys
andi.b #%11011,ccr ; clear the Z flag (so it's non-zero)
rts ; return
STDK_InvalidPSG:
ori.b #%00100,ccr ; set the Z flag (so it's zero)
rts ; return
; ===========================================================================
; ---------------------------------------------------------------------------
; Getting the right X and Y keyboard positions as well as correct frame
; ---------------------------------------------------------------------------
STDK_GetPos:
divu.w #$000C,d2 ; ''
lsl.w #$03,d2 ; multiply by 28 (size of octave piece on keyboard)
move.w d2,d0 ; ''
add.w d2,d2 ; ''
add.w d2,d2 ; ''
add.w d2,d0 ; ''
swap d2 ; get key position
add.b STDK_KeyCol(pc,d2.w),d4 ; add the black key's palette address
move.l (a0,d4.w),(a3) ; save colours to palete buffer
add.w d2,d2 ; multiply by size of long-word
add.w d2,d2 ; ''
lea STDK_KeyPos(pc,d2.w),a0 ; load key positions
add.w (a0)+,d0 ; add X position to octave position
move.w (a0)+,d2 ; load VRAM art piece
rts ; return
STDK_KeyCol: dc.b $00,$40,$00,$40,$00,$00,$40,$00,$40,$00,$40,$00
; XXXX VRAM
STDK_KeyPos: dc.w $FFFF,$0000
dc.w $0002,$0002
dc.w $0005,$0004
dc.w $0008,$0002
dc.w $000A,$0006
dc.w $0010,$0000
dc.w $0013,$0002
dc.w $0016,$0004
dc.w $0019,$0002
dc.w $001C,$0004
dc.w $001F,$0002
dc.w $0021,$0006
; ===========================================================================
; ---------------------------------------------------------------------------
; Working out the right note based on frequency (also accounts for detune/LFO)
; ---------------------------------------------------------------------------
; --- Special octave version for FM ---
STDK_GetNoteFM:
move.w d0,d2 ; load frequency
andi.w #$07FF,d2 ; clear octave
cmpi.w #$025E-$25,d2 ; 25E to 284 ; is it down an octave?
bhi.s STDKGNFM_NoDown ; if not, branch
subi.w #$05E2-$40,d0 ; 5E2 TO 5C4 ; move frequency down a single octave
bra.s STDK_GetNote ; continue
STDKGNFM_NoDown:
cmpi.w #$047C+$40,d2 ; 47C to 4C0 ; is it up an octave?
blo.s STDK_GetNote ; if not, branch
addi.w #$05E2-$40,d0 ; 5E2 TO 5C4 ; move frequency up a single octave
; --- Normal get note (just happens that only PCM is normal, how ironic) ---
STDK_GetNote:
move.l d4,-(sp) ; store d4
moveq #$60,d2 ; set number of notes to check
move.w (a0)+,d3 ; load first frequency
STDKGN_Next:
move.w d3,d4 ; store last note
move.w (a0)+,d3 ; load next note
move.w d3,d1 ; get distance between them
sub.w d4,d1 ; ''
lsr.w #$01,d1 ; get the exact middle
add.w d4,d1 ; ''
cmp.w d1,d0 ; has the frequency passed this point?
dble d2,STDKGN_Next ; if not, branch
neg.w d2 ; reverse
addi.w #$005F,d2 ; ''
move.l (sp)+,d4 ; restore d4
rts ; return
; --- Reverse version for PSG ---
STDK_GetNoteRev:
move.l d4,-(sp) ; store d4
moveq #$60,d2 ; set number of notes to check
move.w (a0)+,d3 ; load first frequency
STDKGNR_Next:
move.w d3,d4 ; store last note
move.w (a0)+,d3 ; load next note
move.w d4,d1 ; get distance between them
sub.w d3,d1 ; ''
lsr.w #$01,d1 ; get the exact middle
add.w d3,d1 ; ''
cmp.w d1,d0 ; has the frequency passed this point?
dbge d2,STDKGNR_Next ; if not, branch
neg.w d2 ; reverse
addi.w #$005F,d2 ; ''
move.l (sp)+,d4 ; restore d4
rts ; return
; ===========================================================================
; ---------------------------------------------------------------------------
; Subroutine to draw the paino mappings properly
; ---------------------------------------------------------------------------
ST_DrawPaino:
lea ($FFFF9000).w,a3 ; load status
lea (ST_BGMRAM).l,a4 ; load channel RAM list
lea ($FFFF6052).l,a0 ; load piano mappings
lea ($FFFF8002).w,a1 ; load plane buffer
move.w #$0870,d5 ; load ON mappings address advancement
moveq #$02-1,d6 ; set number of rows to render per piano
moveq #$0A-1,d7 ; do all channels
bsr.w ST_DrawChannels ; ''
; --- PSG 4 ---
tst.b (a2) ; was PSG 3 running?
bmi.s ST_CheckPSG4 ; if so, branch
ST_NoPSG4:
bclr.b #$07,(a3)+ ; clear PSG 4 flag
beq.w ST_CheckFM6 ; if it was already cleared, branch
moveq #$02-1,d1 ; set number of rows to draw
lea ($FFFF6692).l,a0 ; load piano mappings
lea ($FFFF8A02).w,a1 ; load plane buffer
bsr.w ST_DrawPiano
bset.b #$00,($FFFFA000).w ; set plane redraw flag
bra.w ST_CheckFM6 ; continue
ST_CheckPSG4:
move.b cStatPSG4(a2),d4 ; load PSG 3's PSG 4 mode flags
beq.s ST_NoPSG4 ; if PSG 4 mode is off, branch
andi.b #$07,d4 ; get only the mode bits
ori.b #$80,d4 ; enable the PSG 4 on bit
cmp.b (a3),d4 ; has the mode changed?
beq.w ST_FinishPSG4 ; if not, branch
move.b d4,(a3) ; update mode
bset.b #$00,($FFFFA000).w ; set plane redraw flag
; "PSG 4"
lea ($FFFF6692).l,a0 ; load piano mappings
lea ($FFFF8A02).w,a1 ; load plane buffer
moveq #$03-1,d2 ; set width of piece
bsr.w ST_DrawPiece_On ; draw "PSG 4" on
; "WHITE/PERIODIC"
addq.w #$02,a0 ; advance to noise type
addq.w #$02,a1 ; ''
moveq #$08-1,d2 ; set width of piece
btst #$02,d4 ; is white noise set?
bne.s ST_WhiteNoise ; if so, branch
bsr.w ST_DrawPiece ; "WHITE"
bsr.w ST_DrawPiece_On ; "PERIODIC"
bra.s ST_PeriodicNoise ; continue
ST_WhiteNoise:
bsr.w ST_DrawPiece_On ; "WHITE"
bsr.w ST_DrawPiece ; "PERIODIC"
ST_PeriodicNoise:
addq.w #$02,a0 ; advance to noise type
addq.w #$02,a1 ; ''
moveq #$04-1,d2 ; set width of piece
andi.w #$0003,d4 ; get only the frequency type
lsl.b #$04,d4 ; multiply by 10
jsr ST_FrequList(pc,d4.w) ; run correct display list
bra.s ST_FinishPSG4 ; continue
ST_FrequList:
bsr.w ST_DrawPiece ; "LOW"
bsr.w ST_DrawPiece ; "MID"
bsr.w ST_DrawPiece_On ; "HIGH"
bra.w ST_DrawPiece ; "PSG3"
bsr.w ST_DrawPiece ; "LOW"
bsr.w ST_DrawPiece_On ; "MID"
bsr.w ST_DrawPiece ; "HIGH"
bra.w ST_DrawPiece ; "PSG3"
bsr.w ST_DrawPiece_On ; "LOW"
bsr.w ST_DrawPiece ; "MID"
bsr.w ST_DrawPiece ; "HIGH"
bra.w ST_DrawPiece ; "PSG3"
bsr.w ST_DrawPiece ; "LOW"
bsr.w ST_DrawPiece ; "MID"
bsr.w ST_DrawPiece ; "HIGH"
bra.w ST_DrawPiece_On ; "PSG3"
ST_FinishPSG4:
addq.w #$01,a3 ; skip passed PSG 4 flag
ST_CheckFM6:
; --- FM 6 ---
tst.b mFM6.w ; check if FM 6 is enabled
spl d0 ; if disabled, set d0, else clear it
bpl.s ST_HandleState ; if not enabled, branch
move.b mDAC2.w,d1 ; check if DAC 2 is enabled
or.b mDAC1.w,d1 ; or DAC 1
or.b mSFXDAC1.w,d1 ; or SFX DAC 1
bpl.s ST_HandleState ; branch if not
stopZ80
move.b dZ80+StatusDAC,d0 ; load DAC status to d0
startZ80
tst.b d0 ; check if both are off
sne d0 ; either 00 or FF
ST_HandleState:
cmp.b ($FFFF900F).w,d0 ; check if the last value was the same
beq.s ST_SkipRedraw ; branch if so
move.b d0,($FFFF900F).w
bset.b #$00,($FFFFA000).w ; set plane redraw flag
move.l a3,a1 ; copy current address to a1
tst.b d0 ; check if we need to redraw DAC 1
beq.s ST_DoRedraw ; do it nao
lea ($FFFF9005).w,a1 ; redraw DAC 1 instead
ST_DoRedraw:
addq.b #1,(a1) ; force channel to reload
ST_SkipRedraw:
tst.b d0 ; just check whether to draw FM6
bne.s ST_NoRedraw ; if not, then skip
lea (ST_BGMFM6).l,a4 ; load channel RAM list
lea ($FFFF6FA2).l,a0 ; load piano mappings
lea ($FFFF8502).w,a1 ; load plane buffer
move.w #$0140,d5 ; load ON mappings address advancement
moveq #$02-1,d6 ; set number of rows to render per piano
moveq #$01-1,d7 ; do only 1 channel
bsr.s ST_DrawChannels ; ''
rts ; return
ST_NoRedraw:
addq.b #$01,(a3) ; keep low bit set so it registers as "changed" when stopped
rts ; return
; ---------------------------------------------------------------------------
; Checking normal channels
; ---------------------------------------------------------------------------
ST_DrawChannels:
movea.w (a4),a2 ; load channel
btst #cfbInt,(a2) ; is the channel being interrupted by SFX?
bne.s ST_CheckSFX ; if so, branch
; move.b $21(a2),d0 ; is the channel muted?
; not.b d0
; tst.b d0
; bpl.s ST_Mute ; if so, branch
bra.s ST_NoSPE
ST_CheckSFX:
move.w ST_SFXRAM-ST_BGMRAM(a4),d0 ; load SFX channel
beq.s ST_NoChannel ; if there is no SFX channel, branch
movea.w d0,a2 ; set address
ST_NoSPE:
move.b (a2),d0 ; load channel status
ST_Mute:
andi.b #1<<cfbRun,d0 ; get only running flag
cmp.b (a3),d0 ; has the channel's status changed?
beq.s ST_NoChannel ; no change...
bset.b #$00,($FFFFA000).w ; set plane redraw flag
cmp.b #ctDAC1,cType(a2) ; check for DAC1
bne.s ST_NoOverride ; if not, branch
addq.b #2,($FFFF900F).w ; force FM6/PCM1 toggle to update
ST_NoOverride:
movem.l a0-a1,-(sp) ; store registers
move.w d6,d1 ; set number of rows to do
move.b d0,(a3) ; update status
bpl.s ST_PianoOff ; if turned off, branch
adda.w d5,a0 ; load ON mappings
ST_PianoOff:
bsr.s ST_DrawPiano ; draw piano
movem.l (sp)+,a0-a1 ; restore registers
ST_NoChannel:
lea $50*2(a0),a0 ; advance to next source mappings
lea $80*2(a1),a1 ; advance to next destination plane
addq.w #$01,a3 ; advance to next status storage
addq.w #$02,a4 ; advance to next channel
dbf d7,ST_DrawChannels ; repeat for all channels
rts ; return
ST_DrawPiano:
move.l (a0)+,(a1)+ ; copy mappings
move.l (a0)+,(a1)+ ; ''
move.l (a0)+,(a1)+ ; ''
move.l (a0)+,(a1)+ ; ''
move.l (a0)+,(a1)+ ; ''
move.l (a0)+,(a1)+ ; ''
move.l (a0)+,(a1)+ ; ''
move.l (a0)+,(a1)+ ; ''
move.l (a0)+,(a1)+ ; ''
move.l (a0)+,(a1)+ ; ''
move.l (a0)+,(a1)+ ; ''
move.l (a0)+,(a1)+ ; ''
move.l (a0)+,(a1)+ ; ''
move.l (a0)+,(a1)+ ; ''
move.l (a0)+,(a1)+ ; ''
move.l (a0)+,(a1)+ ; ''
move.l (a0)+,(a1)+ ; ''
move.l (a0)+,(a1)+ ; ''
move.l (a0)+,(a1)+ ; ''
addq.w #$04,a0 ; advance to next source mappings
lea $80-($26*2)(a1),a1 ; advance to next plane row
dbf d1,ST_DrawPiano ; repeat for both rows
rts ; return
; ---------------------------------------------------------------------------
; Subroutine to draw a PSG 4 piece
; ---------------------------------------------------------------------------
ST_DrawPiece_On:
movem.l a0-a1,-(sp) ; store registers
adda.w #$1B*$50,a0 ; advance to "ON" graphics
bra.s STDP_Start ; continue
ST_DrawPiece:
movem.l a0-a1,-(sp) ; store registers
STDP_Start:
moveq #$01,d0 ; set height
STDP_NextColumn:
movem.l a0-a1,-(sp) ; store registers
move.w d2,d1 ; load width
STDP_NextRow:
move.w (a0)+,(a1)+
dbf d1,STDP_NextRow ; repeat for width
movem.l (sp)+,a0-a1 ; restore registers
lea $50(a0),a0 ; advance to next source mappings
lea $80(a1),a1 ; advance to next destination plane
dbf d0,STDP_NextColumn ; repeat for height
movem.l (sp)+,a0-a1 ; restore registers
move.w d2,d1 ; advance mapping address to end
addq.w #$01,d1 ; increase by 1 (due to dbf)
add.w d1,d1 ; ''
adda.w d1,a0 ; ''
adda.w d1,a1 ; ''
rts ; return
; ---------------------------------------------------------------------------
; Channel RAM list
; ---------------------------------------------------------------------------
ST_BGMRAM: dc.w mFM1, mFM2, mFM3, mFM4, mFM5 ; FM
dc.w mDAC1, mDAC2 ; DAC
dc.w mPSG1, mPSG2, mPSG3 ; PSG
ST_BGMFM6:
if FEATURE_FM6
dc.w mFM6 ; FM 6
else
dc.w $0000 ; FM 6
endif
ST_SFXRAM: dc.w $0000, $0000, mSFXFM3, mSFXFM4, mSFXFM5 ; SFX FM
dc.w mSFXDAC1, $0000 ; SFX DAC
dc.w mSFXPSG1, mSFXPSG2, mSFXPSG3 ; SFX PSG
dc.w $0000 ; FM 6
; ===========================================================================
; ---------------------------------------------------------------------------
; V-blank - Sound Test (Text bar at bottom)
; ---------------------------------------------------------------------------
HB_SoundTest:
move.w #$8A00|$00,($C00004).l ; set new interrupt line occurance amount
move.l #$FFFF5D00,(HBlankRout).w ; set H-blank routine
move.b #$28-1,($FFFF5FFF).l ; set counter
rte ; return
; --- Copied to RAM 5C00
HBST_FontBar:
move.l #$40000010,($C00004).l ; set VDP to VSRAM write mode
HBST_FontPos: move.l ($FFFF5E00).l,($C00000).l ; change V-scroll position
addq.w #$04,((HBST_FontPos-HBST_FontBar)+$FFFF5D00)+$04
subq.b #$01,($FFFF5FFF).l ; decrease counter
bpl.s HBST_NoFinish ; if not finished, branch
move.w #$8A00|$DF,($C00004).l ; revert align amount
move.l #NullBlank,(HBlankRout).w ; set H-blank routine
NullBlank:
HBST_NoFinish:
rte ; return
HBST_FontBar_End:
; ===========================================================================
; ---------------------------------------------------------------------------
; V-blank - Sound Test (Normal)
; ---------------------------------------------------------------------------
VB_SoundTest:
movem.l d7/a0-a1,-(sp) ; store registers
lea (HBST_FontBar).l,a0
lea ($FFFF5D00).l,a1
rept (HBST_FontBar_End-HBST_FontBar)/$04
move.l (a0)+,(a1)+
endr
movem.l (sp)+,d7/a0-a1 ; restore registers
move.w #$8A00|($B7/$02),($C00004).l ; set interrupt line address
move.l #HB_SoundTest,(HBlankRout).w ; set H-blank routine
VB_SoundTest_NoHB:
movem.l d0-a6,-(sp) ; store register data
tst.b ($FFFFF62A).w ; was the 68k late?
beq.w VBST_68kLate ; if so, branch
lea ($C00000).l,a5 ; load VDP data port
lea $04(a5),a6 ; load VDP control port
subq.b #$01,($FFFFA001).w ; decrease postpone draw timer
bpl.s VBST_NoDrawPlane ; if it's still running, branch
sf.b ($FFFFA001).w ; keep at 0
bclr.b #$00,($FFFFA000).w ; clear plane drawn flag
beq.s VBST_NoDrawPlane ; if it was already clear, branch (no drawing required)
DMA $0B00, $FFFF8000, $60800003 ; background plane
VBST_NoDrawPlane:
DMA $0080, $FFFFFB00, $C0000000 ; palette
DMA $0280, $FFFFF800, $78000003 ; sprites
DMA $0380, $FFFFCC00, $7C000003 ; h-scroll
move.l #$40000010,(a6) ; v-scroll
move.l ($FFFFF616).w,(a5) ; ''
jsr ReadJoypads ; read the controller pads
VBST_68kLate:
sf.b ($FFFFF62A).w ; clear V-blank flag
move.w #$2300,sr ; enable interrupts
jsr UpdateAMPS ; run sound driver
movem.l (sp)+,d0-a6 ; restore register data
rtr ; return and restore ccr (does not affect sr)
; ===========================================================================
; ---------------------------------------------------------------------------
; Subroutine to clear a section of VDP memory using DMA fill
; ---------------------------------------------------------------------------
; move.l #$40000080,d0 ; VDP mode/address
; move.w #$0400,d1 ; size to clear
; jsr (ClearVDP).w ; clear VDP memory section
; ---------------------------------------------------------------------------
ClearVDP:
move.w #$8F01,(a6) ; set increment mode to 1
move.l #$97809300,d2 ; prepare size register data
subq.w #$01,d1 ; decrease size by 1
move.b d1,d2 ; get low byte
move.l d2,(a6) ; set DMA source & DMA size low byte
lsr.w #$08,d1 ; get high byte
ori.w #$9400,d1 ; load size register
move.w d1,(a6) ; set DMA size high byte
move.l d0,(a6) ; set DMA destination
move.w #$0000,(a5) ; fill location with 0000
nop ; delay
CVD_Wait:
move.w (a6),ccr ; load status (this resets the 2nd write flag too)
bvs.s CVD_Wait ; if the VDP DMA busy flag was set (bit 1), branch to wait til finished...
move.w #$8F02,(a6) ; set increment mode to normal
rts ; return
; ===========================================================================
; ---------------------------------------------------------------------------
; Subroutine to write mapping tiles correctly to a plane
; --- Inputs ----------------------------------------------------------------
; d3.l = Line advance value
; d0.l = VRAM address of plane to write to
; d1.w = X size
; d2.w = Y size
; ---------------------------------------------------------------------------
MapScreen:
move.l #$00800000,d3 ; prepare line advance amount
MapRow:
move.l d0,(a6) ; set VDP to VRAM write mode
add.l d3,d0 ; advance to next line
move.w d1,d4 ; load X size
MapColumn:
move.w (a1)+,(a5) ; copy tile mappings over
dbf d4,MapColumn ; repeat until all done
dbf d2,MapRow ; repeat for all rows
rts
; ===========================================================================
; ---------------------------------------------------------------------------
; Data includes
; ---------------------------------------------------------------------------
Pal_Sound: incbin "Data\Pal Piano.bin"
dc.w $0000,$000E,$0008,$000E,$0008,$000E,$0008,$000E
dc.w $0008,$000E,$0008,$000E,$0008,$0E84,$0800,$0000
dc.w $0000,$0E00,$0800,$0E00,$0800,$00E0,$0080,$00E0
dc.w $0080,$00E0,$0080,$0000,$0000,$0000,$0000,$0000
dc.w $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
dc.w $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
Pal_Sound_End: even
Art_Piano: incbin "Data\Art Piano.unc"
even
Map_Piano: incbin "Data\Map Piano.unc"
even
Art_Keys: incbin "Data\Art Keys.unc"
even
Art_Font: incbin "Data\Art Font.unc"
even
Map_Font: incbin "Data\Map Font.bin"
even
Art_Extras: incbin "Data\Art Extras.unc"
even
Art_End:
; ===========================================================================
|
src/templates/ada/avtas/lmcp/avtas-lmcp-object.ads | joffreyhuguet/LmcpGen | 0 | 2176 | with avtas.lmcp.types; use avtas.lmcp.types;
with avtas.lmcp.byteBuffers; use avtas.lmcp.byteBuffers;
with Ada.Streams;
with Utilities;
package avtas.lmcp.object is
type Object is abstract tagged null record;
type Object_Acc is access all Object;
type Object_Any is access all Object'Class;
-- function clone(this, that: access Object) return Object_Acc is abstract;
overriding
function "=" (This, That : Object) return Boolean is (True); -- FIXME
function getLmcpTypeName(this : Object) return String is ("Object");
function getFullLmcpTypeName(this : Object) return String is ("avtas.lmcp.object.Object");
function getLmcpType(this : Object) return UInt32 is (0);
function getSeriesName(this : Object) return String is ("");
function getSeriesNameAsLong(this : Object) return Int64 is (0);
function getSeriesVersion(this : Object) return UInt16 is (0);
function calculatePackedSize(this : Object) return UInt32 is (0);
procedure Pack (This : Object; Buf : in out ByteBuffer) is null;
procedure Unpack (This : out Object; Buf : in out ByteBuffer) is null;
-- XML output
function LeftPad is new Utilities.LeftPad (Width => 2);
procedure XML_Output (this : Object'Class;
S : access Ada.Streams.Root_Stream_Type'Class;
Level : Natural := 0);
procedure XML_Write (this : Object;
S : access Ada.Streams.Root_Stream_Type'Class;
Level : Natural) is null;
end avtas.lmcp.object;
|
Library/Text/Text/textMethodManip.asm | steakknife/pcgeos | 504 | 27274 | COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1989 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE: textMethodManip.asm
AUTHOR: <NAME>, Oct 25, 1989
METHODS:
Name Description
---- -----------
MSG_VIS_TEXT_GET_ALL
MSG_VIS_TEXT_GET_SELECTION
MSG_VIS_TEXT_SELECT_RANGE
MSG_VIS_TEXT_SELECT_NONE
MSG_VIS_TEXT_ENTER_OVERSTRIKE_MODE
MSG_VIS_TEXT_ENTER_INSERT_MODE
REVISION HISTORY:
Name Date Description
---- ---- -----------
John 10/25/89 Initial revision
DESCRIPTION:
Methods for manipulating the actual text.
$Id: textMethodManip.asm,v 1.1 97/04/07 11:17:57 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
TextInstance segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
VisTextEnterOverstrikeMode
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Enter overstrike mode, leave insert mode.
CALLED BY: via MSG_VIS_TEXT_ENTER_OVERSTRIKE_MODE
PASS: ds:*si = instance ptr.
es = class segment.
RETURN: nothing
DESTROYED:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 4/25/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
VisTextEnterOverstrikeMode method dynamic VisTextClass,
MSG_VIS_TEXT_ENTER_OVERSTRIKE_MODE
test ds:[di].VTI_state, mask VTS_OVERSTRIKE_MODE
jnz done
call TSL_SelectIsCursor ; Check for is a cursor
jnc done ; done if we have a range.
call EditUnHilite ; Unhilite in insert mode.
ornf ds:[di].VTI_state, mask VTS_OVERSTRIKE_MODE
call EditHilite ; Rehilite in replace mode.
done:
ornf ds:[di].VTI_state, mask VTS_OVERSTRIKE_MODE
ret
VisTextEnterOverstrikeMode endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
VisTextEnterInsertMode
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Enter insert mode, leave overstrike mode.
CALLED BY: via MSG_VIS_TEXT_ENTER_INSERT_MODE
PASS: ds:*si = instance ptr.
es = class segment.
RETURN: nothing
DESTROYED:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 4/25/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
VisTextEnterInsertMode method dynamic VisTextClass, MSG_VIS_TEXT_ENTER_INSERT_MODE
test ds:[di].VTI_state, mask VTS_OVERSTRIKE_MODE
jz done
call TSL_SelectIsCursor ; Check for is cursor
jnc done ; Quit if selection is range.
call EditUnHilite ; Unhilite in replace mode.
and ds:[di].VTI_state, not mask VTS_OVERSTRIKE_MODE
call EditHilite ; Rehilite in insert mode.
done:
and ds:[di].VTI_state, not mask VTS_OVERSTRIKE_MODE
ret
VisTextEnterInsertMode endm
TextInstance ends
|
bb-runtimes/src/s-bbcpsp__riscv.ads | JCGobbi/Nucleo-STM32G474RE | 0 | 8991 | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . B B . C P U _ S P E C I F I C --
-- --
-- S p e c --
-- --
-- Copyright (C) 2016-2019, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains the primitives which are dependent on the underlying
-- processor.
pragma Restrictions (No_Elaboration_Code);
with System.BB.Interrupts;
package System.BB.CPU_Specific is
pragma Preelaborate;
------------------------
-- Context management --
------------------------
-- The context buffer is a type that represents thread's state and is not
-- otherwise stored in main memory. This typically includes all user-
-- visible registers, and possibly some other status as well.
-- In case different contexts have different amounts of state (for example,
-- due to absence of a floating-point unit in a particular configuration,
-- or just the FPU not being used), it is expected that these details are
-- handled in the implementation.
type Context_Buffer is record
RA : System.Address; -- X1
-- Callee-saved registers
SP : System.Address; -- X2
S0 : System.Address; -- X8
S1 : System.Address; -- X9
S2 : System.Address; -- X18
S3 : System.Address; -- X19
S4 : System.Address; -- X20
S5 : System.Address; -- X21
S6 : System.Address; -- X22
S7 : System.Address; -- X23
S8 : System.Address; -- X24
S9 : System.Address; -- X25
S10 : System.Address; -- X26
S11 : System.Address; -- X27
FS0 : System.Address;
FS1 : System.Address;
FS2 : System.Address;
FS3 : System.Address;
FS4 : System.Address;
FS5 : System.Address;
FS6 : System.Address;
FS7 : System.Address;
FS8 : System.Address;
FS9 : System.Address;
FS10 : System.Address;
FS11 : System.Address;
end record;
Stack_Alignment : constant := 16;
-- Stack alignment defined by the ABI (RV32I and RV64I)
-----------
-- Traps --
-----------
type Trap_Type is (Timer_Trap, External_Interrupt_Trap);
procedure Install_Trap_Handler
(Service_Routine : BB.Interrupts.Interrupt_Handler;
Trap : Trap_Type);
-- Install a new handler in the CPU trap table
----------------------------------
-- Control and Status Registers --
----------------------------------
type Register_Word is mod 2**System.Word_Size
with Size => System.Word_Size;
generic
Register_Name : String;
function Read_CSR return Register_Word;
-- Return the value the CSR
generic
Register_Name : String;
procedure Clear_CSR_Bits (Bits : Register_Word);
-- Bits is a mask that specifies bit positions to be cleared in the CSR
generic
Register_Name : String;
procedure Set_CSR_Bits (Bits : Register_Word);
-- Bits is a mask that specifies bit positions to be set in the CSR
function Mie is new Read_CSR ("mie");
function Mip is new Read_CSR ("mip");
function Mcause is new Read_CSR ("mcause");
procedure Clear_Mstatus_Bits is new Clear_CSR_Bits ("mstatus");
procedure Set_Mstatus_Bits is new Set_CSR_Bits ("mstatus");
procedure Set_Mie_Bits is new Set_CSR_Bits ("mie");
Mstatus_MIE : constant Register_Word := 2#1000#;
Mie_MTIE : constant Register_Word := 2#0000_1000_0000#;
-- Machine Time Interrupt Enable
Mie_MEIE : constant Register_Word := 2#1000_0000_0000#;
-- Machine External Interrupt Enable
Mip_MEIP : constant Register_Word := Mie_MEIE;
-- Machine External Interrupt Pending
end System.BB.CPU_Specific;
|
demo/src/Timer_Test.adb | 98devin/ada-gba-dev | 7 | 10261 | -- Copyright (c) 2021 <NAME>
-- zlib License -- see LICENSE for details.
with GBA.BIOS;
with GBA.BIOS.Arm;
with GBA.Display;
with GBA.Display.Backgrounds;
with GBA.Display.Palettes;
with GBA.Display.Tiles;
with GBA.Interrupts;
with GBA.Memory;
with GBA.Timers;
with Interfaces;
use Interfaces;
procedure Timer_Test is
use GBA.BIOS;
use GBA.BIOS.Arm;
use GBA.Display;
use GBA.Display.Backgrounds;
use GBA.Display.Palettes;
use GBA.Display.Tiles;
use GBA.Interrupts;
use GBA.Memory;
use GBA.Timers;
Color_Palette : Palette_16 renames BG_Palette_16x16 (0);
Tile_Block : Tile_Block_4 (BG_Tile_Index)
with Address => Tile_Block_Address (0);
Screen_Block : Screen_Block_16
with Address => Screen_Block_Address (4);
Tile_Black : constant Tile_Data_4 :=
(others => (others => 0));
Tile_White : constant Tile_Data_4 :=
(others => (others => 1));
Tile_Black_ID : constant BG_Tile_Index := 0;
Tile_White_ID : constant BG_Tile_Index := 1;
Base_Timer : constant Timer_ID := 0;
Link_Timer : constant Timer_ID := 1;
begin
Color_Palette (0) := Color'( 0, 0, 0);
Color_Palette (1) := Color'(31, 31, 31);
for Block of Screen_Block loop
Block :=
( Tile => 0
, Flip_Horizontal => False
, Flip_Vertical => False
, Palette_Index => 0
);
end loop;
Tile_Block (0) := Tile_Black;
Tile_Block (1) := Tile_White;
BG_Control (BG_0) :=
( Tile_Block => 0
, Screen_Block => 4
, Color_Mode => Colors_16
, others => <>
);
Timers (Base_Timer) :=
( Value => Timer_Value'Mod(-4389)
, Control_Info =>
( Scale => x256
, Increment => Independent
, Trigger_IRQ => False
, Enabled => True
)
);
Timers (Link_Timer) :=
( Value => 0
, Control_Info =>
( Scale => <> -- ignored due to increment method
, Increment => Linked_To_Previous
, Trigger_IRQ => False
, Enabled => True
)
);
GBA.Interrupts.Enable_Interrupt (GBA.Interrupts.VBlank);
Request_VBlank_Interrupt;
Set_Display_Mode (Mode_0);
Enable_Display_Element (Background_0);
loop
declare
Time : Timer_Value := Get_Count (Link_Timer);
begin
for I in 0 .. 15 loop
if (Shift_Right (Time, I) and 1) = 1 then
Screen_Block (1, I + 1).Tile := Tile_White_ID;
else
Screen_Block (1, I + 1).Tile := Tile_Black_ID;
end if;
end loop;
end;
Wait_For_VBlank;
end loop;
end Timer_Test; |
config.ads | ddugovic/words | 4 | 29077 | <filename>config.ads
package CONFIG is
OUTPUT_SCREEN_SIZE : INTEGER := 20;
type CONFIGURATION_TYPE is (DEVELOPER_VERSION, USER_VERSION, ONLY_MEANINGS);
CONFIGURATION : CONFIGURATION_TYPE := DEVELOPER_VERSION;
type METHOD_TYPE is (INTERACTIVE, COMMAND_LINE_INPUT, COMMAND_LINE_FILES);
METHOD : METHOD_TYPE := INTERACTIVE;
type LANGUAGE_TYPE is (LATIN_TO_ENGLISH, ENGLISH_TO_LATIN);
LANGUAGE : LANGUAGE_TYPE := LATIN_TO_ENGLISH;
SUPPRESS_PREFACE : BOOLEAN := FALSE;
end CONFIG;
|
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0xca.log_21829_131.asm | ljhsiun2/medusa | 9 | 2399 | <filename>Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0xca.log_21829_131.asm
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r15
push %r8
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0x4b2, %r15
nop
nop
inc %rax
mov (%r15), %r8
nop
nop
nop
inc %r10
lea addresses_UC_ht+0x166b2, %rax
nop
nop
nop
nop
nop
sub $48156, %r10
mov $0x6162636465666768, %rsi
movq %rsi, %xmm2
vmovups %ymm2, (%rax)
nop
nop
nop
nop
nop
sub %rax, %rax
lea addresses_normal_ht+0x167b2, %rsi
lea addresses_D_ht+0x4b2, %rdi
nop
nop
nop
sub $7310, %r8
mov $3, %rcx
rep movsl
nop
nop
nop
nop
nop
cmp $11037, %rsi
lea addresses_D_ht+0x1b8f2, %rcx
nop
nop
nop
xor %rax, %rax
movl $0x61626364, (%rcx)
nop
nop
and %r10, %r10
lea addresses_A_ht+0x199b2, %rsi
lea addresses_UC_ht+0x8cb2, %rdi
nop
nop
nop
and %r13, %r13
mov $103, %rcx
rep movsq
nop
nop
nop
dec %r10
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r8
pop %r15
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r9
push %rax
push %rbp
push %rbx
push %rdx
// Store
lea addresses_A+0x17632, %r9
add %rbx, %rbx
mov $0x5152535455565758, %rbp
movq %rbp, %xmm1
vmovups %ymm1, (%r9)
sub %rbx, %rbx
// Store
lea addresses_D+0x12032, %rdx
add $51814, %r12
movl $0x51525354, (%rdx)
nop
nop
nop
nop
nop
add $58811, %rax
// Faulty Load
lea addresses_A+0x34b2, %rdx
nop
nop
nop
add %rbx, %rbx
mov (%rdx), %rbp
lea oracles, %r12
and $0xff, %rbp
shlq $12, %rbp
mov (%r12,%rbp,1), %rbp
pop %rdx
pop %rbx
pop %rbp
pop %rax
pop %r9
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_A'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 4, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_A'}}
{'OP': 'STOR', 'dst': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_D'}}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': True, 'same': True, 'size': 8, 'NT': False, 'type': 'addresses_A'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_UC_ht'}}
{'src': {'congruent': 6, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_D_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_D_ht'}}
{'src': {'congruent': 7, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_UC_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
*/
|
programs/oeis/010/A010215.asm | neoneye/loda | 22 | 163217 | ; A010215: Continued fraction for sqrt(167).
; 12,1,11,1,24,1,11,1,24,1,11,1,24,1,11,1,24,1,11,1,24,1,11,1,24,1,11,1,24,1,11,1,24,1,11,1,24,1,11,1,24,1,11,1,24,1,11,1,24,1,11,1,24,1,11,1,24,1,11,1,24,1,11,1,24,1
gcd $0,262156
mul $0,42
mod $0,13
mov $1,$0
div $1,5
mul $1,7
add $0,$1
mul $0,2
sub $0,6
div $0,2
add $0,1
|
lunch.adb | charlesincharge/Intro_to_Ada | 0 | 5133 | with Ada.Text_IO; use Ada.Text_IO;
procedure Lunch is
-- Enumeration type
type Lunch_Spot_t is (WS, Nine, Home);
type Day_t is (Sun, Mon, Tue, Wed, Thu, Fri, Sat);
-- Subtype Weekday_t is a constrained Day_t
subtype Weekday_t is Day_t range Mon .. Fri;
-- Declaring a fixed-size array
Where_To_Eat : array(Day_t) of Lunch_Spot_t;
begin
-- Array is the same size as number of Day_t values
Where_To_Eat := (Home, Nine, WS, Nine, WS, Nine, Home);
-- Can loop over a fixed-size array, or over a type/subtype itself
for Day in Weekday_t loop
case Where_To_Eat (Day) is
when Home =>
Put_Line("Eating at home.");
when Nine =>
Put_Line("Eating on 9.");
when WS =>
Put_Line("Eating at Wise Sons");
-- case statement must include all cases
end case;
end loop;
end Lunch;
|
rustemu86/tests/asms/compatible/xor.asm | tomoyuki-nakabayashi/Rustemu86 | 3 | 160144 | bits 16
xor ax, ax
|
x86/Endgame_Init.asm | lantonov/asm | 150 | 15358 | <reponame>lantonov/asm
;the endgames.h and endgames.cpp are sloppy many different respects
; for a given material combination, say white has K+R+B verse black has K+N,
; we would like to see if we have a specialized evaluation function or scale function
; and if so, fill it into the material entry
;
; the byte EndgameEntry.entry and its copies MaterialEntry.scalingFunction, MaterialEntry.evaluationFunction
; holds the endgame entry
; if this byte is 0, the entry is considered empty
; if this byte is non zero
; bit 0 is considered the strong side
; bits 1-7 give an integer 1-127 used as an index into a fxn lookup table
; this assumes that there are no more than 127 endgame types, which is reasonable
; when an endgame is called, this byte is put in ecx and then &ed with 1
;
; the same function would be used to handle KRBvKN as KNvKRB, so it is nec
; to use ecx to find out the strong side
; ecx=0 for KRBvKN, ecx=1 for KNvKRB
;
; We build two global tables (not per-thread) of sorted material keys
; one for evaluation functions and one for scale functions
; these are EndgameEval_Map and EndgameScale_Map
;
; There are also the global tables EndgameEval_FxnTable and EndgameScale_FxnTable
; which hold the addresses of the functions
; the index into this table is in bits 1-7 of EndgameEntry.entry
; and the corresponding members of MaterialEntry
; we use the material key to identify the configuration
; so it should be processed at run time
macro GetKeys r1, r2, wmat, bmat
xor r1, r1
xor r2, r2
ct#Pawn=0
ct#Knight=0
ct#Bishop=0
ct#Rook=0
ct#Queen=0
ct#King=0
iterate p, wmat
xor r1, qword[Zobrist_Pieces+8*(64*(8*White+p)+ct#p)]
xor r2, qword[Zobrist_Pieces+8*(64*(8*Black+p)+ct#p)]
ct#p = ct#p+1
end iterate
if ct#King <> 1
display 'bad wmat in get_keys'
display 13,10
err
end if
ct#Pawn=0
ct#Knight=0
ct#Bishop=0
ct#Rook=0
ct#Queen=0
ct#King=0
iterate p, bmat
xor r1, qword[Zobrist_Pieces+8*(64*(8*Black+p)+ct#p)]
xor r2, qword[Zobrist_Pieces+8*(64*(8*White+p)+ct#p)]
ct#p = ct#p+1
end iterate
if ct#King <> 1
display 'bad bmat in get_keys'
display 13,10
err
end if
end macro
Endgame_Init:
; make sure all of our functions are registered with
; EndgameEval_Map
; EndgameScale_Map
; EndgameEval_FxnTable
; EndgameScale_FxnTable
push rbx rsi rdi
; eval
lea rbx, [EndgameEval_FxnTable]
lea rdi, [EndgameEval_Map]
; these endgame fxns correspond to a specific material config
; and are added to the map
GetKeys rcx, rdx, <King, Pawn>, <King>
lea eax, [EndgameEval_KPK]
mov esi, EndgameEval_KPK_index
mov dword[rbx+4*rsi], eax
call .Map_Insert
GetKeys rcx, rdx, <King, Knight, Knight>, <King>
lea eax, [EndgameEval_KNNK]
mov esi, EndgameEval_KNNK_index
mov dword[rbx+4*rsi], eax
call .Map_Insert
GetKeys rcx, rdx, <King, Bishop, Knight>, <King>
lea eax, [EndgameEval_KBNK]
mov esi, EndgameEval_KBNK_index
mov dword[rbx+4*rsi], eax
call .Map_Insert
GetKeys rcx, rdx, <King, Rook>, <King, Pawn>
lea eax, [EndgameEval_KRKP]
mov esi, EndgameEval_KRKP_index
mov dword[rbx+4*rsi], eax
call .Map_Insert
GetKeys rcx, rdx, <King, Rook>, <King, Bishop>
lea eax, [EndgameEval_KRKB]
mov esi, EndgameEval_KRKB_index
mov dword[rbx+4*rsi], eax
call .Map_Insert
GetKeys rcx, rdx, <King, Rook>, <King, Knight>
lea eax, [EndgameEval_KRKN]
mov esi, EndgameEval_KRKN_index
mov dword[rbx+4*rsi], eax
call .Map_Insert
GetKeys rcx, rdx, <King, Queen>, <King, Pawn>
lea eax, [EndgameEval_KQKP]
mov esi, EndgameEval_KQKP_index
mov dword[rbx+4*rsi], eax
call .Map_Insert
GetKeys rcx, rdx, <King, Queen>, <King, Rook>
lea eax, [EndgameEval_KQKR]
mov esi, EndgameEval_KQKR_index
mov dword[rbx+4*rsi], eax
call .Map_Insert
; Assert ne, byte[rdi+(ENDGAME_EVAL_MAP_SIZE-1)*sizeof.EndgameMapEntry+EndgameMapEntry.entri], 0, 'problem1 in Endgame_Init'
; these endgame fxns correspond to many material config
; and are not added to the map
lea eax, [EndgameEval_KXK]
mov r8d, EndgameEval_KXK_index
mov dword[rbx+4*r8], eax
; scale
lea rbx, [EndgameScale_FxnTable]
lea rdi, [EndgameScale_Map]
; these endgame fxns correspond to a specific material config
; and are added to the map
GetKeys rcx, rdx, <King, Knight, Pawn>, <King>
lea eax, [EndgameScale_KNPK]
mov esi, EndgameScale_KNPK_index
mov dword[rbx+4*rsi], eax
call .Map_Insert
GetKeys rcx, rdx, <King, Knight, Pawn>, <King, Bishop>
lea eax, [EndgameScale_KNPKB]
mov esi, EndgameScale_KNPKB_index
mov dword[rbx+4*rsi], eax
call .Map_Insert
GetKeys rcx, rdx, <King, Rook, Pawn>, <King, Rook>
lea eax, [EndgameScale_KRPKR]
mov esi, EndgameScale_KRPKR_index
mov dword[rbx+4*rsi], eax
call .Map_Insert
GetKeys rcx, rdx, <King, Rook, Pawn>, <King, Bishop>
lea eax, [EndgameScale_KRPKB]
mov esi, EndgameScale_KRPKB_index
mov dword[rbx+4*rsi], eax
call .Map_Insert
GetKeys rcx, rdx, <King, Bishop, Pawn>, <King, Bishop>
lea eax, [EndgameScale_KBPKB]
mov esi, EndgameScale_KBPKB_index
mov dword[rbx+4*rsi], eax
call .Map_Insert
GetKeys rcx, rdx, <King, Bishop, Pawn>, <King, Knight>
lea eax, [EndgameScale_KBPKN]
mov esi, EndgameScale_KBPKN_index
mov dword[rbx+4*rsi], eax
call .Map_Insert
GetKeys rcx, rdx, <King, Bishop, Pawn, Pawn>, <King, Bishop>
lea eax, [EndgameScale_KBPPKB]
mov esi, EndgameScale_KBPPKB_index
mov dword[rbx+4*rsi], eax
call .Map_Insert
GetKeys rcx, rdx, <King, Rook, Pawn, Pawn>, <King, Rook, Pawn>
lea eax, [EndgameScale_KRPPKRP]
mov esi, EndgameScale_KRPPKRP_index
mov dword[rbx+4*rsi], eax
call .Map_Insert
; Assert ne, byte[rdi+(ENDGAME_SCALE_MAP_SIZE-1)*sizeof.EndgameMapEntry+EndgameMapEntry.entri], 0, 'problem2 in Endgame_Init'
; these endgame fxns correspond to many material config except KPKP
; and are not added to the map
lea eax, [EndgameScale_KBPsK]
mov r8d, EndgameScale_KBPsK_index
mov dword[rbx+4*r8], eax
lea eax, [EndgameScale_KQKRPs]
mov r8d, EndgameScale_KQKRPs_index
mov dword[rbx+4*r8], eax
lea eax, [EndgameScale_KPsK]
mov r8d, EndgameScale_KPsK_index
mov dword[rbx+4*r8], eax
lea eax, [EndgameScale_KPKP]
mov r8d, EndgameScale_KPKP_index
mov dword[rbx+4*r8], eax
lea rsi, [.PushToEdges]
lea rdi, [PushToEdges]
mov ecx, 64
rep movsb
lea rsi, [.PushToCorners]
lea rdi, [PushToCorners]
mov ecx, 64
rep movsb
lea rsi, [.PushClose]
lea rdi, [PushClose]
mov ecx, 8
rep movsb
lea rsi, [.PushAway]
lea rdi, [PushAway]
mov ecx, 8
rep movsb
; lea rsi, [.KRPPKRPScaleFactors]
; lea rdi, [KRPPKRPScaleFactors]
; mov ecx, 8
; rep movsb
pop rdi rsi rbx
ret
.PushToEdges:
db 100, 90, 80, 70, 70, 80, 90, 100
db 90, 70, 60, 50, 50, 60, 70, 90
db 80, 60, 40, 30, 30, 40, 60, 80
db 70, 50, 30, 20, 20, 30, 50, 70
db 70, 50, 30, 20, 20, 30, 50, 70
db 80, 60, 40, 30, 30, 40, 60, 80
db 90, 70, 60, 50, 50, 60, 70, 90
db 100, 90, 80, 70, 70, 80, 90, 100
.PushToCorners:
db 200, 190, 180, 170, 160, 150, 140, 130
db 190, 180, 170, 160, 150, 140, 130, 140
db 180, 170, 155, 140, 140, 125, 140, 150
db 170, 160, 140, 120, 110, 140, 150, 160
db 160, 150, 140, 110, 120, 140, 160, 170
db 150, 140, 125, 140, 140, 155, 170, 180
db 140, 130, 140, 150, 160, 170, 180, 190
db 130, 140, 150, 160, 170, 180, 190, 200
.PushClose: db 0, 0, 100, 80, 60, 40, 20, 10
.PushAway: db 0, 5, 20, 40, 60, 80, 90, 100
;.KRPPKRPScaleFactors: db 0, 9, 10, 14, 21, 44, 0, 0
.Map_Insert:
; in: rcx hash with strongside=0
; rdx hash with strongside=1 (material flipped)
; esi index of fxn
; rdi address EndgameEval_Map or EndgameScale_Map
;
; we simply insert the two entries rcx and rdx into the assumed sorted
; array of EndgameMapEntry structs, sorted by key
push rdx
add esi, esi
push rsi
call .Insert
pop rsi
add esi, 1
pop rcx
.Insert:
; in: rcx key to insert
; esi entry
push rdi
sub rdi, sizeof.EndgameMapEntry
.Next:
add rdi, sizeof.EndgameMapEntry
mov rax, qword[rdi+EndgameMapEntry.key]
mov edx, dword[rdi+EndgameMapEntry.entri]
test edx, edx
jz .AtEnd
; Assert ne, rax, rcx , 'assertion rax!=rcx failed in Endgame_Init: duplicate material keys'
cmp rcx, rax
ja .Next
.Found:
mov rax, qword[rdi+EndgameMapEntry.key]
mov edx, dword[rdi+EndgameMapEntry.entri]
test edx, edx
.AtEnd:
mov qword[rdi+EndgameMapEntry.key], rcx
mov dword[rdi+EndgameMapEntry.entri], esi
mov rcx, rax
mov esi, edx
lea rdi, [rdi+sizeof.EndgameMapEntry]
jnz .Found
pop rdi
ret
|
src/main/antlr4/TestGrammar.g4 | tekiflo/umlreverse | 0 | 5838 | grammar TestGrammar;
entryPoint
: attr*
;
attr
: ID assign content=value ';'
| ID assign content=table ';'
| ID content=group
;
value
: ID
| STR
;
group
: '{' attr* '}'
;
table
: '[' (value ',')* value ']'
| '[' ']'
;
assign
: ':'
| '='
;
LPAREN : '(';
RPAREN : ')';
LBRACK : '[';
RBRACK : ']';
LBRACE : '{';
RBRACE : '}';
ASSIGN : '=';
COLON : ':';
SEMICOLON : ';';
COMMA : ',';
ID : [A-Za-z0-9_\-]+;
STR : '"' (~('"' | '\\') | '\\' ('"' | '\\'))* '"';
WS : [ \t\r\n\u000C]+ -> skip;
COMMENT : '/*' .*? '*/' -> skip;
LINE_COMMENT : '//' ~[\r\n]* -> skip; |
schema-language/src/main/antlr4/Courier.g4 | stanley-coursera/courier | 111 | 7824 | grammar Courier;
@header {
import org.coursera.courier.grammar.ParseUtils;
import java.util.Arrays;
}
document: namespaceDeclaration? importDeclarations namedTypeDeclaration;
namespaceDeclaration: NAMESPACE qualifiedIdentifier;
importDeclarations: importDeclaration*;
importDeclaration: IMPORT type=qualifiedIdentifier;
typeReference returns [String value]: qualifiedIdentifier {
$value = $qualifiedIdentifier.value;
};
typeDeclaration: namedTypeDeclaration | anonymousTypeDeclaration;
namedTypeDeclaration: doc=schemadoc? props+=propDeclaration*
(recordDeclaration | enumDeclaration | typerefDeclaration | fixedDeclaration);
anonymousTypeDeclaration: unionDeclaration | arrayDeclaration | mapDeclaration;
typeAssignment: typeReference | typeDeclaration;
propDeclaration returns [String name, List<String> path]: propNameDeclaration propJsonValue? {
$name = $propNameDeclaration.name;
$path = Arrays.asList($propNameDeclaration.name.split("\\."));
};
propNameDeclaration returns [String name]: AT qualifiedIdentifier {
$name = $qualifiedIdentifier.value;
};
// TODO(jbetz): remove '( )' form once migrated to '=' form?
propJsonValue: OPEN_PAREN jsonValue CLOSE_PAREN | EQ jsonValue;
recordDeclaration returns [String name]: RECORD identifier recordDecl=fieldSelection {
$name = $identifier.value;
};
enumDeclaration returns [String name]: ENUM identifier enumDecl=enumSymbolDeclarations {
$name = $identifier.value;
};
enumSymbolDeclarations: OPEN_BRACE symbolDecls+=enumSymbolDeclaration* CLOSE_BRACE;
enumSymbolDeclaration: doc=schemadoc? props+=propDeclaration* symbol=enumSymbol;
enumSymbol returns [String value]: identifier {
$value = $identifier.value;
};
typerefDeclaration returns [String name]: TYPEREF identifier EQ ref=typeAssignment {
$name = $identifier.value;
};
fixedDeclaration returns[String name, int size]:
FIXED identifier sizeStr=NUMBER_LITERAL {
$name = $identifier.value;
$size = $sizeStr.int;
};
unionDeclaration: UNION typeParams=unionTypeAssignments;
unionTypeAssignments: OPEN_BRACKET members+=unionMemberDeclaration* CLOSE_BRACKET;
unionMemberDeclaration: member=typeAssignment;
arrayDeclaration: ARRAY typeParams=arrayTypeAssignments;
arrayTypeAssignments: OPEN_BRACKET items=typeAssignment CLOSE_BRACKET;
mapDeclaration: MAP typeParams=mapTypeAssignments;
mapTypeAssignments: OPEN_BRACKET key=typeAssignment value=typeAssignment CLOSE_BRACKET;
fieldSelection: OPEN_BRACE fields+=fieldSelectionElement* CLOSE_BRACE;
fieldSelectionElement: fieldInclude | fieldDeclaration;
fieldInclude: DOTDOTDOT typeReference;
fieldDeclaration returns [String name, boolean isOptional]:
doc=schemadoc? props+=propDeclaration* fieldName=identifier COLON type=typeAssignment QUESTION_MARK?
fieldDefault? {
$name = $identifier.value;
$isOptional = $QUESTION_MARK() != null;
};
fieldDefault: EQ jsonValue;
qualifiedIdentifier returns [String value]: ID (DOT ID)* {
$value = ParseUtils.unescapeIdentifier($text);
};
identifier returns [String value]: ID {
$value = ParseUtils.unescapeIdentifier($text);
};
schemadoc returns [String value]: SCHEMADOC_COMMENT {
$value = ParseUtils.extractMarkdown($SCHEMADOC_COMMENT.text);
};
// JSON
object: OPEN_BRACE objectEntry* CLOSE_BRACE;
objectEntry: key=string COLON value=jsonValue ;
array: OPEN_BRACKET items=jsonValue* CLOSE_BRACKET;
jsonValue: string | number | object | array | bool | nullValue;
string returns [String value]: STRING_LITERAL {
$value = ParseUtils.extractString($STRING_LITERAL.text);
};
number returns [Number value]: NUMBER_LITERAL {
$value = ParseUtils.toNumber($NUMBER_LITERAL.text);
};
bool returns [Boolean value]: BOOLEAN_LITERAL {
$value = Boolean.valueOf($BOOLEAN_LITERAL.text);
};
nullValue: NULL_LITERAL;
// Tokens
ARRAY: 'array';
ENUM: 'enum';
FIXED: 'fixed';
IMPORT: 'import';
MAP: 'map';
NAMESPACE: 'namespace';
RECORD: 'record';
TYPEREF: 'typeref';
UNION: 'union';
OPEN_PAREN: '(';
CLOSE_PAREN: ')';
OPEN_BRACE: '{';
CLOSE_BRACE: '}';
OPEN_BRACKET: '[';
CLOSE_BRACKET: ']';
AT: '@';
COLON: ':';
DOT: '.';
DOTDOTDOT: '...';
EQ: '=';
QUESTION_MARK: '?';
BOOLEAN_LITERAL: 'true' | 'false';
NULL_LITERAL: 'null';
SCHEMADOC_COMMENT: '/**' .*? '*/';
BLOCK_COMMENT: '/*' .*? '*/' -> skip;
LINE_COMMENT: '//' ~[\r\n]* -> skip;
NUMBER_LITERAL: '-'? ('0' | [1-9] [0-9]*) ( '.' [0-9]+)? ([eE][+-]?[0-9]+)?;
fragment HEX: [0-9a-fA-F];
fragment UNICODE: 'u' HEX HEX HEX HEX;
fragment ESC: '\\' (["\\/bfnrt] | UNICODE);
STRING_LITERAL: '"' (ESC | ~["\\])* '"';
ID: '`'? [A-Za-z_] [A-Za-z0-9_]* '`'?; // Avro/Pegasus identifiers with Scala/Swift escaping
WS: [ \t\n\r\f,]+ -> skip;
|
src/patch.asm | Pheenoh/TwilightPrincessDebugMenu | 6 | 11940 | [cDyl_InitAsync()] + 0x30:
b init_once
0x8033a0b0:
; lis r3, 0x8050 ; set Arena low to 0x80507be0
; with inject at 0x80460000 gives us 0xA7BE0 bytes
u32 0x3c608050
0x802e7648:
b draw
0x80006444:
bl game_loop
bl fapGm_Execute()
bl mDoAud_Execute()
0x8034f19c:
b read_controller
|
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_19254_1318.asm | ljhsiun2/medusa | 9 | 174204 | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r14
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0x33b0, %r14
nop
nop
nop
nop
dec %rdx
mov (%r14), %di
nop
nop
nop
inc %r11
lea addresses_normal_ht+0x5bf0, %rsi
lea addresses_WC_ht+0x16bf0, %rdi
nop
nop
add $4944, %rbx
mov $38, %rcx
rep movsw
nop
nop
nop
nop
nop
add $54292, %rsi
lea addresses_D_ht+0xd0, %rsi
lea addresses_normal_ht+0x137f0, %rdi
nop
nop
nop
nop
xor %r11, %r11
mov $96, %rcx
rep movsw
nop
nop
nop
nop
nop
and $44778, %rbx
lea addresses_D_ht+0x12ff0, %r14
cmp $33231, %r11
vmovups (%r14), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $1, %xmm3, %rsi
nop
nop
nop
nop
add %r11, %r11
lea addresses_WC_ht+0x1ac4, %r11
nop
inc %rcx
movw $0x6162, (%r11)
nop
nop
xor $60587, %r14
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r14
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r13
push %r9
push %rbp
push %rdx
push %rsi
// Store
lea addresses_A+0x5b90, %r10
nop
dec %rdx
movl $0x51525354, (%r10)
nop
nop
dec %r13
// Store
mov $0x22030a0000000110, %r13
nop
nop
nop
nop
nop
add $10096, %r11
movb $0x51, (%r13)
nop
nop
nop
nop
nop
add %r13, %r13
// Store
mov $0x970, %rbp
nop
nop
nop
nop
xor %rsi, %rsi
movw $0x5152, (%rbp)
cmp %r11, %r11
// Store
lea addresses_D+0x11996, %rbp
nop
nop
cmp $299, %r9
movl $0x51525354, (%rbp)
nop
nop
nop
nop
nop
cmp $59078, %rdx
// Store
mov $0x570, %r13
nop
nop
nop
cmp $55199, %rbp
mov $0x5152535455565758, %r10
movq %r10, (%r13)
nop
nop
nop
nop
nop
and $59672, %r9
// Faulty Load
lea addresses_RW+0x187f0, %r13
nop
nop
nop
inc %r11
movb (%r13), %r9b
lea oracles, %rbp
and $0xff, %r9
shlq $12, %r9
mov (%rbp,%r9,1), %r9
pop %rsi
pop %rdx
pop %rbp
pop %r9
pop %r13
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_P', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_P', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': True}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 11, 'same': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}}
{'32': 19254}
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
*/
|
Test/FileCreate.asm | delphi-pascal-archive/basm32 | 0 | 27233 | <reponame>delphi-pascal-archive/basm32
; Title 'TestFile'
.APPTYPE GUI
include "inc\winconst.inc"
include 'inc\Kernel32.def'
include 'inc\User32.def'
.DATA
; Variables
FileHandle DD 0 ;THandle
BytesWritten DD 0 ;DWORD
FileName db 'TestFile',0
ALIGN 4
Buffer db 'Win Asm Test',0
.CODE
; FileHandle := CreateFileA(FileName, , 0, 0, 0, 0);
PUSH 0
PUSH 0
PUSH CREATE_ALWAYS
PUSH 0
PUSH 0
PUSH GENERIC_READ + GENERIC_WRITE
PUSH FileName ; Address
CALL CreateFileA
MOV [FileHandle], EAX
; WriteFile(FileHandle, Buffer,strlen(buffer), BytesWritten, 0);
PUSH 0
PUSH BytesWritten
push buffer
call strlen
push eax
PUSH Buffer
PUSH [FileHandle]
CALL WriteFile
; CloseHandle(FileHandle);
PUSH [FileHandle]
CALL CloseHandle
; ExitProcess(0);
PUSH 0
CALL ExitProcess
include 'inc\strings.inc'
include 'inc\file.inc'
end
|
original version (1984)/asm/map03-exec.asm | fa8ntomas/bclk-samples | 0 | 92504 | ; Map 03 exec
; The switching bridges
lda MapSomething
bne L2E17
lda MapVar1
bmi L2E17
lda PlayerMap3LampsCounts
bne L2E17
dec MapVar1
lda MapVar1
cmp #$02
bne @+
jsr PlaySfxEntrance ;Play open floorsound screen 3
@ clc
adc #$10
ldx #$0C
ldy #$1D
jsr PlotChars ;Open floor location on screen 3
L2E17 dec MapVar3
bmi bridge1
rts
; bridge 1
bridge1 lda #$30
sta MapVar3
lda MapVar2
beq bridge2
dec MapVar2
lda #$06
ldx #$06
ldy #$09
jsr PlotChars ;Erase and draw left moving platform
lda #$60
ldx #$06
ldy #$15
jmp PlotChars ;Erase and draw left moving platform
; bridge 2
bridge2 inc MapVar2
lda #$60
ldx #$06
ldy #$09
jsr PlotChars ;Erase and draw right moving platform
lda #$06
ldx #$06
ldy #$15
jmp PlotChars ;Erase and draw right moving platform
|
effects/lines/CpuEdgeOpt.asm | kgalikgh/demoscene | 0 | 171435 | ; vim: ft=asm68k:ts=8:sw=8:
xdef _CpuEdgeOpt
section ".text"
; [a0] bitplane
; [a1] stride
; [d0] xs
; [d1] ys
; [d2] xe
; [d3] ye
_CpuEdgeOpt:
movem.l d2-d6,-(sp)
cmp.w d3,d1 ; ys > ye ?
ble.s .y_ok
exg.l d0,d2 ; xs <=> xe
exg.l d1,d3 ; ys <=> ye
.y_ok sub.w d0,d2 ; [d2] dx = xe - xs
sub.w d1,d3 ; [d3] dy = ye - ys
beq .exit ; return if dy == 0
move.w a1,d4
muls.w d1,d4
move.w d0,d5
asr.w #3,d5
add.w d4,d5
add.w d5,a0 ; pixels += ys * stride + xs / 8
move.w d2,d4 ; [d4] adx = abs(dx)
bge.s .dx_ok
neg.w d4
.dx_ok ; [d4] df = adx
clr.w d5 ; [d5] di = 0
cmp.w d3,d4
blt.s .no_div
divs.w d3,d4
move.w d4,d5 ; [d5] di = adx / dy
swap d4 ; [d4] df = adx % dy
.no_div move.w a1,d1 ; [d1] dp = stride
not.w d0
and.w #7,d0 ; [d0] xi = ~xs & 7
move.w d3,d6
neg.w d6 ; [d6] xf = -dy
tst.w d2 ; dx >= 0 ?
blt.s .case2
.case1 move.w d5,d2
asr.w #3,d2
add.w d2,d1 ; dp += di / 8
and.w #7,d5 ; di = di & 7
move.w d3,d2 ; [d2] n = dy
subq.w #1,d2
; min/max cycles per iteration: 56/76
.loop1 bchg d0,(a0) ; (12) put pixel
add.w d1,a0 ; (8) ptr += dp
add.w d4,d6 ; (4) xf += df
blt.s .xf1 ; (8/10) xf >= 0 ?
subq.w #1,d0 ; (4) xi--
sub.w d3,d6 ; (4) xf -= dy
.xf1 sub.w d5,d0 ; (4) xi -= di
blt.s .xi1 ; (8/10) xi < 0 ?
dbf d2,.loop1 ; (10)
bra.s .exit
.xi1 addq.l #1,a0 ; (8) ptr++
addq.w #8,d0 ; (4) xi += 8
dbf d2,.loop1 ; (10)
bra.s .exit
.case2 move.w d5,d2
asr.w #3,d2
sub.w d2,d1 ; dp -= di / 8
and.w #7,d5
neg.w d5 ; di = -(di & 7)
subq.w #8,d0 ; xi -= 8
move.w d3,d2 ; [d2] n = dy
subq.w #1,d2
; min/max cycles per iteration: 56/76
.loop2 bchg d0,(a0) ; (12) put pixel
add.w d1,a0 ; (8) ptr += dp
add.w d4,d6 ; (4) xf += df
blt.s .xf2 ; (8/10) xf >= 0 ?
addq.w #1,d0 ; (4) xi++
sub.w d3,d6 ; (4) xf -= dy
.xf2 sub.w d5,d0 ; (4) xi -= di
bge.s .xi2 ; (8/10) xi >= 0 ?
dbf d2,.loop2 ; (10)
bra.s .exit
.xi2 subq.l #1,a0 ; (8) ptr--
subq.w #8,d0 ; (4) xi -= 8
dbf d2,.loop2 ; (10)
.exit: movem.l (sp)+,d2-d6
rts
|
src/gnat/prj-err.ads | My-Colaborations/dynamo | 15 | 1813 | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- P R J . E R R --
-- --
-- S p e c --
-- --
-- Copyright (C) 2002-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. --
-- --
------------------------------------------------------------------------------
-- This package contains the routines to output error messages and the scanner
-- for the project files. It replaces Errout and Scn. It is not dependent on
-- the GNAT tree packages (Atree, Sinfo, ...). It uses exactly the same global
-- variables as Errout, located in package Err_Vars. Like Errout, it also uses
-- the common variables and routines in package Erroutc.
--
-- Parameters are set through Err_Vars.Error_Msg_File_* or
-- Err_Vars.Error_Msg_Name_*, and replaced automatically in the messages
-- ("{{" for files, "%%" for names).
--
-- However, in this package you can configure the error messages to be sent
-- to your own callback by setting Report_Error in the flags. This ensures
-- that applications can control where error messages are displayed.
with Scng;
with Errutil;
package Prj.Err is
---------------------------------------------------------
-- Error Message Text and Message Insertion Characters --
---------------------------------------------------------
-- See errutil.ads
-----------------------------------------------------
-- Format of Messages and Manual Quotation Control --
-----------------------------------------------------
-- See errutil.ads
------------------------------
-- Error Output Subprograms --
------------------------------
procedure Initialize renames Errutil.Initialize;
-- Initializes for output of error messages. Must be called for each
-- file before using any of the other routines in the package.
procedure Finalize (Source_Type : String := "project")
renames Errutil.Finalize;
-- Finalize processing of error messages for one file and output message
-- indicating the number of detected errors.
procedure Error_Msg
(Flags : Processing_Flags;
Msg : String;
Location : Source_Ptr := No_Location;
Project : Project_Id := null);
-- Output an error message, either through Flags.Error_Report or through
-- Errutil. The location defaults to the project's location ("project"
-- in the source code). If Msg starts with "?", this is a warning, and
-- Warning: is added at the beginning. If Msg starts with "<", see comment
-- for Err_Vars.Error_Msg_Warn.
-------------
-- Scanner --
-------------
procedure Post_Scan;
-- Convert an Ada operator symbol into a standard string
package Scanner is new Scng
(Post_Scan => Post_Scan,
Error_Msg => Errutil.Error_Msg,
Error_Msg_S => Errutil.Error_Msg_S,
Error_Msg_SC => Errutil.Error_Msg_SC,
Error_Msg_SP => Errutil.Error_Msg_SP,
Style => Errutil.Style);
-- Instantiation of the generic scanner
end Prj.Err;
|
iAlloy-dataset-master/real_version_set/addrFaulty/v11/addrFaulty.als | jringert/alloy-diff | 1 | 1804 |
abstract sig Listing { }
sig Address extends Listing { }
sig Name extends Listing { }
sig Book {
entry: set Name, // T1
listed: entry ->set Listing // T2
}
fun lookup [b: Book, n: Name] : set Listing {n.^(b.listed)}
fact {all b:Book | all n:b.entry | lone b.listed[n] }
fact { all b:Book | all n,l:Name | l in lookup[b,n] implies l in b.entry }
fact { all b:Book | all n:b.entry | not n in lookup[b,n] }
assert lookupEndsInAddr {
all b:Book | all n:b.entry | some (lookup[b,n]&Address)
}
check lookupEndsInAddr for 7
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1129.asm | ljhsiun2/medusa | 9 | 2640 | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r15
push %r9
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0xcd1a, %r13
nop
nop
nop
add $31138, %rax
mov (%r13), %r11w
nop
nop
nop
nop
nop
and $38280, %r15
lea addresses_WT_ht+0x1e5ea, %r9
inc %r13
mov $0x6162636465666768, %rcx
movq %rcx, %xmm6
movups %xmm6, (%r9)
nop
nop
nop
nop
sub %rcx, %rcx
lea addresses_normal_ht+0x1bd12, %r13
nop
nop
sub %r9, %r9
mov (%r13), %r11
nop
nop
nop
nop
nop
and %r15, %r15
lea addresses_normal_ht+0xd09a, %r9
clflush (%r9)
nop
nop
nop
nop
nop
sub %rbp, %rbp
movl $0x61626364, (%r9)
nop
nop
nop
nop
xor %r11, %r11
lea addresses_normal_ht+0x4be6, %rsi
lea addresses_normal_ht+0xb89a, %rdi
nop
dec %rbp
mov $20, %rcx
rep movsq
nop
add %rdi, %rdi
lea addresses_normal_ht+0x4a9a, %rsi
lea addresses_A_ht+0xd28a, %rdi
clflush (%rdi)
sub %rax, %rax
mov $65, %rcx
rep movsl
nop
nop
nop
xor $26516, %rsi
lea addresses_normal_ht+0x759a, %r13
nop
nop
nop
nop
sub $22702, %rbp
mov (%r13), %rdi
nop
nop
inc %rdi
lea addresses_WC_ht+0xda9a, %rbp
and %rsi, %rsi
mov (%rbp), %r9d
xor $53865, %r15
lea addresses_normal_ht+0x1e9aa, %r11
clflush (%r11)
add $45862, %r15
and $0xffffffffffffffc0, %r11
movntdqa (%r11), %xmm4
vpextrq $0, %xmm4, %r13
nop
nop
nop
nop
nop
sub %r11, %r11
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r15
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r13
push %r14
push %r15
push %rbp
// Store
lea addresses_WT+0x10b0a, %rbp
nop
nop
nop
nop
xor %r14, %r14
movw $0x5152, (%rbp)
nop
nop
nop
inc %r10
// Faulty Load
lea addresses_PSE+0xc99a, %r10
cmp $40345, %r11
movb (%r10), %r14b
lea oracles, %r12
and $0xff, %r14
shlq $12, %r14
mov (%r12,%r14,1), %r14
pop %rbp
pop %r15
pop %r14
pop %r13
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_PSE', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 4}}
[Faulty Load]
{'src': {'type': 'addresses_PSE', 'AVXalign': False, 'size': 1, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 7}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 3}}
{'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': True, 'congruent': 3}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 6}}
{'src': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}}
{'src': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}}
{'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 6}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 7}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 16, 'NT': True, 'same': False, 'congruent': 1}, 'OP': 'LOAD'}
{'33': 21829}
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
*/
|
arch/ARM/STM32/svd/stm32wb55x/stm32_svd-tim2.ads | morbos/Ada_Drivers_Library | 2 | 8772 | <filename>arch/ARM/STM32/svd/stm32wb55x/stm32_svd-tim2.ads<gh_stars>1-10
-- This spec has been automatically generated from STM32WB55x.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.TIM2 is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype CR1_CMS_Field is HAL.UInt2;
subtype CR1_CKD_Field is HAL.UInt2;
type CR1_Register is record
CEN : Boolean := False;
UDIS : Boolean := False;
URS : Boolean := False;
OPM : Boolean := False;
DIR : Boolean := False;
CMS : CR1_CMS_Field := 16#0#;
ARPE : Boolean := False;
CKD : CR1_CKD_Field := 16#0#;
-- unspecified
Reserved_10_10 : HAL.Bit := 16#0#;
UIFREMAP : Boolean := False;
-- unspecified
Reserved_12_31 : HAL.UInt20 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR1_Register use record
CEN at 0 range 0 .. 0;
UDIS at 0 range 1 .. 1;
URS at 0 range 2 .. 2;
OPM at 0 range 3 .. 3;
DIR at 0 range 4 .. 4;
CMS at 0 range 5 .. 6;
ARPE at 0 range 7 .. 7;
CKD at 0 range 8 .. 9;
Reserved_10_10 at 0 range 10 .. 10;
UIFREMAP at 0 range 11 .. 11;
Reserved_12_31 at 0 range 12 .. 31;
end record;
subtype CR2_MMS_Field is HAL.UInt3;
type CR2_Register is record
-- unspecified
Reserved_0_2 : HAL.UInt3 := 16#0#;
CCDS : Boolean := False;
MMS : CR2_MMS_Field := 16#0#;
TI1S : Boolean := False;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR2_Register use record
Reserved_0_2 at 0 range 0 .. 2;
CCDS at 0 range 3 .. 3;
MMS at 0 range 4 .. 6;
TI1S at 0 range 7 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype SMCR_SMS_Field is HAL.UInt3;
subtype SMCR_TS_Field is HAL.UInt3;
subtype SMCR_ETF_Field is HAL.UInt4;
subtype SMCR_ETPS_Field is HAL.UInt2;
subtype SMCR_TS_Field_1 is HAL.UInt2;
type SMCR_Register is record
SMS : SMCR_SMS_Field := 16#0#;
-- unspecified
Reserved_3_3 : HAL.Bit := 16#0#;
TS : SMCR_TS_Field := 16#0#;
MSM : Boolean := False;
ETF : SMCR_ETF_Field := 16#0#;
ETPS : SMCR_ETPS_Field := 16#0#;
ECE : Boolean := False;
ETP : Boolean := False;
SMS_1 : Boolean := False;
-- unspecified
Reserved_17_19 : HAL.UInt3 := 16#0#;
TS_1 : SMCR_TS_Field_1 := 16#0#;
-- unspecified
Reserved_22_31 : HAL.UInt10 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SMCR_Register use record
SMS at 0 range 0 .. 2;
Reserved_3_3 at 0 range 3 .. 3;
TS at 0 range 4 .. 6;
MSM at 0 range 7 .. 7;
ETF at 0 range 8 .. 11;
ETPS at 0 range 12 .. 13;
ECE at 0 range 14 .. 14;
ETP at 0 range 15 .. 15;
SMS_1 at 0 range 16 .. 16;
Reserved_17_19 at 0 range 17 .. 19;
TS_1 at 0 range 20 .. 21;
Reserved_22_31 at 0 range 22 .. 31;
end record;
type DIER_Register is record
UIE : Boolean := False;
CC1IE : Boolean := False;
CC2IE : Boolean := False;
CC3IE : Boolean := False;
CC4IE : Boolean := False;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
TIE : Boolean := False;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
UDE : Boolean := False;
CC1DE : Boolean := False;
CC2DE : Boolean := False;
CC3DE : Boolean := False;
CC4DE : Boolean := False;
-- unspecified
Reserved_13_31 : HAL.UInt19 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DIER_Register use record
UIE at 0 range 0 .. 0;
CC1IE at 0 range 1 .. 1;
CC2IE at 0 range 2 .. 2;
CC3IE at 0 range 3 .. 3;
CC4IE at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
TIE at 0 range 6 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
UDE at 0 range 8 .. 8;
CC1DE at 0 range 9 .. 9;
CC2DE at 0 range 10 .. 10;
CC3DE at 0 range 11 .. 11;
CC4DE at 0 range 12 .. 12;
Reserved_13_31 at 0 range 13 .. 31;
end record;
type SR_Register is record
UIF : Boolean := False;
CC1IF : Boolean := False;
CC2IF : Boolean := False;
CC3IF : Boolean := False;
CC4IF : Boolean := False;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
TIF : Boolean := False;
-- unspecified
Reserved_7_8 : HAL.UInt2 := 16#0#;
CC1OF : Boolean := False;
CC2OF : Boolean := False;
CC3OF : Boolean := False;
CC4OF : Boolean := False;
-- unspecified
Reserved_13_31 : HAL.UInt19 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SR_Register use record
UIF at 0 range 0 .. 0;
CC1IF at 0 range 1 .. 1;
CC2IF at 0 range 2 .. 2;
CC3IF at 0 range 3 .. 3;
CC4IF at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
TIF at 0 range 6 .. 6;
Reserved_7_8 at 0 range 7 .. 8;
CC1OF at 0 range 9 .. 9;
CC2OF at 0 range 10 .. 10;
CC3OF at 0 range 11 .. 11;
CC4OF at 0 range 12 .. 12;
Reserved_13_31 at 0 range 13 .. 31;
end record;
type EGR_Register is record
UG : Boolean := False;
CC1G : Boolean := False;
CC2G : Boolean := False;
CC3G : Boolean := False;
CC4G : Boolean := False;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
TG : Boolean := False;
-- unspecified
Reserved_7_31 : HAL.UInt25 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for EGR_Register use record
UG at 0 range 0 .. 0;
CC1G at 0 range 1 .. 1;
CC2G at 0 range 2 .. 2;
CC3G at 0 range 3 .. 3;
CC4G at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
TG at 0 range 6 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
subtype CCMR1_Output_CC1S_Field is HAL.UInt2;
subtype CCMR1_Output_OC1M_Field is HAL.UInt3;
subtype CCMR1_Output_CC2S_Field is HAL.UInt2;
subtype CCMR1_Output_OC2M_Field is HAL.UInt3;
type CCMR1_Output_Register is record
CC1S : CCMR1_Output_CC1S_Field := 16#0#;
OC1FE : Boolean := False;
OC1PE : Boolean := False;
OC1M : CCMR1_Output_OC1M_Field := 16#0#;
OC1CE : Boolean := False;
CC2S : CCMR1_Output_CC2S_Field := 16#0#;
OC2FE : Boolean := False;
OC2PE : Boolean := False;
OC2M : CCMR1_Output_OC2M_Field := 16#0#;
OC2CE : Boolean := False;
OC1M_1 : Boolean := False;
-- unspecified
Reserved_17_23 : HAL.UInt7 := 16#0#;
OC2M_1 : Boolean := False;
-- unspecified
Reserved_25_31 : HAL.UInt7 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCMR1_Output_Register use record
CC1S at 0 range 0 .. 1;
OC1FE at 0 range 2 .. 2;
OC1PE at 0 range 3 .. 3;
OC1M at 0 range 4 .. 6;
OC1CE at 0 range 7 .. 7;
CC2S at 0 range 8 .. 9;
OC2FE at 0 range 10 .. 10;
OC2PE at 0 range 11 .. 11;
OC2M at 0 range 12 .. 14;
OC2CE at 0 range 15 .. 15;
OC1M_1 at 0 range 16 .. 16;
Reserved_17_23 at 0 range 17 .. 23;
OC2M_1 at 0 range 24 .. 24;
Reserved_25_31 at 0 range 25 .. 31;
end record;
subtype CCMR1_Input_CC1S_Field is HAL.UInt2;
subtype CCMR1_Input_IC1PSC_Field is HAL.UInt2;
subtype CCMR1_Input_IC1F_Field is HAL.UInt4;
subtype CCMR1_Input_CC2S_Field is HAL.UInt2;
subtype CCMR1_Input_IC2PSC_Field is HAL.UInt2;
subtype CCMR1_Input_IC2F_Field is HAL.UInt4;
type CCMR1_Input_Register is record
CC1S : CCMR1_Input_CC1S_Field := 16#0#;
IC1PSC : CCMR1_Input_IC1PSC_Field := 16#0#;
IC1F : CCMR1_Input_IC1F_Field := 16#0#;
CC2S : CCMR1_Input_CC2S_Field := 16#0#;
IC2PSC : CCMR1_Input_IC2PSC_Field := 16#0#;
IC2F : CCMR1_Input_IC2F_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCMR1_Input_Register use record
CC1S at 0 range 0 .. 1;
IC1PSC at 0 range 2 .. 3;
IC1F at 0 range 4 .. 7;
CC2S at 0 range 8 .. 9;
IC2PSC at 0 range 10 .. 11;
IC2F at 0 range 12 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CCMR2_Output_CC3S_Field is HAL.UInt2;
subtype CCMR2_Output_OC3M_Field is HAL.UInt3;
subtype CCMR2_Output_CC4S_Field is HAL.UInt2;
subtype CCMR2_Output_OC4M_Field is HAL.UInt3;
type CCMR2_Output_Register is record
CC3S : CCMR2_Output_CC3S_Field := 16#0#;
OC3FE : Boolean := False;
OC3PE : Boolean := False;
OC3M : CCMR2_Output_OC3M_Field := 16#0#;
OC3CE : Boolean := False;
CC4S : CCMR2_Output_CC4S_Field := 16#0#;
OC4FE : Boolean := False;
OC4PE : Boolean := False;
OC4M : CCMR2_Output_OC4M_Field := 16#0#;
O24CE : Boolean := False;
OC3M_1 : Boolean := False;
-- unspecified
Reserved_17_23 : HAL.UInt7 := 16#0#;
OC4M_1 : Boolean := False;
-- unspecified
Reserved_25_31 : HAL.UInt7 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCMR2_Output_Register use record
CC3S at 0 range 0 .. 1;
OC3FE at 0 range 2 .. 2;
OC3PE at 0 range 3 .. 3;
OC3M at 0 range 4 .. 6;
OC3CE at 0 range 7 .. 7;
CC4S at 0 range 8 .. 9;
OC4FE at 0 range 10 .. 10;
OC4PE at 0 range 11 .. 11;
OC4M at 0 range 12 .. 14;
O24CE at 0 range 15 .. 15;
OC3M_1 at 0 range 16 .. 16;
Reserved_17_23 at 0 range 17 .. 23;
OC4M_1 at 0 range 24 .. 24;
Reserved_25_31 at 0 range 25 .. 31;
end record;
subtype CCMR2_Input_CC3S_Field is HAL.UInt2;
subtype CCMR2_Input_IC3PSC_Field is HAL.UInt2;
subtype CCMR2_Input_IC3F_Field is HAL.UInt4;
subtype CCMR2_Input_CC4S_Field is HAL.UInt2;
subtype CCMR2_Input_IC4PSC_Field is HAL.UInt2;
subtype CCMR2_Input_IC4F_Field is HAL.UInt4;
type CCMR2_Input_Register is record
CC3S : CCMR2_Input_CC3S_Field := 16#0#;
IC3PSC : CCMR2_Input_IC3PSC_Field := 16#0#;
IC3F : CCMR2_Input_IC3F_Field := 16#0#;
CC4S : CCMR2_Input_CC4S_Field := 16#0#;
IC4PSC : CCMR2_Input_IC4PSC_Field := 16#0#;
IC4F : CCMR2_Input_IC4F_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCMR2_Input_Register use record
CC3S at 0 range 0 .. 1;
IC3PSC at 0 range 2 .. 3;
IC3F at 0 range 4 .. 7;
CC4S at 0 range 8 .. 9;
IC4PSC at 0 range 10 .. 11;
IC4F at 0 range 12 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
type CCER_Register is record
CC1E : Boolean := False;
CC1P : Boolean := False;
-- unspecified
Reserved_2_2 : HAL.Bit := 16#0#;
CC1NP : Boolean := False;
CC2E : Boolean := False;
CC2P : Boolean := False;
-- unspecified
Reserved_6_6 : HAL.Bit := 16#0#;
CC2NP : Boolean := False;
CC3E : Boolean := False;
CC3P : Boolean := False;
-- unspecified
Reserved_10_10 : HAL.Bit := 16#0#;
CC3NP : Boolean := False;
CC4E : Boolean := False;
CC4P : Boolean := False;
-- unspecified
Reserved_14_14 : HAL.Bit := 16#0#;
CC4NP : Boolean := False;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCER_Register use record
CC1E at 0 range 0 .. 0;
CC1P at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
CC1NP at 0 range 3 .. 3;
CC2E at 0 range 4 .. 4;
CC2P at 0 range 5 .. 5;
Reserved_6_6 at 0 range 6 .. 6;
CC2NP at 0 range 7 .. 7;
CC3E at 0 range 8 .. 8;
CC3P at 0 range 9 .. 9;
Reserved_10_10 at 0 range 10 .. 10;
CC3NP at 0 range 11 .. 11;
CC4E at 0 range 12 .. 12;
CC4P at 0 range 13 .. 13;
Reserved_14_14 at 0 range 14 .. 14;
CC4NP at 0 range 15 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype PSC_PSC_Field is HAL.UInt16;
type PSC_Register is record
PSC : PSC_PSC_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for PSC_Register use record
PSC at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype DCR_DBA_Field is HAL.UInt5;
subtype DCR_DBL_Field is HAL.UInt5;
type DCR_Register is record
DBA : DCR_DBA_Field := 16#0#;
-- unspecified
Reserved_5_7 : HAL.UInt3 := 16#0#;
DBL : DCR_DBL_Field := 16#0#;
-- unspecified
Reserved_13_31 : HAL.UInt19 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DCR_Register use record
DBA at 0 range 0 .. 4;
Reserved_5_7 at 0 range 5 .. 7;
DBL at 0 range 8 .. 12;
Reserved_13_31 at 0 range 13 .. 31;
end record;
subtype DMAR_DMAB_Field is HAL.UInt16;
type DMAR_Register is record
DMAB : DMAR_DMAB_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DMAR_Register use record
DMAB at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype OR1_TI4_RMP_Field is HAL.UInt2;
type OR1_Register is record
ITR_RMP : Boolean := False;
ETR1_RMP : Boolean := False;
TI4_RMP : OR1_TI4_RMP_Field := 16#0#;
-- unspecified
Reserved_4_31 : HAL.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OR1_Register use record
ITR_RMP at 0 range 0 .. 0;
ETR1_RMP at 0 range 1 .. 1;
TI4_RMP at 0 range 2 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
subtype AF1_ETRSEL_Field is HAL.UInt4;
type AF1_Register is record
-- unspecified
Reserved_0_13 : HAL.UInt14 := 16#0#;
ETRSEL : AF1_ETRSEL_Field := 16#0#;
-- unspecified
Reserved_18_31 : HAL.UInt14 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for AF1_Register use record
Reserved_0_13 at 0 range 0 .. 13;
ETRSEL at 0 range 14 .. 17;
Reserved_18_31 at 0 range 18 .. 31;
end record;
subtype TISEL_TI1SEL_Field is HAL.UInt4;
subtype TISEL_TI2SEL_Field is HAL.UInt4;
type TISEL_Register is record
TI1SEL : TISEL_TI1SEL_Field := 16#0#;
-- unspecified
Reserved_4_7 : HAL.UInt4 := 16#0#;
TI2SEL : TISEL_TI2SEL_Field := 16#0#;
-- unspecified
Reserved_12_31 : HAL.UInt20 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for TISEL_Register use record
TI1SEL at 0 range 0 .. 3;
Reserved_4_7 at 0 range 4 .. 7;
TI2SEL at 0 range 8 .. 11;
Reserved_12_31 at 0 range 12 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
type TIM2_Disc is
(
Output,
Input);
type TIM2_Peripheral
(Discriminent : TIM2_Disc := Output)
is record
CR1 : aliased CR1_Register;
CR2 : aliased CR2_Register;
SMCR : aliased SMCR_Register;
DIER : aliased DIER_Register;
SR : aliased SR_Register;
EGR : aliased EGR_Register;
CCER : aliased CCER_Register;
CNT : aliased HAL.UInt32;
PSC : aliased PSC_Register;
ARR : aliased HAL.UInt32;
CCR1 : aliased HAL.UInt32;
CCR2 : aliased HAL.UInt32;
CCR3 : aliased HAL.UInt32;
CCR4 : aliased HAL.UInt32;
DCR : aliased DCR_Register;
DMAR : aliased DMAR_Register;
OR1 : aliased OR1_Register;
AF1 : aliased AF1_Register;
TISEL : aliased TISEL_Register;
case Discriminent is
when Output =>
CCMR1_Output : aliased CCMR1_Output_Register;
CCMR2_Output : aliased CCMR2_Output_Register;
when Input =>
CCMR1_Input : aliased CCMR1_Input_Register;
CCMR2_Input : aliased CCMR2_Input_Register;
end case;
end record
with Unchecked_Union, Volatile;
for TIM2_Peripheral use record
CR1 at 16#0# range 0 .. 31;
CR2 at 16#4# range 0 .. 31;
SMCR at 16#8# range 0 .. 31;
DIER at 16#C# range 0 .. 31;
SR at 16#10# range 0 .. 31;
EGR at 16#14# range 0 .. 31;
CCER at 16#20# range 0 .. 31;
CNT at 16#24# range 0 .. 31;
PSC at 16#28# range 0 .. 31;
ARR at 16#2C# range 0 .. 31;
CCR1 at 16#34# range 0 .. 31;
CCR2 at 16#38# range 0 .. 31;
CCR3 at 16#3C# range 0 .. 31;
CCR4 at 16#40# range 0 .. 31;
DCR at 16#48# range 0 .. 31;
DMAR at 16#4C# range 0 .. 31;
OR1 at 16#50# range 0 .. 31;
AF1 at 16#60# range 0 .. 31;
TISEL at 16#68# range 0 .. 31;
CCMR1_Output at 16#18# range 0 .. 31;
CCMR2_Output at 16#1C# range 0 .. 31;
CCMR1_Input at 16#18# range 0 .. 31;
CCMR2_Input at 16#1C# range 0 .. 31;
end record;
TIM2_Periph : aliased TIM2_Peripheral
with Import, Address => System'To_Address (16#40000000#);
end STM32_SVD.TIM2;
|
Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_1660.asm | ljhsiun2/medusa | 9 | 244571 | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r8
push %r9
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x18871, %rsi
lea addresses_WC_ht+0x3971, %rdi
nop
nop
and %r8, %r8
mov $34, %rcx
rep movsl
nop
nop
nop
nop
nop
sub %r11, %r11
lea addresses_WC_ht+0xf371, %rsi
lea addresses_WC_ht+0x16f1, %rdi
nop
nop
nop
add $49789, %r13
mov $41, %rcx
rep movsb
xor $506, %r11
lea addresses_UC_ht+0x13429, %r11
clflush (%r11)
nop
nop
nop
nop
nop
inc %r9
mov (%r11), %r13w
nop
nop
inc %rdi
lea addresses_normal_ht+0x12fcd, %r13
nop
nop
nop
nop
nop
cmp %rdi, %rdi
mov (%r13), %rcx
nop
nop
nop
nop
nop
xor $59660, %r11
lea addresses_WC_ht+0x2771, %rdi
sub $31593, %r9
mov $0x6162636465666768, %r13
movq %r13, (%rdi)
nop
nop
nop
nop
nop
inc %rcx
lea addresses_normal_ht+0xca71, %r13
nop
nop
xor %rcx, %rcx
mov $0x6162636465666768, %rdi
movq %rdi, %xmm1
and $0xffffffffffffffc0, %r13
vmovntdq %ymm1, (%r13)
nop
nop
nop
nop
nop
sub $51432, %r13
lea addresses_WT_ht+0x1df4d, %rsi
lea addresses_WC_ht+0x4971, %rdi
clflush (%rsi)
nop
nop
nop
nop
dec %rbx
mov $41, %rcx
rep movsl
nop
nop
nop
nop
and %r8, %r8
lea addresses_UC_ht+0x13b71, %rsi
lea addresses_normal_ht+0xb5d1, %rdi
nop
add %r11, %r11
mov $60, %rcx
rep movsq
nop
nop
nop
lfence
lea addresses_UC_ht+0x13771, %rsi
xor %rbx, %rbx
mov (%rsi), %di
nop
nop
nop
nop
sub $11458, %rdi
lea addresses_A_ht+0x1d371, %r9
nop
nop
and $33430, %r8
movb $0x61, (%r9)
nop
nop
nop
nop
sub %rdi, %rdi
lea addresses_A_ht+0xc8, %rsi
lea addresses_D_ht+0xab8d, %rdi
nop
nop
nop
nop
sub %r11, %r11
mov $40, %rcx
rep movsw
nop
xor $31840, %r13
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r9
pop %r8
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r13
push %r14
push %r9
push %rax
push %rbp
push %rsi
// Store
lea addresses_WT+0x6371, %rax
nop
nop
nop
and %rsi, %rsi
movw $0x5152, (%rax)
nop
nop
nop
add %r10, %r10
// Store
lea addresses_A+0x1a371, %rbp
nop
nop
nop
nop
nop
xor %r10, %r10
movl $0x51525354, (%rbp)
nop
nop
cmp $56899, %rax
// Store
mov $0x41740b0000000371, %rsi
nop
xor %r13, %r13
movb $0x51, (%rsi)
inc %r13
// Store
lea addresses_UC+0x15371, %r10
nop
and %r13, %r13
mov $0x5152535455565758, %rax
movq %rax, %xmm1
vmovups %ymm1, (%r10)
nop
nop
nop
sub %rax, %rax
// Store
lea addresses_WT+0x4371, %r9
sub %r13, %r13
mov $0x5152535455565758, %rbp
movq %rbp, %xmm0
movups %xmm0, (%r9)
nop
nop
nop
xor $49663, %rax
// Faulty Load
lea addresses_UC+0x19b71, %rbp
nop
cmp $51957, %r10
mov (%rbp), %r9
lea oracles, %r13
and $0xff, %r9
shlq $12, %r9
mov (%r13,%r9,1), %r9
pop %rsi
pop %rbp
pop %rax
pop %r9
pop %r14
pop %r13
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_UC', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 10, 'type': 'addresses_WT', 'AVXalign': False, 'size': 2}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_A', 'AVXalign': False, 'size': 4}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_NC', 'AVXalign': False, 'size': 1}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_UC', 'AVXalign': False, 'size': 32}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_WT', 'AVXalign': False, 'size': 16}}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_UC', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'same': False, 'congruent': 6, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_WC_ht'}}
{'src': {'same': False, 'congruent': 11, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 6, 'type': 'addresses_WC_ht'}}
{'src': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': True, 'congruent': 1, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 8}}
{'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 5, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 32}}
{'src': {'same': False, 'congruent': 2, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_WC_ht'}}
{'src': {'same': False, 'congruent': 11, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 5, 'type': 'addresses_normal_ht'}}
{'src': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 1}}
{'src': {'same': False, 'congruent': 0, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 2, 'type': 'addresses_D_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
*/
|
target/cos_117/disasm/iop_overlay1/BMXCON.asm | jrrk2/cray-sim | 49 | 162843 | <filename>target/cos_117/disasm/iop_overlay1/BMXCON.asm
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@ Load address 0x339A (for address 0 below)
@@
@@ OR[287]: local buffer pointer
@@
@@ We get called with this:
@@ So:
@@ OR[280] = 2 (probably CON$DEV)
@@ OR[281] = 0x10 (probably channel number)
@@ OR[282] = 0 (probably control unit ID)
@@ OR[283] = 0 (logical device ordinal)
@@ OR[284] = 0 (probably CON$ON)
@@ OR[285] = 0 (probably CON$UP)
@@ So: we're called to get logical device 0 on channel 020 ON and UP. We never return from the call, keep retrying...
0x0000 (0x000000) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0001 (0x000002) 0x291E- f:00024 d: 286 | OR[286] = A
0x0002 (0x000004) 0x291F- f:00024 d: 287 | OR[287] = A
0x0003 (0x000006) 0x2921- f:00024 d: 289 | OR[289] = A
0x0004 (0x000008) 0x2922- f:00024 d: 290 | OR[290] = A
0x0005 (0x00000A) 0x2923- f:00024 d: 291 | OR[291] = A
0x0006 (0x00000C) 0x2926- f:00024 d: 294 | OR[294] = A
0x0007 (0x00000E) 0x211F- f:00020 d: 287 | A = OR[287]
0x0008 (0x000010) 0x863D- f:00103 d: 61 | P = P + 61 (0x0045), A # 0
0x0009 (0x000012) 0x1018- f:00010 d: 24 | A = 24 (0x0018) @ Allocate 85 words of memory, return in OR[287]
0x000A (0x000014) 0x2933- f:00024 d: 307 | OR[307] = A
0x000B (0x000016) 0x1055- f:00010 d: 85 | A = 85 (0x0055)
0x000C (0x000018) 0x2934- f:00024 d: 308 | OR[308] = A
0x000D (0x00001A) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x000E (0x00001C) 0x2935- f:00024 d: 309 | OR[309] = A
0x000F (0x00001E) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0010 (0x000020) 0x2936- f:00024 d: 310 | OR[310] = A
0x0011 (0x000022) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0012 (0x000024) 0x2937- f:00024 d: 311 | OR[311] = A
0x0013 (0x000026) 0x111F- f:00010 d: 287 | A = 287 (0x011F)
0x0014 (0x000028) 0x2938- f:00024 d: 312 | OR[312] = A
0x0015 (0x00002A) 0x1133- f:00010 d: 307 | A = 307 (0x0133)
0x0016 (0x00002C) 0x5800- f:00054 d: 0 | B = A
0x0017 (0x00002E) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0018 (0x000030) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0019 (0x000032) 0x8602- f:00103 d: 2 | P = P + 2 (0x001B), A # 0
0x001A (0x000034) 0x702A- f:00070 d: 42 | P = P + 42 (0x0044)
0x001B (0x000036) 0x2006- f:00020 d: 6 | A = OR[6]
0x001C (0x000038) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x001D (0x00003A) 0x2908- f:00024 d: 264 | OR[264] = A
0x001E (0x00003C) 0x3108- f:00030 d: 264 | A = (OR[264])
0x001F (0x00003E) 0x120F- f:00011 d: 15 | A = A & 15 (0x000F)
0x0020 (0x000040) 0x290D- f:00024 d: 269 | OR[269] = A
0x0021 (0x000042) 0x210D- f:00020 d: 269 | A = OR[269]
0x0022 (0x000044) 0x2920- f:00024 d: 288 | OR[288] = A
0x0023 (0x000046) 0x1008- f:00010 d: 8 | A = 8 (0x0008)
0x0024 (0x000048) 0x290D- f:00024 d: 269 | OR[269] = A
0x0025 (0x00004A) 0x210D- f:00020 d: 269 | A = OR[269]
0x0026 (0x00004C) 0x120F- f:00011 d: 15 | A = A & 15 (0x000F)
0x0027 (0x00004E) 0x290D- f:00024 d: 269 | OR[269] = A
0x0028 (0x000050) 0x2006- f:00020 d: 6 | A = OR[6]
0x0029 (0x000052) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x002A (0x000054) 0x2908- f:00024 d: 264 | OR[264] = A
0x002B (0x000056) 0x3108- f:00030 d: 264 | A = (OR[264])
0x002C (0x000058) 0x1A00-0xFFF0 f:00015 d: 0 | A = A & 65520 (0xFFF0)
0x002E (0x00005C) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x002F (0x00005E) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0030 (0x000060) 0x1004- f:00010 d: 4 | A = 4 (0x0004) @ GIVEUP: yield control to higher-priority tasks
0x0031 (0x000062) 0x2933- f:00024 d: 307 | OR[307] = A
0x0032 (0x000064) 0x1133- f:00010 d: 307 | A = 307 (0x0133)
0x0033 (0x000066) 0x5800- f:00054 d: 0 | B = A
0x0034 (0x000068) 0x1800-0x3718 f:00014 d: 0 | A = 14104 (0x3718)
0x0036 (0x00006C) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0037 (0x00006E) 0x2120- f:00020 d: 288 | A = OR[288]
0x0038 (0x000070) 0x290D- f:00024 d: 269 | OR[269] = A
0x0039 (0x000072) 0x210D- f:00020 d: 269 | A = OR[269]
0x003A (0x000074) 0x120F- f:00011 d: 15 | A = A & 15 (0x000F)
0x003B (0x000076) 0x290D- f:00024 d: 269 | OR[269] = A
0x003C (0x000078) 0x2006- f:00020 d: 6 | A = OR[6]
0x003D (0x00007A) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x003E (0x00007C) 0x2908- f:00024 d: 264 | OR[264] = A
0x003F (0x00007E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0040 (0x000080) 0x1A00-0xFFF0 f:00015 d: 0 | A = A & 65520 (0xFFF0)
0x0042 (0x000084) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x0043 (0x000086) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0044 (0x000088) 0x723D- f:00071 d: 61 | P = P - 61 (0x0007)
0x0045 (0x00008A) 0x211F- f:00020 d: 287 | A = OR[287]
0x0046 (0x00008C) 0x1428- f:00012 d: 40 | A = A + 40 (0x0028)
0x0047 (0x00008E) 0x2928- f:00024 d: 296 | OR[296] = A
0x0048 (0x000090) 0x2128- f:00020 d: 296 | A = OR[296]
0x0049 (0x000092) 0x142C- f:00012 d: 44 | A = A + 44 (0x002C)
0x004A (0x000094) 0x2927- f:00024 d: 295 | OR[295] = A
0x004B (0x000096) 0x2128- f:00020 d: 296 | A = OR[296]
0x004C (0x000098) 0x290E- f:00024 d: 270 | OR[270] = A
0x004D (0x00009A) 0x102C- f:00010 d: 44 | A = 44 (0x002C)
0x004E (0x00009C) 0x290D- f:00024 d: 269 | OR[269] = A
0x004F (0x00009E) 0x210D- f:00020 d: 269 | A = OR[269]
0x0050 (0x0000A0) 0x8406- f:00102 d: 6 | P = P + 6 (0x0056), A = 0
0x0051 (0x0000A2) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0052 (0x0000A4) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x0053 (0x0000A6) 0x2F0D- f:00027 d: 269 | OR[269] = OR[269] - 1
0x0054 (0x0000A8) 0x2D0E- f:00026 d: 270 | OR[270] = OR[270] + 1
0x0055 (0x0000AA) 0x7206- f:00071 d: 6 | P = P - 6 (0x004F)
0x0056 (0x0000AC) 0x2118- f:00020 d: 280 | A = OR[280]
0x0057 (0x0000AE) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001)
0x0058 (0x0000B0) 0x8402- f:00102 d: 2 | P = P + 2 (0x005A), A = 0
0x0059 (0x0000B2) 0x708F- f:00070 d: 143 | P = P + 143 (0x00E8)
0x005A (0x0000B4) 0x7E03-0x02F2 f:00077 d: 3 | R = OR[3]+754 (0x02F2)
0x005C (0x0000B8) 0x211C- f:00020 d: 284 | A = OR[284]
0x005D (0x0000BA) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001)
0x005E (0x0000BC) 0x8402- f:00102 d: 2 | P = P + 2 (0x0060), A = 0
0x005F (0x0000BE) 0x7027- f:00070 d: 39 | P = P + 39 (0x0086)
0x0060 (0x0000C0) 0x2121- f:00020 d: 289 | A = OR[289]
0x0061 (0x0000C2) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x0062 (0x0000C4) 0x2908- f:00024 d: 264 | OR[264] = A
0x0063 (0x0000C6) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0064 (0x0000C8) 0x080F- f:00004 d: 15 | A = A > 15 (0x000F)
0x0065 (0x0000CA) 0x8402- f:00102 d: 2 | P = P + 2 (0x0067), A = 0
0x0066 (0x0000CC) 0x7014- f:00070 d: 20 | P = P + 20 (0x007A)
0x0067 (0x0000CE) 0x2121- f:00020 d: 289 | A = OR[289]
0x0068 (0x0000D0) 0x1408- f:00012 d: 8 | A = A + 8 (0x0008)
0x0069 (0x0000D2) 0x2908- f:00024 d: 264 | OR[264] = A
0x006A (0x0000D4) 0x3108- f:00030 d: 264 | A = (OR[264])
0x006B (0x0000D6) 0x2930- f:00024 d: 304 | OR[304] = A
0x006C (0x0000D8) 0x2130- f:00020 d: 304 | A = OR[304]
0x006D (0x0000DA) 0x840D- f:00102 d: 13 | P = P + 13 (0x007A), A = 0
0x006E (0x0000DC) 0x2130- f:00020 d: 304 | A = OR[304]
0x006F (0x0000DE) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x0070 (0x0000E0) 0x2908- f:00024 d: 264 | OR[264] = A
0x0071 (0x0000E2) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0072 (0x0000E4) 0x0E02- f:00007 d: 2 | A = A << 2 (0x0002)
0x0073 (0x0000E6) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001)
0x0074 (0x0000E8) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0075 (0x0000EA) 0x0C03- f:00006 d: 3 | A = A >> 3 (0x0003)
0x0076 (0x0000EC) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0077 (0x0000EE) 0x3130- f:00030 d: 304 | A = (OR[304])
0x0078 (0x0000F0) 0x2930- f:00024 d: 304 | OR[304] = A
0x0079 (0x0000F2) 0x720D- f:00071 d: 13 | P = P - 13 (0x006C)
0x007A (0x0000F4) 0x2121- f:00020 d: 289 | A = OR[289]
0x007B (0x0000F6) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x007C (0x0000F8) 0x2908- f:00024 d: 264 | OR[264] = A
0x007D (0x0000FA) 0x3108- f:00030 d: 264 | A = (OR[264])
0x007E (0x0000FC) 0x0A02- f:00005 d: 2 | A = A < 2 (0x0002)
0x007F (0x0000FE) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0080 (0x000100) 0x0C02- f:00006 d: 2 | A = A >> 2 (0x0002)
0x0081 (0x000102) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0082 (0x000104) 0x1800-0x0733 f:00014 d: 0 | A = 1843 (0x0733)
0x0084 (0x000108) 0x2926- f:00024 d: 294 | OR[294] = A
0x0085 (0x00010A) 0x7061- f:00070 d: 97 | P = P + 97 (0x00E6)
0x0086 (0x00010C) 0x211C- f:00020 d: 284 | A = OR[284]
0x0087 (0x00010E) 0x8402- f:00102 d: 2 | P = P + 2 (0x0089), A = 0
0x0088 (0x000110) 0x705E- f:00070 d: 94 | P = P + 94 (0x00E6)
0x0089 (0x000112) 0x2121- f:00020 d: 289 | A = OR[289]
0x008A (0x000114) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x008B (0x000116) 0x2908- f:00024 d: 264 | OR[264] = A
0x008C (0x000118) 0x3108- f:00030 d: 264 | A = (OR[264])
0x008D (0x00011A) 0x080F- f:00004 d: 15 | A = A > 15 (0x000F)
0x008E (0x00011C) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001)
0x008F (0x00011E) 0x8402- f:00102 d: 2 | P = P + 2 (0x0091), A = 0
0x0090 (0x000120) 0x704A- f:00070 d: 74 | P = P + 74 (0x00DA)
0x0091 (0x000122) 0x2121- f:00020 d: 289 | A = OR[289]
0x0092 (0x000124) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0093 (0x000126) 0x2908- f:00024 d: 264 | OR[264] = A
0x0094 (0x000128) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0095 (0x00012A) 0x2930- f:00024 d: 304 | OR[304] = A
0x0096 (0x00012C) 0x2121- f:00020 d: 289 | A = OR[289]
0x0097 (0x00012E) 0x140C- f:00012 d: 12 | A = A + 12 (0x000C)
0x0098 (0x000130) 0x2908- f:00024 d: 264 | OR[264] = A
0x0099 (0x000132) 0x3108- f:00030 d: 264 | A = (OR[264])
0x009A (0x000134) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x009B (0x000136) 0x2931- f:00024 d: 305 | OR[305] = A
0x009C (0x000138) 0x2130- f:00020 d: 304 | A = OR[304]
0x009D (0x00013A) 0x8402- f:00102 d: 2 | P = P + 2 (0x009F), A = 0
0x009E (0x00013C) 0x700B- f:00070 d: 11 | P = P + 11 (0x00A9)
0x009F (0x00013E) 0x2131- f:00020 d: 305 | A = OR[305]
0x00A0 (0x000140) 0x8402- f:00102 d: 2 | P = P + 2 (0x00A2), A = 0
0x00A1 (0x000142) 0x7008- f:00070 d: 8 | P = P + 8 (0x00A9)
0x00A2 (0x000144) 0x2121- f:00020 d: 289 | A = OR[289]
0x00A3 (0x000146) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x00A4 (0x000148) 0x2908- f:00024 d: 264 | OR[264] = A
0x00A5 (0x00014A) 0x2006- f:00020 d: 6 | A = OR[6]
0x00A6 (0x00014C) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x00A7 (0x00014E) 0x7E03-0x037C f:00077 d: 3 | R = OR[3]+892 (0x037C)
0x00A9 (0x000152) 0x2121- f:00020 d: 289 | A = OR[289]
0x00AA (0x000154) 0x1408- f:00012 d: 8 | A = A + 8 (0x0008)
0x00AB (0x000156) 0x2908- f:00024 d: 264 | OR[264] = A
0x00AC (0x000158) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00AD (0x00015A) 0x2930- f:00024 d: 304 | OR[304] = A
0x00AE (0x00015C) 0x2130- f:00020 d: 304 | A = OR[304]
0x00AF (0x00015E) 0x841C- f:00102 d: 28 | P = P + 28 (0x00CB), A = 0
0x00B0 (0x000160) 0x2130- f:00020 d: 304 | A = OR[304]
0x00B1 (0x000162) 0x1405- f:00012 d: 5 | A = A + 5 (0x0005)
0x00B2 (0x000164) 0x2908- f:00024 d: 264 | OR[264] = A
0x00B3 (0x000166) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00B4 (0x000168) 0x2931- f:00024 d: 305 | OR[305] = A
0x00B5 (0x00016A) 0x3131- f:00030 d: 305 | A = (OR[305])
0x00B6 (0x00016C) 0x8602- f:00103 d: 2 | P = P + 2 (0x00B8), A # 0
0x00B7 (0x00016E) 0x700A- f:00070 d: 10 | P = P + 10 (0x00C1)
0x00B8 (0x000170) 0x1002- f:00010 d: 2 | A = 2 (0x0002) @ POP: re-active a previously PUSHED activity
0x00B9 (0x000172) 0x2933- f:00024 d: 307 | OR[307] = A
0x00BA (0x000174) 0x2131- f:00020 d: 305 | A = OR[305]
0x00BB (0x000176) 0x1400- f:00012 d: 0 | A = A + 0 (0x0000)
0x00BC (0x000178) 0x2934- f:00024 d: 308 | OR[308] = A
0x00BD (0x00017A) 0x1133- f:00010 d: 307 | A = 307 (0x0133)
0x00BE (0x00017C) 0x5800- f:00054 d: 0 | B = A
0x00BF (0x00017E) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x00C0 (0x000180) 0x7C09- f:00076 d: 9 | R = OR[9]
0x00C1 (0x000182) 0x2130- f:00020 d: 304 | A = OR[304]
0x00C2 (0x000184) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x00C3 (0x000186) 0x2908- f:00024 d: 264 | OR[264] = A
0x00C4 (0x000188) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00C5 (0x00018A) 0x1A00-0xBFFF f:00015 d: 0 | A = A & 49151 (0xBFFF)
0x00C7 (0x00018E) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x00C8 (0x000190) 0x3130- f:00030 d: 304 | A = (OR[304])
0x00C9 (0x000192) 0x2930- f:00024 d: 304 | OR[304] = A
0x00CA (0x000194) 0x721C- f:00071 d: 28 | P = P - 28 (0x00AE)
0x00CB (0x000196) 0x2121- f:00020 d: 289 | A = OR[289]
0x00CC (0x000198) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x00CD (0x00019A) 0x2908- f:00024 d: 264 | OR[264] = A
0x00CE (0x00019C) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00CF (0x00019E) 0x8602- f:00103 d: 2 | P = P + 2 (0x00D1), A # 0
0x00D0 (0x0001A0) 0x700A- f:00070 d: 10 | P = P + 10 (0x00DA)
0x00D1 (0x0001A2) 0x1002- f:00010 d: 2 | A = 2 (0x0002) @ POP: re-active a previously PUSHED activity
0x00D2 (0x0001A4) 0x2933- f:00024 d: 307 | OR[307] = A
0x00D3 (0x0001A6) 0x2121- f:00020 d: 289 | A = OR[289]
0x00D4 (0x0001A8) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x00D5 (0x0001AA) 0x2934- f:00024 d: 308 | OR[308] = A
0x00D6 (0x0001AC) 0x1133- f:00010 d: 307 | A = 307 (0x0133)
0x00D7 (0x0001AE) 0x5800- f:00054 d: 0 | B = A
0x00D8 (0x0001B0) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x00D9 (0x0001B2) 0x7C09- f:00076 d: 9 | R = OR[9]
0x00DA (0x0001B4) 0x2121- f:00020 d: 289 | A = OR[289]
0x00DB (0x0001B6) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x00DC (0x0001B8) 0x2908- f:00024 d: 264 | OR[264] = A
0x00DD (0x0001BA) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00DE (0x0001BC) 0x0E01- f:00007 d: 1 | A = A << 1 (0x0001)
0x00DF (0x0001BE) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001)
0x00E0 (0x0001C0) 0x1400- f:00012 d: 0 | A = A + 0 (0x0000)
0x00E1 (0x0001C2) 0x0C02- f:00006 d: 2 | A = A >> 2 (0x0002)
0x00E2 (0x0001C4) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x00E3 (0x0001C6) 0x1800-0x072F f:00014 d: 0 | A = 1839 (0x072F)
0x00E5 (0x0001CA) 0x2926- f:00024 d: 294 | OR[294] = A
0x00E6 (0x0001CC) 0x7A03-0x026E f:00075 d: 3 | P = OR[3]+622 (0x026E)
0x00E8 (0x0001D0) 0x2118- f:00020 d: 280 | A = OR[280]
0x00E9 (0x0001D2) 0x1602- f:00013 d: 2 | A = A - 2 (0x0002)
0x00EA (0x0001D4) 0x8402- f:00102 d: 2 | P = P + 2 (0x00EC), A = 0
0x00EB (0x0001D6) 0x7088- f:00070 d: 136 | P = P + 136 (0x0173)
0x00EC (0x0001D8) 0x7E03-0x02F2 f:00077 d: 3 | R = OR[3]+754 (0x02F2)
0x00EE (0x0001DC) 0x7E03-0x0312 f:00077 d: 3 | R = OR[3]+786 (0x0312)
0x00F0 (0x0001E0) 0x211C- f:00020 d: 284 | A = OR[284]
0x00F1 (0x0001E2) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001)
0x00F2 (0x0001E4) 0x8402- f:00102 d: 2 | P = P + 2 (0x00F4), A = 0
0x00F3 (0x0001E6) 0x700D- f:00070 d: 13 | P = P + 13 (0x0100)
0x00F4 (0x0001E8) 0x2122- f:00020 d: 290 | A = OR[290]
0x00F5 (0x0001EA) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x00F6 (0x0001EC) 0x2908- f:00024 d: 264 | OR[264] = A
0x00F7 (0x0001EE) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00F8 (0x0001F0) 0x0A02- f:00005 d: 2 | A = A < 2 (0x0002)
0x00F9 (0x0001F2) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x00FA (0x0001F4) 0x0C02- f:00006 d: 2 | A = A >> 2 (0x0002)
0x00FB (0x0001F6) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x00FC (0x0001F8) 0x1800-0x0733 f:00014 d: 0 | A = 1843 (0x0733)
0x00FE (0x0001FC) 0x2926- f:00024 d: 294 | OR[294] = A
0x00FF (0x0001FE) 0x7072- f:00070 d: 114 | P = P + 114 (0x0171)
0x0100 (0x000200) 0x211C- f:00020 d: 284 | A = OR[284]
0x0101 (0x000202) 0x8402- f:00102 d: 2 | P = P + 2 (0x0103), A = 0
0x0102 (0x000204) 0x706F- f:00070 d: 111 | P = P + 111 (0x0171)
0x0103 (0x000206) 0x2122- f:00020 d: 290 | A = OR[290]
0x0104 (0x000208) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x0105 (0x00020A) 0x2908- f:00024 d: 264 | OR[264] = A
0x0106 (0x00020C) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0107 (0x00020E) 0x080F- f:00004 d: 15 | A = A > 15 (0x000F)
0x0108 (0x000210) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001)
0x0109 (0x000212) 0x8402- f:00102 d: 2 | P = P + 2 (0x010B), A = 0
0x010A (0x000214) 0x705B- f:00070 d: 91 | P = P + 91 (0x0165)
0x010B (0x000216) 0x2122- f:00020 d: 290 | A = OR[290]
0x010C (0x000218) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x010D (0x00021A) 0x2908- f:00024 d: 264 | OR[264] = A
0x010E (0x00021C) 0x3108- f:00030 d: 264 | A = (OR[264])
0x010F (0x00021E) 0x080E- f:00004 d: 14 | A = A > 14 (0x000E)
0x0110 (0x000220) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x0111 (0x000222) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001)
0x0112 (0x000224) 0x8402- f:00102 d: 2 | P = P + 2 (0x0114), A = 0
0x0113 (0x000226) 0x7009- f:00070 d: 9 | P = P + 9 (0x011C)
0x0114 (0x000228) 0x1800-0xFFEF f:00014 d: 0 | A = 65519 (0xFFEF)
0x0116 (0x00022C) 0x291E- f:00024 d: 286 | OR[286] = A
0x0117 (0x00022E) 0x1800-0x06F9 f:00014 d: 0 | A = 1785 (0x06F9)
0x0119 (0x000232) 0x2926- f:00024 d: 294 | OR[294] = A
0x011A (0x000234) 0x7A03-0x026E f:00075 d: 3 | P = OR[3]+622 (0x026E)
0x011C (0x000238) 0x2122- f:00020 d: 290 | A = OR[290]
0x011D (0x00023A) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x011E (0x00023C) 0x2908- f:00024 d: 264 | OR[264] = A
0x011F (0x00023E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0120 (0x000240) 0x8402- f:00102 d: 2 | P = P + 2 (0x0122), A = 0
0x0121 (0x000242) 0x7044- f:00070 d: 68 | P = P + 68 (0x0165)
0x0122 (0x000244) 0x2122- f:00020 d: 290 | A = OR[290]
0x0123 (0x000246) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x0124 (0x000248) 0x2908- f:00024 d: 264 | OR[264] = A
0x0125 (0x00024A) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0126 (0x00024C) 0x2924- f:00024 d: 292 | OR[292] = A
0x0127 (0x00024E) 0x7E03-0x0359 f:00077 d: 3 | R = OR[3]+857 (0x0359)
0x0129 (0x000252) 0x2123- f:00020 d: 291 | A = OR[291]
0x012A (0x000254) 0x8402- f:00102 d: 2 | P = P + 2 (0x012C), A = 0
0x012B (0x000256) 0x7009- f:00070 d: 9 | P = P + 9 (0x0134)
0x012C (0x000258) 0x1800-0xFFEF f:00014 d: 0 | A = 65519 (0xFFEF)
0x012E (0x00025C) 0x291E- f:00024 d: 286 | OR[286] = A
0x012F (0x00025E) 0x1800-0x070B f:00014 d: 0 | A = 1803 (0x070B)
0x0131 (0x000262) 0x2926- f:00024 d: 294 | OR[294] = A
0x0132 (0x000264) 0x7A03-0x026E f:00075 d: 3 | P = OR[3]+622 (0x026E)
0x0134 (0x000268) 0x2122- f:00020 d: 290 | A = OR[290]
0x0135 (0x00026A) 0x1405- f:00012 d: 5 | A = A + 5 (0x0005)
0x0136 (0x00026C) 0x2908- f:00024 d: 264 | OR[264] = A
0x0137 (0x00026E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0138 (0x000270) 0x2925- f:00024 d: 293 | OR[293] = A
0x0139 (0x000272) 0x2123- f:00020 d: 291 | A = OR[291]
0x013A (0x000274) 0x1406- f:00012 d: 6 | A = A + 6 (0x0006)
0x013B (0x000276) 0x2908- f:00024 d: 264 | OR[264] = A
0x013C (0x000278) 0x2006- f:00020 d: 6 | A = OR[6]
0x013D (0x00027A) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x013E (0x00027C) 0x2123- f:00020 d: 291 | A = OR[291]
0x013F (0x00027E) 0x1407- f:00012 d: 7 | A = A + 7 (0x0007)
0x0140 (0x000280) 0x2908- f:00024 d: 264 | OR[264] = A
0x0141 (0x000282) 0x2128- f:00020 d: 296 | A = OR[296]
0x0142 (0x000284) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0143 (0x000286) 0x2123- f:00020 d: 291 | A = OR[291]
0x0144 (0x000288) 0x1405- f:00012 d: 5 | A = A + 5 (0x0005)
0x0145 (0x00028A) 0x2908- f:00024 d: 264 | OR[264] = A
0x0146 (0x00028C) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0147 (0x00028E) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0148 (0x000290) 0x7E03-0x042B f:00077 d: 3 | R = OR[3]+1067 (0x042B)
0x014A (0x000294) 0x3125- f:00030 d: 293 | A = (OR[293])
0x014B (0x000296) 0x8602- f:00103 d: 2 | P = P + 2 (0x014D), A # 0
0x014C (0x000298) 0x700A- f:00070 d: 10 | P = P + 10 (0x0156)
0x014D (0x00029A) 0x1002- f:00010 d: 2 | A = 2 (0x0002) @ POP: re-active a previously PUSHED activity
0x014E (0x00029C) 0x2933- f:00024 d: 307 | OR[307] = A
0x014F (0x00029E) 0x2125- f:00020 d: 293 | A = OR[293]
0x0150 (0x0002A0) 0x1400- f:00012 d: 0 | A = A + 0 (0x0000)
0x0151 (0x0002A2) 0x2934- f:00024 d: 308 | OR[308] = A
0x0152 (0x0002A4) 0x1133- f:00010 d: 307 | A = 307 (0x0133)
0x0153 (0x0002A6) 0x5800- f:00054 d: 0 | B = A
0x0154 (0x0002A8) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0155 (0x0002AA) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0156 (0x0002AC) 0x2121- f:00020 d: 289 | A = OR[289]
0x0157 (0x0002AE) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x0158 (0x0002B0) 0x2908- f:00024 d: 264 | OR[264] = A
0x0159 (0x0002B2) 0x3108- f:00030 d: 264 | A = (OR[264])
0x015A (0x0002B4) 0x8602- f:00103 d: 2 | P = P + 2 (0x015C), A # 0
0x015B (0x0002B6) 0x700A- f:00070 d: 10 | P = P + 10 (0x0165)
0x015C (0x0002B8) 0x1002- f:00010 d: 2 | A = 2 (0x0002) @ POP: re-active a previously PUSHED activity
0x015D (0x0002BA) 0x2933- f:00024 d: 307 | OR[307] = A
0x015E (0x0002BC) 0x2121- f:00020 d: 289 | A = OR[289]
0x015F (0x0002BE) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x0160 (0x0002C0) 0x2934- f:00024 d: 308 | OR[308] = A
0x0161 (0x0002C2) 0x1133- f:00010 d: 307 | A = 307 (0x0133)
0x0162 (0x0002C4) 0x5800- f:00054 d: 0 | B = A
0x0163 (0x0002C6) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0164 (0x0002C8) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0165 (0x0002CA) 0x2122- f:00020 d: 290 | A = OR[290]
0x0166 (0x0002CC) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x0167 (0x0002CE) 0x2908- f:00024 d: 264 | OR[264] = A
0x0168 (0x0002D0) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0169 (0x0002D2) 0x0E01- f:00007 d: 1 | A = A << 1 (0x0001)
0x016A (0x0002D4) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001)
0x016B (0x0002D6) 0x1400- f:00012 d: 0 | A = A + 0 (0x0000)
0x016C (0x0002D8) 0x0C02- f:00006 d: 2 | A = A >> 2 (0x0002)
0x016D (0x0002DA) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x016E (0x0002DC) 0x1800-0x072F f:00014 d: 0 | A = 1839 (0x072F)
0x0170 (0x0002E0) 0x2926- f:00024 d: 294 | OR[294] = A
0x0171 (0x0002E2) 0x7A03-0x026E f:00075 d: 3 | P = OR[3]+622 (0x026E)
0x0173 (0x0002E6) 0x2118- f:00020 d: 280 | A = OR[280]
0x0174 (0x0002E8) 0x1603- f:00013 d: 3 | A = A - 3 (0x0003)
0x0175 (0x0002EA) 0x8403- f:00102 d: 3 | P = P + 3 (0x0178), A = 0
0x0176 (0x0002EC) 0x7A03-0x026E f:00075 d: 3 | P = OR[3]+622 (0x026E)
0x0178 (0x0002F0) 0x7E03-0x033A f:00077 d: 3 | R = OR[3]+826 (0x033A)
0x017A (0x0002F4) 0x211C- f:00020 d: 284 | A = OR[284]
0x017B (0x0002F6) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001)
0x017C (0x0002F8) 0x8402- f:00102 d: 2 | P = P + 2 (0x017E), A = 0
0x017D (0x0002FA) 0x7018- f:00070 d: 24 | P = P + 24 (0x0195)
0x017E (0x0002FC) 0x2123- f:00020 d: 291 | A = OR[291]
0x017F (0x0002FE) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0180 (0x000300) 0x2908- f:00024 d: 264 | OR[264] = A
0x0181 (0x000302) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0182 (0x000304) 0x0E02- f:00007 d: 2 | A = A << 2 (0x0002)
0x0183 (0x000306) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001)
0x0184 (0x000308) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0185 (0x00030A) 0x0C03- f:00006 d: 3 | A = A >> 3 (0x0003)
0x0186 (0x00030C) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0187 (0x00030E) 0x2123- f:00020 d: 291 | A = OR[291]
0x0188 (0x000310) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0189 (0x000312) 0x2908- f:00024 d: 264 | OR[264] = A
0x018A (0x000314) 0x3108- f:00030 d: 264 | A = (OR[264])
0x018B (0x000316) 0x0A02- f:00005 d: 2 | A = A < 2 (0x0002)
0x018C (0x000318) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x018D (0x00031A) 0x0C02- f:00006 d: 2 | A = A >> 2 (0x0002)
0x018E (0x00031C) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x018F (0x00031E) 0x1800-0x0733 f:00014 d: 0 | A = 1843 (0x0733)
0x0191 (0x000322) 0x2926- f:00024 d: 294 | OR[294] = A
0x0192 (0x000324) 0x7A03-0x026E f:00075 d: 3 | P = OR[3]+622 (0x026E)
0x0194 (0x000328) 0x7032- f:00070 d: 50 | P = P + 50 (0x01C6)
0x0195 (0x00032A) 0x211C- f:00020 d: 284 | A = OR[284]
0x0196 (0x00032C) 0x8402- f:00102 d: 2 | P = P + 2 (0x0198), A = 0
0x0197 (0x00032E) 0x702F- f:00070 d: 47 | P = P + 47 (0x01C6)
0x0198 (0x000330) 0x2123- f:00020 d: 291 | A = OR[291]
0x0199 (0x000332) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x019A (0x000334) 0x2908- f:00024 d: 264 | OR[264] = A
0x019B (0x000336) 0x3108- f:00030 d: 264 | A = (OR[264])
0x019C (0x000338) 0x080F- f:00004 d: 15 | A = A > 15 (0x000F)
0x019D (0x00033A) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001)
0x019E (0x00033C) 0x8402- f:00102 d: 2 | P = P + 2 (0x01A0), A = 0
0x019F (0x00033E) 0x7010- f:00070 d: 16 | P = P + 16 (0x01AF)
0x01A0 (0x000340) 0x211D- f:00020 d: 285 | A = OR[285]
0x01A1 (0x000342) 0x8402- f:00102 d: 2 | P = P + 2 (0x01A3), A = 0
0x01A2 (0x000344) 0x7005- f:00070 d: 5 | P = P + 5 (0x01A7)
0x01A3 (0x000346) 0x1800-0x0737 f:00014 d: 0 | A = 1847 (0x0737)
0x01A5 (0x00034A) 0x2926- f:00024 d: 294 | OR[294] = A
0x01A6 (0x00034C) 0x7008- f:00070 d: 8 | P = P + 8 (0x01AE)
0x01A7 (0x00034E) 0x211D- f:00020 d: 285 | A = OR[285]
0x01A8 (0x000350) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001)
0x01A9 (0x000352) 0x8402- f:00102 d: 2 | P = P + 2 (0x01AB), A = 0
0x01AA (0x000354) 0x7004- f:00070 d: 4 | P = P + 4 (0x01AE)
0x01AB (0x000356) 0x1800-0x073C f:00014 d: 0 | A = 1852 (0x073C)
0x01AD (0x00035A) 0x2926- f:00024 d: 294 | OR[294] = A
0x01AE (0x00035C) 0x700F- f:00070 d: 15 | P = P + 15 (0x01BD)
0x01AF (0x00035E) 0x211D- f:00020 d: 285 | A = OR[285]
0x01B0 (0x000360) 0x8402- f:00102 d: 2 | P = P + 2 (0x01B2), A = 0
0x01B1 (0x000362) 0x7005- f:00070 d: 5 | P = P + 5 (0x01B6)
0x01B2 (0x000364) 0x1800-0x0742 f:00014 d: 0 | A = 1858 (0x0742)
0x01B4 (0x000368) 0x2926- f:00024 d: 294 | OR[294] = A
0x01B5 (0x00036A) 0x7008- f:00070 d: 8 | P = P + 8 (0x01BD)
0x01B6 (0x00036C) 0x211D- f:00020 d: 285 | A = OR[285]
0x01B7 (0x00036E) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001)
0x01B8 (0x000370) 0x8402- f:00102 d: 2 | P = P + 2 (0x01BA), A = 0
0x01B9 (0x000372) 0x7004- f:00070 d: 4 | P = P + 4 (0x01BD)
0x01BA (0x000374) 0x1800-0x0744 f:00014 d: 0 | A = 1860 (0x0744)
0x01BC (0x000378) 0x2926- f:00024 d: 294 | OR[294] = A
0x01BD (0x00037A) 0x2123- f:00020 d: 291 | A = OR[291]
0x01BE (0x00037C) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x01BF (0x00037E) 0x2908- f:00024 d: 264 | OR[264] = A
0x01C0 (0x000380) 0x3108- f:00030 d: 264 | A = (OR[264])
0x01C1 (0x000382) 0x0E01- f:00007 d: 1 | A = A << 1 (0x0001)
0x01C2 (0x000384) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001)
0x01C3 (0x000386) 0x1400- f:00012 d: 0 | A = A + 0 (0x0000)
0x01C4 (0x000388) 0x0C02- f:00006 d: 2 | A = A >> 2 (0x0002)
0x01C5 (0x00038A) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x01C6 (0x00038C) 0x211D- f:00020 d: 285 | A = OR[285]
0x01C7 (0x00038E) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001)
0x01C8 (0x000390) 0x8402- f:00102 d: 2 | P = P + 2 (0x01CA), A = 0
0x01C9 (0x000392) 0x700C- f:00070 d: 12 | P = P + 12 (0x01D5)
0x01CA (0x000394) 0x2123- f:00020 d: 291 | A = OR[291]
0x01CB (0x000396) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x01CC (0x000398) 0x2908- f:00024 d: 264 | OR[264] = A
0x01CD (0x00039A) 0x3108- f:00030 d: 264 | A = (OR[264])
0x01CE (0x00039C) 0x0E02- f:00007 d: 2 | A = A << 2 (0x0002)
0x01CF (0x00039E) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001)
0x01D0 (0x0003A0) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x01D1 (0x0003A2) 0x0C03- f:00006 d: 3 | A = A >> 3 (0x0003)
0x01D2 (0x0003A4) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x01D3 (0x0003A6) 0x7A03-0x026E f:00075 d: 3 | P = OR[3]+622 (0x026E)
0x01D5 (0x0003AA) 0x211D- f:00020 d: 285 | A = OR[285]
0x01D6 (0x0003AC) 0x8403- f:00102 d: 3 | P = P + 3 (0x01D9), A = 0
0x01D7 (0x0003AE) 0x7A03-0x026E f:00075 d: 3 | P = OR[3]+622 (0x026E)
0x01D9 (0x0003B2) 0x2123- f:00020 d: 291 | A = OR[291]
0x01DA (0x0003B4) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x01DB (0x0003B6) 0x2908- f:00024 d: 264 | OR[264] = A
0x01DC (0x0003B8) 0x3108- f:00030 d: 264 | A = (OR[264])
0x01DD (0x0003BA) 0x080E- f:00004 d: 14 | A = A > 14 (0x000E)
0x01DE (0x0003BC) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x01DF (0x0003BE) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001)
0x01E0 (0x0003C0) 0x8403- f:00102 d: 3 | P = P + 3 (0x01E3), A = 0
0x01E1 (0x0003C2) 0x7A03-0x0267 f:00075 d: 3 | P = OR[3]+615 (0x0267)
0x01E3 (0x0003C6) 0x2123- f:00020 d: 291 | A = OR[291]
0x01E4 (0x0003C8) 0x1406- f:00012 d: 6 | A = A + 6 (0x0006)
0x01E5 (0x0003CA) 0x2908- f:00024 d: 264 | OR[264] = A
0x01E6 (0x0003CC) 0x3108- f:00030 d: 264 | A = (OR[264])
0x01E7 (0x0003CE) 0x8602- f:00103 d: 2 | P = P + 2 (0x01E9), A # 0
0x01E8 (0x0003D0) 0x7009- f:00070 d: 9 | P = P + 9 (0x01F1)
0x01E9 (0x0003D2) 0x1800-0xFFEF f:00014 d: 0 | A = 65519 (0xFFEF)
0x01EB (0x0003D6) 0x291E- f:00024 d: 286 | OR[286] = A
0x01EC (0x0003D8) 0x1800-0x06F2 f:00014 d: 0 | A = 1778 (0x06F2)
0x01EE (0x0003DC) 0x2926- f:00024 d: 294 | OR[294] = A
0x01EF (0x0003DE) 0x7A03-0x026E f:00075 d: 3 | P = OR[3]+622 (0x026E)
0x01F1 (0x0003E2) 0x2123- f:00020 d: 291 | A = OR[291]
0x01F2 (0x0003E4) 0x1406- f:00012 d: 6 | A = A + 6 (0x0006)
0x01F3 (0x0003E6) 0x2908- f:00024 d: 264 | OR[264] = A
0x01F4 (0x0003E8) 0x2006- f:00020 d: 6 | A = OR[6]
0x01F5 (0x0003EA) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x01F6 (0x0003EC) 0x2123- f:00020 d: 291 | A = OR[291]
0x01F7 (0x0003EE) 0x1407- f:00012 d: 7 | A = A + 7 (0x0007)
0x01F8 (0x0003F0) 0x2908- f:00024 d: 264 | OR[264] = A
0x01F9 (0x0003F2) 0x2128- f:00020 d: 296 | A = OR[296]
0x01FA (0x0003F4) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x01FB (0x0003F6) 0x2123- f:00020 d: 291 | A = OR[291]
0x01FC (0x0003F8) 0x1405- f:00012 d: 5 | A = A + 5 (0x0005)
0x01FD (0x0003FA) 0x2908- f:00024 d: 264 | OR[264] = A
0x01FE (0x0003FC) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x01FF (0x0003FE) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0200 (0x000400) 0x2123- f:00020 d: 291 | A = OR[291]
0x0201 (0x000402) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x0202 (0x000404) 0x2908- f:00024 d: 264 | OR[264] = A
0x0203 (0x000406) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0204 (0x000408) 0x2925- f:00024 d: 293 | OR[293] = A
0x0205 (0x00040A) 0x2125- f:00020 d: 293 | A = OR[293]
0x0206 (0x00040C) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x0207 (0x00040E) 0x2930- f:00024 d: 304 | OR[304] = A
0x0208 (0x000410) 0x2130- f:00020 d: 304 | A = OR[304]
0x0209 (0x000412) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x020A (0x000414) 0x2932- f:00024 d: 306 | OR[306] = A
0x020B (0x000416) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x020C (0x000418) 0x2931- f:00024 d: 305 | OR[305] = A
0x020D (0x00041A) 0x2131- f:00020 d: 305 | A = OR[305]
0x020E (0x00041C) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001)
0x020F (0x00041E) 0x841B- f:00102 d: 27 | P = P + 27 (0x022A), A = 0
0x0210 (0x000420) 0x2130- f:00020 d: 304 | A = OR[304]
0x0211 (0x000422) 0x2732- f:00023 d: 306 | A = A - OR[306]
0x0212 (0x000424) 0x8418- f:00102 d: 24 | P = P + 24 (0x022A), A = 0
0x0213 (0x000426) 0x3130- f:00030 d: 304 | A = (OR[304])
0x0214 (0x000428) 0x2922- f:00024 d: 290 | OR[290] = A
0x0215 (0x00042A) 0x8602- f:00103 d: 2 | P = P + 2 (0x0217), A # 0
0x0216 (0x00042C) 0x7012- f:00070 d: 18 | P = P + 18 (0x0228)
0x0217 (0x00042E) 0x2122- f:00020 d: 290 | A = OR[290]
0x0218 (0x000430) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x0219 (0x000432) 0x2908- f:00024 d: 264 | OR[264] = A
0x021A (0x000434) 0x3108- f:00030 d: 264 | A = (OR[264])
0x021B (0x000436) 0x080F- f:00004 d: 15 | A = A > 15 (0x000F)
0x021C (0x000438) 0x8402- f:00102 d: 2 | P = P + 2 (0x021E), A = 0
0x021D (0x00043A) 0x700B- f:00070 d: 11 | P = P + 11 (0x0228)
0x021E (0x00043C) 0x2122- f:00020 d: 290 | A = OR[290]
0x021F (0x00043E) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x0220 (0x000440) 0x2908- f:00024 d: 264 | OR[264] = A
0x0221 (0x000442) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0222 (0x000444) 0x080E- f:00004 d: 14 | A = A > 14 (0x000E)
0x0223 (0x000446) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x0224 (0x000448) 0x8402- f:00102 d: 2 | P = P + 2 (0x0226), A = 0
0x0225 (0x00044A) 0x7003- f:00070 d: 3 | P = P + 3 (0x0228)
0x0226 (0x00044C) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x0227 (0x00044E) 0x2931- f:00024 d: 305 | OR[305] = A
0x0228 (0x000450) 0x2D30- f:00026 d: 304 | OR[304] = OR[304] + 1
0x0229 (0x000452) 0x721C- f:00071 d: 28 | P = P - 28 (0x020D)
0x022A (0x000454) 0x2131- f:00020 d: 305 | A = OR[305]
0x022B (0x000456) 0x8402- f:00102 d: 2 | P = P + 2 (0x022D), A = 0
0x022C (0x000458) 0x7008- f:00070 d: 8 | P = P + 8 (0x0234)
0x022D (0x00045A) 0x1800-0xFFEF f:00014 d: 0 | A = 65519 (0xFFEF)
0x022F (0x00045E) 0x291E- f:00024 d: 286 | OR[286] = A
0x0230 (0x000460) 0x1800-0x06F2 f:00014 d: 0 | A = 1778 (0x06F2)
0x0232 (0x000464) 0x2926- f:00024 d: 294 | OR[294] = A
0x0233 (0x000466) 0x7035- f:00070 d: 53 | P = P + 53 (0x0268)
0x0234 (0x000468) 0x1028- f:00010 d: 40 | A = 40 (0x0028) @ Call BMXAIO
0x0235 (0x00046A) 0x2933- f:00024 d: 307 | OR[307] = A
0x0236 (0x00046C) 0x1800-0x0065 f:00014 d: 0 | A = 101 (0x0065)
0x0238 (0x000470) 0x2934- f:00024 d: 308 | OR[308] = A
0x0239 (0x000472) 0x1038- f:00010 d: 56 | A = 56 (0x0038)
0x023A (0x000474) 0x2935- f:00024 d: 309 | OR[309] = A
0x023B (0x000476) 0x2128- f:00020 d: 296 | A = OR[296]
0x023C (0x000478) 0x2936- f:00024 d: 310 | OR[310] = A
0x023D (0x00047A) 0x211B- f:00020 d: 283 | A = OR[283]
0x023E (0x00047C) 0x2937- f:00024 d: 311 | OR[311] = A
0x023F (0x00047E) 0x1002- f:00010 d: 2 | A = 2 (0x0002)
0x0240 (0x000480) 0x2938- f:00024 d: 312 | OR[312] = A
0x0241 (0x000482) 0x1133- f:00010 d: 307 | A = 307 (0x0133)
0x0242 (0x000484) 0x5800- f:00054 d: 0 | B = A
0x0243 (0x000486) 0x1800-0x3718 f:00014 d: 0 | A = 14104 (0x3718)
0x0245 (0x00048A) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0246 (0x00048C) 0x8602- f:00103 d: 2 | P = P + 2 (0x0248), A # 0
0x0247 (0x00048E) 0x7008- f:00070 d: 8 | P = P + 8 (0x024F)
0x0248 (0x000490) 0x1800-0xFFEF f:00014 d: 0 | A = 65519 (0xFFEF)
0x024A (0x000494) 0x291E- f:00024 d: 286 | OR[286] = A
0x024B (0x000496) 0x1800-0x06F2 f:00014 d: 0 | A = 1778 (0x06F2)
0x024D (0x00049A) 0x2926- f:00024 d: 294 | OR[294] = A
0x024E (0x00049C) 0x701A- f:00070 d: 26 | P = P + 26 (0x0268)
0x024F (0x00049E) 0x7E03-0x04DB f:00077 d: 3 | R = OR[3]+1243 (0x04DB)
0x0251 (0x0004A2) 0x100F- f:00010 d: 15 | A = 15 (0x000F)
0x0252 (0x0004A4) 0x1609- f:00013 d: 9 | A = A - 9 (0x0009)
0x0253 (0x0004A6) 0x120F- f:00011 d: 15 | A = A & 15 (0x000F)
0x0254 (0x0004A8) 0x5800- f:00054 d: 0 | B = A
0x0255 (0x0004AA) 0x1009- f:00010 d: 9 | A = 9 (0x0009)
0x0256 (0x0004AC) 0x0804- f:00004 d: 4 | A = A > 4 (0x0004)
0x0257 (0x0004AE) 0x251F- f:00022 d: 287 | A = A + OR[287]
0x0258 (0x0004B0) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x0259 (0x0004B2) 0x290D- f:00024 d: 269 | OR[269] = A
0x025A (0x0004B4) 0x310D- f:00030 d: 269 | A = (OR[269])
0x025B (0x0004B6) 0x4800- f:00044 d: 0 | A = A > B
0x025C (0x0004B8) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x025D (0x0004BA) 0x8602- f:00103 d: 2 | P = P + 2 (0x025F), A # 0
0x025E (0x0004BC) 0x7003- f:00070 d: 3 | P = P + 3 (0x0261)
0x025F (0x0004BE) 0x7E03-0x04A7 f:00077 d: 3 | R = OR[3]+1191 (0x04A7)
0x0261 (0x0004C2) 0x2123- f:00020 d: 291 | A = OR[291]
0x0262 (0x0004C4) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0263 (0x0004C6) 0x2908- f:00024 d: 264 | OR[264] = A
0x0264 (0x0004C8) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0265 (0x0004CA) 0x1A00-0xBFFF f:00015 d: 0 | A = A & 49151 (0xBFFF)
0x0267 (0x0004CE) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0268 (0x0004D0) 0x2118- f:00020 d: 280 | A = OR[280]
0x0269 (0x0004D2) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001)
0x026A (0x0004D4) 0x8402- f:00102 d: 2 | P = P + 2 (0x026C), A = 0
0x026B (0x0004D6) 0x7015- f:00070 d: 21 | P = P + 21 (0x0280)
0x026C (0x0004D8) 0x2121- f:00020 d: 289 | A = OR[289]
0x026D (0x0004DA) 0x8602- f:00103 d: 2 | P = P + 2 (0x026F), A # 0
0x026E (0x0004DC) 0x7012- f:00070 d: 18 | P = P + 18 (0x0280)
0x026F (0x0004DE) 0x2121- f:00020 d: 289 | A = OR[289]
0x0270 (0x0004E0) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0271 (0x0004E2) 0x2908- f:00024 d: 264 | OR[264] = A
0x0272 (0x0004E4) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0273 (0x0004E6) 0x2606- f:00023 d: 6 | A = A - OR[6]
0x0274 (0x0004E8) 0x8402- f:00102 d: 2 | P = P + 2 (0x0276), A = 0
0x0275 (0x0004EA) 0x700B- f:00070 d: 11 | P = P + 11 (0x0280)
0x0276 (0x0004EC) 0x2121- f:00020 d: 289 | A = OR[289]
0x0277 (0x0004EE) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0278 (0x0004F0) 0x2908- f:00024 d: 264 | OR[264] = A
0x0279 (0x0004F2) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x027A (0x0004F4) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x027B (0x0004F6) 0x2121- f:00020 d: 289 | A = OR[289]
0x027C (0x0004F8) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x027D (0x0004FA) 0x2908- f:00024 d: 264 | OR[264] = A
0x027E (0x0004FC) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x027F (0x0004FE) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0280 (0x000500) 0x2123- f:00020 d: 291 | A = OR[291]
0x0281 (0x000502) 0x8602- f:00103 d: 2 | P = P + 2 (0x0283), A # 0
0x0282 (0x000504) 0x7052- f:00070 d: 82 | P = P + 82 (0x02D4)
0x0283 (0x000506) 0x2123- f:00020 d: 291 | A = OR[291]
0x0284 (0x000508) 0x1406- f:00012 d: 6 | A = A + 6 (0x0006)
0x0285 (0x00050A) 0x2908- f:00024 d: 264 | OR[264] = A
0x0286 (0x00050C) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0287 (0x00050E) 0x2606- f:00023 d: 6 | A = A - OR[6]
0x0288 (0x000510) 0x8402- f:00102 d: 2 | P = P + 2 (0x028A), A = 0
0x0289 (0x000512) 0x704B- f:00070 d: 75 | P = P + 75 (0x02D4)
0x028A (0x000514) 0x2123- f:00020 d: 291 | A = OR[291]
0x028B (0x000516) 0x1405- f:00012 d: 5 | A = A + 5 (0x0005)
0x028C (0x000518) 0x2908- f:00024 d: 264 | OR[264] = A
0x028D (0x00051A) 0x3108- f:00030 d: 264 | A = (OR[264])
0x028E (0x00051C) 0x0807- f:00004 d: 7 | A = A > 7 (0x0007)
0x028F (0x00051E) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x0290 (0x000520) 0x8402- f:00102 d: 2 | P = P + 2 (0x0292), A = 0
0x0291 (0x000522) 0x7043- f:00070 d: 67 | P = P + 67 (0x02D4)
0x0292 (0x000524) 0x2123- f:00020 d: 291 | A = OR[291]
0x0293 (0x000526) 0x1406- f:00012 d: 6 | A = A + 6 (0x0006)
0x0294 (0x000528) 0x2908- f:00024 d: 264 | OR[264] = A
0x0295 (0x00052A) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0296 (0x00052C) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0297 (0x00052E) 0x2123- f:00020 d: 291 | A = OR[291]
0x0298 (0x000530) 0x1407- f:00012 d: 7 | A = A + 7 (0x0007)
0x0299 (0x000532) 0x2908- f:00024 d: 264 | OR[264] = A
0x029A (0x000534) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x029B (0x000536) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x029C (0x000538) 0x2123- f:00020 d: 291 | A = OR[291]
0x029D (0x00053A) 0x1405- f:00012 d: 5 | A = A + 5 (0x0005)
0x029E (0x00053C) 0x2908- f:00024 d: 264 | OR[264] = A
0x029F (0x00053E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x02A0 (0x000540) 0x0806- f:00004 d: 6 | A = A > 6 (0x0006)
0x02A1 (0x000542) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x02A2 (0x000544) 0x8602- f:00103 d: 2 | P = P + 2 (0x02A4), A # 0
0x02A3 (0x000546) 0x7031- f:00070 d: 49 | P = P + 49 (0x02D4)
0x02A4 (0x000548) 0x2123- f:00020 d: 291 | A = OR[291]
0x02A5 (0x00054A) 0x1405- f:00012 d: 5 | A = A + 5 (0x0005)
0x02A6 (0x00054C) 0x2908- f:00024 d: 264 | OR[264] = A
0x02A7 (0x00054E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x02A8 (0x000550) 0x1A00-0xFFBF f:00015 d: 0 | A = A & 65471 (0xFFBF)
0x02AA (0x000554) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x02AB (0x000556) 0x2123- f:00020 d: 291 | A = OR[291]
0x02AC (0x000558) 0x140A- f:00012 d: 10 | A = A + 10 (0x000A)
0x02AD (0x00055A) 0x2908- f:00024 d: 264 | OR[264] = A
0x02AE (0x00055C) 0x3108- f:00030 d: 264 | A = (OR[264])
0x02AF (0x00055E) 0x2930- f:00024 d: 304 | OR[304] = A
0x02B0 (0x000560) 0x3130- f:00030 d: 304 | A = (OR[304])
0x02B1 (0x000562) 0x2930- f:00024 d: 304 | OR[304] = A
0x02B2 (0x000564) 0x2130- f:00020 d: 304 | A = OR[304]
0x02B3 (0x000566) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x02B4 (0x000568) 0x2908- f:00024 d: 264 | OR[264] = A
0x02B5 (0x00056A) 0x3108- f:00030 d: 264 | A = (OR[264])
0x02B6 (0x00056C) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x02B7 (0x00056E) 0x2931- f:00024 d: 305 | OR[305] = A
0x02B8 (0x000570) 0x1800-0x0E67 f:00014 d: 0 | A = 3687 (0x0E67)
0x02BA (0x000574) 0x2908- f:00024 d: 264 | OR[264] = A
0x02BB (0x000576) 0x2131- f:00020 d: 305 | A = OR[305]
0x02BC (0x000578) 0x1610- f:00013 d: 16 | A = A - 16 (0x0010)
0x02BD (0x00057A) 0x3508- f:00032 d: 264 | A = A + (OR[264])
0x02BE (0x00057C) 0x2931- f:00024 d: 305 | OR[305] = A
0x02BF (0x00057E) 0x3131- f:00030 d: 305 | A = (OR[305])
0x02C0 (0x000580) 0x2931- f:00024 d: 305 | OR[305] = A
0x02C1 (0x000582) 0x2131- f:00020 d: 305 | A = OR[305]
0x02C2 (0x000584) 0x140C- f:00012 d: 12 | A = A + 12 (0x000C)
0x02C3 (0x000586) 0x290D- f:00024 d: 269 | OR[269] = A
0x02C4 (0x000588) 0x310D- f:00030 d: 269 | A = (OR[269])
0x02C5 (0x00058A) 0x290E- f:00024 d: 270 | OR[270] = A
0x02C6 (0x00058C) 0x210E- f:00020 d: 270 | A = OR[270]
0x02C7 (0x00058E) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x02C8 (0x000590) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001)
0x02C9 (0x000592) 0x290F- f:00024 d: 271 | OR[271] = A
0x02CA (0x000594) 0x210F- f:00020 d: 271 | A = OR[271]
0x02CB (0x000596) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x02CC (0x000598) 0x290F- f:00024 d: 271 | OR[271] = A
0x02CD (0x00059A) 0x210E- f:00020 d: 270 | A = OR[270]
0x02CE (0x00059C) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x02D0 (0x0005A0) 0x250F- f:00022 d: 271 | A = A + OR[271]
0x02D1 (0x0005A2) 0x290E- f:00024 d: 270 | OR[270] = A
0x02D2 (0x0005A4) 0x390D- f:00034 d: 269 | (OR[269]) = A
0x02D3 (0x0005A6) 0x210F- f:00020 d: 271 | A = OR[271]
0x02D4 (0x0005A8) 0x7E03-0x0540 f:00077 d: 3 | R = OR[3]+1344 (0x0540)
0x02D6 (0x0005AC) 0x211F- f:00020 d: 287 | A = OR[287]
0x02D7 (0x0005AE) 0x8602- f:00103 d: 2 | P = P + 2 (0x02D9), A # 0
0x02D8 (0x0005B0) 0x7009- f:00070 d: 9 | P = P + 9 (0x02E1)
0x02D9 (0x0005B2) 0x1019- f:00010 d: 25 | A = 25 (0x0019) @ Free up local buffer in OR[287]
0x02DA (0x0005B4) 0x2933- f:00024 d: 307 | OR[307] = A
0x02DB (0x0005B6) 0x211F- f:00020 d: 287 | A = OR[287]
0x02DC (0x0005B8) 0x2934- f:00024 d: 308 | OR[308] = A
0x02DD (0x0005BA) 0x1133- f:00010 d: 307 | A = 307 (0x0133)
0x02DE (0x0005BC) 0x5800- f:00054 d: 0 | B = A
0x02DF (0x0005BE) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x02E0 (0x0005C0) 0x7C09- f:00076 d: 9 | R = OR[9]
0x02E1 (0x0005C2) 0x2005- f:00020 d: 5 | A = OR[5]
0x02E2 (0x0005C4) 0x1406- f:00012 d: 6 | A = A + 6 (0x0006)
0x02E3 (0x0005C6) 0x2908- f:00024 d: 264 | OR[264] = A
0x02E4 (0x0005C8) 0x211E- f:00020 d: 286 | A = OR[286]
0x02E5 (0x0005CA) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x02E6 (0x0005CC) 0x102A- f:00010 d: 42 | A = 42 (0x002A) @ RETURN from overlay
0x02E7 (0x0005CE) 0x2933- f:00024 d: 307 | OR[307] = A
0x02E8 (0x0005D0) 0x1133- f:00010 d: 307 | A = 307 (0x0133)
0x02E9 (0x0005D2) 0x5800- f:00054 d: 0 | B = A
0x02EA (0x0005D4) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x02EB (0x0005D6) 0x7C09- f:00076 d: 9 | R = OR[9]
0x02EC (0x0005D8) 0x1800-0x0E67 f:00014 d: 0 | A = 3687 (0x0E67)
0x02EE (0x0005DC) 0x2908- f:00024 d: 264 | OR[264] = A
0x02EF (0x0005DE) 0x3108- f:00030 d: 264 | A = (OR[264])
0x02F0 (0x0005E0) 0x8402- f:00102 d: 2 | P = P + 2 (0x02F2), A = 0
0x02F1 (0x0005E2) 0x7008- f:00070 d: 8 | P = P + 8 (0x02F9)
0x02F2 (0x0005E4) 0x1800-0xFFFE f:00014 d: 0 | A = 65534 (0xFFFE)
0x02F4 (0x0005E8) 0x291E- f:00024 d: 286 | OR[286] = A
0x02F5 (0x0005EA) 0x1800-0x06EA f:00014 d: 0 | A = 1770 (0x06EA)
0x02F7 (0x0005EE) 0x2926- f:00024 d: 294 | OR[294] = A
0x02F8 (0x0005F0) 0x7290- f:00071 d: 144 | P = P - 144 (0x0268)
0x02F9 (0x0005F2) 0x1800-0x0E67 f:00014 d: 0 | A = 3687 (0x0E67)
0x02FB (0x0005F6) 0x2908- f:00024 d: 264 | OR[264] = A
0x02FC (0x0005F8) 0x2119- f:00020 d: 281 | A = OR[281]
0x02FD (0x0005FA) 0x1610- f:00013 d: 16 | A = A - 16 (0x0010)
0x02FE (0x0005FC) 0x3508- f:00032 d: 264 | A = A + (OR[264])
0x02FF (0x0005FE) 0x2921- f:00024 d: 289 | OR[289] = A
0x0300 (0x000600) 0x3121- f:00030 d: 289 | A = (OR[289])
0x0301 (0x000602) 0x2921- f:00024 d: 289 | OR[289] = A
0x0302 (0x000604) 0x8402- f:00102 d: 2 | P = P + 2 (0x0304), A = 0
0x0303 (0x000606) 0x7008- f:00070 d: 8 | P = P + 8 (0x030B)
0x0304 (0x000608) 0x1800-0xFFFE f:00014 d: 0 | A = 65534 (0xFFFE)
0x0306 (0x00060C) 0x291E- f:00024 d: 286 | OR[286] = A
0x0307 (0x00060E) 0x1800-0x06EA f:00014 d: 0 | A = 1770 (0x06EA)
0x0309 (0x000612) 0x2926- f:00024 d: 294 | OR[294] = A
0x030A (0x000614) 0x72A2- f:00071 d: 162 | P = P - 162 (0x0268)
0x030B (0x000616) 0x0200- f:00001 d: 0 | EXIT
0x030C (0x000618) 0x1800-0xFFFF f:00014 d: 0 | A = 65535 (0xFFFF)
0x030E (0x00061C) 0x2930- f:00024 d: 304 | OR[304] = A
0x030F (0x00061E) 0x2121- f:00020 d: 289 | A = OR[289]
0x0310 (0x000620) 0x1408- f:00012 d: 8 | A = A + 8 (0x0008)
0x0311 (0x000622) 0x2908- f:00024 d: 264 | OR[264] = A
0x0312 (0x000624) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0313 (0x000626) 0x2922- f:00024 d: 290 | OR[290] = A
0x0314 (0x000628) 0x2122- f:00020 d: 290 | A = OR[290]
0x0315 (0x00062A) 0x8414- f:00102 d: 20 | P = P + 20 (0x0329), A = 0
0x0316 (0x00062C) 0x2130- f:00020 d: 304 | A = OR[304]
0x0317 (0x00062E) 0x271A- f:00023 d: 282 | A = A - OR[282]
0x0318 (0x000630) 0x8411- f:00102 d: 17 | P = P + 17 (0x0329), A = 0
0x0319 (0x000632) 0x2122- f:00020 d: 290 | A = OR[290]
0x031A (0x000634) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x031B (0x000636) 0x2908- f:00024 d: 264 | OR[264] = A
0x031C (0x000638) 0x3108- f:00030 d: 264 | A = (OR[264])
0x031D (0x00063A) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x031E (0x00063C) 0x2930- f:00024 d: 304 | OR[304] = A
0x031F (0x00063E) 0x2130- f:00020 d: 304 | A = OR[304]
0x0320 (0x000640) 0x0804- f:00004 d: 4 | A = A > 4 (0x0004)
0x0321 (0x000642) 0x2930- f:00024 d: 304 | OR[304] = A
0x0322 (0x000644) 0x2130- f:00020 d: 304 | A = OR[304]
0x0323 (0x000646) 0x271A- f:00023 d: 282 | A = A - OR[282]
0x0324 (0x000648) 0x8602- f:00103 d: 2 | P = P + 2 (0x0326), A # 0
0x0325 (0x00064A) 0x7003- f:00070 d: 3 | P = P + 3 (0x0328)
0x0326 (0x00064C) 0x3122- f:00030 d: 290 | A = (OR[290])
0x0327 (0x00064E) 0x2922- f:00024 d: 290 | OR[290] = A
0x0328 (0x000650) 0x7214- f:00071 d: 20 | P = P - 20 (0x0314)
0x0329 (0x000652) 0x2122- f:00020 d: 290 | A = OR[290]
0x032A (0x000654) 0x8402- f:00102 d: 2 | P = P + 2 (0x032C), A = 0
0x032B (0x000656) 0x7008- f:00070 d: 8 | P = P + 8 (0x0333)
0x032C (0x000658) 0x1800-0xFFFE f:00014 d: 0 | A = 65534 (0xFFFE)
0x032E (0x00065C) 0x291E- f:00024 d: 286 | OR[286] = A
0x032F (0x00065E) 0x1800-0x06EA f:00014 d: 0 | A = 1770 (0x06EA)
0x0331 (0x000662) 0x2926- f:00024 d: 294 | OR[294] = A
0x0332 (0x000664) 0x72CA- f:00071 d: 202 | P = P - 202 (0x0268)
0x0333 (0x000666) 0x0200- f:00001 d: 0 | EXIT
0x0334 (0x000668) 0x1800-0x0E68 f:00014 d: 0 | A = 3688 (0x0E68)
0x0336 (0x00066C) 0x2908- f:00024 d: 264 | OR[264] = A
0x0337 (0x00066E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0338 (0x000670) 0x8402- f:00102 d: 2 | P = P + 2 (0x033A), A = 0
0x0339 (0x000672) 0x7008- f:00070 d: 8 | P = P + 8 (0x0341)
0x033A (0x000674) 0x1800-0xFFFE f:00014 d: 0 | A = 65534 (0xFFFE)
0x033C (0x000678) 0x291E- f:00024 d: 286 | OR[286] = A
0x033D (0x00067A) 0x1800-0x06EA f:00014 d: 0 | A = 1770 (0x06EA)
0x033F (0x00067E) 0x2926- f:00024 d: 294 | OR[294] = A
0x0340 (0x000680) 0x72D8- f:00071 d: 216 | P = P - 216 (0x0268)
0x0341 (0x000682) 0x1800-0x0E68 f:00014 d: 0 | A = 3688 (0x0E68)
0x0343 (0x000686) 0x2908- f:00024 d: 264 | OR[264] = A
0x0344 (0x000688) 0x211B- f:00020 d: 283 | A = OR[283]
0x0345 (0x00068A) 0x3508- f:00032 d: 264 | A = A + (OR[264])
0x0346 (0x00068C) 0x2923- f:00024 d: 291 | OR[291] = A
0x0347 (0x00068E) 0x3123- f:00030 d: 291 | A = (OR[291])
0x0348 (0x000690) 0x2923- f:00024 d: 291 | OR[291] = A
0x0349 (0x000692) 0x8402- f:00102 d: 2 | P = P + 2 (0x034B), A = 0
0x034A (0x000694) 0x7008- f:00070 d: 8 | P = P + 8 (0x0352)
0x034B (0x000696) 0x1800-0xFFFE f:00014 d: 0 | A = 65534 (0xFFFE)
0x034D (0x00069A) 0x291E- f:00024 d: 286 | OR[286] = A
0x034E (0x00069C) 0x1800-0x06EA f:00014 d: 0 | A = 1770 (0x06EA)
0x0350 (0x0006A0) 0x2926- f:00024 d: 294 | OR[294] = A
0x0351 (0x0006A2) 0x72E9- f:00071 d: 233 | P = P - 233 (0x0268)
0x0352 (0x0006A4) 0x0200- f:00001 d: 0 | EXIT
0x0353 (0x0006A6) 0x2124- f:00020 d: 292 | A = OR[292]
0x0354 (0x0006A8) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0355 (0x0006AA) 0x2913- f:00024 d: 275 | OR[275] = A
0x0356 (0x0006AC) 0x2113- f:00020 d: 275 | A = OR[275]
0x0357 (0x0006AE) 0x1410- f:00012 d: 16 | A = A + 16 (0x0010)
0x0358 (0x0006B0) 0x2914- f:00024 d: 276 | OR[276] = A
0x0359 (0x0006B2) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x035A (0x0006B4) 0x2923- f:00024 d: 291 | OR[291] = A
0x035B (0x0006B6) 0x2123- f:00020 d: 291 | A = OR[291]
0x035C (0x0006B8) 0x8619- f:00103 d: 25 | P = P + 25 (0x0375), A # 0
0x035D (0x0006BA) 0x2113- f:00020 d: 275 | A = OR[275]
0x035E (0x0006BC) 0x2714- f:00023 d: 276 | A = A - OR[276]
0x035F (0x0006BE) 0x8416- f:00102 d: 22 | P = P + 22 (0x0375), A = 0
0x0360 (0x0006C0) 0x3113- f:00030 d: 275 | A = (OR[275])
0x0361 (0x0006C2) 0x2923- f:00024 d: 291 | OR[291] = A
0x0362 (0x0006C4) 0x2123- f:00020 d: 291 | A = OR[291]
0x0363 (0x0006C6) 0x8602- f:00103 d: 2 | P = P + 2 (0x0365), A # 0
0x0364 (0x0006C8) 0x700F- f:00070 d: 15 | P = P + 15 (0x0373)
0x0365 (0x0006CA) 0x2123- f:00020 d: 291 | A = OR[291]
0x0366 (0x0006CC) 0x1406- f:00012 d: 6 | A = A + 6 (0x0006)
0x0367 (0x0006CE) 0x2908- f:00024 d: 264 | OR[264] = A
0x0368 (0x0006D0) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0369 (0x0006D2) 0x2915- f:00024 d: 277 | OR[277] = A
0x036A (0x0006D4) 0x2115- f:00020 d: 277 | A = OR[277]
0x036B (0x0006D6) 0x8602- f:00103 d: 2 | P = P + 2 (0x036D), A # 0
0x036C (0x0006D8) 0x7004- f:00070 d: 4 | P = P + 4 (0x0370)
0x036D (0x0006DA) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x036E (0x0006DC) 0x2923- f:00024 d: 291 | OR[291] = A
0x036F (0x0006DE) 0x7004- f:00070 d: 4 | P = P + 4 (0x0373)
0x0370 (0x0006E0) 0x3123- f:00030 d: 291 | A = (OR[291])
0x0371 (0x0006E2) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0372 (0x0006E4) 0x291B- f:00024 d: 283 | OR[283] = A
0x0373 (0x0006E6) 0x2D13- f:00026 d: 275 | OR[275] = OR[275] + 1
0x0374 (0x0006E8) 0x7219- f:00071 d: 25 | P = P - 25 (0x035B)
0x0375 (0x0006EA) 0x0200- f:00001 d: 0 | EXIT
0x0376 (0x0006EC) 0x2119- f:00020 d: 281 | A = OR[281]
0x0377 (0x0006EE) 0x5800- f:00054 d: 0 | B = A
0x0378 (0x0006F0) 0xEC00- f:00166 d: 0 | IOB , fn006
0x0379 (0x0006F2) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x037A (0x0006F4) 0xFC00- f:00176 d: 0 | IOB , fn016
0x037B (0x0006F6) 0x0000- f:00000 d: 0 | PASS
0x037C (0x0006F8) 0xE000- f:00160 d: 0 | IOB , fn000
0x037D (0x0006FA) 0x2121- f:00020 d: 289 | A = OR[289]
0x037E (0x0006FC) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x037F (0x0006FE) 0x2908- f:00024 d: 264 | OR[264] = A
0x0380 (0x000700) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0381 (0x000702) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0382 (0x000704) 0xEA00- f:00165 d: 0 | IOB , fn005
0x0383 (0x000706) 0x7E03-0x0409 f:00077 d: 3 | R = OR[3]+1033 (0x0409)
0x0385 (0x00070A) 0x1003- f:00010 d: 3 | A = 3 (0x0003)
0x0386 (0x00070C) 0xE200- f:00161 d: 0 | IOB , fn001
0x0387 (0x00070E) 0x7E03-0x0409 f:00077 d: 3 | R = OR[3]+1033 (0x0409)
0x0389 (0x000712) 0x1800-0xA5A5 f:00014 d: 0 | A = 42405 (0xA5A5)
0x038B (0x000716) 0x292A- f:00024 d: 298 | OR[298] = A
0x038C (0x000718) 0x1010- f:00010 d: 16 | A = 16 (0x0010)
0x038D (0x00071A) 0x2930- f:00024 d: 304 | OR[304] = A
0x038E (0x00071C) 0x2130- f:00020 d: 304 | A = OR[304]
0x038F (0x00071E) 0x844E- f:00102 d: 78 | P = P + 78 (0x03DD), A = 0
0x0390 (0x000720) 0x212A- f:00020 d: 298 | A = OR[298]
0x0391 (0x000722) 0x1A00-0xFFFE f:00015 d: 0 | A = A & 65534 (0xFFFE)
0x0393 (0x000726) 0x2931- f:00024 d: 305 | OR[305] = A
0x0394 (0x000728) 0xF800- f:00174 d: 0 | IOB , fn014
0x0395 (0x00072A) 0x212A- f:00020 d: 298 | A = OR[298]
0x0396 (0x00072C) 0x1A00-0xFFFE f:00015 d: 0 | A = A & 65534 (0xFFFE)
0x0398 (0x000730) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0399 (0x000732) 0x2932- f:00024 d: 306 | OR[306] = A
0x039A (0x000734) 0xF800- f:00174 d: 0 | IOB , fn014
0x039B (0x000736) 0x212A- f:00020 d: 298 | A = OR[298]
0x039C (0x000738) 0xFA00- f:00175 d: 0 | IOB , fn015
0x039D (0x00073A) 0x212A- f:00020 d: 298 | A = OR[298]
0x039E (0x00073C) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x039F (0x00073E) 0xFA00- f:00175 d: 0 | IOB , fn015
0x03A0 (0x000740) 0x1800-0x0747 f:00014 d: 0 | A = 1863 (0x0747)
0x03A2 (0x000744) 0x2926- f:00024 d: 294 | OR[294] = A
0x03A3 (0x000746) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x03A4 (0x000748) 0x1A00-0xFFFF f:00015 d: 0 | A = A & 65535 (0xFFFF)
0x03A6 (0x00074C) 0xF000- f:00170 d: 0 | IOB , fn010
0x03A7 (0x00074E) 0x292B- f:00024 d: 299 | OR[299] = A
0x03A8 (0x000750) 0x2731- f:00023 d: 305 | A = A - OR[305]
0x03A9 (0x000752) 0x8602- f:00103 d: 2 | P = P + 2 (0x03AB), A # 0
0x03AA (0x000754) 0x7007- f:00070 d: 7 | P = P + 7 (0x03B1)
0x03AB (0x000756) 0x1800-0xFFEF f:00014 d: 0 | A = 65519 (0xFFEF)
0x03AD (0x00075A) 0x291E- f:00024 d: 286 | OR[286] = A
0x03AE (0x00075C) 0x2131- f:00020 d: 305 | A = OR[305]
0x03AF (0x00075E) 0x292A- f:00024 d: 298 | OR[298] = A
0x03B0 (0x000760) 0x7348- f:00071 d: 328 | P = P - 328 (0x0268)
0x03B1 (0x000762) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x03B2 (0x000764) 0x1A00-0xFFFF f:00015 d: 0 | A = A & 65535 (0xFFFF)
0x03B4 (0x000768) 0xF000- f:00170 d: 0 | IOB , fn010
0x03B5 (0x00076A) 0x292B- f:00024 d: 299 | OR[299] = A
0x03B6 (0x00076C) 0x2732- f:00023 d: 306 | A = A - OR[306]
0x03B7 (0x00076E) 0x8602- f:00103 d: 2 | P = P + 2 (0x03B9), A # 0
0x03B8 (0x000770) 0x7007- f:00070 d: 7 | P = P + 7 (0x03BF)
0x03B9 (0x000772) 0x1800-0xFFEF f:00014 d: 0 | A = 65519 (0xFFEF)
0x03BB (0x000776) 0x291E- f:00024 d: 286 | OR[286] = A
0x03BC (0x000778) 0x2132- f:00020 d: 306 | A = OR[306]
0x03BD (0x00077A) 0x292A- f:00024 d: 298 | OR[298] = A
0x03BE (0x00077C) 0x7356- f:00071 d: 342 | P = P - 342 (0x0268)
0x03BF (0x00077E) 0x1800-0x0751 f:00014 d: 0 | A = 1873 (0x0751)
0x03C1 (0x000782) 0x2926- f:00024 d: 294 | OR[294] = A
0x03C2 (0x000784) 0x2D2A- f:00026 d: 298 | OR[298] = OR[298] + 1
0x03C3 (0x000786) 0xF200- f:00171 d: 0 | IOB , fn011
0x03C4 (0x000788) 0x292B- f:00024 d: 299 | OR[299] = A
0x03C5 (0x00078A) 0x272A- f:00023 d: 298 | A = A - OR[298]
0x03C6 (0x00078C) 0x8602- f:00103 d: 2 | P = P + 2 (0x03C8), A # 0
0x03C7 (0x00078E) 0x7005- f:00070 d: 5 | P = P + 5 (0x03CC)
0x03C8 (0x000790) 0x1800-0xFFEF f:00014 d: 0 | A = 65519 (0xFFEF)
0x03CA (0x000794) 0x291E- f:00024 d: 286 | OR[286] = A
0x03CB (0x000796) 0x7363- f:00071 d: 355 | P = P - 355 (0x0268)
0x03CC (0x000798) 0x2F2A- f:00027 d: 298 | OR[298] = OR[298] - 1
0x03CD (0x00079A) 0xF200- f:00171 d: 0 | IOB , fn011
0x03CE (0x00079C) 0x292B- f:00024 d: 299 | OR[299] = A
0x03CF (0x00079E) 0x272A- f:00023 d: 298 | A = A - OR[298]
0x03D0 (0x0007A0) 0x8602- f:00103 d: 2 | P = P + 2 (0x03D2), A # 0
0x03D1 (0x0007A2) 0x7005- f:00070 d: 5 | P = P + 5 (0x03D6)
0x03D2 (0x0007A4) 0x1800-0xFFEF f:00014 d: 0 | A = 65519 (0xFFEF)
0x03D4 (0x0007A8) 0x291E- f:00024 d: 286 | OR[286] = A
0x03D5 (0x0007AA) 0x736D- f:00071 d: 365 | P = P - 365 (0x0268)
0x03D6 (0x0007AC) 0x212A- f:00020 d: 298 | A = OR[298]
0x03D7 (0x0007AE) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001)
0x03D8 (0x0007B0) 0x292A- f:00024 d: 298 | OR[298] = A
0x03D9 (0x0007B2) 0x8002- f:00100 d: 2 | P = P + 2 (0x03DB), C = 0
0x03DA (0x0007B4) 0x2D2A- f:00026 d: 298 | OR[298] = OR[298] + 1
0x03DB (0x0007B6) 0x2F30- f:00027 d: 304 | OR[304] = OR[304] - 1
0x03DC (0x0007B8) 0x724E- f:00071 d: 78 | P = P - 78 (0x038E)
0x03DD (0x0007BA) 0x1800-0x075B f:00014 d: 0 | A = 1883 (0x075B)
0x03DF (0x0007BE) 0x2926- f:00024 d: 294 | OR[294] = A
0x03E0 (0x0007C0) 0x1800-0xA5A5 f:00014 d: 0 | A = 42405 (0xA5A5)
0x03E2 (0x0007C4) 0x292A- f:00024 d: 298 | OR[298] = A
0x03E3 (0x0007C6) 0x1010- f:00010 d: 16 | A = 16 (0x0010)
0x03E4 (0x0007C8) 0x2930- f:00024 d: 304 | OR[304] = A
0x03E5 (0x0007CA) 0x2130- f:00020 d: 304 | A = OR[304]
0x03E6 (0x0007CC) 0x8414- f:00102 d: 20 | P = P + 20 (0x03FA), A = 0
0x03E7 (0x0007CE) 0x212A- f:00020 d: 298 | A = OR[298]
0x03E8 (0x0007D0) 0xFC00- f:00176 d: 0 | IOB , fn016
0x03E9 (0x0007D2) 0x0000- f:00000 d: 0 | PASS
0x03EA (0x0007D4) 0xF400- f:00172 d: 0 | IOB , fn012
0x03EB (0x0007D6) 0x292B- f:00024 d: 299 | OR[299] = A
0x03EC (0x0007D8) 0x272A- f:00023 d: 298 | A = A - OR[298]
0x03ED (0x0007DA) 0x8602- f:00103 d: 2 | P = P + 2 (0x03EF), A # 0
0x03EE (0x0007DC) 0x7005- f:00070 d: 5 | P = P + 5 (0x03F3)
0x03EF (0x0007DE) 0x1800-0xFFEF f:00014 d: 0 | A = 65519 (0xFFEF)
0x03F1 (0x0007E2) 0x291E- f:00024 d: 286 | OR[286] = A
0x03F2 (0x0007E4) 0x738A- f:00071 d: 394 | P = P - 394 (0x0268)
0x03F3 (0x0007E6) 0x212A- f:00020 d: 298 | A = OR[298]
0x03F4 (0x0007E8) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001)
0x03F5 (0x0007EA) 0x292A- f:00024 d: 298 | OR[298] = A
0x03F6 (0x0007EC) 0x8002- f:00100 d: 2 | P = P + 2 (0x03F8), C = 0
0x03F7 (0x0007EE) 0x2D2A- f:00026 d: 298 | OR[298] = OR[298] + 1
0x03F8 (0x0007F0) 0x2F30- f:00027 d: 304 | OR[304] = OR[304] - 1
0x03F9 (0x0007F2) 0x7214- f:00071 d: 20 | P = P - 20 (0x03E5)
0x03FA (0x0007F4) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x03FB (0x0007F6) 0xFC00- f:00176 d: 0 | IOB , fn016
0x03FC (0x0007F8) 0x1003- f:00010 d: 3 | A = 3 (0x0003)
0x03FD (0x0007FA) 0xE200- f:00161 d: 0 | IOB , fn001
0x03FE (0x0007FC) 0x7E03-0x0409 f:00077 d: 3 | R = OR[3]+1033 (0x0409)
0x0400 (0x000800) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0401 (0x000802) 0x2926- f:00024 d: 294 | OR[294] = A
0x0402 (0x000804) 0x0200- f:00001 d: 0 | EXIT
0x0403 (0x000806) 0x0400- f:00002 d: 0 | I = 0
0x0404 (0x000808) 0x0000- f:00000 d: 0 | PASS
0x0405 (0x00080A) 0xEE00- f:00167 d: 0 | IOB , fn007
0x0406 (0x00080C) 0x1009- f:00010 d: 9 | A = 9 (0x0009) @ TPUSH Wait for interrupt or timeout (1/10th of a second)
0x0407 (0x00080E) 0x2933- f:00024 d: 307 | OR[307] = A
0x0408 (0x000810) 0x2121- f:00020 d: 289 | A = OR[289]
0x0409 (0x000812) 0x1406- f:00012 d: 6 | A = A + 6 (0x0006)
0x040A (0x000814) 0x2934- f:00024 d: 308 | OR[308] = A
0x040B (0x000816) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x040C (0x000818) 0x2935- f:00024 d: 309 | OR[309] = A
0x040D (0x00081A) 0x1133- f:00010 d: 307 | A = 307 (0x0133)
0x040E (0x00081C) 0x5800- f:00054 d: 0 | B = A
0x040F (0x00081E) 0x1800-0x3718 f:00014 d: 0 | A = 14104 (0x3718)
0x0411 (0x000822) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0412 (0x000824) 0x2006- f:00020 d: 6 | A = OR[6]
0x0413 (0x000826) 0x140B- f:00012 d: 11 | A = A + 11 (0x000B)
0x0414 (0x000828) 0x2908- f:00024 d: 264 | OR[264] = A
0x0415 (0x00082A) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0416 (0x00082C) 0x8602- f:00103 d: 2 | P = P + 2 (0x0418), A # 0
0x0417 (0x00082E) 0x7008- f:00070 d: 8 | P = P + 8 (0x041F)
0x0418 (0x000830) 0x1800-0xFFEF f:00014 d: 0 | A = 65519 (0xFFEF)
0x041A (0x000834) 0x291E- f:00024 d: 286 | OR[286] = A
0x041B (0x000836) 0x1800-0x0766 f:00014 d: 0 | A = 1894 (0x0766)
0x041D (0x00083A) 0x2926- f:00024 d: 294 | OR[294] = A
0x041E (0x00083C) 0x73B6- f:00071 d: 438 | P = P - 438 (0x0268)
0x041F (0x00083E) 0x2119- f:00020 d: 281 | A = OR[281]
0x0420 (0x000840) 0x5800- f:00054 d: 0 | B = A
0x0421 (0x000842) 0xE000- f:00160 d: 0 | IOB , fn000
0x0422 (0x000844) 0x0E10- f:00007 d: 16 | A = A << 16 (0x0010)
0x0423 (0x000846) 0x0E10- f:00007 d: 16 | A = A << 16 (0x0010)
0x0424 (0x000848) 0x0200- f:00001 d: 0 | EXIT
0x0425 (0x00084A) 0x745D- f:00072 d: 93 | R = P + 93 (0x0482)
0x0426 (0x00084C) 0x2123- f:00020 d: 291 | A = OR[291]
0x0427 (0x00084E) 0x140A- f:00012 d: 10 | A = A + 10 (0x000A)
0x0428 (0x000850) 0x2908- f:00024 d: 264 | OR[264] = A
0x0429 (0x000852) 0x212F- f:00020 d: 303 | A = OR[303]
0x042A (0x000854) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x042B (0x000856) 0x2128- f:00020 d: 296 | A = OR[296]
0x042C (0x000858) 0x140B- f:00012 d: 11 | A = A + 11 (0x000B)
0x042D (0x00085A) 0x2908- f:00024 d: 264 | OR[264] = A
0x042E (0x00085C) 0x3108- f:00030 d: 264 | A = (OR[264])
0x042F (0x00085E) 0x0E06- f:00007 d: 6 | A = A << 6 (0x0006)
0x0430 (0x000860) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001)
0x0431 (0x000862) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0432 (0x000864) 0x0C07- f:00006 d: 7 | A = A >> 7 (0x0007)
0x0433 (0x000866) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0434 (0x000868) 0x2128- f:00020 d: 296 | A = OR[296]
0x0435 (0x00086A) 0x140B- f:00012 d: 11 | A = A + 11 (0x000B)
0x0436 (0x00086C) 0x2908- f:00024 d: 264 | OR[264] = A
0x0437 (0x00086E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0438 (0x000870) 0x0E0A- f:00007 d: 10 | A = A << 10 (0x000A)
0x0439 (0x000872) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001)
0x043A (0x000874) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x043B (0x000876) 0x0C0B- f:00006 d: 11 | A = A >> 11 (0x000B)
0x043C (0x000878) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x043D (0x00087A) 0x74A1- f:00072 d: 161 | R = P + 161 (0x04DE)
0x043E (0x00087C) 0x1004- f:00010 d: 4 | A = 4 (0x0004)
0x043F (0x00087E) 0x2930- f:00024 d: 304 | OR[304] = A
0x0440 (0x000880) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x0441 (0x000882) 0x2913- f:00024 d: 275 | OR[275] = A
0x0442 (0x000884) 0x2130- f:00020 d: 304 | A = OR[304]
0x0443 (0x000886) 0x1604- f:00013 d: 4 | A = A - 4 (0x0004)
0x0444 (0x000888) 0x860B- f:00103 d: 11 | P = P + 11 (0x044F), A # 0
0x0445 (0x00088A) 0x2113- f:00020 d: 275 | A = OR[275]
0x0446 (0x00088C) 0x8409- f:00102 d: 9 | P = P + 9 (0x044F), A = 0
0x0447 (0x00088E) 0x74C1- f:00072 d: 193 | R = P + 193 (0x0508)
0x0448 (0x000890) 0x2128- f:00020 d: 296 | A = OR[296]
0x0449 (0x000892) 0x1414- f:00012 d: 20 | A = A + 20 (0x0014)
0x044A (0x000894) 0x2908- f:00024 d: 264 | OR[264] = A
0x044B (0x000896) 0x3108- f:00030 d: 264 | A = (OR[264])
0x044C (0x000898) 0x080F- f:00004 d: 15 | A = A > 15 (0x000F)
0x044D (0x00089A) 0x2913- f:00024 d: 275 | OR[275] = A
0x044E (0x00089C) 0x720C- f:00071 d: 12 | P = P - 12 (0x0442)
0x044F (0x00089E) 0x2130- f:00020 d: 304 | A = OR[304]
0x0450 (0x0008A0) 0x1604- f:00013 d: 4 | A = A - 4 (0x0004)
0x0451 (0x0008A2) 0x8402- f:00102 d: 2 | P = P + 2 (0x0453), A = 0
0x0452 (0x0008A4) 0x702F- f:00070 d: 47 | P = P + 47 (0x0481)
0x0453 (0x0008A6) 0x2128- f:00020 d: 296 | A = OR[296]
0x0454 (0x0008A8) 0x1417- f:00012 d: 23 | A = A + 23 (0x0017)
0x0455 (0x0008AA) 0x2908- f:00024 d: 264 | OR[264] = A
0x0456 (0x0008AC) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0457 (0x0008AE) 0x292E- f:00024 d: 302 | OR[302] = A
0x0458 (0x0008B0) 0x1008- f:00010 d: 8 | A = 8 (0x0008)
0x0459 (0x0008B2) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x045A (0x0008B4) 0x1C00-0x8000 f:00016 d: 0 | A = A + 32768 (0x8000)
0x045C (0x0008B8) 0x1C00-0x4000 f:00016 d: 0 | A = A + 16384 (0x4000)
0x045E (0x0008BC) 0x2930- f:00024 d: 304 | OR[304] = A
0x045F (0x0008BE) 0x212E- f:00020 d: 302 | A = OR[302]
0x0460 (0x0008C0) 0x2330- f:00021 d: 304 | A = A & OR[304]
0x0461 (0x0008C2) 0x2908- f:00024 d: 264 | OR[264] = A
0x0462 (0x0008C4) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0463 (0x0008C6) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x0464 (0x0008C8) 0x8602- f:00103 d: 2 | P = P + 2 (0x0466), A # 0
0x0465 (0x0008CA) 0x700A- f:00070 d: 10 | P = P + 10 (0x046F)
0x0466 (0x0008CC) 0x1800-0xFFEF f:00014 d: 0 | A = 65519 (0xFFEF)
0x0468 (0x0008D0) 0x291E- f:00024 d: 286 | OR[286] = A
0x0469 (0x0008D2) 0x1800-0x071E f:00014 d: 0 | A = 1822 (0x071E)
0x046B (0x0008D6) 0x2926- f:00024 d: 294 | OR[294] = A
0x046C (0x0008D8) 0x7A03-0x026E f:00075 d: 3 | P = OR[3]+622 (0x026E)
0x046E (0x0008DC) 0x7013- f:00070 d: 19 | P = P + 19 (0x0481)
0x046F (0x0008DE) 0x2128- f:00020 d: 296 | A = OR[296]
0x0470 (0x0008E0) 0x1408- f:00012 d: 8 | A = A + 8 (0x0008)
0x0471 (0x0008E2) 0x2908- f:00024 d: 264 | OR[264] = A
0x0472 (0x0008E4) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0473 (0x0008E6) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x0474 (0x0008E8) 0x2930- f:00024 d: 304 | OR[304] = A
0x0475 (0x0008EA) 0x2130- f:00020 d: 304 | A = OR[304]
0x0476 (0x0008EC) 0x1608- f:00013 d: 8 | A = A - 8 (0x0008)
0x0477 (0x0008EE) 0x8602- f:00103 d: 2 | P = P + 2 (0x0479), A # 0
0x0478 (0x0008F0) 0x7009- f:00070 d: 9 | P = P + 9 (0x0481)
0x0479 (0x0008F2) 0x1800-0xFFEF f:00014 d: 0 | A = 65519 (0xFFEF)
0x047B (0x0008F6) 0x291E- f:00024 d: 286 | OR[286] = A
0x047C (0x0008F8) 0x1800-0x071E f:00014 d: 0 | A = 1822 (0x071E)
0x047E (0x0008FC) 0x2926- f:00024 d: 294 | OR[294] = A
0x047F (0x0008FE) 0x7A03-0x026E f:00075 d: 3 | P = OR[3]+622 (0x026E)
0x0481 (0x000902) 0x0200- f:00001 d: 0 | EXIT
0x0482 (0x000904) 0x2125- f:00020 d: 293 | A = OR[293]
0x0483 (0x000906) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x0484 (0x000908) 0x292F- f:00024 d: 303 | OR[303] = A
0x0485 (0x00090A) 0x212F- f:00020 d: 303 | A = OR[303]
0x0486 (0x00090C) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x0487 (0x00090E) 0x2914- f:00024 d: 276 | OR[276] = A
0x0488 (0x000910) 0x312F- f:00030 d: 303 | A = (OR[303])
0x0489 (0x000912) 0x2913- f:00024 d: 275 | OR[275] = A
0x048A (0x000914) 0x2122- f:00020 d: 290 | A = OR[290]
0x048B (0x000916) 0x2713- f:00023 d: 275 | A = A - OR[275]
0x048C (0x000918) 0x8408- f:00102 d: 8 | P = P + 8 (0x0494), A = 0
0x048D (0x00091A) 0x212F- f:00020 d: 303 | A = OR[303]
0x048E (0x00091C) 0x2714- f:00023 d: 276 | A = A - OR[276]
0x048F (0x00091E) 0x8405- f:00102 d: 5 | P = P + 5 (0x0494), A = 0
0x0490 (0x000920) 0x2D2F- f:00026 d: 303 | OR[303] = OR[303] + 1
0x0491 (0x000922) 0x312F- f:00030 d: 303 | A = (OR[303])
0x0492 (0x000924) 0x2913- f:00024 d: 275 | OR[275] = A
0x0493 (0x000926) 0x7209- f:00071 d: 9 | P = P - 9 (0x048A)
0x0494 (0x000928) 0x2122- f:00020 d: 290 | A = OR[290]
0x0495 (0x00092A) 0x2713- f:00023 d: 275 | A = A - OR[275]
0x0496 (0x00092C) 0x8602- f:00103 d: 2 | P = P + 2 (0x0498), A # 0
0x0497 (0x00092E) 0x7009- f:00070 d: 9 | P = P + 9 (0x04A0)
0x0498 (0x000930) 0x1800-0xFFFE f:00014 d: 0 | A = 65534 (0xFFFE)
0x049A (0x000934) 0x291E- f:00024 d: 286 | OR[286] = A
0x049B (0x000936) 0x1800-0x06EA f:00014 d: 0 | A = 1770 (0x06EA)
0x049D (0x00093A) 0x2926- f:00024 d: 294 | OR[294] = A
0x049E (0x00093C) 0x7A03-0x026E f:00075 d: 3 | P = OR[3]+622 (0x026E)
0x04A0 (0x000940) 0x0200- f:00001 d: 0 | EXIT
0x04A1 (0x000942) 0x311F- f:00030 d: 287 | A = (OR[287])
0x04A2 (0x000944) 0x0E01- f:00007 d: 1 | A = A << 1 (0x0001)
0x04A3 (0x000946) 0x0A08- f:00005 d: 8 | A = A < 8 (0x0008)
0x04A4 (0x000948) 0x1400- f:00012 d: 0 | A = A + 0 (0x0000)
0x04A5 (0x00094A) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x04A6 (0x00094C) 0x391F- f:00034 d: 287 | (OR[287]) = A
0x04A7 (0x00094E) 0x311F- f:00030 d: 287 | A = (OR[287])
0x04A8 (0x000950) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x04AA (0x000954) 0x140F- f:00012 d: 15 | A = A + 15 (0x000F)
0x04AB (0x000956) 0x391F- f:00034 d: 287 | (OR[287]) = A
0x04AC (0x000958) 0x211F- f:00020 d: 287 | A = OR[287]
0x04AD (0x00095A) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x04AE (0x00095C) 0x2908- f:00024 d: 264 | OR[264] = A
0x04AF (0x00095E) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x04B0 (0x000960) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x04B1 (0x000962) 0x211F- f:00020 d: 287 | A = OR[287]
0x04B2 (0x000964) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x04B3 (0x000966) 0x2908- f:00024 d: 264 | OR[264] = A
0x04B4 (0x000968) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x04B5 (0x00096A) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x04B6 (0x00096C) 0x211F- f:00020 d: 287 | A = OR[287]
0x04B7 (0x00096E) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x04B8 (0x000970) 0x2908- f:00024 d: 264 | OR[264] = A
0x04B9 (0x000972) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x04BA (0x000974) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x04BB (0x000976) 0x744D- f:00072 d: 77 | R = P + 77 (0x0508)
0x04BC (0x000978) 0x2130- f:00020 d: 304 | A = OR[304]
0x04BD (0x00097A) 0x1603- f:00013 d: 3 | A = A - 3 (0x0003)
0x04BE (0x00097C) 0x8602- f:00103 d: 2 | P = P + 2 (0x04C0), A # 0
0x04BF (0x00097E) 0x7015- f:00070 d: 21 | P = P + 21 (0x04D4)
0x04C0 (0x000980) 0x2130- f:00020 d: 304 | A = OR[304]
0x04C1 (0x000982) 0x1604- f:00013 d: 4 | A = A - 4 (0x0004)
0x04C2 (0x000984) 0x8402- f:00102 d: 2 | P = P + 2 (0x04C4), A = 0
0x04C3 (0x000986) 0x7009- f:00070 d: 9 | P = P + 9 (0x04CC)
0x04C4 (0x000988) 0x2128- f:00020 d: 296 | A = OR[296]
0x04C5 (0x00098A) 0x1414- f:00012 d: 20 | A = A + 20 (0x0014)
0x04C6 (0x00098C) 0x2908- f:00024 d: 264 | OR[264] = A
0x04C7 (0x00098E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x04C8 (0x000990) 0x080F- f:00004 d: 15 | A = A > 15 (0x000F)
0x04C9 (0x000992) 0x8602- f:00103 d: 2 | P = P + 2 (0x04CB), A # 0
0x04CA (0x000994) 0x7002- f:00070 d: 2 | P = P + 2 (0x04CC)
0x04CB (0x000996) 0x700A- f:00070 d: 10 | P = P + 10 (0x04D5)
0x04CC (0x000998) 0x1800-0xFFEF f:00014 d: 0 | A = 65519 (0xFFEF)
0x04CE (0x00099C) 0x291E- f:00024 d: 286 | OR[286] = A
0x04CF (0x00099E) 0x1800-0x06F2 f:00014 d: 0 | A = 1778 (0x06F2)
0x04D1 (0x0009A2) 0x2926- f:00024 d: 294 | OR[294] = A
0x04D2 (0x0009A4) 0x7A03-0x026E f:00075 d: 3 | P = OR[3]+622 (0x026E)
0x04D4 (0x0009A8) 0x0200- f:00001 d: 0 | EXIT
0x04D5 (0x0009AA) 0x7409- f:00072 d: 9 | R = P + 9 (0x04DE)
0x04D6 (0x0009AC) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x04D7 (0x0009AE) 0x2930- f:00024 d: 304 | OR[304] = A
0x04D8 (0x0009B0) 0x2130- f:00020 d: 304 | A = OR[304]
0x04D9 (0x0009B2) 0x1603- f:00013 d: 3 | A = A - 3 (0x0003)
0x04DA (0x0009B4) 0x8403- f:00102 d: 3 | P = P + 3 (0x04DD), A = 0
0x04DB (0x0009B6) 0x742D- f:00072 d: 45 | R = P + 45 (0x0508)
0x04DC (0x0009B8) 0x7204- f:00071 d: 4 | P = P - 4 (0x04D8)
0x04DD (0x0009BA) 0x0200- f:00001 d: 0 | EXIT
0x04DE (0x0009BC) 0x311F- f:00030 d: 287 | A = (OR[287])
0x04DF (0x0009BE) 0x0E01- f:00007 d: 1 | A = A << 1 (0x0001)
0x04E0 (0x0009C0) 0x0A08- f:00005 d: 8 | A = A < 8 (0x0008)
0x04E1 (0x0009C2) 0x1400- f:00012 d: 0 | A = A + 0 (0x0000)
0x04E2 (0x0009C4) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x04E3 (0x0009C6) 0x391F- f:00034 d: 287 | (OR[287]) = A
0x04E4 (0x0009C8) 0x311F- f:00030 d: 287 | A = (OR[287])
0x04E5 (0x0009CA) 0x0E02- f:00007 d: 2 | A = A << 2 (0x0002)
0x04E6 (0x0009CC) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001)
0x04E7 (0x0009CE) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x04E8 (0x0009D0) 0x0C03- f:00006 d: 3 | A = A >> 3 (0x0003)
0x04E9 (0x0009D2) 0x391F- f:00034 d: 287 | (OR[287]) = A
0x04EA (0x0009D4) 0x311F- f:00030 d: 287 | A = (OR[287])
0x04EB (0x0009D6) 0x0E03- f:00007 d: 3 | A = A << 3 (0x0003)
0x04EC (0x0009D8) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001)
0x04ED (0x0009DA) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x04EE (0x0009DC) 0x0C04- f:00006 d: 4 | A = A >> 4 (0x0004)
0x04EF (0x0009DE) 0x391F- f:00034 d: 287 | (OR[287]) = A
0x04F0 (0x0009E0) 0x311F- f:00030 d: 287 | A = (OR[287])
0x04F1 (0x0009E2) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x04F3 (0x0009E6) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x04F4 (0x0009E8) 0x391F- f:00034 d: 287 | (OR[287]) = A
0x04F5 (0x0009EA) 0x211F- f:00020 d: 287 | A = OR[287]
0x04F6 (0x0009EC) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x04F7 (0x0009EE) 0x2913- f:00024 d: 275 | OR[275] = A
0x04F8 (0x0009F0) 0x211F- f:00020 d: 287 | A = OR[287]
0x04F9 (0x0009F2) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x04FA (0x0009F4) 0x2908- f:00024 d: 264 | OR[264] = A
0x04FB (0x0009F6) 0x2113- f:00020 d: 275 | A = OR[275]
0x04FC (0x0009F8) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x04FD (0x0009FA) 0x211F- f:00020 d: 287 | A = OR[287]
0x04FE (0x0009FC) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x04FF (0x0009FE) 0x2908- f:00024 d: 264 | OR[264] = A
0x0500 (0x000A00) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0501 (0x000A02) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0502 (0x000A04) 0x211F- f:00020 d: 287 | A = OR[287]
0x0503 (0x000A06) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x0504 (0x000A08) 0x2908- f:00024 d: 264 | OR[264] = A
0x0505 (0x000A0A) 0x1020- f:00010 d: 32 | A = 32 (0x0020)
0x0506 (0x000A0C) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0507 (0x000A0E) 0x0200- f:00001 d: 0 | EXIT
0x0508 (0x000A10) 0x2128- f:00020 d: 296 | A = OR[296]
0x0509 (0x000A12) 0x140E- f:00012 d: 14 | A = A + 14 (0x000E)
0x050A (0x000A14) 0x2908- f:00024 d: 264 | OR[264] = A
0x050B (0x000A16) 0x211F- f:00020 d: 287 | A = OR[287]
0x050C (0x000A18) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x050D (0x000A1A) 0x1006- f:00010 d: 6 | A = 6 (0x0006)
0x050E (0x000A1C) 0x2930- f:00024 d: 304 | OR[304] = A
0x050F (0x000A1E) 0x2130- f:00020 d: 304 | A = OR[304]
0x0510 (0x000A20) 0x1606- f:00013 d: 6 | A = A - 6 (0x0006)
0x0511 (0x000A22) 0x8628- f:00103 d: 40 | P = P + 40 (0x0539), A # 0
0x0512 (0x000A24) 0x1028- f:00010 d: 40 | A = 40 (0x0028) @ CALL BMXSIO -- THIS IS THE CALL WE EXECUTE - it never returns...
0x0513 (0x000A26) 0x2933- f:00024 d: 307 | OR[307] = A
0x0514 (0x000A28) 0x1800-0x006A f:00014 d: 0 | A = 106 (0x006A)
0x0516 (0x000A2C) 0x2934- f:00024 d: 308 | OR[308] = A
0x0517 (0x000A2E) 0x1018- f:00010 d: 24 | A = 24 (0x0018)
0x0518 (0x000A30) 0x2935- f:00024 d: 309 | OR[309] = A
0x0519 (0x000A32) 0x2128- f:00020 d: 296 | A = OR[296]
0x051A (0x000A34) 0x2936- f:00024 d: 310 | OR[310] = A
0x051B (0x000A36) 0x211B- f:00020 d: 283 | A = OR[283]
0x051C (0x000A38) 0x2937- f:00024 d: 311 | OR[311] = A
0x051D (0x000A3A) 0x1133- f:00010 d: 307 | A = 307 (0x0133)
0x051E (0x000A3C) 0x5800- f:00054 d: 0 | B = A
0x051F (0x000A3E) 0x1800-0x3718 f:00014 d: 0 | A = 14104 (0x3718)
0x0521 (0x000A42) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0522 (0x000A44) 0x2930- f:00024 d: 304 | OR[304] = A
0x0523 (0x000A46) 0x2130- f:00020 d: 304 | A = OR[304]
0x0524 (0x000A48) 0x1603- f:00013 d: 3 | A = A - 3 (0x0003)
0x0525 (0x000A4A) 0x8213- f:00101 d: 19 | P = P + 19 (0x0538), C = 1
0x0526 (0x000A4C) 0x1028- f:00010 d: 40 | A = 40 (0x0028) @ CALL BMXSIO
0x0527 (0x000A4E) 0x2933- f:00024 d: 307 | OR[307] = A
0x0528 (0x000A50) 0x1800-0x006A f:00014 d: 0 | A = 106 (0x006A)
0x052A (0x000A54) 0x2934- f:00024 d: 308 | OR[308] = A
0x052B (0x000A56) 0x1020- f:00010 d: 32 | A = 32 (0x0020)
0x052C (0x000A58) 0x2935- f:00024 d: 309 | OR[309] = A
0x052D (0x000A5A) 0x2128- f:00020 d: 296 | A = OR[296]
0x052E (0x000A5C) 0x2936- f:00024 d: 310 | OR[310] = A
0x052F (0x000A5E) 0x211B- f:00020 d: 283 | A = OR[283]
0x0530 (0x000A60) 0x2937- f:00024 d: 311 | OR[311] = A
0x0531 (0x000A62) 0x1133- f:00010 d: 307 | A = 307 (0x0133)
0x0532 (0x000A64) 0x5800- f:00054 d: 0 | B = A
0x0533 (0x000A66) 0x1800-0x3718 f:00014 d: 0 | A = 14104 (0x3718)
0x0535 (0x000A6A) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0536 (0x000A6C) 0x2930- f:00024 d: 304 | OR[304] = A
0x0537 (0x000A6E) 0x7214- f:00071 d: 20 | P = P - 20 (0x0523)
0x0538 (0x000A70) 0x7229- f:00071 d: 41 | P = P - 41 (0x050F)
0x0539 (0x000A72) 0x0200- f:00001 d: 0 | EXIT
0x053A (0x000A74) 0x7E03-0x06C2 f:00077 d: 3 | R = OR[3]+1730 (0x06C2)
0x053C (0x000A78) 0x1028- f:00010 d: 40 | A = 40 (0x0028) @ Call TSTASH
0x053D (0x000A7A) 0x2933- f:00024 d: 307 | OR[307] = A
0x053E (0x000A7C) 0x1800-0x0041 f:00014 d: 0 | A = 65 (0x0041)
0x0540 (0x000A80) 0x2934- f:00024 d: 308 | OR[308] = A
0x0541 (0x000A82) 0x1800-0x0000 f:00014 d: 0 | A = 0 (0x0000)
0x0543 (0x000A86) 0x2935- f:00024 d: 309 | OR[309] = A
0x0544 (0x000A88) 0x211F- f:00020 d: 287 | A = OR[287]
0x0545 (0x000A8A) 0x2936- f:00024 d: 310 | OR[310] = A
0x0546 (0x000A8C) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0547 (0x000A8E) 0x2937- f:00024 d: 311 | OR[311] = A
0x0548 (0x000A90) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0549 (0x000A92) 0x2938- f:00024 d: 312 | OR[312] = A
0x054A (0x000A94) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x054B (0x000A96) 0x2939- f:00024 d: 313 | OR[313] = A
0x054C (0x000A98) 0x1133- f:00010 d: 307 | A = 307 (0x0133)
0x054D (0x000A9A) 0x5800- f:00054 d: 0 | B = A
0x054E (0x000A9C) 0x1800-0x3718 f:00014 d: 0 | A = 14104 (0x3718)
0x0550 (0x000AA0) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0551 (0x000AA2) 0x1009- f:00010 d: 9 | A = 9 (0x0009)
0x0552 (0x000AA4) 0x292C- f:00024 d: 300 | OR[300] = A
0x0553 (0x000AA6) 0x2118- f:00020 d: 280 | A = OR[280]
0x0554 (0x000AA8) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001)
0x0555 (0x000AAA) 0x8405- f:00102 d: 5 | P = P + 5 (0x055A), A = 0
0x0556 (0x000AAC) 0x2118- f:00020 d: 280 | A = OR[280]
0x0557 (0x000AAE) 0x1602- f:00013 d: 2 | A = A - 2 (0x0002)
0x0558 (0x000AB0) 0x8402- f:00102 d: 2 | P = P + 2 (0x055A), A = 0
0x0559 (0x000AB2) 0x700B- f:00070 d: 11 | P = P + 11 (0x0564)
0x055A (0x000AB4) 0x1800-0x06D4 f:00014 d: 0 | A = 1748 (0x06D4)
0x055C (0x000AB8) 0x2929- f:00024 d: 297 | OR[297] = A
0x055D (0x000ABA) 0x1009- f:00010 d: 9 | A = 9 (0x0009)
0x055E (0x000ABC) 0x252C- f:00022 d: 300 | A = A + OR[300]
0x055F (0x000ABE) 0x292D- f:00024 d: 301 | OR[301] = A
0x0560 (0x000AC0) 0x2119- f:00020 d: 281 | A = OR[281]
0x0561 (0x000AC2) 0x292E- f:00024 d: 302 | OR[302] = A
0x0562 (0x000AC4) 0x7E03-0x0617 f:00077 d: 3 | R = OR[3]+1559 (0x0617)
0x0564 (0x000AC8) 0x2118- f:00020 d: 280 | A = OR[280]
0x0565 (0x000ACA) 0x1602- f:00013 d: 2 | A = A - 2 (0x0002)
0x0566 (0x000ACC) 0x8402- f:00102 d: 2 | P = P + 2 (0x0568), A = 0
0x0567 (0x000ACE) 0x7025- f:00070 d: 37 | P = P + 37 (0x058C)
0x0568 (0x000AD0) 0x1029- f:00010 d: 41 | A = 41 (0x0029)
0x0569 (0x000AD2) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x056A (0x000AD4) 0x290D- f:00024 d: 269 | OR[269] = A
0x056B (0x000AD6) 0x212C- f:00020 d: 300 | A = OR[300]
0x056C (0x000AD8) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x056D (0x000ADA) 0x251F- f:00022 d: 287 | A = A + OR[287]
0x056E (0x000ADC) 0x290E- f:00024 d: 270 | OR[270] = A
0x056F (0x000ADE) 0x212C- f:00020 d: 300 | A = OR[300]
0x0570 (0x000AE0) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x0571 (0x000AE2) 0x2908- f:00024 d: 264 | OR[264] = A
0x0572 (0x000AE4) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0573 (0x000AE6) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x0574 (0x000AE8) 0x8607- f:00103 d: 7 | P = P + 7 (0x057B), A # 0
0x0575 (0x000AEA) 0x310E- f:00030 d: 270 | A = (OR[270])
0x0576 (0x000AEC) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x0577 (0x000AEE) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x0578 (0x000AF0) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x0579 (0x000AF2) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x057A (0x000AF4) 0x7006- f:00070 d: 6 | P = P + 6 (0x0580)
0x057B (0x000AF6) 0x310E- f:00030 d: 270 | A = (OR[270])
0x057C (0x000AF8) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x057E (0x000AFC) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x057F (0x000AFE) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x0580 (0x000B00) 0x1002- f:00010 d: 2 | A = 2 (0x0002)
0x0581 (0x000B02) 0x2B2C- f:00025 d: 300 | OR[300] = A + OR[300]
0x0582 (0x000B04) 0x1800-0x06D9 f:00014 d: 0 | A = 1753 (0x06D9)
0x0584 (0x000B08) 0x2929- f:00024 d: 297 | OR[297] = A
0x0585 (0x000B0A) 0x100E- f:00010 d: 14 | A = 14 (0x000E)
0x0586 (0x000B0C) 0x252C- f:00022 d: 300 | A = A + OR[300]
0x0587 (0x000B0E) 0x292D- f:00024 d: 301 | OR[301] = A
0x0588 (0x000B10) 0x211A- f:00020 d: 282 | A = OR[282]
0x0589 (0x000B12) 0x292E- f:00024 d: 302 | OR[302] = A
0x058A (0x000B14) 0x7E03-0x0617 f:00077 d: 3 | R = OR[3]+1559 (0x0617)
0x058C (0x000B18) 0x2118- f:00020 d: 280 | A = OR[280]
0x058D (0x000B1A) 0x1603- f:00013 d: 3 | A = A - 3 (0x0003)
0x058E (0x000B1C) 0x8402- f:00102 d: 2 | P = P + 2 (0x0590), A = 0
0x058F (0x000B1E) 0x703C- f:00070 d: 60 | P = P + 60 (0x05CB)
0x0590 (0x000B20) 0x1800-0x06E5 f:00014 d: 0 | A = 1765 (0x06E5)
0x0592 (0x000B24) 0x2929- f:00024 d: 297 | OR[297] = A
0x0593 (0x000B26) 0x1008- f:00010 d: 8 | A = 8 (0x0008)
0x0594 (0x000B28) 0x252C- f:00022 d: 300 | A = A + OR[300]
0x0595 (0x000B2A) 0x292D- f:00024 d: 301 | OR[301] = A
0x0596 (0x000B2C) 0x2123- f:00020 d: 291 | A = OR[291]
0x0597 (0x000B2E) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0598 (0x000B30) 0x2908- f:00024 d: 264 | OR[264] = A
0x0599 (0x000B32) 0x3108- f:00030 d: 264 | A = (OR[264])
0x059A (0x000B34) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x059B (0x000B36) 0x292E- f:00024 d: 302 | OR[302] = A
0x059C (0x000B38) 0x7E03-0x0617 f:00077 d: 3 | R = OR[3]+1559 (0x0617)
0x059E (0x000B3C) 0x1029- f:00010 d: 41 | A = 41 (0x0029)
0x059F (0x000B3E) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x05A0 (0x000B40) 0x290D- f:00024 d: 269 | OR[269] = A
0x05A1 (0x000B42) 0x212C- f:00020 d: 300 | A = OR[300]
0x05A2 (0x000B44) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x05A3 (0x000B46) 0x251F- f:00022 d: 287 | A = A + OR[287]
0x05A4 (0x000B48) 0x290E- f:00024 d: 270 | OR[270] = A
0x05A5 (0x000B4A) 0x212C- f:00020 d: 300 | A = OR[300]
0x05A6 (0x000B4C) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x05A7 (0x000B4E) 0x2908- f:00024 d: 264 | OR[264] = A
0x05A8 (0x000B50) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x05A9 (0x000B52) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x05AA (0x000B54) 0x8607- f:00103 d: 7 | P = P + 7 (0x05B1), A # 0
0x05AB (0x000B56) 0x310E- f:00030 d: 270 | A = (OR[270])
0x05AC (0x000B58) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x05AD (0x000B5A) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x05AE (0x000B5C) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x05AF (0x000B5E) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x05B0 (0x000B60) 0x7006- f:00070 d: 6 | P = P + 6 (0x05B6)
0x05B1 (0x000B62) 0x310E- f:00030 d: 270 | A = (OR[270])
0x05B2 (0x000B64) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x05B4 (0x000B68) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x05B5 (0x000B6A) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x05B6 (0x000B6C) 0x1002- f:00010 d: 2 | A = 2 (0x0002)
0x05B7 (0x000B6E) 0x2B2C- f:00025 d: 300 | OR[300] = A + OR[300]
0x05B8 (0x000B70) 0x1800-0x06E1 f:00014 d: 0 | A = 1761 (0x06E1)
0x05BA (0x000B74) 0x2929- f:00024 d: 297 | OR[297] = A
0x05BB (0x000B76) 0x1006- f:00010 d: 6 | A = 6 (0x0006)
0x05BC (0x000B78) 0x252C- f:00022 d: 300 | A = A + OR[300]
0x05BD (0x000B7A) 0x292D- f:00024 d: 301 | OR[301] = A
0x05BE (0x000B7C) 0x2123- f:00020 d: 291 | A = OR[291]
0x05BF (0x000B7E) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x05C0 (0x000B80) 0x2908- f:00024 d: 264 | OR[264] = A
0x05C1 (0x000B82) 0x3108- f:00030 d: 264 | A = (OR[264])
0x05C2 (0x000B84) 0x2913- f:00024 d: 275 | OR[275] = A
0x05C3 (0x000B86) 0x2113- f:00020 d: 275 | A = OR[275]
0x05C4 (0x000B88) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x05C5 (0x000B8A) 0x2908- f:00024 d: 264 | OR[264] = A
0x05C6 (0x000B8C) 0x3108- f:00030 d: 264 | A = (OR[264])
0x05C7 (0x000B8E) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x05C8 (0x000B90) 0x292E- f:00024 d: 302 | OR[302] = A
0x05C9 (0x000B92) 0x7E03-0x0617 f:00077 d: 3 | R = OR[3]+1559 (0x0617)
0x05CB (0x000B96) 0x1029- f:00010 d: 41 | A = 41 (0x0029)
0x05CC (0x000B98) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x05CD (0x000B9A) 0x290D- f:00024 d: 269 | OR[269] = A
0x05CE (0x000B9C) 0x212C- f:00020 d: 300 | A = OR[300]
0x05CF (0x000B9E) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x05D0 (0x000BA0) 0x251F- f:00022 d: 287 | A = A + OR[287]
0x05D1 (0x000BA2) 0x290E- f:00024 d: 270 | OR[270] = A
0x05D2 (0x000BA4) 0x212C- f:00020 d: 300 | A = OR[300]
0x05D3 (0x000BA6) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x05D4 (0x000BA8) 0x2908- f:00024 d: 264 | OR[264] = A
0x05D5 (0x000BAA) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x05D6 (0x000BAC) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x05D7 (0x000BAE) 0x8607- f:00103 d: 7 | P = P + 7 (0x05DE), A # 0
0x05D8 (0x000BB0) 0x310E- f:00030 d: 270 | A = (OR[270])
0x05D9 (0x000BB2) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x05DA (0x000BB4) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x05DB (0x000BB6) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x05DC (0x000BB8) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x05DD (0x000BBA) 0x7006- f:00070 d: 6 | P = P + 6 (0x05E3)
0x05DE (0x000BBC) 0x310E- f:00030 d: 270 | A = (OR[270])
0x05DF (0x000BBE) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x05E1 (0x000BC2) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x05E2 (0x000BC4) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x05E3 (0x000BC6) 0x1002- f:00010 d: 2 | A = 2 (0x0002)
0x05E4 (0x000BC8) 0x2B2C- f:00025 d: 300 | OR[300] = A + OR[300]
0x05E5 (0x000BCA) 0x2126- f:00020 d: 294 | A = OR[294]
0x05E6 (0x000BCC) 0x2929- f:00024 d: 297 | OR[297] = A
0x05E7 (0x000BCE) 0x1800-0xFFFF f:00014 d: 0 | A = 65535 (0xFFFF)
0x05E9 (0x000BD2) 0x292E- f:00024 d: 302 | OR[302] = A
0x05EA (0x000BD4) 0x7E03-0x0617 f:00077 d: 3 | R = OR[3]+1559 (0x0617)
0x05EC (0x000BD8) 0x7E03-0x069F f:00077 d: 3 | R = OR[3]+1695 (0x069F)
0x05EE (0x000BDC) 0x2126- f:00020 d: 294 | A = OR[294]
0x05EF (0x000BDE) 0x1E00-0x0747 f:00017 d: 0 | A = A - 1863 (0x0747)
0x05F1 (0x000BE2) 0x8203- f:00101 d: 3 | P = P + 3 (0x05F4), C = 1
0x05F2 (0x000BE4) 0x7A03-0x0616 f:00075 d: 3 | P = OR[3]+1558 (0x0616)
0x05F4 (0x000BE8) 0x2126- f:00020 d: 294 | A = OR[294]
0x05F5 (0x000BEA) 0x1E00-0x075B f:00017 d: 0 | A = A - 1883 (0x075B)
0x05F7 (0x000BEE) 0x8002- f:00100 d: 2 | P = P + 2 (0x05F9), C = 0
0x05F8 (0x000BF0) 0x8602- f:00103 d: 2 | P = P + 2 (0x05FA), A # 0
0x05F9 (0x000BF2) 0x7003- f:00070 d: 3 | P = P + 3 (0x05FC)
0x05FA (0x000BF4) 0x7A03-0x0616 f:00075 d: 3 | P = OR[3]+1558 (0x0616)
0x05FC (0x000BF8) 0x1800-0x076A f:00014 d: 0 | A = 1898 (0x076A)
0x05FE (0x000BFC) 0x2929- f:00024 d: 297 | OR[297] = A
0x05FF (0x000BFE) 0x212A- f:00020 d: 298 | A = OR[298]
0x0600 (0x000C00) 0x292E- f:00024 d: 302 | OR[302] = A
0x0601 (0x000C02) 0x1016- f:00010 d: 22 | A = 22 (0x0016)
0x0602 (0x000C04) 0x252C- f:00022 d: 300 | A = A + OR[300]
0x0603 (0x000C06) 0x292D- f:00024 d: 301 | OR[301] = A
0x0604 (0x000C08) 0x740D- f:00072 d: 13 | R = P + 13 (0x0611)
0x0605 (0x000C0A) 0x7494- f:00072 d: 148 | R = P + 148 (0x0699)
0x0606 (0x000C0C) 0x1800-0x0779 f:00014 d: 0 | A = 1913 (0x0779)
0x0608 (0x000C10) 0x2929- f:00024 d: 297 | OR[297] = A
0x0609 (0x000C12) 0x212B- f:00020 d: 299 | A = OR[299]
0x060A (0x000C14) 0x292E- f:00024 d: 302 | OR[302] = A
0x060B (0x000C16) 0x1016- f:00010 d: 22 | A = 22 (0x0016)
0x060C (0x000C18) 0x252C- f:00022 d: 300 | A = A + OR[300]
0x060D (0x000C1A) 0x292D- f:00024 d: 301 | OR[301] = A
0x060E (0x000C1C) 0x7403- f:00072 d: 3 | R = P + 3 (0x0611)
0x060F (0x000C1E) 0x748A- f:00072 d: 138 | R = P + 138 (0x0699)
0x0610 (0x000C20) 0x0200- f:00001 d: 0 | EXIT
0x0611 (0x000C22) 0x2129- f:00020 d: 297 | A = OR[297]
0x0612 (0x000C24) 0x2403- f:00022 d: 3 | A = A + OR[3]
0x0613 (0x000C26) 0x2913- f:00024 d: 275 | OR[275] = A
0x0614 (0x000C28) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x0615 (0x000C2A) 0x2914- f:00024 d: 276 | OR[276] = A
0x0616 (0x000C2C) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0617 (0x000C2E) 0x2915- f:00024 d: 277 | OR[277] = A
0x0618 (0x000C30) 0x2114- f:00020 d: 276 | A = OR[276]
0x0619 (0x000C32) 0x8431- f:00102 d: 49 | P = P + 49 (0x064A), A = 0
0x061A (0x000C34) 0x2115- f:00020 d: 277 | A = OR[277]
0x061B (0x000C36) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x061C (0x000C38) 0x2513- f:00022 d: 275 | A = A + OR[275]
0x061D (0x000C3A) 0x290D- f:00024 d: 269 | OR[269] = A
0x061E (0x000C3C) 0x310D- f:00030 d: 269 | A = (OR[269])
0x061F (0x000C3E) 0x290D- f:00024 d: 269 | OR[269] = A
0x0620 (0x000C40) 0x2115- f:00020 d: 277 | A = OR[277]
0x0621 (0x000C42) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x0622 (0x000C44) 0x2908- f:00024 d: 264 | OR[264] = A
0x0623 (0x000C46) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0624 (0x000C48) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x0625 (0x000C4A) 0x8604- f:00103 d: 4 | P = P + 4 (0x0629), A # 0
0x0626 (0x000C4C) 0x210D- f:00020 d: 269 | A = OR[269]
0x0627 (0x000C4E) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x0628 (0x000C50) 0x290D- f:00024 d: 269 | OR[269] = A
0x0629 (0x000C52) 0x210D- f:00020 d: 269 | A = OR[269]
0x062A (0x000C54) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x062B (0x000C56) 0x2914- f:00024 d: 276 | OR[276] = A
0x062C (0x000C58) 0x2D15- f:00026 d: 277 | OR[277] = OR[277] + 1
0x062D (0x000C5A) 0x2114- f:00020 d: 276 | A = OR[276]
0x062E (0x000C5C) 0x8602- f:00103 d: 2 | P = P + 2 (0x0630), A # 0
0x062F (0x000C5E) 0x701A- f:00070 d: 26 | P = P + 26 (0x0649)
0x0630 (0x000C60) 0x2114- f:00020 d: 276 | A = OR[276]
0x0631 (0x000C62) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0632 (0x000C64) 0x290D- f:00024 d: 269 | OR[269] = A
0x0633 (0x000C66) 0x212C- f:00020 d: 300 | A = OR[300]
0x0634 (0x000C68) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x0635 (0x000C6A) 0x251F- f:00022 d: 287 | A = A + OR[287]
0x0636 (0x000C6C) 0x290E- f:00024 d: 270 | OR[270] = A
0x0637 (0x000C6E) 0x212C- f:00020 d: 300 | A = OR[300]
0x0638 (0x000C70) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x0639 (0x000C72) 0x2908- f:00024 d: 264 | OR[264] = A
0x063A (0x000C74) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x063B (0x000C76) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x063C (0x000C78) 0x8607- f:00103 d: 7 | P = P + 7 (0x0643), A # 0
0x063D (0x000C7A) 0x310E- f:00030 d: 270 | A = (OR[270])
0x063E (0x000C7C) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x063F (0x000C7E) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x0640 (0x000C80) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x0641 (0x000C82) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x0642 (0x000C84) 0x7006- f:00070 d: 6 | P = P + 6 (0x0648)
0x0643 (0x000C86) 0x310E- f:00030 d: 270 | A = (OR[270])
0x0644 (0x000C88) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x0646 (0x000C8C) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x0647 (0x000C8E) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x0648 (0x000C90) 0x2D2C- f:00026 d: 300 | OR[300] = OR[300] + 1
0x0649 (0x000C92) 0x7231- f:00071 d: 49 | P = P - 49 (0x0618)
0x064A (0x000C94) 0x212E- f:00020 d: 302 | A = OR[302]
0x064B (0x000C96) 0x1E00-0xFFFF f:00017 d: 0 | A = A - 65535 (0xFFFF)
0x064D (0x000C9A) 0x8602- f:00103 d: 2 | P = P + 2 (0x064F), A # 0
0x064E (0x000C9C) 0x704A- f:00070 d: 74 | P = P + 74 (0x0698)
0x064F (0x000C9E) 0x2129- f:00020 d: 297 | A = OR[297]
0x0650 (0x000CA0) 0x1E00-0x06D9 f:00017 d: 0 | A = A - 1753 (0x06D9)
0x0652 (0x000CA4) 0x8602- f:00103 d: 2 | P = P + 2 (0x0654), A # 0
0x0653 (0x000CA6) 0x7020- f:00070 d: 32 | P = P + 32 (0x0673)
0x0654 (0x000CA8) 0x2129- f:00020 d: 297 | A = OR[297]
0x0655 (0x000CAA) 0x1E00-0x06E5 f:00017 d: 0 | A = A - 1765 (0x06E5)
0x0657 (0x000CAE) 0x8602- f:00103 d: 2 | P = P + 2 (0x0659), A # 0
0x0658 (0x000CB0) 0x701B- f:00070 d: 27 | P = P + 27 (0x0673)
0x0659 (0x000CB2) 0x212E- f:00020 d: 302 | A = OR[302]
0x065A (0x000CB4) 0x3927- f:00034 d: 295 | (OR[295]) = A Call BTO
0x065B (0x000CB6) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x065C (0x000CB8) 0x2933- f:00024 d: 307 | OR[307] = A
0x065D (0x000CBA) 0x1800-0x0011 f:00014 d: 0 | A = 17 (0x0011)
0x065F (0x000CBE) 0x2934- f:00024 d: 308 | OR[308] = A
0x0660 (0x000CC0) 0x2127- f:00020 d: 295 | A = OR[295]
0x0661 (0x000CC2) 0x2935- f:00024 d: 309 | OR[309] = A
0x0662 (0x000CC4) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0663 (0x000CC6) 0x2936- f:00024 d: 310 | OR[310] = A
0x0664 (0x000CC8) 0x1010- f:00010 d: 16 | A = 16 (0x0010)
0x0665 (0x000CCA) 0x2937- f:00024 d: 311 | OR[311] = A
0x0666 (0x000CCC) 0x211F- f:00020 d: 287 | A = OR[287]
0x0667 (0x000CCE) 0x2938- f:00024 d: 312 | OR[312] = A
0x0668 (0x000CD0) 0x212D- f:00020 d: 301 | A = OR[301]
0x0669 (0x000CD2) 0x2939- f:00024 d: 313 | OR[313] = A
0x066A (0x000CD4) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x066B (0x000CD6) 0x293A- f:00024 d: 314 | OR[314] = A
0x066C (0x000CD8) 0x1133- f:00010 d: 307 | A = 307 (0x0133)
0x066D (0x000CDA) 0x5800- f:00054 d: 0 | B = A
0x066E (0x000CDC) 0x1800-0x3718 f:00014 d: 0 | A = 14104 (0x3718)
0x0670 (0x000CE0) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0671 (0x000CE2) 0x292C- f:00024 d: 300 | OR[300] = A
0x0672 (0x000CE4) 0x7026- f:00070 d: 38 | P = P + 38 (0x0698)
0x0673 (0x000CE6) 0x212E- f:00020 d: 302 | A = OR[302]
0x0674 (0x000CE8) 0x120F- f:00011 d: 15 | A = A & 15 (0x000F)
0x0675 (0x000CEA) 0x1430- f:00012 d: 48 | A = A + 48 (0x0030)
0x0676 (0x000CEC) 0x2913- f:00024 d: 275 | OR[275] = A
0x0677 (0x000CEE) 0x2113- f:00020 d: 275 | A = OR[275]
0x0678 (0x000CF0) 0x1639- f:00013 d: 57 | A = A - 57 (0x0039)
0x0679 (0x000CF2) 0x8004- f:00100 d: 4 | P = P + 4 (0x067D), C = 0
0x067A (0x000CF4) 0x8403- f:00102 d: 3 | P = P + 3 (0x067D), A = 0
0x067B (0x000CF6) 0x1007- f:00010 d: 7 | A = 7 (0x0007)
0x067C (0x000CF8) 0x2B13- f:00025 d: 275 | OR[275] = A + OR[275]
0x067D (0x000CFA) 0x212D- f:00020 d: 301 | A = OR[301]
0x067E (0x000CFC) 0x292C- f:00024 d: 300 | OR[300] = A
0x067F (0x000CFE) 0x2113- f:00020 d: 275 | A = OR[275]
0x0680 (0x000D00) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0681 (0x000D02) 0x290D- f:00024 d: 269 | OR[269] = A
0x0682 (0x000D04) 0x212C- f:00020 d: 300 | A = OR[300]
0x0683 (0x000D06) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x0684 (0x000D08) 0x251F- f:00022 d: 287 | A = A + OR[287]
0x0685 (0x000D0A) 0x290E- f:00024 d: 270 | OR[270] = A
0x0686 (0x000D0C) 0x212C- f:00020 d: 300 | A = OR[300]
0x0687 (0x000D0E) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x0688 (0x000D10) 0x2908- f:00024 d: 264 | OR[264] = A
0x0689 (0x000D12) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x068A (0x000D14) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x068B (0x000D16) 0x8607- f:00103 d: 7 | P = P + 7 (0x0692), A # 0
0x068C (0x000D18) 0x310E- f:00030 d: 270 | A = (OR[270])
0x068D (0x000D1A) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x068E (0x000D1C) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x068F (0x000D1E) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x0690 (0x000D20) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x0691 (0x000D22) 0x7006- f:00070 d: 6 | P = P + 6 (0x0697)
0x0692 (0x000D24) 0x310E- f:00030 d: 270 | A = (OR[270])
0x0693 (0x000D26) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x0695 (0x000D2A) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x0696 (0x000D2C) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x0697 (0x000D2E) 0x2D2C- f:00026 d: 300 | OR[300] = OR[300] + 1
0x0698 (0x000D30) 0x0200- f:00001 d: 0 | EXIT
0x0699 (0x000D32) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x069A (0x000D34) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x069B (0x000D36) 0x290D- f:00024 d: 269 | OR[269] = A
0x069C (0x000D38) 0x212C- f:00020 d: 300 | A = OR[300]
0x069D (0x000D3A) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x069E (0x000D3C) 0x251F- f:00022 d: 287 | A = A + OR[287]
0x069F (0x000D3E) 0x290E- f:00024 d: 270 | OR[270] = A
0x06A0 (0x000D40) 0x212C- f:00020 d: 300 | A = OR[300]
0x06A1 (0x000D42) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x06A2 (0x000D44) 0x2908- f:00024 d: 264 | OR[264] = A
0x06A3 (0x000D46) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x06A4 (0x000D48) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x06A5 (0x000D4A) 0x8607- f:00103 d: 7 | P = P + 7 (0x06AC), A # 0
0x06A6 (0x000D4C) 0x310E- f:00030 d: 270 | A = (OR[270])
0x06A7 (0x000D4E) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x06A8 (0x000D50) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x06A9 (0x000D52) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x06AA (0x000D54) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x06AB (0x000D56) 0x7006- f:00070 d: 6 | P = P + 6 (0x06B1)
0x06AC (0x000D58) 0x310E- f:00030 d: 270 | A = (OR[270])
0x06AD (0x000D5A) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x06AF (0x000D5E) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x06B0 (0x000D60) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x06B1 (0x000D62) 0x1010- f:00010 d: 16 | A = 16 (0x0010) @ AWAKE: passes parameters to an activity created by ALERT. Passes a 'DAL'
0x06B2 (0x000D64) 0x2933- f:00024 d: 307 | OR[307] = A
0x06B3 (0x000D66) 0x211F- f:00020 d: 287 | A = OR[287]
0x06B4 (0x000D68) 0x2934- f:00024 d: 308 | OR[308] = A
0x06B5 (0x000D6A) 0x1133- f:00010 d: 307 | A = 307 (0x0133)
0x06B6 (0x000D6C) 0x5800- f:00054 d: 0 | B = A
0x06B7 (0x000D6E) 0x1800-0x3718 f:00014 d: 0 | A = 14104 (0x3718)
0x06B9 (0x000D72) 0x7C09- f:00076 d: 9 | R = OR[9]
0x06BA (0x000D74) 0x7402- f:00072 d: 2 | R = P + 2 (0x06BC)
0x06BB (0x000D76) 0x0200- f:00001 d: 0 | EXIT
0x06BC (0x000D78) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x06BD (0x000D7A) 0x292C- f:00024 d: 300 | OR[300] = A
0x06BE (0x000D7C) 0x211F- f:00020 d: 287 | A = OR[287]
0x06BF (0x000D7E) 0x2913- f:00024 d: 275 | OR[275] = A
0x06C0 (0x000D80) 0x211F- f:00020 d: 287 | A = OR[287]
0x06C1 (0x000D82) 0x1428- f:00012 d: 40 | A = A + 40 (0x0028)
0x06C2 (0x000D84) 0x2908- f:00024 d: 264 | OR[264] = A
0x06C3 (0x000D86) 0x2113- f:00020 d: 275 | A = OR[275]
0x06C4 (0x000D88) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x06C5 (0x000D8A) 0x8406- f:00102 d: 6 | P = P + 6 (0x06CB), A = 0
0x06C6 (0x000D8C) 0x1800-0x2020 f:00014 d: 0 | A = 8224 (0x2020)
0x06C8 (0x000D90) 0x3913- f:00034 d: 275 | (OR[275]) = A
0x06C9 (0x000D92) 0x2D13- f:00026 d: 275 | OR[275] = OR[275] + 1
0x06CA (0x000D94) 0x720A- f:00071 d: 10 | P = P - 10 (0x06C0)
0x06CB (0x000D96) 0x0200- f:00001 d: 0 | EXIT
0x06CC (0x000D98) 0x0000- f:00000 d: 0 | PASS
0x06CD (0x000D9A) 0x0000- f:00000 d: 0 | PASS
0x06CE (0x000D9C) 0x4348- f:00041 d: 328 | C = 1, io 0510 = BZ
0x06CF (0x000D9E) 0x414E- f:00040 d: 334 | C = 1, io 0516 = DN
0x06D0 (0x000DA0) 0x4E45- f:00047 d: 69 | A = A << B | **** non-standard encoding with D:0x0045 ****
0x06D1 (0x000DA2) 0x4C20- f:00046 d: 32 | A = A >> B | **** non-standard encoding with D:0x0020 ****
0x06D2 (0x000DA4) 0x2800- f:00024 d: 0 | OR[0] = A
0x06D3 (0x000DA6) 0x434F- f:00041 d: 335 | C = 1, io 0517 = BZ
0x06D4 (0x000DA8) 0x4E54- f:00047 d: 84 | A = A << B | **** non-standard encoding with D:0x0054 ****
0x06D5 (0x000DAA) 0x524F- f:00051 d: 79 | A = A & B | **** non-standard encoding with D:0x004F ****
0x06D6 (0x000DAC) 0x4C2D- f:00046 d: 45 | A = A >> B | **** non-standard encoding with D:0x002D ****
0x06D7 (0x000DAE) 0x554E- f:00052 d: 334 | A = A + B | **** non-standard encoding with D:0x014E ****
0x06D8 (0x000DB0) 0x4954- f:00044 d: 340 | A = A > B | **** non-standard encoding with D:0x0154 ****
0x06D9 (0x000DB2) 0x2028- f:00020 d: 40 | A = OR[40]
0x06DA (0x000DB4) 0x0000- f:00000 d: 0 | PASS
0x06DB (0x000DB6) 0x4241- f:00041 d: 65 | C = 1, io 0101 = BZ
0x06DC (0x000DB8) 0x4E4B- f:00047 d: 75 | A = A << B | **** non-standard encoding with D:0x004B ****
0x06DD (0x000DBA) 0x2028- f:00020 d: 40 | A = OR[40]
0x06DE (0x000DBC) 0x0000- f:00000 d: 0 | PASS
0x06DF (0x000DBE) 0x4445- f:00042 d: 69 | C = 1, IOB = DN | **** non-standard encoding with D:0x0045 ****
0x06E0 (0x000DC0) 0x5649- f:00053 d: 73 | A = A - B | **** non-standard encoding with D:0x0049 ****
0x06E1 (0x000DC2) 0x4345- f:00041 d: 325 | C = 1, io 0505 = BZ
0x06E2 (0x000DC4) 0x2028- f:00020 d: 40 | A = OR[40]
0x06E3 (0x000DC6) 0x0000- f:00000 d: 0 | PASS
0x06E4 (0x000DC8) 0x4E4F- f:00047 d: 79 | A = A << B | **** non-standard encoding with D:0x004F ****
0x06E5 (0x000DCA) 0x5420- f:00052 d: 32 | A = A + B | **** non-standard encoding with D:0x0020 ****
0x06E6 (0x000DCC) 0x434F- f:00041 d: 335 | C = 1, io 0517 = BZ
0x06E7 (0x000DCE) 0x4E46- f:00047 d: 70 | A = A << B | **** non-standard encoding with D:0x0046 ****
0x06E8 (0x000DD0) 0x4947- f:00044 d: 327 | A = A > B | **** non-standard encoding with D:0x0147 ****
0x06E9 (0x000DD2) 0x5552- f:00052 d: 338 | A = A + B | **** non-standard encoding with D:0x0152 ****
0x06EA (0x000DD4) 0x4544- f:00042 d: 324 | C = 1, IOB = DN | **** non-standard encoding with D:0x0144 ****
0x06EB (0x000DD6) 0x0000- f:00000 d: 0 | PASS
0x06EC (0x000DD8) 0x4E4F- f:00047 d: 79 | A = A << B | **** non-standard encoding with D:0x004F ****
0x06ED (0x000DDA) 0x5420- f:00052 d: 32 | A = A + B | **** non-standard encoding with D:0x0020 ****
0x06EE (0x000DDC) 0x4156- f:00040 d: 342 | C = 1, io 0526 = DN
0x06EF (0x000DDE) 0x4149- f:00040 d: 329 | C = 1, io 0511 = DN
0x06F0 (0x000DE0) 0x4C41- f:00046 d: 65 | A = A >> B | **** non-standard encoding with D:0x0041 ****
0x06F1 (0x000DE2) 0x424C- f:00041 d: 76 | C = 1, io 0114 = BZ
0x06F2 (0x000DE4) 0x4500- f:00042 d: 256 | C = 1, IOB = DN | **** non-standard encoding with D:0x0100 ****
0x06F3 (0x000DE6) 0x4E4F- f:00047 d: 79 | A = A << B | **** non-standard encoding with D:0x004F ****
0x06F4 (0x000DE8) 0x5420- f:00052 d: 32 | A = A + B | **** non-standard encoding with D:0x0020 ****
0x06F5 (0x000DEA) 0x4156- f:00040 d: 342 | C = 1, io 0526 = DN
0x06F6 (0x000DEC) 0x4149- f:00040 d: 329 | C = 1, io 0511 = DN
0x06F7 (0x000DEE) 0x4C41- f:00046 d: 65 | A = A >> B | **** non-standard encoding with D:0x0041 ****
0x06F8 (0x000DF0) 0x424C- f:00041 d: 76 | C = 1, io 0114 = BZ
0x06F9 (0x000DF2) 0x4520- f:00042 d: 288 | C = 1, IOB = DN | **** non-standard encoding with D:0x0120 ****
0x06FA (0x000DF4) 0x2D20- f:00026 d: 288 | OR[288] = OR[288] + 1
0x06FB (0x000DF6) 0x4348- f:00041 d: 328 | C = 1, io 0510 = BZ
0x06FC (0x000DF8) 0x414E- f:00040 d: 334 | C = 1, io 0516 = DN
0x06FD (0x000DFA) 0x4E45- f:00047 d: 69 | A = A << B | **** non-standard encoding with D:0x0045 ****
0x06FE (0x000DFC) 0x4C20- f:00046 d: 32 | A = A >> B | **** non-standard encoding with D:0x0020 ****
0x06FF (0x000DFE) 0x4953- f:00044 d: 339 | A = A > B | **** non-standard encoding with D:0x0153 ****
0x0700 (0x000E00) 0x204F- f:00020 d: 79 | A = OR[79]
0x0701 (0x000E02) 0x4646- f:00043 d: 70 | C = 1, IOB = BZ | **** non-standard encoding with D:0x0046 ****
0x0702 (0x000E04) 0x4C49- f:00046 d: 73 | A = A >> B | **** non-standard encoding with D:0x0049 ****
0x0703 (0x000E06) 0x4E45- f:00047 d: 69 | A = A << B | **** non-standard encoding with D:0x0045 ****
0x0704 (0x000E08) 0x0000- f:00000 d: 0 | PASS
0x0705 (0x000E0A) 0x4E4F- f:00047 d: 79 | A = A << B | **** non-standard encoding with D:0x004F ****
0x0706 (0x000E0C) 0x5420- f:00052 d: 32 | A = A + B | **** non-standard encoding with D:0x0020 ****
0x0707 (0x000E0E) 0x4156- f:00040 d: 342 | C = 1, io 0526 = DN
0x0708 (0x000E10) 0x4149- f:00040 d: 329 | C = 1, io 0511 = DN
0x0709 (0x000E12) 0x4C41- f:00046 d: 65 | A = A >> B | **** non-standard encoding with D:0x0041 ****
0x070A (0x000E14) 0x424C- f:00041 d: 76 | C = 1, io 0114 = BZ
0x070B (0x000E16) 0x4520- f:00042 d: 288 | C = 1, IOB = DN | **** non-standard encoding with D:0x0120 ****
0x070C (0x000E18) 0x2D20- f:00026 d: 288 | OR[288] = OR[288] + 1
0x070D (0x000E1A) 0x414C- f:00040 d: 332 | C = 1, io 0514 = DN
0x070E (0x000E1C) 0x4C20- f:00046 d: 32 | A = A >> B | **** non-standard encoding with D:0x0020 ****
0x070F (0x000E1E) 0x4445- f:00042 d: 69 | C = 1, IOB = DN | **** non-standard encoding with D:0x0045 ****
0x0710 (0x000E20) 0x5649- f:00053 d: 73 | A = A - B | **** non-standard encoding with D:0x0049 ****
0x0711 (0x000E22) 0x4345- f:00041 d: 325 | C = 1, io 0505 = BZ
0x0712 (0x000E24) 0x5320- f:00051 d: 288 | A = A & B | **** non-standard encoding with D:0x0120 ****
0x0713 (0x000E26) 0x4152- f:00040 d: 338 | C = 1, io 0522 = DN
0x0714 (0x000E28) 0x4520- f:00042 d: 288 | C = 1, IOB = DN | **** non-standard encoding with D:0x0120 ****
0x0715 (0x000E2A) 0x4F50- f:00047 d: 336 | A = A << B | **** non-standard encoding with D:0x0150 ****
0x0716 (0x000E2C) 0x454E- f:00042 d: 334 | C = 1, IOB = DN | **** non-standard encoding with D:0x014E ****
0x0717 (0x000E2E) 0x0000- f:00000 d: 0 | PASS
0x0718 (0x000E30) 0x4E4F- f:00047 d: 79 | A = A << B | **** non-standard encoding with D:0x004F ****
0x0719 (0x000E32) 0x5420- f:00052 d: 32 | A = A + B | **** non-standard encoding with D:0x0020 ****
0x071A (0x000E34) 0x4156- f:00040 d: 342 | C = 1, io 0526 = DN
0x071B (0x000E36) 0x4149- f:00040 d: 329 | C = 1, io 0511 = DN
0x071C (0x000E38) 0x4C41- f:00046 d: 65 | A = A >> B | **** non-standard encoding with D:0x0041 ****
0x071D (0x000E3A) 0x424C- f:00041 d: 76 | C = 1, io 0114 = BZ
0x071E (0x000E3C) 0x4520- f:00042 d: 288 | C = 1, IOB = DN | **** non-standard encoding with D:0x0120 ****
0x071F (0x000E3E) 0x2D20- f:00026 d: 288 | OR[288] = OR[288] + 1
0x0720 (0x000E40) 0x5345- f:00051 d: 325 | A = A & B | **** non-standard encoding with D:0x0145 ****
0x0721 (0x000E42) 0x4C45- f:00046 d: 69 | A = A >> B | **** non-standard encoding with D:0x0045 ****
0x0722 (0x000E44) 0x4354- f:00041 d: 340 | C = 1, io 0524 = BZ
0x0723 (0x000E46) 0x494F- f:00044 d: 335 | A = A > B | **** non-standard encoding with D:0x014F ****
0x0724 (0x000E48) 0x4E20- f:00047 d: 32 | A = A << B | **** non-standard encoding with D:0x0020 ****
0x0725 (0x000E4A) 0x4641- f:00043 d: 65 | C = 1, IOB = BZ | **** non-standard encoding with D:0x0041 ****
0x0726 (0x000E4C) 0x494C- f:00044 d: 332 | A = A > B | **** non-standard encoding with D:0x014C ****
0x0727 (0x000E4E) 0x4544- f:00042 d: 324 | C = 1, IOB = DN | **** non-standard encoding with D:0x0144 ****
0x0728 (0x000E50) 0x0000- f:00000 d: 0 | PASS
0x0729 (0x000E52) 0x4F4E- f:00047 d: 334 | A = A << B | **** non-standard encoding with D:0x014E ****
0x072A (0x000E54) 0x4C49- f:00046 d: 73 | A = A >> B | **** non-standard encoding with D:0x0049 ****
0x072B (0x000E56) 0x4E45- f:00047 d: 69 | A = A << B | **** non-standard encoding with D:0x0045 ****
0x072C (0x000E58) 0x0000- f:00000 d: 0 | PASS
0x072D (0x000E5A) 0x4F46- f:00047 d: 326 | A = A << B | **** non-standard encoding with D:0x0146 ****
0x072E (0x000E5C) 0x464C- f:00043 d: 76 | C = 1, IOB = BZ | **** non-standard encoding with D:0x004C ****
0x072F (0x000E5E) 0x494E- f:00044 d: 334 | A = A > B | **** non-standard encoding with D:0x014E ****
0x0730 (0x000E60) 0x4500- f:00042 d: 256 | C = 1, IOB = DN | **** non-standard encoding with D:0x0100 ****
0x0731 (0x000E62) 0x4F4E- f:00047 d: 334 | A = A << B | **** non-standard encoding with D:0x014E ****
0x0732 (0x000E64) 0x4C49- f:00046 d: 73 | A = A >> B | **** non-standard encoding with D:0x0049 ****
0x0733 (0x000E66) 0x4E45- f:00047 d: 69 | A = A << B | **** non-standard encoding with D:0x0045 ****
0x0734 (0x000E68) 0x2F55- f:00027 d: 341 | OR[341] = OR[341] - 1
0x0735 (0x000E6A) 0x5000- f:00050 d: 0 | A = B
0x0736 (0x000E6C) 0x4F4E- f:00047 d: 334 | A = A << B | **** non-standard encoding with D:0x014E ****
0x0737 (0x000E6E) 0x4C49- f:00046 d: 73 | A = A >> B | **** non-standard encoding with D:0x0049 ****
0x0738 (0x000E70) 0x4E45- f:00047 d: 69 | A = A << B | **** non-standard encoding with D:0x0045 ****
0x0739 (0x000E72) 0x2F44- f:00027 d: 324 | OR[324] = OR[324] - 1
0x073A (0x000E74) 0x4F57- f:00047 d: 343 | A = A << B | **** non-standard encoding with D:0x0157 ****
0x073B (0x000E76) 0x4E00- f:00047 d: 0 | A = A << B
0x073C (0x000E78) 0x5550- f:00052 d: 336 | A = A + B | **** non-standard encoding with D:0x0150 ****
0x073D (0x000E7A) 0x0000- f:00000 d: 0 | PASS
0x073E (0x000E7C) 0x444F- f:00042 d: 79 | C = 1, IOB = DN | **** non-standard encoding with D:0x004F ****
0x073F (0x000E7E) 0x574E- f:00053 d: 334 | A = A - B | **** non-standard encoding with D:0x014E ****
0x0740 (0x000E80) 0x0000- f:00000 d: 0 | PASS
0x0741 (0x000E82) 0x4441- f:00042 d: 65 | C = 1, IOB = DN | **** non-standard encoding with D:0x0041 ****
0x0742 (0x000E84) 0x5441- f:00052 d: 65 | A = A + B | **** non-standard encoding with D:0x0041 ****
0x0743 (0x000E86) 0x2052- f:00020 d: 82 | A = OR[82]
0x0744 (0x000E88) 0x4547- f:00042 d: 327 | C = 1, IOB = DN | **** non-standard encoding with D:0x0147 ****
0x0745 (0x000E8A) 0x4953- f:00044 d: 339 | A = A > B | **** non-standard encoding with D:0x0153 ****
0x0746 (0x000E8C) 0x5445- f:00052 d: 69 | A = A + B | **** non-standard encoding with D:0x0045 ****
0x0747 (0x000E8E) 0x5220- f:00051 d: 32 | A = A & B | **** non-standard encoding with D:0x0020 ****
0x0748 (0x000E90) 0x4552- f:00042 d: 338 | C = 1, IOB = DN | **** non-standard encoding with D:0x0152 ****
0x0749 (0x000E92) 0x524F- f:00051 d: 79 | A = A & B | **** non-standard encoding with D:0x004F ****
0x074A (0x000E94) 0x5200- f:00051 d: 0 | A = A & B
0x074B (0x000E96) 0x4259- f:00041 d: 89 | C = 1, io 0131 = BZ
0x074C (0x000E98) 0x5445- f:00052 d: 69 | A = A + B | **** non-standard encoding with D:0x0045 ****
0x074D (0x000E9A) 0x2052- f:00020 d: 82 | A = OR[82]
0x074E (0x000E9C) 0x4547- f:00042 d: 327 | C = 1, IOB = DN | **** non-standard encoding with D:0x0147 ****
0x074F (0x000E9E) 0x4953- f:00044 d: 339 | A = A > B | **** non-standard encoding with D:0x0153 ****
0x0750 (0x000EA0) 0x5445- f:00052 d: 69 | A = A + B | **** non-standard encoding with D:0x0045 ****
0x0751 (0x000EA2) 0x5220- f:00051 d: 32 | A = A & B | **** non-standard encoding with D:0x0020 ****
0x0752 (0x000EA4) 0x4552- f:00042 d: 338 | C = 1, IOB = DN | **** non-standard encoding with D:0x0152 ****
0x0753 (0x000EA6) 0x524F- f:00051 d: 79 | A = A & B | **** non-standard encoding with D:0x004F ****
0x0754 (0x000EA8) 0x5200- f:00051 d: 0 | A = A & B
0x0755 (0x000EAA) 0x5354- f:00051 d: 340 | A = A & B | **** non-standard encoding with D:0x0154 ****
0x0756 (0x000EAC) 0x4154- f:00040 d: 340 | C = 1, io 0524 = DN
0x0757 (0x000EAE) 0x5553- f:00052 d: 339 | A = A + B | **** non-standard encoding with D:0x0153 ****
0x0758 (0x000EB0) 0x2052- f:00020 d: 82 | A = OR[82]
0x0759 (0x000EB2) 0x4547- f:00042 d: 327 | C = 1, IOB = DN | **** non-standard encoding with D:0x0147 ****
0x075A (0x000EB4) 0x4953- f:00044 d: 339 | A = A > B | **** non-standard encoding with D:0x0153 ****
0x075B (0x000EB6) 0x5445- f:00052 d: 69 | A = A + B | **** non-standard encoding with D:0x0045 ****
0x075C (0x000EB8) 0x5220- f:00051 d: 32 | A = A & B | **** non-standard encoding with D:0x0020 ****
0x075D (0x000EBA) 0x4552- f:00042 d: 338 | C = 1, IOB = DN | **** non-standard encoding with D:0x0152 ****
0x075E (0x000EBC) 0x524F- f:00051 d: 79 | A = A & B | **** non-standard encoding with D:0x004F ****
0x075F (0x000EBE) 0x5200- f:00051 d: 0 | A = A & B
0x0760 (0x000EC0) 0x5449- f:00052 d: 73 | A = A + B | **** non-standard encoding with D:0x0049 ****
0x0761 (0x000EC2) 0x4D45- f:00046 d: 325 | A = A >> B | **** non-standard encoding with D:0x0145 ****
0x0762 (0x000EC4) 0x4F55- f:00047 d: 341 | A = A << B | **** non-standard encoding with D:0x0155 ****
0x0763 (0x000EC6) 0x5400- f:00052 d: 0 | A = A + B
0x0764 (0x000EC8) 0x2020- f:00020 d: 32 | A = OR[32]
0x0765 (0x000ECA) 0x2020- f:00020 d: 32 | A = OR[32]
0x0766 (0x000ECC) 0x202D- f:00020 d: 45 | A = OR[45]
0x0767 (0x000ECE) 0x2044- f:00020 d: 68 | A = OR[68]
0x0768 (0x000ED0) 0x4154- f:00040 d: 340 | C = 1, io 0524 = DN
0x0769 (0x000ED2) 0x4120- f:00040 d: 288 | C = 1, io 0440 = DN
0x076A (0x000ED4) 0x4558- f:00042 d: 344 | C = 1, IOB = DN | **** non-standard encoding with D:0x0158 ****
0x076B (0x000ED6) 0x5045- f:00050 d: 69 | A = B | **** non-standard encoding with D:0x0045 ****
0x076C (0x000ED8) 0x4354- f:00041 d: 340 | C = 1, io 0524 = BZ
0x076D (0x000EDA) 0x4544- f:00042 d: 324 | C = 1, IOB = DN | **** non-standard encoding with D:0x0144 ****
0x076E (0x000EDC) 0x3A20- f:00035 d: 32 | (OR[32]) = A + (OR[32])
0x076F (0x000EDE) 0x2020- f:00020 d: 32 | A = OR[32]
0x0770 (0x000EE0) 0x2020- f:00020 d: 32 | A = OR[32]
0x0771 (0x000EE2) 0x2020- f:00020 d: 32 | A = OR[32]
0x0772 (0x000EE4) 0x0000- f:00000 d: 0 | PASS
0x0773 (0x000EE6) 0x2020- f:00020 d: 32 | A = OR[32]
0x0774 (0x000EE8) 0x2020- f:00020 d: 32 | A = OR[32]
0x0775 (0x000EEA) 0x202D- f:00020 d: 45 | A = OR[45]
0x0776 (0x000EEC) 0x2044- f:00020 d: 68 | A = OR[68]
0x0777 (0x000EEE) 0x4154- f:00040 d: 340 | C = 1, io 0524 = DN
0x0778 (0x000EF0) 0x4120- f:00040 d: 288 | C = 1, io 0440 = DN
0x0779 (0x000EF2) 0x5245- f:00051 d: 69 | A = A & B | **** non-standard encoding with D:0x0045 ****
0x077A (0x000EF4) 0x4345- f:00041 d: 325 | C = 1, io 0505 = BZ
0x077B (0x000EF6) 0x4956- f:00044 d: 342 | A = A > B | **** non-standard encoding with D:0x0156 ****
0x077C (0x000EF8) 0x4544- f:00042 d: 324 | C = 1, IOB = DN | **** non-standard encoding with D:0x0144 ****
0x077D (0x000EFA) 0x3A20- f:00035 d: 32 | (OR[32]) = A + (OR[32])
0x077E (0x000EFC) 0x2020- f:00020 d: 32 | A = OR[32]
0x077F (0x000EFE) 0x2020- f:00020 d: 32 | A = OR[32]
0x0780 (0x000F00) 0x2020- f:00020 d: 32 | A = OR[32]
0x0781 (0x000F02) 0x0000- f:00000 d: 0 | PASS
0x0782 (0x000F04) 0x0000- f:00000 d: 0 | PASS
0x0783 (0x000F06) 0x0000- f:00000 d: 0 | PASS
|
Prelude.agda | divipp/frp_agda | 21 | 10088 | module Prelude where
open import Data.Unit using (⊤) public
open import Data.Empty using (⊥) public
open import Function using (id; const; flip) public
open import Data.Sum using (_⊎_; inj₁; inj₂) public
open import Data.Product using (Σ; proj₁; proj₂; _,_; _×_) public
open import Data.Maybe using (Maybe; nothing; just) public
open import Data.Nat using (ℕ; _+_; zero; suc) public
open import Data.Fin using (Fin; zero; suc; toℕ; fromℕ) public
open import Data.Vec using (Vec; _∷_; []) public
open import Data.String using (String) public
open import Data.Float using (Float) renaming (show to primShowFloat) public
open import Agda.Builtin.Float
variable S T A B C D S' T' A' B' : Set
-- redefine Bool to avoid COMPILE JS pragma on std-lib's Bool
data Bool : Set where
false true : Bool
not : Bool → Bool
not true = false
not false = true
if_then_else_ : Bool → A → A → A
if true then a else b = a
if false then a else b = b
_==_ : Bool → Bool → Bool
true == false = false
true == true = true
false == false = true
false == true = false
maybe : B → (A → B) → Maybe A → B
maybe b f nothing = b
maybe b f (just x) = f x
mapMaybe : (A → B) → Maybe A → Maybe B
mapMaybe f = maybe nothing λ a → just (f a)
data _⊍_ (A B : Set) : Set where
inj₁ : A → A ⊍ B
inj₂ : B → A ⊍ B
both : A → B → A ⊍ B
variable n : ℕ
postulate
showNat : ℕ → String
primStringAppend : String → String → String
primParseFloat : String → Float
isNaN : Float → Bool
{-# COMPILE JS showNat = a=>JSON.stringify(a) #-}
{-# COMPILE JS primStringAppend = a=>b=>a+b #-}
{-# COMPILE JS primParseFloat = a=>Number(a) #-}
{-# COMPILE JS isNaN = a=>b=>b[isNaN(a)?1:0]() #-}
Iso = λ (S T A B : Set) → (S → A) × (B → T)
Lens = λ (S T A B : Set) → S → A × (B → T)
Prism = λ (S T A B : Set) → (S → A ⊎ T) × (B → T)
plusIso : Float → Iso Float Float Float Float
plusIso x = primFloatPlus x , λ y → primFloatMinus y x
mulIso : Float → Iso Float Float Float Float
mulIso x = primFloatTimes x , λ y → primFloatDiv y x
prismToLens : Prism S T A B → Lens (Maybe S) (Maybe T) (Maybe A) (Maybe B)
prismToLens (p1 , p2) nothing = nothing , mapMaybe p2
prismToLens (p1 , p2) (just s) with p1 s
... | inj₁ a = just a , mapMaybe p2
... | inj₂ t = nothing , const (just t)
floatPrism : Prism String (Maybe String) Float Float
floatPrism = parse , (λ x → just (primShowFloat x))
where
parse : String → _
parse s = if isNaN p then inj₂ nothing else inj₁ p
where
p = primParseFloat s
|
src/main/antlr4/com/github/ayweak/cognitivecomplexity/CLexer.g4 | ayweak/cognitive-complexity | 0 | 5143 | <gh_stars>0
lexer grammar CLexer;
options {
language = Java;
}
channels {
PREPROCESSOR_CHANNEL
}
@members {
boolean afterNewline;
boolean inPp;
int ppBackslashNewlineSequenceLength;
Token lastToken;
@Override
public void emit(Token token) {
super.emit(token);
lastToken = token;
afterNewline = false;
}
@Override
public Token emit() {
if (inPp) {
setChannel(PREPROCESSOR_CHANNEL);
}
return super.emit();
}
}
// Keyword
Auto : 'auto';
Break : 'break';
Case : 'case';
Char : 'char';
Const : 'const';
Continue : 'continue';
Default : 'default';
Do : 'do';
Double : 'double';
Else : 'else';
Enum : 'enum';
Extern : 'extern';
Float : 'float';
For : 'for';
Goto : 'goto';
If : 'if';
Inline : 'inline';
Int : 'int';
Long : 'long';
Register : 'register';
Restrict : 'restrict';
Return : 'return';
Short : 'short';
Signed : 'signed';
Sizeof : 'sizeof';
Static : 'static';
Struct : 'struct';
Switch : 'switch';
Typedef : 'typedef';
Union : 'union';
Unsigned : 'unsigned';
Void : 'void';
Volatile : 'volatile';
While : 'while';
Alignas : '_Alignas';
Alignof : '_Alignof';
Atomic : '_Atomic';
Bool : '_Bool';
Complex : '_Complex';
Generic : '_Generic';
Imaginary : '_Imaginary';
Noreturn : '_Noreturn';
StaticAssert : '_Static_assert';
ThreadLocal : '_Thread_local';
// Extension keyword
ExtKwExtension : '__extension__';
ExtKwBuiltinVaArg : '__builtin_va_arg';
ExtKwBuiltinOffsetof : '__builtin_offsetof';
ExtKwM128 : '__m128';
ExtKwM128d : '__m128d';
ExtKwM128i : '__m128i';
ExtKwTypeof : '__typeof__';
ExtKwInline : '__inline__';
ExtKwStdcall : '__stdcall';
ExtKwDeclspec : '__declspec';
ExtKwAsm1 : '__asm';
ExtKwAsm2 : '__asm__';
ExtKwAttribute : '__attribute__';
ExtKwVolatile : '__volatile__';
// Punctuator
LeftParen : '(';
RightParen : ')';
LeftBracket : '[';
RightBracket : ']';
LeftBrace : '{';
RightBrace : '}';
Less : '<';
LessEqual : '<=';
Greater : '>';
GreaterEqual : '>=';
LeftShift : '<<';
RightShift : '>>';
Plus : '+';
PlusPlus : '++';
Minus : '-';
MinusMinus : '--';
Star : '*';
Div : '/';
Mod : '%';
And : '&';
Or : '|';
AndAnd : '&&';
OrOr : '||';
Caret : '^';
Not : '!';
Tilde : '~';
Question : '?';
Colon : ':';
Semi : ';';
Comma : ',';
Assign : '=';
// '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '&=' | '^=' | '|='
StarAssign : '*=';
DivAssign : '/=';
ModAssign : '%=';
PlusAssign : '+=';
MinusAssign : '-=';
LeftShiftAssign : '<<=';
RightShiftAssign : '>>=';
AndAssign : '&=';
XorAssign : '^=';
OrAssign : '|=';
Equal : '==';
NotEqual : '!=';
Arrow : '->';
Dot : '.';
Ellipsis : '...';
PpHash
: Hash
{ afterNewline || lastToken == null || lastToken.getType() == Newline }?
{ inPp = true; }
-> mode(Preprocessor)
;
Hash : '#';
HashHash : '##';
//
Identifier
: IdentifierNondigit
( IdentifierNondigit
| Digit
)*
;
fragment
IdentifierNondigit
: Nondigit
| UniversalCharacterName
//| // other implementation-defined characters...
;
fragment
Nondigit
: [a-zA-Z_]
;
fragment
Digit
: [0-9]
;
fragment
UniversalCharacterName
: '\\u' HexQuad
| '\\U' HexQuad HexQuad
;
fragment
HexQuad
: HexadecimalDigit HexadecimalDigit HexadecimalDigit HexadecimalDigit
;
//
Constant
: IntegerConstant
| FloatingConstant
//| EnumerationConstant
| CharacterConstant
;
fragment
IntegerConstant
: DecimalConstant IntegerSuffix?
| OctalConstant IntegerSuffix?
| HexadecimalConstant IntegerSuffix?
| BinaryConstant
;
fragment
BinaryConstant
: '0' [bB] [0-1]+
;
fragment
DecimalConstant
: NonzeroDigit Digit*
;
fragment
OctalConstant
: '0' OctalDigit*
;
fragment
HexadecimalConstant
: HexadecimalPrefix HexadecimalDigit+
;
fragment
HexadecimalPrefix
: '0' [xX]
;
fragment
NonzeroDigit
: [1-9]
;
fragment
OctalDigit
: [0-7]
;
fragment
HexadecimalDigit
: [0-9a-fA-F]
;
fragment
IntegerSuffix
: UnsignedSuffix LongSuffix?
| UnsignedSuffix LongLongSuffix
| LongSuffix UnsignedSuffix?
| LongLongSuffix UnsignedSuffix?
;
fragment
UnsignedSuffix
: [uU]
;
fragment
LongSuffix
: [lL]
;
fragment
LongLongSuffix
: 'll' | 'LL'
;
fragment
FloatingConstant
: DecimalFloatingConstant
| HexadecimalFloatingConstant
;
fragment
DecimalFloatingConstant
: FractionalConstant ExponentPart? FloatingSuffix?
| DigitSequence ExponentPart FloatingSuffix?
;
fragment
HexadecimalFloatingConstant
: HexadecimalPrefix (HexadecimalFractionalConstant | HexadecimalDigitSequence) BinaryExponentPart FloatingSuffix?
;
fragment
FractionalConstant
: DigitSequence? '.' DigitSequence
| DigitSequence '.'
;
fragment
ExponentPart
: [eE] Sign? DigitSequence
;
fragment
Sign
: [+-]
;
DigitSequence
: Digit+
;
fragment
HexadecimalFractionalConstant
: HexadecimalDigitSequence? '.' HexadecimalDigitSequence
| HexadecimalDigitSequence '.'
;
fragment
BinaryExponentPart
: [pP] Sign? DigitSequence
;
fragment
HexadecimalDigitSequence
: HexadecimalDigit+
;
fragment
FloatingSuffix
: [flFL]
;
fragment
CharacterConstant
: '\'' CCharSequence '\''
| 'L\'' CCharSequence '\''
| 'u\'' CCharSequence '\''
| 'U\'' CCharSequence '\''
;
fragment
CCharSequence
: CChar+
;
fragment
CChar
: ~['\\\r\n]
| EscapeSequence
| BackslashNewline
;
fragment
EscapeSequence
: SimpleEscapeSequence
| OctalEscapeSequence
| HexadecimalEscapeSequence
| UniversalCharacterName
;
fragment
SimpleEscapeSequence
: '\\' ['"?abfnrtv\\]
;
fragment
OctalEscapeSequence
: '\\' OctalDigit OctalDigit? OctalDigit?
;
fragment
HexadecimalEscapeSequence
: '\\x' HexadecimalDigit+
;
//
StringLiteral
: EncodingPrefix? '"' SCharSequence? '"'
;
fragment
EncodingPrefix
: 'u8'
| 'u'
| 'U'
| 'L'
;
fragment
SCharSequence
: SChar+
;
fragment
SChar
: ~["\\\r\n]
| EscapeSequence
| '\\\n' // Added line
| '\\\r\n' // Added line
;
// ignore the following asm blocks:
/*
asm
{
mfspr x, 286;
}
*/
AsmBlock
: 'asm' ~'{'* '{' ~'}'* '}'
-> skip
;
Whitespace
: [ \t]+
-> skip
;
Newline
: '\r'? '\n'
{
if (inPp) {
setChannel(PREPROCESSOR_CHANNEL);
inPp = false;
} else {
skip();
afterNewline = true;
}
}
;
BackslashNewline
: '\\' '\r'? '\n'
-> skip
;
BlockComment
: '/*' .*? '*/'
-> skip
;
LineComment
: '//' ~[\r\n]*
-> skip
;
mode Preprocessor;
PpIf
: 'if'
{ lastToken.getType() == PpHash }?
;
PpIfdef
: 'ifdef'
{ lastToken.getType() == PpHash }?
;
PpIfndef
: 'ifndef'
{ lastToken.getType() == PpHash }?
;
PpElif
: 'elif'
{ lastToken.getType() == PpHash }?
;
PpElse
: 'else'
{ lastToken.getType() == PpHash }?
;
PpEndif
: 'endif'
{ lastToken.getType() == PpHash }?
;
PpInclude
: 'include'
{ lastToken.getType() == PpHash }?
;
PpDefine
: 'define'
{ lastToken.getType() == PpHash }?
;
PpUndef
: 'undef'
{ lastToken.getType() == PpHash }?
;
PpLine
: 'line'
{ lastToken.getType() == PpHash }?
;
PpError
: 'error'
{ lastToken.getType() == PpHash }?
;
PpPragma
: 'pragma'
{ lastToken.getType() == PpHash }?
;
HeaderName
: ( '<' ~[>\r\n]+ '>' | '"' ~["\r\n]+ '"' )
{ lastToken.getType() == PpInclude }?
;
MacroName
: Identifier
{ lastToken.getType() == PpDefine }?
{ ppBackslashNewlineSequenceLength = 0; }
;
MacroLeftParen
: LeftParen
{ lastToken.getType() == MacroName
&& lastToken.getStopIndex() == _tokenStartCharIndex - ppBackslashNewlineSequenceLength - 1 }?
;
PpWhitespace
: Whitespace
-> skip
;
PpNewline
: Newline
{ inPp = false; }
-> type(Newline), channel(PREPROCESSOR_CHANNEL), mode(DEFAULT_MODE)
;
PpBackslashNewline
: BackslashNewline
{ ppBackslashNewlineSequenceLength += getText().length(); }
-> skip
;
PpBlockComment
: BlockComment
-> skip
;
PpAny
: .
{
// seek で後戻りしても改行のカウントは戻らないので、改行は PpNewline で一致させる。
_input.seek(_tokenStartCharIndex);
}
-> skip, mode(DEFAULT_MODE)
;
|
gfx/pokemon/tyrogue/anim.asm | Dev727/ancientplatinum | 28 | 20069 | <filename>gfx/pokemon/tyrogue/anim.asm
frame 1, 08
setrepeat 4
frame 2, 05
frame 3, 06
dorepeat 2
endanim
|
libsrc/_DEVELOPMENT/stdio/c/sccz80/ungetc_unlocked_callee.asm | jpoikela/z88dk | 640 | 243816 |
; int ungetc_unlocked(int c, FILE *stream)
SECTION code_clib
SECTION code_stdio
PUBLIC ungetc_unlocked_callee
EXTERN asm_ungetc_unlocked
ungetc_unlocked_callee:
pop hl
pop ix
ex (sp),hl
jp asm_ungetc_unlocked
|
src/Sym_Expr/symbolic_expressions-parsing.adb | fintatarta/eugen | 0 | 15969 | <gh_stars>0
pragma Ada_2012;
with Tokenize.Token_Vectors;
with Ada.Strings.Fixed;
with Ada.Text_IO; use Ada.Text_IO;
package body Symbolic_Expressions.Parsing is
Verbose : constant Boolean := False;
-- Set to true to enable debug prints
-------------
-- Exactly --
-------------
function Exactly (N : Natural) return Parameter_Count
is
begin
return Parameter_Count'(Min => N, Max => N);
end Exactly;
--------------
-- At_Least --
--------------
function At_Least (N : Natural) return Parameter_Count
is
begin
return Parameter_Count'(Min => N, Max => Natural'Last);
end At_Least;
-------------
-- Between --
-------------
function Between (Min, Max : Natural) return Parameter_Count
is
begin
return Parameter_Count'(Min => Min, Max => Max);
end Between;
---------------------
-- Define_Variable --
---------------------
procedure Define_Variable (Container : in out ID_Table_Type;
Name : Variable_Name)
is
begin
Container.T.Include (Identifier (Name), (Class => Var));
end Define_Variable;
---------------------
-- Define_Function --
---------------------
procedure Define_Function (Container : in out ID_Table_Type;
Name : Function_Name;
N_Params : Parameter_Count)
is
begin
Container.T.Include (Identifier (Name), (Class => Funct, N_Param => N_Params));
end Define_Function;
-------------------
-- Is_Acceptable --
-------------------
function Is_Acceptable (N_Param : Natural;
Limits : Parameter_Count)
return Boolean
is
begin
return N_Param >= Limits.Min and N_Param <= Limits.Max;
end Is_Acceptable;
function "&" (X : String ; ID : Identifier) return String
is (X & " '" & ID_Image (ID) & "' ");
function "&" (ID : Identifier; X : String) return String
is (" '" & ID_Image (ID) & "' " & X);
-- function Msg (ID : Identifier; Post : String) return String
-- is ("'" & ID_Image (ID) & "' " & Post);
--
-- function Msg (Pre : String; ID : Identifier; Post : String := "") return String
-- is (Pre & " '" & ID_Image (ID) & "' " & Post);
-----------
-- Parse --
-----------
function Parse (Input : String;
ID_Table : ID_Table_Type := Empty_ID_Table;
On_Unknown_ID : Unknown_ID_Action_Type := OK;
Prefixes : String := "";
Prefix_Separator : String := ".";
On_Multiple_Match : Multiple_Match_Action := Allow_Unprefixed)
return Symbolic_Expression
is
pragma Unreferenced (Prefix_Separator);
use Tokenize;
Buffer : constant String := Input;
Cursor : Positive;
Current_Char : Character;
EOS : constant Character := Character'Val (0);
type ID_Array is array (Positive range <>) of Identifier;
function To_ID_Array (X : Token_Vectors.Vector) return ID_Array
is
Result : ID_Array (X.First_Index .. X.Last_Index);
begin
for I in Result'Range loop
declare
S : constant String := X (I);
OK : Boolean;
Consumed : Natural;
begin
Read_Identifier (Input => S,
Success => OK,
Consumed => Consumed,
Result => Result (I));
if not OK or Consumed < S'Length then
raise Parsing_Error;
end if;
end;
end loop;
return Result;
end To_ID_Array;
Prefix_List : constant ID_Array :=
To_ID_Array (Token_Vectors.To_Vector (Split (Prefixes)));
procedure Init_Scanner is
begin
Cursor := Buffer'First;
while Cursor <= Buffer'Last and then Buffer (Cursor) = ' ' loop
Cursor := Cursor + 1;
end loop;
if Cursor <= Buffer'Last then
Current_Char := Buffer (Cursor);
else
Current_Char := EOS;
end if;
end Init_Scanner;
procedure Next_Char (Skip_Spaces : Boolean := True) is
begin
loop
if Cursor >= Buffer'Last then
Current_Char := EOS;
else
Cursor := Cursor + 1;
Current_Char := Buffer (Cursor);
end if;
exit when (not Skip_Spaces) or Current_Char /= ' ';
end loop;
end Next_Char;
procedure Expect (What : Character) is
begin
if Current_Char /= What then
raise Parsing_Error
with "Expecting '" & What & "' got '" & Current_Char & "'";
else
Next_Char;
end if;
end Expect;
function Remaining return String is
begin
return Buffer (Cursor .. Buffer'Last);
end Remaining;
Level : Natural := 0;
function Indent return String is
use Ada.Strings.Fixed;
begin
return (Level * 3) * " ";
end Indent;
procedure Down_Level is
begin
Level := Level + 1;
end Down_Level;
procedure Up_Level is
begin
Level := Level - 1;
end Up_Level;
procedure Ecco (X : String) is
begin
if Verbose then
Ada.Text_Io.Put_Line (Indent
& "Calling "
& X & "[" & Remaining & "]"
& "'" & Current_Char & "'");
Down_Level;
end if;
end Ecco;
procedure Fine is
begin
if Verbose then
Up_Level;
Ada.Text_Io.Put_Line (Indent & "done " & "[" & Remaining & "]"
& "'" & Current_Char & "'");
end if;
end Fine;
procedure Advance (N : Positive) is
begin
Cursor := Cursor + N - 1;
Next_Char;
end Advance;
function Parse_Expr return Node_Access;
-- function Parse_Identifier return Bounded_ID is
-- use Ada.Strings.Maps;
-- use Bounded_IDs;
--
-- Result : Bounded_ID;
-- ID_Chars : constant Character_Set :=
-- To_Set (Character_Range'('a', 'z')) or
-- To_Set (Character_Range'('A', 'Z')) or
-- To_Set (Character_Range'('0', '9')) or
-- To_Set ('.') or
-- To_Set ('_');
-- begin
-- Ecco ("ID");
--
-- while Is_In (Current_Char, ID_Chars) loop
-- Result := Result & Current_Char;
-- Next_Char (Skip_Spaces => False);
-- end loop;
--
-- if Current_Char = ' ' then
-- Next_Char;
-- end if;
--
-- Fine;
-- return Result;
-- end Parse_Identifier;
procedure Parse_Parameter_List (Parameters : out Parameter_Array;
N_Params : out Natural)
is
begin
Ecco ("par-list");
if Current_Char = ')' then
N_Params := 0;
else
N_Params := 1;
Parameters (1) := Parse_Expr;
while Current_Char = ',' loop
Next_Char;
N_Params := N_Params + 1;
Parameters (N_Params) := Parse_Expr;
end loop;
end if;
Expect (')');
Fine;
exception
when others =>
for I in Parameters'First .. N_Params - 1 loop
Free (Parameters (I));
end loop;
raise;
end Parse_Parameter_List;
procedure Resolve_Identifier (Raw_ID : in Identifier;
Pos : out ID_Tables.Cursor;
N_Matches : out Natural;
Resolved : out Identifier;
No_Prefix_Needed : out Boolean)
with Post =>
(
(ID_Tables."=" (Pos, ID_Tables.No_Element) = (N_Matches = 0))
);
procedure Resolve_Identifier (Raw_ID : in Identifier;
Pos : out ID_Tables.Cursor;
N_Matches : out Natural;
Resolved : out Identifier;
No_Prefix_Needed : out Boolean)
is
use ID_Tables;
begin
No_Prefix_Needed := False;
N_Matches := 0;
Pos := ID_Table.T.Find (Raw_ID);
if Pos /= No_Element then
Resolved := Raw_ID;
No_Prefix_Needed := True;
N_Matches := 1;
end if;
declare
Tmp : Identifier;
begin
for I in Prefix_List'Range loop
Tmp := Join (Prefix_List (I), Raw_ID);
Pos := ID_Table.T.Find (Tmp);
if Pos /= No_Element then
N_Matches := N_Matches + 1;
if N_Matches = 1 then
Resolved := Tmp;
end if;
end if;
end loop;
end;
pragma Assert
((Pos /= No_Element) = (N_Matches > 0));
end Resolve_Identifier;
function Parse_Simple return Node_Access is
use ID_Tables;
function Try_Parenthesis (Result : out Node_Access) return Boolean
is
begin
if Current_Char = '(' then
Next_Char;
Result := Parse_Expr;
Expect (')');
return True;
else
return False;
end if;
end Try_Parenthesis;
function Try_Scalar (Result : out Node_Access)
return Boolean
is
Success : Boolean;
Consumed : Natural;
Val : Scalar_Type;
begin
Read_Scalar (Remaining, Success, Consumed, Val);
if Success then
Advance (Consumed);
Result := new Node_Type'(Class => Const,
Value => Val);
return True;
else
return False;
end if;
end Try_Scalar;
--------------------
-- Try_Identifier --
--------------------
function Try_Identifier (ID : out Identifier)
return Boolean
is
Success : Boolean;
Consumed : Natural;
begin
-- Put_Line ("TRY ID");
Read_Identifier (Remaining, Success, Consumed, ID);
if Success then
-- Put_Line ("SUCCESS (" & ID_Image(Id) & ")");
Advance (Consumed);
return True;
else
-- Put_Line ("NO");
return False;
end if;
end Try_Identifier;
---------------------
-- Handle_Function --
---------------------
function Handle_Function (ID : Identifier;
Pos : ID_Tables.Cursor)
return Node_Access
is
Parameters : Parameter_Array;
N_Params : Natural;
begin
if Pos = No_Element then
if On_Unknown_ID /= OK then
raise Parsing_Error with "Unknown ID '" & ID;
end if;
else
if Element (Pos).Class /= Funct then
raise Parsing_Error with "Variable" & ID & "used as function";
end if;
end if;
Next_Char;
Parse_Parameter_List (Parameters, N_Params);
if Pos /= No_Element then
pragma Assert (Element (Pos).Class = Funct);
if not Is_Acceptable (N_Params, Element (Pos).N_Param) then
raise Parsing_Error
with "Wrong # of arguments";
end if;
end if;
return new Node_Type'(Class => Fun_Call,
Fun_Name => Function_Name (ID),
Parameters => Parameters,
N_Params => N_Params);
end Handle_Function;
---------------------
-- Handle_Variable --
---------------------
function Handle_Variable (ID : Identifier;
Pos : ID_Tables.Cursor)
return Node_Access
is
begin
if Pos /= No_Element and then Element (Pos).Class /= Var then
raise Parsing_Error with "Function '" & ID & "' used as variable";
end if;
return new Node_Type'(Class => Var,
Var_Name => Variable_Name (ID));
end Handle_Variable;
Result : Node_Access := null;
Raw_ID : Identifier;
ID : Identifier;
Pos : ID_Tables.Cursor;
N_Matches : Natural;
No_Prefix : Boolean;
begin
-- Put_Line ("PARSING '" & Input & "'");
Ecco ("simple");
if Try_Parenthesis (Result) then
return Result;
elsif Try_Scalar (Result) then
return Result;
elsif Try_Identifier (Raw_ID) then
Resolve_Identifier (Raw_ID => Raw_ID,
Pos => Pos,
N_Matches => N_Matches,
Resolved => ID,
No_Prefix_Needed => No_Prefix);
if Pos = No_Element then
if On_Unknown_ID = Die then
raise Parsing_Error with "Unknown ID" & Raw_ID;
end if;
end if;
if N_Matches > 1 then
case On_Multiple_Match is
when Die =>
raise Parsing_Error with Raw_ID & "has multiple matches";
when Allow_Unprefixed =>
if not No_Prefix then
raise Parsing_Error with Raw_ID & "has multiple prefixed matches";
end if;
when Allow =>
null;
end case;
end if;
pragma Assert (if On_Multiple_Match = Die then N_Matches <= 1);
if Current_Char = '(' then
return Handle_Function (ID, Pos);
else
return Handle_Variable (ID, Pos);
end if;
else
raise Parsing_Error;
end if;
exception
when others =>
Free (Result);
raise;
end Parse_Simple;
function Parse_Fact return Node_Access is
Result : Node_Access := null;
Operator : Character;
Operand : Node_Access;
begin
Ecco ("fact");
if Current_Char = '+' or Current_Char = '-' then
Operator := Current_Char;
Next_Char;
Operand := Parse_Simple;
case Operator is
when '+' =>
Result := new Node_Type'(Class => Unary_Plus,
Term => Operand);
when '-' =>
Result := new Node_Type'(Class => Unary_Minus,
Term => Operand);
when others =>
-- We should never arrive here
raise Program_Error;
end case;
else
Result := Parse_Simple;
end if;
Fine;
return Result;
exception
when others =>
Free (Result);
raise;
end Parse_Fact;
function Parse_Term return Node_Access is
Result : Node_Access := null;
Operator : Character;
Operand : Node_Access;
begin
Ecco ("term");
Result := Parse_Fact;
while Current_Char = '*' or Current_Char = '/' loop
Operator := Current_Char;
Next_Char;
Operand := Parse_Fact;
case Operator is
when '*' =>
Result := new Node_Type'(Class => Mult,
Left => Result,
Right => Operand);
when '/' =>
Result := new Node_Type'(Class => Div,
Left => Result,
Right => Operand);
when others =>
-- We should never arrive here
raise Program_Error;
end case;
end loop;
Fine;
return Result;
exception
when others =>
Free (Result);
raise;
end Parse_Term;
function Parse_Expr return Node_Access is
Result : Node_Access := null;
Operator : Character;
Operand : Node_Access;
begin
Ecco ("expr");
Result := Parse_Term;
while Current_Char = '+' or Current_Char = '-' loop
Operator := Current_Char;
Next_Char;
Operand := Parse_Term;
case Operator is
when '+' =>
Result := new Node_Type'(Class => Sum,
Left => Result,
Right => Operand);
when '-' =>
Result := new Node_Type'(Class => Sub,
Left => Result,
Right => Operand);
when others =>
-- We should never arrive here
raise Program_Error;
end case;
end loop;
Fine;
return Result;
exception
when others =>
Free (Result);
raise;
end Parse_Expr;
Result : Symbolic_Expression;
begin
Init_Scanner;
Result.Expr := Parse_Expr;
return Result;
end Parse;
end Symbolic_Expressions.Parsing;
|
data/mapObjects/Route18Gate1F.asm | AmateurPanda92/pokemon-rby-dx | 9 | 24239 | <filename>data/mapObjects/Route18Gate1F.asm
Route18Gate1F_Object:
db $a ; border block
db 5 ; warps
warp 0, 4, 0, -1
warp 0, 5, 1, -1
warp 7, 4, 2, -1
warp 7, 5, 3, -1
warp 6, 8, 0, ROUTE_18_GATE_2F
db 0 ; signs
db 1 ; objects
object SPRITE_GUARD, 4, 1, STAY, DOWN, 1 ; person
; warp-to
warp_to 0, 4, ROUTE_18_GATE_1F_WIDTH
warp_to 0, 5, ROUTE_18_GATE_1F_WIDTH
warp_to 7, 4, ROUTE_18_GATE_1F_WIDTH
warp_to 7, 5, ROUTE_18_GATE_1F_WIDTH
warp_to 6, 8, ROUTE_18_GATE_1F_WIDTH ; ROUTE_18_GATE_2F
|
programs/oeis/238/A238377.asm | neoneye/loda | 22 | 6418 | ; A238377: Row sums of triangle in A204028.
; 1,2,6,10,17,24,34,44,57,70,86,102,121,140,162,184,209,234,262,290,321,352,386,420,457,494,534,574,617,660,706,752,801,850,902,954,1009,1064,1122,1180
mov $1,6
mul $1,$0
add $1,8
mul $1,$0
div $1,8
add $1,1
mov $0,$1
|
test/Succeed/Issue1614b.agda | cruhland/agda | 1,989 | 14470 | -- New NO_POSITIVITY_CHECK pragma for data definitions and mutual
-- blocks
-- Skipping an old-style mutual block: Somewhere within a `mutual`
-- block before a data definition.
mutual
data Cheat : Set where
cheat : Oops → Cheat
{-# NO_POSITIVITY_CHECK #-}
data Oops : Set where
oops : (Cheat → Cheat) → Oops
|
tests/nonsmoke/functional/CompileTests/experimental_ada_tests/tests/function_instantiation.adb | ouankou/rose | 488 | 5418 | <reponame>ouankou/rose<filename>tests/nonsmoke/functional/CompileTests/experimental_ada_tests/tests/function_instantiation.adb
procedure function_instantiation is
begin
begin
declare
generic function func(pfp:in integer) return integer;
function func(pfp:in integer) return integer is
begin
return 0;
end func;
begin
declare
function p is new func;
begin
null;
end;
end;
end;
end function_instantiation;
|
test/asset/agda-stdlib-1.0/Relation/Binary/Lattice.agda | omega12345/agda-mode | 0 | 16946 | ------------------------------------------------------------------------
-- The Agda standard library
--
-- Order-theoretic lattices
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Relation.Binary.Lattice where
open import Algebra.FunctionProperties
open import Data.Product using (_×_; _,_)
open import Function using (flip)
open import Level using (suc; _⊔_)
open import Relation.Binary
------------------------------------------------------------------------
-- Relationships between orders and operators
open import Relation.Binary public using (Maximum; Minimum)
Supremum : ∀ {a ℓ} {A : Set a} → Rel A ℓ → Op₂ A → Set _
Supremum _≤_ _∨_ =
∀ x y → x ≤ (x ∨ y) × y ≤ (x ∨ y) × ∀ z → x ≤ z → y ≤ z → (x ∨ y) ≤ z
Infimum : ∀ {a ℓ} {A : Set a} → Rel A ℓ → Op₂ A → Set _
Infimum _≤_ = Supremum (flip _≤_)
Exponential : ∀ {a ℓ} {A : Set a} → Rel A ℓ → Op₂ A → Op₂ A → Set _
Exponential _≤_ _∧_ _⇨_ =
∀ w x y → ((w ∧ x) ≤ y → w ≤ (x ⇨ y)) × (w ≤ (x ⇨ y) → (w ∧ x) ≤ y)
------------------------------------------------------------------------
-- Join semilattices
record IsJoinSemilattice {a ℓ₁ ℓ₂} {A : Set a}
(_≈_ : Rel A ℓ₁) -- The underlying equality.
(_≤_ : Rel A ℓ₂) -- The partial order.
(_∨_ : Op₂ A) -- The join operation.
: Set (a ⊔ ℓ₁ ⊔ ℓ₂) where
field
isPartialOrder : IsPartialOrder _≈_ _≤_
supremum : Supremum _≤_ _∨_
x≤x∨y : ∀ x y → x ≤ (x ∨ y)
x≤x∨y x y = let pf , _ , _ = supremum x y in pf
y≤x∨y : ∀ x y → y ≤ (x ∨ y)
y≤x∨y x y = let _ , pf , _ = supremum x y in pf
∨-least : ∀ {x y z} → x ≤ z → y ≤ z → (x ∨ y) ≤ z
∨-least {x} {y} {z} = let _ , _ , pf = supremum x y in pf z
open IsPartialOrder isPartialOrder public
record JoinSemilattice c ℓ₁ ℓ₂ : Set (suc (c ⊔ ℓ₁ ⊔ ℓ₂)) where
infix 4 _≈_ _≤_
infixr 6 _∨_
field
Carrier : Set c
_≈_ : Rel Carrier ℓ₁ -- The underlying equality.
_≤_ : Rel Carrier ℓ₂ -- The partial order.
_∨_ : Op₂ Carrier -- The join operation.
isJoinSemilattice : IsJoinSemilattice _≈_ _≤_ _∨_
open IsJoinSemilattice isJoinSemilattice public
poset : Poset c ℓ₁ ℓ₂
poset = record { isPartialOrder = isPartialOrder }
open Poset poset public using (preorder)
record IsBoundedJoinSemilattice {a ℓ₁ ℓ₂} {A : Set a}
(_≈_ : Rel A ℓ₁) -- The underlying equality.
(_≤_ : Rel A ℓ₂) -- The partial order.
(_∨_ : Op₂ A) -- The join operation.
(⊥ : A) -- The minimum.
: Set (a ⊔ ℓ₁ ⊔ ℓ₂) where
field
isJoinSemilattice : IsJoinSemilattice _≈_ _≤_ _∨_
minimum : Minimum _≤_ ⊥
open IsJoinSemilattice isJoinSemilattice public
record BoundedJoinSemilattice c ℓ₁ ℓ₂ : Set (suc (c ⊔ ℓ₁ ⊔ ℓ₂)) where
infix 4 _≈_ _≤_
infixr 6 _∨_
field
Carrier : Set c
_≈_ : Rel Carrier ℓ₁ -- The underlying equality.
_≤_ : Rel Carrier ℓ₂ -- The partial order.
_∨_ : Op₂ Carrier -- The join operation.
⊥ : Carrier -- The minimum.
isBoundedJoinSemilattice : IsBoundedJoinSemilattice _≈_ _≤_ _∨_ ⊥
open IsBoundedJoinSemilattice isBoundedJoinSemilattice public
joinSemilattice : JoinSemilattice c ℓ₁ ℓ₂
joinSemilattice = record { isJoinSemilattice = isJoinSemilattice }
joinSemiLattice = joinSemilattice
{-# WARNING_ON_USAGE joinSemiLattice
"Warning: joinSemiLattice was deprecated in v0.17.
Please use joinSemilattice instead."
#-}
open JoinSemilattice joinSemilattice public using (preorder; poset)
------------------------------------------------------------------------
-- Meet semilattices
record IsMeetSemilattice {a ℓ₁ ℓ₂} {A : Set a}
(_≈_ : Rel A ℓ₁) -- The underlying equality.
(_≤_ : Rel A ℓ₂) -- The partial order.
(_∧_ : Op₂ A) -- The meet operation.
: Set (a ⊔ ℓ₁ ⊔ ℓ₂) where
field
isPartialOrder : IsPartialOrder _≈_ _≤_
infimum : Infimum _≤_ _∧_
x∧y≤x : ∀ x y → (x ∧ y) ≤ x
x∧y≤x x y = let pf , _ , _ = infimum x y in pf
x∧y≤y : ∀ x y → (x ∧ y) ≤ y
x∧y≤y x y = let _ , pf , _ = infimum x y in pf
∧-greatest : ∀ {x y z} → x ≤ y → x ≤ z → x ≤ (y ∧ z)
∧-greatest {x} {y} {z} = let _ , _ , pf = infimum y z in pf x
open IsPartialOrder isPartialOrder public
record MeetSemilattice c ℓ₁ ℓ₂ : Set (suc (c ⊔ ℓ₁ ⊔ ℓ₂)) where
infix 4 _≈_ _≤_
infixr 7 _∧_
field
Carrier : Set c
_≈_ : Rel Carrier ℓ₁ -- The underlying equality.
_≤_ : Rel Carrier ℓ₂ -- The partial order.
_∧_ : Op₂ Carrier -- The meet operation.
isMeetSemilattice : IsMeetSemilattice _≈_ _≤_ _∧_
open IsMeetSemilattice isMeetSemilattice public
poset : Poset c ℓ₁ ℓ₂
poset = record { isPartialOrder = isPartialOrder }
open Poset poset public using (preorder)
record IsBoundedMeetSemilattice {a ℓ₁ ℓ₂} {A : Set a}
(_≈_ : Rel A ℓ₁) -- The underlying equality.
(_≤_ : Rel A ℓ₂) -- The partial order.
(_∧_ : Op₂ A) -- The join operation.
(⊤ : A) -- The maximum.
: Set (a ⊔ ℓ₁ ⊔ ℓ₂) where
field
isMeetSemilattice : IsMeetSemilattice _≈_ _≤_ _∧_
maximum : Maximum _≤_ ⊤
open IsMeetSemilattice isMeetSemilattice public
record BoundedMeetSemilattice c ℓ₁ ℓ₂ : Set (suc (c ⊔ ℓ₁ ⊔ ℓ₂)) where
infix 4 _≈_ _≤_
infixr 7 _∧_
field
Carrier : Set c
_≈_ : Rel Carrier ℓ₁ -- The underlying equality.
_≤_ : Rel Carrier ℓ₂ -- The partial order.
_∧_ : Op₂ Carrier -- The join operation.
⊤ : Carrier -- The maximum.
isBoundedMeetSemilattice : IsBoundedMeetSemilattice _≈_ _≤_ _∧_ ⊤
open IsBoundedMeetSemilattice isBoundedMeetSemilattice public
meetSemilattice : MeetSemilattice c ℓ₁ ℓ₂
meetSemilattice = record { isMeetSemilattice = isMeetSemilattice }
meetSemiLattice = meetSemilattice
{-# WARNING_ON_USAGE meetSemiLattice
"Warning: meetSemiLattice was deprecated in v0.17.
Please use meetSemilattice instead."
#-}
open MeetSemilattice meetSemilattice public using (preorder; poset)
------------------------------------------------------------------------
-- Lattices
record IsLattice {a ℓ₁ ℓ₂} {A : Set a}
(_≈_ : Rel A ℓ₁) -- The underlying equality.
(_≤_ : Rel A ℓ₂) -- The partial order.
(_∨_ : Op₂ A) -- The join operation.
(_∧_ : Op₂ A) -- The meet operation.
: Set (a ⊔ ℓ₁ ⊔ ℓ₂) where
field
isPartialOrder : IsPartialOrder _≈_ _≤_
supremum : Supremum _≤_ _∨_
infimum : Infimum _≤_ _∧_
isJoinSemilattice : IsJoinSemilattice _≈_ _≤_ _∨_
isJoinSemilattice = record
{ isPartialOrder = isPartialOrder
; supremum = supremum
}
isMeetSemilattice : IsMeetSemilattice _≈_ _≤_ _∧_
isMeetSemilattice = record
{ isPartialOrder = isPartialOrder
; infimum = infimum
}
open IsJoinSemilattice isJoinSemilattice public
using (x≤x∨y; y≤x∨y; ∨-least)
open IsMeetSemilattice isMeetSemilattice public
using (x∧y≤x; x∧y≤y; ∧-greatest)
open IsPartialOrder isPartialOrder public
record Lattice c ℓ₁ ℓ₂ : Set (suc (c ⊔ ℓ₁ ⊔ ℓ₂)) where
infix 4 _≈_ _≤_
infixr 6 _∨_
infixr 7 _∧_
field
Carrier : Set c
_≈_ : Rel Carrier ℓ₁ -- The underlying equality.
_≤_ : Rel Carrier ℓ₂ -- The partial order.
_∨_ : Op₂ Carrier -- The join operation.
_∧_ : Op₂ Carrier -- The meet operation.
isLattice : IsLattice _≈_ _≤_ _∨_ _∧_
open IsLattice isLattice public
setoid : Setoid c ℓ₁
setoid = record { isEquivalence = isEquivalence }
joinSemilattice : JoinSemilattice c ℓ₁ ℓ₂
joinSemilattice = record { isJoinSemilattice = isJoinSemilattice }
meetSemilattice : MeetSemilattice c ℓ₁ ℓ₂
meetSemilattice = record { isMeetSemilattice = isMeetSemilattice }
open JoinSemilattice joinSemilattice public using (poset; preorder)
record IsDistributiveLattice {a ℓ₁ ℓ₂} {A : Set a}
(_≈_ : Rel A ℓ₁) -- The underlying equality.
(_≤_ : Rel A ℓ₂) -- The partial order.
(_∨_ : Op₂ A) -- The join operation.
(_∧_ : Op₂ A) -- The meet operation.
: Set (a ⊔ ℓ₁ ⊔ ℓ₂) where
field
isLattice : IsLattice _≈_ _≤_ _∨_ _∧_
∧-distribˡ-∨ : _DistributesOverˡ_ _≈_ _∧_ _∨_
open IsLattice isLattice public
record DistributiveLattice c ℓ₁ ℓ₂ : Set (suc (c ⊔ ℓ₁ ⊔ ℓ₂)) where
infix 4 _≈_ _≤_
infixr 6 _∨_
infixr 7 _∧_
field
Carrier : Set c
_≈_ : Rel Carrier ℓ₁ -- The underlying equality.
_≤_ : Rel Carrier ℓ₂ -- The partial order.
_∨_ : Op₂ Carrier -- The join operation.
_∧_ : Op₂ Carrier -- The meet operation.
isDistributiveLattice : IsDistributiveLattice _≈_ _≤_ _∨_ _∧_
open IsDistributiveLattice isDistributiveLattice using (∧-distribˡ-∨) public
open IsDistributiveLattice isDistributiveLattice using (isLattice)
lattice : Lattice c ℓ₁ ℓ₂
lattice = record { isLattice = isLattice }
open Lattice lattice hiding (Carrier; _≈_; _≤_; _∨_; _∧_) public
record IsBoundedLattice {a ℓ₁ ℓ₂} {A : Set a}
(_≈_ : Rel A ℓ₁) -- The underlying equality.
(_≤_ : Rel A ℓ₂) -- The partial order.
(_∨_ : Op₂ A) -- The join operation.
(_∧_ : Op₂ A) -- The meet operation.
(⊤ : A) -- The maximum.
(⊥ : A) -- The minimum.
: Set (a ⊔ ℓ₁ ⊔ ℓ₂) where
field
isLattice : IsLattice _≈_ _≤_ _∨_ _∧_
maximum : Maximum _≤_ ⊤
minimum : Minimum _≤_ ⊥
open IsLattice isLattice public
isBoundedJoinSemilattice : IsBoundedJoinSemilattice _≈_ _≤_ _∨_ ⊥
isBoundedJoinSemilattice = record
{ isJoinSemilattice = isJoinSemilattice
; minimum = minimum
}
isBoundedMeetSemilattice : IsBoundedMeetSemilattice _≈_ _≤_ _∧_ ⊤
isBoundedMeetSemilattice = record
{ isMeetSemilattice = isMeetSemilattice
; maximum = maximum
}
record BoundedLattice c ℓ₁ ℓ₂ : Set (suc (c ⊔ ℓ₁ ⊔ ℓ₂)) where
infix 4 _≈_ _≤_
infixr 6 _∨_
infixr 7 _∧_
field
Carrier : Set c
_≈_ : Rel Carrier ℓ₁ -- The underlying equality.
_≤_ : Rel Carrier ℓ₂ -- The partial order.
_∨_ : Op₂ Carrier -- The join operation.
_∧_ : Op₂ Carrier -- The meet operation.
⊤ : Carrier -- The maximum.
⊥ : Carrier -- The minimum.
isBoundedLattice : IsBoundedLattice _≈_ _≤_ _∨_ _∧_ ⊤ ⊥
open IsBoundedLattice isBoundedLattice public
boundedJoinSemilattice : BoundedJoinSemilattice c ℓ₁ ℓ₂
boundedJoinSemilattice = record
{ isBoundedJoinSemilattice = isBoundedJoinSemilattice }
boundedMeetSemilattice : BoundedMeetSemilattice c ℓ₁ ℓ₂
boundedMeetSemilattice = record
{ isBoundedMeetSemilattice = isBoundedMeetSemilattice }
lattice : Lattice c ℓ₁ ℓ₂
lattice = record { isLattice = isLattice }
open Lattice lattice public
using (joinSemilattice; meetSemilattice; poset; preorder; setoid)
------------------------------------------------------------------------
-- Heyting algebras (a bounded lattice with exponential operator)
record IsHeytingAlgebra {a ℓ₁ ℓ₂} {A : Set a}
(_≈_ : Rel A ℓ₁) -- The underlying equality.
(_≤_ : Rel A ℓ₂) -- The partial order.
(_∨_ : Op₂ A) -- The join operation.
(_∧_ : Op₂ A) -- The meet operation.
(_⇨_ : Op₂ A) -- The exponential operation.
(⊤ : A) -- The maximum.
(⊥ : A) -- The minimum.
: Set (a ⊔ ℓ₁ ⊔ ℓ₂) where
field
isBoundedLattice : IsBoundedLattice _≈_ _≤_ _∨_ _∧_ ⊤ ⊥
exponential : Exponential _≤_ _∧_ _⇨_
transpose-⇨ : ∀ {w x y} → (w ∧ x) ≤ y → w ≤ (x ⇨ y)
transpose-⇨ {w} {x} {y} = let pf , _ = exponential w x y in pf
transpose-∧ : ∀ {w x y} → w ≤ (x ⇨ y) → (w ∧ x) ≤ y
transpose-∧ {w} {x} {y} = let _ , pf = exponential w x y in pf
open IsBoundedLattice isBoundedLattice public
record HeytingAlgebra c ℓ₁ ℓ₂ : Set (suc (c ⊔ ℓ₁ ⊔ ℓ₂)) where
infix 4 _≈_ _≤_
infixr 5 _⇨_
infixr 6 _∨_
infixr 7 _∧_
field
Carrier : Set c
_≈_ : Rel Carrier ℓ₁ -- The underlying equality.
_≤_ : Rel Carrier ℓ₂ -- The partial order.
_∨_ : Op₂ Carrier -- The join operation.
_∧_ : Op₂ Carrier -- The meet operation.
_⇨_ : Op₂ Carrier -- The exponential operation.
⊤ : Carrier -- The maximum.
⊥ : Carrier -- The minimum.
isHeytingAlgebra : IsHeytingAlgebra _≈_ _≤_ _∨_ _∧_ _⇨_ ⊤ ⊥
boundedLattice : BoundedLattice c ℓ₁ ℓ₂
boundedLattice = record
{ isBoundedLattice = IsHeytingAlgebra.isBoundedLattice isHeytingAlgebra }
open IsHeytingAlgebra isHeytingAlgebra
using (exponential; transpose-⇨; transpose-∧) public
open BoundedLattice boundedLattice
hiding (Carrier; _≈_; _≤_; _∨_; _∧_; ⊤; ⊥) public
------------------------------------------------------------------------
-- Boolean algebras (a specialized Heyting algebra)
record IsBooleanAlgebra {a ℓ₁ ℓ₂} {A : Set a}
(_≈_ : Rel A ℓ₁) -- The underlying equality.
(_≤_ : Rel A ℓ₂) -- The partial order.
(_∨_ : Op₂ A) -- The join operation.
(_∧_ : Op₂ A) -- The meet operation.
(¬_ : Op₁ A) -- The negation operation.
(⊤ : A) -- The maximum.
(⊥ : A) -- The minimum.
: Set (a ⊔ ℓ₁ ⊔ ℓ₂) where
infixr 5 _⇨_
_⇨_ : Op₂ A
x ⇨ y = (¬ x) ∨ y
field
isHeytingAlgebra : IsHeytingAlgebra _≈_ _≤_ _∨_ _∧_ _⇨_ ⊤ ⊥
open IsHeytingAlgebra isHeytingAlgebra public
record BooleanAlgebra c ℓ₁ ℓ₂ : Set (suc (c ⊔ ℓ₁ ⊔ ℓ₂)) where
infix 4 _≈_ _≤_
infixr 6 _∨_
infixr 7 _∧_
infix 8 ¬_
field
Carrier : Set c
_≈_ : Rel Carrier ℓ₁ -- The underlying equality.
_≤_ : Rel Carrier ℓ₂ -- The partial order.
_∨_ : Op₂ Carrier -- The join operation.
_∧_ : Op₂ Carrier -- The meet operation.
¬_ : Op₁ Carrier -- The negation operation.
⊤ : Carrier -- The maximum.
⊥ : Carrier -- The minimum.
isBooleanAlgebra : IsBooleanAlgebra _≈_ _≤_ _∨_ _∧_ ¬_ ⊤ ⊥
open IsBooleanAlgebra isBooleanAlgebra using (isHeytingAlgebra)
heytingAlgebra : HeytingAlgebra c ℓ₁ ℓ₂
heytingAlgebra = record { isHeytingAlgebra = isHeytingAlgebra }
open HeytingAlgebra heytingAlgebra public
hiding (Carrier; _≈_; _≤_; _∨_; _∧_; ⊤; ⊥)
|
libsrc/stdio_new/file/feof.asm | andydansby/z88dk-mk2 | 1 | 166799 | <filename>libsrc/stdio_new/file/feof.asm
; int __FASTCALL__ feof(FILE *stream)
; 06.2008 aralbrec
XLIB feof
LIB stdio_error_mc, stdio_success_znc, l_jphl
INCLUDE "../stdio.def"
.feof
push hl
pop ix
bit 0,(ix+3) ; unget char available?
jp nz, stdio_success_znc ; if yes indicate not eof
ld a,STDIO_MSG_FERR
call l_jphl
rla
jp c, stdio_error_mc ; return eof true
jp stdio_success_znc
|
oeis/142/A142056.asm | neoneye/loda-programs | 11 | 104396 | <reponame>neoneye/loda-programs
; A142056: Primes congruent to 13 mod 33.
; Submitted by <NAME>
; 13,79,211,277,409,541,607,673,739,937,1069,1201,1399,1531,1597,1663,1861,1993,2389,2521,2719,2851,2917,3049,3181,3313,3511,3643,3709,3907,4567,4831,5227,5557,5623,5689,5821,5953,6151,6217,6481,6547,6679,7207,7537,7603,7669,7867,7933,8263,8329,8461,8527,8923,9187,9319,9649,9781,10111,10177,10243,10639,10771,10837,10903,11299,11497,11827,11959,12157,12289,12421,12487,12553,12619,13147,13411,13477,13807,13873,14071,14401,14533,14731,14797,14929,15061,15193,15259,15391,15787,15919,16183,16249,16381
mov $2,$0
pow $2,2
lpb $2
mov $3,$4
add $3,12
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
mov $1,$0
max $1,0
cmp $1,$0
mul $2,$1
sub $2,1
add $4,66
lpe
mov $0,$4
add $0,13
|
test/asm_exe/segnames.asm | nigelperks/BasicAssembler | 0 | 241654 | <gh_stars>0
IDEAL
ASSUME CS: SEG1
; forward references to segments are not allowed yet
SEGMENT SEG1
ENDS SEG1
SEGMENT SEG2
ENDS SEG2
SEGMENT _STACK STACK
ENDS _STACK
ASSUME CS: SEG1
SEGMENT SEG1
start:
mov ax, SEG1
mov dx, SEG2
mov bx, _STACK
ENDS SEG1
ASSUME CS: SEG2
SEGMENT SEG2
mov ax, SEG1
mov dx, SEG2
mov bx, _STACK
ENDS SEG2
SEGMENT _STACK STACK
DB 20h DUP (0)
ENDS _STACK
END start
|
src/Similarity/Weak.agda | nad/up-to | 0 | 10481 | ------------------------------------------------------------------------
-- A coinductive definition of weak similarity
------------------------------------------------------------------------
{-# OPTIONS --sized-types #-}
open import Labelled-transition-system
module Similarity.Weak {ℓ} (lts : LTS ℓ) where
open import Equality.Propositional
open import Prelude
open import Prelude.Size
open import Bisimilarity.Weak lts as WB using ([_]_≈_; [_]_≈′_)
open import Expansion lts as E using ([_]_≳_; [_]_≳′_)
open import Indexed-container hiding (⟨_⟩)
open import Relation
open import Similarity lts as S using ([_]_≤_; [_]_≤′_)
import Similarity.General
open LTS lts
private
module General = Similarity.General lts _[_]⇒̂_ ⟶→⇒̂
open General public
using (module StepC; ⟨_⟩; challenge; force;
[_]_≡_; [_]_≡′_; []≡↔; Extensionality; extensionality)
renaming ( reflexive-≤ to reflexive-≼
; reflexive-≤′ to reflexive-≼′
; ≡⇒≤ to ≡⇒≼
; ≤:_ to ≼:_
; ≤′:_ to ≼′:_
)
-- StepC is given in the following way, rather than via open public,
-- to make hyperlinks to it more informative.
StepC : Container (Proc × Proc) (Proc × Proc)
StepC = General.StepC
-- The following definitions are given explicitly, in order to make
-- the code easier to follow.
Weak-similarity : Size → Rel₂ ℓ Proc
Weak-similarity = ν StepC
Weak-similarity′ : Size → Rel₂ ℓ Proc
Weak-similarity′ = ν′ StepC
infix 4 [_]_≼_ [_]_≼′_ _≼_ _≼′_
[_]_≼_ : Size → Proc → Proc → Type ℓ
[ i ] p ≼ q = ν StepC i (p , q)
[_]_≼′_ : Size → Proc → Proc → Type ℓ
[ i ] p ≼′ q = ν′ StepC i (p , q)
_≼_ : Proc → Proc → Type ℓ
_≼_ = [ ∞ ]_≼_
_≼′_ : Proc → Proc → Type ℓ
_≼′_ = [ ∞ ]_≼′_
private
-- However, these definitions are definitionally equivalent to
-- corresponding definitions in General.
indirect-Weak-similarity : Weak-similarity ≡ General.Similarity
indirect-Weak-similarity = refl
indirect-Weak-similarity′ : Weak-similarity′ ≡ General.Similarity′
indirect-Weak-similarity′ = refl
indirect-[]≼ : [_]_≼_ ≡ General.[_]_≤_
indirect-[]≼ = refl
indirect-[]≼′ : [_]_≼′_ ≡ General.[_]_≤′_
indirect-[]≼′ = refl
indirect-≼ : _≼_ ≡ General._≤_
indirect-≼ = refl
indirect-≼′ : _≼′_ ≡ General._≤′_
indirect-≼′ = refl
mutual
-- Weak bisimilarity is contained in weak similarity.
≈⇒≼ : ∀ {i p q} → [ i ] p ≈ q → [ i ] p ≼ q
≈⇒≼ = λ p≈q →
⟨ (λ q⟶q′ →
let p′ , p⇒̂p′ , p′≈′q′ = WB.left-to-right p≈q q⟶q′
in p′ , p⇒̂p′ , ≈⇒≼′ p′≈′q′)
⟩
≈⇒≼′ : ∀ {i p q} → [ i ] p ≈′ q → [ i ] p ≼′ q
force (≈⇒≼′ p≳′q) = ≈⇒≼ (S.force p≳′q)
mutual
-- Similarity is contained in weak similarity.
≤⇒≼ : ∀ {i p q} → [ i ] p ≤ q → [ i ] p ≼ q
≤⇒≼ = λ p≤q →
⟨ (λ q⟶q′ →
let p′ , p⟶p′ , p′≤′q′ = S.challenge p≤q q⟶q′
in p′ , ⟶→⇒̂ p⟶p′ , ≤⇒≼′ p′≤′q′)
⟩
≤⇒≼′ : ∀ {i p q} → [ i ] p ≤′ q → [ i ] p ≼′ q
force (≤⇒≼′ p≳′q) = ≤⇒≼ (S.force p≳′q)
-- Weak similarity is a weak simulation (of a certain kind).
weak-is-weak⇒̂ :
∀ {p p′ q μ} →
p ≼ q → p [ μ ]⇒̂ p′ →
∃ λ q′ → q [ μ ]⇒̂ q′ × p′ ≼ q′
weak-is-weak⇒̂ = is-weak⇒̂ challenge (λ p≼′q → force p≼′q) ⇒̂→⇒ id
mutual
-- Weak similarity is transitive.
--
-- Note that the size of the second argument is not preserved.
--
-- TODO: Can one prove that the size cannot be preserved?
transitive-≼ : ∀ {i p q r} → [ i ] p ≼ q → q ≼ r → [ i ] p ≼ r
transitive-≼ p≼q q≼r =
⟨ (λ p⟶p′ →
let q′ , q⇒̂q′ , p′≼q′ = challenge p≼q p⟶p′
r′ , r⇒̂r′ , q′≼r′ = weak-is-weak⇒̂ q≼r q⇒̂q′
in r′ , r⇒̂r′ , transitive-≼′ p′≼q′ q′≼r′)
⟩
transitive-≼′ :
∀ {i p q r} → [ i ] p ≼′ q → q ≼ r → [ i ] p ≼′ r
force (transitive-≼′ p≼q q≼r) = transitive-≼ (force p≼q) q≼r
mutual
-- A fully size-preserving transitivity-like lemma.
--
-- Note that expansion could be replaced by a kind of one-sided
-- expansion.
transitive-≳≼ : ∀ {i p q r} → [ i ] p ≳ q → [ i ] q ≼ r → [ i ] p ≼ r
transitive-≳≼ p≳q q≼r =
⟨ (λ p⟶p′ → case E.left-to-right p≳q p⟶p′ of λ where
(_ , done s , p′≳q) →
_ , silent s done
, transitive-≳≼′
p′≳q (record { force = λ { {_} → q≼r } })
(q′ , step q⟶q′ , p′≳q′) →
let r′ , r⇒̂r′ , q′≼r′ = challenge q≼r q⟶q′
in r′ , r⇒̂r′ , transitive-≳≼′ p′≳q′ q′≼r′)
⟩
transitive-≳≼′ :
∀ {i p q r} → [ i ] p ≳′ q → [ i ] q ≼′ r → [ i ] p ≼′ r
force (transitive-≳≼′ p≼q q≼r) =
transitive-≳≼ (force p≼q) (force q≼r)
|
programs/oeis/199/A199309.asm | karttu/loda | 1 | 21540 | <reponame>karttu/loda
; A199309: (7*5^n+1)/2.
; 4,18,88,438,2188,10938,54688,273438,1367188,6835938,34179688,170898438,854492188,4272460938,21362304688,106811523438,534057617188,2670288085938,13351440429688,66757202148438,333786010742188,1668930053710938,8344650268554688
mov $1,5
pow $1,$0
div $1,4
mul $1,14
add $1,4
|
tm-test/lib64/syscall.asm | ddosakura/sakura-cat | 0 | 6801 | <reponame>ddosakura/sakura-cat
;用户模式的系统调用依次传递的寄存器为: rdi,rsi,rdx,rcx,r8和r9;
global _skr_puts
_skr_puts:
mov rdx, rsi ; lenght of msg string
mov rsi, rdi ; addr of msg string
mov rdi, 1 ; fd
mov rax, 1 ; sys_write
syscall
ret
|
Transynther/x86/_processed/AVXALIGN/_zr_/i3-7100_9_0x84_notsx.log_21829_655.asm | ljhsiun2/medusa | 9 | 14743 | <reponame>ljhsiun2/medusa<gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r8
push %r9
push %rax
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0x17a51, %rbx
and %r9, %r9
movl $0x61626364, (%rbx)
nop
nop
nop
inc %r13
lea addresses_normal_ht+0x18e19, %rbx
nop
nop
nop
and $59587, %r13
mov $0x6162636465666768, %rsi
movq %rsi, (%rbx)
nop
nop
mfence
lea addresses_WT_ht+0x11a51, %rsi
lea addresses_normal_ht+0x18a71, %rdi
nop
nop
nop
nop
nop
sub %rax, %rax
mov $107, %rcx
rep movsl
nop
nop
nop
nop
nop
cmp %rsi, %rsi
lea addresses_normal_ht+0xc61, %r9
nop
nop
xor $8901, %rdi
movb $0x61, (%r9)
nop
add %rbx, %rbx
lea addresses_A_ht+0x1a8f1, %rsi
lea addresses_UC_ht+0x197e9, %rdi
nop
nop
dec %r13
mov $20, %rcx
rep movsq
nop
nop
nop
nop
nop
inc %r13
lea addresses_WC_ht+0x17251, %rdi
nop
nop
nop
cmp %r13, %r13
mov (%rdi), %ebx
nop
nop
cmp %r13, %r13
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r9
pop %r8
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %rax
push %rbp
push %rbx
push %rdi
push %rsi
// Store
lea addresses_WC+0x301, %r13
xor %rbx, %rbx
movw $0x5152, (%r13)
nop
nop
nop
dec %rbp
// Load
lea addresses_UC+0x12851, %rdi
nop
nop
nop
xor %r12, %r12
mov (%rdi), %eax
nop
add %rax, %rax
// Store
lea addresses_A+0x16e51, %rdi
nop
nop
nop
nop
cmp $11511, %r13
movl $0x51525354, (%rdi)
cmp $21209, %rbx
// Faulty Load
mov $0x6337e10000000251, %rsi
nop
xor $15693, %r13
mov (%rsi), %bx
lea oracles, %rdi
and $0xff, %rbx
shlq $12, %rbx
mov (%rdi,%rbx,1), %rbx
pop %rsi
pop %rdi
pop %rbx
pop %rbp
pop %rax
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_NC', 'same': False, 'size': 1, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WC', 'same': False, 'size': 2, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_UC', 'same': False, 'size': 4, 'congruent': 9, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_A', 'same': False, 'size': 4, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_NC', 'same': True, 'size': 2, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 4, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 8, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': True}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 1, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 4, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'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
*/
|
examples/random_dsfmt.adb | ytomino/drake | 33 | 30072 | <gh_stars>10-100
pragma License (Unrestricted); -- BSD 3-Clause
-- translated unit from dSFMT (test.c)
--
-- Copyright (c) 2007, 2008, 2009 <NAME>, <NAME>
-- and Hiroshima University.
-- Copyright (c) 2011, 2002 <NAME>, <NAME>, Hiroshima
-- University and The University of Tokyo.
-- All rights reserved.
--
--
-- Ada version by yt
--
with Ada.Command_Line;
with Ada.Execution_Time;
with Ada.Formatting;
with Ada.Integer_Text_IO;
with Ada.Long_Float_Text_IO;
with Ada.Numerics.dSFMT_19937;
-- with Ada.Numerics.dSFMT_216091;
with Ada.Real_Time;
with Ada.Text_IO;
with Interfaces;
procedure random_dsfmt is
use Ada.Numerics.dSFMT_19937;
-- use Ada.Numerics.dSFMT_216091;
use type Ada.Execution_Time.CPU_Time;
use type Ada.Real_Time.Time_Span;
use type Interfaces.Unsigned_64;
exit_1 : exception;
dsfmt_global_data : aliased Generator;
DSFMT_N : constant Natural := (DSFMT_MEXP - 128) / 104 + 1;
NUM_RANDS : constant := 50000;
TIC_COUNT : constant := 2000;
dummy : Long_Float_Array (
0 .. (NUM_RANDS / 2 + 1) * 2 - 1); -- w128_t to Long_Float
type genrand_t is access function return Long_Float;
type st_genrand_t is
access function (dsfmt : aliased in out Generator) return Long_Float;
type fill_array_t is access procedure (the_array : out Long_Float_Array);
type st_fill_array_t is
access procedure (
dsfmt : aliased in out Generator;
the_array : out Long_Float_Array);
procedure test_co;
procedure test_oc;
procedure test_oo;
procedure test_12;
procedure test_seq_co;
procedure test_seq_oc;
procedure test_seq_oo;
procedure test_seq_12;
pragma No_Inline (test_co);
pragma No_Inline (test_oc);
pragma No_Inline (test_oo);
pragma No_Inline (test_12);
pragma No_Inline (test_seq_co);
pragma No_Inline (test_seq_oc);
pragma No_Inline (test_seq_oo);
pragma No_Inline (test_seq_12);
procedure check (
range_str : in String; -- start_mess
genrand : in genrand_t;
fill_array : in fill_array_t;
st_genrand : in st_genrand_t;
st_fill_array : in st_fill_array_t;
seed : in Unsigned_32;
print_size : in Integer); -- n
procedure check_ar (
range_str : in String; -- start_mess
genrand : in genrand_t;
fill_array : in fill_array_t;
st_genrand : in st_genrand_t;
st_fill_array : in st_fill_array_t;
print_size : in Integer); -- n
-- not inline wrapper functions for check()
function s_genrand_close_open return Long_Float is
begin
return Random_0_To_Less_Than_1 (dsfmt_global_data);
end s_genrand_close_open;
function s_genrand_open_close return Long_Float is
begin
return Random_Greater_Than_0_To_1 (dsfmt_global_data);
end s_genrand_open_close;
function s_genrand_open_open return Long_Float is
begin
return Random_Greater_Than_0_To_Less_Than_1 (dsfmt_global_data);
end s_genrand_open_open;
function s_genrand_close1_open2 return Long_Float is
begin
return Random_1_To_Less_Than_2 (dsfmt_global_data);
end s_genrand_close1_open2;
function sst_genrand_close_open (dsfmt : aliased in out Generator)
return Long_Float is
begin
return Random_0_To_Less_Than_1 (dsfmt);
end sst_genrand_close_open;
function sst_genrand_open_close (dsfmt : aliased in out Generator)
return Long_Float is
begin
return Random_Greater_Than_0_To_1 (dsfmt);
end sst_genrand_open_close;
function sst_genrand_open_open (dsfmt : aliased in out Generator)
return Long_Float is
begin
return Random_Greater_Than_0_To_Less_Than_1 (dsfmt);
end sst_genrand_open_open;
function sst_genrand_close1_open2 (dsfmt : aliased in out Generator)
return Long_Float is
begin
return Random_1_To_Less_Than_2 (dsfmt);
end sst_genrand_close1_open2;
procedure s_fill_array_close_open (the_array : out Long_Float_Array) is
begin
Fill_Random_0_To_Less_Than_1 (dsfmt_global_data, the_array);
end s_fill_array_close_open;
procedure s_fill_array_open_close (the_array : out Long_Float_Array) is
begin
Fill_Random_Greater_Than_0_To_1 (dsfmt_global_data, the_array);
end s_fill_array_open_close;
procedure s_fill_array_open_open (the_array : out Long_Float_Array) is
begin
Fill_Random_Greater_Than_0_To_Less_Than_1 (dsfmt_global_data, the_array);
end s_fill_array_open_open;
procedure s_fill_array_close1_open2 (the_array : out Long_Float_Array) is
begin
Fill_Random_1_To_Less_Than_2 (dsfmt_global_data, the_array);
end s_fill_array_close1_open2;
procedure sst_fill_array_close_open (
dsfmt : aliased in out Generator;
the_array : out Long_Float_Array) is
begin
Fill_Random_0_To_Less_Than_1 (dsfmt, the_array);
end sst_fill_array_close_open;
procedure sst_fill_array_open_close (
dsfmt : aliased in out Generator;
the_array : out Long_Float_Array) is
begin
Fill_Random_Greater_Than_0_To_1 (dsfmt, the_array);
end sst_fill_array_open_close;
procedure sst_fill_array_open_open (
dsfmt : aliased in out Generator;
the_array : out Long_Float_Array) is
begin
Fill_Random_Greater_Than_0_To_Less_Than_1 (dsfmt, the_array);
end sst_fill_array_open_open;
procedure sst_fill_array_close1_open2 (
dsfmt : aliased in out Generator;
the_array : out Long_Float_Array) is
begin
Fill_Random_1_To_Less_Than_2 (dsfmt, the_array);
end sst_fill_array_close1_open2;
type union_W64_T_Tag is (u, d);
pragma Discard_Names (union_W64_T_Tag);
type union_W64_T (Unchecked_Tag : union_W64_T_Tag := d) is record
case Unchecked_Tag is
when u =>
u : Interfaces.Unsigned_64;
when d =>
d : Long_Float;
end case;
end record;
pragma Unchecked_Union (union_W64_T);
-- printf("%1.15f(%08"PRIx64")", d, u);
procedure Put (Item : in union_W64_T) is
function Image_08PRIx64 is
new Ada.Formatting.Modular_Image (
Interfaces.Unsigned_64,
Form => Ada.Formatting.Simple,
Signs => Ada.Formatting.Triming_Unsign_Marks,
Base => 16,
Set => Ada.Formatting.Lower_Case,
Digits_Width => 8);
begin
Ada.Long_Float_Text_IO.Put (Item.d, Aft => 15);
Ada.Text_IO.Put ("(");
Ada.Text_IO.Put (Image_08PRIx64 (Item.u));
Ada.Text_IO.Put (")");
end Put;
procedure check (
range_str : in String;
genrand : in genrand_t;
fill_array : in fill_array_t;
st_genrand : in st_genrand_t;
st_fill_array : in st_fill_array_t;
seed : in Unsigned_32;
print_size : in Integer)
is
lsize : constant Natural := DSFMT_N * 2 + 2;
the_array : Long_Float_Array renames dummy;
little : Long_Float_Array (0 .. lsize - 1); -- w128_t to Long_Float
r, r_st : union_W64_T;
dsfmt : aliased Generator;
begin
Ada.Text_IO.Put ("generated randoms ");
Ada.Text_IO.Put (range_str);
Ada.Text_IO.New_Line;
Reset (dsfmt_global_data, Integer (seed));
fill_array (little (0 .. lsize - 1));
fill_array (the_array (0 .. 5000 - 1));
Reset (dsfmt_global_data, Integer (seed));
Reset (dsfmt, Integer (seed));
for i in 0 .. lsize - 1 loop
r.d := genrand.all;
r_st.d := st_genrand (dsfmt);
if r.u /= r_st.u
or else r.u /= union_W64_T'(d, d => little (i)).u
then
Ada.Text_IO.New_Line;
Ada.Text_IO.Put (range_str);
Ada.Text_IO.Put (" mismatch i = ");
Ada.Integer_Text_IO.Put (i, Width => 1);
Ada.Text_IO.Put (": r = ");
Put (r);
Ada.Text_IO.Put (", st = ");
Put (r_st);
Ada.Text_IO.Put (", array = ");
Put (union_W64_T'(d, d => little (i)));
Ada.Text_IO.New_Line;
raise exit_1;
end if;
if i < print_size then
Ada.Long_Float_Text_IO.Put (little (i), Aft => 15);
Ada.Text_IO.Put (" ");
if i rem 4 = 3 then
Ada.Text_IO.New_Line;
end if;
end if;
end loop;
for i in 0 .. 5000 - 1 loop
r.d := genrand.all;
if r.u /= union_W64_T'(d, d => the_array (i)).u then
Ada.Text_IO.New_Line;
Ada.Text_IO.Put (range_str);
Ada.Text_IO.Put (" mismatch i = ");
Ada.Integer_Text_IO.Put (i + lsize, Width => 1);
Ada.Text_IO.Put (": r = ");
Put (r);
Ada.Text_IO.Put (", array = ");
Put (union_W64_T'(d, d => the_array (i)));
Ada.Text_IO.New_Line;
raise exit_1;
end if;
if i + lsize < print_size then
Ada.Long_Float_Text_IO.Put (the_array (i), Aft => 15);
Ada.Text_IO.Put (" ");
if (i + lsize) rem 4 = 3 then
Ada.Text_IO.New_Line;
end if;
end if;
end loop;
Reset (dsfmt, Integer (seed));
st_fill_array (dsfmt, little (0 .. lsize - 1));
st_fill_array (dsfmt, the_array (0 .. 5000 - 1));
Reset (dsfmt, Integer (seed));
for i in 0 .. lsize - 1 loop
r_st.d := st_genrand (dsfmt);
if r_st.u /= union_W64_T'(d, d => little (i)).u then
Ada.Text_IO.New_Line;
Ada.Text_IO.Put (range_str);
Ada.Text_IO.Put (" mismatch i = ");
Ada.Integer_Text_IO.Put (i, Width => 1);
Ada.Text_IO.Put (": st = ");
Put (r_st);
Ada.Text_IO.Put (", array = ");
Put (union_W64_T'(d, d => little (i)));
Ada.Text_IO.New_Line;
raise exit_1;
end if;
end loop;
for i in 0 .. 5000 - 1 loop
r_st.d := st_genrand (dsfmt);
if r_st.u /= union_W64_T'(d, d => the_array (i)).u then
Ada.Text_IO.New_Line;
Ada.Text_IO.Put (range_str);
Ada.Text_IO.Put (" mismatch i = ");
Ada.Integer_Text_IO.Put (i + lsize, Width => 1);
Ada.Text_IO.Put (": st = ");
Put (r_st);
Ada.Text_IO.Put (", array = ");
Put (union_W64_T'(d, d => the_array (i)));
Ada.Text_IO.New_Line;
raise exit_1;
end if;
end loop;
end check;
procedure check_ar (
range_str : in String;
genrand : in genrand_t;
fill_array : in fill_array_t;
st_genrand : in st_genrand_t;
st_fill_array : in st_fill_array_t;
print_size : in Integer)
is
lsize : constant Natural := DSFMT_N * 2 + 2;
the_array : Long_Float_Array renames dummy;
little : Long_Float_Array (0 .. lsize - 1); -- w128_t to Long_Float
r, r_st : union_W64_T;
dsfmt : aliased Generator;
ar : Unsigned_32_Array (0 .. 3) := (1, 2, 3, 4);
begin
Ada.Text_IO.Put ("generated randoms ");
Ada.Text_IO.Put (range_str);
Ada.Text_IO.New_Line;
Reset (dsfmt_global_data, Initialize (ar));
fill_array (little (0 .. lsize - 1));
fill_array (the_array (0 .. 5000 - 1));
Reset (dsfmt_global_data, Initialize (ar));
Reset (dsfmt, Initialize (ar));
for i in 0 .. lsize - 1 loop
r.d := genrand.all;
r_st.d := st_genrand.all (dsfmt);
if r.u /= r_st.u
or else r.u /= union_W64_T'(d, d => little (i)).u
then
Ada.Text_IO.New_Line;
Ada.Text_IO.Put (range_str);
Ada.Text_IO.Put (" mismatch i = ");
Ada.Integer_Text_IO.Put (i, Width => 1);
Ada.Text_IO.Put (": r = ");
Put (r);
Ada.Text_IO.Put (", st = ");
Put (r_st);
Ada.Text_IO.Put (", array = ");
Put (union_W64_T'(d, d => little (i)));
Ada.Text_IO.New_Line;
raise exit_1;
end if;
if i < print_size then
Ada.Long_Float_Text_IO.Put (little (i), Aft => 15);
Ada.Text_IO.Put (" ");
if i rem 4 = 3 then
Ada.Text_IO.New_Line;
end if;
end if;
end loop;
for i in 0 .. 5000 - 1 loop
r.d := genrand.all;
if r.u /= union_W64_T'(d, d => the_array (i)).u then
Ada.Text_IO.New_Line;
Ada.Text_IO.Put (range_str);
Ada.Text_IO.Put (" mismatch i = ");
Ada.Integer_Text_IO.Put (i + lsize, Width => 1);
Ada.Text_IO.Put (": r = ");
Put (r);
Ada.Text_IO.Put (", array = ");
Put (union_W64_T'(d, d => the_array (i)));
Ada.Text_IO.New_Line;
raise exit_1;
end if;
if i + lsize < print_size then
Ada.Long_Float_Text_IO.Put (the_array (i), Aft => 15);
Ada.Text_IO.Put (" ");
if (i + lsize) rem 4 = 3 then
Ada.Text_IO.New_Line;
end if;
end if;
end loop;
Reset (dsfmt, Initialize (ar));
st_fill_array (dsfmt, little (0 .. lsize - 1));
st_fill_array (dsfmt, the_array (0 .. 5000 - 1));
Reset (dsfmt, Initialize (ar));
for i in 0 .. lsize - 1 loop
r_st.d := st_genrand (dsfmt);
if r_st.u /= union_W64_T'(d, d => little (i)).u then
Ada.Text_IO.New_Line;
Ada.Text_IO.Put (range_str);
Ada.Text_IO.Put (" mismatch i = ");
Ada.Integer_Text_IO.Put (i, Width => 1);
Ada.Text_IO.Put (": st = ");
Put (r_st);
Ada.Text_IO.Put (", array = ");
Put (union_W64_T'(d, d => little (i)));
Ada.Text_IO.New_Line;
raise exit_1;
end if;
end loop;
for i in 0 .. 5000 - 1 loop
r_st.d := st_genrand (dsfmt);
if r_st.u /= union_W64_T'(d, d => the_array (i)).u then
Ada.Text_IO.New_Line;
Ada.Text_IO.Put (range_str);
Ada.Text_IO.Put (" mismatch i = ");
Ada.Integer_Text_IO.Put (i + lsize, Width => 1);
Ada.Text_IO.Put (": st = ");
Put (r_st);
Ada.Text_IO.Put (", array = ");
Put (union_W64_T'(d, d => the_array (i)));
Ada.Text_IO.New_Line;
raise exit_1;
end if;
end loop;
end check_ar;
procedure test_co is
clo : Ada.Execution_Time.CPU_Time;
sum : Ada.Real_Time.Time_Span;
the_array : Long_Float_Array renames dummy;
dsfmt : aliased Generator;
begin
-- #if 0
-- dsfmt_gv_init_gen_rand(1234);
-- sum = 0;
-- for (i = 0; i < 10; i++) {
-- clo = clock();
-- for (j = 0; j < TIC_COUNT; j++) {
-- dsfmt_gv_fill_array_close_open(array, NUM_RANDS);
-- }
-- clo = clock() - clo;
-- sum += clo;
-- }
-- printf("GL BLOCK [0, 1) AVE:%4"PRIu64"ms.\n",
-- (sum * 100) / CLOCKS_PER_SEC);
-- #endif
Reset (dsfmt_global_data, 1234);
sum := Ada.Real_Time.Time_Span_Zero;
for i in 0 .. 10 - 1 loop
clo := Ada.Execution_Time.Clock;
for j in 0 .. TIC_COUNT - 1 loop
Fill_Random_0_To_Less_Than_1 (
dsfmt,
the_array (0 .. NUM_RANDS - 1));
end loop;
sum := sum + (Ada.Execution_Time.Clock - clo);
end loop;
Ada.Text_IO.Put ("ST BLOCK [0, 1) AVE:");
Ada.Integer_Text_IO.Put (Integer (Ada.Real_Time.To_Duration (sum * 100)),
Width => 4);
Ada.Text_IO.Put ("ms.");
Ada.Text_IO.New_Line;
end test_co;
procedure test_oc is
clo : Ada.Execution_Time.CPU_Time;
sum : Ada.Real_Time.Time_Span;
the_array : Long_Float_Array renames dummy;
dsfmt : aliased Generator;
begin
-- #if 0
-- dsfmt_gv_init_gen_rand(1234);
-- sum = 0;
-- for (i = 0; i < 10; i++) {
-- clo = clock();
-- for (j = 0; j < TIC_COUNT; j++) {
-- dsfmt_gv_fill_array_open_close(array, NUM_RANDS);
-- }
-- clo = clock() - clo;
-- sum += clo;
-- }
-- printf("GL BLOCK (0, 1] AVE:%4"PRIu64"ms.\n",
-- (sum * 100) / CLOCKS_PER_SEC);
-- #endif
Reset (dsfmt_global_data, 1234);
sum := Ada.Real_Time.Time_Span_Zero;
for i in 0 .. 10 - 1 loop
clo := Ada.Execution_Time.Clock;
for j in 0 .. TIC_COUNT - 1 loop
Fill_Random_Greater_Than_0_To_1 (
dsfmt,
the_array (0 .. NUM_RANDS - 1));
end loop;
sum := sum + (Ada.Execution_Time.Clock - clo);
end loop;
Ada.Text_IO.Put ("ST BLOCK (0, 1] AVE:");
Ada.Integer_Text_IO.Put (Integer (Ada.Real_Time.To_Duration (sum * 100)),
Width => 4);
Ada.Text_IO.Put ("ms.");
Ada.Text_IO.New_Line;
end test_oc;
procedure test_oo is
clo : Ada.Execution_Time.CPU_Time;
sum : Ada.Real_Time.Time_Span;
the_array : Long_Float_Array renames dummy;
dsfmt : aliased Generator;
begin
-- #if 0
-- dsfmt_gv_init_gen_rand(1234);
-- sum = 0;
-- for (i = 0; i < 10; i++) {
-- clo = clock();
-- for (j = 0; j < TIC_COUNT; j++) {
-- dsfmt_gv_fill_array_open_open(array, NUM_RANDS);
-- }
-- clo = clock() - clo;
-- sum += clo;
-- }
-- printf("GL BLOCK (0, 1) AVE:%4"PRIu64"ms.\n",
-- (sum * 100) / CLOCKS_PER_SEC);
-- #endif
Reset (dsfmt_global_data, 1234);
sum := Ada.Real_Time.Time_Span_Zero;
for i in 0 .. 10 - 1 loop
clo := Ada.Execution_Time.Clock;
for j in 0 .. TIC_COUNT - 1 loop
Fill_Random_Greater_Than_0_To_Less_Than_1 (
dsfmt,
the_array (0 .. NUM_RANDS - 1));
end loop;
sum := sum + (Ada.Execution_Time.Clock - clo);
end loop;
Ada.Text_IO.Put ("ST BLOCK (0, 1) AVE:");
Ada.Integer_Text_IO.Put (Integer (Ada.Real_Time.To_Duration (sum * 100)),
Width => 4);
Ada.Text_IO.Put ("ms.");
Ada.Text_IO.New_Line;
end test_oo;
procedure test_12 is
clo : Ada.Execution_Time.CPU_Time;
sum : Ada.Real_Time.Time_Span;
the_array : Long_Float_Array renames dummy;
dsfmt : aliased Generator;
begin
-- #if 0
-- dsfmt_gv_init_gen_rand(1234);
-- sum = 0;
-- for (i = 0; i < 10; i++) {
-- clo = clock();
-- for (j = 0; j < TIC_COUNT; j++) {
-- dsfmt_gv_fill_array_close1_open2(array, NUM_RANDS);
-- }
-- clo = clock() - clo;
-- sum += clo;
-- }
-- printf("GL BLOCK [1, 2) AVE:%4"PRIu64"ms.\n",
-- (sum * 100) / CLOCKS_PER_SEC);
-- #endif
Reset (dsfmt_global_data, 1234);
sum := Ada.Real_Time.Time_Span_Zero;
for i in 0 .. 10 - 1 loop
clo := Ada.Execution_Time.Clock;
for j in 0 .. TIC_COUNT - 1 loop
Fill_Random_1_To_Less_Than_2 (
dsfmt,
the_array (0 .. NUM_RANDS - 1));
end loop;
sum := sum + (Ada.Execution_Time.Clock - clo);
end loop;
Ada.Text_IO.Put ("ST BLOCK [1, 2) AVE:");
Ada.Integer_Text_IO.Put (Integer (Ada.Real_Time.To_Duration (sum * 100)),
Width => 4);
Ada.Text_IO.Put ("ms.");
Ada.Text_IO.New_Line;
end test_12;
procedure test_seq_co is
clo : Ada.Execution_Time.CPU_Time;
sum : Ada.Real_Time.Time_Span;
the_array : Long_Float_Array renames dummy;
r : Long_Float;
total : Long_Float := 0.0;
dsfmt : aliased Generator;
begin
-- #if 0
-- dsfmt_gv_init_gen_rand(1234);
-- sum = 0;
-- r = 0;
-- for (i = 0; i < 10; i++) {
-- clo = clock();
-- for (j = 0; j < TIC_COUNT; j++) {
-- for (k = 0; k < NUM_RANDS; k++) {
-- r += dsfmt_gv_genrand_close_open();
-- }
-- }
-- clo = clock() - clo;
-- sum += clo;
-- }
-- total = r;
-- printf("GL SEQ [0, 1) 1 AVE:%4"PRIu64"ms.\n",
-- (sum * 100) / CLOCKS_PER_SEC);
-- sum = 0;
-- for (i = 0; i < 10; i++) {
-- clo = clock();
-- for (j = 0; j < TIC_COUNT; j++) {
-- for (k = 0; k < NUM_RANDS; k++) {
-- array[k] = dsfmt_gv_genrand_close_open();
-- }
-- }
-- clo = clock() - clo;
-- sum += clo;
-- }
-- for (k = 0; k < NUM_RANDS; k++) {
-- total += array[k];
-- }
-- printf("GL SEQ [0, 1) 2 AVE:%4"PRIu64"ms.\n",
-- (sum * 100) / CLOCKS_PER_SEC);
-- #endif
Reset (dsfmt_global_data, 1234);
sum := Ada.Real_Time.Time_Span_Zero;
r := 0.0;
for i in 0 .. 10 - 1 loop
clo := Ada.Execution_Time.Clock;
for j in 0 .. TIC_COUNT - 1 loop
for k in 0 .. NUM_RANDS - 1 loop
r := r + Random_0_To_Less_Than_1 (dsfmt);
end loop;
end loop;
sum := sum + (Ada.Execution_Time.Clock - clo);
end loop;
total := r;
Ada.Text_IO.Put ("ST SEQ [0, 1) 1 AVE:");
Ada.Integer_Text_IO.Put (Integer (Ada.Real_Time.To_Duration (sum * 100)),
Width => 4);
Ada.Text_IO.Put ("ms.");
Ada.Text_IO.New_Line;
sum := Ada.Real_Time.Time_Span_Zero;
for i in 0 .. 10 - 1 loop
clo := Ada.Execution_Time.Clock;
for j in 0 ..TIC_COUNT - 1 loop
for k in 0 .. NUM_RANDS - 1 loop
the_array (k) := Random_0_To_Less_Than_1 (dsfmt);
end loop;
end loop;
sum := sum + (Ada.Execution_Time.Clock - clo);
end loop;
for k in 0 .. NUM_RANDS - 1 loop
total := total + the_array (k);
end loop;
Ada.Text_IO.Put ("ST SEQ [0, 1) 2 AVE:");
Ada.Integer_Text_IO.Put (Integer (Ada.Real_Time.To_Duration (sum * 100)),
Width => 4);
Ada.Text_IO.Put ("ms.");
Ada.Text_IO.New_Line;
Ada.Text_IO.Put ("total = ");
Ada.Long_Float_Text_IO.Put (total);
Ada.Text_IO.New_Line;
end test_seq_co;
procedure test_seq_oc is
clo : Ada.Execution_Time.CPU_Time;
sum : Ada.Real_Time.Time_Span;
the_array : Long_Float_Array renames dummy;
r : Long_Float;
total : Long_Float := 0.0;
dsfmt : aliased Generator;
begin
-- #if 0
-- dsfmt_gv_init_gen_rand(1234);
-- sum = 0;
-- r = 0;
-- for (i = 0; i < 10; i++) {
-- clo = clock();
-- for (j = 0; j < TIC_COUNT; j++) {
-- for (k = 0; k < NUM_RANDS; k++) {
-- r += dsfmt_gv_genrand_open_close();
-- }
-- }
-- clo = clock() - clo;
-- sum += clo;
-- }
-- total = r;
-- printf("GL SEQ (0, 1] 1 AVE:%4"PRIu64"ms.\n",
-- (sum * 100) / CLOCKS_PER_SEC);
-- sum = 0;
-- for (i = 0; i < 10; i++) {
-- clo = clock();
-- for (j = 0; j < TIC_COUNT; j++) {
-- for (k = 0; k < NUM_RANDS; k++) {
-- array[k] = dsfmt_gv_genrand_open_close();
-- }
-- }
-- clo = clock() - clo;
-- sum += clo;
-- }
-- for (k = 0; k < NUM_RANDS; k++) {
-- total += array[k];
-- }
-- printf("GL SEQ (0, 1] 2 AVE:%4"PRIu64"ms.\n",
-- (sum * 100) / CLOCKS_PER_SEC);
-- #endif
Reset (dsfmt_global_data, 1234);
sum := Ada.Real_Time.Time_Span_Zero;
r := 0.0;
for i in 0 .. 10 - 1 loop
clo := Ada.Execution_Time.Clock;
for j in 0 .. TIC_COUNT - 1 loop
for k in 0 .. NUM_RANDS - 1 loop
r := r + Random_Greater_Than_0_To_1 (dsfmt);
end loop;
end loop;
sum := sum + (Ada.Execution_Time.Clock - clo);
end loop;
total := r;
Ada.Text_IO.Put ("ST SEQ (0, 1] 1 AVE:");
Ada.Integer_Text_IO.Put (Integer (Ada.Real_Time.To_Duration (sum * 100)),
Width => 4);
Ada.Text_IO.Put ("ms.");
Ada.Text_IO.New_Line;
sum := Ada.Real_Time.Time_Span_Zero;
for i in 0 .. 10 - 1 loop
clo := Ada.Execution_Time.Clock;
for j in 0 ..TIC_COUNT - 1 loop
for k in 0 .. NUM_RANDS - 1 loop
the_array (k) := Random_Greater_Than_0_To_1 (dsfmt);
end loop;
end loop;
sum := sum + (Ada.Execution_Time.Clock - clo);
end loop;
for k in 0 .. NUM_RANDS - 1 loop
total := total + the_array (k);
end loop;
Ada.Text_IO.Put ("ST SEQ (0, 1] 2 AVE:");
Ada.Integer_Text_IO.Put (Integer (Ada.Real_Time.To_Duration (sum * 100)),
Width => 4);
Ada.Text_IO.Put ("ms.");
Ada.Text_IO.New_Line;
Ada.Text_IO.Put ("total = ");
Ada.Long_Float_Text_IO.Put (total);
Ada.Text_IO.New_Line;
end test_seq_oc;
procedure test_seq_oo is
clo : Ada.Execution_Time.CPU_Time;
sum : Ada.Real_Time.Time_Span;
the_array : Long_Float_Array renames dummy;
r : Long_Float;
total : Long_Float := 0.0;
dsfmt : aliased Generator;
begin
-- #if 0
-- dsfmt_gv_init_gen_rand(1234);
-- sum = 0;
-- r = 0;
-- for (i = 0; i < 10; i++) {
-- clo = clock();
-- for (j = 0; j < TIC_COUNT; j++) {
-- for (k = 0; k < NUM_RANDS; k++) {
-- r += dsfmt_gv_genrand_open_open();
-- }
-- }
-- clo = clock() - clo;
-- sum += clo;
-- }
-- total = r;
-- printf("GL SEQ (0, 1) 1 AVE:%4"PRIu64"ms.\n",
-- (sum * 100) / CLOCKS_PER_SEC);
-- sum = 0;
-- for (i = 0; i < 10; i++) {
-- clo = clock();
-- for (j = 0; j < TIC_COUNT; j++) {
-- for (k = 0; k < NUM_RANDS; k++) {
-- array[k] = dsfmt_gv_genrand_open_open();
-- }
-- }
-- clo = clock() - clo;
-- sum += clo;
-- }
-- for (k = 0; k < NUM_RANDS; k++) {
-- total += array[k];
-- }
-- printf("GL SEQ (0, 1) 2 AVE:%4"PRIu64"ms.\n",
-- (sum * 100) / CLOCKS_PER_SEC);
-- #endif
Reset (dsfmt_global_data, 1234);
sum := Ada.Real_Time.Time_Span_Zero;
r := 0.0;
for i in 0 .. 10 - 1 loop
clo := Ada.Execution_Time.Clock;
for j in 0 .. TIC_COUNT - 1 loop
for k in 0 .. NUM_RANDS - 1 loop
r := r + Random_Greater_Than_0_To_Less_Than_1 (dsfmt);
end loop;
end loop;
sum := sum + (Ada.Execution_Time.Clock - clo);
end loop;
total := r;
Ada.Text_IO.Put ("ST SEQ (0, 1) 1 AVE:");
Ada.Integer_Text_IO.Put (Integer (Ada.Real_Time.To_Duration (sum * 100)),
Width => 4);
Ada.Text_IO.Put ("ms.");
Ada.Text_IO.New_Line;
sum := Ada.Real_Time.Time_Span_Zero;
for i in 0 .. 10 - 1 loop
clo := Ada.Execution_Time.Clock;
for j in 0 ..TIC_COUNT - 1 loop
for k in 0 .. NUM_RANDS - 1 loop
the_array (k) := Random_Greater_Than_0_To_Less_Than_1 (dsfmt);
end loop;
end loop;
sum := sum + (Ada.Execution_Time.Clock - clo);
end loop;
for k in 0 .. NUM_RANDS - 1 loop
total := total + the_array (k);
end loop;
Ada.Text_IO.Put ("ST SEQ (0, 1) 2 AVE:");
Ada.Integer_Text_IO.Put (Integer (Ada.Real_Time.To_Duration (sum * 100)),
Width => 4);
Ada.Text_IO.Put ("ms.");
Ada.Text_IO.New_Line;
Ada.Text_IO.Put ("total = ");
Ada.Long_Float_Text_IO.Put (total);
Ada.Text_IO.New_Line;
end test_seq_oo;
procedure test_seq_12 is
clo : Ada.Execution_Time.CPU_Time;
sum : Ada.Real_Time.Time_Span;
the_array : Long_Float_Array renames dummy;
r : Long_Float;
total : Long_Float := 0.0;
dsfmt : aliased Generator;
begin
-- #if 0
-- dsfmt_gv_init_gen_rand(1234);
-- sum = 0;
-- r = 0;
-- for (i = 0; i < 10; i++) {
-- clo = clock();
-- for (j = 0; j < TIC_COUNT; j++) {
-- for (k = 0; k < NUM_RANDS; k++) {
-- r += dsfmt_gv_genrand_close1_open2();
-- }
-- }
-- clo = clock() - clo;
-- sum += clo;
-- }
-- total = r;
-- printf("GL SEQ [1, 2) 1 AVE:%4"PRIu64"ms.\n",
-- (sum * 100) / CLOCKS_PER_SEC);
-- sum = 0;
-- for (i = 0; i < 10; i++) {
-- clo = clock();
-- for (j = 0; j < TIC_COUNT; j++) {
-- for (k = 0; k < NUM_RANDS; k++) {
-- array[k] = dsfmt_gv_genrand_close1_open2();
-- }
-- }
-- clo = clock() - clo;
-- sum += clo;
-- }
-- for (k = 0; k < NUM_RANDS; k++) {
-- total += array[k];
-- }
-- printf("GL SEQ [1, 2) 2 AVE:%4"PRIu64"ms.\n",
-- (sum * 100) / CLOCKS_PER_SEC);
-- #endif
Reset (dsfmt_global_data, 1234);
sum := Ada.Real_Time.Time_Span_Zero;
r := 0.0;
for i in 0 .. 10 - 1 loop
clo := Ada.Execution_Time.Clock;
for j in 0 .. TIC_COUNT - 1 loop
for k in 0 .. NUM_RANDS - 1 loop
r := r + Random_1_To_Less_Than_2 (dsfmt);
end loop;
end loop;
sum := sum + (Ada.Execution_Time.Clock - clo);
end loop;
total := r;
Ada.Text_IO.Put ("ST SEQ [1, 2) 1 AVE:");
Ada.Integer_Text_IO.Put (Integer (Ada.Real_Time.To_Duration (sum * 100)),
Width => 4);
Ada.Text_IO.Put ("ms.");
Ada.Text_IO.New_Line;
sum := Ada.Real_Time.Time_Span_Zero;
for i in 0 .. 10 - 1 loop
clo := Ada.Execution_Time.Clock;
for j in 0 ..TIC_COUNT - 1 loop
for k in 0 .. NUM_RANDS - 1 loop
the_array (k) := Random_1_To_Less_Than_2 (dsfmt);
end loop;
end loop;
sum := sum + (Ada.Execution_Time.Clock - clo);
end loop;
for k in 0 .. NUM_RANDS - 1 loop
total := total + the_array (k);
end loop;
Ada.Text_IO.Put ("ST SEQ [1, 2) 2 AVE:");
Ada.Integer_Text_IO.Put (Integer (Ada.Real_Time.To_Duration (sum * 100)),
Width => 4);
Ada.Text_IO.Put ("ms.");
Ada.Text_IO.New_Line;
Ada.Text_IO.Put ("total = ");
Ada.Long_Float_Text_IO.Put (total);
Ada.Text_IO.New_Line;
end test_seq_12;
begin
Ada.Long_Float_Text_IO.Default_Fore := 0;
Ada.Long_Float_Text_IO.Default_Aft := 6; -- default of "%f"
Ada.Long_Float_Text_IO.Default_Exp := 0;
if Ada.Command_Line.Argument_Count >= 1
and then Ada.Command_Line.Argument (1) = "-s"
then
Ada.Text_IO.Put ("consumed time for generating ");
Ada.Integer_Text_IO.Put (NUM_RANDS * TIC_COUNT, Width => 1);
Ada.Text_IO.Put (" randoms.");
Ada.Text_IO.New_Line;
test_co;
test_oc;
test_oo;
test_12;
test_seq_co;
test_seq_oc;
test_seq_oo;
test_seq_12;
else
Ada.Text_IO.Put_Line (Id);
Ada.Text_IO.Put ("init_gen_rand(0) ");
check (
"[1, 2)",
s_genrand_close1_open2'Access,
s_fill_array_close1_open2'Access,
sst_genrand_close1_open2'Access,
sst_fill_array_close1_open2'Access,
0,
1000);
for i in 0 .. 19 loop
Ada.Text_IO.Put ("init_gen_rand(");
Ada.Integer_Text_IO.Put (i, Width => 1);
Ada.Text_IO.Put (") ");
case i rem 4 is
when 0 =>
check (
"[0, 1)",
s_genrand_close_open'Access,
s_fill_array_close_open'Access,
sst_genrand_close_open'Access,
sst_fill_array_close_open'Access,
Unsigned_32'Mod (i),
12);
when 1 =>
check (
"(0, 1]",
s_genrand_open_close'Access,
s_fill_array_open_close'Access,
sst_genrand_open_close'Access,
sst_fill_array_open_close'Access,
Unsigned_32'Mod (i),
12);
when 2 =>
check (
"(0, 1)",
s_genrand_open_open'Access,
s_fill_array_open_open'Access,
sst_genrand_open_open'Access,
sst_fill_array_open_open'Access,
Unsigned_32'Mod (i),
12);
when others =>
check (
"[1, 2)",
s_genrand_close1_open2'Access,
s_fill_array_close1_open2'Access,
sst_genrand_close1_open2'Access,
sst_fill_array_close1_open2'Access,
Unsigned_32'Mod (i),
12);
end case;
end loop;
Ada.Text_IO.Put ("init_by_array {1, 2, 3, 4} ");
check_ar (
"[1, 2)",
s_genrand_close1_open2'Access,
s_fill_array_close1_open2'Access,
sst_genrand_close1_open2'Access,
sst_fill_array_close1_open2'Access,
1000);
end if;
exception
when exit_1 =>
Ada.Command_Line.Set_Exit_Status (1);
end random_dsfmt;
|
src/main/fragment/mos6502-common/qvoz1_derefidx_vbuyy=pvoc2.asm | jbrandwood/kickc | 2 | 175591 | lda #<{c2}
sta ({z1}),y
iny
lda #>{c2}
sta ({z1}),y
|
programs/oeis/120/A120846.asm | karttu/loda | 0 | 99855 | ; A120846: a(n) = 3^n + 2^n + n.
; 2,6,15,38,101,280,799,2322,6825,20204,60083,179206,535549,1602528,4799367,14381690,43112273,129271252,387682651,1162785774,3487832997,10462450376,31385253935,94151567458,282446313721,847322163900,2541932937219,7625731702742,22877060890445,68630914235824,205892205836503,617675543767626,1853024483819169,5559069156490148
mov $1,3
mov $3,1
mov $4,2
mov $5,$0
lpb $0,1
sub $0,1
mov $2,$4
sub $4,1
add $2,$4
add $4,$2
add $4,2
sub $4,$3
mul $3,2
lpe
add $4,5
add $1,$4
sub $1,4
lpb $5,1
add $1,1
sub $5,1
lpe
sub $1,4
|
Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xca.log_21829_656.asm | ljhsiun2/medusa | 9 | 28823 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r9
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x8ba6, %rsi
lea addresses_normal_ht+0xdb06, %rdi
nop
cmp $8609, %r10
mov $120, %rcx
rep movsl
nop
nop
nop
sub %r9, %r9
lea addresses_UC_ht+0x10de6, %rbx
clflush (%rbx)
inc %rbp
movb (%rbx), %r9b
sub %r9, %r9
lea addresses_A_ht+0x16fa6, %rbp
nop
nop
nop
nop
nop
sub %r10, %r10
mov (%rbp), %di
nop
nop
nop
inc %rbx
lea addresses_A_ht+0x12f4e, %rsi
lea addresses_WT_ht+0x8c2, %rdi
nop
and %r10, %r10
mov $102, %rcx
rep movsq
nop
nop
nop
nop
cmp %rbx, %rbx
lea addresses_normal_ht+0x11326, %rsi
lea addresses_A_ht+0x14f01, %rdi
inc %r12
mov $15, %rcx
rep movsl
nop
cmp $36857, %r12
lea addresses_UC_ht+0x16846, %rbx
clflush (%rbx)
nop
nop
nop
nop
inc %rdi
mov $0x6162636465666768, %rbp
movq %rbp, %xmm0
and $0xffffffffffffffc0, %rbx
vmovntdq %ymm0, (%rbx)
nop
nop
nop
nop
xor %rbx, %rbx
lea addresses_D_ht+0x10da6, %rbx
nop
nop
nop
nop
nop
sub $5025, %r9
vmovups (%rbx), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $0, %xmm3, %rsi
nop
add %rsi, %rsi
lea addresses_UC_ht+0x5156, %r12
nop
inc %r10
mov $0x6162636465666768, %rdi
movq %rdi, %xmm6
movups %xmm6, (%r12)
nop
dec %r10
lea addresses_D_ht+0x4326, %rsi
lea addresses_UC_ht+0x167a6, %rdi
nop
nop
and %r12, %r12
mov $65, %rcx
rep movsl
nop
nop
nop
nop
nop
add %rcx, %rcx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r9
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r13
push %r9
push %rax
push %rbx
push %rcx
// Store
lea addresses_RW+0x1226, %rbx
nop
nop
nop
nop
xor $52410, %r9
mov $0x5152535455565758, %rcx
movq %rcx, %xmm6
vmovups %ymm6, (%rbx)
add $14357, %r10
// Faulty Load
mov $0x52372a0000000fa6, %rax
nop
nop
nop
nop
nop
cmp %r12, %r12
mov (%rax), %r10w
lea oracles, %r13
and $0xff, %r10
shlq $12, %r10
mov (%r13,%r10,1), %r10
pop %rcx
pop %rbx
pop %rax
pop %r9
pop %r13
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_NC', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_RW', 'same': False, 'AVXalign': False, 'congruent': 6}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 2, 'NT': True, 'type': 'addresses_NC', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_D_ht', 'congruent': 10}, 'dst': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 5}}
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 6}}
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 11}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_A_ht', 'congruent': 3}, 'dst': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 2}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 5}, 'dst': {'same': False, 'type': 'addresses_A_ht', 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 32, 'NT': True, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 4}}
{'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 9}}
{'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 2}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_D_ht', 'congruent': 5}, 'dst': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 11}}
{'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
*/
|
wof/lcs/123p/17.asm | zengfr/arcade_game_romhacking_sourcecode_top_secret_data | 6 | 246421 | <filename>wof/lcs/123p/17.asm
copyright zengfr site:http://github.com/zengfr/romhack
00177E clr.b ($17,A0) [123p+ 0]
001782 rts
001798 rts [123p+ 17]
0017A0 rts [123p+ 17]
00B43E move.b D0, ($b9,A0)
05E6B2 bpl $5e6c0 [123p+ 17, enemy+17]
05E80E bpl $5e81a [123p+ 17, enemy+17]
05E880 bpl $5e88c [123p+ 17, enemy+17]
05E8A8 bpl $5e8b4 [123p+ 17, enemy+17]
copyright zengfr site:http://github.com/zengfr/romhack
|
src/interfaces/adabase-interfaces.ads | jrmarino/AdaBase | 30 | 14833 | <reponame>jrmarino/AdaBase
-- This file is covered by the Internet Software Consortium (ISC) License
-- Reference: ../../License.txt
package AdaBase.Interfaces is
pragma Pure;
end AdaBase.Interfaces;
|
src/z3/randomizer/events.asm | SmolBig/alttp_sm_combo_randomizer_rom | 0 | 619 | <reponame>SmolBig/alttp_sm_combo_randomizer_rom<gh_stars>0
;--------------------------------------------------------------------------------
; OnLoadOW
;--------------------------------------------------------------------------------
OnLoadMap:
JSL.l SetLWDWMap
LDA $7EF2DB ; thing we wrote over
RTL
;--------------------------------------------------------------------------------
OnDrawHud:
JSL.l Draw4DigitRupees
;JSL.l DrawChallengeTimer
;JSL.l DrawGoalIndicator
;JSL.l DrawDungeonCompassCounts
;JSL.l SwapSpriteIfNecissary
RTL
;--------------------------------------------------------------------------------
;OnDungeonEntrance:
; STA $7EC172 ; thing we wrote over
;RTL
;--------------------------------------------------------------------------------
OnPlayerDead:
PHA
JSL.l SetDeathWorldChecked
JSL.l SetSilverBowMode
JSL.l RefreshRainAmmo
PLA
RTL
;--------------------------------------------------------------------------------
OnDungeonExit:
STA $040C : STZ $04AC ; thing we wrote over
PHA : PHP
JSL.l HUD_RebuildLong
JSL.l FloodGateResetInner
JSL.l SetSilverBowMode
PLP : PLA
RTL
;--------------------------------------------------------------------------------
OnUncleItemGet:
JSL Link_ReceiveItem
LDA.l EscapeAssist
BIT.b #$04 : BEQ + : STA !INFINITE_MAGIC : +
BIT.b #$02 : BEQ + : STA !INFINITE_BOMBS : +
BIT.b #$01 : BEQ + : STA !INFINITE_ARROWS : +
LDA.l UncleRefill : BIT.b #$04 : BEQ + : LDA.b #$80 : STA $7EF373 : + ; refill magic
LDA.l UncleRefill : BIT.b #$02 : BEQ + : LDA.b #50 : STA $7EF375 : + ; refill bombs
LDA.l UncleRefill : BIT.b #$01 : BEQ + ; refill arrows
LDA.b #70 : STA $7EF376
LDA.l ArrowMode : BEQ +
LDA !INVENTORY_SWAP_2 : ORA #$80 : STA !INVENTORY_SWAP_2 ; enable bow toggle
REP #$20 ; set 16-bit accumulator
LDA $7EF360 : !ADD.l FreeUncleItemAmount : STA $7EF360 ; rupee arrows, so also give the player some money to start
SEP #$20 ; set 8-bit accumulator
+
RTL
;--------------------------------------------------------------------------------
OnAga2Defeated:
JSL.l Dungeon_SaveRoomData_justKeys ; thing we wrote over, make sure this is first
;JSL.l IncrementAgahnim2Sword
RTL
;--------------------------------------------------------------------------------
!RNG_ITEM_LOCK_IN = "$7F5090"
OnFileLoad:
LDA !FRESH_FILE_MARKER : BNE +
JSL.l OnNewFile
LDA.b #$FF : STA !FRESH_FILE_MARKER
+
JSL.l DoWorldFix
JSL.l MasterSwordFollowerClear
JSL.l InitOpenMode
LDA #$FF : STA !RNG_ITEM_LOCK_IN ; reset rng item lock-in
LDA #$00 : STA $7F5001 ; mark fake flipper softlock as impossible
LDA.l GenericKeys : BEQ +
LDA $7EF38B : STA $7EF36F ; copy generic keys to key counter
+
JSL.l SetSilverBowMode
JSL.l RefreshRainAmmo
JSL.l SetEscapeAssist
JSL.l mw_load_sram
STZ !MULTIWORLD_PICKUP
RTL
;--------------------------------------------------------------------------------
!RNG_ITEM_LOCK_IN = "$7F5090"
OnNewFile:
PHX : PHP
REP #$20 ; set 16-bit accumulator
LDA.l LinkStartingRupees : STA $7EF362 : STA $7EF360
LDA.l StartingTime : STA $7EF454
LDA.l StartingTime+2 : STA $7EF454+2
LDX.w #$00 : - ; copy over starting equipment
LDA StartingEquipment, X : STA $7EF340, X
INX : INX
CPX.w #$004F : !BLT -
SEP #$20 ; set 8-bit accumulator
;LDA #$FF : STA !RNG_ITEM_LOCK_IN ; reset rng item lock-in
LDA.l PreopenCurtains : BEQ +
LDA.b #$80 : STA $7EF061 ; open aga tower curtain
LDA.b #$80 : STA $7EF093 ; open skull woods curtain
+
LDA StartingSword : STA $7EF359 ; set starting sword type
PLP : PLX
RTL
;--------------------------------------------------------------------------------
OnInitFileSelect:
; LDA.b #$10 : STA $BC ; init sprite pointer - does nothing unless spriteswap.asm is included
; JSL.l SpriteSwap_SetSprite
JSL.l EnableForceBlank
RTL
;--------------------------------------------------------------------------------
OnLinkDamaged:
JSL.l FlipperKill
;JSL.l OHKOTimer
RTL
;--------------------------------------------------------------------------------
OnEnterWater:
JSL.l RegisterWaterEntryScreen
JSL.l MysteryWaterFunction
LDX.b #$04
RTL
;--------------------------------------------------------------------------------
OnLinkDamagedFromPit:
;JSL.l OHKOTimer
LDA.b #$14 : STA $11 ; thing we wrote over
RTL
;--------------------------------------------------------------------------------
OnLinkDamagedFromPitOutdoors:
;JSL.l OHKOTimer ; make sure this is last
RTL
;--------------------------------------------------------------------------------
!RNG_ITEM_LOCK_IN = "$7F5090"
OnOWTransition:
JSL.l FloodGateReset
JSL.l FlipperFlag
;JSL.l StatTransitionCounter
PHP
SEP #$20 ; set 8-bit accumulator
LDA.b #$FF : STA !RNG_ITEM_LOCK_IN ; clear lock-in
PLP
STZ !MULTIWORLD_PICKUP
RTL
;--------------------------------------------------------------------------------
PreItemGet:
LDA.b #$01 : STA !ITEM_BUSY ; mark item as busy
RTL
;--------------------------------------------------------------------------------
PostItemGet:
;JSL.l MaybeWriteSRAMTrace
RTL
;--------------------------------------------------------------------------------
PostItemAnimation:
LDA.b #$00 : STA !ITEM_BUSY ; mark item as finished
LDA $7F50A0 : BEQ +
STZ $1CF0 : STZ $1CF1 ; reset decompression buffer
JSL.l Main_ShowTextMessage
LDA.b #$00 : STA $7F50A0
+
LDA.l config_multiworld
BEQ +
LDA !MULTIWORLD_DIALOG
BNE .multiworldPickup
+
STZ $02E9 : LDA $0C5E, X ; thing we wrote over to get here
BRA .end
.multiworldPickup
lda !MULTIWORLD_DIALOG
cmp #$01
beq .multiworldGive
cmp #$02
beq .multiworldGet
stz !MULTIWORLD_DIALOG_ITEM
stz !MULTIWORLD_DIALOG_PLAYER
bra .noDialog
.multiworldGet
lda #$01
bra +
.multiworldGive
lda #$00
+
sta $1cf0 ; Store multiworld dialog pointers
lda #$80
sta $1cf1
jsl Main_ShowTextMessage
.noDialog
stz !MULTIWORLD_SWAP
stz !MULTIWORLD_PICKUP
stz !MULTIWORLD_GIVE_ITEM
stz !MULTIWORLD_GIVE_PLAYER
lda !MULTIWORLD_DIALOG
cmp #$02
bne .giveItem
STZ $02E9 : LDA $0C5E, X ; thing we wrote over to get here
bra .end
.giveItem
PLA : PLA : PLA ; Pop return address off the stack
STZ $02E9 : LDA $0C5E, X
JML $08C505 ; If we're multiworld getting, skip
; all crazy events to get us things
.end
RTL
;--------------------------------------------------------------------------------
OnBeginSaveAndQuit:
LDA.b #$01
STA.l !SRAM_SAVING ; Set saving flag to temporarily prevent soft reset
LDA.b #$17 : STA $10 ; thing we wrote over. Go to save and quit module
RTL
;--------------------------------------------------------------------------------
|
programs/oeis/027/A027327.asm | karttu/loda | 0 | 178552 | <gh_stars>0
; A027327: a(n) = Sum_{k=0..m} (k+1) * A026120(n, m-k), where m=0 for n=0,1; m=n for n >= 2.
; 1,3,12,36,108,324,972,2916,8748,26244,78732,236196,708588,2125764,6377292,19131876,57395628,172186884,516560652,1549681956,4649045868,13947137604,41841412812,125524238436,376572715308
mov $2,1
mov $3,2
lpb $0,1
sub $0,1
mov $2,$3
mul $3,2
add $3,$2
add $2,$1
mov $1,1
add $3,4
lpe
add $1,$2
|
Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_238.asm | ljhsiun2/medusa | 9 | 176079 | <gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r12
push %r14
push %r15
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0x4fd, %r15
nop
nop
nop
nop
nop
add $31443, %rsi
vmovups (%r15), %ymm6
vextracti128 $1, %ymm6, %xmm6
vpextrq $1, %xmm6, %r11
nop
nop
and %r10, %r10
lea addresses_UC_ht+0x7cc9, %r10
nop
nop
nop
nop
sub $44700, %r11
mov (%r10), %r14d
nop
nop
nop
nop
and $6079, %r10
lea addresses_A_ht+0x18a55, %r15
nop
nop
nop
nop
sub $47994, %rcx
movups (%r15), %xmm0
vpextrq $0, %xmm0, %r14
nop
nop
nop
nop
inc %r14
lea addresses_D_ht+0x10e6d, %r14
clflush (%r14)
nop
nop
nop
nop
inc %r12
movups (%r14), %xmm3
vpextrq $0, %xmm3, %r15
nop
nop
nop
nop
nop
xor %r14, %r14
lea addresses_UC_ht+0x1d57d, %rsi
lea addresses_A_ht+0x1b76a, %rdi
sub $7356, %r12
mov $73, %rcx
rep movsl
nop
nop
nop
nop
nop
add %r14, %r14
lea addresses_WT_ht+0xf1fd, %rsi
lea addresses_WC_ht+0x11c85, %rdi
nop
nop
sub %r10, %r10
mov $103, %rcx
rep movsl
nop
nop
nop
nop
nop
cmp $986, %rsi
lea addresses_WT_ht+0x139fd, %r15
nop
nop
nop
xor %r10, %r10
movw $0x6162, (%r15)
nop
nop
nop
nop
nop
cmp $12418, %rcx
lea addresses_WT_ht+0x1b1fd, %r15
nop
nop
and %rsi, %rsi
vmovups (%r15), %ymm6
vextracti128 $1, %ymm6, %xmm6
vpextrq $0, %xmm6, %rcx
add %r12, %r12
lea addresses_UC_ht+0x55fd, %r14
nop
lfence
mov $0x6162636465666768, %rcx
movq %rcx, %xmm4
movups %xmm4, (%r14)
nop
nop
nop
nop
nop
cmp $19836, %r11
lea addresses_D_ht+0xf22d, %r10
nop
nop
nop
nop
cmp %rdi, %rdi
movb $0x61, (%r10)
nop
nop
sub $57126, %r15
lea addresses_WT_ht+0x1387d, %rsi
lea addresses_WT_ht+0x31dd, %rdi
nop
nop
nop
nop
xor %r15, %r15
mov $79, %rcx
rep movsb
and $28836, %r12
lea addresses_WT_ht+0x5cfd, %r14
nop
xor %r12, %r12
mov $0x6162636465666768, %rsi
movq %rsi, (%r14)
nop
nop
cmp %r10, %r10
lea addresses_normal_ht+0x1de45, %r11
nop
nop
nop
add $59726, %rdi
mov (%r11), %r12d
nop
nop
nop
dec %r11
lea addresses_A_ht+0x4a11, %rsi
lea addresses_WC_ht+0x287d, %rdi
clflush (%rdi)
nop
dec %r15
mov $23, %rcx
rep movsl
sub $27975, %r12
pop %rsi
pop %rdi
pop %rcx
pop %r15
pop %r14
pop %r12
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r13
push %r15
push %rbp
push %rbx
push %rdi
// Store
lea addresses_normal+0xf1fd, %rbp
nop
xor %r13, %r13
movb $0x51, (%rbp)
nop
nop
nop
nop
xor %r12, %r12
// Store
mov $0xe7d, %rdi
nop
dec %rbx
mov $0x5152535455565758, %r13
movq %r13, %xmm5
vmovups %ymm5, (%rdi)
nop
nop
nop
nop
cmp $42087, %rdi
// Faulty Load
lea addresses_UC+0x159fd, %rbx
nop
xor %r11, %r11
mov (%rbx), %edi
lea oracles, %r11
and $0xff, %rdi
shlq $12, %rdi
mov (%r11,%rdi,1), %rdi
pop %rdi
pop %rbx
pop %rbp
pop %r15
pop %r13
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_UC', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_normal', 'AVXalign': False, 'size': 1}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_P', 'AVXalign': False, 'size': 32}}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_UC', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 6, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_A_ht'}}
{'src': {'same': False, 'congruent': 11, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 2, 'type': 'addresses_WC_ht'}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': True, 'congruent': 11, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 2}}
{'src': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 16}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1}}
{'src': {'same': False, 'congruent': 7, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 5, 'type': 'addresses_WT_ht'}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 8}}
{'src': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 2, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_WC_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
*/
|
projects/batfish/src/main/antlr4/org/batfish/grammar/cisco_nxos/CiscoNxos_ip_as_path_access_list.g4 | zabrewer/batfish | 763 | 6572 | <reponame>zabrewer/batfish<filename>projects/batfish/src/main/antlr4/org/batfish/grammar/cisco_nxos/CiscoNxos_ip_as_path_access_list.g4<gh_stars>100-1000
parser grammar CiscoNxos_ip_as_path_access_list;
import CiscoNxos_common;
options {
tokenVocab = CiscoNxosLexer;
}
ip_as_path_access_list
:
AS_PATH ACCESS_LIST name = ip_as_path_access_list_name
(
SEQ seq = ip_as_path_access_list_seq
)? action = line_action regex = as_path_regex NEWLINE
;
ip_as_path_access_list_seq
:
// 1-4294967294
uint32
;
as_path_regex
:
// 1-63 chars
dqs = double_quoted_string
;
|
Task/Hofstadter-Figure-Figure-sequences/Ada/hofstadter-figure-figure-sequences-1.ada | LaudateCorpus1/RosettaCodeData | 1 | 16318 | <reponame>LaudateCorpus1/RosettaCodeData<gh_stars>1-10
package Hofstadter_Figure_Figure is
function FFR(P: Positive) return Positive;
function FFS(P: Positive) return Positive;
end Hofstadter_Figure_Figure;
|
programs/oeis/000/A000801.asm | neoneye/loda | 22 | 5781 | ; A000801: Sum_{k = 1..n} floor(2^k / k).
; 2,4,6,10,16,26,44,76,132,234,420,761,1391,2561,4745,8841,16551,31114,58708,111136,211000,401650,766372,1465422,2807599,5388709,10359735,19946715,38459505,74250899,143524565,277742293,538043341,1043333611,2025040421,3933914774,7648481084,14882110214,28978413134,56466203828,110100917378,214816310499,419376613341,819199023441,1601073958748,3130829266958,6125243912816,11989305927621,23478080487239,45996078624091,90149016147331,176756701289071,346703857038901,680303829436715,1335372866145150,2622115616822434,5150452249732186,10119941493727216,19890462719208970,39105821129323086,76906526198400036,151288558753680486,297691289497407086,585921665649118830,1153513790994028110,2271498280309758510,4474094587618361688,8814504957902962068,17369516702232029484,34235111283909333818,67491213275949088844,133079636649138605700,262459540289402858130,517722593417491788600,1021441684923587278060,2015624102369828375680,3978166017328641970982,7852928259683222659142,15504357497750495916776,30615930242933360600603,60465950480331611827915,119437941681045230106265,235960912246310692728547,466232496934811487910675,921357511377966000741235,1821023237602806316801645,3599672719334674527863605,7116547830940868490645207,14071267152768847563112197,27826156478161961728658021,55033629869049440297869542,108857109837979017467396682,215346575582957965845815970,426059773759192906254177540,843050102781636788325461489,1668343462305223638258210971,3301913823424075959774581081,6535716375026701984000864768,12937992133755133304691284997,25614498136037427319658317050
mov $3,$0
add $3,1
lpb $3
add $2,1
sub $3,1
mov $4,2
pow $4,$2
div $4,$2
add $1,$4
lpe
mov $0,$1
|
src/intro.asm | ioncodes/c64-intro | 0 | 89496 | <gh_stars>0
#import "registers.asm"
#import "data.asm"
#import "helpers.asm"
:BasicUpstart2(main)
main:
sei // Disable Interrupts
lda #$00 // Set Background
sta BORDER_COLOR // and Border colors
sta BACKGROUND_COLOR
sta $0286
jsr $e544
ldy #0
!:
lda revers_text, y
beq !+
sta $0400, y
iny
bne !-
!:
lda #$7f // Disable CIA
sta CIA1_INTERRUPTS
sta CIA2_INTERRUPTS
lda $dc0d
lda $dd0d
lda #$1b // Clear the High bit (lines 256-318)
sta YSCROLL
lda #$0 // Interrupt on line 0
sta RASTER
lda #<irq // IRQ Low
ldx #>irq // IRQ High
sta IRQLO // Interrupt Vector
stx IRQHI // Interrupt Vector
lda #$01 // Enable Raster Interrupts
sta IMR
lda $d019
sta $d019
cli // Allow IRQ's
jmp * // Endless Loop
revers_text: .text "******** ein graustufenverlauf ********"
.text "******** ein roter farbverlauf ********"
.text "******** ein blauer farbverlauf ********"
.for(var i = 0; i < 20; i++) { .byte $20,$a0 }
.byte $00
irq:
lda $d019
sta $d019
ldx #0
lda #50
!:
cmp $d012
bne !-
!loop:
ldy wartezeiten, x
!:
dey
bne !-
nop
nop
lda farbtabelle, x
sta $d021
inx
cpx #4 * 8
bne !loop-
lda #0
sta $d021
jmp $ea7e
wartezeiten: .byte 8, 1, 8, 8, 8, 8, 8, 8
.byte 8, 1, 8, 8, 8, 8, 8, 8
.byte 8, 1, 8, 8, 8, 8, 8, 8
.byte 8, 1, 8, 8, 8, 8, 8, 8
farbtabelle: .byte 11,12,15,01,01,15,12,0
.byte 09,02,08,10,15,07,01,0
.byte 06,14,03,01,01,03,14,0
.byte 03,13,01,13,03,13,05,0 |
bb-runtimes/arm/stm32l/setup_pll.adb | JCGobbi/Nucleo-STM32G474RE | 0 | 25008 | <reponame>JCGobbi/Nucleo-STM32G474RE
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- Copyright (C) 2012-2021, 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 procedure is tailored for the STM32L5xx boards. It configures the
-- system for the maximum clock frequency of 110MHz.
pragma Suppress (All_Checks);
-- The procedure is called before the Ada runtime is initialized, so suppress
-- any runtime checks.
with Interfaces.STM32; use Interfaces, Interfaces.STM32;
with Interfaces.STM32.Flash; use Interfaces.STM32.Flash;
with Interfaces.STM32.RCC; use Interfaces.STM32.RCC;
with Interfaces.STM32.PWR; use Interfaces.STM32.PWR;
with System.BB.MCU_Parameters;
with System.BB.Board_Parameters; use System.BB.Board_Parameters;
with System.STM32; use System.STM32;
procedure Setup_PLL is
-- PLL parameters. STMCubeMX can be used to calculate these parameters for
-- a given clock source and the desired output frequency. Here the PLLCLK
-- and PPLQ is configured to 110 MHz while PLLP is configured 31.4 MHz
PLLM : constant := 12;
PLLN : constant := 55;
PLLP : constant := 7;
PLLQ : constant := 2;
PLLR : constant := 2;
SysClock_From_PLL : constant := SYSCLK_Source'Enum_Rep (SYSCLK_SRC_PLL);
RCC_PLL_Source_MSI : constant UInt2 := PLL_Source'Enum_Rep (PLL_SRC_MSI);
procedure Configure_RCC_Clocks;
-- Initialize the HCLK, SYSCLK, AHB and APB bus clocks. SYSCLK source is
-- the PLL. AHB and APB bus clocks are at max speed.
procedure Reset_Clocks;
procedure Enable_PWR_Clock;
procedure Disable_Backup_Domain_Protection;
procedure Configure_RCC_LSE_Drive_Low;
-- Set the External Low Speed oscillator (LSE) drive to Low
procedure Enable_LSE;
-- When configured in PLL-mode, the MSI automatically calibrates itself
-- via the LSE to better than +/- 0.25% accuracy. We enable the LSE
-- accordingly. See RM0438 Rev 6 pg 333/2194, section 9.3.3 "MSI
-- clock" LSESYSEN is disabled.
procedure Configure_HSI;
-- Enable the HSI and apply the calibration default
procedure Configure_MSI_To_Max_Speed;
-- Set up the multispeed internal oscillator to 48MHz so that it can feed
-- the main PLL to run the system at the maximum speed of 110 MHz. Sets the
-- FLASH latency from the contant declared in BB.Board_Parameters.
procedure Configure_PLL_From_MSI;
-- Set up the PLL driven by the MSI internal oscillator to run the system
-- at the maximum speed of 110 MHz
procedure Enable_MSI_PLL_Mode;
-- Enable MSI Auto calibration
procedure Select_Output_Voltage_Scale0;
-- Configure the main internal regulator output voltage for high
-- performance
procedure Configure_SYSCLK_From_PLL;
-- Set the system clock source to the PLL
procedure Configure_PCLK1_PCLK2;
-- Configure both AHB and APB clocks to run at max speed
procedure Await_PLL_Configuration_Complete;
procedure Await_Voltage_Supply_Scaling_Complete;
--------------------------
-- Configure_RCC_Clocks --
--------------------------
procedure Configure_RCC_Clocks is
begin
-- To correctly read data from FLASH memory, the number of wait states
-- (LATENCY) must be correctly programmed according to the frequency of
-- the CPU clock (HCLK) and the supply voltage of the device.
-- Increase the number of wait states if higher CPU frequency
if FLASH_Latency > FLASH_Periph.ACR.LATENCY then
FLASH_Periph.ACR.LATENCY := FLASH_Latency;
pragma Assert (FLASH_Periph.ACR.LATENCY = FLASH_Latency);
end if;
-- The PLL must be ready before we can configure the system clock
if not RCC_Periph.CR.PLLRDY then
raise Program_Error;
end if;
if Computed_SYSCLK_From_PLL > 80_000_000 then
-- Transition state management is required when selecting the PLL as
-- SYSCLK source with a target frequency above 80Mhz. See RM0438 Rev
-- 6, pg 336/2194, section 9.3.9 "System clock (SYSCLK) selection".
RCC_Periph.CFGR.HPRE := AHB_Prescalers'Enum_Rep (RCC_SYSCLK_DIV2);
end if;
Configure_SYSCLK_From_PLL;
-- Configure HCLK prescalar for max speed (110MHz)
RCC_Periph.CFGR.HPRE := AHB_Prescalers'Enum_Rep (RCC_SYSCLK_DIV1);
-- Note that Configure_HCLK happens to set the HPRE back to
-- RCC_SYSCLK_DIV1 in this configuration, thus ending the
-- state transition management section
Configure_PCLK1_PCLK2;
end Configure_RCC_Clocks;
-------------------------------
-- Configure_SYSCLK_From_PLL --
-------------------------------
procedure Configure_SYSCLK_From_PLL is
begin
RCC_Periph.CFGR.SW := SysClock_From_PLL;
-- Wait for clock source to be as requested
loop
exit when RCC_Periph.CFGR.SWS = SysClock_From_PLL;
end loop;
end Configure_SYSCLK_From_PLL;
---------------------------
-- Configure_PCLK1_PCLK2 --
---------------------------
procedure Configure_PCLK1_PCLK2 is
begin
-- In this specific BSP configuration, both APB1CLKDivider and
-- APB2CLKDivider are RCC_HCLK_DIV1.
RCC_Periph.CFGR.PPRE.Arr (1) := APB_Prescalers'Enum_Rep (RCC_HCLK_DIV1);
RCC_Periph.CFGR.PPRE.Arr (2) := APB_Prescalers'Enum_Rep (RCC_HCLK_DIV1);
end Configure_PCLK1_PCLK2;
---------------------------------
-- Configure_RCC_LSE_Drive_Low --
---------------------------------
procedure Configure_RCC_LSE_Drive_Low is
RCC_LSE_Drive_Low : constant UInt2 := 0;
begin
Disable_Backup_Domain_Protection;
-- Configure the External Low Speed oscillator (LSE) drive
RCC_Periph.BDCR.LSEDRV := RCC_LSE_Drive_Low;
end Configure_RCC_LSE_Drive_Low;
----------------------------
-- Configure_PLL_From_MSI --
----------------------------
procedure Configure_PLL_From_MSI is
begin
-- see RM0438 Rev 6, pg 334/2194 , section 9.3.5 PLL for the steps
-- required to configure the PLL
-- Disable the main PLL before configuring it
RCC_Periph.CR.PLLON := False;
loop
exit when not RCC_Periph.CR.PLLRDY;
end loop;
RCC_Periph.PLLCFGR :=
(PLLM => PLLM - 1, -- handle the encoding
PLLN => PLLN,
PLLPDIV => PLLP,
PLLQ => PLLQ / 2 - 1, -- handle the encoding
PLLR => PLLR / 2 - 1, -- handle the encoding
PLLSRC => RCC_PLL_Source_MSI,
others => <>);
-- Enable the main PLL
RCC_Periph.CR.PLLON := True;
-- Enable PLL System Clock output
RCC_Periph.PLLCFGR.PLLREN := True;
-- Wait until the PLL is ready
loop
exit when RCC_Periph.CR.PLLRDY;
end loop;
end Configure_PLL_From_MSI;
-------------------------
-- Enable_MSI_PLL_Mode --
-------------------------
procedure Enable_MSI_PLL_Mode is
begin
-- MSIPLLEN must be enabled after LSE is enabled (LSEON enabled) and
-- ready (LSERDY set by hardware). There is a hardware protection to
-- avoid enabling MSIPLLEN if LSE is not ready. This bit is cleared by
-- hardware when LSE is disabled (LSEON = 0) or when the Clock Security
-- System on LSE detects a LSE failure (refer to RCC_CSR register in
-- RM0438 Rev 6 pg 350/2194).
if RCC_Periph.BDCR.LSECSSD -- failure detected on LSE
or else not RCC_Periph.BDCR.LSEON
or else not RCC_Periph.BDCR.LSERDY
then
raise Program_Error;
end if;
RCC_Periph.CR.MSIPLLEN := True;
end Enable_MSI_PLL_Mode;
--------------------------------
-- Configure_MSI_To_Max_Speed --
--------------------------------
procedure Configure_MSI_To_Max_Speed is
-- RM0438, section 9.3 "Clocks" says that the MSI is used as system
-- clock source after startup from reset, configured at 4 MHz. We
-- reconfigure it to 48MHz.
MSI_Range_11 : constant := 2#1011#;
-- 48 MHz. See RM0438 Rev 6, page 349/2194
MSI_Range_From_RCC_CR : constant Boolean := True;
-- MSI Range is provided by MSIRANGE[3:0] in the RCC_CR register, as per
-- RM0438 Rev 6 pg 349/2194. It can also be set by another register but
-- not to 48MHz.
RCC_MSI_Calibration_Default : constant Byte := 0;
begin
-- Note: Warning: MSIRANGE can be modified when MSI is OFF (MSION=0)
-- or when MSI is ready (MSIRDY=1). MSIRANGE must NOT be modified when
-- MSI is ON and NOT ready (MSION=1 and MSIRDY=0). We document the
-- requirement with an assertion.
pragma Assert (not RCC_Periph.CR.MSION or else RCC_Periph.CR.MSIRDY);
-- To correctly read data from FLASH memory, the number of wait states
-- (latency) must be correctly programmed according to the frequency of
-- the CPU clock and the supply voltage of the device.
--
-- See RM0438 Rev 6, pg 180/2194, "Increasing the CPU frequency" for the
-- steps required
--
-- We are executing at powerup, at which point the MSI clock is at 4MHz
-- with zero wait states, and we are setting it to 48MHz.
--
-- Therefore, we first increase the number of wait states, if necessary:
FLASH_Periph.ACR.LATENCY := FLASH_Latency;
-- Select the Multiple Speed oscillator (MSI) clock range
RCC_Periph.CR.MSIRGSEL := MSI_Range_From_RCC_CR;
RCC_Periph.CR.MSIRANGE := MSI_Range_11;
-- Finally adjust the MSI calibration value
RCC_Periph.ICSCR.MSITRIM := RCC_MSI_Calibration_Default;
-- Check that the new number of wait states is taken into account. We
-- document the requirement with an assertion.
pragma Assert (FLASH_Periph.ACR.LATENCY = FLASH_Latency);
end Configure_MSI_To_Max_Speed;
--------------------------------------
-- Disable_Backup_Domain_Protection --
--------------------------------------
procedure Disable_Backup_Domain_Protection is
-- Note that when the "Disable Backup domain write Protection" bit is
-- set, access is enabled.
begin
PWR_Periph.CR1.DBP := True;
-- Wait for protection to be disabled
loop
exit when PWR_Periph.CR1.DBP;
end loop;
end Disable_Backup_Domain_Protection;
----------------
-- Enable_LSE --
----------------
procedure Enable_LSE is
begin
if not PWR_Periph.CR1.DBP then
Disable_Backup_Domain_Protection;
end if;
RCC_Periph.BDCR.LSEON := True;
loop
exit when RCC_Periph.BDCR.LSERDY;
end loop;
RCC_Periph.BDCR.LSESYSEN := False;
-- Wait until LSESYSRDY is cleared
loop
exit when not RCC_Periph.BDCR.LSESYSRDY;
end loop;
end Enable_LSE;
-------------------
-- Configure_HSI --
-------------------
procedure Configure_HSI is
RCC_HSICALIBRATION_DEFAULT : constant UInt7 := 40;
begin
-- Enable the Internal High Speed oscillator
RCC_Periph.CR.HSION := True;
-- Wait till HSI is ready
loop
exit when RCC_Periph.CR.HSIRDY;
end loop;
-- Adjust the Internal High Speed oscillator (HSI) calibration value
RCC_Periph.ICSCR.HSITRIM := RCC_HSICALIBRATION_DEFAULT;
end Configure_HSI;
-------------------------------------------------
-- Configure_Internal_Regulator_Output_Voltage --
-------------------------------------------------
procedure Select_Output_Voltage_Scale0 is
PWR_REGULATOR_VOLTAGE_SCALE0 : constant UInt2 := 0;
-- Allow 110MHz. At power-on reset or a system reset, the main regulator
-- voltage Range 2 is selected by default. The system clock is limited
-- to 110 MHz in Range 0 mode, 80 MHz in Range 1 mode, 26 MHz in Range
-- 2 mode, therefore we want Range 0.
begin
-- VOS shall not be changed in Low Power Mode, or if Low Power Mode is
-- requested but not yet established.
pragma Assert (PWR_Periph.SR1.SMPSHPRDY and -- High-power mode ready
not PWR_Periph.CR4.SMPSLPEN); -- Low-power mode enabled
PWR_Periph.CR1.VOS := PWR_REGULATOR_VOLTAGE_SCALE0;
Await_VOSF_Cleared : declare
At_Least_Once : Boolean := False;
begin
loop
exit when At_Least_Once and then PWR_Periph.SR2.VOSF;
At_Least_Once := True;
end loop;
end Await_VOSF_Cleared;
end Select_Output_Voltage_Scale0;
------------------
-- Reset_Clocks --
------------------
procedure Reset_Clocks is
begin
-- Switch on high speed internal clock
RCC_Periph.CR.HSION := True;
-- Reset CFGR register
RCC_Periph.CFGR := (others => <>);
-- Reset HSEON, CSSON and PLLON bits
RCC_Periph.CR.HSEON := False;
RCC_Periph.CR.CSSON := False;
RCC_Periph.CR.PLLON := False;
-- Reset PLL configuration register
RCC_Periph.PLLCFGR := (others => <>);
-- Reset HSE bypass bit
RCC_Periph.CR.HSEBYP := False;
-- Disable all interrupts
RCC_Periph.CIER := (others => <>);
end Reset_Clocks;
----------------------
-- Enable_PWR_Clock --
----------------------
procedure Enable_PWR_Clock is
Temp : Boolean
with Volatile, Unreferenced; -- Ensure the compiler actually reads it
begin
RCC_Periph.APB1ENR1.PWREN := True;
-- As per __HAL_RCC_PWR_CLK_ENABLE()
Temp := RCC_Periph.APB1ENR1.PWREN;
end Enable_PWR_Clock;
--------------------------------------
-- Await_PLL_Configuration_Complete --
--------------------------------------
procedure Await_PLL_Configuration_Complete is
begin
loop
exit when RCC_Periph.CFGR.SWS = SysClock_From_PLL;
end loop;
end Await_PLL_Configuration_Complete;
-------------------------------------------
-- Await_Voltage_Supply_Scaling_Complete --
-------------------------------------------
procedure Await_Voltage_Supply_Scaling_Complete is
begin
loop
exit when System.BB.MCU_Parameters.Is_PWR_Stabilized;
end loop;
end Await_Voltage_Supply_Scaling_Complete;
begin
Reset_Clocks;
Enable_PWR_Clock;
-- Reset the power interface
RCC_Periph.APB1RSTR1.PWRRST := True;
RCC_Periph.APB1RSTR1.PWRRST := False;
Select_Output_Voltage_Scale0;
Configure_RCC_LSE_Drive_Low;
-- Configure the MSI, HSI, LSE, and PLL. The PLL is clocked from MSI, which
-- is configured to run at 48 MHz. The PLL outputs PLLCLK and PPLQ are
-- configured to 110 MHz while PLLP is configured 31.4 MHz.
Configure_MSI_To_Max_Speed;
Configure_HSI;
Enable_LSE;
Configure_PLL_From_MSI;
Configure_RCC_Clocks;
Enable_MSI_PLL_Mode;
Await_PLL_Configuration_Complete;
Await_Voltage_Supply_Scaling_Complete;
end Setup_PLL;
|
vendor/stdlib/src/Data/List/Equality.agda | isabella232/Lemmachine | 56 | 14896 | <filename>vendor/stdlib/src/Data/List/Equality.agda
------------------------------------------------------------------------
-- List equality
------------------------------------------------------------------------
module Data.List.Equality where
open import Data.List
open import Relation.Nullary
open import Relation.Binary
module Equality (S : Setoid) where
open Setoid S renaming (_≈_ to _≊_)
infixr 5 _∷_
infix 4 _≈_
data _≈_ : List carrier → List carrier → Set where
[] : [] ≈ []
_∷_ : ∀ {x xs y ys} (x≈y : x ≊ y) (xs≈ys : xs ≈ ys) →
x ∷ xs ≈ y ∷ ys
setoid : Setoid
setoid = record
{ carrier = List carrier
; _≈_ = _≈_
; isEquivalence = record
{ refl = refl'
; sym = sym'
; trans = trans'
}
}
where
refl' : Reflexive _≈_
refl' {[]} = []
refl' {x ∷ xs} = refl ∷ refl' {xs}
sym' : Symmetric _≈_
sym' [] = []
sym' (x≈y ∷ xs≈ys) = sym x≈y ∷ sym' xs≈ys
trans' : Transitive _≈_
trans' [] [] = []
trans' (x≈y ∷ xs≈ys) (y≈z ∷ ys≈zs) =
trans x≈y y≈z ∷ trans' xs≈ys ys≈zs
open Setoid setoid public hiding (_≈_)
module DecidableEquality (D : DecSetoid) where
open DecSetoid D hiding (_≈_)
open Equality setoid renaming (setoid to List-setoid)
decSetoid : DecSetoid
decSetoid = record
{ isDecEquivalence = record
{ isEquivalence = Setoid.isEquivalence List-setoid
; _≟_ = dec
}
}
where
dec : Decidable _≈_
dec [] [] = yes []
dec (x ∷ xs) (y ∷ ys) with x ≟ y | dec xs ys
... | yes x≈y | yes xs≈ys = yes (x≈y ∷ xs≈ys)
... | no ¬x≈y | _ = no helper
where
helper : ¬ _≈_ (x ∷ xs) (y ∷ ys)
helper (x≈y ∷ _) = ¬x≈y x≈y
... | _ | no ¬xs≈ys = no helper
where
helper : ¬ _≈_ (x ∷ xs) (y ∷ ys)
helper (_ ∷ xs≈ys) = ¬xs≈ys xs≈ys
dec [] (y ∷ ys) = no λ()
dec (x ∷ xs) [] = no λ()
open DecSetoid decSetoid public
module PropositionalEquality {A : Set} where
open import Relation.Binary.PropositionalEquality as PropEq
using (_≡_) renaming (refl to ≡-refl)
open Equality (PropEq.setoid A) public
≈⇒≡ : _≈_ ⇒ _≡_
≈⇒≡ [] = ≡-refl
≈⇒≡ (≡-refl ∷ xs≈ys) with ≈⇒≡ xs≈ys
≈⇒≡ (≡-refl ∷ xs≈ys) | ≡-refl = ≡-refl
|
Cubical/Algebra/CommRing/Ideal.agda | marcinjangrzybowski/cubical | 301 | 7276 | {-
This is mostly for convenience, when working with ideals
(which are defined for general rings) in a commutative ring.
-}
{-# OPTIONS --safe #-}
module Cubical.Algebra.CommRing.Ideal where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Powerset
open import Cubical.Data.Nat using (ℕ ; zero ; suc)
open import Cubical.Data.FinData
open import Cubical.Algebra.CommRing.Base
open import Cubical.Algebra.Ring.Ideal renaming (IdealsIn to IdealsInRing)
open import Cubical.Algebra.Ring.BigOps
open import Cubical.Algebra.RingSolver.ReflectionSolving
private
variable
ℓ : Level
IdealsIn : (R : CommRing ℓ) → Type _
IdealsIn R = IdealsInRing (CommRing→Ring R)
module _ (Ring@(R , str) : CommRing ℓ) where
open CommRingStr str
makeIdeal : (I : R → hProp ℓ)
→ (+-closed : {x y : R} → x ∈ I → y ∈ I → (x + y) ∈ I)
→ (0r-closed : 0r ∈ I)
→ (·-closedLeft : {x : R} → (r : R) → x ∈ I → r · x ∈ I)
→ IdealsIn (R , str)
makeIdeal I +-closed 0r-closed ·-closedLeft = I ,
(record
{ +-closed = +-closed
; -closed = λ x∈I → subst-∈ I (useSolver _)
(·-closedLeft (- 1r) x∈I)
; 0r-closed = 0r-closed
; ·-closedLeft = ·-closedLeft
; ·-closedRight = λ r x∈I →
subst-∈ I
(·-comm r _)
(·-closedLeft r x∈I)
})
where useSolver : (x : R) → - 1r · x ≡ - x
useSolver = solve Ring
-- better?
module _ (R' : CommRing ℓ) where
private R = fst R'
open CommRingStr (snd R')
open Sum (CommRing→Ring R')
record isCommIdeal (I : ℙ R) : Type ℓ where
constructor
makeIsCommIdeal
field
+Closed : ∀ {x y : R} → x ∈ I → y ∈ I → (x + y) ∈ I
contains0 : 0r ∈ I
·Closed : ∀ {x : R} (r : R) → x ∈ I → r · x ∈ I
open isCommIdeal
isPropIsCommIdeal : (I : ℙ R) → isProp (isCommIdeal I)
+Closed (isPropIsCommIdeal I ici₁ ici₂ i) x∈I y∈I =
I _ .snd (ici₁ .+Closed x∈I y∈I) (ici₂ .+Closed x∈I y∈I) i
contains0 (isPropIsCommIdeal I ici₁ ici₂ i) = I 0r .snd (ici₁ .contains0) (ici₂ .contains0) i
·Closed (isPropIsCommIdeal I ici₁ ici₂ i) r x∈I =
I _ .snd (ici₁ .·Closed r x∈I) (ici₂ .·Closed r x∈I) i
CommIdeal : Type _
CommIdeal = Σ[ I ∈ ℙ R ] isCommIdeal I
∑Closed : (I : CommIdeal) {n : ℕ} (V : FinVec R n)
→ (∀ i → V i ∈ fst I) → ∑ V ∈ fst I
∑Closed I {n = zero} _ _ = I .snd .contains0
∑Closed I {n = suc n} V h = I .snd .+Closed (h zero) (∑Closed I (V ∘ suc) (h ∘ suc))
|
src/hardware/clipboard/_darwin/file2clip.applescript | guyavrhm/flow | 17 | 946 | #!/usr/bin/osascript
use framework "Appkit"
property this : a reference to current application
property NSMutableArray : a reference to NSMutableArray of this
property NSPasteboard : a reference to NSPasteboard of this
property NSString : a reference to NSString of this
property NSURL : a reference to NSURL of this
property pb : missing value
on run input
init()
clearClipboard()
addToClipboard(input)
end run
to init()
set pb to NSPasteboard's generalPasteboard()
end init
to clearClipboard()
pb's clearContents()
end clearClipboard
to addToClipboard(fs)
set fURLs to NSMutableArray's array()
repeat with f in fs
set f to f's POSIX path
set fp to (NSString's stringWithString:f)'s ¬
stringByStandardizingPath()
fURLs's addObject:(NSURL's fileURLWithPath:fp)
end repeat
pb's writeObjects:fURLs
end addToClipboard
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_1497.asm | ljhsiun2/medusa | 9 | 16035 | <filename>Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_1497.asm
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r15
push %r8
push %r9
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0x14a37, %rsi
lea addresses_D_ht+0x18a37, %rdi
nop
nop
sub %r9, %r9
mov $39, %rcx
rep movsb
nop
nop
nop
nop
nop
xor $27248, %rdi
lea addresses_D_ht+0x16237, %r12
nop
nop
nop
nop
nop
sub %rdi, %rdi
movb $0x61, (%r12)
nop
nop
and $64262, %rcx
lea addresses_UC_ht+0x122b7, %r8
nop
xor $42351, %rcx
mov (%r8), %rdi
nop
nop
nop
nop
add %r12, %r12
lea addresses_normal_ht+0x8237, %rsi
lea addresses_WC_ht+0x13037, %rdi
nop
nop
nop
cmp %r15, %r15
mov $32, %rcx
rep movsw
nop
nop
dec %rsi
lea addresses_WC_ht+0x1a107, %rsi
lea addresses_normal_ht+0xcd77, %rdi
nop
xor $62571, %r12
mov $97, %rcx
rep movsb
nop
nop
nop
add %r15, %r15
lea addresses_normal_ht+0x17737, %r15
nop
nop
nop
nop
nop
xor %rcx, %rcx
mov (%r15), %esi
and $46883, %rcx
lea addresses_normal_ht+0x11237, %rsi
nop
nop
nop
nop
nop
xor %r15, %r15
mov $0x6162636465666768, %rcx
movq %rcx, %xmm0
vmovups %ymm0, (%rsi)
nop
nop
nop
nop
and $65238, %r15
lea addresses_WT_ht+0x10617, %rsi
lea addresses_WC_ht+0x2b8e, %rdi
nop
nop
nop
nop
nop
add $49945, %rdx
mov $80, %rcx
rep movsq
nop
nop
sub %r12, %r12
lea addresses_UC_ht+0x19237, %rsi
lea addresses_normal_ht+0x1d197, %rdi
clflush (%rdi)
nop
nop
nop
add $50044, %r12
mov $89, %rcx
rep movsw
nop
nop
nop
sub $40259, %r8
lea addresses_D_ht+0x9637, %rsi
lea addresses_D_ht+0xec17, %rdi
nop
nop
nop
nop
sub $5219, %rdx
mov $5, %rcx
rep movsq
nop
nop
nop
nop
xor $49295, %rcx
lea addresses_WC_ht+0x1d237, %rsi
lea addresses_normal_ht+0x2137, %rdi
nop
nop
sub %r12, %r12
mov $4, %rcx
rep movsq
nop
nop
nop
nop
nop
xor $50125, %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r9
pop %r8
pop %r15
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r8
push %rax
push %rcx
push %rsi
// Store
lea addresses_WT+0x457, %rsi
nop
and %r8, %r8
movw $0x5152, (%rsi)
nop
nop
nop
cmp $17242, %rsi
// Faulty Load
lea addresses_D+0x1da37, %rcx
cmp $2159, %rax
movups (%rcx), %xmm5
vpextrq $1, %xmm5, %r8
lea oracles, %rsi
and $0xff, %r8
shlq $12, %r8
mov (%rsi,%r8,1), %r8
pop %rsi
pop %rcx
pop %rax
pop %r8
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_D', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_WT', 'size': 2, 'AVXalign': False}}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_D', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 11, 'NT': False, 'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False}}
{'src': {'same': True, 'congruent': 7, 'NT': False, 'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}}
{'src': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 5, 'same': True}}
{'src': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 11, 'NT': False, 'type': 'addresses_normal_ht', 'size': 32, 'AVXalign': False}}
{'src': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}}
{'src': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}}
{'src': {'type': 'addresses_D_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 0, 'same': False}}
{'src': {'type': 'addresses_WC_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
|
source/s-staall.adb | ytomino/drake | 33 | 4702 | with System.System_Allocators;
with System.Unwind.Raising;
with System.Unwind.Standard;
package body System.Standard_Allocators is
pragma Suppress (All_Checks);
function Allocate (
Size : Storage_Elements.Storage_Count)
return Address
is
Result : constant Address := System_Allocators.Allocate (Size);
begin
if Result = Null_Address then
Raise_Heap_Exhausted;
end if;
return Result;
end Allocate;
procedure Free (Storage_Address : Address) is
begin
System_Allocators.Free (Storage_Address);
end Free;
function Reallocate (
Storage_Address : Address;
Size : Storage_Elements.Storage_Count)
return Address
is
Result : constant Address :=
System_Allocators.Reallocate (Storage_Address, Size);
begin
if Result = Null_Address then
Raise_Heap_Exhausted;
end if;
return Result;
end Reallocate;
procedure Raise_Heap_Exhausted is
Heap_Exhausted : constant String := "heap exhausted"; -- (s-memory.adb)
begin
Unwind.Raising.Raise_Exception_From_Here_With (
Unwind.Standard.Storage_Error'Access,
Message => Heap_Exhausted);
end Raise_Heap_Exhausted;
end System.Standard_Allocators;
|
ComputerStructure/SPARTAN6/Exercise_4.asm | frisinacho/UMA | 1 | 102881 | .text
lui $4,0x0002
lui $3,0x0001
addi $1,$0,1
nop
et:
lw $5,0($4)
nop
nop
nop
bne $5,$1,et
sw $1,3($3)
fun:
lw $5,0($4)
beq $5,$1,fun
sw $0,3($3)
j et
|
cards/bn4/ModCards/134-G008 NumberSoul (0E).asm | RockmanEXEZone/MMBN-Mod-Card-Kit | 10 | 92488 | <gh_stars>1-10
.include "defaults_mod.asm"
table_file_jp equ "exe4-utf8.tbl"
table_file_en equ "bn4-utf8.tbl"
game_code_len equ 3
game_code equ 0x4234574A // B4WJ
game_code_2 equ 0x42345745 // B4WE
game_code_3 equ 0x42345750 // B4WP
card_type equ 1
card_id equ 128
card_no equ "128"
card_sub equ "Mod Card 128"
card_sub_x equ 64
card_desc_len equ 3
card_desc_1 equ "Address 0E"
card_desc_2 equ "NumberSoul (Buggy)"
card_desc_3 equ "Blue Moon only"
card_name_jp_full equ "ナンバーソウル"
card_name_jp_game equ "ナンバーソウル"
card_name_en_full equ "NumberSoul"
card_name_en_game equ "NumberSoul"
card_address equ "0E"
card_address_id equ 4
card_bug equ 1
card_wrote_en equ "NumberSoul"
card_wrote_jp equ "ナンバーソウル" |
libsrc/_DEVELOPMENT/string/c/sccz80/strcspn_callee.asm | teknoplop/z88dk | 8 | 93057 |
; size_t strcspn(const char *s1, const char *s2)
SECTION code_clib
SECTION code_string
PUBLIC strcspn_callee
EXTERN asm_strcspn
strcspn_callee:
pop hl
pop de
ex (sp),hl
jp asm_strcspn
|
programs/oeis/240/A240828.asm | jmorken/loda | 1 | 16466 | ; A240828: a(1)=a(2)=0, a(3)=2; thereafter a(n) = Sum( a(n-i-s-a(n-i-1)), i=0..k-1 ), where s=0, k=3.
; 0,0,2,2,4,2,6,4,8,4,10,6,12,6,14,8,16,8,18,10,20,10,22,12,24,12,26,14,28,14,30,16,32,16,34,18,36,18,38,20,40,20,42,22,44,22,46,24,48,24,50,26,52,26,54,28,56,28,58,30,60,30,62,32,64,32,66,34,68,34,70,36,72,36,74,38,76,38,78,40,80,40,82,42,84,42,86,44,88,44,90,46,92,46,94,48,96,48,98,50,100,50,102,52,104,52,106,54,108,54,110,56,112,56,114,58,116,58,118,60,120,60,122,62,124,62,126,64,128,64,130,66,132,66,134,68,136,68,138,70,140,70,142,72,144,72,146,74,148,74,150,76,152,76,154,78,156,78,158,80,160,80,162,82,164,82,166,84,168,84,170,86,172,86,174,88,176,88,178,90,180,90,182,92,184,92,186,94,188,94,190,96,192,96,194,98,196,98,198,100,200,100,202,102,204,102,206,104,208,104,210,106,212,106,214,108,216,108,218,110,220,110,222,112,224,112,226,114,228,114,230,116,232,116,234,118,236,118,238,120,240,120,242,122,244,122,246,124,248,124
mov $1,$0
add $1,1
dif $1,2
div $1,2
mul $1,2
|
source/MicroBenchX.Ipc/IpcTests/mov_int64.asm | clayne/MicroBenchX | 15 | 243744 | [BITS 64]
%include "parameters.inc"
extern exit
extern printf
global mov_int64
section .text
mov_int64:
push rbp
mov rax, ITERATIONS_mov_int64
mov rbx, __float64__(1.0)
mov rcx, __float64__(2.0)
mov rdx, __float64__(3.0)
mov rsi, __float64__(4.0)
mov rdi, __float64__(5.0)
mov r8, __float64__(6.0)
mov r9, __float64__(7.0)
mov r10, __float64__(8.0)
mov r11, __float64__(9.0)
mov r12, __float64__(10.0)
mov r13, __float64__(11.0)
mov r14, __float64__(12.0)
mov r15, __float64__(13.0)
.loop:
mov rbx, rcx
mov rcx, rdx
mov rdx, rsi
mov rsi, rdi
mov rdi, r8
mov r8, r9
mov r9, r10
mov r10, r11
mov r11, r12
mov r12, r13
mov r13, r14
mov r14, r15
dec rax
jnz .loop
.exit:
lea rdi, [rel format]
pop rbp
xor rax, rax
mov rax, ITERATIONS_mov_int64
mov rsi, 14 ; 12 mov + 1 dec + 1 loop
mul rsi
ret
section .data
format: db "%lu", 10, 0 |
source/nodes/program-nodes-operator_symbols.ads | optikos/oasis | 0 | 26003 | -- Copyright (c) 2019 <NAME> <<EMAIL>>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Program.Lexical_Elements;
with Program.Elements.Operator_Symbols;
with Program.Element_Visitors;
package Program.Nodes.Operator_Symbols is
pragma Preelaborate;
type Operator_Symbol is
new Program.Nodes.Node
and Program.Elements.Operator_Symbols.Operator_Symbol
and Program.Elements.Operator_Symbols.Operator_Symbol_Text
with private;
function Create
(Operator_Symbol_Token : not null Program.Lexical_Elements
.Lexical_Element_Access)
return Operator_Symbol;
type Implicit_Operator_Symbol is
new Program.Nodes.Node
and Program.Elements.Operator_Symbols.Operator_Symbol
with private;
function Create
(Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False)
return Implicit_Operator_Symbol
with Pre =>
Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance;
private
type Base_Operator_Symbol is
abstract new Program.Nodes.Node
and Program.Elements.Operator_Symbols.Operator_Symbol
with null record;
procedure Initialize (Self : aliased in out Base_Operator_Symbol'Class);
overriding procedure Visit
(Self : not null access Base_Operator_Symbol;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class);
overriding function Is_Operator_Symbol_Element
(Self : Base_Operator_Symbol)
return Boolean;
overriding function Is_Expression_Element
(Self : Base_Operator_Symbol)
return Boolean;
type Operator_Symbol is
new Base_Operator_Symbol
and Program.Elements.Operator_Symbols.Operator_Symbol_Text
with record
Operator_Symbol_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
end record;
overriding function To_Operator_Symbol_Text
(Self : aliased in out Operator_Symbol)
return Program.Elements.Operator_Symbols.Operator_Symbol_Text_Access;
overriding function Operator_Symbol_Token
(Self : Operator_Symbol)
return not null Program.Lexical_Elements.Lexical_Element_Access;
overriding function Image (Self : Operator_Symbol) return Text;
type Implicit_Operator_Symbol is
new Base_Operator_Symbol
with record
Is_Part_Of_Implicit : Boolean;
Is_Part_Of_Inherited : Boolean;
Is_Part_Of_Instance : Boolean;
end record;
overriding function To_Operator_Symbol_Text
(Self : aliased in out Implicit_Operator_Symbol)
return Program.Elements.Operator_Symbols.Operator_Symbol_Text_Access;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Operator_Symbol)
return Boolean;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Operator_Symbol)
return Boolean;
overriding function Is_Part_Of_Instance
(Self : Implicit_Operator_Symbol)
return Boolean;
overriding function Image (Self : Implicit_Operator_Symbol) return Text;
end Program.Nodes.Operator_Symbols;
|
oeis/033/A033163.asm | neoneye/loda-programs | 11 | 163223 | <reponame>neoneye/loda-programs
; A033163: Begins with (3, 5) and avoids 3-term arithmetic progressions.
; Submitted by <NAME>(s1)
; 3,5,6,8,12,14,15,17,30,32,33,35,39,41,42,44,84,86,87,89,93,95,96,98,111,113,114,116,120,122,123,125,246,248,249,251,255,257,258,260,273,275,276,278,282,284,285,287,327,329,330,332,336,338,339,341,354,356,357,359,363
mov $2,$0
div $0,4
seq $0,240400 ; Numbers n having a partition into distinct parts of form 3^k-2^k.
mul $0,2
add $0,$2
mul $0,9
add $0,5
div $0,6
add $0,3
|
unittests/ASM/VEX/bzhi.asm | cobalt2727/FEX | 0 | 103636 | <reponame>cobalt2727/FEX<gh_stars>0
%ifdef CONFIG
{
"RegData": {
"RAX": "0xFFFFFFFFFFFFFFFF",
"RBX": "64",
"RCX": "0x00000000000003FF",
"RDX": "10",
"RSI": "0x00000000FFFFFFFF",
"RDI": "32",
"RBP": "0x00000000000003FF",
"RSP": "10"
}
}
%endif
; Should not alter the source value
mov rax, -1
mov rbx, 64
bzhi rax, rax, rbx
; General operation
mov rcx, -1
mov rdx, 10
bzhi rcx, rcx, rdx
; 32-bit tests
; Should not alter the source value
mov esi, -1
mov edi, 32
bzhi esi, esi, edi
; General operation
mov ebp, -1
mov esp, 10
bzhi ebp, ebp, esp
hlt
|
Task/Hamming-numbers/Ada/hamming-numbers-3.ada | LaudateCorpus1/RosettaCodeData | 1 | 14942 | <filename>Task/Hamming-numbers/Ada/hamming-numbers-3.ada
Ada.Text_IO.Put_Line ("3) 1_000_000st Hamming number: " &
Ada.Strings.Unbounded.To_String (My_Big_Numbers.String_Conversion.Big_Unsigned2UString (Big_Get_Hamming (1_000_000))));
|
Cats/Category/Cat/Facts/Exponential.agda | JLimperg/cats | 24 | 16721 | <filename>Cats/Category/Cat/Facts/Exponential.agda
{-# OPTIONS --without-K --safe #-}
module Cats.Category.Cat.Facts.Exponential where
open import Data.Product using (_,_)
open import Level using (_⊔_)
open import Relation.Binary using (IsEquivalence)
open import Cats.Bifunctor using
(Bifunctor ; Bifunctor→Functor₁ ; transposeBifunctor₁ ; transposeBifunctor₁-resp)
open import Cats.Category
open import Cats.Category.Cat as Cat′ using
(Cat ; Functor ; _∘_ ; _≈_) renaming
(id to Id)
open import Cats.Category.Cat.Facts.Product using (hasBinaryProducts ; ⟨_×_⟩)
open import Cats.Category.Fun using (_↝_ ; Trans ; ≈-intro ; ≈-elim)
open import Cats.Category.Fun.Facts.Iso using (≈→≅)
open import Cats.Category.Product.Binary using (_×_)
open import Cats.Trans.Iso as NatIso using (NatIso)
open import Cats.Util.Conv
import Cats.Category.Base as Base
import Cats.Category.Constructions.Unique as Unique
import Cats.Category.Constructions.Iso as Iso
open Functor
open Trans
open Iso.Iso
private
module Cat≈ {lo la l≈ lo′ la′ l≈′}
{C : Category lo la l≈} {D : Category lo′ la′ l≈′}
= IsEquivalence (Cat′.equiv {C = C} {D})
module Fun {lo la l≈ lo′ la′ l≈′}
{C : Category lo la l≈} {D : Category lo′ la′ l≈′}
= Category (C ↝ D)
module _ {lo la l≈ lo′ la′ l≈′}
{B : Category lo la l≈} {C : Category lo′ la′ l≈′}
where
private
module B = Category B
module C = Category C
Eval : Bifunctor (B ↝ C) B C
Eval = record
{ fobj = λ where
(F , x) → fobj F x
; fmap = λ where
{F , a} {G , b} (θ , f) → fmap G f C.∘ component θ a
; fmap-resp = λ where
{F , a} {G , b} {θ , f} {ι , g} (θ≈ι , f≈g) →
C.∘-resp (fmap-resp G f≈g) (≈-elim θ≈ι)
; fmap-id = λ { {F , b} → C.≈.trans (C.∘-resp-l (fmap-id F)) C.id-l }
; fmap-∘ = λ where
{F , a} {G , b} {H , c} {θ , f} {ι , g} →
begin
(fmap H f C.∘ component θ b) C.∘ (fmap G g C.∘ component ι a)
≈⟨ C.∘-resp-l (C.≈.sym (natural θ)) ⟩
(component θ c C.∘ fmap G f) C.∘ (fmap G g C.∘ component ι a)
≈⟨ C.assoc ⟩
component θ c C.∘ fmap G f C.∘ (fmap G g C.∘ component ι a)
≈⟨ C.∘-resp-r C.unassoc ⟩
component θ c C.∘ (fmap G f C.∘ fmap G g) C.∘ component ι a
≈⟨ C.∘-resp-r (C.∘-resp-l (fmap-∘ G)) ⟩
component θ c C.∘ fmap G (f B.∘ g) C.∘ component ι a
≈⟨ C.unassoc ⟩
(component θ c C.∘ fmap G (f B.∘ g)) C.∘ component ι a
≈⟨ C.∘-resp-l (natural θ) ⟩
(fmap H (f B.∘ g) C.∘ component θ a) C.∘ component ι a
≈⟨ C.assoc ⟩
fmap H (f B.∘ g) C.∘ component θ a C.∘ component ι a
∎
}
where
open C.≈-Reasoning
module _ {lo la l≈ lo′ la′ l≈′ lo″ la″ l≈″}
{B : Category lo la l≈} {C : Category lo′ la′ l≈′} {D : Category lo″ la″ l≈″}
where
private
module B = Category B
module C = Category C
module D = Category D
Curry : Bifunctor B C D → Functor B (C ↝ D)
Curry F = transposeBifunctor₁ F
Curry-resp : ∀ {F G} → F ≈ G → Curry F ≈ Curry G
Curry-resp = transposeBifunctor₁-resp
Curry-correct : ∀ {F} → Eval ∘ ⟨ Curry F × Id ⟩ ≈ F
Curry-correct {F} = record
{ iso = D.≅.refl
; forth-natural = λ where
{a , a′} {b , b′} {f , f′} →
begin
D.id D.∘ fmap F (B.id , f′) D.∘ fmap F (f , C.id)
≈⟨ D.≈.trans D.id-l (fmap-∘ F) ⟩
fmap F (B.id B.∘ f , f′ C.∘ C.id)
≈⟨ fmap-resp F (B.id-l , C.id-r) ⟩
fmap F (f , f′)
≈⟨ D.≈.sym D.id-r ⟩
fmap F (f , f′) D.∘ D.id
∎
}
where
open D.≈-Reasoning
Curry-unique : ∀ {F Curry′}
→ Eval ∘ ⟨ Curry′ × Id ⟩ ≈ F
→ Curry′ ≈ Curry F
Curry-unique {F} {Curry′} eq@record { iso = iso ; forth-natural = fnat } = record
{ iso = λ {x} →
let open Fun.≅-Reasoning in
Fun.≅.sym (
begin
fobj (Curry F) x
≈⟨ NatIso.iso (Curry-resp (Cat≈.sym eq)) ⟩
fobj (Curry (Eval ∘ ⟨ Curry′ × Id ⟩)) x
≈⟨ ≈→≅ (lem x) ⟩
fobj Curry′ x
∎
)
; forth-natural = λ {a} {b} {f} → ≈-intro λ {x} →
-- TODO We need a simplification tactic.
let open D.≈-Reasoning in
triangle (forth iso D.∘ component (fmap Curry′ f) x)
( begin
((forth iso D.∘
(fmap (fobj Curry′ b) C.id D.∘ component (fmap Curry′ B.id) x) D.∘ D.id) D.∘
D.id D.∘ D.id) D.∘
component (fmap Curry′ f) x
≈⟨ D.∘-resp-l (D.≈.trans (D.∘-resp-r D.id-l) (D.≈.trans D.id-r
(D.≈.trans (D.∘-resp-r (D.≈.trans D.id-r (D.≈.trans
(D.∘-resp (fmap-id (fobj Curry′ b))
(≈-elim (fmap-id Curry′))) D.id-l))) D.id-r))) ⟩
forth iso D.∘ component (fmap Curry′ f) x
∎
)
( begin
fmap F (f , C.id) D.∘
(forth iso D.∘ (fmap (fobj Curry′ a) C.id D.∘ component (fmap Curry′ B.id) x) D.∘ D.id) D.∘
D.id D.∘ D.id
≈⟨ D.∘-resp-r (D.≈.trans (D.∘-resp-r D.id-r) (D.≈.trans D.id-r
(D.≈.trans (D.∘-resp-r (D.≈.trans D.id-r (D.≈.trans
(D.∘-resp-l (fmap-id (fobj Curry′ a)))
(D.≈.trans D.id-l (≈-elim (fmap-id Curry′)))))) D.id-r))) ⟩
fmap F (f , C.id) D.∘ forth iso
≈⟨ D.≈.sym fnat ⟩
forth iso D.∘ fmap (fobj Curry′ b) C.id D.∘ component (fmap Curry′ f) x
≈⟨ D.∘-resp-r (D.≈.trans (D.∘-resp-l (fmap-id (fobj Curry′ b))) D.id-l) ⟩
forth iso D.∘ component (fmap Curry′ f) x
∎
)
}
where
lem : ∀ x
→ NatIso (Bifunctor→Functor₁ (Eval ∘ ⟨ Curry′ × Id ⟩) x) (fobj Curry′ x)
lem x = record
{ iso = D.≅.refl
; forth-natural = D.≈.trans D.id-l (D.∘-resp-r (≈-elim (fmap-id Curry′)))
}
-- We get the following lemmas for free from HasExponentials, but only when
-- all the categories are at the same (single) level.
Uncurry : Functor B (C ↝ D) → Bifunctor B C D
Uncurry F = Eval ∘ ⟨ F × Id ⟩
Curry∘Uncurry : {F : Functor B (C ↝ D)}
→ Curry (Uncurry F) ≈ F
Curry∘Uncurry {F} = Cat≈.sym (Curry-unique {Curry′ = F} Cat≈.refl)
Uncurry∘Curry : {F : Bifunctor B C D}
→ Uncurry (Curry F) ≈ F
Uncurry∘Curry {F} = Curry-correct {F = F}
instance
hasExponentials : ∀ {l} → HasExponentials (Cat l l l)
hasExponentials {l} = record
{ _↝′_ = λ B C → record
{ Cᴮ = B ↝ C
; eval = Eval
; curry′ = λ {A} F → record
{ arr = Curry F
; prop = Curry-correct {B = A} {B} {C} {F}
; unique = λ {g} eq → Cat≈.sym (Curry-unique eq)
}
}
}
|
libsrc/z88/fdstdio/fdfputc.asm | andydansby/z88dk-mk2 | 1 | 99800 | ;
; Small C z88 File functions
; Written by <NAME> <<EMAIL>>
; 22 August 1998 ** UNTESTED **
;
; *** THIS IS A Z88 SPECIFIC ROUTINE!!! ***
;
; 11/3/99 djm - revised
INCLUDE "fileio.def"
INCLUDE "stdio.def"
INCLUDE "libdefs.def"
XLIB fdfputc
;*fputc(n,fp)
;int n int fp
;on stack
;return address,fp,n
;n=byte to write, fp=filepointer
;
;fputc - put byte to file, should return written byte/EOF if error
; If we come across a \n for stdout/err we call gn_nln
.fdfputc
ld hl,2
add hl,sp
ld e,(hl) ;filehandle
inc hl
ld d,(hl)
inc hl
ld c,(hl) ;byte to put
ld a,d
or e
jr nz,fputc1
.fputc_abort
ld hl,EOF
ret
.fputc1
ld hl,stdout
and a
sbc hl,de
jr z,fdputc_cons
ld hl,stdin
and a
sbc hl,de
jr z,fputc_abort
ld hl,stderr
and a
sbc hl,de
jr nz,fputc_file
;Output to stdin/out here
.fdputc_cons
ld a,c
cp 13
jr nz,fputc_cons1
call_oz(gn_nln)
ld hl,13
ret
.fputc_cons1
call_oz(os_out)
ld l,c
ld h,0
ret
.fputc_file
push de
pop ix
ld a,c
call_oz(os_pb)
jr c,fputc_abort
ld l,c
ld h,0
ret
|
programs/oeis/070/A070320.asm | neoneye/loda | 22 | 83217 | <reponame>neoneye/loda<gh_stars>10-100
; A070320: Max( phi(k) : k=1,2,3,...,n ).
; 1,1,2,2,4,4,6,6,6,6,10,10,12,12,12,12,16,16,18,18,18,18,22,22,22,22,22,22,28,28,30,30,30,30,30,30,36,36,36,36,40,40,42,42,42,42,46,46,46,46,46,46,52,52,52,52,52,52,58,58,60,60,60,60,60,60,66,66,66,66,70,70
div $0,2
seq $0,224911 ; Greatest prime dividing A190339(n).
sub $0,1
|
programs/oeis/037/A037498.asm | neoneye/loda | 22 | 81352 | ; A037498: Base-5 digits are, in order, the first n terms of the periodic sequence with initial period 1,0,2.
; 1,5,27,136,680,3402,17011,85055,425277,2126386,10631930,53159652,265798261,1328991305,6644956527,33224782636,166123913180,830619565902,4153097829511,20765489147555,103827445737777,519137228688886
seq $0,33132 ; Base-5 digits are, in order, the first n terms of the periodic sequence with initial period 1,1,0.
mul $0,18
div $0,5
mul $0,3
sub $0,9
div $0,12
add $0,1
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.