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
|
---|---|---|---|---|
terminal/ssh_multiple.scpt
|
jantrienes/dotfiles
| 0 |
1182
|
set hostnames to {"hosta", "hostb", "hostc", "hostd"}
if application "iTerm" is running then
tell application "iTerm"
create window with default profile
tell current tab of current window
select
tell current session
-- make the window fullscreen
tell application "System Events" to key code 36 using command down
split horizontally with default profile
set num_hosts to count of hostnames
repeat with n from 1 to num_hosts
if n - 1 is (round (num_hosts / 2)) then
-- move to lower split
tell application "System Events" to keystroke "]" using command down
else if n > 1 then
-- split vertically
tell application "System Events" to keystroke "d" using command down
end if
delay 1
write text "ssh " & (item n of hostnames)
end repeat
end tell
end tell
end tell
else
activate application "iTerm"
end if
|
src/gnat/csets.ads
|
Letractively/ada-gen
| 0 |
980
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- C S E T S --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2009, 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. --
-- --
------------------------------------------------------------------------------
package Csets is
pragma Elaborate_Body;
-- This package contains character tables for the various character
-- sets that are supported for source representation. Character and
-- string literals are not affected, only identifiers. For each set,
-- the table in this package gives the mapping of letters to their
-- upper case equivalent. Each table thus provides the information
-- for building the table used to fold lower case to upper case, and
-- also the table of flags showing which characters are allowed in
-- identifiers.
type Translate_Table is array (Character) of Character;
-- Type used to describe translate tables
type Char_Array_Flags is array (Character) of Boolean;
-- Type used for character attribute arrays. Note that we deliberately
-- do NOT pack this table, since we don't want the extra overhead of
-- accessing a packed bit string.
----------------------------------------------
-- Character Tables For Current Compilation --
----------------------------------------------
procedure Initialize;
-- Routine to initialize following character tables, whose content depends
-- on the character code being used to represent the source program. In
-- particular, the use of the upper half of the 8-bit code set varies.
-- The character set in use is specified by the value stored in
-- Opt.Identifier_Character_Set, which has the following settings:
-- '1' Latin-1 (ISO-8859-1)
-- '2' Latin-2 (ISO-8859-2)
-- '3' Latin-3 (ISO-8859-3)
-- '4' Latin-4 (ISO-8859-4)
-- '5' Latin-5 (ISO-8859-5, Cyrillic)
-- 'p' IBM PC (code page 437)
-- '8' IBM PC (code page 850)
-- '9' Latin-9 (ISO-9959-9)
-- 'f' Full upper set (all distinct)
-- 'n' No upper characters (Ada/83 rules)
-- 'w' Latin-1 plus wide characters also allowed
function Is_Upper_Case_Letter (C : Character) return Boolean;
pragma Inline (Is_Upper_Case_Letter);
-- Determine if character is upper case letter
function Is_Lower_Case_Letter (C : Character) return Boolean;
pragma Inline (Is_Lower_Case_Letter);
-- Determine if character is lower case letter
Fold_Upper : Translate_Table;
-- Table to fold lower case identifier letters to upper case
Fold_Lower : Translate_Table;
-- Table to fold upper case identifier letters to lower case
Identifier_Char : Char_Array_Flags;
-- This table has True entries for all characters that can legally appear
-- in identifiers, including digits, the underline character, all letters
-- including upper and lower case and extended letters (as controlled by
-- the setting of Opt.Identifier_Character_Set, left bracket for brackets
-- notation wide characters and also ESC if wide characters are permitted
-- in identifiers using escape sequences starting with ESC.
end Csets;
|
Programming for Embedded Systems/Labs/Lab 2/Task 3/Task 3/main.asm
|
sathwikkannam/courses-HKR
| 0 |
246418
|
<reponame>sathwikkannam/courses-HKR
;
; Task 3.asm
;
; Created: 2022-02-23 14:11:05
; Author : SAKA0191
;Write a short program that adds two integer values, where the sum is less
;than or equal to 9, and display the result on a 7-segment display
.include "m328pdef.inc"
.equ zero = 0
.equ one = 1
.equ two = 2
.equ three = 3
.equ four = 4
.equ five = 5
.equ six = 6
.equ seven = 7
.equ eight = 8
.equ nine = 9
.equ DDRB_PINS = 0b00001111
.equ DDRD_PINS = 0b11110000
.equ PB = 0x25
.equ PD = 0x2B
start:
LDI R17, DDRB_PINS
STS 0x24, R17 ;; DDRB OUTPUT
LDI R18, DDRD_PINS
STS 0x2A, R18 ;; DDRD OUTPUT
LDI R19, 0 ;; R19 and R16 as inputs
LDI R16, 0
ADD R19, R16 ;; MUL R19, R16 or SUB R19, R16
CPI R19, nine
BRLO equal_or_lower
BREQ equal_or_lower
BRGE turn_on_zero
equal_or_lower:
CPI R19, zero
BREQ turn_on_zero
CPI R19, one
BREQ turn_on_one
CPI R19, two
BREQ turn_on_two
CPI R19, three
BREQ turn_on_three
CPI R19, four
BREQ turn_on_four
CPI R19, five
BREQ turn_on_five
CPI R19, six
BREQ turn_on_six
CPI R19, seven
BREQ turn_on_seven
CPI R19, eight
BREQ turn_on_eight
CPI R19, nine
BREQ turn_on_nine
turn_on_zero: ;show 0 if higher of zero
LDI R17, 0b00001101
STS PB, R17
LDI R18, 0b11110000
STS PD, R18
rjmp loop
turn_on_one:
LDI R17, 0b00001001
STS PB, R17
rjmp loop
turn_on_two:
LDI R17, 0b0001110
STS PB, R17
LDI R18, 0b11000000
STS PD, R18
rjmp loop
turn_on_three:
LDI R17, 0b0000110
STS PB, R17
LDI R18, 0b11110000
STS PD, R18
rjmp loop
turn_on_four:
LDI R17, 0b00000011
STS PB, R17
LDI R18, 0b01100000
STS PD, R18
rjmp loop
turn_on_five:
LDI R17, 0b00000111
STS PB, R17
LDI R18, 0b10110000
STS PD, R18
rjmp loop
turn_on_six:
LDI R17, 0b00001111
STS PB, R17
LDI R18, 0b10110000
STS PD, R18
rjmp loop
turn_on_seven:
LDI R17, 0b00000000
STS PB, R17
LDI R18, 0b11110000
STS PD, R18
rjmp loop
turn_on_eight:
LDI R17, 0b00001111
STS PB, R17
LDI R18, 0b11110000
STS PD, R18
rjmp loop
turn_on_nine:
LDI R17, 0b00000111
STS PB, R17
LDI R18, 0b11110000
STS PD, R18
rjmp loop
loop: ;; loop to prevent jumping to random registers.
rjmp loop
|
src/cli.adb
|
psyomn/ash
| 11 |
20278
|
<reponame>psyomn/ash<filename>src/cli.adb
-- Copyright 2019 <NAME> (psyomn)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
with Ada.Strings; use Ada.Strings;
with Ada.Command_Line; use Ada.Command_Line;
with Ada.Strings.Fixed; use Ada.Strings.Fixed;
with Common_Utils; use Common_Utils;
package body CLI is
procedure Process_Command_Line_Arguments (Conf : in out Listener) is
Total : constant Natural := Argument_Count;
Count : Positive := 1;
Skip : Boolean := False;
begin
if Total = 0 then
return;
end if;
Argument_Parse_Loop : loop
declare
Current_Argument : constant String := Argument (Count);
First_Two : constant String := Current_Argument (1 .. 2);
Hyphenated : constant Boolean := Current_Argument (1) = '-';
begin
if Count + 1 > Argument_Count and Hyphenated then
raise CLI_Argument_Exception with "you need to provide a value";
else
Skip := True;
end if;
if First_Two = "-r" then Apply_Root_Dir_Flag (Conf, Count);
elsif First_Two = "-p" then Apply_Port_Flag (Conf, Count);
elsif First_Two = "-h" then Apply_Host_Flag (Conf, Count);
else raise CLI_Argument_Exception with "non existant flag";
end if;
end;
Count := Count + 1 + (if Skip then 1 else 0);
Skip := False;
exit Argument_Parse_Loop when Count > Total;
end loop Argument_Parse_Loop;
end Process_Command_Line_Arguments;
procedure Apply_Root_Dir_Flag (Conf : in out Listener; Index : Positive) is
New_Path : constant String := Trim (
Source => Argument (Index + 1),
Side => Both
);
begin
Empty_String (Conf.WS_Root_Path);
Conf.WS_Root_Path (1 .. New_Path'Last) := New_Path (1 .. New_Path'Last);
end Apply_Root_Dir_Flag;
procedure Apply_Port_Flag (Conf : in out Listener; Index : Positive) is
Arg : constant String := Argument (Index + 1);
New_Port : constant Natural := Positive'Value (Arg);
begin
Conf.Port_Number := New_Port;
end Apply_Port_Flag;
procedure Apply_Host_Flag (Conf : in out Listener; Index : Positive) is
New_Host : constant String := Trim (
Source => Argument (Index + 1),
Side => Both
);
begin
Empty_String (Conf.Host_Name);
Overwrite (
Source => Conf.Host_Name,
Position => 1,
New_Item => New_Host
);
end Apply_Host_Flag;
end CLI;
|
programs/oeis/130/A130145.asm
|
neoneye/loda
| 22 |
87074
|
<filename>programs/oeis/130/A130145.asm
; A130145: Number of nonisomorphic orthogonal arrays OA(n,4,2,2)'s when n is not a multiple of 8.
; 1,3,7,15,28,48,79,123,184,268,379,523,709,943,1234,1594,2032,2560,3194,3946,4832,5872,7082,8482,10097
mov $3,$0
add $3,1
mov $5,$0
lpb $3
mov $0,$5
sub $3,1
sub $0,$3
mov $10,$0
mov $11,0
mov $12,$0
add $12,1
lpb $12
mov $0,$10
mov $8,0
sub $12,1
sub $0,$12
mov $7,$0
mov $9,$0
add $9,1
lpb $9
mov $0,$7
sub $9,1
sub $0,$9
mov $2,2
mov $6,$0
add $6,2
lpb $0
trn $0,3
sub $6,$2
lpe
pow $6,2
mov $4,$6
div $4,4
add $8,$4
lpe
add $11,$8
lpe
add $1,$11
lpe
mov $0,$1
|
library/lists/indexOfListItem.applescript
|
NYHTC/applescript-fm-helper
| 1 |
3022
|
<reponame>NYHTC/applescript-fm-helper<filename>library/lists/indexOfListItem.applescript
-- indexOfListItem(prefs)
-- <NAME> http://www.danshockley.com
-- Returns the index of the first intance of an item in the list
(*
HISTORY:
1.1 - 2017-06-21 ( eshagdar ): convert params to record
1.0 - created
*)
on run
indexOfListItem({someList:{"a", "c", "d", "c", "b"}, someListItem:"c"})
end run
--------------------
-- START OF CODE
--------------------
on indexOfListItem(prefs)
-- version 1.1
set defaultPrefs to {someList:null, someListItem:null}
set prefs to prefs & defaultPrefs
if someList of prefs does not contain someListItem of prefs then return -1
repeat with i from 1 to count of someList of prefs
set oneListItem to item i of someList of prefs
if oneListItem is someListItem of prefs then return i
end repeat
end indexOfListItem
--------------------
-- END OF CODE
--------------------
|
alloy4fun_models/trashltl/models/9/TrgAqiXfCH6gdWc23.als
|
Kaixi26/org.alloytools.alloy
| 0 |
3616
|
<reponame>Kaixi26/org.alloytools.alloy
open main
pred idTrgAqiXfCH6gdWc23_prop10 {
all p: Protected | p'=p
}
pred __repair { idTrgAqiXfCH6gdWc23_prop10 }
check __repair { idTrgAqiXfCH6gdWc23_prop10 <=> prop10o }
|
test/asset/agda-stdlib-1.0/Data/Vec/Relation/Binary/Equality/Propositional.agda
|
omega12345/agda-mode
| 0 |
11131
|
<filename>test/asset/agda-stdlib-1.0/Data/Vec/Relation/Binary/Equality/Propositional.agda
------------------------------------------------------------------------
-- The Agda standard library
--
-- Vector equality over propositional equality
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary
module Data.Vec.Relation.Binary.Equality.Propositional {a} {A : Set a} where
open import Data.Nat.Base using (ℕ; zero; suc; _+_)
open import Data.Vec
open import Data.Vec.Relation.Binary.Pointwise.Inductive
using (Pointwise-≡⇒≡; ≡⇒Pointwise-≡)
import Data.Vec.Relation.Binary.Equality.Setoid as SEq
open import Relation.Binary.PropositionalEquality
------------------------------------------------------------------------
-- Publically re-export everything from setoid equality
open SEq (setoid A) public
------------------------------------------------------------------------
-- ≋ is propositional
≋⇒≡ : ∀ {n} {xs ys : Vec A n} → xs ≋ ys → xs ≡ ys
≋⇒≡ = Pointwise-≡⇒≡
≡⇒≋ : ∀ {n} {xs ys : Vec A n} → xs ≡ ys → xs ≋ ys
≡⇒≋ = ≡⇒Pointwise-≡
-- See also Data.Vec.Relation.Binary.Equality.Propositional.WithK.≋⇒≅.
|
smsq/smsq/reset.asm
|
olifink/smsqe
| 0 |
246481
|
<gh_stars>0
; SMSQ_RESET SMSQ standard hard and soft resets V2.0 2000 <NAME>
xdef smsq_sreset
xdef smsq_hreset
xdef smsq_xreset
include 'dev8_smsq_smsq_base_keys'
section reset
; To suppress resets globally, just replace these routines by a return
smsq_sreset
lea -1,a4 ; set all RAM
;
; special entry setting RAMTOP
;
smsq_xreset
jmp sms.base ; and start from soft reset routine
smsq_hreset
jmp sms.base+4 ; and call hard reset routine
end
|
linux32/libs/game.asm
|
amittaigames/asmgame
| 0 |
91760
|
; Game code
; Linux 32 bit
;-----------------------------------
; int nameEasterEgg()
;-----------------------------------
;nameEasterEgg:
;mov eax, name
;mov ebx, egg_name
;call strcmp
;ret
|
Cats/Category/Constructions/Equalizer.agda
|
alessio-b-zak/cats
| 0 |
5936
|
<gh_stars>0
module Cats.Category.Constructions.Equalizer where
open import Level
open import Cats.Category.Base
open import Cats.Util.Conv
import Cats.Category.Constructions.Mono as Mono
import Cats.Category.Constructions.Unique as Unique
module Build {lo la l≈} (Cat : Category lo la l≈) where
private open module Cat = Category Cat
open Cat.≈-Reasoning
open Mono.Build Cat
open Unique.Build Cat
record IsEqualizer {A B} (f g : A ⇒ B) {E} (e : E ⇒ A)
: Set (lo ⊔ la ⊔ l≈)
where
field
equalizes : f ∘ e ≈ g ∘ e
universal : ∀ {Z} (z : Z ⇒ A)
→ f ∘ z ≈ g ∘ z
→ ∃![ u ] (e ∘ u ≈ z)
record Equalizer {A B} (f g : A ⇒ B) : Set (lo ⊔ la ⊔ l≈) where
field
{E} : Obj
e : E ⇒ A
isEqualizer : IsEqualizer f g e
open IsEqualizer isEqualizer public
instance
HasObj-Equalizer : ∀ {A B} {f g : A ⇒ B}
→ HasObj (Equalizer f g) lo la l≈
HasObj-Equalizer = record { Cat = Cat ; _ᴼ = Equalizer.E }
HasArrow-Equalizer : ∀ {A B} {f g : A ⇒ B}
→ HasArrow (Equalizer f g) lo la l≈
HasArrow-Equalizer = record { Cat = Cat ; _⃗ = Equalizer.e }
equalizer→mono : ∀ {A B} {f g : A ⇒ B} {E} {e : E ⇒ A}
→ IsEqualizer f g e
→ IsMono e
equalizer→mono {f = f} {g} {E} {e} eql {Z} {i} {j} e∘i≈e∘j
= ∃!→≈ (universal (e ∘ j) lemma) e∘i≈e∘j ≈.refl
where
open IsEqualizer eql
lemma : f ∘ e ∘ j ≈ g ∘ e ∘ j
lemma
= begin
f ∘ e ∘ j
≈⟨ unassoc ⟩
(f ∘ e) ∘ j
≈⟨ ∘-resp-l equalizes ⟩
(g ∘ e) ∘ j
≈⟨ assoc ⟩
g ∘ e ∘ j
∎
|
src/ado-sequences-hilo.adb
|
My-Colaborations/ada-ado
| 0 |
23211
|
-----------------------------------------------------------------------
-- ADO Sequences -- Database sequence generator
-- Copyright (C) 2009, 2010, 2011, 2012, 2018 <NAME>
-- Written by <NAME> (<EMAIL>)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Util.Strings;
with Util.Log;
with Util.Log.Loggers;
with ADO.Sessions;
with ADO.Model;
with ADO.Objects;
with ADO.SQL;
package body ADO.Sequences.Hilo is
use Util.Log;
use ADO.Sessions;
use ADO.Model;
Log : constant Loggers.Logger := Loggers.Create ("ADO.Sequences.Hilo");
type HiLoGenerator_Access is access all HiLoGenerator'Class;
-- ------------------------------
-- Create a high low sequence generator
-- ------------------------------
function Create_HiLo_Generator
(Sess_Factory : in Session_Factory_Access)
return Generator_Access is
Result : constant HiLoGenerator_Access := new HiLoGenerator;
begin
Result.Factory := Sess_Factory;
return Result.all'Access;
end Create_HiLo_Generator;
-- ------------------------------
-- Allocate an identifier using the generator.
-- The generator allocates blocks of sequences by using a sequence
-- table stored in the database. One database access is necessary
-- every N allocations.
-- ------------------------------
procedure Allocate (Gen : in out HiLoGenerator;
Id : in out Objects.Object_Record'Class) is
begin
-- Get a new sequence range
if Gen.Next_Id >= Gen.Last_Id then
Allocate_Sequence (Gen);
end if;
Id.Set_Key_Value (Gen.Next_Id);
Gen.Next_Id := Gen.Next_Id + 1;
end Allocate;
-- ------------------------------
-- Allocate a new sequence block.
-- ------------------------------
procedure Allocate_Sequence (Gen : in out HiLoGenerator) is
Name : constant String := Get_Sequence_Name (Gen);
Value : Identifier;
Seq_Block : Sequence_Ref;
DB : Master_Session'Class := Gen.Get_Session;
begin
for Retry in 1 .. 10 loop
-- Allocate a new sequence within a transaction.
declare
Query : ADO.SQL.Query;
Found : Boolean;
begin
Log.Info ("Allocate sequence range for {0}", Name);
DB.Begin_Transaction;
Query.Set_Filter ("name = ?");
Query.Bind_Param (Position => 1, Value => Name);
Seq_Block.Find (Session => DB, Query => Query, Found => Found);
begin
if Found then
Value := Seq_Block.Get_Value;
Seq_Block.Set_Value (Value + Seq_Block.Get_Block_Size);
Seq_Block.Save (DB);
else
Value := 1;
Seq_Block.Set_Name (Name);
Seq_Block.Set_Block_Size (Gen.Block_Size);
Seq_Block.Set_Value (Value + Seq_Block.Get_Block_Size);
Seq_Block.Create (DB);
end if;
DB.Commit;
Gen.Next_Id := Value;
Gen.Last_Id := Seq_Block.Get_Value;
return;
exception
when ADO.Objects.LAZY_LOCK =>
Log.Info ("Sequence table modified, retrying {0}/100",
Util.Strings.Image (Retry));
DB.Rollback;
delay 0.01 * Retry;
end;
exception
when E : others =>
Log.Error ("Cannot allocate sequence range", E);
raise;
end;
end loop;
Log.Error ("Cannot allocate sequence range");
raise Allocate_Error with "Cannot allocate unique identifier";
end Allocate_Sequence;
end ADO.Sequences.Hilo;
|
programs/oeis/030/A030662.asm
|
jmorken/loda
| 1 |
89812
|
<reponame>jmorken/loda<gh_stars>1-10
; A030662: Number of combinations of n things from 1 to n at a time, with repeats allowed.
; 1,5,19,69,251,923,3431,12869,48619,184755,705431,2704155,10400599,40116599,155117519,601080389,2333606219,9075135299,35345263799,137846528819,538257874439,2104098963719,8233430727599,32247603683099,126410606437751,495918532948103,1946939425648111,7648690600760439
add $0,1
mov $1,$0
add $1,$0
bin $1,$0
sub $1,1
|
tp_01_04/ej1_4.asm
|
mjFer/TDIII-UTN-FRBA-TPS-2014
| 2 |
172249
|
<gh_stars>1-10
; Trabajo Practico 1 - EJ 4 ;
; ;
; Alumno: <NAME> ;
; Legajo: 1403734 ;
; Curso: r5055 ;
; **************************************************************************************;
;********************************************************************************
;* Macros *
;********************************************************************************
%define PDPT_BASE 0xA000 ;ubicacion de la Page Directory Pointer Table
%define PD_BASE PDPT_BASE + 0x1000 ;ubicacion de la Page Directory Table
%define PT_BASE PD_BASE + 0x1000 ;ubicacion de la Page Table
%define PT_ENTRY_0 PT_BASE + 0x1000 ;primer pagina
%define PT_ENTRY_1 PT_ENTRY_0 + 0x1000 ;segunda pagina
%define VIDEO_BASE 0x200000
%define BREAKPOINT xchg bx, bx
;********************************************************************************
;* Macros Video *
;********************************************************************************
%define VIDEO_BLINK 10000000b ;BLINK
%define VIDEO_B_C_B 00010000b ;BACKGROUND COLOR BLUE
%define VIDEO_B_C_G 00100000b ;BACKGROUND COLOR GREEN
%define VIDEO_B_C_R 01000000b ;BACKGROUND COLOR RED
%define VIDEO_F_C_R 00001000b ;FOREGROUND COLOR RED
%define VIDEO_F_C_G 00000100b ;FOREGROUND COLOR GREEN
%define VIDEO_F_C_B 00000010b ;FOREGROUND COLOR BLUE
%define VIDEO_UNDERLINE 00000001b ;UNDERLINE
BITS 16
[ORG KERNEL_MEMORY]
ALIGN 4096
jmp Inicio
GDT:
db 0,0,0,0,0,0,0,0 ;dejar vacio un descriptor
;DESCRIPTOR DE CODIGO FLAT (toda la memoria)
dw 0xFFFF ;limite en uno
dw 0x0000 ;parte baja de la base en cero
db 0x00 ;base 16:23
db 10011000b ;presente,DPL(x2),sist(cod/dato),tipo(x4)(execute only)
db 11001111b ;granularidad(limite en mult de 4 pag), D/B, L, ;AVL(disponible), (16:19 del limite)
db 0x00 ;base
;DESCRIPTOR IGUAL QUE EL ANTERIOR PERO DE DATO
dw 0xFFFF ;limite en uno
dw 0x0000 ;parte baja de la base en cero
db 0x00 ;base 16:23
db 10010010b ;presente,DPL(x2),sist(cod/dato),tipo(x4)(read/write)
db 11001111b ;granularidad(limite en mult de 4 pag), D/B, L, ;AVL(disponible), (16:19 del limite)
db 0x00 ;base
valor_gdtr: dw $-GDT
dd GDT
pila: times 100 db 0
texto: db "UTN-2014-TDIII-HelloWorld-MarceloJFernandez", 00h
texto_ok: db "...Funciono", 00h
texto_PAE: db "Tablas Dinamicas y PAE (MSW CPUID)", 00h
Inicio:
lgdt [valor_gdtr] ;cargo la gdt
cli
mov eax,cr0
or al,1
mov cr0,eax
jmp 08:ModoProt
BITS 32
ModoProt:
mov ax,10h ;cargo el descriptor de datos
mov ds,ax ;cargo ds con el segundo descriptor
mov ss,ax ;cargo ss con el descriptor de datos (para la pila)
mov eax,pila + 100 ;seteo la direccion de la pila +100 por que se carga de forma inversa
mov esp,eax
xchg bx,bx
;Comprueba si pae esta como spec en el micro
mov eax,1
CPUID
and edx,1000000b
cmp edx,1000000b
jnz NO_PAE
xchg bx,bx
mov dword [PDPT_BASE],PD_BASE + 0x11
mov dword [PDPT_BASE + 4], 0
mov dword [PD_BASE],PT_BASE + 0x11
mov dword [PD_BASE + 4], 0
;Aca arrancamos a crear las paginas con un loop
mov ecx, 20 ;voy a crear 20 paginas
mov eax, 01000h + 0x01
mov edi, PT_BASE + 8
pageloop:
mov dword [edi],eax
mov dword [edi + 4],0
add edi, 8
add eax, 1000h
loop pageloop
mov dword [PT_BASE],0b8000h + 0x01
mov dword [PT_BASE + 4], 0
xchg bx,bx
mov eax,PDPT_BASE
mov cr3,eax
mov eax,cr4 ;leo el registro CR4
or eax,00100000b ;or flag de PAE
mov cr4,eax ;Seteo CR4
mov eax,cr0 ;seteo el bit de paginacion
or eax,80000000h
mov cr0,eax
xor eax,eax ;XXXXXXXXXXXXXXXXX que es esto??
;LLamo a un Clear Screen
call clrScr
;llamo a la rutina de print
mov edi,texto
mov esi,10 ; esi (segundo argumento) char columna
mov edx,2 ; edx (tercer argumento) char fila
mov ecx,111b ; ECX (cuarto arguemto) char color
call Print
;llamo a la rutina de print
mov edi,texto_PAE
mov esi,10 ; esi (segundo argumento) char columna
mov edx,3 ; edx (tercer argumento) char fila
mov ecx,111b ; ECX (cuarto arguemto) char color
call Print
;llamo a la rutina de print
mov edi,texto_ok
mov esi,10 ; esi (segundo argumento) char columna
mov edx,4 ; edx (tercer argumento) char fila
mov ecx,VIDEO_F_C_R | VIDEO_BLINK ; ECX (cuarto arguemto) char color
call Print
hlt
NO_PAE: ;aunque es al pedo para el debugging me caeria aca si no tuviese pae
hlt
%include "include/utils.asm"
|
programs/oeis/163/A163714.asm
|
jmorken/loda
| 1 |
161594
|
<filename>programs/oeis/163/A163714.asm
; A163714: Number of n X 2 binary arrays with all 1s connected, a path of 1s from top row to bottom row, and no 1 having more than two 1s adjacent.
; 3,7,10,16,26,42,68,110,178,288,466,754,1220,1974,3194,5168,8362,13530,21892,35422,57314,92736,150050,242786,392836,635622,1028458,1664080,2692538,4356618,7049156,11405774,18454930,29860704,48315634,78176338,126491972,204668310,331160282,535828592,866988874,1402817466,2269806340,3672623806,5942430146,9615053952,15557484098,25172538050,40730022148,65902560198,106632582346,172535142544,279167724890,451702867434,730870592324,1182573459758,1913444052082,3096017511840,5009461563922,8105479075762,13114940639684,21220419715446,34335360355130,55555780070576,89891140425706,145446920496282,235338060921988,380784981418270,616123042340258,996908023758528,1613031066098786,2609939089857314,4222970155956100,6832909245813414
mov $1,$0
lpb $0
trn $1,2
add $2,3
mov $3,$1
add $1,1
add $1,$2
trn $3,$0
sub $0,1
add $1,1
mov $2,$3
lpe
trn $1,1
add $1,3
|
Transynther/x86/_processed/AVXALIGN/_ht_zr_/i7-7700_9_0xca_notsx.log_21829_1346.asm
|
ljhsiun2/medusa
| 9 |
174951
|
<reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r14
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0x19361, %rsi
lea addresses_normal_ht+0x14fe1, %rdi
nop
nop
nop
nop
and %r14, %r14
mov $22, %rcx
rep movsq
nop
xor %rdx, %rdx
lea addresses_A_ht+0x19ef1, %rsi
lea addresses_WC_ht+0x18b29, %rdi
nop
nop
nop
nop
nop
dec %r12
mov $63, %rcx
rep movsq
nop
nop
nop
nop
nop
xor %r14, %r14
lea addresses_UC_ht+0x5b61, %r14
nop
nop
nop
nop
sub $34714, %r12
and $0xffffffffffffffc0, %r14
vmovntdqa (%r14), %ymm0
vextracti128 $0, %ymm0, %xmm0
vpextrq $0, %xmm0, %rsi
nop
sub $25972, %rsi
lea addresses_normal_ht+0x14d61, %rsi
lea addresses_D_ht+0x17b59, %rdi
nop
nop
nop
nop
nop
xor $9191, %rdx
mov $108, %rcx
rep movsw
cmp %rdx, %rdx
lea addresses_WC_ht+0x1e361, %rdi
nop
nop
nop
nop
dec %rdx
movl $0x61626364, (%rdi)
nop
nop
nop
nop
nop
xor $39419, %rcx
lea addresses_WC_ht+0xccc1, %rdx
nop
nop
nop
nop
xor %r10, %r10
mov $0x6162636465666768, %rcx
movq %rcx, (%rdx)
nop
nop
and $58075, %r10
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r14
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r13
push %r8
push %r9
push %rax
push %rdx
// Store
lea addresses_D+0x1f27b, %rax
nop
nop
nop
nop
xor $4831, %r11
mov $0x5152535455565758, %r13
movq %r13, %xmm4
movups %xmm4, (%rax)
nop
nop
nop
nop
cmp %r12, %r12
// Store
lea addresses_D+0x8d07, %rax
nop
nop
nop
nop
nop
sub %r8, %r8
mov $0x5152535455565758, %r13
movq %r13, %xmm4
vmovups %ymm4, (%rax)
nop
nop
nop
nop
nop
dec %r12
// Faulty Load
lea addresses_WC+0x3361, %r9
nop
nop
nop
add %r11, %r11
movntdqa (%r9), %xmm5
vpextrq $1, %xmm5, %rdx
lea oracles, %r13
and $0xff, %rdx
shlq $12, %rdx
mov (%r13,%rdx,1), %rdx
pop %rdx
pop %rax
pop %r9
pop %r8
pop %r13
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': False, 'type': 'addresses_WC'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': False, 'type': 'addresses_D'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 1, 'same': False, 'type': 'addresses_D'}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'NT': True, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': True, 'type': 'addresses_WC'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 11, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'}
{'src': {'congruent': 3, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 1, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'}
{'src': {'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 11, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 8, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 9, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'}
{'dst': {'NT': True, 'AVXalign': False, 'size': 8, 'congruent': 3, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'}
{'00': 3700, '45': 7833, '47': 173, '44': 9888, '46': 235}
00 44 44 44 44 00 45 45 44 45 45 44 44 44 44 45 44 44 44 00 44 00 45 45 44 44 44 44 45 44 00 45 45 00 44 44 45 44 00 44 44 00 44 00 45 45 45 00 00 44 00 45 44 44 45 44 00 00 45 45 44 45 45 44 44 45 45 44 45 45 44 45 46 00 44 00 44 45 45 44 00 45 45 44 44 47 44 45 45 44 45 45 45 44 45 00 44 45 45 44 45 44 45 45 45 45 44 45 45 45 44 45 44 44 44 45 45 44 44 00 44 00 44 00 45 44 44 44 44 00 44 00 45 45 45 00 00 45 45 45 44 45 46 00 45 44 44 44 44 00 44 00 44 45 44 00 44 00 45 45 45 00 00 45 45 45 44 44 45 44 45 44 00 44 45 45 44 00 45 44 00 45 44 44 00 44 00 44 44 45 44 00 45 45 00 44 45 44 45 44 44 00 44 00 45 44 44 00 45 44 00 44 44 45 44 44 00 44 00 44 45 45 44 00 45 44 00 44 45 45 45 44 44 45 45 45 44 45 44 44 45 45 44 45 45 00 00 44 45 45 44 00 44 44 00 45 46 45 45 00 00 44 45 44 00 45 44 44 45 44 45 44 00 44 45 44 00 44 47 44 00 45 44 00 44 45 45 45 45 45 44 45 44 00 44 00 44 46 44 44 44 44 44 44 00 46 44 45 44 45 44 45 44 45 44 44 00 45 00 45 44 45 46 44 44 00 45 44 44 45 44 45 44 00 44 45 00 44 44 00 45 44 44 45 44 44 44 00 45 45 45 45 45 44 00 45 45 45 00 44 44 44 00 45 45 44 45 45 46 44 00 45 44 45 44 44 00 00 44 45 45 46 45 00 44 00 44 44 44 45 00 45 45 45 45 44 00 44 00 44 45 44 45 45 45 44 44 00 44 45 00 44 45 44 45 45 44 44 44 45 44 46 00 44 45 44 45 44 44 00 44 45 44 00 44 44 00 45 45 44 44 45 44 00 44 45 44 45 44 45 44 00 44 45 45 44 44 45 45 44 00 44 45 44 45 44 44 00 45 44 00 44 00 44 00 44 45 44 44 45 44 00 44 45 44 45 00 44 45 45 44 45 00 44 44 44 00 44 00 44 00 44 44 44 44 45 00 44 45 45 44 44 00 00 44 45 44 45 44 44 44 00 45 44 00 44 45 45 00 44 45 00 44 45 44 00 45 45 44 45 44 44 00 44 44 45 44 45 45 45 45 44 44 00 44 45 44 45 00 44 44 45 45 44 00 45 44 45 44 45 45 45 44 45 44 00 45 44 00 44 45 45 44 44 45 00 45 46 44 45 45 00 44 45 44 00 46 44 00 44 00 00 44 00 44 00 00 44 00 45 44 45 45 45 46 00 44 44 45 45 44 45 45 00 44 44 45 44 44 00 45 45 45 45 44 44 44 44 44 44 45 45 44 45 45 44 45 00 44 45 45 45 44 44 45 44 00 44 44 45 44 44 44 44 00 44 45 44 45 46 44 45 44 45 45 44 00 44 00 45 44 45 00 45 44 45 45 44 45 00 45 44 44 45 44 45 45 45 45 45 44 00 44 45 44 45 44 44 44 45 44 00 44 45 44 00 45 44 44 44 45 44 45 45 44 45 45 44 00 44 44 45 44 45 00 45 44 44 44 44 45 44 00 45 44 44 00 44 44 00 00 44 45 44 44 00 44 44 00 44 44 00 44 45 45 45 44 44 45 45 44 47 44 45 44 45 44 44 47 45 45 45 45 44 44 44 00 45 00 44 44 44 00 44 44 44 45 44 46 44 44 00 45 45 45 44 45 44 00 44 44 00 44 45 45 45 44 44 45 44 45 45 44 45 45 44 44 44 44 45 45 44 44 44 44 45 44 00 44 44 44 45 45 00 44 00 45 44 44 45 44 00 44 45 44 44 45 44 00 44 44 44 00 45 00 45 44 00 00 44 45 45 00 44 00 44 44 00 00 45 44 44 44 00 44 44 45 44 45 45 45 45 44 45 44 47 44 45 44 00 45 44 00 44 45 44 44 44 45 00 00 00 45 45 44 45 00 44 44 00 44 45 45 44 00 44 44 44 00 44 00 45 45 44 45 44 00 44 44 45 45 45 45 45 44 44 44 44 00 45 44 00 45 44 44 45 44 45 44 45 44 44 44 44 00 45 45 44 44 00 45 45 45 44 45 44 44 44 45 45 45 44 00 45 44 00 44 45 44 45 44 00 44 00 44 45 44 44 00 44
*/
|
lib/tiles-2x2.asm
|
c64lib/text
| 1 |
91952
|
<reponame>c64lib/text
#import "tiles-common.asm"
#import "tiles-screen-shift.asm"
#import "tiles-color-ram-shift.asm"
#import "common/lib/math.asm"
#import "common/lib/mem.asm"
#importonce
.filenamespace c64lib
/*
* Config record for 2x2 tile scrollable playfield.
*/
.struct Tile2Config {
// start text row of the tiled playfield, values 0..23
startRow,
// end text row of the tiled playfield, values 1..24
endRow,
// vic 2 bank 0..3
bank,
// page number (0..15) of page 0 (1024 bytes) for double buffering
page0,
// page number (0..15) of page 1 (1024 bytes) for double buffering
page1,
// address (8 or 16 bit) for X position of top left corner (2b), 1st byte - sub tile position, 2nd byte - tile position
x,
// address (8 or 16 bit) for Y position of top left corner (2b), 1st byte - sub tile position, 2nd byte - tile position
y,
// address (8 or 16 bit) of playfield width in tiles (1 byte)
width,
// address (8 or 16 bit) of playfield height (1 byte)
height,
// address (8 or 16 bit) for tile definitions (1kb); tiles are encoded in 4x256b banks, each bank storing one char of
// the tile: top left is bank 0, top right is bank 1, bottom left is bank 2 and bottom right is bank 3
tileDefinition,
// address (8 or 16 bit) for tile colors (256b)
tileColors,
// address (8 or 16 bit) for map definition (width * height) bytes
mapDefinitionPtr,
// address (8 or 16 bit) for display phase counter
phase,
// ---- zero page mandatory variables
// general purpose zero page accumulators for indirect addressing, each accumulator takes two bytes from zero page
z0,
z1,
z2,
z3,
// ---- precalculated buffers
// 16 bit address of lo part of map rows
mapOffsetsLo,
// 16 bit address of hi part of map rows
mapOffsetsHi
}
.function toTileCommonConfig(tile2Config) {
.var tileCommonCfg = TileCommonConfig()
.eval tileCommonCfg.startRow = tile2Config.startRow
.eval tileCommonCfg.endRow = tile2Config.endRow
.eval tileCommonCfg.bank = tile2Config.bank
.eval tileCommonCfg.page0 = tile2Config.page0
.eval tileCommonCfg.page1 = tile2Config.page1
.eval tileCommonCfg.x = tile2Config.x
.eval tileCommonCfg.y = tile2Config.y
.return tileCommonCfg
}
.macro tile2Init(cfg) {
_t2_validate(cfg)
_t2_initMapOffsets(cfg)
}
/*
* initialize mapOffsetsLo and mapOffsetsHi buffers
*
* Mod: A, X, Y
*/
.macro _t2_initMapOffsets(cfg) {
cld
copy16 cfg.mapDefinitionPtr : temp
copy8 cfg.width : width
set8 #0 : width + 1
ldx cfg.height
ldy #0
loop:
lda temp
sta cfg.mapOffsetsLo, y
lda temp + 1
sta cfg.mapOffsetsHi, y
add16 width : temp
iny
dex
bne loop
jmp end
// local variables
width: .word 0
temp: .word 0
end:
}
/*
* In: X - x-offset of the viewport
* Out: A - tile number (code)
* Mod: A, Y
*/
.macro _t2_decodeTile(cfg, lineNo) {
ldy cfg.y + 1 // "y" contains a y-offset of the viewport
lda cfg.mapOffsetsLo + lineNo,y //
sta mapPtr
lda cfg.mapOffsetsHi + lineNo,y
sta mapPtr + 1
lda mapPtr:$FFFF,x
}
/*
* Decode rightmost column of the playfield into given screen page.
*
* Mod: A, X, Y
*/
.macro _t2_decodeScreenRight(cfg, page) {
.var pageAddress = _t2_screenAddress(cfg, page)
cld
clc
lda cfg.x
and #%10000000
bne nextTile
lda cfg.x + 1 // load (tile) X position
adc #19 // we will draw last column
jmp endNextTile
nextTile:
lda cfg.x + 1
adc #20
endNextTile:
tax // X contains a x coodinate of the map tile
lda cfg.y // load subtile Y position
and #%10000000
beq yEven
// Y position is odd
_t2_decodeTile(cfg, 0)
tay // X contains tile number
lda cfg.x
and #%10000000
bne xOdd
lda cfg.tileDefinition + 512,y
sta pageAddress + 39
jmp done
xOdd:
lda cfg.tileDefinition + 768,y
sta pageAddress + 39
done:
yEven:
.for (var y = cfg.startRow; y <= cfg.endRow; y = y+2) {
_t2_decodeTile(cfg, (y - cfg.startRow)/2)
tay
lda cfg.x
and #%10000000
beq xEven
lda cfg.tileDefinition,y
sta pageAddress + (y*40) + 39
.if (y + 1 <= cfg.endRow) {
lda cfg.tileDefinition + 512,y
sta pageAddress + ((y + 1)*40) + 39
}
jmp done
xEven:
lda cfg.tileDefinition + 256,y
sta pageAddress + (y*40) + 39
.if(y + 1 <= cfg.endRow) {
lda cfg.tileDefinition + 768,y
sta pageAddress + ((y + 1)*40) + 39
}
done:
}
}
/*
* Decode rightmost column of the color data.
*
* Mod: A, X, Y
*/
.macro _t2_decodeColorRight(cfg, colorPage) {
cld
lda cfg.x + 1
clc
adc #19
tax
lda cfg.y
and #%10000000
beq yEven
_t2_decodeTile(cfg, 0)
tay
lda cfg.tileColors,y
sta colorPage + 39
yEven:
.for (var y = cfg.startRow; y <= cfg.endRow; y = y+2) {
_t2_decodeTile(cfg, (y - cfg.startRow)/2)
tay
lda cfg.tileColors,y
sta colorPage + (y*40) + 39
.if (y + 1 <= cfg.endRow) {
sta colorPage + ((y + 1)*40) + 39
}
}
}
.macro _t2_validate(tile2Config) {
.assert "startRow must be smaller than endRow", tile2Config.startRow < tile2Config.endRow, true
/*
.assert "z0 must be defined on zero page", tile2Config.z0 < 254, true
.assert "z1 must be defined on zero page", tile2Config.z1 < 254, true
.assert "z2 must be defined on zero page", tile2Config.z2 < 254, true
.assert "z3 must be defined on zero page", tile2Config.z3 < 254, true
*/
}
|
src/ow_parserDeclareVar_showOverwrite.asm
|
szapp/Ninja
| 17 |
4201
|
<gh_stars>10-100
; Overwrite error message during parsing in zCParser::DeclareVar
%include "inc/macros.inc"
%if GOTHIC_BASE_VERSION == 1
%include "inc/symbols_g1.inc"
%elif GOTHIC_BASE_VERSION == 2
%include "inc/symbols_g2.inc"
%endif
%ifidn __OUTPUT_FORMAT__, bin
org g1g2(0x6F2113,0x79BABF)
%endif
bits 32
section .text align=1 ; Prevent auto-alignment
resetStackoffset g1g2(0x394,0x3EC)
mov eax, [ebp+0x8]
push eax
push esi
call ninja_allowRedefine
addStack 2*4
verifyStackoffset g1g2(0x394,0x3EC)
jmp g1g2(0x6F215B,0x79BB07)
|
oeis/328/A328564.asm
|
neoneye/loda-programs
| 11 |
5569
|
; A328564: a(n) is the sum of the elements of the set A_n = {(n-k) AND k, k = 0..n} (where AND denotes the bitwise AND operator).
; Submitted by <NAME>
; 0,0,0,1,0,3,2,4,0,7,6,13,4,14,8,11,0,15,14,30,12,41,26,39,8,38,28,49,16,41,22,26,0,31,30,63,28,92,60,91,24,109,82,142,52,135,78,101,16,94,76,139,56,159,98,138,32,117,82,133,44,100,52,57,0,63,62,128,60,191,126,191,56,244,184,315,120,309,182,240,48,269,218,393,164,456,284,401,104,379,270,438,156,365,202,243,32,222,188,349
mov $2,$0
add $0,1
div $0,2
lpb $0
sub $0,1
mov $3,$2
sub $3,$0
sub $3,1
mov $4,0
add $5,$1
mov $11,$3
sub $11,$0
mov $8,$11
mov $9,$11
mov $10,$0
lpb $8
mov $6,$10
mod $6,2
mov $7,$9
mod $7,2
mul $6,$7
add $4,$6
div $9,2
mov $8,$9
div $10,2
lpe
cmp $4,0
add $1,$4
lpe
mov $0,$5
|
user/sleep.asm
|
frank-liang-lbm/xv6-labs-2020
| 0 |
82783
|
user/_sleep: file format elf64-littleriscv
Disassembly of section .text:
0000000000000000 <main>:
#include "kernel/types.h"
#include "kernel/stat.h"
#include "user.h"
int main(int agrc, char *agrv[])
{
0: 1141 addi sp,sp,-16
2: e406 sd ra,8(sp)
4: e022 sd s0,0(sp)
6: 0800 addi s0,sp,16
sleep(atoi(agrv[1]));
8: 6588 ld a0,8(a1)
a: 00000097 auipc ra,0x0
e: 190080e7 jalr 400(ra) # 19a <atoi>
12: 00000097 auipc ra,0x0
16: 318080e7 jalr 792(ra) # 32a <sleep>
exit(0);
1a: 4501 li a0,0
1c: 00000097 auipc ra,0x0
20: 27e080e7 jalr 638(ra) # 29a <exit>
0000000000000024 <strcpy>:
#include "kernel/fcntl.h"
#include "user/user.h"
char*
strcpy(char *s, const char *t)
{
24: 1141 addi sp,sp,-16
26: e422 sd s0,8(sp)
28: 0800 addi s0,sp,16
char *os;
os = s;
while((*s++ = *t++) != 0)
2a: 87aa mv a5,a0
2c: 0585 addi a1,a1,1
2e: 0785 addi a5,a5,1
30: fff5c703 lbu a4,-1(a1)
34: fee78fa3 sb a4,-1(a5)
38: fb75 bnez a4,2c <strcpy+0x8>
;
return os;
}
3a: 6422 ld s0,8(sp)
3c: 0141 addi sp,sp,16
3e: 8082 ret
0000000000000040 <strcmp>:
int
strcmp(const char *p, const char *q)
{
40: 1141 addi sp,sp,-16
42: e422 sd s0,8(sp)
44: 0800 addi s0,sp,16
while(*p && *p == *q)
46: 00054783 lbu a5,0(a0)
4a: cb91 beqz a5,5e <strcmp+0x1e>
4c: 0005c703 lbu a4,0(a1)
50: 00f71763 bne a4,a5,5e <strcmp+0x1e>
p++, q++;
54: 0505 addi a0,a0,1
56: 0585 addi a1,a1,1
while(*p && *p == *q)
58: 00054783 lbu a5,0(a0)
5c: fbe5 bnez a5,4c <strcmp+0xc>
return (uchar)*p - (uchar)*q;
5e: 0005c503 lbu a0,0(a1)
}
62: 40a7853b subw a0,a5,a0
66: 6422 ld s0,8(sp)
68: 0141 addi sp,sp,16
6a: 8082 ret
000000000000006c <strlen>:
uint
strlen(const char *s)
{
6c: 1141 addi sp,sp,-16
6e: e422 sd s0,8(sp)
70: 0800 addi s0,sp,16
int n;
for(n = 0; s[n]; n++)
72: 00054783 lbu a5,0(a0)
76: cf91 beqz a5,92 <strlen+0x26>
78: 0505 addi a0,a0,1
7a: 87aa mv a5,a0
7c: 4685 li a3,1
7e: 9e89 subw a3,a3,a0
80: 00f6853b addw a0,a3,a5
84: 0785 addi a5,a5,1
86: fff7c703 lbu a4,-1(a5)
8a: fb7d bnez a4,80 <strlen+0x14>
;
return n;
}
8c: 6422 ld s0,8(sp)
8e: 0141 addi sp,sp,16
90: 8082 ret
for(n = 0; s[n]; n++)
92: 4501 li a0,0
94: bfe5 j 8c <strlen+0x20>
0000000000000096 <memset>:
void*
memset(void *dst, int c, uint n)
{
96: 1141 addi sp,sp,-16
98: e422 sd s0,8(sp)
9a: 0800 addi s0,sp,16
char *cdst = (char *) dst;
int i;
for(i = 0; i < n; i++){
9c: ce09 beqz a2,b6 <memset+0x20>
9e: 87aa mv a5,a0
a0: fff6071b addiw a4,a2,-1
a4: 1702 slli a4,a4,0x20
a6: 9301 srli a4,a4,0x20
a8: 0705 addi a4,a4,1
aa: 972a add a4,a4,a0
cdst[i] = c;
ac: 00b78023 sb a1,0(a5)
for(i = 0; i < n; i++){
b0: 0785 addi a5,a5,1
b2: fee79de3 bne a5,a4,ac <memset+0x16>
}
return dst;
}
b6: 6422 ld s0,8(sp)
b8: 0141 addi sp,sp,16
ba: 8082 ret
00000000000000bc <strchr>:
char*
strchr(const char *s, char c)
{
bc: 1141 addi sp,sp,-16
be: e422 sd s0,8(sp)
c0: 0800 addi s0,sp,16
for(; *s; s++)
c2: 00054783 lbu a5,0(a0)
c6: cb99 beqz a5,dc <strchr+0x20>
if(*s == c)
c8: 00f58763 beq a1,a5,d6 <strchr+0x1a>
for(; *s; s++)
cc: 0505 addi a0,a0,1
ce: 00054783 lbu a5,0(a0)
d2: fbfd bnez a5,c8 <strchr+0xc>
return (char*)s;
return 0;
d4: 4501 li a0,0
}
d6: 6422 ld s0,8(sp)
d8: 0141 addi sp,sp,16
da: 8082 ret
return 0;
dc: 4501 li a0,0
de: bfe5 j d6 <strchr+0x1a>
00000000000000e0 <gets>:
char*
gets(char *buf, int max)
{
e0: 711d addi sp,sp,-96
e2: ec86 sd ra,88(sp)
e4: e8a2 sd s0,80(sp)
e6: e4a6 sd s1,72(sp)
e8: e0ca sd s2,64(sp)
ea: fc4e sd s3,56(sp)
ec: f852 sd s4,48(sp)
ee: f456 sd s5,40(sp)
f0: f05a sd s6,32(sp)
f2: ec5e sd s7,24(sp)
f4: 1080 addi s0,sp,96
f6: 8baa mv s7,a0
f8: 8a2e mv s4,a1
int i, cc;
char c;
for(i=0; i+1 < max; ){
fa: 892a mv s2,a0
fc: 4481 li s1,0
cc = read(0, &c, 1);
if(cc < 1)
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
fe: 4aa9 li s5,10
100: 4b35 li s6,13
for(i=0; i+1 < max; ){
102: 89a6 mv s3,s1
104: 2485 addiw s1,s1,1
106: 0344d863 bge s1,s4,136 <gets+0x56>
cc = read(0, &c, 1);
10a: 4605 li a2,1
10c: faf40593 addi a1,s0,-81
110: 4501 li a0,0
112: 00000097 auipc ra,0x0
116: 1a0080e7 jalr 416(ra) # 2b2 <read>
if(cc < 1)
11a: 00a05e63 blez a0,136 <gets+0x56>
buf[i++] = c;
11e: faf44783 lbu a5,-81(s0)
122: 00f90023 sb a5,0(s2)
if(c == '\n' || c == '\r')
126: 01578763 beq a5,s5,134 <gets+0x54>
12a: 0905 addi s2,s2,1
12c: fd679be3 bne a5,s6,102 <gets+0x22>
for(i=0; i+1 < max; ){
130: 89a6 mv s3,s1
132: a011 j 136 <gets+0x56>
134: 89a6 mv s3,s1
break;
}
buf[i] = '\0';
136: 99de add s3,s3,s7
138: 00098023 sb zero,0(s3)
return buf;
}
13c: 855e mv a0,s7
13e: 60e6 ld ra,88(sp)
140: 6446 ld s0,80(sp)
142: 64a6 ld s1,72(sp)
144: 6906 ld s2,64(sp)
146: 79e2 ld s3,56(sp)
148: 7a42 ld s4,48(sp)
14a: 7aa2 ld s5,40(sp)
14c: 7b02 ld s6,32(sp)
14e: 6be2 ld s7,24(sp)
150: 6125 addi sp,sp,96
152: 8082 ret
0000000000000154 <stat>:
int
stat(const char *n, struct stat *st)
{
154: 1101 addi sp,sp,-32
156: ec06 sd ra,24(sp)
158: e822 sd s0,16(sp)
15a: e426 sd s1,8(sp)
15c: e04a sd s2,0(sp)
15e: 1000 addi s0,sp,32
160: 892e mv s2,a1
int fd;
int r;
fd = open(n, O_RDONLY);
162: 4581 li a1,0
164: 00000097 auipc ra,0x0
168: 176080e7 jalr 374(ra) # 2da <open>
if(fd < 0)
16c: 02054563 bltz a0,196 <stat+0x42>
170: 84aa mv s1,a0
return -1;
r = fstat(fd, st);
172: 85ca mv a1,s2
174: 00000097 auipc ra,0x0
178: 17e080e7 jalr 382(ra) # 2f2 <fstat>
17c: 892a mv s2,a0
close(fd);
17e: 8526 mv a0,s1
180: 00000097 auipc ra,0x0
184: 142080e7 jalr 322(ra) # 2c2 <close>
return r;
}
188: 854a mv a0,s2
18a: 60e2 ld ra,24(sp)
18c: 6442 ld s0,16(sp)
18e: 64a2 ld s1,8(sp)
190: 6902 ld s2,0(sp)
192: 6105 addi sp,sp,32
194: 8082 ret
return -1;
196: 597d li s2,-1
198: bfc5 j 188 <stat+0x34>
000000000000019a <atoi>:
int
atoi(const char *s)
{
19a: 1141 addi sp,sp,-16
19c: e422 sd s0,8(sp)
19e: 0800 addi s0,sp,16
int n;
n = 0;
while('0' <= *s && *s <= '9')
1a0: 00054603 lbu a2,0(a0)
1a4: fd06079b addiw a5,a2,-48
1a8: 0ff7f793 andi a5,a5,255
1ac: 4725 li a4,9
1ae: 02f76963 bltu a4,a5,1e0 <atoi+0x46>
1b2: 86aa mv a3,a0
n = 0;
1b4: 4501 li a0,0
while('0' <= *s && *s <= '9')
1b6: 45a5 li a1,9
n = n*10 + *s++ - '0';
1b8: 0685 addi a3,a3,1
1ba: 0025179b slliw a5,a0,0x2
1be: 9fa9 addw a5,a5,a0
1c0: 0017979b slliw a5,a5,0x1
1c4: 9fb1 addw a5,a5,a2
1c6: fd07851b addiw a0,a5,-48
while('0' <= *s && *s <= '9')
1ca: 0006c603 lbu a2,0(a3)
1ce: fd06071b addiw a4,a2,-48
1d2: 0ff77713 andi a4,a4,255
1d6: fee5f1e3 bgeu a1,a4,1b8 <atoi+0x1e>
return n;
}
1da: 6422 ld s0,8(sp)
1dc: 0141 addi sp,sp,16
1de: 8082 ret
n = 0;
1e0: 4501 li a0,0
1e2: bfe5 j 1da <atoi+0x40>
00000000000001e4 <memmove>:
void*
memmove(void *vdst, const void *vsrc, int n)
{
1e4: 1141 addi sp,sp,-16
1e6: e422 sd s0,8(sp)
1e8: 0800 addi s0,sp,16
char *dst;
const char *src;
dst = vdst;
src = vsrc;
if (src > dst) {
1ea: 02b57663 bgeu a0,a1,216 <memmove+0x32>
while(n-- > 0)
1ee: 02c05163 blez a2,210 <memmove+0x2c>
1f2: fff6079b addiw a5,a2,-1
1f6: 1782 slli a5,a5,0x20
1f8: 9381 srli a5,a5,0x20
1fa: 0785 addi a5,a5,1
1fc: 97aa add a5,a5,a0
dst = vdst;
1fe: 872a mv a4,a0
*dst++ = *src++;
200: 0585 addi a1,a1,1
202: 0705 addi a4,a4,1
204: fff5c683 lbu a3,-1(a1)
208: fed70fa3 sb a3,-1(a4)
while(n-- > 0)
20c: fee79ae3 bne a5,a4,200 <memmove+0x1c>
src += n;
while(n-- > 0)
*--dst = *--src;
}
return vdst;
}
210: 6422 ld s0,8(sp)
212: 0141 addi sp,sp,16
214: 8082 ret
dst += n;
216: 00c50733 add a4,a0,a2
src += n;
21a: 95b2 add a1,a1,a2
while(n-- > 0)
21c: fec05ae3 blez a2,210 <memmove+0x2c>
220: fff6079b addiw a5,a2,-1
224: 1782 slli a5,a5,0x20
226: 9381 srli a5,a5,0x20
228: fff7c793 not a5,a5
22c: 97ba add a5,a5,a4
*--dst = *--src;
22e: 15fd addi a1,a1,-1
230: 177d addi a4,a4,-1
232: 0005c683 lbu a3,0(a1)
236: 00d70023 sb a3,0(a4)
while(n-- > 0)
23a: fee79ae3 bne a5,a4,22e <memmove+0x4a>
23e: bfc9 j 210 <memmove+0x2c>
0000000000000240 <memcmp>:
int
memcmp(const void *s1, const void *s2, uint n)
{
240: 1141 addi sp,sp,-16
242: e422 sd s0,8(sp)
244: 0800 addi s0,sp,16
const char *p1 = s1, *p2 = s2;
while (n-- > 0) {
246: ca05 beqz a2,276 <memcmp+0x36>
248: fff6069b addiw a3,a2,-1
24c: 1682 slli a3,a3,0x20
24e: 9281 srli a3,a3,0x20
250: 0685 addi a3,a3,1
252: 96aa add a3,a3,a0
if (*p1 != *p2) {
254: 00054783 lbu a5,0(a0)
258: 0005c703 lbu a4,0(a1)
25c: 00e79863 bne a5,a4,26c <memcmp+0x2c>
return *p1 - *p2;
}
p1++;
260: 0505 addi a0,a0,1
p2++;
262: 0585 addi a1,a1,1
while (n-- > 0) {
264: fed518e3 bne a0,a3,254 <memcmp+0x14>
}
return 0;
268: 4501 li a0,0
26a: a019 j 270 <memcmp+0x30>
return *p1 - *p2;
26c: 40e7853b subw a0,a5,a4
}
270: 6422 ld s0,8(sp)
272: 0141 addi sp,sp,16
274: 8082 ret
return 0;
276: 4501 li a0,0
278: bfe5 j 270 <memcmp+0x30>
000000000000027a <memcpy>:
void *
memcpy(void *dst, const void *src, uint n)
{
27a: 1141 addi sp,sp,-16
27c: e406 sd ra,8(sp)
27e: e022 sd s0,0(sp)
280: 0800 addi s0,sp,16
return memmove(dst, src, n);
282: 00000097 auipc ra,0x0
286: f62080e7 jalr -158(ra) # 1e4 <memmove>
}
28a: 60a2 ld ra,8(sp)
28c: 6402 ld s0,0(sp)
28e: 0141 addi sp,sp,16
290: 8082 ret
0000000000000292 <fork>:
# generated by usys.pl - do not edit
#include "kernel/syscall.h"
.global fork
fork:
li a7, SYS_fork
292: 4885 li a7,1
ecall
294: 00000073 ecall
ret
298: 8082 ret
000000000000029a <exit>:
.global exit
exit:
li a7, SYS_exit
29a: 4889 li a7,2
ecall
29c: 00000073 ecall
ret
2a0: 8082 ret
00000000000002a2 <wait>:
.global wait
wait:
li a7, SYS_wait
2a2: 488d li a7,3
ecall
2a4: 00000073 ecall
ret
2a8: 8082 ret
00000000000002aa <pipe>:
.global pipe
pipe:
li a7, SYS_pipe
2aa: 4891 li a7,4
ecall
2ac: 00000073 ecall
ret
2b0: 8082 ret
00000000000002b2 <read>:
.global read
read:
li a7, SYS_read
2b2: 4895 li a7,5
ecall
2b4: 00000073 ecall
ret
2b8: 8082 ret
00000000000002ba <write>:
.global write
write:
li a7, SYS_write
2ba: 48c1 li a7,16
ecall
2bc: 00000073 ecall
ret
2c0: 8082 ret
00000000000002c2 <close>:
.global close
close:
li a7, SYS_close
2c2: 48d5 li a7,21
ecall
2c4: 00000073 ecall
ret
2c8: 8082 ret
00000000000002ca <kill>:
.global kill
kill:
li a7, SYS_kill
2ca: 4899 li a7,6
ecall
2cc: 00000073 ecall
ret
2d0: 8082 ret
00000000000002d2 <exec>:
.global exec
exec:
li a7, SYS_exec
2d2: 489d li a7,7
ecall
2d4: 00000073 ecall
ret
2d8: 8082 ret
00000000000002da <open>:
.global open
open:
li a7, SYS_open
2da: 48bd li a7,15
ecall
2dc: 00000073 ecall
ret
2e0: 8082 ret
00000000000002e2 <mknod>:
.global mknod
mknod:
li a7, SYS_mknod
2e2: 48c5 li a7,17
ecall
2e4: 00000073 ecall
ret
2e8: 8082 ret
00000000000002ea <unlink>:
.global unlink
unlink:
li a7, SYS_unlink
2ea: 48c9 li a7,18
ecall
2ec: 00000073 ecall
ret
2f0: 8082 ret
00000000000002f2 <fstat>:
.global fstat
fstat:
li a7, SYS_fstat
2f2: 48a1 li a7,8
ecall
2f4: 00000073 ecall
ret
2f8: 8082 ret
00000000000002fa <link>:
.global link
link:
li a7, SYS_link
2fa: 48cd li a7,19
ecall
2fc: 00000073 ecall
ret
300: 8082 ret
0000000000000302 <mkdir>:
.global mkdir
mkdir:
li a7, SYS_mkdir
302: 48d1 li a7,20
ecall
304: 00000073 ecall
ret
308: 8082 ret
000000000000030a <chdir>:
.global chdir
chdir:
li a7, SYS_chdir
30a: 48a5 li a7,9
ecall
30c: 00000073 ecall
ret
310: 8082 ret
0000000000000312 <dup>:
.global dup
dup:
li a7, SYS_dup
312: 48a9 li a7,10
ecall
314: 00000073 ecall
ret
318: 8082 ret
000000000000031a <getpid>:
.global getpid
getpid:
li a7, SYS_getpid
31a: 48ad li a7,11
ecall
31c: 00000073 ecall
ret
320: 8082 ret
0000000000000322 <sbrk>:
.global sbrk
sbrk:
li a7, SYS_sbrk
322: 48b1 li a7,12
ecall
324: 00000073 ecall
ret
328: 8082 ret
000000000000032a <sleep>:
.global sleep
sleep:
li a7, SYS_sleep
32a: 48b5 li a7,13
ecall
32c: 00000073 ecall
ret
330: 8082 ret
0000000000000332 <uptime>:
.global uptime
uptime:
li a7, SYS_uptime
332: 48b9 li a7,14
ecall
334: 00000073 ecall
ret
338: 8082 ret
000000000000033a <putc>:
static char digits[] = "0123456789ABCDEF";
static void
putc(int fd, char c)
{
33a: 1101 addi sp,sp,-32
33c: ec06 sd ra,24(sp)
33e: e822 sd s0,16(sp)
340: 1000 addi s0,sp,32
342: feb407a3 sb a1,-17(s0)
write(fd, &c, 1);
346: 4605 li a2,1
348: fef40593 addi a1,s0,-17
34c: 00000097 auipc ra,0x0
350: f6e080e7 jalr -146(ra) # 2ba <write>
}
354: 60e2 ld ra,24(sp)
356: 6442 ld s0,16(sp)
358: 6105 addi sp,sp,32
35a: 8082 ret
000000000000035c <printint>:
static void
printint(int fd, int xx, int base, int sgn)
{
35c: 7139 addi sp,sp,-64
35e: fc06 sd ra,56(sp)
360: f822 sd s0,48(sp)
362: f426 sd s1,40(sp)
364: f04a sd s2,32(sp)
366: ec4e sd s3,24(sp)
368: 0080 addi s0,sp,64
36a: 84aa mv s1,a0
char buf[16];
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
36c: c299 beqz a3,372 <printint+0x16>
36e: 0805c863 bltz a1,3fe <printint+0xa2>
neg = 1;
x = -xx;
} else {
x = xx;
372: 2581 sext.w a1,a1
neg = 0;
374: 4881 li a7,0
376: fc040693 addi a3,s0,-64
}
i = 0;
37a: 4701 li a4,0
do{
buf[i++] = digits[x % base];
37c: 2601 sext.w a2,a2
37e: 00000517 auipc a0,0x0
382: 44250513 addi a0,a0,1090 # 7c0 <digits>
386: 883a mv a6,a4
388: 2705 addiw a4,a4,1
38a: 02c5f7bb remuw a5,a1,a2
38e: 1782 slli a5,a5,0x20
390: 9381 srli a5,a5,0x20
392: 97aa add a5,a5,a0
394: 0007c783 lbu a5,0(a5)
398: 00f68023 sb a5,0(a3)
}while((x /= base) != 0);
39c: 0005879b sext.w a5,a1
3a0: 02c5d5bb divuw a1,a1,a2
3a4: 0685 addi a3,a3,1
3a6: fec7f0e3 bgeu a5,a2,386 <printint+0x2a>
if(neg)
3aa: 00088b63 beqz a7,3c0 <printint+0x64>
buf[i++] = '-';
3ae: fd040793 addi a5,s0,-48
3b2: 973e add a4,a4,a5
3b4: 02d00793 li a5,45
3b8: fef70823 sb a5,-16(a4)
3bc: 0028071b addiw a4,a6,2
while(--i >= 0)
3c0: 02e05863 blez a4,3f0 <printint+0x94>
3c4: fc040793 addi a5,s0,-64
3c8: 00e78933 add s2,a5,a4
3cc: fff78993 addi s3,a5,-1
3d0: 99ba add s3,s3,a4
3d2: 377d addiw a4,a4,-1
3d4: 1702 slli a4,a4,0x20
3d6: 9301 srli a4,a4,0x20
3d8: 40e989b3 sub s3,s3,a4
putc(fd, buf[i]);
3dc: fff94583 lbu a1,-1(s2)
3e0: 8526 mv a0,s1
3e2: 00000097 auipc ra,0x0
3e6: f58080e7 jalr -168(ra) # 33a <putc>
while(--i >= 0)
3ea: 197d addi s2,s2,-1
3ec: ff3918e3 bne s2,s3,3dc <printint+0x80>
}
3f0: 70e2 ld ra,56(sp)
3f2: 7442 ld s0,48(sp)
3f4: 74a2 ld s1,40(sp)
3f6: 7902 ld s2,32(sp)
3f8: 69e2 ld s3,24(sp)
3fa: 6121 addi sp,sp,64
3fc: 8082 ret
x = -xx;
3fe: 40b005bb negw a1,a1
neg = 1;
402: 4885 li a7,1
x = -xx;
404: bf8d j 376 <printint+0x1a>
0000000000000406 <vprintf>:
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
vprintf(int fd, const char *fmt, va_list ap)
{
406: 7119 addi sp,sp,-128
408: fc86 sd ra,120(sp)
40a: f8a2 sd s0,112(sp)
40c: f4a6 sd s1,104(sp)
40e: f0ca sd s2,96(sp)
410: ecce sd s3,88(sp)
412: e8d2 sd s4,80(sp)
414: e4d6 sd s5,72(sp)
416: e0da sd s6,64(sp)
418: fc5e sd s7,56(sp)
41a: f862 sd s8,48(sp)
41c: f466 sd s9,40(sp)
41e: f06a sd s10,32(sp)
420: ec6e sd s11,24(sp)
422: 0100 addi s0,sp,128
char *s;
int c, i, state;
state = 0;
for(i = 0; fmt[i]; i++){
424: 0005c903 lbu s2,0(a1)
428: 18090f63 beqz s2,5c6 <vprintf+0x1c0>
42c: 8aaa mv s5,a0
42e: 8b32 mv s6,a2
430: 00158493 addi s1,a1,1
state = 0;
434: 4981 li s3,0
if(c == '%'){
state = '%';
} else {
putc(fd, c);
}
} else if(state == '%'){
436: 02500a13 li s4,37
if(c == 'd'){
43a: 06400c13 li s8,100
printint(fd, va_arg(ap, int), 10, 1);
} else if(c == 'l') {
43e: 06c00c93 li s9,108
printint(fd, va_arg(ap, uint64), 10, 0);
} else if(c == 'x') {
442: 07800d13 li s10,120
printint(fd, va_arg(ap, int), 16, 0);
} else if(c == 'p') {
446: 07000d93 li s11,112
putc(fd, digits[x >> (sizeof(uint64) * 8 - 4)]);
44a: 00000b97 auipc s7,0x0
44e: 376b8b93 addi s7,s7,886 # 7c0 <digits>
452: a839 j 470 <vprintf+0x6a>
putc(fd, c);
454: 85ca mv a1,s2
456: 8556 mv a0,s5
458: 00000097 auipc ra,0x0
45c: ee2080e7 jalr -286(ra) # 33a <putc>
460: a019 j 466 <vprintf+0x60>
} else if(state == '%'){
462: 01498f63 beq s3,s4,480 <vprintf+0x7a>
for(i = 0; fmt[i]; i++){
466: 0485 addi s1,s1,1
468: fff4c903 lbu s2,-1(s1)
46c: 14090d63 beqz s2,5c6 <vprintf+0x1c0>
c = fmt[i] & 0xff;
470: 0009079b sext.w a5,s2
if(state == 0){
474: fe0997e3 bnez s3,462 <vprintf+0x5c>
if(c == '%'){
478: fd479ee3 bne a5,s4,454 <vprintf+0x4e>
state = '%';
47c: 89be mv s3,a5
47e: b7e5 j 466 <vprintf+0x60>
if(c == 'd'){
480: 05878063 beq a5,s8,4c0 <vprintf+0xba>
} else if(c == 'l') {
484: 05978c63 beq a5,s9,4dc <vprintf+0xd6>
} else if(c == 'x') {
488: 07a78863 beq a5,s10,4f8 <vprintf+0xf2>
} else if(c == 'p') {
48c: 09b78463 beq a5,s11,514 <vprintf+0x10e>
printptr(fd, va_arg(ap, uint64));
} else if(c == 's'){
490: 07300713 li a4,115
494: 0ce78663 beq a5,a4,560 <vprintf+0x15a>
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
498: 06300713 li a4,99
49c: 0ee78e63 beq a5,a4,598 <vprintf+0x192>
putc(fd, va_arg(ap, uint));
} else if(c == '%'){
4a0: 11478863 beq a5,s4,5b0 <vprintf+0x1aa>
putc(fd, c);
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
4a4: 85d2 mv a1,s4
4a6: 8556 mv a0,s5
4a8: 00000097 auipc ra,0x0
4ac: e92080e7 jalr -366(ra) # 33a <putc>
putc(fd, c);
4b0: 85ca mv a1,s2
4b2: 8556 mv a0,s5
4b4: 00000097 auipc ra,0x0
4b8: e86080e7 jalr -378(ra) # 33a <putc>
}
state = 0;
4bc: 4981 li s3,0
4be: b765 j 466 <vprintf+0x60>
printint(fd, va_arg(ap, int), 10, 1);
4c0: 008b0913 addi s2,s6,8
4c4: 4685 li a3,1
4c6: 4629 li a2,10
4c8: 000b2583 lw a1,0(s6)
4cc: 8556 mv a0,s5
4ce: 00000097 auipc ra,0x0
4d2: e8e080e7 jalr -370(ra) # 35c <printint>
4d6: 8b4a mv s6,s2
state = 0;
4d8: 4981 li s3,0
4da: b771 j 466 <vprintf+0x60>
printint(fd, va_arg(ap, uint64), 10, 0);
4dc: 008b0913 addi s2,s6,8
4e0: 4681 li a3,0
4e2: 4629 li a2,10
4e4: 000b2583 lw a1,0(s6)
4e8: 8556 mv a0,s5
4ea: 00000097 auipc ra,0x0
4ee: e72080e7 jalr -398(ra) # 35c <printint>
4f2: 8b4a mv s6,s2
state = 0;
4f4: 4981 li s3,0
4f6: bf85 j 466 <vprintf+0x60>
printint(fd, va_arg(ap, int), 16, 0);
4f8: 008b0913 addi s2,s6,8
4fc: 4681 li a3,0
4fe: 4641 li a2,16
500: 000b2583 lw a1,0(s6)
504: 8556 mv a0,s5
506: 00000097 auipc ra,0x0
50a: e56080e7 jalr -426(ra) # 35c <printint>
50e: 8b4a mv s6,s2
state = 0;
510: 4981 li s3,0
512: bf91 j 466 <vprintf+0x60>
printptr(fd, va_arg(ap, uint64));
514: 008b0793 addi a5,s6,8
518: f8f43423 sd a5,-120(s0)
51c: 000b3983 ld s3,0(s6)
putc(fd, '0');
520: 03000593 li a1,48
524: 8556 mv a0,s5
526: 00000097 auipc ra,0x0
52a: e14080e7 jalr -492(ra) # 33a <putc>
putc(fd, 'x');
52e: 85ea mv a1,s10
530: 8556 mv a0,s5
532: 00000097 auipc ra,0x0
536: e08080e7 jalr -504(ra) # 33a <putc>
53a: 4941 li s2,16
putc(fd, digits[x >> (sizeof(uint64) * 8 - 4)]);
53c: 03c9d793 srli a5,s3,0x3c
540: 97de add a5,a5,s7
542: 0007c583 lbu a1,0(a5)
546: 8556 mv a0,s5
548: 00000097 auipc ra,0x0
54c: df2080e7 jalr -526(ra) # 33a <putc>
for (i = 0; i < (sizeof(uint64) * 2); i++, x <<= 4)
550: 0992 slli s3,s3,0x4
552: 397d addiw s2,s2,-1
554: fe0914e3 bnez s2,53c <vprintf+0x136>
printptr(fd, va_arg(ap, uint64));
558: f8843b03 ld s6,-120(s0)
state = 0;
55c: 4981 li s3,0
55e: b721 j 466 <vprintf+0x60>
s = va_arg(ap, char*);
560: 008b0993 addi s3,s6,8
564: 000b3903 ld s2,0(s6)
if(s == 0)
568: 02090163 beqz s2,58a <vprintf+0x184>
while(*s != 0){
56c: 00094583 lbu a1,0(s2)
570: c9a1 beqz a1,5c0 <vprintf+0x1ba>
putc(fd, *s);
572: 8556 mv a0,s5
574: 00000097 auipc ra,0x0
578: dc6080e7 jalr -570(ra) # 33a <putc>
s++;
57c: 0905 addi s2,s2,1
while(*s != 0){
57e: 00094583 lbu a1,0(s2)
582: f9e5 bnez a1,572 <vprintf+0x16c>
s = va_arg(ap, char*);
584: 8b4e mv s6,s3
state = 0;
586: 4981 li s3,0
588: bdf9 j 466 <vprintf+0x60>
s = "(null)";
58a: 00000917 auipc s2,0x0
58e: 22e90913 addi s2,s2,558 # 7b8 <malloc+0xe8>
while(*s != 0){
592: 02800593 li a1,40
596: bff1 j 572 <vprintf+0x16c>
putc(fd, va_arg(ap, uint));
598: 008b0913 addi s2,s6,8
59c: 000b4583 lbu a1,0(s6)
5a0: 8556 mv a0,s5
5a2: 00000097 auipc ra,0x0
5a6: d98080e7 jalr -616(ra) # 33a <putc>
5aa: 8b4a mv s6,s2
state = 0;
5ac: 4981 li s3,0
5ae: bd65 j 466 <vprintf+0x60>
putc(fd, c);
5b0: 85d2 mv a1,s4
5b2: 8556 mv a0,s5
5b4: 00000097 auipc ra,0x0
5b8: d86080e7 jalr -634(ra) # 33a <putc>
state = 0;
5bc: 4981 li s3,0
5be: b565 j 466 <vprintf+0x60>
s = va_arg(ap, char*);
5c0: 8b4e mv s6,s3
state = 0;
5c2: 4981 li s3,0
5c4: b54d j 466 <vprintf+0x60>
}
}
}
5c6: 70e6 ld ra,120(sp)
5c8: 7446 ld s0,112(sp)
5ca: 74a6 ld s1,104(sp)
5cc: 7906 ld s2,96(sp)
5ce: 69e6 ld s3,88(sp)
5d0: 6a46 ld s4,80(sp)
5d2: 6aa6 ld s5,72(sp)
5d4: 6b06 ld s6,64(sp)
5d6: 7be2 ld s7,56(sp)
5d8: 7c42 ld s8,48(sp)
5da: 7ca2 ld s9,40(sp)
5dc: 7d02 ld s10,32(sp)
5de: 6de2 ld s11,24(sp)
5e0: 6109 addi sp,sp,128
5e2: 8082 ret
00000000000005e4 <fprintf>:
void
fprintf(int fd, const char *fmt, ...)
{
5e4: 715d addi sp,sp,-80
5e6: ec06 sd ra,24(sp)
5e8: e822 sd s0,16(sp)
5ea: 1000 addi s0,sp,32
5ec: e010 sd a2,0(s0)
5ee: e414 sd a3,8(s0)
5f0: e818 sd a4,16(s0)
5f2: ec1c sd a5,24(s0)
5f4: 03043023 sd a6,32(s0)
5f8: 03143423 sd a7,40(s0)
va_list ap;
va_start(ap, fmt);
5fc: fe843423 sd s0,-24(s0)
vprintf(fd, fmt, ap);
600: 8622 mv a2,s0
602: 00000097 auipc ra,0x0
606: e04080e7 jalr -508(ra) # 406 <vprintf>
}
60a: 60e2 ld ra,24(sp)
60c: 6442 ld s0,16(sp)
60e: 6161 addi sp,sp,80
610: 8082 ret
0000000000000612 <printf>:
void
printf(const char *fmt, ...)
{
612: 711d addi sp,sp,-96
614: ec06 sd ra,24(sp)
616: e822 sd s0,16(sp)
618: 1000 addi s0,sp,32
61a: e40c sd a1,8(s0)
61c: e810 sd a2,16(s0)
61e: ec14 sd a3,24(s0)
620: f018 sd a4,32(s0)
622: f41c sd a5,40(s0)
624: 03043823 sd a6,48(s0)
628: 03143c23 sd a7,56(s0)
va_list ap;
va_start(ap, fmt);
62c: 00840613 addi a2,s0,8
630: fec43423 sd a2,-24(s0)
vprintf(1, fmt, ap);
634: 85aa mv a1,a0
636: 4505 li a0,1
638: 00000097 auipc ra,0x0
63c: dce080e7 jalr -562(ra) # 406 <vprintf>
}
640: 60e2 ld ra,24(sp)
642: 6442 ld s0,16(sp)
644: 6125 addi sp,sp,96
646: 8082 ret
0000000000000648 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
648: 1141 addi sp,sp,-16
64a: e422 sd s0,8(sp)
64c: 0800 addi s0,sp,16
Header *bp, *p;
bp = (Header*)ap - 1;
64e: ff050693 addi a3,a0,-16
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
652: 00000797 auipc a5,0x0
656: 1867b783 ld a5,390(a5) # 7d8 <freep>
65a: a805 j 68a <free+0x42>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
bp->s.size += p->s.ptr->s.size;
65c: 4618 lw a4,8(a2)
65e: 9db9 addw a1,a1,a4
660: feb52c23 sw a1,-8(a0)
bp->s.ptr = p->s.ptr->s.ptr;
664: 6398 ld a4,0(a5)
666: 6318 ld a4,0(a4)
668: fee53823 sd a4,-16(a0)
66c: a091 j 6b0 <free+0x68>
} else
bp->s.ptr = p->s.ptr;
if(p + p->s.size == bp){
p->s.size += bp->s.size;
66e: ff852703 lw a4,-8(a0)
672: 9e39 addw a2,a2,a4
674: c790 sw a2,8(a5)
p->s.ptr = bp->s.ptr;
676: ff053703 ld a4,-16(a0)
67a: e398 sd a4,0(a5)
67c: a099 j 6c2 <free+0x7a>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
67e: 6398 ld a4,0(a5)
680: 00e7e463 bltu a5,a4,688 <free+0x40>
684: 00e6ea63 bltu a3,a4,698 <free+0x50>
{
688: 87ba mv a5,a4
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
68a: fed7fae3 bgeu a5,a3,67e <free+0x36>
68e: 6398 ld a4,0(a5)
690: 00e6e463 bltu a3,a4,698 <free+0x50>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
694: fee7eae3 bltu a5,a4,688 <free+0x40>
if(bp + bp->s.size == p->s.ptr){
698: ff852583 lw a1,-8(a0)
69c: 6390 ld a2,0(a5)
69e: 02059713 slli a4,a1,0x20
6a2: 9301 srli a4,a4,0x20
6a4: 0712 slli a4,a4,0x4
6a6: 9736 add a4,a4,a3
6a8: fae60ae3 beq a2,a4,65c <free+0x14>
bp->s.ptr = p->s.ptr;
6ac: fec53823 sd a2,-16(a0)
if(p + p->s.size == bp){
6b0: 4790 lw a2,8(a5)
6b2: 02061713 slli a4,a2,0x20
6b6: 9301 srli a4,a4,0x20
6b8: 0712 slli a4,a4,0x4
6ba: 973e add a4,a4,a5
6bc: fae689e3 beq a3,a4,66e <free+0x26>
} else
p->s.ptr = bp;
6c0: e394 sd a3,0(a5)
freep = p;
6c2: 00000717 auipc a4,0x0
6c6: 10f73b23 sd a5,278(a4) # 7d8 <freep>
}
6ca: 6422 ld s0,8(sp)
6cc: 0141 addi sp,sp,16
6ce: 8082 ret
00000000000006d0 <malloc>:
return freep;
}
void*
malloc(uint nbytes)
{
6d0: 7139 addi sp,sp,-64
6d2: fc06 sd ra,56(sp)
6d4: f822 sd s0,48(sp)
6d6: f426 sd s1,40(sp)
6d8: f04a sd s2,32(sp)
6da: ec4e sd s3,24(sp)
6dc: e852 sd s4,16(sp)
6de: e456 sd s5,8(sp)
6e0: e05a sd s6,0(sp)
6e2: 0080 addi s0,sp,64
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
6e4: 02051493 slli s1,a0,0x20
6e8: 9081 srli s1,s1,0x20
6ea: 04bd addi s1,s1,15
6ec: 8091 srli s1,s1,0x4
6ee: 0014899b addiw s3,s1,1
6f2: 0485 addi s1,s1,1
if((prevp = freep) == 0){
6f4: 00000517 auipc a0,0x0
6f8: 0e453503 ld a0,228(a0) # 7d8 <freep>
6fc: c515 beqz a0,728 <malloc+0x58>
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
6fe: 611c ld a5,0(a0)
if(p->s.size >= nunits){
700: 4798 lw a4,8(a5)
702: 02977f63 bgeu a4,s1,740 <malloc+0x70>
706: 8a4e mv s4,s3
708: 0009871b sext.w a4,s3
70c: 6685 lui a3,0x1
70e: 00d77363 bgeu a4,a3,714 <malloc+0x44>
712: 6a05 lui s4,0x1
714: 000a0b1b sext.w s6,s4
p = sbrk(nu * sizeof(Header));
718: 004a1a1b slliw s4,s4,0x4
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
71c: 00000917 auipc s2,0x0
720: 0bc90913 addi s2,s2,188 # 7d8 <freep>
if(p == (char*)-1)
724: 5afd li s5,-1
726: a88d j 798 <malloc+0xc8>
base.s.ptr = freep = prevp = &base;
728: 00000797 auipc a5,0x0
72c: 0b878793 addi a5,a5,184 # 7e0 <base>
730: 00000717 auipc a4,0x0
734: 0af73423 sd a5,168(a4) # 7d8 <freep>
738: e39c sd a5,0(a5)
base.s.size = 0;
73a: 0007a423 sw zero,8(a5)
if(p->s.size >= nunits){
73e: b7e1 j 706 <malloc+0x36>
if(p->s.size == nunits)
740: 02e48b63 beq s1,a4,776 <malloc+0xa6>
p->s.size -= nunits;
744: 4137073b subw a4,a4,s3
748: c798 sw a4,8(a5)
p += p->s.size;
74a: 1702 slli a4,a4,0x20
74c: 9301 srli a4,a4,0x20
74e: 0712 slli a4,a4,0x4
750: 97ba add a5,a5,a4
p->s.size = nunits;
752: 0137a423 sw s3,8(a5)
freep = prevp;
756: 00000717 auipc a4,0x0
75a: 08a73123 sd a0,130(a4) # 7d8 <freep>
return (void*)(p + 1);
75e: 01078513 addi a0,a5,16
if((p = morecore(nunits)) == 0)
return 0;
}
}
762: 70e2 ld ra,56(sp)
764: 7442 ld s0,48(sp)
766: 74a2 ld s1,40(sp)
768: 7902 ld s2,32(sp)
76a: 69e2 ld s3,24(sp)
76c: 6a42 ld s4,16(sp)
76e: 6aa2 ld s5,8(sp)
770: 6b02 ld s6,0(sp)
772: 6121 addi sp,sp,64
774: 8082 ret
prevp->s.ptr = p->s.ptr;
776: 6398 ld a4,0(a5)
778: e118 sd a4,0(a0)
77a: bff1 j 756 <malloc+0x86>
hp->s.size = nu;
77c: 01652423 sw s6,8(a0)
free((void*)(hp + 1));
780: 0541 addi a0,a0,16
782: 00000097 auipc ra,0x0
786: ec6080e7 jalr -314(ra) # 648 <free>
return freep;
78a: 00093503 ld a0,0(s2)
if((p = morecore(nunits)) == 0)
78e: d971 beqz a0,762 <malloc+0x92>
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
790: 611c ld a5,0(a0)
if(p->s.size >= nunits){
792: 4798 lw a4,8(a5)
794: fa9776e3 bgeu a4,s1,740 <malloc+0x70>
if(p == freep)
798: 00093703 ld a4,0(s2)
79c: 853e mv a0,a5
79e: fef719e3 bne a4,a5,790 <malloc+0xc0>
p = sbrk(nu * sizeof(Header));
7a2: 8552 mv a0,s4
7a4: 00000097 auipc ra,0x0
7a8: b7e080e7 jalr -1154(ra) # 322 <sbrk>
if(p == (char*)-1)
7ac: fd5518e3 bne a0,s5,77c <malloc+0xac>
return 0;
7b0: 4501 li a0,0
7b2: bf45 j 762 <malloc+0x92>
|
programs/oeis/089/A089011.asm
|
neoneye/loda
| 22 |
20929
|
<filename>programs/oeis/089/A089011.asm
; A089011: a(n) = 1 if n is an exponent of the Weyl group W(E_7), 0 otherwise.
; 1,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
add $0,3
mov $3,10
sub $3,$0
add $3,1
mov $1,$3
div $3,3
mov $2,$3
cmp $2,0
add $3,$2
div $1,$3
add $1,3
mod $1,2
mov $0,$1
|
Assembler/AssemblyCode/WHILE_LOOP.asm
|
KPU-RISC/KPU
| 8 |
28066
|
<reponame>KPU-RISC/KPU<filename>Assembler/AssemblyCode/WHILE_LOOP.asm
; Initial value
MOV D, 4
; Decrement D
:LOOP
DEC D
; Conditional Jump if the Zero-Flag from the ALU is not 1
; The jump goes to the instruction "DEC D"
JNZ :LOOP
; Write register D to the Output Port
OUTB D
; Stops the CPU execution
HLT
|
tasks/data/ret4bytes.asm
|
yds12/x86-roadmap
| 15 |
90113
|
<reponame>yds12/x86-roadmap
; In this program we use addressing from a memory location plus a displacement
; to get specific portions of data from the .data section.
global asm_func
section .data
a_byte db 0x0f, 0x0e, 0x0d, 0x0c
section .text
asm_func:
mov rax, -1
mov al, [rel a_byte] ; retrieves the data from a_byte (1 byte of it,
; since the destination operand (AL) is a 8-bit
; register).
shl rax, 8
mov al, [rel a_byte + 1] ; now we do the same but from address a_byte
; plus 1 byte. That gives us the second element
; following a_byte (0x0e), since we used
; db to declare the data, which means that each
; item has 1 byte.
shl rax, 8
mov al, [rel a_byte + 2] ; now we get the third element (0x0d)
shl rax, 8
mov al, [rel a_byte + 3] ; and the 4th.
ret
|
src/frontend/Experimental_Ada_ROSE_Connection/parser/support/source/indented_text.ads
|
ouankou/rose
| 488 |
30665
|
<gh_stars>100-1000
-- At the beginning of each line, puts out white space relative to the
-- current indent. Emits Wide text:
package Indented_Text is
--------------------------------------------------------
-- Trace routines emit no output when Trace_On is False. At the moment,
-- Indented_Text.Class output routines call these:
procedure Trace_Put (Message : in Wide_String);
procedure Trace_Put_Line (Message : in Wide_String);
-- Controls behavior of Trace_ routines::
Trace_On : Boolean := False;
--------------------------------------------------------
type Class is tagged private;
type Access_Class is access Class;
procedure Indent
(This : in out Class);
procedure Dedent
(This : in out Class);
-- Sets Line_In_Progress:
procedure New_Line
(This : in out Class);
-- Puts a new line only if a line is in progress:
-- Sets Line_In_Progress:
procedure End_Line
(This : in out Class);
-- Prepends the indent if this is the first put on this line:
procedure Put
(This : in out Class;
Message : in String);
procedure Put
(This : in out Class;
Message : in Wide_String);
-- Prepends the indent if this is the first put on this line:
procedure Put_Indented_Line
(This : in out Class;
Message : in String);
procedure Put_Indented_Line
(This : in out Class;
Message : in Wide_String);
private
-- Can't be limited because generic Asis.Iterator.Traverse_Element doesn't
-- want limited state information:
-- (In Asis_Adapter.Element)
type Class is tagged -- Initialized
record
Line_In_Progress : Boolean := False;
Indent_Level : Natural := 0;
end record;
-- Puts an indent only if a line is not in progress (no indent put yet):
-- Sets Line_In_Progress:
procedure Put_Indent_If_Needed
(This : in out Class);
function White_Space
(This : in Class)
return Wide_String;
end Indented_Text;
|
test/asset/agda-stdlib-1.0/Relation/Binary/Properties/DecTotalOrder.agda
|
omega12345/agda-mode
| 0 |
13737
|
<reponame>omega12345/agda-mode<gh_stars>0
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties satisfied by decidable total orders
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary
module Relation.Binary.Properties.DecTotalOrder
{d₁ d₂ d₃} (DT : DecTotalOrder d₁ d₂ d₃) where
open Relation.Binary.DecTotalOrder DT hiding (trans)
open import Relation.Binary.Construct.NonStrictToStrict _≈_ _≤_
strictTotalOrder : StrictTotalOrder _ _ _
strictTotalOrder = record
{ isStrictTotalOrder = <-isStrictTotalOrder₂ isDecTotalOrder
}
open StrictTotalOrder strictTotalOrder public
|
oeis/185/A185309.asm
|
neoneye/loda-programs
| 11 |
89437
|
; A185309: a(0)=0, a(1)=0; for n>1, a(n) = a(n-1) + (n+1)*a(n-2) + 1.
; Submitted by <NAME>
; 0,0,1,2,8,21,78,247,950,3421,13872,54925,235262,1004213,4533144,20600553,97664002,468473957,2324089996,11693569137,60499459054,317757980069,1709245538312,9335437059969,52066575517770,294787939076965,1700585478056756,9954647772211777,59271626635857702,357911059802211013,2195331485513799776,13648485399184552193,86094424421139944802,550142927993414719365,3563447782733312787436,23368593190496242684577,155216161151628815819710,1043222702390486037833637,7096652987304009854802328
mov $2,2
lpb $0
lpb $3
add $2,1
sub $2,$3
cmp $4,4
cmp $4,0
sub $3,$4
add $6,1
add $7,$1
lpe
sub $0,1
mov $1,$6
add $2,1
mul $1,$2
mov $3,1
mul $7,$5
mov $5,-1
sub $6,$7
add $7,$6
lpe
mov $0,$7
|
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0xca.log_21829_1344.asm
|
ljhsiun2/medusa
| 9 |
98767
|
<reponame>ljhsiun2/medusa<filename>Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0xca.log_21829_1344.asm
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r15
push %r8
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0xe341, %rsi
nop
nop
nop
sub $33601, %rbx
movb $0x61, (%rsi)
and $52601, %rdi
lea addresses_UC_ht+0x7cab, %r10
nop
nop
nop
xor %rbp, %rbp
mov (%r10), %r8d
nop
nop
sub %r10, %r10
lea addresses_normal_ht+0x10b21, %rsi
lea addresses_D_ht+0x16069, %rdi
dec %r10
mov $46, %rcx
rep movsw
nop
nop
nop
nop
and %r10, %r10
lea addresses_UC_ht+0xdd21, %rsi
nop
nop
nop
nop
nop
and %rdi, %rdi
mov $0x6162636465666768, %r8
movq %r8, %xmm3
movups %xmm3, (%rsi)
nop
nop
nop
nop
nop
cmp $59505, %rsi
lea addresses_WT_ht+0x1bd21, %rsi
nop
nop
nop
dec %rdi
movb $0x61, (%rsi)
sub %rbx, %rbx
lea addresses_normal_ht+0x18f21, %rcx
nop
nop
dec %rsi
mov (%rcx), %bx
nop
nop
cmp $15918, %rcx
lea addresses_WC_ht+0x3521, %rdi
nop
nop
add %rbx, %rbx
movw $0x6162, (%rdi)
nop
nop
nop
nop
nop
add %r10, %r10
lea addresses_normal_ht+0x1eb21, %rbx
clflush (%rbx)
nop
nop
nop
nop
and %rsi, %rsi
mov $0x6162636465666768, %rcx
movq %rcx, %xmm2
movups %xmm2, (%rbx)
sub %r10, %r10
lea addresses_A_ht+0x1c921, %rbx
nop
nop
nop
nop
cmp $8458, %rdi
mov $0x6162636465666768, %rbp
movq %rbp, %xmm3
movups %xmm3, (%rbx)
nop
nop
nop
sub $30511, %rcx
lea addresses_normal_ht+0x176f5, %r8
nop
and %rdi, %rdi
vmovups (%r8), %ymm4
vextracti128 $0, %ymm4, %xmm4
vpextrq $1, %xmm4, %rsi
nop
nop
sub $246, %rbx
lea addresses_WC_ht+0x4f21, %rsi
lea addresses_UC_ht+0x2b21, %rdi
nop
nop
nop
nop
nop
cmp $42400, %r15
mov $35, %rcx
rep movsb
nop
nop
nop
nop
nop
and %r8, %r8
lea addresses_normal_ht+0xed91, %rsi
lea addresses_WT_ht+0x17721, %rdi
nop
nop
nop
nop
nop
sub $12080, %rbx
mov $32, %rcx
rep movsl
sub $15152, %r10
lea addresses_WC_ht+0x1c321, %r10
dec %r8
mov $0x6162636465666768, %rsi
movq %rsi, (%r10)
nop
nop
nop
nop
inc %rbx
lea addresses_WT_ht+0xdd21, %rsi
lea addresses_normal_ht+0x1d06c, %rdi
nop
sub %rbx, %rbx
mov $118, %rcx
rep movsb
nop
nop
nop
nop
nop
dec %rsi
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r8
pop %r15
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r8
push %rax
push %rbx
push %rdi
push %rsi
// Store
lea addresses_US+0x11bc9, %rdi
nop
nop
sub $50647, %r12
mov $0x5152535455565758, %r8
movq %r8, %xmm0
movntdq %xmm0, (%rdi)
nop
cmp %rdi, %rdi
// Store
lea addresses_US+0x7a21, %r11
clflush (%r11)
nop
dec %rax
movw $0x5152, (%r11)
nop
xor %rdi, %rdi
// Store
lea addresses_D+0x163d, %r8
nop
nop
nop
nop
nop
sub %rbx, %rbx
movl $0x51525354, (%r8)
inc %r11
// Store
lea addresses_WT+0x11821, %r11
nop
nop
nop
nop
nop
add %r12, %r12
mov $0x5152535455565758, %r8
movq %r8, %xmm4
movaps %xmm4, (%r11)
nop
nop
nop
nop
nop
and %rsi, %rsi
// Faulty Load
lea addresses_D+0x17f21, %rax
nop
nop
and $47495, %rsi
movaps (%rax), %xmm1
vpextrq $0, %xmm1, %r8
lea oracles, %rbx
and $0xff, %r8
shlq $12, %r8
mov (%rbx,%r8,1), %r8
pop %rsi
pop %rdi
pop %rbx
pop %rax
pop %r8
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 4, 'NT': True, 'type': 'addresses_D'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 16, 'NT': True, 'type': 'addresses_US'}}
{'OP': 'STOR', 'dst': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 2, 'NT': True, 'type': 'addresses_US'}}
{'OP': 'STOR', 'dst': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_D'}}
{'OP': 'STOR', 'dst': {'congruent': 8, 'AVXalign': True, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_WT'}}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': True, 'same': True, 'size': 16, 'NT': False, 'type': 'addresses_D'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_A_ht'}}
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 8, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 3, 'same': False, 'type': 'addresses_D_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_UC_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_WT_ht'}}
{'src': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_WC_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_normal_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_A_ht'}}
{'src': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 7, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_UC_ht'}}
{'src': {'congruent': 0, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_WT_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_WC_ht'}}
{'src': {'congruent': 9, 'same': True, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_normal_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
*/
|
src/asf-contexts-writer-string.adb
|
Letractively/ada-asf
| 0 |
454
|
-----------------------------------------------------------------------
-- writer.string -- A simple string writer
-- Copyright (C) 2009, 2010, 2011 <NAME>
-- Written by <NAME> (<EMAIL>)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Util.Streams.Buffered;
-- Implements a <b>ResponseWriter</b> that puts the result in a string.
-- The response content can be retrieved after the response is rendered.
package body ASF.Contexts.Writer.String is
procedure Initialize (Stream : in out String_Writer) is
Output : ASF.Streams.Print_Stream;
begin
Stream.Content.Initialize (Size => 256 * 1024);
Output.Initialize (Stream.Content'Unchecked_Access);
Stream.Initialize ("text/xml", "utf-8", Output);
end Initialize;
-- ------------------------------
-- Get the response
-- ------------------------------
function Get_Response (Stream : in String_Writer) return Unbounded_String is
use Util.Streams;
begin
return To_Unbounded_String (Texts.To_String (Buffered.Buffered_Stream (Stream.Content)));
end Get_Response;
end ASF.Contexts.Writer.String;
|
tools/scitools/conf/understand/ada/ada95/a-interr.ads
|
brucegua/moocos
| 1 |
732
|
------------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- A D A . I N T E R R U P T S --
-- --
-- S p e c --
-- --
-- $Revision: 2 $ --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --
-- --
------------------------------------------------------------------------------
with System;
package Ada.Interrupts is
type Interrupt_Id is new Natural;
type Parameterless_Handler is
access protected procedure;
function Is_Reserved (Interrupt : Interrupt_Id)
return Boolean;
function Is_Attached (Interrupt : Interrupt_Id)
return Boolean;
function Current_Handler (Interrupt : Interrupt_Id)
return Parameterless_Handler;
procedure Attach_Handler
(New_Handler : Parameterless_Handler;
Interrupt : Interrupt_Id);
procedure Exchange_Handler
(Old_Handler : out Parameterless_Handler;
New_Handler : Parameterless_Handler;
Interrupt : Interrupt_Id);
procedure Detach_Handler
(Interrupt : Interrupt_Id);
function Reference (Interrupt : Interrupt_Id)
return System.Address;
end Ada.Interrupts;
|
libs/context/src/asm/ontop_x86_64_ms_pe_gas.asm
|
metux/boost
| 2 |
90392
|
<gh_stars>1-10
/*
Copyright <NAME> 2009.
Copyright <NAME> 2013.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
*/
/*************************************************************************************
* ---------------------------------------------------------------------------------- *
* | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | *
* ---------------------------------------------------------------------------------- *
* | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | *
* ---------------------------------------------------------------------------------- *
* | SEE registers (XMM6-XMM15) | *
* ---------------------------------------------------------------------------------- *
* ---------------------------------------------------------------------------------- *
* | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | *
* ---------------------------------------------------------------------------------- *
* | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | *
* ---------------------------------------------------------------------------------- *
* | SEE registers (XMM6-XMM15) | *
* ---------------------------------------------------------------------------------- *
* ---------------------------------------------------------------------------------- *
* | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | *
* ---------------------------------------------------------------------------------- *
* | 0xe40 | 0x44 | 0x48 | 0x4c | 0x50 | 0x54 | 0x58 | 0x5c | *
* ---------------------------------------------------------------------------------- *
* | SEE registers (XMM6-XMM15) | *
* ---------------------------------------------------------------------------------- *
* ---------------------------------------------------------------------------------- *
* | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | *
* ---------------------------------------------------------------------------------- *
* | 0x60 | 0x64 | 0x68 | 0x6c | 0x70 | 0x74 | 0x78 | 0x7c | *
* ---------------------------------------------------------------------------------- *
* | SEE registers (XMM6-XMM15) | *
* ---------------------------------------------------------------------------------- *
* ---------------------------------------------------------------------------------- *
* | 32 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | *
* ---------------------------------------------------------------------------------- *
* | 0x80 | 0x84 | 0x88 | 0x8c | 0x90 | 0x94 | 0x98 | 0x9c | *
* ---------------------------------------------------------------------------------- *
* | SEE registers (XMM6-XMM15) | *
* ---------------------------------------------------------------------------------- *
* ---------------------------------------------------------------------------------- *
* | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | *
* ---------------------------------------------------------------------------------- *
* | 0xa0 | 0xa4 | 0xa8 | 0xac | 0xb0 | 0xb4 | 0xb8 | 0xbc | *
* ---------------------------------------------------------------------------------- *
* | fc_mxcsr|fc_x87_cw| <alignment> | fbr_strg | fc_dealloc | *
* ---------------------------------------------------------------------------------- *
* ---------------------------------------------------------------------------------- *
* | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | *
* ---------------------------------------------------------------------------------- *
* | 0xc0 | 0xc4 | 0xc8 | 0xcc | 0xd0 | 0xd4 | 0xd8 | 0xdc | *
* ---------------------------------------------------------------------------------- *
* | limit | base | R12 | R13 | *
* ---------------------------------------------------------------------------------- *
* ---------------------------------------------------------------------------------- *
* | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | *
* ---------------------------------------------------------------------------------- *
* | 0xe0 | 0xe4 | 0xe8 | 0xec | 0xf0 | 0xf4 | 0xf8 | 0xfc | *
* ---------------------------------------------------------------------------------- *
* | R14 | R15 | RDI | RSI | *
* ---------------------------------------------------------------------------------- *
* ---------------------------------------------------------------------------------- *
* | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | *
* ---------------------------------------------------------------------------------- *
* | 0x100 | 0x104 | 0x108 | 0x10c | 0x110 | 0x114 | 0x118 | 0x11c | *
* ---------------------------------------------------------------------------------- *
* | RBX | RBP | hidden | RIP | *
* ---------------------------------------------------------------------------------- *
* ---------------------------------------------------------------------------------- *
* | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | *
* ---------------------------------------------------------------------------------- *
* | 0x120 | 0x124 | 0x128 | 0x12c | 0x130 | 0x134 | 0x138 | 0x13c | *
* ---------------------------------------------------------------------------------- *
* | parameter area | *
* ---------------------------------------------------------------------------------- *
* ---------------------------------------------------------------------------------- *
* | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | *
* ---------------------------------------------------------------------------------- *
* | 0x140 | 0x144 | 0x148 | 0x14c | 0x150 | 0x154 | 0x158 | 0x15c | *
* ---------------------------------------------------------------------------------- *
* | FCTX | DATA | | *
* ---------------------------------------------------------------------------------- *
**************************************************************************************/
.file "ontop_x86_64_ms_pe_gas.asm"
.text
.p2align 4,,15
.globl ontop_fcontext
.def ontop_fcontext; .scl 2; .type 32; .endef
.seh_proc ontop_fcontext
ontop_fcontext:
.seh_endprologue
leaq -0x118(%rsp), %rsp /* prepare stack */
/* save XMM storage */
movaps %xmm6, 0x0(%rsp)
movaps %xmm7, 0x10(%rsp)
movaps %xmm8, 0x20(%rsp)
movaps %xmm9, 0x30(%rsp)
movaps %xmm10, 0x40(%rsp)
movaps %xmm11, 0x50(%rsp)
movaps %xmm12, 0x60(%rsp)
movaps %xmm13, 0x70(%rsp)
movaps %xmm14, 0x80(%rsp)
movaps %xmm15, 0x90(%rsp)
stmxcsr 0xa0(%rsp) /* save MMX control- and status-word */
fnstcw 0xa4(%rsp) /* save x87 control-word */
/* load NT_TIB */
movq %gs:(0x30), %r10
/* save fiber local storage */
movq 0x18(%r10), %rax
movq %rax, 0xb0(%rsp)
/* save current deallocation stack */
movq 0x1478(%r10), %rax
movq %rax, 0xb8(%rsp)
/* save current stack limit */
movq 0x10(%r10), %rax
movq %rax, 0xc0(%rsp)
/* save current stack base */
movq 0x08(%r10), %rax
movq %rax, 0xc8(%rsp)
movq %r12, 0xd0(%rsp) /* save R12 */
movq %r13, 0xd8(%rsp) /* save R13 */
movq %r14, 0xe0(%rsp) /* save R14 */
movq %r15, 0xe8(%rsp) /* save R15 */
movq %rdi, 0xf0(%rsp) /* save RDI */
movq %rsi, 0xf8(%rsp) /* save RSI */
movq %rbx, 0x100(%rsp) /* save RBX */
movq %rbp, 0x108(%rsp) /* save RBP */
movq %rcx, 0x110(%rsp) /* save hidden address of transport_t */
/* preserve RSP (pointing to context-data) in RCX */
movq %rsp, %rcx
/* restore RSP (pointing to context-data) from RDX */
movq %rdx, %rsp
/* save XMM storage */
movaps 0x0(%rsp), %xmm6
movaps 0x10(%rsp), %xmm7
movaps 0x20(%rsp), %xmm8
movaps 0x30(%rsp), %xmm9
movaps 0x40(%rsp), %xmm10
movaps 0x50(%rsp), %xmm11
movaps 0x60(%rsp), %xmm12
movaps 0x70(%rsp), %xmm13
movaps 0x80(%rsp), %xmm14
movaps 0x90(%rsp), %xmm15
/* load NT_TIB */
movq %gs:(0x30), %r10
/* restore fiber local storage */
movq 0xb0(%rsp), %rax
movq %rax, 0x18(%r10)
/* restore current deallocation stack */
movq 0xb8(%rsp), %rax
movq %rax, 0x1478(%r10)
/* restore current stack limit */
movq 0xc0(%rsp), %rax
movq %rax, 0x10(%r10)
/* restore current stack base */
movq 0xc8(%rsp), %rax
movq %rax, 0x08(%r10)
movq 0xd0(%rsp), %r12 /* restore R12 */
movq 0xd8(%rsp), %r13 /* restore R13 */
movq 0xe0(%rsp), %r14 /* restore R14 */
movq 0xe8(%rsp), %r15 /* restore R15 */
movq 0xf0(%rsp), %rdi /* restore RDI */
movq 0xf8(%rsp), %rsi /* restore RSI */
movq 0x100(%rsp), %rbx /* restore RBX */
movq 0x108(%rsp), %rbp /* restore RBP */
movq 0x110(%rsp), %rcx /* restore hidden address of transport_t */
leaq 0x118(%rsp), %rsp /* prepare stack */
/* keep return-address on stack */
/* transport_t returned in RAX */
/* return parent fcontext_t */
movq %rcx, (%rax)
/* return data */
movq %r8, 0x8(%rax)
/* transport_t as 1.arg of context-function */
/* RCX contains address of returned (hidden) transfer_t */
movq %rax, %rcx
/* RDX contains address of passed transfer_t */
movq %rax, %rdx
/* indirect jump to context */
jmp *%r9
.seh_endproc
.section .drectve
.ascii " -export:\"ontop_fcontext\""
|
oeis/021/A021871.asm
|
neoneye/loda-programs
| 11 |
88530
|
; A021871: Decimal expansion of 1/867.
; 0,0,1,1,5,3,4,0,2,5,3,7,4,8,5,5,8,2,4,6,8,2,8,1,4,3,0,2,1,9,1,4,6,4,8,2,1,2,2,2,6,0,6,6,8,9,7,3,4,7,1,7,4,1,6,3,7,8,3,1,6,0,3,2,2,9,5,2,7,1,0,4,9,5,9,6,3,0,9,1,1,1,8,8,0,0,4,6,1,3,6,1,0,1,4,9,9,4,2
add $0,1
mov $2,10
pow $2,$0
mov $0,$2
div $0,867
mod $0,10
|
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/inline1_pkg.ads
|
best08618/asylo
| 7 |
9934
|
package Inline1_Pkg is
function Valid_Real (Number : Float) return Boolean;
pragma Inline_Always (Valid_Real);
function Invalid_Real return Float;
pragma Inline_Always (Invalid_Real);
end Inline1_Pkg;
|
test/Succeed/Issue2641/Import.agda
|
shlevy/agda
| 1,989 |
11454
|
<reponame>shlevy/agda
module Issue2641.Import where
open import Agda.Builtin.Nat
five : Nat
five = 5
|
src/test/resources/data/searchtests/test13-expected.asm
|
cpcitor/mdlz80optimizer
| 0 |
103237
|
<gh_stars>0
ld ix, 1234
ld (ix + 0), 1
ld (ix + 2), 2
|
oeis/052/A052979.asm
|
neoneye/loda-programs
| 11 |
246211
|
<gh_stars>10-100
; A052979: Expansion of (1-x)(1+x)/(1-2*x-3*x^2+2*x^4).
; Submitted by <NAME>
; 1,2,6,18,52,154,452,1330,3912,11506,33844,99546,292800,861226,2533164,7450914,21915720,64461730,189604292,557691946,1640365328,4824883034,14191653468,41742572146,122779374040,361136698450,1062228212084
mov $2,1
lpb $0
sub $0,1
add $3,1
add $1,$3
mov $5,$4
mov $4,$2
mov $2,$3
mul $2,2
add $4,$1
add $5,$4
mov $3,$5
lpe
mov $0,$2
|
programs/oeis/109/A109110.asm
|
neoneye/loda
| 22 |
243399
|
<reponame>neoneye/loda<filename>programs/oeis/109/A109110.asm
; A109110: a(n) = 2a(n-1) + a(n-2) - a(n-3); a(0)=4, a(1)=9, a(2)=20.
; 4,9,20,45,101,227,510,1146,2575,5786,13001,29213,65641,147494,331416,744685,1673292,3759853,8448313,18983187,42654834,95844542,215360731,483911170,1087338529,2443227497,5489882353,12335653674,27717962204
add $0,1
seq $0,77850 ; Expansion of (1-x)^(-1)/(1 - 2*x - x^2 + x^3).
add $0,1
|
src/dds-request_reply.ads
|
alexcamposruiz/dds-requestreply
| 0 |
26015
|
with DDS.DomainParticipantListener;
with DDS.Treats_Generic;
with DDS.Entity;
with DDS.DomainParticipant;
with DDS.TopicListener;
with DDS.Topic;
with DDS.DomainParticipantFactory;
package DDS.Request_Reply is
type Ref is limited interface;
type Ref_Access is access all Ref'Class;
procedure DDSLog_Exception (Log : Standard.String) is null;
-- function Create_Request_Topic_Name_From_Service_Name
-- (Self : not null access Ref'Class;
-- Service_Name : DDS.String) return DDS.String is abstract;
--
--
-- function Create_Reply_Topic_Name_From_Service_Name
-- (Self : not null access Ref'Class;
-- Service_Name : DDS.String) return DDS.String is abstract;
end DDS.Request_Reply;
|
s3/music/Menu.asm
|
Cancer52/flamedriver
| 9 |
168597
|
Snd_Menu_Header:
smpsHeaderStartSong 3
smpsHeaderVoiceUVB
smpsHeaderChan $06, $03
smpsHeaderTempo $01, $40
smpsHeaderDAC Snd_Menu_DAC
smpsHeaderFM Snd_Menu_FM1, $0C, $12
smpsHeaderFM Snd_Menu_FM2, $0C, $19
smpsHeaderFM Snd_Menu_FM3, $0C, $19
smpsHeaderFM Snd_Menu_FM4, $0C, $19
smpsHeaderFM Snd_Menu_FM5, $0C, $19
smpsHeaderPSG Snd_Menu_PSG1, $00, $06, $00, sTone_0C
smpsHeaderPSG Snd_Menu_PSG2, $00, $06, $00, sTone_0C
smpsHeaderPSG Snd_Menu_PSG3, $00, $04, $00, sTone_0C
; Unreachable
smpsStop
smpsStop
Snd_Menu_Call00:
dc.b dKickS3, $12, dKickS3, $06, dKickS3, dElectricHighTom, $0C, dKickS3, $06, dKickS3, $12, dKickS3
dc.b $06, dKickS3, dElectricMidTom, dElectricLowTom, $0C
smpsReturn
; DAC Data
Snd_Menu_DAC:
dc.b nRst, $2A
Snd_Menu_Loop00:
smpsCall Snd_Menu_Call00
smpsLoop $01, $03, Snd_Menu_Loop00
dc.b dKickS3, $12, dKickS3, $06, dKickS3, dElectricHighTom, $0C, dKickS3, $06, dKickS3, $02, dHigherMetalHit
dc.b $03, dHigherMetalHit, $01, dHigherMetalHit, $0C, dHigherMetalHit, $06, dHigherMetalHit, $08, dHigherMetalHit, dMidMetalHit
Snd_Menu_Loop01:
smpsCall Snd_Menu_Call00
smpsLoop $01, $03, Snd_Menu_Loop01
dc.b dElectricLowTom, $06, dElectricLowTom, dElectricLowTom, $12, dElectricLowTom, $06, dElectricLowTom, dElectricLowTom, $1E, dElectricMidTom, $18
Snd_Menu_Loop02:
smpsCall Snd_Menu_Call00
smpsLoop $01, $07, Snd_Menu_Loop02
dc.b dKickS3, $12, dKickS3, $06, dKickS3, dElectricHighTom, $0C, dKickS3, $06, dKickS3, dHigherMetalHit, $0C
dc.b dHigherMetalHit, $06, dHigherMetalHit, $0C, dElectricLowTom
Snd_Menu_Loop03:
smpsCall Snd_Menu_Call00
smpsLoop $01, $02, Snd_Menu_Loop03
dc.b dKickS3, $12, dKickS3, $06, dKickS3, dElectricHighTom, $0C, dKickS3, $06, dKickS3, $12, dKickS3
dc.b $06, dKickS3, dElectricMidTom, dElectricLowTom, $0C, dElectricLowTom, $06, dElectricLowTom, dElectricLowTom, $12, dElectricLowTom, $06
dc.b dElectricLowTom, dElectricLowTom, $1E, dElectricMidTom, $18
Snd_Menu_Loop04:
smpsCall Snd_Menu_Call00
smpsLoop $01, $03, Snd_Menu_Loop04
dc.b dElectricLowTom, $06, dKickS3, $0C, dElectricLowTom, $06, dKickS3, dElectricLowTom, dElectricLowTom, dElectricMidTom, $0C, dKickS3
dc.b $12, dKickS3, $06, dKickS3, dElectricHighTom, $0C
Snd_Menu_Loop05:
smpsCall Snd_Menu_Call00
smpsLoop $01, $02, Snd_Menu_Loop05
dc.b dKickS3, $12, dKickS3, $06, dKickS3, dElectricHighTom, $0C, dKickS3, $06, dKickS3, $12, dKickS3
dc.b $06, dKickS3, dElectricMidTom, dElectricLowTom, $0C, dElectricLowTom, dKickS3, $06, dElectricLowTom, $0C, dKickS3, $06
dc.b dElectricLowTom, nRst, $36
smpsJump Snd_Menu_Loop00
; Unreachable
smpsStop
; FM1 Data
Snd_Menu_FM1:
dc.b nRst, $2A
Snd_Menu_Jump04:
smpsSetvoice $00
dc.b nC1, $12, nG1, nC2, $0C, nF1, $12, nC2, nF2, $0C, nBb0, $12
dc.b nF1, nBb1, $0C, nG0, $12, nD1, nG1, $0C, nC1, $12, nG1, nC2
dc.b $0C, nF1, $12, nC2, nF2, $0C, nBb0, $12, nC1, nD1, $0C, nRst
dc.b $30, nC1, $12, nG1, nC2, $0C, nF1, $12, nC2, nF2, $0C, nBb0
dc.b $12, nF1, nBb1, $0C, nG1, $12, nD2, nG2, $0C, nC1, $12, nG1
dc.b nC2, $0C, nF1, $12, nC2, nF2, $0C, nBb0, $06, nBb0, nBb0, nRst
dc.b $0C, nBb0, $06, nBb0, nBb0, nRst, $30, nF1, $12, nC2, nF2, $0C
dc.b nBb0, $12, nF1, nBb1, $0C, nEb1, $12, nBb1, nEb2, $0C, nEb1, $12
dc.b nBb1, nEb2, $0C, nF1, $12, nC2, nF2, $0C, nBb0, $12, nF1, nBb1
dc.b $0C, nEb1, $12, nBb1, nEb2, $0C, nEb1, $12, nF1, nFs1, $0C, nG1
dc.b $12, nD2, nG2, $0C, nC1, $12, nG1, nC2, $0C, nF1, $12, nC2
dc.b nF2, $0C, nD1, $12, nA1, nD2, $0C, nG1, $12, nD2, nG2, $0C
dc.b nC1, $12, nG1, nC2, $0C, nF1, $12, nC1, nF0, $0C, nRst, $30
dc.b nC1, $12, nG1, nC2, $0C, nF1, $12, nC2, nF2, $0C, nBb0, $12
dc.b nF1, nBb1, $0C, nG1, $12, nD2, nG2, $0C, nC1, $12, nG1, nC2
dc.b $0C, nF1, $12, nC2, nF2, $0C, nBb0, $06, nBb0, nBb0, nRst, $0C
dc.b nBb0, $06, nBb0, nBb0, nRst, $30, nF1, $12, nC2, nF2, $0C, nF1
dc.b $12, nC2, nF2, $0C, nF1, $12, nC2, nF2, $0C, nG1, $18, nFs1
dc.b nF1, $12, nC2, nF2, $0C, nF1, $12, nC2, nF2, $0C, nBb1, $12
dc.b nBb1, $06, nRst, nF1, nFs1, nG1, $0C, nG1, $06, nD2, $0C, nG2
dc.b $06, nD2, nG1, $0C, nF1, $12, nC2, nF2, $0C, nF1, $12, nC2
dc.b nF2, $0C, nF1, $12, nC2, nF2, $0C, nG1, $18, nFs1, nF1, $12
dc.b nC2, nF2, $0C, nF1, $12, nC2, nF2, $0C, nBb0, $12, nC1, nD1
dc.b $0C, nRst, $30
smpsJump Snd_Menu_Jump04
; Unreachable
smpsStop
; FM2 Data
Snd_Menu_FM2:
smpsSetvoice $12
smpsAlterNote $00
smpsModSet $03, $01, $FC, $05
smpsPan panCenter, $00
dc.b nBb3, $0C, nBb3, $06, nBb3, $08, nA3, nBb3
Snd_Menu_Jump03:
dc.b nA3, $03, nBb3, nA3, $0C, nG3, $26, nA3, $08, nBb3, nC4, nA3
dc.b nG3, nG3, $03, nA3, nG3, $0C, nF3, $21, nCs3, $03, nD3, $0C
dc.b nEb3, $06, nF3, $08, nG3, nD3, nF3, $12, nEb3, $0F, nA3, $03
dc.b nBb3, $0C, nA3, $12, nG3, nA3, $0C, nG3, $03, nA3, nG3, $0C
dc.b nF3, $24, nBb3, $0C, nBb3, $06, nBb3, $08, nA3, nBb3, nA3, $03
dc.b nBb3, nA3, $0C, nG3, $26, nA3, $08, nBb3, nC4, nA3, nG3, nG3
dc.b $03, nA3, nG3, $0C, nF3, $22, nFs3, $04, nG3, $08, nA3, nB3
dc.b nC4, nD4, nEb4, $12, nG3, nBb3, $0C, nA3, $12, nG3, nA3, $0C
dc.b nBb3, $06, nBb3, nBb3, $12, nBb3, $06, nBb3, nBb3, $2A
smpsSetvoice $0F
smpsAlterNote $04
smpsModSet $0F, $01, $06, $05
dc.b nC5, $03, nRst, nD5, nRst, nEb5, $12, nAb4, nEb5, $0C, nD5, $18
dc.b nRst, $0C, nBb4, $03, nRst, nC5, nRst, nD5, $12, nG5, nD5, $0C
dc.b nC5, $18, nRst, $0C, nC5, $03, nRst, nD5, nRst, nEb5, $12, nAb4
dc.b nEb5, $0C, nD5, $12, nF5, nD5, $0C, nC5, $03, nD5, nC5, $0C
dc.b nBb4, $36, nRst, $0C, nD5, $03, nRst, nE5, nRst, nF5, $12, nBb4
dc.b nF5, $0C, nE5, $18, nRst, $0C, nC5, $03, nRst, nD5, nRst, nE5
dc.b $12, nA5, nE5, $0C, nD5, $18, nRst, $0C, nA4, $06, nBb4, nC5
dc.b $03, nRst, $09, nD5, $03, nRst, nBb4, nRst, $09, nC5, $03, nRst
dc.b $09, nA4, $03, nRst, $09, nBb4, $03, nRst, $09, nG4, $03, nRst
dc.b $09, nA4, $0C, nAb4, $02, nG4, nFs4, nF4, $06, nRst, $30
smpsSetvoice $12
smpsAlterNote $00
smpsModSet $03, $01, $FC, $05
smpsPan panCenter, $00
dc.b nBb3, $0C, nBb3, $06, nBb3, $08, nA3, nBb3, nA3, $03, nBb3, nA3
dc.b $0C, nG3, $26, nA3, $08, nBb3, nC4, nA3, nG3, nG3, $03, nA3
dc.b nG3, $0C, nF3, $22, nFs3, $04, nG3, $08, nA3, nB3, nC4, nD4
dc.b nEb4, $12, nG3, nBb3, $0C, nA3, $12, nG3, nA3, $0C, nBb3, $06
dc.b nBb3, nBb3, $12, nBb3, $06, nBb3, nBb3, $3C
smpsSetvoice $0D
smpsAlterNote $04
smpsModSet $0F, $01, $FA, $05
smpsPan panLeft, $00
dc.b nEb3, $03, nRst, nG3, nRst, nBb3, nRst, nD4, nRst, $09, nC4, $03
dc.b nRst, nD4, nRst, $09, nC4, $03, nRst, nD4, nRst, nC4, $12, nRst
dc.b nD3, $03, nRst, nF3, nRst, nA3, nRst, nC4, nRst, $09, nBb3, $03
dc.b nRst, nC4, nRst, $09, nBb3, $03, nRst, nC4, nRst, nBb3, $0C
smpsSetvoice $0B
smpsAlterNote $04
smpsModSet $0F, $01, $FA, $05
smpsPan panLeft, $00
dc.b nG3, $03, nRst, nA3, $06, nBb3, $0C
smpsSetvoice $0D
smpsAlterNote $04
smpsModSet $0F, $01, $FA, $05
smpsPan panLeft, $00
dc.b nEb3, $06, nG3, $03, nRst, nBb3, nRst, nD4, nRst, $09, nC4, $03
dc.b nRst, nD4, nRst, $09, nC4, $03, nRst, nD4, nRst, nC4, $12, nRst
smpsSetvoice $0F
smpsAlterNote $04
smpsModSet $0F, $01, $06, $05
dc.b nBb4, $06, nA4, nF4, nD4, nBb3, nA3, nG3, $0C, nRst, $30
smpsSetvoice $0D
smpsAlterNote $04
smpsModSet $0F, $01, $FA, $05
smpsPan panLeft, $00
dc.b nEb3, $03, nRst, nG3, nRst, nBb3, nRst, nD4, nRst, $09, nC4, $03
dc.b nRst, nD4, nRst, $09, nC4, $03, nRst, nD4, nRst, nC4, $12, nRst
dc.b nD3, $03, nRst, nF3, nRst, nA3, nRst, nC4, nRst, $09, nBb3, $03
dc.b nRst, nC4, nRst, $09, nBb3, $03, nRst, nC4, nRst, nBb3, $0C
smpsSetvoice $0B
smpsAlterNote $04
smpsModSet $0F, $01, $FA, $05
smpsPan panLeft, $00
dc.b nG3, $03, nRst, nA3, $06, nBb3, $0C
smpsSetvoice $0D
smpsAlterNote $04
smpsModSet $0F, $01, $FA, $05
smpsPan panLeft, $00
dc.b nEb3, $03, nRst, nG3, nRst, nBb3, nRst, nD4, nRst, $09, nC4, $03
dc.b nRst, nD4, nRst, $09, nC4, $03, nRst, nD4, nRst, nC4, $12, nRst
smpsSetvoice $0F
smpsAlterNote $04
smpsModSet $0F, $01, $06, $05
dc.b nBb4, $06, nA4, nF4, nD4, nBb3, nA3, nG3, $0C
smpsSetvoice $12
smpsAlterNote $00
smpsModSet $03, $01, $FC, $05
smpsPan panCenter, $00
dc.b nBb3, $0C, nBb3, $06, nBb3, $08, nA3, nBb3
smpsJump Snd_Menu_Jump03
; Unreachable
smpsStop
; FM3 Data
Snd_Menu_FM3:
smpsSetvoice $12
smpsAlterNote $FD
smpsModSet $03, $01, $04, $05
smpsPan panCenter, $00
dc.b nBb2, $0C, nBb2, $06, nBb2, $08, nA2, nBb2
Snd_Menu_Jump02:
smpsSetvoice $12
smpsAlterNote $FD
smpsModSet $03, $01, $04, $05
smpsPan panCenter, $00
dc.b nA2, $03, nBb2, nA2, $0C, nG2, $26, nA2, $08, nBb2, nC3, nA2
dc.b nG2, nG2, $03, nA2, nG2, $0C, nF2, $21, nCs2, $03, nD2, $0C
dc.b nEb2, $06, nF2, $08, nG2, nD2, nF2, $12, nEb2, $0F, nA2, $03
dc.b nBb2, $0C, nA2, $12, nG2, nA2, $0C, nG2, $03, nA2, nG2, $0C
dc.b nF2, $24, nBb2, $0C, nBb2, $06, nBb2, $08, nA2, nBb2, nA2, $03
dc.b nBb2, nA2, $0C, nG2, $26, nA2, $08, nBb2, nC3, nA2, nG2, nG2
dc.b $03, nA2, nG2, $0C, nF2, $22, nFs2, $04, nG2, $08, nA2, nB2
dc.b nC3, nD3, nEb3, $12, nG2, nBb2, $0C, nA2, $12, nG2, nA2, $0C
dc.b nBb2, $06, nBb2, nBb2, $12, nBb2, $06, nBb2, nBb2, $30
smpsSetvoice $0F
smpsAlterNote $04
smpsModSet $0F, $01, $06, $05
smpsFMAlterVol $14
dc.b nC5, $03, nRst, nD5, nRst, nEb5, $12, nAb4, nEb5, $0C, nD5, $18
dc.b nRst, $0C, nBb4, $03, nRst, nC5, nRst, nD5, $12, nG5, nD5, $0C
dc.b nC5, $18, nRst, $0C, nC5, $03, nRst, nD5, nRst, nEb5, $12, nAb4
dc.b nEb5, $0C, nD5, $12, nF5, nD5, $0C, nC5, $03, nD5, nC5, $0C
dc.b nBb4, $36, nRst, $0C, nD5, $03, nRst, nE5, nRst, nF5, $12, nBb4
dc.b nF5, $0C, nE5, $18, nRst, $0C, nC5, $03, nRst, nD5, nRst, nE5
dc.b $12, nA5, nE5, $0C, nD5, $18, nRst, $0C, nA4, $06, nBb4, nC5
dc.b $03, nRst, $09, nD5, $03, nRst, nBb4, nRst, $09, nC5, $03, nRst
dc.b $09, nA4, $03, nRst, $09, nBb4, $03, nRst, $09, nG4, $03, nRst
dc.b $09, nA4, $0C, nAb4, $02, nG4, nFs4, nF4, $06, nRst, $2A
smpsFMAlterVol $EC
smpsSetvoice $12
smpsAlterNote $FD
smpsModSet $03, $01, $04, $05
smpsPan panCenter, $00
dc.b nBb2, $0C, nBb2, $06, nBb2, $08, nA2, nBb2, nA2, $03, nBb2, nA2
dc.b $0C, nG2, $26, nA2, $08, nBb2, nC3, nA2, nG2, nG2, $03, nA2
dc.b nG2, $0C, nF2, $22, nFs2, $04, nG2, $08, nA2, nB2, nC3, nD3
dc.b nEb3, $12, nG2, nBb2, $0C, nA2, $12, nG2, nA2, $0C, nBb2, $06
dc.b nBb2, nBb2, $12, nBb2, $06, nBb2, nBb2, $3C
smpsSetvoice $0D
smpsAlterNote $FC
smpsModSet $0F, $01, $06, $05
smpsPan panRight, $00
dc.b nC3, $03, nRst, nEb3, nRst, nG3, nRst, nBb3, nRst, $09, nA3, $03
dc.b nRst, nBb3, nRst, $09, nA3, $03, nRst, nBb3, nRst, nA3, $12, nRst
dc.b nBb2, $03, nRst, nD3, nRst, nF3, nRst, nA3, nRst, $09, nG3, $03
dc.b nRst, nA3, nRst, $09, nG3, $03, nRst, nA3, nRst, nG3, $0C
smpsSetvoice $0B
smpsAlterNote $FC
smpsModSet $0F, $01, $06, $05
smpsPan panRight, $00
dc.b nEb3, $03, nRst, nF3, $06, nG3, $0C
smpsSetvoice $0D
smpsAlterNote $FC
smpsModSet $0F, $01, $06, $05
smpsPan panRight, $00
dc.b nC3, $06, nEb3, $03, nRst, nG3, nRst, nBb3, nRst, $09, nA3, $03
dc.b nRst, nBb3, nRst, $09, nA3, $03, nRst, nBb3, nRst, nA3, $12, nRst
smpsSetvoice $0F
smpsAlterNote $FC
smpsModSet $0F, $01, $06, $05
dc.b nG4, $06, nF4, nD4, nBb3, nG3, nF3, nD3, $0C, nRst, $30
smpsSetvoice $0D
smpsAlterNote $FC
smpsModSet $0F, $01, $06, $05
smpsPan panRight, $00
dc.b nC3, $03, nRst, nEb3, nRst, nG3, nRst, nBb3, nRst, $09, nA3, $03
dc.b nRst, nBb3, nRst, $09, nA3, $03, nRst, nBb3, nRst, nA3, $12, nRst
dc.b nBb2, $03, nRst, nD3, nRst, nF3, nRst, nA3, nRst, $09, nG3, $03
dc.b nRst, nA3, nRst, $09, nG3, $03, nRst, nA3, nRst, nG3, $0C
smpsSetvoice $0B
smpsAlterNote $FC
smpsModSet $0F, $01, $06, $05
smpsPan panRight, $00
dc.b nEb3, $03, nRst, nF3, $06, nG3, $0C
smpsSetvoice $0D
smpsAlterNote $FC
smpsModSet $0F, $01, $06, $05
smpsPan panRight, $00
dc.b nC3, $03, nRst, nEb3, nRst, nG3, nRst, nBb3, nRst, $09, nA3, $03
dc.b nRst, nBb3, nRst, $09, nA3, $03, nRst, nBb3, nRst, nA3, $12, nRst
smpsSetvoice $0F
smpsAlterNote $FC
smpsModSet $0F, $01, $06, $05
dc.b nG4, $06, nF4, nD4, nBb3, nG3, nF3, nD3, $0C
smpsSetvoice $12
smpsAlterNote $FD
smpsModSet $03, $01, $04, $05
smpsPan panCenter, $00
dc.b nBb2, $08, nRst, $04, nBb2, $06, nBb2, $08, nA2, nBb2
smpsJump Snd_Menu_Jump02
; Unreachable
smpsStop
; FM4 Data
Snd_Menu_FM4:
dc.b nRst, $2A
smpsSetvoice $0B
smpsAlterNote $04
smpsModSet $0F, $01, $FA, $05
smpsPan panLeft, $00
Snd_Menu_Jump01:
dc.b nEb3, $06, nRst, nBb3, nG3, nRst, nD4, nRst, nEb3, nRst, nA3, nRst
dc.b nG3, nRst, nD4, nEb3, nRst, nD3, nRst, nA3, nF3, nRst, nC4, nRst
dc.b nD3, nRst, nA3, nRst, nG3, nRst, nD4, nD3, nRst, nEb3, nRst, nBb3
dc.b nG3, nRst, nD4, nRst, nEb3, nRst, nA3, nRst, nG3, nRst, nD4, nEb3
dc.b nRst, nD3, nRst, $0C, nEb3, $06, nRst, $0C, nF3, $06, nRst, $0C
smpsSetvoice $10
smpsFMAlterVol $06
dc.b nG4, $06, nG5, nG4, nRst, $18
smpsFMAlterVol $FA
smpsSetvoice $0B
smpsAlterNote $04
smpsModSet $0F, $01, $FA, $05
smpsPan panLeft, $00
dc.b nEb3, $06, nRst, nBb3, nG3, nRst, nD4, nRst, nEb3, nRst, nA3, nRst
dc.b nG3, nRst, nD4, nEb3, nRst, nD3, nRst, nA3, nF3, nRst, nC4, nRst
dc.b nD3, nRst, nA3, nRst, nG3, nRst, nD4, nD3, nRst, nEb3, nRst, nBb3
dc.b nG3, nRst, nD4, nRst, nEb3, nRst, nA3, nRst, nG3, nRst, nD4, nEb3
dc.b nRst, nF3, nF3, nF3, nRst, $0C, nF3, $06, nF3, nF3, nRst, $3C
smpsSetvoice $08
smpsAlterNote $03
smpsModSet $03, $01, $FD, $05
smpsPan panLeft, $00
dc.b nEb3, $03, nRst, $0F, nEb3, $03, nRst, $0F, nD3, $0C, nRst, $06
dc.b nD3, $03, nRst, $0F, nD3, $0C, nRst, nD3, $03, nRst, $0F, nD3
dc.b $03, nRst, $0F, nC3, $0C, nRst, $06, nD3, $0C, nRst, $06, nEb3
dc.b $0C, nRst, nEb3, $03, nRst, $0F, nEb3, $03, nRst, $0F, nD3, $0C
dc.b nRst, $06, nD3, $03, nRst, $0F, nD3, $0C, nRst, $06, nG3, $03
dc.b nRst, nAb3, nRst, nBb3, nRst, nEb4, nRst, nD4, nRst, nBb3, nRst, nG3
dc.b $12, nRst, $30
smpsSetvoice $08
smpsAlterNote $03
smpsModSet $03, $01, $FD, $05
smpsPan panLeft, $00
dc.b nF3, $03, nRst, $0F, nF3, $03, nRst, $0F, nE3, $0C, nRst, $06
dc.b nE3, $03, nRst, $0F, nE3, $0C, nRst, nE3, $03, nRst, $0F, nE3
dc.b $03, nRst, $0F, nD3, $0C, nRst, $06, nE3, $0C, nRst, $06, nF3
dc.b $0C, nRst, nF3, $03, nRst, $0F, nF3, $03, nRst, $0F, nE3, $0C
dc.b nRst, $06, nE3, $03, nRst, $0F, nE3, $0C, nF3, nRst, $06, nF3
dc.b $0C, nRst, $06, nF3, nRst, $36
smpsSetvoice $0B
smpsAlterNote $04
smpsModSet $0F, $01, $FA, $05
smpsPan panLeft, $00
dc.b nEb3, $06, nRst, nBb3, nG3, nRst, nD4, nRst, nEb3, nRst, nA3, nRst
dc.b nG3, nRst, nD4, nEb3, nRst, nD3, nRst, nA3, nF3, nRst, nC4, nRst
dc.b nD3, nRst, nA3, nRst, nG3, nRst, nD4, nD3, nRst, nEb3, nRst, nBb3
dc.b nG3, nRst, nD4, nRst, nEb3, nRst, nA3, nRst, nG3, nRst, nD4, nEb3
dc.b nRst, nF3, nF3, nF3, nRst, $0C, nF3, $06, nF3, nF3, nRst, $36
smpsSetvoice $08
smpsAlterNote $03
smpsModSet $03, $01, $FD, $05
smpsPan panLeft, $00
dc.b nEb3, $03, nRst, nG3, nRst, nBb3, nRst, nD4, nRst, $09, nC4, $03
dc.b nRst, nD4, nRst, $09, nC4, $03, nRst, nD4, nRst, nC4, $12, nRst
dc.b nD3, $03, nRst, nF3, nRst, nA3, nRst, nC4, nRst, $09, nBb3, $03
dc.b nRst, nC4, nRst, $09, nBb3, $03, nRst, nC4, nRst, nBb3, $0C
smpsSetvoice $0B
smpsAlterNote $04
smpsModSet $0F, $01, $FA, $05
smpsPan panLeft, $00
dc.b nG3, $03, nRst, nA3, nRst, nBb3, nRst, $09
smpsSetvoice $08
smpsAlterNote $03
smpsModSet $03, $01, $FD, $05
smpsPan panLeft, $00
dc.b nEb3, $03, nRst, nG3, nRst, nBb3, nRst, nD4, nRst, $09, nC4, $03
dc.b nRst, nD4, nRst, $09, nC4, $03, nRst, nD4, nRst, nC4, $12, nRst
dc.b $0C
smpsSetvoice $0B
smpsAlterNote $04
smpsModSet $0F, $01, $FA, $05
smpsPan panLeft, $00
dc.b nD3, $06, nRst, $0C, nEb3, $06, nRst, $0C, nF3, $06, nRst, $3C
smpsSetvoice $08
smpsAlterNote $03
smpsModSet $03, $01, $FD, $05
smpsPan panLeft, $00
dc.b nEb3, $03, nRst, nG3, nRst, nBb3, nRst, nD4, nRst, $09, nC4, $03
dc.b nRst, nD4, nRst, $09, nC4, $03, nRst, nD4, nRst, nC4, $12, nRst
dc.b nD3, $03, nRst, nF3, nRst, nA3, nRst, nC4, nRst, $09, nBb3, $03
dc.b nRst, nC4, nRst, $09, nBb3, $03, nRst, nC4, nRst, nBb3, $0C
smpsSetvoice $0B
smpsAlterNote $04
smpsModSet $0F, $01, $FA, $05
smpsPan panLeft, $00
dc.b nG3, $03, nRst, nA3, nRst, nBb3, nRst, $09
smpsSetvoice $08
smpsAlterNote $03
smpsModSet $03, $01, $FD, $05
smpsPan panLeft, $00
dc.b nEb3, $03, nRst, nG3, nRst, nBb3, nRst, nD4, nRst, $09, nC4, $03
dc.b nRst, nD4, nRst, $09, nC4, $03, nRst, nD4, nRst, nC4, $12, nRst
dc.b $0C
smpsSetvoice $0B
smpsAlterNote $04
smpsModSet $0F, $01, $FA, $05
smpsPan panLeft, $00
dc.b nD3, $06, nRst, $0C, nEb3, $06, nRst, $0C, nF3, $06, nRst, $36
smpsJump Snd_Menu_Jump01
; Unreachable
smpsStop
; FM5 Data
Snd_Menu_FM5:
dc.b nRst, $2A
Snd_Menu_Jump00:
smpsSetvoice $0B
smpsAlterNote $FC
smpsModSet $0F, $01, $06, $05
smpsPan panRight, $00
dc.b nEb2, $06, nRst, nBb2, nG2, nRst, nD3, nRst, nEb2, nRst, nA2, nRst
dc.b nG2, nRst, nD3, nEb2, nRst, nD2, nRst, nA2, nF2, nRst, nC3, nRst
dc.b nD2, nRst, nA2, nRst, nG2, nRst, nD3, nD2, nRst, nEb2, nRst, nBb2
dc.b nG2, nRst, nD3, nRst, nEb2, nRst, nA2, nRst, nG2, nRst, nD3, nEb2
dc.b nRst, nBb2, nRst, $0C, nC3, $06, nRst, $0C, nD3, $06, nRst, $0C
smpsSetvoice $10
smpsFMAlterVol $08
dc.b nG4, $06, nG5, nG4, nRst, $18
smpsFMAlterVol $FA
smpsSetvoice $0B
smpsAlterNote $FC
smpsModSet $0F, $01, $06, $05
smpsPan panRight, $00
dc.b nEb2, $06, nRst, nBb2, nG2, nRst, nD3, nRst, nEb2, nRst, nA2, nRst
dc.b nG2, nRst, nD3, nEb2, nRst, nD2, nRst, nA2, nF2, nRst, nC3, nRst
dc.b nD2, nRst, nA2, nRst, nG2, nRst, nD3, nD2, nRst, nEb2, nRst, nBb2
dc.b nG2, nRst, nD3, nRst, nEb2, nRst, nA2, nRst, nG2, nRst, nD3, nEb2
dc.b nRst, nD3, nD3, nD3, nRst, $0C, nD3, $06, nD3, nD3, nRst, $3C
smpsSetvoice $08
smpsAlterNote $FD
smpsModSet $03, $01, $03, $05
smpsPan panRight, $00
dc.b nAb2, $03, nRst, $0F, nAb2, $03, nRst, $0F, nAb2, $0C, nRst, $06
dc.b nAb2, $03, nRst, $0F, nAb2, $0C, nRst, nG2, $03, nRst, $0F, nG2
dc.b $03, nRst, $0F, nG2, $0C, nRst, $06, nF2, $0C, nRst, $06, nG2
dc.b $0C, nRst, nAb2, $03, nRst, $0F, nAb2, $03, nRst, $0F, nAb2, $0C
dc.b nRst, $06, nAb2, $03, nRst, $0F, nAb2, $0C, nRst, $06, nBb2, $03
dc.b nRst, nC3, nRst, nD3, nRst, nG3, nRst, nF3, nRst, nD3, nRst, nBb2
dc.b $12, nRst, $30
smpsSetvoice $08
smpsAlterNote $FD
smpsModSet $03, $01, $03, $05
smpsPan panRight, $00
dc.b nBb2, $03, nRst, $0F, nBb2, $03, nRst, $0F, nBb2, $0C, nRst, $06
dc.b nBb2, $03, nRst, $0F, nBb2, $0C, nRst, nA2, $03, nRst, $0F, nA2
dc.b $03, nRst, $0F, nA2, $0C, nRst, $06, nG2, $0C, nRst, $06, nA2
dc.b $0C, nRst, nBb2, $03, nRst, $0F, nBb2, $03, nRst, $0F, nBb2, $0C
dc.b nRst, $06, nBb2, $03, nRst, $0F, nBb2, $0C, nA2, nRst, $06, nA2
dc.b $0C, nRst, $06, nA2, nRst, $36
smpsSetvoice $0B
smpsAlterNote $FC
smpsModSet $0F, $01, $06, $05
smpsPan panRight, $00
dc.b nEb2, $06, nRst, nBb2, nG2, nRst, nD3, nRst, nEb2, nRst, nA2, nRst
dc.b nG2, nRst, nD3, nEb2, nRst, nD2, nRst, nA2, nF2, nRst, nC3, nRst
dc.b nD2, nRst, nA2, nRst, nG2, nRst, nD3, nD2, nRst, nEb2, nRst, nBb2
dc.b nG2, nRst, nD3, nRst, nEb2, nRst, nA2, nRst, nG2, nRst, nD3, nEb2
dc.b nRst, nD3, nD3, nD3, nRst, $0C, nD3, $06, nD3, nD3, nRst, $36
smpsSetvoice $08
smpsAlterNote $FD
smpsModSet $03, $01, $03, $05
smpsPan panRight, $00
dc.b nC3, $03, nRst, nEb3, nRst, nG3, nRst, nBb3, nRst, $09, nA3, $03
dc.b nRst, nBb3, nRst, $09, nA3, $03, nRst, nBb3, nRst, nA3, $12, nRst
dc.b nBb2, $03, nRst, nD3, nRst, nF3, nRst, nA3, nRst, $09, nG3, $03
dc.b nRst, nA3, nRst, $09, nG3, $03, nRst, nA3, nRst, nG3, $0C
smpsSetvoice $0B
smpsAlterNote $FC
smpsModSet $0F, $01, $06, $05
smpsPan panRight, $00
dc.b nEb3, $03, nRst, nF3, nRst, nG3, nRst, $09
smpsSetvoice $08
smpsAlterNote $FD
smpsModSet $03, $01, $03, $05
smpsPan panRight, $00
dc.b nC3, $03, nRst, nEb3, nRst, nG3, nRst, nBb3, nRst, $09, nA3, $03
dc.b nRst, nBb3, nRst, $09, nA3, $03, nRst, nBb3, nRst, nA3, $12, nRst
dc.b $0C
smpsSetvoice $0B
smpsAlterNote $FC
smpsModSet $0F, $01, $06, $05
smpsPan panRight, $00
dc.b nBb2, $06, nRst, $0C, nC3, $06, nRst, $0C, nD3, $06, nRst, $3C
smpsSetvoice $08
smpsAlterNote $FD
smpsModSet $03, $01, $03, $05
smpsPan panRight, $00
dc.b nC3, $03, nRst, nEb3, nRst, nG3, nRst, nBb3, nRst, $09, nA3, $03
dc.b nRst, nBb3, nRst, $09, nA3, $03, nRst, nBb3, nRst, nA3, $12, nRst
dc.b nBb2, $03, nRst, nD3, nRst, nF3, nRst, nA3, nRst, $09, nG3, $03
dc.b nRst, nA3, nRst, $09, nG3, $03, nRst, nA3, nRst, nG3, $0C
smpsSetvoice $0B
smpsAlterNote $FC
smpsModSet $0F, $01, $06, $05
smpsPan panRight, $00
dc.b nEb3, $03, nRst, nF3, nRst, nG3, nRst, $09
smpsSetvoice $08
smpsAlterNote $FD
smpsModSet $03, $01, $03, $05
smpsPan panRight, $00
dc.b nC3, $03, nRst, nEb3, nRst, nG3, nRst, nBb3, nRst, $09, nA3, $03
dc.b nRst, nBb3, nRst, $09, nA3, $03, nRst, nBb3, nRst, nA3, $12, nRst
dc.b $0C
smpsSetvoice $0B
smpsAlterNote $FC
smpsModSet $0F, $01, $06, $05
smpsPan panRight, $00
dc.b nBb2, $06, nRst, $0C, nC3, $06, nRst, $0C, nD3, $06, nRst, $36
smpsJump Snd_Menu_Jump00
; Unreachable
smpsStop
; PSG1 Data
Snd_Menu_PSG1:
smpsPSGvoice sTone_04
smpsAlterNote $00
dc.b nRst, $2A
Snd_Menu_Jump07:
smpsPSGvoice sTone_04
smpsCall Snd_Menu_Call03
dc.b nD3, nRst, $0C, nEb3, $06, nRst, $0C, nF3, $06, nRst, $0C, nG4
dc.b $06, nG5, nG4, nRst, $18
smpsCall Snd_Menu_Call03
dc.b nF3, nF3, nF3, nRst, $0C, nF3, $06, nF3, nF3, nRst, $3C, nEb3
dc.b $03, nRst, $0F, nEb3, $03, nRst, $0F, nD3, $0C, nRst, $06, nD3
dc.b $03, nRst, $0F, nD3, $0C, nRst, nD3, $03, nRst, $0F, nD3, $03
dc.b nRst, $0F, nC3, $0C, nRst, $06, nD3, $0C, nRst, $06, nEb3, $0C
dc.b nRst, nEb3, $03, nRst, $0F, nEb3, $03, nRst, $0F, nD3, $0C, nRst
dc.b $06, nD3, $03, nRst, $0F, nD3, $0C, nRst, $06, nG3, $03, nRst
dc.b nAb3, nRst, nBb3, nRst, nEb4, nRst, nD4, nRst, nBb3, nRst, nG3, $12
dc.b nRst, $30, nF3, $03, nRst, $0F, nF3, $03, nRst, $0F, nE3, $0C
dc.b nRst, $06, nE3, $03, nRst, $0F, nE3, $0C, nRst, nE3, $03, nRst
dc.b $0F, nE3, $03, nRst, $0F, nD3, $0C, nRst, $06, nE3, $0C, nRst
dc.b $06, nF3, $0C, nRst, nF3, $03, nRst, $0F, nF3, $03, nRst, $0F
dc.b nE3, $0C, nRst, $06, nE3, $03, nRst, $0F, nE3, $0C, nF3, nRst
dc.b $06, nF3, $0C, nRst, $06, nF3, nRst, $36
smpsCall Snd_Menu_Call03
smpsCall Snd_Menu_Call04
dc.b nF4, $02, nRst, $04, nF5, $06, nF4, $02, nRst, $0A, nF4, $06
dc.b nF5, $06, nF4, $02, nRst, $0A, nF4, $06, nF5, $06, nF4, $02
dc.b nRst, $0A
smpsCall Snd_Menu_Call05
smpsJump Snd_Menu_Jump07
Snd_Menu_Call03:
dc.b nEb3, $06, nRst, nBb3, nG3, nRst, nD4, nRst, nEb3, nRst, nA3, nRst
dc.b nG3, nRst, nD4, nEb3, nRst, nD3, nRst, nA3, nF3, nRst, nC4, nRst
dc.b nD3, nRst, nA3, nRst, nG3, nRst, nD4, nD3, nRst, nEb3, nRst, nBb3
dc.b nG3, nRst, nD4, nRst, nEb3, nRst, nA3, nRst, nG3, nRst, nD4, nEb3
dc.b nRst
smpsReturn
Snd_Menu_Call04:
dc.b nF3, $06, nF3, nF3, nRst, $0C, nF3, $06, nF3, nF3, nRst, $36
smpsReturn
Snd_Menu_Call05:
dc.b nF4, $06, nF5, nF4, $0C, nF4, $06, nF5, nF4, $0C, nF4, $06
dc.b nF5, nF4, $0C, nF4, $06, nF5, nF4, $0C, nF4, $06, nF5, nF4
dc.b $0C, nF4, $06, nF5, nF4, $0C, nF4, $06, nF5, nF4, $0C, nF4
dc.b $06, nF5, nF4, $0C, nF4, $06, nF5, nF4, $0C, nF4, $06, nF5
dc.b nF4, $0C, nF4, $06, nF5, nF4, $0C, nF4, $06, nF5, nF4, $0C
dc.b nF4, $06, nF5, nF4, $0C, nF4, $06, nF5, nF4, $0C, nF4, $06
dc.b nF5, nF4, $0C, nF4, $06, nF5, nF4, $0C, nF4, $06, nF5, nF4
dc.b $0C, nF4, $06, nF5, nF4, $0C, nF4, $06, nF5, nF4, $0C, nF4
dc.b $06, nF5, nF4, $0C, nF4, $06, nF5, nF4, $0C, nF4, $06, nF5
dc.b nF4, $0C, nF4, $06, nF5, nF4, $0C, nF4, $06, nF5, nF4, $0C
dc.b nF4, $06, nF5, nF4, $0C, nF4, $06, nF5, nF4, $0C, nF4, $06
dc.b nF5, nF4, $36
smpsReturn
; Unreachable
smpsStop
; PSG2 Data
Snd_Menu_PSG2:
smpsPSGvoice sTone_04
smpsAlterNote $FF
dc.b nRst, $2A
Snd_Menu_Jump06:
smpsPSGvoice sTone_04
smpsCall Snd_Menu_Call03
dc.b nBb3, nRst, $0C, nC4, $06, nRst, $0C, nD4, $06, nRst, $0C, nG5
dc.b $06, nG6, nG5, nRst, $18
smpsCall Snd_Menu_Call03
dc.b nD4, nD4, nD4, nRst, $0C, nD4, $06, nD4, nD4, nRst, $3C, nAb2
dc.b $03, nRst, $0F, nAb2, $03, nRst, $0F, nAb2, $0C, nRst, $06, nAb2
dc.b $03, nRst, $0F, nAb2, $0C, nRst, nG2, $03, nRst, $0F, nG2, $03
dc.b nRst, $0F, nG2, $0C, nRst, $06, nF2, $0C, nRst, $06, nG2, $0C
dc.b nRst, nAb2, $03, nRst, $0F, nAb2, $03, nRst, $0F, nAb2, $0C, nRst
dc.b $06, nAb2, $03, nRst, $0F, nAb2, $0C, nRst, $06, nBb2, $03, nRst
dc.b nC3, nRst, nD3, nRst, nG3, nRst, nF3, nRst, nD3, nRst, nBb2, $12
dc.b nRst, $30, nBb2, $03, nRst, $0F, nBb2, $03, nRst, $0F, nBb2, $0C
dc.b nRst, $06, nBb2, $03, nRst, $0F, nBb2, $0C, nRst, nA2, $03, nRst
dc.b $0F, nA2, $03, nRst, $0F, nA2, $0C, nRst, $06, nG2, $0C, nRst
dc.b $06, nA2, $0C, nRst, nBb2, $03, nRst, $0F, nBb2, $03, nRst, $0F
dc.b nBb2, $0C, nRst, $06, nBb2, $03, nRst, $0F, nBb2, $0C, nA2, nRst
dc.b $06, nA2, $0C, nRst, $06, nA2, nRst, $36
smpsCall Snd_Menu_Call03
smpsCall Snd_Menu_Call04
dc.b nF4, $06, nF5, nF4, $0C, nF4, $06, nF5, nF4, $0C, nF4, $06
dc.b nF5, nF4, $0C
smpsCall Snd_Menu_Call05
smpsJump Snd_Menu_Jump06
; Unreachable
smpsStop
; PSG3 Data
Snd_Menu_PSG3:
smpsPSGvoice sTone_02
smpsPSGform $E7
dc.b nRst, $2A
Snd_Menu_Jump05:
smpsCall Snd_Menu_Call01
smpsCall Snd_Menu_Call01
smpsCall Snd_Menu_Call01
smpsFMAlterVol $FD, $D3
dc.b $06
smpsFMAlterVol $03, $D3
dc.b $03, nMaxPSG1, nMaxPSG1, $06, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, $0C
smpsFMAlterVol $FD, $D3
dc.b $0C, nMaxPSG1, $06, nMaxPSG1, $08, nMaxPSG1, nMaxPSG1, $02
smpsFMAlterVol $03, $80
dc.b $06
smpsCall Snd_Menu_Call01
smpsCall Snd_Menu_Call01
smpsFMAlterVol $FD, $D3
dc.b $06
smpsFMAlterVol $03, $D3
dc.b $03, nMaxPSG1
Snd_Menu_Loop06:
dc.b nMaxPSG1, $06
smpsLoop $00, $0D, Snd_Menu_Loop06
dc.b nMaxPSG1, $32, nMaxPSG1, $34
smpsCall Snd_Menu_Call02
smpsCall Snd_Menu_Call02
smpsCall Snd_Menu_Call02
smpsCall Snd_Menu_Call02
smpsCall Snd_Menu_Call02
smpsCall Snd_Menu_Call02
smpsCall Snd_Menu_Call02
dc.b nMaxPSG1, $06, nMaxPSG1, $03, nMaxPSG1, nMaxPSG1, $06, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1
dc.b $36
smpsCall Snd_Menu_Call01
smpsCall Snd_Menu_Call01
smpsFMAlterVol $FD, $D3
dc.b $06
smpsFMAlterVol $03, $D3
dc.b $03, nMaxPSG1
Snd_Menu_Loop07:
dc.b nMaxPSG1, $06
smpsLoop $00, $0D, Snd_Menu_Loop07
dc.b nMaxPSG1, $32, nMaxPSG1, $34, nMaxPSG1, $06, nMaxPSG1, $03, nMaxPSG1, nMaxPSG1, $06
smpsFMAlterVol $FD, $D3
smpsFMAlterVol $03, $D3
dc.b nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1
Snd_Menu_Loop08:
dc.b nMaxPSG1, $06, nMaxPSG1, $03, nMaxPSG1, nMaxPSG1, $06
smpsFMAlterVol $FD, $D3
smpsFMAlterVol $03, $D3
dc.b nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1
smpsLoop $00, $06, Snd_Menu_Loop08
dc.b nMaxPSG1, $06, nMaxPSG1, $03, nMaxPSG1, nMaxPSG1, $06
smpsFMAlterVol $FD, $D3
smpsFMAlterVol $03, $D3
dc.b nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1
dc.b nMaxPSG1, $03, nMaxPSG1, nMaxPSG1, $06
smpsFMAlterVol $FD, $D3
smpsFMAlterVol $03, $D3
dc.b nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1, nMaxPSG1
dc.b nMaxPSG1, $03, nMaxPSG1, nMaxPSG1, $06
smpsFMAlterVol $FD, $D3
dc.b nMaxPSG1
smpsJump Snd_Menu_Jump05
Snd_Menu_Call01:
smpsFMAlterVol $FD, $D3
dc.b $06
smpsFMAlterVol $03, $D3
dc.b $03, nMaxPSG1
Snd_Menu_Loop0A:
dc.b nMaxPSG1, $06
smpsLoop $01, $0E, Snd_Menu_Loop0A
smpsReturn
Snd_Menu_Call02:
dc.b nMaxPSG1, $06, nMaxPSG1, $03, nMaxPSG1
Snd_Menu_Loop09:
dc.b nMaxPSG1, $06
smpsLoop $01, $0E, Snd_Menu_Loop09
smpsReturn
; Unreachable
smpsStop
|
rts/gcc-9/adainclude/s-intimg.ads
|
letsbyteit/build-avr-ada-toolchain
| 7 |
6582
|
------------------------------------------------------------------------------
-- --
-- S Y S T E M . I N T _ I M G --
-- --
-- S p e c --
-- --
-- Copyright (C) 2013, <NAME> --
-- --
-- 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/>. --
-- --
------------------------------------------------------------------------------
with Interfaces;
package System.Int_Img is
pragma Pure;
-- The function U32_Img converts an unsigned value into a text
-- representation.
--
-- Value ist the value to be converted.
--
-- Buf points to a string buffer. The actual strings starts at
-- Buf+1, leaving space for a sign.
--
-- Radix is the number base in the range of 2 .. 36.
--
-- The return value is length+1 of the generated string
type Radix_Range is range 2 .. 36;
for Radix_Range'Size use 8;
function U32_Img (Value : Interfaces.Unsigned_32; -- value to be converted
Buf : not null access Character; -- to buffer
Radix : Radix_Range := 10) -- range 2 .. 36
return Interfaces.Unsigned_8; -- (length+1) of the string
pragma Import (C, U32_Img, "ada_u32_img");
pragma Pure_Function (U32_Img);
end System.Int_Img;
|
Kernel/asm/keyboard.asm
|
MarinaFuster/os-core
| 0 |
176824
|
<filename>Kernel/asm/keyboard.asm<gh_stars>0
GLOBAL getPressedKey
section .text
;------------------------------------------------------------
; Funcion que toma del puerto 60h la tecla presionada al
; registro al para que sea recibido por el driver de teclado
; como char
;------------------------------------------------------------
getPressedKey:
mov qword rax,0
in al, 60h
ret
|
libsrc/balloc/ba_AddMem.asm
|
meesokim/z88dk
| 0 |
102018
|
; CALLER linkage for function pointers
PUBLIC ba_AddMem
EXTERN BAAddMem
.ba_AddMem
ld hl,8
add hl,sp
ld c,(hl)
dec hl
dec hl
ld b,(hl)
dec hl
ld d,(hl)
dec hl
ld e,(hl)
dec hl
ld a,(hl)
dec hl
ld l,(hl)
ld h,a
jp BAAddMem
|
Library/Text/TextLine/tlHyphenation.asm
|
steakknife/pcgeos
| 504 |
80518
|
<reponame>steakknife/pcgeos<filename>Library/Text/TextLine/tlHyphenation.asm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE: tlHyphenation.asm
AUTHOR: <NAME>, Sep 24, 1992
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
John 9/24/92 Initial revision
DESCRIPTION:
Code to do auto-hyphenation of words.
$Id: tlHyphenation.asm,v 1.1 97/04/07 11:21:10 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
TextObscure segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
HyphenateWord
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Hyphenate a word.
CALLED BY: CalculateHyphenCallback
PASS: *ds:si = Instance
dx.ax = Word start
cx.di = Position where the word overflows the line.
We need to break *before* this offset
bx = VTPA_hyphenationInfo
RETURN: carry set if hyphenation is not possible
carry clear otherwise
ax = Offset into the word where we want to break
di.cl = Position in word where the hyphen character
starts (WBFixed). This is an offset from
the left edge of the word.
dx.ch = Width of the hyphen character in whatever
style the text is immediately before the
hyphen.
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 9/24/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MAX_CHARS_FOR_HYPHENATION equ 32
BUFFER_SIZE_FOR_HYPHENATION equ 33
HyphenateWord proc far
uses bp
wordBreak local dword push cx, di
;
; The offset into the text before which the word must be broken.
;
SBCS <wordData local BUFFER_SIZE_FOR_HYPHENATION dup (char) >
DBCS <wordData local BUFFER_SIZE_FOR_HYPHENATION dup (wchar) >
;
; Contains the text of the word, null terminated
;
textRange local VisTextRange
;
; Used by CopyWordIntoStackBuffer to hold the range of text which
; the word occupies.
;
textRef local TextReference
;
; A TextReference which is required by the code which extracts
; the word from the text-stream.
;
.enter
ForceRef textRef
;-----------------------------------------------------------------------------
;
; We copy the word (up to the some reasonable number of characters)
; into a buffer on the stack.
;
call CopyWordIntoStackBuffer ; wordData <- text (w/ NULL)
; ax <- size (w/o NULL)
;-----------------------------------------------------------------------------
;
; We need to compute the position of the break offset as an offset
; into the word. If this offset is larger than the number of bytes
; we copied into our buffer, then we want to knock it down so that
; it falls at some position in the buffer.
;
movdw dxcx, wordBreak ; dx.cx <- break offset
subdw dxcx, textRange.VTR_start ; dx.cx <- offset into word
;
; The offset into the word should never be more than 64K...
;
EC < tst dx >
EC < ERROR_NZ OFFSET_INTO_WORD_IS_GREATER_THAN_64K >
cmp cx, ax ; Check for beyond buffer end
jbe breakOffsetOK
mov cx, ax ; cx <- legal offset
breakOffsetOK:
;-----------------------------------------------------------------------------
;
; Now that the word is in the buffer, we call the hyphenation code
; passing it a pointer to the word, the minimum prefix size, the
; minimum suffix size, the minimum word size, and the place we want
; to break before. It returns us the offset at which to break the word.
;
lea ax, wordData ; ss:ax <- ptr to buffer
pushdw ssax ; Pass ptr to buffer
; bx = VTPA_hyphenationInfo. From this word of data, extract the
; min prefix, min suffix, and min word sizes (size 4 bits each)
; and increment them since the actual range is 1-16 not 0-15.
push cx
clr ax
mov al, bl ; ax = 0,0,prefix,suffix
mov cl, 4 ; cx = amount to shift ax
shr ax, cl ; ax = prefix - 1
inc ax ; ax = prefix
pop cx
push ax ; push min prefix size
push cx
clr ax
mov al, bl ; ax = 0,0,prefix,suffix
mov cx, 000Fh ; cx = bitmask
and ax, cx ; ax = suffix -1
inc ax ; ax = suffix
pop cx
push ax ; push min suffix size
push cx
clr ax
mov al, bh ; ax = 0,0,maxlines,minword
mov cx, 000Fh ; cx = bitmask
and ax, cx ; ax = minword -1
inc ax ; ax = minword size
pop cx
push ax ; push min word size
push cx ; Pass max break position
call ChooseHyphenationPosition ; ax <- break pos
tst ax ; Check for no break possible
jz noHyphenation ; Branch if none possible
;-----------------------------------------------------------------------------
;
; ax = The offset into the word where we want to do the hyphenation.
;
; We need to compute the width of the word at that position and
; the width of the hyphen given that style. To do this, I compute
; the range between where the word starts and where the break
; occurs.
;
;
; What follows is a strange way of adding the dword textRange.VTR_start
; to a word (ax).
;
; The idea is that there is this "assumed" high-word of zero associated
; with ax and since I want the result in dx.ax, the operations are:
; add ax, VTR_start.low
; adc <mystery>, VTR_start.high
; mov dx, <mystery>
;
; This can reordered as I do below so no scratch register is needed
;
doRange::
push ax ; Save break position
add ax, textRange.VTR_start.low ; dx.ax <- end of range
mov dx, textRange.VTR_start.high
adc dx, 0
movdw textRange.VTR_end, dxax ; Save end of range.
;
; Compute the distance to the hyphen in the word
;
push bp
lea bp, textRange ; ss:bp -> VisTextRange
call ComputeRangeWidthAndHyphenWidth ; di.cl <- position of hyphen
; dx.ch <- width of hyphen
pop bp
pop ax ; Restore break position
;
; ax = Break position
; di.cl = Position of hyphen
; dx.ch = Width of hyphen
;
clc ; Signal: hyphenation possible
quit:
;
; Carry set if hyphenation is not possible.
;
.leave
ret
noHyphenation:
stc ; Signal: no hyphenation possible
jmp quit
HyphenateWord endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CopyWordIntoStackBuffer
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Copy the word (up to MAX_CHARS_FOR_HYPHENATION) into a buffer
on the stack.
CALLED BY: HyphenateWord
PASS: ss:bp = Inheritable stack frame
dx.ax = Offset to start of word
RETURN: wordData= The bytes of the word, null terminated
ax = Number of characters copied (not counting NULL)
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
Side Effects:
textRange - Set to range of word in text
textRef - Set to a TextReference to the wordData buffer
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 9/24/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CopyWordIntoStackBuffer proc near
uses bx, cx, dx, di
.enter inherit HyphenateWord
;
; Initialize the stack frame
;
movdw textRange.VTR_start, dxax
;
; We try to get MAX_CHARS_FOR_HYPHENATION into the buffer, but
; if there aren't that many in the object, we need to limit ourselves.
;
movdw cxbx, dxax ; cx.bx <- word start
adddw cxbx, MAX_CHARS_FOR_HYPHENATION ; cx.bx <- end pos for get
call TS_GetTextSize ; dx.ax <- size of text
cmpdw cxbx, dxax ; Can't go past the end
jbe gotEndOffset
movdw cxbx, dxax
gotEndOffset:
movdw textRange.VTR_end, cxbx ; Finally, set the end
;
; Now that we have the range, we need to set up the reference.
;
mov textRef.TR_type, TRT_POINTER
lea ax, wordData ; ss:ax <- ptr to buffer
movdw textRef.TR_ref.TRU_pointer.TRP_pointer, ssax
;
; Copy the text into the buffer, no null terminator
;
push bp
lea bx, textRange
lea bp, textRef
call TS_GetTextRange ; dx.ax <- number copied
pop bp
;
; Null terminate the buffer
;
mov di, ax ; di <- offset to end
DBCS < shl di, 1 ; char offset -> byte offset>
SBCS < mov {byte} wordData[di], 0 ; Poof, null terminated>
DBCS < mov {wchar} wordData[di], 0 ; Poof, null terminated>
.leave
ret
CopyWordIntoStackBuffer endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ComputeRangeWidthAndHyphenWidth
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Compute the width of a range of text and the width of a
hyphen character which is in the style of the last
character in that range.
CALLED BY: HyphenateWord
PASS: *ds:si = Instance
ss:bp = VisTextRange
RETURN: di.cl = Position of hyphen as offset from start of word
dx.ch = Width of hyphen in style of last char in range
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 9/24/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ComputeRangeWidthAndHyphenWidth proc near
class VisTextClass
uses ax, bx
.enter
; see CheckSoftHyphen for clues
; see also CommonFieldTextPosition
; push parameters to CommonFieldTextPosition
movdw cxdx, ss:[bp].VTR_start ; offset to the start of range
pushdw cxdx
movdw axbx, ss:[bp].VTR_end ; offset to end of the range
subdw axbx, cxdx ; end - start = number of chars
pushdw axbx ; this is the constraint that
; will be used, so pixel offset
; is what will be found.
mov ax, 0x7fff ; pixel offset = big number
push ax ;
clrdw axbx ; space padding (none)
pushdw axbx
call CommonFieldTextPosition ; ax = text offset
; cx = pixel offset into field
mov di, cx
clr cl ; (0 fraction)
; get hyphen width
;
; note that for now we're just using GrCharWidth, which doesn't
; account for kerning, or other attributes.
;
push di
mov di, ds:[si]
add di, ds:[di].Vis_offset
mov di, ds:[di].VTI_gstate ; di = handle to gstate
mov ax, C_HYPHEN
call GrCharWidth ; dx.ah = width of hyphen
mov ch, ah ; dx.ch = width of hyphen
pop di
.leave
ret
ComputeRangeWidthAndHyphenWidth endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ChooseHyphenationPosition
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Choose a place to hyphenate a word.
CALLED BY: HyphenateWord
PASS: On stack:
wordPtr - Pointer to the text of the word.
Null terminated.
minPrefix - Minimum number of chars before any hyphen
minSuffix - Minimum number of chars after any hyphen
minLength - shortest word to hyphenate
maxBreakPos - The absolute last position at which a
break can occur.
RETURN: ax = Position to break at
0 if no break is possible
Cleans up the stack before returning (due to the "pascal"
nature of the geos-conventions, see below)
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
In C, this would be defined as:
word ChooseHyphenationPosition(char *word, int wordSize, int maxBreakPos);
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 9/24/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
;
; This macro defines the parameter ordering associated with pc/geos
; and whether or not routines which take arguments on the stack also
; clean them up before returning.
;
SetGeosConvention
ChooseHyphenationPosition proc far wordPtr:fptr.char,
minPrefix:word,
minSuffix:word,
minLength:word,
maxBreakPos:word
uses bp, bx, cx, dx, di, es, si
.enter
; don't bother hyphenating if params say it's impossible
clr cx
cmp minPrefix, cx
LONG jl noHyphen ; if neg prefix length, exit
cmp minSuffix, cx
LONG jl noHyphen ; if neg suffix length, exit
mov cx, maxBreakPos
cmp minPrefix, cx
jg noHyphen ; if prefix past maxbreakpos, exit
; get a list of hyphenation points for the word
mov ax, segment udata
mov es, ax
movdw bxax, es:[hyphenateWordEntryPoint]
tst bx ;If no hyphenation library loaded,
jz noHyphen ; exit
pushdw wordPtr
push minLength
call ProcCallFixedOrMovable ; ^hbx = byte array of hyphen points
; cx = length of word without null
tst ax
jz noHyphen ; if error, return no hyphenation
mov_tr bx, ax ;BX
; lock the array block
push bx ; save handle to array block
call MemLock ; ax = array seg
;
; Get the last hyphenation point before the maxBreakPos. If no
; such points exist, return 0
;
mov es, ax ; es:di -> array of hyp points
mov di, offset HP_array
clr dx ; dx = best hyp point found (or 0 if
; none)
mov bx, es:[HP_wordLen] ; bx = length of hyphenated word
sub bx, minSuffix ; bx = max break pos with suffix
cmp bx, 0
jle freeBlockNoHyphen ; if end word pos - suffix < 0, no hyp.
cmp bx, maxBreakPos
jg useMaxBreakPos ; use min (maxBreakPos,maxSuffixPos)
maxBreakSet:
mov cx, minPrefix
clr ax
getHypPosLoop:
mov al, es:[di] ; ax = next hyp point
tst ax ; if ax = 0, no more hyp points, use dx
jz getHypPosLoopEnd
cmp ax, bx ; if next hyp point past maxBreakPos
jg getHypPosLoopEnd ; then use dx
cmp ax, cx ; if next hyp point not past minPrefix
jl dontUsePoint ; then don't use this point
mov dx, ax ; else dx = better hyp point
dontUsePoint:
inc di ; es:di -> next hyp point
jmp getHypPosLoop
getHypPosLoopEnd:
mov ax, dx
;
; free the array block
;
pop bx
call MemFree
exit:
.leave
ret
useMaxBreakPos:
mov bx, maxBreakPos
jmp maxBreakSet
freeBlockNoHyphen:
pop bx
call MemFree
noHyphen:
clr ax
jmp exit
ChooseHyphenationPosition endp
TextObscure ends
TextControlInit segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
TEXTSETHYPHENATIONCALL
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY: GLOBAL
PASS: bx.ax - args to pass to ProcCallFixedOrMovable to call to
get hyphenation position
RETURN: nada
DESTROYED: nada
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
atw 11/20/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
global TEXTSETHYPHENATIONCALL:far
TEXTSETHYPHENATIONCALL proc far
.enter
C_GetOneDWordArg bx, ax, cx, dx
push ds
mov cx, segment idata
mov ds, cx
movdw ds:[hyphenateWordEntryPoint], bxax
pop ds
.leave
ret
TEXTSETHYPHENATIONCALL endp
;
; This macro restores the default parameter ordering style.
;
SetDefaultConvention
TextControlInit ends
|
libsrc/_DEVELOPMENT/stdlib/c/sdcc_iy/strtof.asm
|
meesokim/z88dk
| 0 |
88575
|
<gh_stars>0
; float strtof(const char *nptr, char **endptr)
SECTION code_stdlib
PUBLIC _strtof
EXTERN _strtod
defc _strtof = _strtod
|
Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_21829_894.asm
|
ljhsiun2/medusa
| 9 |
16512
|
<reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r13
push %r15
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x1ed39, %rsi
lea addresses_normal_ht+0x105dd, %rdi
nop
nop
nop
sub $11691, %r15
mov $51, %rcx
rep movsb
cmp $41342, %r10
lea addresses_normal_ht+0x1a271, %rbp
clflush (%rbp)
nop
nop
nop
xor %r13, %r13
movb (%rbp), %cl
nop
nop
nop
nop
nop
add $16169, %r10
lea addresses_normal_ht+0xc9b9, %r10
clflush (%r10)
nop
nop
nop
nop
nop
sub %r13, %r13
movups (%r10), %xmm1
vpextrq $0, %xmm1, %rcx
nop
nop
nop
nop
nop
sub %rcx, %rcx
lea addresses_A_ht+0x12379, %r13
nop
nop
nop
dec %rdi
mov (%r13), %rsi
inc %r15
lea addresses_UC_ht+0xf839, %r13
nop
nop
nop
nop
xor %rsi, %rsi
movb (%r13), %cl
nop
nop
nop
xor $37163, %r15
lea addresses_UC_ht+0x19239, %rdi
and $61351, %r13
mov $0x6162636465666768, %r15
movq %r15, %xmm4
and $0xffffffffffffffc0, %rdi
vmovaps %ymm4, (%rdi)
nop
nop
nop
nop
add %rsi, %rsi
lea addresses_D_ht+0xaeb6, %rsi
lea addresses_A_ht+0xe639, %rdi
nop
nop
nop
xor $29475, %r11
mov $36, %rcx
rep movsq
sub %r15, %r15
lea addresses_D_ht+0x1427d, %rsi
nop
nop
nop
xor %rdi, %rdi
movb $0x61, (%rsi)
nop
nop
nop
and $19014, %r15
lea addresses_WC_ht+0x136b9, %r11
nop
nop
nop
nop
nop
add %r15, %r15
mov (%r11), %si
nop
cmp %r11, %r11
lea addresses_D_ht+0x3339, %rsi
lea addresses_WT_ht+0x1e5a9, %rdi
nop
nop
nop
nop
add $31453, %r10
mov $49, %rcx
rep movsb
nop
nop
nop
nop
nop
inc %rbp
lea addresses_D_ht+0xf01, %r10
clflush (%r10)
nop
nop
dec %rdi
movups (%r10), %xmm6
vpextrq $0, %xmm6, %rcx
nop
nop
nop
xor $6120, %r13
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r15
pop %r13
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r14
push %r15
push %r9
push %rbp
push %rdi
// Faulty Load
lea addresses_WC+0x12839, %rbp
nop
nop
nop
and $34381, %r9
mov (%rbp), %r14d
lea oracles, %r9
and $0xff, %r14
shlq $12, %r14
mov (%r9,%r14,1), %r14
pop %rdi
pop %rbp
pop %r9
pop %r15
pop %r14
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 8, 'AVXalign': False, 'NT': True, 'congruent': 2, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 32, 'AVXalign': True, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}}
{'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
*/
|
Tests/test.asm
|
JustoSenka/8086-16-Bit-Disassembler
| 0 |
9289
|
<reponame>JustoSenka/8086-16-Bit-Disassembler
.MODEL small
.STACK 100h
.data
.code
; proc _memcpy
push bp ; Set up the call frame
mov bp,sp
push es ; Save ES
mov cx,[bp+6] ; Set CX = len
jcxz done ; If len = 0, return
mov si,[bp+4] ; Set SI = src
mov di,[bp+2] ; Set DI = dst
push ds ; Set ES = DS
pop es
loop_here:
mov al,[si] ; Load AL from [src]
mov [di],al ; Store AL to [dst]
inc si ; Increment src
inc di ; Increment dst
dec cx ; Decrement len
jnz loop_here ; Repeat the loop
done:
pop es ; Restore ES
pop bp ; Restore previous call frame
sub ax,ax ; Set AX = 0
ret ; Return
end
|
programs/oeis/286/A286577.asm
|
neoneye/loda
| 22 |
172209
|
<gh_stars>10-100
; A286577: If n = 3k-1 then a(n) = a(k), otherwise a(n) = n.
; 0,1,1,3,4,1,6,7,3,9,10,4,12,13,1,15,16,6,18,19,7,21,22,3,24,25,9,27,28,10,30,31,4,33,34,12,36,37,13,39,40,1,42,43,15,45,46,16,48,49,6,51,52,18,54,55,19,57,58,7,60,61,21,63,64,22,66,67,3,69,70,24,72,73,25,75,76,9,78,79,27,81,82,28,84,85,10,87,88,30,90,91,31,93,94,4,96,97,33,99
lpb $0
add $0,1
dif $0,3
lpe
|
programs/oeis/329/A329494.asm
|
karttu/loda
| 1 |
165807
|
; A329494: Numerator of 2*(2*n+1)/(n+2).
; 1,2,5,14,3,22,13,10,17,38,7,46,25,18,29,62,11,70,37,26,41,86,15,94,49,34,53,110,19,118,61,42,65,134,23,142,73,50,77,158,27,166,85,58,89,182,31,190,97,66,101,206,35,214,109,74,113,230,39,238,121
mov $2,$0
add $0,1
mov $1,$2
add $1,$2
add $1,$0
add $1,$0
mul $2,3
gcd $2,$1
sub $1,1
div $1,$2
add $1,1
|
oeis/119/A119829.asm
|
neoneye/loda-programs
| 11 |
176921
|
; A119829: Diagonal sum of number triangle A119828.
; Submitted by <NAME>
; 1,2,25,732,40681,3648990,480817681,87417943256,20966398997041,6412838733766170,2436104066933508841,1125217445576328664692,621010503476937955204825,403601732164215102065708342
mov $2,1
mov $3,$0
mov $4,1
lpb $3
add $1,$4
cmp $1,0
mul $2,$0
mul $2,2
add $2,$1
sub $3,1
add $0,$3
mov $4,0
lpe
mov $0,$2
|
Task/Bitmap-Flood-fill/Ada/bitmap-flood-fill-1.ada
|
LaudateCorpus1/RosettaCodeData
| 1 |
20977
|
<filename>Task/Bitmap-Flood-fill/Ada/bitmap-flood-fill-1.ada
procedure Flood_Fill
( Picture : in out Image;
From : Point;
Fill : Pixel;
Replace : Pixel;
Distance : Luminance := 20
) is
function Diff (A, B : Luminance) return Luminance is
pragma Inline (Diff);
begin
if A > B then
return A - B;
else
return B - A;
end if;
end Diff;
function "-" (A, B : Pixel) return Luminance is
pragma Inline ("-");
begin
return Luminance'Max (Luminance'Max (Diff (A.R, B.R), Diff (A.G, B.G)), Diff (A.B, B.B));
end "-";
procedure Column (From : Point);
procedure Row (From : Point);
Visited : array (Picture'Range (1), Picture'Range (2)) of Boolean :=
(others => (others => False));
procedure Column (From : Point) is
X1 : Positive := From.X;
X2 : Positive := From.X;
begin
Visited (From.X, From.Y) := True;
for X in reverse Picture'First (1)..From.X - 1 loop
exit when Visited (X, From.Y);
declare
Color : Pixel renames Picture (X, From.Y);
begin
Visited (X, From.Y) := True;
exit when Color - Replace > Distance;
Color := Fill;
X1 := X;
end;
end loop;
for X in From.X + 1..Picture'Last (1) loop
exit when Visited (X, From.Y);
declare
Color : Pixel renames Picture (X, From.Y);
begin
Visited (X, From.Y) := True;
exit when Color - Replace > Distance;
Color := Fill;
X2 := X;
end;
end loop;
for X in X1..From.X - 1 loop
Row ((X, From.Y));
end loop;
for X in From.X + 1..X2 loop
Row ((X, From.Y));
end loop;
end Column;
procedure Row (From : Point) is
Y1 : Positive := From.Y;
Y2 : Positive := From.Y;
begin
Visited (From.X, From.Y) := True;
for Y in reverse Picture'First (2)..From.Y - 1 loop
exit when Visited (From.X, Y);
declare
Color : Pixel renames Picture (From.X, Y);
begin
Visited (From.X, Y) := True;
exit when Color - Replace > Distance;
Color := Fill;
Y1 := Y;
end;
end loop;
for Y in From.Y + 1..Picture'Last (2) loop
exit when Visited (From.X, Y);
declare
Color : Pixel renames Picture (From.X, Y);
begin
Visited (From.X, Y) := True;
exit when Color - Replace > Distance;
Color := Fill;
Y2 := Y;
end;
end loop;
for Y in Y1..From.Y - 1 loop
Column ((From.X, Y));
end loop;
for Y in From.Y + 1..Y2 loop
Column ((From.X, Y));
end loop;
end Row;
Color : Pixel renames Picture (From.X, From.Y);
begin
if Color - Replace <= Distance then
Visited (From.X, From.Y) := True;
Color := Fill;
Column (From);
end if;
end Flood_Fill;
|
b2stest/b2stest.adb
|
lkujaw/ada-blake2
| 1 |
9214
|
<reponame>lkujaw/ada-blake2
-----------------------------------------------------------------------
-- Copyright 2021 <NAME> --
-- --
-- This file is part of B2STEST. --
-- --
-- B2STEST is free software: you can redistribute it and/or --
-- modify it under the terms of the GNU General Public License as --
-- published by the Free Software Foundation, either version 3 of --
-- the License, or (at your option) any later version. --
-- --
-- B2STEST is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --
-- GNU General Public License for more details. --
-- --
-- You should have received a copy of the --
-- GNU General Public License along with B2STEST. --
-- If not, see <https://www.gnu.org/licenses/>. --
-- --
-- SPDX-License-Identifier: GPL-3.0-or-later --
-- --
-- File: b2stest.adb (Ada Subprogram Body) --
-- Language: SPARK83 [1] subset of Ada (1987) [2] --
-- Author: <NAME> --
-- Description: BLAKE2s [3] for Ada test vector verifier --
-- --
-- References: --
-- [1] SPARK Team, SPARK83 - The SPADE Ada83 Kernel, --
-- Altran Praxis, 17 Oct. 2011. --
-- [2] Programming languages - Ada, ISO/IEC 8652:1987, --
-- 15 Jun. 1987. --
-- [3] <NAME> and <NAME>, "The BLAKE2 Cryptographic --
-- Hash and Message Authentication Code (MAC)", RFC 7693, --
-- Nov. 2015. --
-----------------------------------------------------------------------
with BLAKE2S;
with Octets;
with Octet_Arrays;
with SPARK_IO;
with SPARK_IO_Standard;
--# inherit BLAKE2S,
--# Octets,
--# Octet_Arrays,
--# SPARK_IO,
--# SPARK_IO_Standard;
--# main_program;
procedure B2STEST
--# global in SPARK_IO_Standard.Output;
--# in out SPARK_IO.Inputs;
--# in out SPARK_IO.Outputs;
--# in out SPARK_IO.State;
--# derives SPARK_IO.Inputs,
--# SPARK_IO.State from *,
--# SPARK_IO.State &
--# SPARK_IO.Outputs from *,
--# SPARK_IO.Inputs,
--# SPARK_IO.State,
--# SPARK_IO_Standard.Output;
is
function "="
(Left : in BLAKE2S.Digest_T;
Right : in BLAKE2S.Digest_T)
return Boolean renames BLAKE2S."=";
function ">"
(Left : in Octets.T;
Right : in Octets.T)
return Boolean renames Octets.">";
function "+"
(Left : in Octets.T;
Right : in Octets.T)
return Octets.T renames Octets."+";
function "*"
(Left : in Octets.T;
Right : in Octets.T)
return Octets.T renames Octets."*";
function "="
(Left : in SPARK_IO.File_Status_T;
Right : in SPARK_IO.File_Status_T)
return Boolean renames SPARK_IO."=";
Tests_Passed : Natural := 0;
Tests_Failed : Natural := 0;
File_Name : constant String := "blake2s.txt";
File : SPARK_IO.File_T;
File_Status : SPARK_IO.File_Status_T;
File_Parsed : Boolean;
procedure Pass
--# global in SPARK_IO_Standard.Output;
--# in out SPARK_IO.Outputs;
--# in out Tests_Passed;
--# derives SPARK_IO.Outputs from *,
--# SPARK_IO_Standard.Output &
--# Tests_Passed from *;
is
begin
if Tests_Passed < Natural'Last then
Tests_Passed := Tests_Passed + 1;
end if;
SPARK_IO.Put_Line (SPARK_IO_Standard.Output, ": PASS", 0);
end Pass;
procedure Fail
--# global in SPARK_IO_Standard.Output;
--# in out SPARK_IO.Outputs;
--# in out Tests_Failed;
--# derives SPARK_IO.Outputs from *,
--# SPARK_IO_Standard.Output &
--# Tests_Failed from *;
is
begin
if Tests_Failed < Natural'Last then
Tests_Failed := Tests_Failed + 1;
end if;
SPARK_IO.Put_Line (SPARK_IO_Standard.Output, ": FAIL", 0);
end Fail;
procedure Parse_File
(Parsed_File : out Boolean)
--# global in File;
--# in SPARK_IO_Standard.Output;
--# in out SPARK_IO.Inputs;
--# in out SPARK_IO.Outputs;
--# in out Tests_Failed;
--# in out Tests_Passed;
--# derives Parsed_File,
--# SPARK_IO.Inputs from File,
--# SPARK_IO.Inputs &
--# SPARK_IO.Outputs from *,
--# File,
--# SPARK_IO.Inputs,
--# SPARK_IO_Standard.Output &
--# Tests_Failed,
--# Tests_Passed from *,
--# File,
--# SPARK_IO.Inputs;
is
subtype Line_Index_T is Positive range 1 .. 1024;
subtype Line_T is String (Line_Index_T);
subtype Message_Length_T is Natural range 0 .. 256;
subtype Message_Index_T is Message_Length_T range 1 .. 256;
subtype Message_T is Octet_Arrays.T (Message_Index_T);
subtype Key_Octet_Array_T is
Octet_Arrays.T (BLAKE2S.Key_Index_T);
Test_Number : Positive := 1;
Line : Line_T;
Line_Last : Natural;
Line_Parsed : Boolean := False;
Message : Message_T := Message_T'(others => 0);
Message_Length : Message_Length_T := 0;
Key_Prefix : constant String := "key:" & ASCII.HT;
Key : Key_Octet_Array_T := Key_Octet_Array_T'(others => 0);
procedure Read_Hex
(Source_First : in Positive;
Source_Last : in Positive;
Target_Length : in Positive;
Target : out Octet_Arrays.T;
Parsed_Hex : out Natural)
--# global in Line;
--# derives Parsed_Hex,
--# Target from Line,
--# Source_First,
--# Source_Last,
--# Target_Length;
--# pre Source_Last in Line'Range and
--# Target'First = Positive'First and
--# Target_Length = Target'Length;
--# post Parsed_Hex <= Target_Length;
is
Source_Index : Positive;
Target_Index : Positive;
Upper_Hex : Octets.T;
Lower_Hex : Octets.T;
function Hex_Digit
(Digit : in Character)
return Octets.T
is
Result : Octets.T;
begin
case Digit is
when '0' =>
Result := 0;
when '1' =>
Result := 1;
when '2' =>
Result := 2;
when '3' =>
Result := 3;
when '4' =>
Result := 4;
when '5' =>
Result := 5;
when '6' =>
Result := 6;
when '7' =>
Result := 7;
when '8' =>
Result := 8;
when '9' =>
Result := 9;
when 'a' =>
Result := 10;
when 'b' =>
Result := 11;
when 'c' =>
Result := 12;
when 'd' =>
Result := 13;
when 'e' =>
Result := 14;
when 'f' =>
Result := 15;
when others =>
Result := 255;
end case;
return Result;
end Hex_Digit;
begin -- Read_Hex
Target := (others => 0);
Source_Index := Source_First;
Target_Index := Positive'First;
if ((Source_Last - Source_First) + 1) mod 2 = 0
and then ((Source_Last - Source_First) + 1) / 2
<= Target_Length
then
while Source_Index < Source_Last loop
--# assert
--# Source_Index >= Source_First and
--# Source_Last <= Line'Last and
--# Source_Index < Source_Last and
--# Target_Length = Target'Last and
--# Target_Length
--# >= ((Source_Last - Source_First) + 1) / 2 and
--# Target_Index >= Target'First and
--# Target_Index
--# = (Source_Index - Source_First) / 2 + 1;
Upper_Hex := Hex_Digit (Line (Source_Index));
exit when Upper_Hex > 15;
Source_Index := Source_Index + 1;
Lower_Hex := Hex_Digit (Line (Source_Index));
exit when Lower_Hex > 15;
Source_Index := Source_Index + 1;
Target (Target_Index) := Upper_Hex * 16 + Lower_Hex;
Target_Index := Target_Index + 1;
end loop;
end if;
--# assert Target_Index <= Target_Length + 1;
Parsed_Hex := Target_Index - 1;
end Read_Hex;
function Is_Prefix
(Prefix : in String)
return Boolean
--# global in Line;
--# pre Prefix'Length < 10;
is
Result : Boolean := True;
begin
for I in Positive range Positive'First .. Prefix'Last loop
--# assert I in Prefix'Range and I in Line'Range;
if Line (I) /= Prefix (I) then
Result := False;
exit;
end if;
end loop;
return Result;
end Is_Prefix;
procedure Parse_Line
(Parsed_Line : out Boolean)
--# global in Line;
--# in Line_Last;
--# in SPARK_IO_Standard.Output;
--# in out Key;
--# in out Message;
--# in out Message_Length;
--# in out SPARK_IO.Outputs;
--# in out Tests_Failed;
--# in out Tests_Passed;
--# in out Test_Number;
--# derives Key,
--# Message,
--# Message_Length,
--# Test_Number from *,
--# Line,
--# Line_Last &
--# Tests_Failed,
--# Tests_Passed from *,
--# Key,
--# Line,
--# Line_Last,
--# Message,
--# Message_Length &
--# Parsed_Line from Line,
--# Line_Last &
--# SPARK_IO.Outputs from *,
--# Key,
--# Line,
--# Line_Last,
--# Message,
--# Message_Length,
--# SPARK_IO_Standard.Output,
--# Test_Number;
--# pre Line_Last <= Line'Last;
is
subtype Digest_Octet_Array_T is
Octet_Arrays.T (BLAKE2S.Digest_Index_T);
Final : Natural;
Message_Digest : BLAKE2S.Digest_Default_T;
Expected_Digest : Digest_Octet_Array_T;
Context : BLAKE2S.T;
begin
--# assert Message_Length <= Message'Last;
Parsed_Line := True;
if Line_Last > 3 then
if Is_Prefix ("in:" & ASCII.HT) then
Read_Hex
(5, Line_Last, Message'Length, Message,
Message_Length);
if Message_Length /= (Line_Last - 4) / 2 then
Parsed_Line := False;
end if;
elsif Is_Prefix (Key_Prefix) then
Read_Hex (6, Line_Last, Key'Length, Key, Final);
if Final /= BLAKE2S.Digest_Length_Default then
Parsed_Line := False;
end if;
elsif Is_Prefix ("hash:" & ASCII.HT) then
Read_Hex
(7, Line_Last, Expected_Digest'Length,
Expected_Digest, Final);
if Final = BLAKE2S.Key_Length_Default then
SPARK_IO.Put_String
(SPARK_IO_Standard.Output, " Test ", 0);
SPARK_IO.Put_Integer
(File => SPARK_IO_Standard.Output,
Item => Test_Number,
Width => 3,
Base => 10);
BLAKE2S.Hash_Keyed_Flex
(Key => BLAKE2S.Key_Default_T (Key),
Key_Length => BLAKE2S.Key_Length_Default,
Message => Message,
Message_First => Message'First,
Message_Last => Message_Length,
Digest_Length => BLAKE2S.Digest_Length_Default,
Digest => Message_Digest);
if Message_Digest
= BLAKE2S.Digest_Default_T (Expected_Digest)
then
Context := BLAKE2S.Initial_Keyed_Flex
(Digest_Length =>
BLAKE2S.Digest_Length_Default,
Key => BLAKE2S.Key_Default_T (Key),
Key_Length => BLAKE2S.Key_Length_Default);
BLAKE2S.Incorporate_Flex
(Context => Context,
Message => Message,
Message_First => Message'First,
Message_Last => Message_Length);
--# accept Flow_Message, 10, Context,
--# "The hash state is no longer needed";
BLAKE2S.Finalize
(Context => Context,
Digest => Message_Digest);
--# end accept;
if Message_Digest
= BLAKE2S.Digest_Default_T (Expected_Digest)
then
Pass;
else
Fail;
end if;
else
Fail;
end if;
if Test_Number < Positive'Last then
Test_Number := Test_Number + 1;
end if;
else
Parsed_Line := False;
end if;
else
Parsed_Line := False;
end if;
end if;
end Parse_Line;
begin -- Parse_File
while not SPARK_IO.End_Of_File (File) loop
--# assert True;
SPARK_IO.Get_Line (File, Line, Line_Last);
Parse_Line (Line_Parsed);
exit when not Line_Parsed;
end loop;
Parsed_File := Line_Parsed;
end Parse_File;
begin -- B2STest
SPARK_IO.Put_Line
(SPARK_IO_Standard.Output, "==== BLAKE2s for Ada Tests ====", 0);
SPARK_IO.Put_Line
(SPARK_IO_Standard.Output,
"NOTE: Expect 257 tests to pass for a conformant build.", 0);
SPARK_IO.New_Line (SPARK_IO_Standard.Output, 1);
------- BLAKE2S SELF TEST -------
SPARK_IO.Put_String (SPARK_IO_Standard.Output, "Self-test", 0);
--# accept Flow_Message, 22,
--# "Check for errors outside of the SPARK model";
case BLAKE2S.Self_Test is
when BLAKE2S.Success =>
Pass;
when BLAKE2S.Failure =>
Fail;
end case;
--# end accept;
SPARK_IO.Open (File, SPARK_IO.In_File, File_Name, "", File_Status);
if File_Status = SPARK_IO.Success then
Parse_File (File_Parsed);
if File_Parsed then
SPARK_IO.New_Line (SPARK_IO_Standard.Output, 1);
SPARK_IO.Put_Line
(SPARK_IO_Standard.Output,
"==== BLAKE2s for Ada Summary ====", 0);
SPARK_IO.Put_String
(SPARK_IO_Standard.Output, "Tests passed: ", 0);
SPARK_IO.Put_Integer
(File => SPARK_IO_Standard.Output,
Item => Integer'(Tests_Passed),
Width => 3,
Base => 10);
SPARK_IO.New_Line (SPARK_IO_Standard.Output, 1);
SPARK_IO.Put_String
(SPARK_IO_Standard.Output, "Tests failed: ", 0);
SPARK_IO.Put_Integer
(File => SPARK_IO_Standard.Output,
Item => Integer'(Tests_Failed),
Width => 3,
Base => 10);
SPARK_IO.New_Line (SPARK_IO_Standard.Output, 1);
else
SPARK_IO.Put_Line
(SPARK_IO_Standard.Output,
"ERROR: Could not parse the file '" & File_Name & "'.", 0);
end if;
else
SPARK_IO.Put_Line
(SPARK_IO_Standard.Output,
"ERROR: Could not open the file '" & File_Name & "'.", 0);
end if;
end B2STEST;
|
libsrc/_DEVELOPMENT/math/float/math32/lm32/c/sccz80/mul2_fastcall.asm
|
Frodevan/z88dk
| 640 |
96874
|
<gh_stars>100-1000
SECTION code_fp_math32
PUBLIC mul2_fastcall
EXTERN m32_fsmul2_fastcall
defc mul2_fastcall = m32_fsmul2_fastcall
; SDCC bridge for Classic
IF __CLASSIC
PUBLIC _mul2_fastcall
defc _mul2_fastcall = m32_fsmul2_fastcall
ENDIF
|
ga_lib/src/plane.adb
|
rogermc2/GA_Ada
| 3 |
13376
|
<gh_stars>1-10
-- Based on libgasandbox.draw.h and draw.cpp
with Ada.Text_IO; use Ada.Text_IO;
with GL;
with GL.Attributes;
with GL.Objects.Buffers;
with GL.Objects.Vertex_Arrays;
with GL.Rasterization;
with GL.Types; use GL.Types;
with Utilities;
with Maths;
with GA_Utilities;
with Palet;
with Shader_Manager;
package body Plane is
type Surface_Type is (Back_Surface, Front_Surface);
-- ------------------------------------------------------------------------
procedure Add_To_Array (theArray : in out Singles.Vector3_Array;
Current_Index : Int;
Addition : Singles.Vector3_Array) is
begin
for index in Int range 1 .. 6 loop
theArray (Current_Index + index) := Addition (index);
end loop;
end Add_To_Array;
-- ------------------------------------------------------------------------
function Build_Quad_Vertices (Bottom_Left : Singles.Vector3;
Step_Size : Single)
return Singles.Vector3_Array is
X : constant Single := Bottom_Left (GL.X);
Y : constant Single := Bottom_Left (GL.Y);
Z : constant Single := Bottom_Left (GL.Z);
Quad_Vertices : constant Singles.Vector3_Array (1 .. 6) :=
(Bottom_Left,
(X, Y + Step_Size, Z),
(X + Step_Size, Y + Step_Size, Z),
(Bottom_Left),
(X + Step_Size, Y, Z),
(X + Step_Size, Y + Step_Size, Z));
begin
return Quad_Vertices;
end Build_Quad_Vertices;
-- ------------------------------------------------------------------------
procedure Display_Plane
(Vertex_Buffer, Normals_Buffer : GL.Objects.Buffers.Buffer;
Num_Vertices : Int) is
begin
GL.Attributes.Enable_Vertex_Attrib_Array (0);
GL.Objects.Buffers.Array_Buffer.Bind (Vertex_Buffer);
GL.Attributes.Set_Vertex_Attrib_Pointer (0, 3, Single_Type, False, 0, 0);
GL.Attributes.Enable_Vertex_Attrib_Array (1);
GL.Objects.Buffers.Array_Buffer.Bind (Normals_Buffer);
GL.Attributes.Set_Vertex_Attrib_Pointer (1, 3, Single_Type, False, 0, 0);
GL.Objects.Vertex_Arrays.Draw_Arrays (Mode => Triangle_Strip,
First => 0,
Count => Num_Vertices);
GL.Attributes.Disable_Vertex_Attrib_Array (0);
GL.Attributes.Disable_Vertex_Attrib_Array (1);
exception
when others =>
Put_Line ("An exception occurred in Plane.Display_Plane.");
raise;
end Display_Plane;
-- ------------------------------------------------------------------------
procedure Draw_Plane (Render_Program : GL.Objects.Programs.Program;
Point,
X_Dir, Y_Dir, Normal : C3GA.Vector_E3;
Weight : Float := 1.0) is
-- Attitude: Normal is perpendicular to plane of Ortho_1 and Ortho_2.
use GL.Objects.Buffers;
use Palet;
use Singles;
Vertex_Array : GL.Objects.Vertex_Arrays.Vertex_Array_Object;
Vertex_Buffer : GL.Objects.Buffers.Buffer;
Normals_Buffer : GL.Objects.Buffers.Buffer;
Model_Matrix : Matrix4 := Identity4;
Plane_Size : constant Single := Single (Palet.Get_Plane_Size); -- 6.0
Scale_Magnitude : constant Single := Single (Weight);
Step_Size : constant Single := 0.1;
Scaled_Step_Size : constant Single := Step_Size * Plane_Size;
Num_Vertices : constant Int :=
Int (2.0 * Plane_Size / Step_Size);
Scale_Matrix : constant Matrix4 := Maths.Scaling_Matrix
((Scale_Magnitude, Scale_Magnitude, Scale_Magnitude));
V_Index : Int := 0;
Vertices : Vector3_Array (1 .. Num_Vertices) :=
(others => (others => 0.0));
Normals : Vector3_Array (1 .. Num_Vertices) :=
(others => (others => 0.0));
X : Single;
Y : Single;
YY_Dir : Vector3;
QY : Vector3;
Quad_Vertices : Singles.Vector3_Array (1 .. 6);
Quad_Normals : Singles.Vector3_Array (1 .. 6);
begin
Vertex_Array.Initialize_Id;
Vertex_Array.Bind;
GL.Objects.Programs.Use_Program (Render_Program);
if Palet.Get_Draw_Mode.Magnitude then
Model_Matrix := Scale_Matrix * Model_Matrix;
end if;
Shader_Manager.Set_Model_Matrix (Model_Matrix);
GA_Utilities.Print_E3_Vector ("Plane.Draw_Plane Point", Point);
GA_Utilities.Print_E3_Vector ("Plane.Draw_Plane X_Dir", X_Dir);
GA_Utilities.Print_E3_Vector ("Plane.Draw_Plane Y_Dir", Y_Dir);
-- draw both front and back side individually
for Surface in Surface_Type'Range loop
if Wireframe or (Surface = Back_Surface and Palet.Orientation) then
GL.Rasterization.Set_Polygon_Mode (GL.Rasterization.Line);
else
GL.Rasterization.Set_Polygon_Mode (GL.Rasterization.Fill);
end if;
Y := -Plane_Size;
while Y < Plane_Size - Scaled_Step_Size loop
V_Index := 0;
YY_Dir := Y * Y_Dir;
X := -Plane_Size;
-- for each Y value draw a triangle strip (rectangle) of
-- "length" 2 Plane_Size and "height" YY_Dir
-- The "length" in Scaled_Step_Size ^ 2 quad increments
-- with each quad drawn as 2 triangles
-- X_Dir and Y_Dir are orthogonal
while X < Plane_Size - Scaled_Step_Size loop
if Surface = Front_Surface then
QY := YY_Dir;
else
QY := Scaled_Step_Size * YY_Dir;
end if;
Quad_Vertices := Build_Quad_Vertices
((Point - X * X_Dir + QY), Scaled_Step_Size);
Add_To_Array (Vertices, V_Index, Quad_Vertices);
if Palet.Get_Draw_Mode.Magnitude then
Quad_Normals := Build_Quad_Vertices
(Point + X * Normal + YY_Dir, Scaled_Step_Size);
Add_To_Array (Normals, V_Index, Quad_Normals);
end if;
X := X + Scaled_Step_Size;
V_Index := V_Index + 6;
end loop;
if Surface = Back_Surface then
for n in Int range 1 .. Num_Vertices loop
Normals (n) := -Normals (n);
end loop;
end if;
Vertex_Buffer.Initialize_Id;
Array_Buffer.Bind (Vertex_Buffer);
Utilities.Load_Vertex_Buffer (Array_Buffer, Vertices, Static_Draw);
-- if Palet.Get_Draw_Mode.Magnitude then -- draw normals
-- -- ??? GL.Rasterization.Set_Polygon_Mode (GL.Rasterization.Fill);
Normals_Buffer.Initialize_Id;
Array_Buffer.Bind (Normals_Buffer);
Utilities.Load_Vertex_Buffer (Array_Buffer, Normals,
Static_Draw);
-- end if;
Display_Plane (Vertex_Buffer, Normals_Buffer, Num_Vertices);
Y := Y + Scaled_Step_Size;
end loop;
end loop;
exception
when others =>
Put_Line ("An exception occurred in Plane.Draw_Plane.");
raise;
end Draw_Plane;
-- ------------------------------------------------------------------------
end Plane;
|
test/Fail/WithoutK-PatternMatchingLambdas2.agda
|
KDr2/agda
| 0 |
15318
|
{-# OPTIONS --cubical-compatible #-}
module WithoutK-PatternMatchingLambdas2 where
-- Equality defined with two indices.
data _≡_ {A : Set} : A → A → Set where
refl : ∀ x → x ≡ x
-- The --cubical-compatible option works with pattern matching lambdas.
K : (A : Set) (x : A) (P : x ≡ x → Set) → P (refl x) → (p : x ≡ x ) → P p
K = λ { A .x P pr (refl x) → pr }
|
user/echo.asm
|
MyBeLoVedL/xv6
| 0 |
179094
|
user/_echo: file format elf64-littleriscv
Disassembly of section .text:
0000000000000000 <main>:
0: 7179 addi sp,sp,-48
2: f406 sd ra,40(sp)
4: f022 sd s0,32(sp)
6: ec26 sd s1,24(sp)
8: e84a sd s2,16(sp)
a: e44e sd s3,8(sp)
c: e052 sd s4,0(sp)
e: 1800 addi s0,sp,48
10: 4785 li a5,1
12: 06a7d463 bge a5,a0,7a <main+0x7a>
16: 00858493 addi s1,a1,8
1a: ffe5099b addiw s3,a0,-2
1e: 1982 slli s3,s3,0x20
20: 0209d993 srli s3,s3,0x20
24: 098e slli s3,s3,0x3
26: 05c1 addi a1,a1,16
28: 99ae add s3,s3,a1
2a: 00001a17 auipc s4,0x1
2e: 876a0a13 addi s4,s4,-1930 # 8a0 <l_free+0x12>
32: 0004b903 ld s2,0(s1)
36: 854a mv a0,s2
38: 00000097 auipc ra,0x0
3c: 094080e7 jalr 148(ra) # cc <strlen>
40: 0005061b sext.w a2,a0
44: 85ca mv a1,s2
46: 4505 li a0,1
48: 00000097 auipc ra,0x0
4c: 2ca080e7 jalr 714(ra) # 312 <write>
50: 04a1 addi s1,s1,8
52: 01348a63 beq s1,s3,66 <main+0x66>
56: 4605 li a2,1
58: 85d2 mv a1,s4
5a: 4505 li a0,1
5c: 00000097 auipc ra,0x0
60: 2b6080e7 jalr 694(ra) # 312 <write>
64: b7f9 j 32 <main+0x32>
66: 4605 li a2,1
68: 00001597 auipc a1,0x1
6c: 84058593 addi a1,a1,-1984 # 8a8 <l_free+0x1a>
70: 4505 li a0,1
72: 00000097 auipc ra,0x0
76: 2a0080e7 jalr 672(ra) # 312 <write>
7a: 4501 li a0,0
7c: 00000097 auipc ra,0x0
80: 276080e7 jalr 630(ra) # 2f2 <exit>
0000000000000084 <strcpy>:
84: 1141 addi sp,sp,-16
86: e422 sd s0,8(sp)
88: 0800 addi s0,sp,16
8a: 87aa mv a5,a0
8c: 0585 addi a1,a1,1
8e: 0785 addi a5,a5,1
90: fff5c703 lbu a4,-1(a1)
94: fee78fa3 sb a4,-1(a5)
98: fb75 bnez a4,8c <strcpy+0x8>
9a: 6422 ld s0,8(sp)
9c: 0141 addi sp,sp,16
9e: 8082 ret
00000000000000a0 <strcmp>:
a0: 1141 addi sp,sp,-16
a2: e422 sd s0,8(sp)
a4: 0800 addi s0,sp,16
a6: 00054783 lbu a5,0(a0)
aa: cb91 beqz a5,be <strcmp+0x1e>
ac: 0005c703 lbu a4,0(a1)
b0: 00f71763 bne a4,a5,be <strcmp+0x1e>
b4: 0505 addi a0,a0,1
b6: 0585 addi a1,a1,1
b8: 00054783 lbu a5,0(a0)
bc: fbe5 bnez a5,ac <strcmp+0xc>
be: 0005c503 lbu a0,0(a1)
c2: 40a7853b subw a0,a5,a0
c6: 6422 ld s0,8(sp)
c8: 0141 addi sp,sp,16
ca: 8082 ret
00000000000000cc <strlen>:
cc: 1141 addi sp,sp,-16
ce: e422 sd s0,8(sp)
d0: 0800 addi s0,sp,16
d2: 00054783 lbu a5,0(a0)
d6: cf91 beqz a5,f2 <strlen+0x26>
d8: 0505 addi a0,a0,1
da: 87aa mv a5,a0
dc: 4685 li a3,1
de: 9e89 subw a3,a3,a0
e0: 00f6853b addw a0,a3,a5
e4: 0785 addi a5,a5,1
e6: fff7c703 lbu a4,-1(a5)
ea: fb7d bnez a4,e0 <strlen+0x14>
ec: 6422 ld s0,8(sp)
ee: 0141 addi sp,sp,16
f0: 8082 ret
f2: 4501 li a0,0
f4: bfe5 j ec <strlen+0x20>
00000000000000f6 <memset>:
f6: 1141 addi sp,sp,-16
f8: e422 sd s0,8(sp)
fa: 0800 addi s0,sp,16
fc: ca19 beqz a2,112 <memset+0x1c>
fe: 87aa mv a5,a0
100: 1602 slli a2,a2,0x20
102: 9201 srli a2,a2,0x20
104: 00a60733 add a4,a2,a0
108: 00b78023 sb a1,0(a5)
10c: 0785 addi a5,a5,1
10e: fee79de3 bne a5,a4,108 <memset+0x12>
112: 6422 ld s0,8(sp)
114: 0141 addi sp,sp,16
116: 8082 ret
0000000000000118 <strchr>:
118: 1141 addi sp,sp,-16
11a: e422 sd s0,8(sp)
11c: 0800 addi s0,sp,16
11e: 00054783 lbu a5,0(a0)
122: cb99 beqz a5,138 <strchr+0x20>
124: 00f58763 beq a1,a5,132 <strchr+0x1a>
128: 0505 addi a0,a0,1
12a: 00054783 lbu a5,0(a0)
12e: fbfd bnez a5,124 <strchr+0xc>
130: 4501 li a0,0
132: 6422 ld s0,8(sp)
134: 0141 addi sp,sp,16
136: 8082 ret
138: 4501 li a0,0
13a: bfe5 j 132 <strchr+0x1a>
000000000000013c <gets>:
13c: 711d addi sp,sp,-96
13e: ec86 sd ra,88(sp)
140: e8a2 sd s0,80(sp)
142: e4a6 sd s1,72(sp)
144: e0ca sd s2,64(sp)
146: fc4e sd s3,56(sp)
148: f852 sd s4,48(sp)
14a: f456 sd s5,40(sp)
14c: f05a sd s6,32(sp)
14e: ec5e sd s7,24(sp)
150: 1080 addi s0,sp,96
152: 8baa mv s7,a0
154: 8a2e mv s4,a1
156: 892a mv s2,a0
158: 4481 li s1,0
15a: 4aa9 li s5,10
15c: 4b35 li s6,13
15e: 89a6 mv s3,s1
160: 2485 addiw s1,s1,1
162: 0344d863 bge s1,s4,192 <gets+0x56>
166: 4605 li a2,1
168: faf40593 addi a1,s0,-81
16c: 4501 li a0,0
16e: 00000097 auipc ra,0x0
172: 19c080e7 jalr 412(ra) # 30a <read>
176: 00a05e63 blez a0,192 <gets+0x56>
17a: faf44783 lbu a5,-81(s0)
17e: 00f90023 sb a5,0(s2)
182: 01578763 beq a5,s5,190 <gets+0x54>
186: 0905 addi s2,s2,1
188: fd679be3 bne a5,s6,15e <gets+0x22>
18c: 89a6 mv s3,s1
18e: a011 j 192 <gets+0x56>
190: 89a6 mv s3,s1
192: 99de add s3,s3,s7
194: 00098023 sb zero,0(s3)
198: 855e mv a0,s7
19a: 60e6 ld ra,88(sp)
19c: 6446 ld s0,80(sp)
19e: 64a6 ld s1,72(sp)
1a0: 6906 ld s2,64(sp)
1a2: 79e2 ld s3,56(sp)
1a4: 7a42 ld s4,48(sp)
1a6: 7aa2 ld s5,40(sp)
1a8: 7b02 ld s6,32(sp)
1aa: 6be2 ld s7,24(sp)
1ac: 6125 addi sp,sp,96
1ae: 8082 ret
00000000000001b0 <stat>:
1b0: 1101 addi sp,sp,-32
1b2: ec06 sd ra,24(sp)
1b4: e822 sd s0,16(sp)
1b6: e426 sd s1,8(sp)
1b8: e04a sd s2,0(sp)
1ba: 1000 addi s0,sp,32
1bc: 892e mv s2,a1
1be: 4581 li a1,0
1c0: 00000097 auipc ra,0x0
1c4: 172080e7 jalr 370(ra) # 332 <open>
1c8: 02054563 bltz a0,1f2 <stat+0x42>
1cc: 84aa mv s1,a0
1ce: 85ca mv a1,s2
1d0: 00000097 auipc ra,0x0
1d4: 17a080e7 jalr 378(ra) # 34a <fstat>
1d8: 892a mv s2,a0
1da: 8526 mv a0,s1
1dc: 00000097 auipc ra,0x0
1e0: 13e080e7 jalr 318(ra) # 31a <close>
1e4: 854a mv a0,s2
1e6: 60e2 ld ra,24(sp)
1e8: 6442 ld s0,16(sp)
1ea: 64a2 ld s1,8(sp)
1ec: 6902 ld s2,0(sp)
1ee: 6105 addi sp,sp,32
1f0: 8082 ret
1f2: 597d li s2,-1
1f4: bfc5 j 1e4 <stat+0x34>
00000000000001f6 <atoi>:
1f6: 1141 addi sp,sp,-16
1f8: e422 sd s0,8(sp)
1fa: 0800 addi s0,sp,16
1fc: 00054603 lbu a2,0(a0)
200: fd06079b addiw a5,a2,-48
204: 0ff7f793 zext.b a5,a5
208: 4725 li a4,9
20a: 02f76963 bltu a4,a5,23c <atoi+0x46>
20e: 86aa mv a3,a0
210: 4501 li a0,0
212: 45a5 li a1,9
214: 0685 addi a3,a3,1
216: 0025179b slliw a5,a0,0x2
21a: 9fa9 addw a5,a5,a0
21c: 0017979b slliw a5,a5,0x1
220: 9fb1 addw a5,a5,a2
222: fd07851b addiw a0,a5,-48
226: 0006c603 lbu a2,0(a3)
22a: fd06071b addiw a4,a2,-48
22e: 0ff77713 zext.b a4,a4
232: fee5f1e3 bgeu a1,a4,214 <atoi+0x1e>
236: 6422 ld s0,8(sp)
238: 0141 addi sp,sp,16
23a: 8082 ret
23c: 4501 li a0,0
23e: bfe5 j 236 <atoi+0x40>
0000000000000240 <memmove>:
240: 1141 addi sp,sp,-16
242: e422 sd s0,8(sp)
244: 0800 addi s0,sp,16
246: 02b57463 bgeu a0,a1,26e <memmove+0x2e>
24a: 00c05f63 blez a2,268 <memmove+0x28>
24e: 1602 slli a2,a2,0x20
250: 9201 srli a2,a2,0x20
252: 00c507b3 add a5,a0,a2
256: 872a mv a4,a0
258: 0585 addi a1,a1,1
25a: 0705 addi a4,a4,1
25c: fff5c683 lbu a3,-1(a1)
260: fed70fa3 sb a3,-1(a4)
264: fee79ae3 bne a5,a4,258 <memmove+0x18>
268: 6422 ld s0,8(sp)
26a: 0141 addi sp,sp,16
26c: 8082 ret
26e: 00c50733 add a4,a0,a2
272: 95b2 add a1,a1,a2
274: fec05ae3 blez a2,268 <memmove+0x28>
278: fff6079b addiw a5,a2,-1
27c: 1782 slli a5,a5,0x20
27e: 9381 srli a5,a5,0x20
280: fff7c793 not a5,a5
284: 97ba add a5,a5,a4
286: 15fd addi a1,a1,-1
288: 177d addi a4,a4,-1
28a: 0005c683 lbu a3,0(a1)
28e: 00d70023 sb a3,0(a4)
292: fee79ae3 bne a5,a4,286 <memmove+0x46>
296: bfc9 j 268 <memmove+0x28>
0000000000000298 <memcmp>:
298: 1141 addi sp,sp,-16
29a: e422 sd s0,8(sp)
29c: 0800 addi s0,sp,16
29e: ca05 beqz a2,2ce <memcmp+0x36>
2a0: fff6069b addiw a3,a2,-1
2a4: 1682 slli a3,a3,0x20
2a6: 9281 srli a3,a3,0x20
2a8: 0685 addi a3,a3,1
2aa: 96aa add a3,a3,a0
2ac: 00054783 lbu a5,0(a0)
2b0: 0005c703 lbu a4,0(a1)
2b4: 00e79863 bne a5,a4,2c4 <memcmp+0x2c>
2b8: 0505 addi a0,a0,1
2ba: 0585 addi a1,a1,1
2bc: fed518e3 bne a0,a3,2ac <memcmp+0x14>
2c0: 4501 li a0,0
2c2: a019 j 2c8 <memcmp+0x30>
2c4: 40e7853b subw a0,a5,a4
2c8: 6422 ld s0,8(sp)
2ca: 0141 addi sp,sp,16
2cc: 8082 ret
2ce: 4501 li a0,0
2d0: bfe5 j 2c8 <memcmp+0x30>
00000000000002d2 <memcpy>:
2d2: 1141 addi sp,sp,-16
2d4: e406 sd ra,8(sp)
2d6: e022 sd s0,0(sp)
2d8: 0800 addi s0,sp,16
2da: 00000097 auipc ra,0x0
2de: f66080e7 jalr -154(ra) # 240 <memmove>
2e2: 60a2 ld ra,8(sp)
2e4: 6402 ld s0,0(sp)
2e6: 0141 addi sp,sp,16
2e8: 8082 ret
00000000000002ea <fork>:
2ea: 4885 li a7,1
2ec: 00000073 ecall
2f0: 8082 ret
00000000000002f2 <exit>:
2f2: 4889 li a7,2
2f4: 00000073 ecall
2f8: 8082 ret
00000000000002fa <wait>:
2fa: 488d li a7,3
2fc: 00000073 ecall
300: 8082 ret
0000000000000302 <pipe>:
302: 4891 li a7,4
304: 00000073 ecall
308: 8082 ret
000000000000030a <read>:
30a: 4895 li a7,5
30c: 00000073 ecall
310: 8082 ret
0000000000000312 <write>:
312: 48c1 li a7,16
314: 00000073 ecall
318: 8082 ret
000000000000031a <close>:
31a: 48d5 li a7,21
31c: 00000073 ecall
320: 8082 ret
0000000000000322 <kill>:
322: 4899 li a7,6
324: 00000073 ecall
328: 8082 ret
000000000000032a <exec>:
32a: 489d li a7,7
32c: 00000073 ecall
330: 8082 ret
0000000000000332 <open>:
332: 48bd li a7,15
334: 00000073 ecall
338: 8082 ret
000000000000033a <mknod>:
33a: 48c5 li a7,17
33c: 00000073 ecall
340: 8082 ret
0000000000000342 <unlink>:
342: 48c9 li a7,18
344: 00000073 ecall
348: 8082 ret
000000000000034a <fstat>:
34a: 48a1 li a7,8
34c: 00000073 ecall
350: 8082 ret
0000000000000352 <link>:
352: 48cd li a7,19
354: 00000073 ecall
358: 8082 ret
000000000000035a <mkdir>:
35a: 48d1 li a7,20
35c: 00000073 ecall
360: 8082 ret
0000000000000362 <chdir>:
362: 48a5 li a7,9
364: 00000073 ecall
368: 8082 ret
000000000000036a <dup>:
36a: 48a9 li a7,10
36c: 00000073 ecall
370: 8082 ret
0000000000000372 <getpid>:
372: 48ad li a7,11
374: 00000073 ecall
378: 8082 ret
000000000000037a <sbrk>:
37a: 48b1 li a7,12
37c: 00000073 ecall
380: 8082 ret
0000000000000382 <sleep>:
382: 48b5 li a7,13
384: 00000073 ecall
388: 8082 ret
000000000000038a <uptime>:
38a: 48b9 li a7,14
38c: 00000073 ecall
390: 8082 ret
0000000000000392 <putc>:
static char digits[] = "0123456789ABCDEF";
static void
putc(int fd, char c)
{
392: 1101 addi sp,sp,-32
394: ec06 sd ra,24(sp)
396: e822 sd s0,16(sp)
398: 1000 addi s0,sp,32
39a: feb407a3 sb a1,-17(s0)
write(fd, &c, 1);
39e: 4605 li a2,1
3a0: fef40593 addi a1,s0,-17
3a4: 00000097 auipc ra,0x0
3a8: f6e080e7 jalr -146(ra) # 312 <write>
}
3ac: 60e2 ld ra,24(sp)
3ae: 6442 ld s0,16(sp)
3b0: 6105 addi sp,sp,32
3b2: 8082 ret
00000000000003b4 <printint>:
static void
printint(int fd, int xx, int base, int sgn)
{
3b4: 7139 addi sp,sp,-64
3b6: fc06 sd ra,56(sp)
3b8: f822 sd s0,48(sp)
3ba: f426 sd s1,40(sp)
3bc: f04a sd s2,32(sp)
3be: ec4e sd s3,24(sp)
3c0: 0080 addi s0,sp,64
3c2: 84aa mv s1,a0
char buf[16];
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
3c4: c299 beqz a3,3ca <printint+0x16>
3c6: 0805c963 bltz a1,458 <printint+0xa4>
neg = 1;
x = -xx;
} else {
x = xx;
3ca: 2581 sext.w a1,a1
neg = 0;
3cc: 4881 li a7,0
3ce: fc040693 addi a3,s0,-64
}
i = 0;
3d2: 4701 li a4,0
do{
buf[i++] = digits[x % base];
3d4: 2601 sext.w a2,a2
3d6: 00000517 auipc a0,0x0
3da: 53a50513 addi a0,a0,1338 # 910 <digits>
3de: 883a mv a6,a4
3e0: 2705 addiw a4,a4,1
3e2: 02c5f7bb remuw a5,a1,a2
3e6: 1782 slli a5,a5,0x20
3e8: 9381 srli a5,a5,0x20
3ea: 97aa add a5,a5,a0
3ec: 0007c783 lbu a5,0(a5)
3f0: 00f68023 sb a5,0(a3)
}while((x /= base) != 0);
3f4: 0005879b sext.w a5,a1
3f8: 02c5d5bb divuw a1,a1,a2
3fc: 0685 addi a3,a3,1
3fe: fec7f0e3 bgeu a5,a2,3de <printint+0x2a>
if(neg)
402: 00088c63 beqz a7,41a <printint+0x66>
buf[i++] = '-';
406: fd070793 addi a5,a4,-48
40a: 00878733 add a4,a5,s0
40e: 02d00793 li a5,45
412: fef70823 sb a5,-16(a4)
416: 0028071b addiw a4,a6,2
while(--i >= 0)
41a: 02e05863 blez a4,44a <printint+0x96>
41e: fc040793 addi a5,s0,-64
422: 00e78933 add s2,a5,a4
426: fff78993 addi s3,a5,-1
42a: 99ba add s3,s3,a4
42c: 377d addiw a4,a4,-1
42e: 1702 slli a4,a4,0x20
430: 9301 srli a4,a4,0x20
432: 40e989b3 sub s3,s3,a4
putc(fd, buf[i]);
436: fff94583 lbu a1,-1(s2)
43a: 8526 mv a0,s1
43c: 00000097 auipc ra,0x0
440: f56080e7 jalr -170(ra) # 392 <putc>
while(--i >= 0)
444: 197d addi s2,s2,-1
446: ff3918e3 bne s2,s3,436 <printint+0x82>
}
44a: 70e2 ld ra,56(sp)
44c: 7442 ld s0,48(sp)
44e: 74a2 ld s1,40(sp)
450: 7902 ld s2,32(sp)
452: 69e2 ld s3,24(sp)
454: 6121 addi sp,sp,64
456: 8082 ret
x = -xx;
458: 40b005bb negw a1,a1
neg = 1;
45c: 4885 li a7,1
x = -xx;
45e: bf85 j 3ce <printint+0x1a>
0000000000000460 <vprintf>:
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
vprintf(int fd, const char *fmt, va_list ap)
{
460: 7119 addi sp,sp,-128
462: fc86 sd ra,120(sp)
464: f8a2 sd s0,112(sp)
466: f4a6 sd s1,104(sp)
468: f0ca sd s2,96(sp)
46a: ecce sd s3,88(sp)
46c: e8d2 sd s4,80(sp)
46e: e4d6 sd s5,72(sp)
470: e0da sd s6,64(sp)
472: fc5e sd s7,56(sp)
474: f862 sd s8,48(sp)
476: f466 sd s9,40(sp)
478: f06a sd s10,32(sp)
47a: ec6e sd s11,24(sp)
47c: 0100 addi s0,sp,128
char *s;
int c, i, state;
state = 0;
for(i = 0; fmt[i]; i++){
47e: 0005c903 lbu s2,0(a1)
482: 18090f63 beqz s2,620 <vprintf+0x1c0>
486: 8aaa mv s5,a0
488: 8b32 mv s6,a2
48a: 00158493 addi s1,a1,1
state = 0;
48e: 4981 li s3,0
if(c == '%'){
state = '%';
} else {
putc(fd, c);
}
} else if(state == '%'){
490: 02500a13 li s4,37
494: 4c55 li s8,21
496: 00000c97 auipc s9,0x0
49a: 422c8c93 addi s9,s9,1058 # 8b8 <l_free+0x2a>
printptr(fd, va_arg(ap, uint64));
} else if(c == 's'){
s = va_arg(ap, char*);
if(s == 0)
s = "(null)";
while(*s != 0){
49e: 02800d93 li s11,40
putc(fd, 'x');
4a2: 4d41 li s10,16
putc(fd, digits[x >> (sizeof(uint64) * 8 - 4)]);
4a4: 00000b97 auipc s7,0x0
4a8: 46cb8b93 addi s7,s7,1132 # 910 <digits>
4ac: a839 j 4ca <vprintf+0x6a>
putc(fd, c);
4ae: 85ca mv a1,s2
4b0: 8556 mv a0,s5
4b2: 00000097 auipc ra,0x0
4b6: ee0080e7 jalr -288(ra) # 392 <putc>
4ba: a019 j 4c0 <vprintf+0x60>
} else if(state == '%'){
4bc: 01498d63 beq s3,s4,4d6 <vprintf+0x76>
for(i = 0; fmt[i]; i++){
4c0: 0485 addi s1,s1,1
4c2: fff4c903 lbu s2,-1(s1)
4c6: 14090d63 beqz s2,620 <vprintf+0x1c0>
if(state == 0){
4ca: fe0999e3 bnez s3,4bc <vprintf+0x5c>
if(c == '%'){
4ce: ff4910e3 bne s2,s4,4ae <vprintf+0x4e>
state = '%';
4d2: 89d2 mv s3,s4
4d4: b7f5 j 4c0 <vprintf+0x60>
if(c == 'd'){
4d6: 11490c63 beq s2,s4,5ee <vprintf+0x18e>
4da: f9d9079b addiw a5,s2,-99
4de: 0ff7f793 zext.b a5,a5
4e2: 10fc6e63 bltu s8,a5,5fe <vprintf+0x19e>
4e6: f9d9079b addiw a5,s2,-99
4ea: 0ff7f713 zext.b a4,a5
4ee: 10ec6863 bltu s8,a4,5fe <vprintf+0x19e>
4f2: 00271793 slli a5,a4,0x2
4f6: 97e6 add a5,a5,s9
4f8: 439c lw a5,0(a5)
4fa: 97e6 add a5,a5,s9
4fc: 8782 jr a5
printint(fd, va_arg(ap, int), 10, 1);
4fe: 008b0913 addi s2,s6,8
502: 4685 li a3,1
504: 4629 li a2,10
506: 000b2583 lw a1,0(s6)
50a: 8556 mv a0,s5
50c: 00000097 auipc ra,0x0
510: ea8080e7 jalr -344(ra) # 3b4 <printint>
514: 8b4a mv s6,s2
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
516: 4981 li s3,0
518: b765 j 4c0 <vprintf+0x60>
printint(fd, va_arg(ap, uint64), 10, 0);
51a: 008b0913 addi s2,s6,8
51e: 4681 li a3,0
520: 4629 li a2,10
522: 000b2583 lw a1,0(s6)
526: 8556 mv a0,s5
528: 00000097 auipc ra,0x0
52c: e8c080e7 jalr -372(ra) # 3b4 <printint>
530: 8b4a mv s6,s2
state = 0;
532: 4981 li s3,0
534: b771 j 4c0 <vprintf+0x60>
printint(fd, va_arg(ap, int), 16, 0);
536: 008b0913 addi s2,s6,8
53a: 4681 li a3,0
53c: 866a mv a2,s10
53e: 000b2583 lw a1,0(s6)
542: 8556 mv a0,s5
544: 00000097 auipc ra,0x0
548: e70080e7 jalr -400(ra) # 3b4 <printint>
54c: 8b4a mv s6,s2
state = 0;
54e: 4981 li s3,0
550: bf85 j 4c0 <vprintf+0x60>
printptr(fd, va_arg(ap, uint64));
552: 008b0793 addi a5,s6,8
556: f8f43423 sd a5,-120(s0)
55a: 000b3983 ld s3,0(s6)
putc(fd, '0');
55e: 03000593 li a1,48
562: 8556 mv a0,s5
564: 00000097 auipc ra,0x0
568: e2e080e7 jalr -466(ra) # 392 <putc>
putc(fd, 'x');
56c: 07800593 li a1,120
570: 8556 mv a0,s5
572: 00000097 auipc ra,0x0
576: e20080e7 jalr -480(ra) # 392 <putc>
57a: 896a mv s2,s10
putc(fd, digits[x >> (sizeof(uint64) * 8 - 4)]);
57c: 03c9d793 srli a5,s3,0x3c
580: 97de add a5,a5,s7
582: 0007c583 lbu a1,0(a5)
586: 8556 mv a0,s5
588: 00000097 auipc ra,0x0
58c: e0a080e7 jalr -502(ra) # 392 <putc>
for (i = 0; i < (sizeof(uint64) * 2); i++, x <<= 4)
590: 0992 slli s3,s3,0x4
592: 397d addiw s2,s2,-1
594: fe0914e3 bnez s2,57c <vprintf+0x11c>
printptr(fd, va_arg(ap, uint64));
598: f8843b03 ld s6,-120(s0)
state = 0;
59c: 4981 li s3,0
59e: b70d j 4c0 <vprintf+0x60>
s = va_arg(ap, char*);
5a0: 008b0913 addi s2,s6,8
5a4: 000b3983 ld s3,0(s6)
if(s == 0)
5a8: 02098163 beqz s3,5ca <vprintf+0x16a>
while(*s != 0){
5ac: 0009c583 lbu a1,0(s3)
5b0: c5ad beqz a1,61a <vprintf+0x1ba>
putc(fd, *s);
5b2: 8556 mv a0,s5
5b4: 00000097 auipc ra,0x0
5b8: dde080e7 jalr -546(ra) # 392 <putc>
s++;
5bc: 0985 addi s3,s3,1
while(*s != 0){
5be: 0009c583 lbu a1,0(s3)
5c2: f9e5 bnez a1,5b2 <vprintf+0x152>
s = va_arg(ap, char*);
5c4: 8b4a mv s6,s2
state = 0;
5c6: 4981 li s3,0
5c8: bde5 j 4c0 <vprintf+0x60>
s = "(null)";
5ca: 00000997 auipc s3,0x0
5ce: 2e698993 addi s3,s3,742 # 8b0 <l_free+0x22>
while(*s != 0){
5d2: 85ee mv a1,s11
5d4: bff9 j 5b2 <vprintf+0x152>
putc(fd, va_arg(ap, uint));
5d6: 008b0913 addi s2,s6,8
5da: 000b4583 lbu a1,0(s6)
5de: 8556 mv a0,s5
5e0: 00000097 auipc ra,0x0
5e4: db2080e7 jalr -590(ra) # 392 <putc>
5e8: 8b4a mv s6,s2
state = 0;
5ea: 4981 li s3,0
5ec: bdd1 j 4c0 <vprintf+0x60>
putc(fd, c);
5ee: 85d2 mv a1,s4
5f0: 8556 mv a0,s5
5f2: 00000097 auipc ra,0x0
5f6: da0080e7 jalr -608(ra) # 392 <putc>
state = 0;
5fa: 4981 li s3,0
5fc: b5d1 j 4c0 <vprintf+0x60>
putc(fd, '%');
5fe: 85d2 mv a1,s4
600: 8556 mv a0,s5
602: 00000097 auipc ra,0x0
606: d90080e7 jalr -624(ra) # 392 <putc>
putc(fd, c);
60a: 85ca mv a1,s2
60c: 8556 mv a0,s5
60e: 00000097 auipc ra,0x0
612: d84080e7 jalr -636(ra) # 392 <putc>
state = 0;
616: 4981 li s3,0
618: b565 j 4c0 <vprintf+0x60>
s = va_arg(ap, char*);
61a: 8b4a mv s6,s2
state = 0;
61c: 4981 li s3,0
61e: b54d j 4c0 <vprintf+0x60>
}
}
}
620: 70e6 ld ra,120(sp)
622: 7446 ld s0,112(sp)
624: 74a6 ld s1,104(sp)
626: 7906 ld s2,96(sp)
628: 69e6 ld s3,88(sp)
62a: 6a46 ld s4,80(sp)
62c: 6aa6 ld s5,72(sp)
62e: 6b06 ld s6,64(sp)
630: 7be2 ld s7,56(sp)
632: 7c42 ld s8,48(sp)
634: 7ca2 ld s9,40(sp)
636: 7d02 ld s10,32(sp)
638: 6de2 ld s11,24(sp)
63a: 6109 addi sp,sp,128
63c: 8082 ret
000000000000063e <fprintf>:
void
fprintf(int fd, const char *fmt, ...)
{
63e: 715d addi sp,sp,-80
640: ec06 sd ra,24(sp)
642: e822 sd s0,16(sp)
644: 1000 addi s0,sp,32
646: e010 sd a2,0(s0)
648: e414 sd a3,8(s0)
64a: e818 sd a4,16(s0)
64c: ec1c sd a5,24(s0)
64e: 03043023 sd a6,32(s0)
652: 03143423 sd a7,40(s0)
va_list ap;
va_start(ap, fmt);
656: fe843423 sd s0,-24(s0)
vprintf(fd, fmt, ap);
65a: 8622 mv a2,s0
65c: 00000097 auipc ra,0x0
660: e04080e7 jalr -508(ra) # 460 <vprintf>
}
664: 60e2 ld ra,24(sp)
666: 6442 ld s0,16(sp)
668: 6161 addi sp,sp,80
66a: 8082 ret
000000000000066c <printf>:
void
printf(const char *fmt, ...)
{
66c: 711d addi sp,sp,-96
66e: ec06 sd ra,24(sp)
670: e822 sd s0,16(sp)
672: 1000 addi s0,sp,32
674: e40c sd a1,8(s0)
676: e810 sd a2,16(s0)
678: ec14 sd a3,24(s0)
67a: f018 sd a4,32(s0)
67c: f41c sd a5,40(s0)
67e: 03043823 sd a6,48(s0)
682: 03143c23 sd a7,56(s0)
va_list ap;
va_start(ap, fmt);
686: 00840613 addi a2,s0,8
68a: fec43423 sd a2,-24(s0)
vprintf(1, fmt, ap);
68e: 85aa mv a1,a0
690: 4505 li a0,1
692: 00000097 auipc ra,0x0
696: dce080e7 jalr -562(ra) # 460 <vprintf>
}
69a: 60e2 ld ra,24(sp)
69c: 6442 ld s0,16(sp)
69e: 6125 addi sp,sp,96
6a0: 8082 ret
00000000000006a2 <free>:
6a2: 1141 addi sp,sp,-16
6a4: e422 sd s0,8(sp)
6a6: 0800 addi s0,sp,16
6a8: ff050693 addi a3,a0,-16
6ac: 00000797 auipc a5,0x0
6b0: 28c7b783 ld a5,652(a5) # 938 <freep>
6b4: a805 j 6e4 <free+0x42>
6b6: 4618 lw a4,8(a2)
6b8: 9db9 addw a1,a1,a4
6ba: feb52c23 sw a1,-8(a0)
6be: 6398 ld a4,0(a5)
6c0: 6318 ld a4,0(a4)
6c2: fee53823 sd a4,-16(a0)
6c6: a091 j 70a <free+0x68>
6c8: ff852703 lw a4,-8(a0)
6cc: 9e39 addw a2,a2,a4
6ce: c790 sw a2,8(a5)
6d0: ff053703 ld a4,-16(a0)
6d4: e398 sd a4,0(a5)
6d6: a099 j 71c <free+0x7a>
6d8: 6398 ld a4,0(a5)
6da: 00e7e463 bltu a5,a4,6e2 <free+0x40>
6de: 00e6ea63 bltu a3,a4,6f2 <free+0x50>
6e2: 87ba mv a5,a4
6e4: fed7fae3 bgeu a5,a3,6d8 <free+0x36>
6e8: 6398 ld a4,0(a5)
6ea: 00e6e463 bltu a3,a4,6f2 <free+0x50>
6ee: fee7eae3 bltu a5,a4,6e2 <free+0x40>
6f2: ff852583 lw a1,-8(a0)
6f6: 6390 ld a2,0(a5)
6f8: 02059713 slli a4,a1,0x20
6fc: 9301 srli a4,a4,0x20
6fe: 0712 slli a4,a4,0x4
700: 9736 add a4,a4,a3
702: fae60ae3 beq a2,a4,6b6 <free+0x14>
706: fec53823 sd a2,-16(a0)
70a: 4790 lw a2,8(a5)
70c: 02061713 slli a4,a2,0x20
710: 9301 srli a4,a4,0x20
712: 0712 slli a4,a4,0x4
714: 973e add a4,a4,a5
716: fae689e3 beq a3,a4,6c8 <free+0x26>
71a: e394 sd a3,0(a5)
71c: 00000717 auipc a4,0x0
720: 20f73e23 sd a5,540(a4) # 938 <freep>
724: 6422 ld s0,8(sp)
726: 0141 addi sp,sp,16
728: 8082 ret
000000000000072a <malloc>:
72a: 7139 addi sp,sp,-64
72c: fc06 sd ra,56(sp)
72e: f822 sd s0,48(sp)
730: f426 sd s1,40(sp)
732: f04a sd s2,32(sp)
734: ec4e sd s3,24(sp)
736: e852 sd s4,16(sp)
738: e456 sd s5,8(sp)
73a: e05a sd s6,0(sp)
73c: 0080 addi s0,sp,64
73e: 02051493 slli s1,a0,0x20
742: 9081 srli s1,s1,0x20
744: 04bd addi s1,s1,15
746: 8091 srli s1,s1,0x4
748: 0014899b addiw s3,s1,1
74c: 0485 addi s1,s1,1
74e: 00000517 auipc a0,0x0
752: 1ea53503 ld a0,490(a0) # 938 <freep>
756: c515 beqz a0,782 <malloc+0x58>
758: 611c ld a5,0(a0)
75a: 4798 lw a4,8(a5)
75c: 02977f63 bgeu a4,s1,79a <malloc+0x70>
760: 8a4e mv s4,s3
762: 0009871b sext.w a4,s3
766: 6685 lui a3,0x1
768: 00d77363 bgeu a4,a3,76e <malloc+0x44>
76c: 6a05 lui s4,0x1
76e: 000a0b1b sext.w s6,s4
772: 004a1a1b slliw s4,s4,0x4
776: 00000917 auipc s2,0x0
77a: 1c290913 addi s2,s2,450 # 938 <freep>
77e: 5afd li s5,-1
780: a88d j 7f2 <malloc+0xc8>
782: 00000797 auipc a5,0x0
786: 1be78793 addi a5,a5,446 # 940 <base>
78a: 00000717 auipc a4,0x0
78e: 1af73723 sd a5,430(a4) # 938 <freep>
792: e39c sd a5,0(a5)
794: 0007a423 sw zero,8(a5)
798: b7e1 j 760 <malloc+0x36>
79a: 02e48b63 beq s1,a4,7d0 <malloc+0xa6>
79e: 4137073b subw a4,a4,s3
7a2: c798 sw a4,8(a5)
7a4: 1702 slli a4,a4,0x20
7a6: 9301 srli a4,a4,0x20
7a8: 0712 slli a4,a4,0x4
7aa: 97ba add a5,a5,a4
7ac: 0137a423 sw s3,8(a5)
7b0: 00000717 auipc a4,0x0
7b4: 18a73423 sd a0,392(a4) # 938 <freep>
7b8: 01078513 addi a0,a5,16
7bc: 70e2 ld ra,56(sp)
7be: 7442 ld s0,48(sp)
7c0: 74a2 ld s1,40(sp)
7c2: 7902 ld s2,32(sp)
7c4: 69e2 ld s3,24(sp)
7c6: 6a42 ld s4,16(sp)
7c8: 6aa2 ld s5,8(sp)
7ca: 6b02 ld s6,0(sp)
7cc: 6121 addi sp,sp,64
7ce: 8082 ret
7d0: 6398 ld a4,0(a5)
7d2: e118 sd a4,0(a0)
7d4: bff1 j 7b0 <malloc+0x86>
7d6: 01652423 sw s6,8(a0)
7da: 0541 addi a0,a0,16
7dc: 00000097 auipc ra,0x0
7e0: ec6080e7 jalr -314(ra) # 6a2 <free>
7e4: 00093503 ld a0,0(s2)
7e8: d971 beqz a0,7bc <malloc+0x92>
7ea: 611c ld a5,0(a0)
7ec: 4798 lw a4,8(a5)
7ee: fa9776e3 bgeu a4,s1,79a <malloc+0x70>
7f2: 00093703 ld a4,0(s2)
7f6: 853e mv a0,a5
7f8: fef719e3 bne a4,a5,7ea <malloc+0xc0>
7fc: 8552 mv a0,s4
7fe: 00000097 auipc ra,0x0
802: b7c080e7 jalr -1156(ra) # 37a <sbrk>
806: fd5518e3 bne a0,s5,7d6 <malloc+0xac>
80a: 4501 li a0,0
80c: bf45 j 7bc <malloc+0x92>
000000000000080e <mem_init>:
80e: 1141 addi sp,sp,-16
810: e406 sd ra,8(sp)
812: e022 sd s0,0(sp)
814: 0800 addi s0,sp,16
816: 6505 lui a0,0x1
818: 00000097 auipc ra,0x0
81c: b62080e7 jalr -1182(ra) # 37a <sbrk>
820: 00000797 auipc a5,0x0
824: 10a7b823 sd a0,272(a5) # 930 <alloc>
828: 00850793 addi a5,a0,8 # 1008 <__BSS_END__+0x6b8>
82c: e11c sd a5,0(a0)
82e: 60a2 ld ra,8(sp)
830: 6402 ld s0,0(sp)
832: 0141 addi sp,sp,16
834: 8082 ret
0000000000000836 <l_alloc>:
836: 1101 addi sp,sp,-32
838: ec06 sd ra,24(sp)
83a: e822 sd s0,16(sp)
83c: e426 sd s1,8(sp)
83e: 1000 addi s0,sp,32
840: 84aa mv s1,a0
842: 00000797 auipc a5,0x0
846: 0e67a783 lw a5,230(a5) # 928 <if_init>
84a: c795 beqz a5,876 <l_alloc+0x40>
84c: 00000717 auipc a4,0x0
850: 0e473703 ld a4,228(a4) # 930 <alloc>
854: 6308 ld a0,0(a4)
856: 40e506b3 sub a3,a0,a4
85a: 6785 lui a5,0x1
85c: 37e1 addiw a5,a5,-8
85e: 9f95 subw a5,a5,a3
860: 02f4f563 bgeu s1,a5,88a <l_alloc+0x54>
864: 1482 slli s1,s1,0x20
866: 9081 srli s1,s1,0x20
868: 94aa add s1,s1,a0
86a: e304 sd s1,0(a4)
86c: 60e2 ld ra,24(sp)
86e: 6442 ld s0,16(sp)
870: 64a2 ld s1,8(sp)
872: 6105 addi sp,sp,32
874: 8082 ret
876: 00000097 auipc ra,0x0
87a: f98080e7 jalr -104(ra) # 80e <mem_init>
87e: 4785 li a5,1
880: 00000717 auipc a4,0x0
884: 0af72423 sw a5,168(a4) # 928 <if_init>
888: b7d1 j 84c <l_alloc+0x16>
88a: 4501 li a0,0
88c: b7c5 j 86c <l_alloc+0x36>
000000000000088e <l_free>:
88e: 1141 addi sp,sp,-16
890: e422 sd s0,8(sp)
892: 0800 addi s0,sp,16
894: 6422 ld s0,8(sp)
896: 0141 addi sp,sp,16
898: 8082 ret
|
src/firmware-tests/Platform/ShiftRegister/EnableShiftRegisterDummy.asm
|
pete-restall/Cluck2Sesame-Prototype
| 1 |
241617
|
#include "Platform.inc"
radix decimal
EnableShiftRegisterDummy code
global enableShiftRegister
enableShiftRegister:
return
end
|
asm/stackPsuh.asm
|
CarlosSoPe6/HanoiMIPS
| 0 |
9386
|
# ------ [ stackPush ] ----------------------
#
# Adds a element to the stack
# param $a0: Stack ref
# param $a1: Data to push
stackPush:
lw $t0, 0($s0) # Load the stack's reference
sw $a1, 0($t0) # Store at stack's reference
addi $t0, $t0, -4 # $t0 = $t0 + -4
sw $t0, 0($s0) # Store the new stack reference
jr $ra # jump to $ra
|
source/tasking/a-synbar.adb
|
ytomino/drake
| 33 |
5221
|
<gh_stars>10-100
with System.Synchronous_Objects.Abortable;
with System.Tasks;
package body Ada.Synchronous_Barriers is
procedure Do_Wait (
Object : in out Synchronous_Barrier;
Notified : out Boolean;
Aborted : out Boolean);
procedure Do_Wait (
Object : in out Synchronous_Barrier;
Notified : out Boolean;
Aborted : out Boolean)
is
Order : Natural;
begin
System.Synchronous_Objects.Enter (Object.Mutex);
Object.Blocked := Object.Blocked + 1;
Order := Object.Blocked rem Object.Release_Threshold;
Notified := Order = 1 or else Object.Release_Threshold = 1; -- first one
if Order = 0 then
System.Synchronous_Objects.Set (Object.Event);
Aborted := System.Tasks.Is_Aborted;
Object.Unblocked := Object.Unblocked + 1;
else
loop
System.Synchronous_Objects.Leave (Object.Mutex);
System.Synchronous_Objects.Abortable.Wait (Object.Event, Aborted);
System.Synchronous_Objects.Enter (Object.Mutex);
exit when Object.Blocked >= Object.Release_Threshold
or else Aborted;
end loop;
Object.Unblocked := Object.Unblocked + 1;
end if;
if Object.Unblocked = Object.Release_Threshold then
Object.Blocked := Object.Blocked - Object.Release_Threshold;
Object.Unblocked := 0;
if Object.Blocked < Object.Release_Threshold then
System.Synchronous_Objects.Reset (Object.Event);
end if;
end if;
System.Synchronous_Objects.Leave (Object.Mutex);
end Do_Wait;
-- implementation
procedure Wait_For_Release (
The_Barrier : in out Synchronous_Barrier;
Notified : out Boolean)
is
Aborted : Boolean;
begin
System.Tasks.Enable_Abort;
Do_Wait (The_Barrier, Notified, Aborted => Aborted);
System.Tasks.Disable_Abort (Aborted);
end Wait_For_Release;
overriding procedure Initialize (Object : in out Synchronous_Barrier) is
begin
Object.Blocked := 0;
Object.Unblocked := 0;
System.Synchronous_Objects.Initialize (Object.Mutex);
System.Synchronous_Objects.Initialize (Object.Event);
end Initialize;
overriding procedure Finalize (Object : in out Synchronous_Barrier) is
begin
System.Synchronous_Objects.Finalize (Object.Mutex);
System.Synchronous_Objects.Finalize (Object.Event);
end Finalize;
end Ada.Synchronous_Barriers;
|
test/Tree.agda
|
agda/agda2hs
| 55 |
5315
|
open import Haskell.Prim
open import Agda.Builtin.Nat
data _≤_ : Nat → Nat → Set where
instance
zero-≤ : ∀ {n} → zero ≤ n
suc-≤ : ∀ {m n} → @0 {{m ≤ n}} → suc m ≤ suc n
data Tree {l u : Nat} : Set where
Leaf : @0 {{l ≤ u}} → Tree {l} {u}
Node : (x : Nat) → Tree {l} {x} → Tree {x} {u} → Tree {l} {u}
{-# COMPILE AGDA2HS Tree #-}
|
oeis/158/A158730.asm
|
neoneye/loda-programs
| 11 |
168642
|
<reponame>neoneye/loda-programs<filename>oeis/158/A158730.asm
; A158730: a(n) = 68*n^2 - 1.
; Submitted by <NAME>
; 67,271,611,1087,1699,2447,3331,4351,5507,6799,8227,9791,11491,13327,15299,17407,19651,22031,24547,27199,29987,32911,35971,39167,42499,45967,49571,53311,57187,61199,65347,69631,74051,78607,83299,88127,93091,98191,103427,108799,114307,119951,125731,131647,137699,143887,150211,156671,163267,169999,176867,183871,191011,198287,205699,213247,220931,228751,236707,244799,253027,261391,269891,278527,287299,296207,305251,314431,323747,333199,342787,352511,362371,372367,382499,392767,403171,413711,424387
add $0,1
pow $0,2
mul $0,68
sub $0,1
|
src/firmware-tests/Platform/Adc/ChannelDummies.asm
|
pete-restall/Cluck2Sesame-Prototype
| 1 |
99749
|
#include "Platform.inc"
radix decimal
ChannelDummies code
global setAdcChannel
global releaseAdcChannel
setAdcChannel:
releaseAdcChannel:
return
end
|
languages/42/examples/test_problem.asm
|
c3333/sphereengine-languages
| 5 |
27130
|
global _start
section .data
buffer dw 0h
section .text
_start:
mov ecx, buffer
mov edx, 02h
call read
mov cx, word [buffer]
cmp cx, 3234h
je exit
cmp ch, 0ah
je one_dig
jmp two_dig
one_dig:
mov ecx, buffer
mov edx, 02h
call write
jmp _start
two_dig:
mov ecx, buffer
mov edx, 02h
call write
mov edx, 01h
mov ecx, buffer
call read ; read the 0ah
mov ecx, buffer
call write ; write the 0ah
jmp _start
exit:
mov eax, 01h ; exit()
xor ebx, ebx ; errno
int 80h
read:
mov eax, 03h ; read()
mov ebx, 00h ; stdin
int 80h
ret
write:
mov eax, 04h ; write()
mov ebx, 01h ; stdout
int 80h
ret
|
start.asm
|
cknave/wolol
| 2 |
20958
|
<gh_stars>1-10
bits 64
extern exit, main
section .text
global _start
_start:
mov rdi, [rsp]
lea rsi, [rsp+8]
call main
mov rdi, rax
jmp exit
|
Universe/Sun/SunApplyMyRollAndPitch.asm
|
ped7g/EliteNext
| 0 |
17590
|
; Full version
; 1. K2 = y - alpha * x
; 2. z = z + beta * K2
; 3. y = K2 - beta * z
; 4. x = x + alpha * y
; SunrollWork holds Alpha intermidate results
SunRollResult: DS 3 ; equivalent of K
SunRollResultp1 equ SunRollResult
SunRollResultp2 equ SunRollResult+1
SunRollResultp3 equ SunRollResult+2
SunRollResultp4 DB 0
;SunRollResult2: DS 3 ; do we need this? TODO
SunZResult: DS 3
; 1. K2 = y - alpha * x
; 2. z = z + beta * K2
; 3. y = K2 - beta * z
; 4. x = x + alpha * y
;.... or
; 2. z = z + (beta * (y - alpha * x))
; 3. y = (y - alpha * x) - (beta * z)
; 4. x = x + (alpha * y)
;----------------------------------------------------------------------------------------------------------------------------------
; based on MV40
SunApplyMyRollAndPitch: ld a,(ALPHA) ; no roll or pitch, no calc needed
ld hl,BETA
or (hl)
and SignMask8Bit
jp z,.NoRotation
.CalcZ: ;break
ld a,(ALPHA) ; get roll magnitude
cp 0
jr nz,.ApplyAlpha
.NoAlpha: ld de,(SBnKyhi) ; its going to be just Y if alpha is 0
ld a,(SBnKylo) ; .
ld l,a ; .
jp .SaveResult1 ; .
.ApplyAlpha: xor SignOnly8Bit ; get Q = -alpha
ld d,a ; d reg represents Q (abount to roll)
ld a,(SBnKxlo) ; HLE = x sgn, hi, lo
ld e,a ;
ld hl,(SBnKxhi) ;
call mulHLEbyDSigned ; DELC = x * -alpha, so DEL = X * -alpha / 256
.SkipAlphaMultiply: ld a,d
ld (SunRollResultp4),a ; save D (I guess we need the sign?)
.CalcYPlusDEL: ld a,(SBnKylo) ; BCH = Y sgn, hi, lo
ld h,a
ld bc,(SBnKyhi)
call AddBCHtoDELsigned ; DEL = Y - ( X * alpha /256) (which is K2)
.SaveResult1: ld a,d ; SunPitchWork = AHL = DEL
ld h,e ;
.CopyResultTo2: ld (SunRollResult+2),a ; .
ld (SunRollResult) ,hl ; .
.CalcY: ld e,l ; HLE = result (K2)
ld l,h ; .
ld h,a ; .
ld a,(BETA) ; get pitch
ld d,a ; now D = BETA
call mulHLEbyDSigned ; DELC = (y - alpha * x /256 ) * Beta or K2 * beta
ld bc,(SBnKzhi) ; BCH = z
ld a,(SBnKzlo) ; .
ld h,a ; .
call AddBCHtoDELsigned ; DEL = z + ((y - alpha * x /256 ) * Beta) /256
.SaveZResult: ld (SunZResult+1),de ; We now have a z result which we save
ld (SBnKzhi),de ; .
ld a,l ; .
ld (SunZResult),a ; .
ld (SBnKzlo),a ; .
.CalcMinusBetaMulZ: ex de,hl ; HLE = DEL = z post calculation
; not needed bugld e,l ; .
ld a,(BETA) ; d = - BETA
xor SignOnly8Bit ; .
ld d,a ; .
call mulHLEbyDSigned ; DELC = z * - BETA
ld bc, (SunRollResult+1) ; BCH = (y - alpha * x) (or K2)
ld a,(SunRollResult) ; .
ld h,a ; .
call AddBCHtoDELsigned ; DEL = (y - alpha * x) - (Z * BETA) (K2+ (Z * -BETA)
ld (SBnKyhi),de ; y = (y - alpha * x) - (Z * BETA)
ld a,l ; .
ld (SBnKylo),a ; .
.CalcX: ex de,hl ; HLE = DEL = Y
ld e,l ; .
ld a,(ALPHA) ; D = alpha
cp 0 ; if alpha is 0 then don't update x
jp z,.NoRotation
ld d,a ; .
call mulHLEbyDSigned ; DELC = Y * alpha
ld bc,(SBnKxhi) ; BCH = x
ld a,(SBnKxlo) ; .
ld h,a ; .
call AddBCHtoDELsigned ; DEL = x + (alpha * y /256 )
ld (SBnKxhi),de ; x = x + (alpha * y /256 )
ld a,h ; .
ld (SBnKxlo),a ; .
ret
.NoRotation: ld a,(DELTA) ; BCH = - Delta
cp 0
ret z
ld c,0 ;
ld h,a ;
ld b,$80 ;
ld de,(SBnKzhi) ; DEL = z position
ld a,(SBnKzlo) ; .
ld l,a ; .
call AddBCHtoDELsigned ; update speed
ld (SBnKzhi),DE ; write back to zpos
ld a,l
ld (SBnKzlo),a ;
ret
;
;SunApplyMyRollAndPitch: ld a,(ALPHA) ; no roll or pitch, no calc needed
; ld hl,BETA
; or (hl)
; and SignMask8Bit
; ret z
;.CalcZ: ;break
; ld a,(ALPHA) ; get roll magnitude
; xor SignOnly8Bit ; get Q = -alpha
; ld d,a ; d reg represents Q (abount to roll)
; ld a,(SBnKxlo) ; HLE = x sgn, hi, lo
; ld e,a ;
; ld hl,(SBnKxhi) ;
; call mulHLEbyDSigned ; DELC = x * -alpha, so DEL = X * -alpha / 256
; ld a,d
; ld (SunRollResultp4),a ; save D (I guess we need the sign?)
;.CalcYPlusDEL: ld a,(SBnKylo) ; BCH = Y sgn, hi, lo
; ld h,a
; ld bc,(SBnKyhi)
; call AddBCHtoDELsigned ; DEL = Y - ( X * alpha /256)
;.SaveResult1: ld a,l ; SunPitchWork = DEL
; ;ld (SunRollResult), a ; SunPitchWork + 0 = L
; ex de,hl ; SunPitchWork + 1 = E
;.CopyResultTo2: ld (SunRollResult+1),a ; SunPitchWork + 2 = D
; ld (SunRollResult+1) ,hl ; Copy K to K2 (y - alpha * x)
; ;ld (SunRollResult2+1),hl ; also HLA = result
; ld a,(SunRollResult) ; .
; ;ld (SunRollResult2),a ; .
;.CalcY: ld e,a ; so now HLE = result
; ld a,(BETA) ; get pitch
; ld d,a ; now D = BETA
; call mulHLEbyDSigned ; DELC = (y - alpha * x /256 ) * Beta
; ld bc,(SBnKzhi) ; BCH = z
; ld a,(SBnKzlo) ;
; ld h,a ;
; call AddBCHtoDELsigned ; DEL = z + ((y - alpha * x /256 ) * Beta) /256
;.SaveZResult: ld (SunZResult+1),de ; We now have a z result which we save
; ld (SBnKzhi),de ; .
; ld a,l ; .
; ld (SunZResult),a ; .
; ld (SBnKzlo),a ; .
;.CalcMinusBetaMulZ: ex de,hl ; HLE = DEL = z post calculation
; ld e,l ;
; ld a,(BETA) ; d = - BETA
; ld d,a ;
; xor SignOnly8Bit ;
; call mulHLEbyDSigned ; DELC = z * - BETA
; ld bc, (SunRollResult+1) ; BCH = (y - alpha * x) (or K2)
; ld a,(SunRollResult) ;
; ld h,a ;
; call AddBCHtoDELsigned ; DEL = (y - alpha * x) - (Z * BETA)
; ld (SBnKyhi),de ; y = (y - alpha * x) - (Z * BETA)
; ld a,l ;
; ld (SBnKylo),a ;
;.CalcX: ex de,hl ; HLE = DEL = Y
; ld e,l ;
; ld a,(ALPHA)
; ld d,a ; D = alpha
; call mulHLEbyDSigned ; DELC = Y * alpha
; ld bc,(SBnKxhi) ; BCH = x
; ld a,(SBnKxlo) ;
; ld h,a ;
; call AddBCHtoDELsigned ; DEL = x + (alpha * y /256 )
; ld (SBnKxhi),de ; x = x + (alpha * y /256 )
; ld a,h ;
; ld (SBnKxlo),a ;
; ret
;
|
topic/source/Topic.applescript
|
FradSer/automation-omnifocus-3
| 11 |
2731
|
(*
Topic.applescript
By <NAME> of [Hello from FradSer](http://fradser.me).
See README for details.
*)
-- PROPS
property isNotify : false
property scriptSuiteName : "Frad's Scripts"
-- MAIN
set newTopic to missing value
tell application "OmniFocus"
tell front document
tell content of document window 1
set anProject to value of (first descendant tree where class of its value is project)
set projectNote to note of anProject
set projectTitle to name of anProject
if projectNote does not contain "$topic" then
set topicName to do shell script "echo '" & projectTitle & "'|sed 's/\\[//' | sed 's/\\]//'"
set note of anProject to projectNote & return & "------------------------" & return & "$topic: " & topicName
else
set allTask to value of (every descendant tree where class of its value is task)
repeat with anTask in allTask
if name of anTask contains "$topic" then
set newTopic to do shell script "echo '" & projectNote & "' | sed -n '/$topic: /p' | sed 's/$topic: //g'"
set taskTitle to name of anTask
set name of anTask to do shell script "echo '" & taskTitle & "' | sed 's/$topic/#" & newTopic & " /g'"
if (newTopic is not missing value) and (isNotify) then
my notify("Changed topic.", newTopic)
end if
end if
end repeat
end if
end tell
end tell
end tell
-- NOTIFY
on notify(theTitle, theDescription)
display notification theDescription with title scriptSuiteName subtitle theTitle
end notify
|
orka/src/orka/windows/orka-os.ads
|
onox/orka
| 52 |
29908
|
<reponame>onox/orka
-- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2017 onox <<EMAIL>>
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
package Orka.OS is
pragma Preelaborate;
procedure Set_Task_Name (Name : in String)
with Pre => Name'Length <= 15;
function Monotonic_Clock return Duration
with Inline;
function Monotonic_Clock return Time
with Inline;
type File_Kind is (Standard_Error, Standard_Output);
procedure Put_Line (Value : String; Kind : File_Kind := Standard_Output);
end Orka.OS;
|
test/Succeed/Issue1652-2.agda
|
shlevy/agda
| 0 |
12265
|
{- Example by Andreas (2015-09-18) -}
{-# OPTIONS --rewriting --local-confluence-check #-}
open import Common.Prelude
open import Common.Equality
{-# BUILTIN REWRITE _≡_ #-}
module _ (A : Set) where
postulate
plus0p : ∀{x} → (x + zero) ≡ x
{-# REWRITE plus0p #-}
|
ZORTON.reko/ZORTON_142E.asm
|
0xLiso/dePIXELator
| 0 |
98305
|
;;; Segment 142E (142E:0000)
142E:0000 47 E2 C2 07 1F 5F 5E 5A 59 8B E5 5D C9 CB C8 0A G...._^ZY..]....
142E:0010 00 00 68 01 80 1E 68 E8 20 9A 15 36 00 08 83 C4 ..h...h. ..6....
142E:0020 06 89 46 FE 83 7E FE FF 75 0C 1E 68 E8 20 9A F3 ..F..~..u..h. ..
142E:0030 03 3F 26 83 C4 04 6A 00 66 6A 04 FF 76 FE 9A AB .?&...j.fj..v...
142E:0040 06 00 08 83 C4 08 B8 BA 28 8E C0 66 26 A1 D4 A0 ........(..f&...
142E:0050 66 89 46 F8 68 8C 09 66 FF 76 F8 FF 76 FE 9A 87 f.F.h..f.v..v...
142E:0060 3C 00 08 83 C4 08 81 46 F8 8C 09 FF 76 FE 9A 93 <......F....v...
142E:0070 2A 00 08 59 68 01 80 1E 68 F3 20 9A 15 36 00 08 *..Yh...h. ..6..
142E:0080 83 C4 06 89 46 FE 83 7E FE FF 75 0C 1E 68 F3 20 ....F..~..u..h.
142E:0090 9A F3 03 3F 26 83 C4 04 6A 00 66 6A 04 FF 76 FE ...?&...j.fj..v.
142E:00A0 9A AB 06 00 08 83 C4 08 68 BC 02 66 FF 76 F8 FF ........h..f.v..
142E:00B0 76 FE 9A 87 3C 00 08 83 C4 08 81 46 F8 BC 02 6A v...<......F...j
142E:00C0 01 66 6A 04 FF 76 FE 9A AB 06 00 08 83 C4 08 68 .fj..v.........h
142E:00D0 BC 02 66 FF 76 F8 FF 76 FE 9A 87 3C 00 08 83 C4 ..f.v..v...<....
142E:00E0 08 81 46 F8 BC 02 FF 76 FE 9A 93 2A 00 08 59 68 ..F....v...*..Yh
142E:00F0 01 80 1E 68 FF 20 9A 15 36 00 08 83 C4 06 89 46 ...h. ..6......F
142E:0100 FE 83 7E FE FF 75 0C 1E 68 FF 20 9A F3 03 3F 26 ..~..u..h. ...?&
142E:0110 83 C4 04 6A 00 66 6A 04 FF 76 FE 9A AB 06 00 08 ...j.fj..v......
142E:0120 83 C4 08 68 8C 0A 66 FF 76 F8 FF 76 FE 9A 87 3C ...h..f.v..v...<
142E:0130 00 08 83 C4 08 81 46 F8 8C 0A 6A 01 66 6A 04 FF ......F...j.fj..
142E:0140 76 FE 9A AB 06 00 08 83 C4 08 68 8C 0A 66 FF 76 v.........h..f.v
142E:0150 F8 FF 76 FE 9A 87 3C 00 08 83 C4 08 81 46 F8 8C ..v...<......F..
142E:0160 0A 6A 01 66 6A 04 FF 76 FE 9A AB 06 00 08 83 C4 .j.fj..v........
142E:0170 08 68 84 03 66 FF 76 F8 FF 76 FE 9A 87 3C 00 08 .h..f.v..v...<..
142E:0180 83 C4 08 81 46 F8 84 03 6A 01 66 6A 04 FF 76 FE ....F...j.fj..v.
142E:0190 9A AB 06 00 08 83 C4 08 68 08 07 66 FF 76 F8 FF ........h..f.v..
142E:01A0 76 FE 9A 87 3C 00 08 83 C4 08 81 46 F8 08 07 6A v...<......F...j
142E:01B0 01 66 6A 04 FF 76 FE 9A AB 06 00 08 83 C4 08 68 .fj..v.........h
142E:01C0 C0 15 66 FF 76 F8 FF 76 FE 9A 87 3C 00 08 83 C4 ..f.v..v...<....
142E:01D0 08 81 46 F8 C0 15 6A 01 66 6A 04 FF 76 FE 9A AB ..F...j.fj..v...
142E:01E0 06 00 08 83 C4 08 68 A8 0C 66 FF 76 F8 FF 76 FE ......h..f.v..v.
142E:01F0 9A 87 3C 00 08 83 C4 08 81 46 F8 A8 0C 6A 01 66 ..<......F...j.f
142E:0200 6A 04 FF 76 FE 9A AB 06 00 08 83 C4 08 68 00 09 j..v.........h..
142E:0210 66 FF 76 F8 FF 76 FE 9A 87 3C 00 08 83 C4 08 81 f.v..v...<......
142E:0220 46 F8 00 09 6A 01 66 6A 04 FF 76 FE 9A AB 06 00 F...j.fj..v.....
142E:0230 08 83 C4 08 68 84 03 66 FF 76 F8 FF 76 FE 9A 87 ....h..f.v..v...
142E:0240 3C 00 08 83 C4 08 81 46 F8 84 03 FF 76 FE 9A 93 <......F....v...
142E:0250 2A 00 08 59 68 01 80 1E 68 0B 21 9A 15 36 00 08 *..Yh...h.!..6..
142E:0260 83 C4 06 89 46 FE 83 7E FE FF 75 0C 1E 68 0B 21 ....F..~..u..h.!
142E:0270 9A F3 03 3F 26 83 C4 04 6A 00 66 6A 04 FF 76 FE ...?&...j.fj..v.
142E:0280 9A AB 06 00 08 83 C4 08 68 9A 0B 66 FF 76 F8 FF ........h..f.v..
142E:0290 76 FE 9A 87 3C 00 08 83 C4 08 81 46 F8 9A 0B 6A v...<......F...j
142E:02A0 01 66 6A 04 FF 76 FE 9A AB 06 00 08 83 C4 08 68 .fj..v.........h
142E:02B0 9A 0B 66 FF 76 F8 FF 76 FE 9A 87 3C 00 08 83 C4 ..f.v..v...<....
142E:02C0 08 81 46 F8 9A 0B 6A 01 66 6A 04 FF 76 FE 9A AB ..F...j.fj..v...
142E:02D0 06 00 08 83 C4 08 68 DE 03 66 FF 76 F8 FF 76 FE ......h..f.v..v.
142E:02E0 9A 87 3C 00 08 83 C4 08 81 46 F8 DE 03 6A 01 66 ..<......F...j.f
142E:02F0 6A 04 FF 76 FE 9A AB 06 00 08 83 C4 08 68 9A 0B j..v.........h..
142E:0300 66 FF 76 F8 FF 76 FE 9A 87 3C 00 08 83 C4 08 81 f.v..v...<......
142E:0310 46 F8 9A 0B 6A 01 66 6A 04 FF 76 FE 9A AB 06 00 F...j.fj..v.....
142E:0320 08 83 C4 08 68 B0 12 66 FF 76 F8 FF 76 FE 9A 87 ....h..f.v..v...
142E:0330 3C 00 08 83 C4 08 81 46 F8 B0 12 6A 01 66 6A 04 <......F...j.fj.
142E:0340 FF 76 FE 9A AB 06 00 08 83 C4 08 68 B0 0B 66 FF .v.........h..f.
142E:0350 76 F8 FF 76 FE 9A 87 3C 00 08 83 C4 08 81 46 F8 v..v...<......F.
142E:0360 B0 0B 6A 01 66 6A 04 FF 76 FE 9A AB 06 00 08 83 ..j.fj..v.......
142E:0370 C4 08 68 90 07 66 FF 76 F8 FF 76 FE 9A 87 3C 00 ..h..f.v..v...<.
142E:0380 08 83 C4 08 81 46 F8 90 07 6A 01 66 6A 04 FF 76 .....F...j.fj..v
142E:0390 FE 9A AB 06 00 08 83 C4 08 68 20 04 66 FF 76 F8 .........h .f.v.
142E:03A0 FF 76 FE 9A 87 3C 00 08 83 C4 08 81 46 F8 20 04 .v...<......F. .
142E:03B0 FF 76 FE 9A 93 2A 00 08 59 68 01 80 1E 68 17 21 .v...*..Yh...h.!
142E:03C0 9A 15 36 00 08 83 C4 06 89 46 FE 83 7E FE FF 75 ..6......F..~..u
142E:03D0 0C 1E 68 17 21 9A F3 03 3F 26 83 C4 04 6A 00 66 ..h.!...?&...j.f
142E:03E0 6A 04 FF 76 FE 9A AB 06 00 08 83 C4 08 68 30 06 j..v.........h0.
142E:03F0 66 FF 76 F8 FF 76 FE 9A 87 3C 00 08 83 C4 08 81 f.v..v...<......
142E:0400 46 F8 30 06 6A 01 66 6A 04 FF 76 FE 9A AB 06 00 F.0.j.fj..v.....
142E:0410 08 83 C4 08 68 30 06 66 FF 76 F8 FF 76 FE 9A 87 ....h0.f.v..v...
142E:0420 3C 00 08 83 C4 08 81 46 F8 30 06 6A 01 66 6A 04 <......F.0.j.fj.
142E:0430 FF 76 FE 9A AB 06 00 08 83 C4 08 68 10 02 66 FF .v.........h..f.
142E:0440 76 F8 FF 76 FE 9A 87 3C 00 08 83 C4 08 81 46 F8 v..v...<......F.
142E:0450 10 02 6A 01 66 6A 04 FF 76 FE 9A AB 06 00 08 83 ..j.fj..v.......
142E:0460 C4 08 68 20 04 66 FF 76 F8 FF 76 FE 9A 87 3C 00 ..h .f.v..v...<.
142E:0470 08 83 C4 08 81 46 F8 20 04 6A 01 66 6A 04 FF 76 .....F. .j.fj..v
142E:0480 FE 9A AB 06 00 08 83 C4 08 68 D0 0B 66 FF 76 F8 .........h..f.v.
142E:0490 FF 76 FE 9A 87 3C 00 08 83 C4 08 81 46 F8 D0 0B .v...<......F...
142E:04A0 6A 01 66 6A 04 FF 76 FE 9A AB 06 00 08 83 C4 08 j.fj..v.........
142E:04B0 68 B4 06 66 FF 76 F8 FF 76 FE 9A 87 3C 00 08 83 h..f.v..v...<...
142E:04C0 C4 08 81 46 F8 B4 06 6A 01 66 6A 04 FF 76 FE 9A ...F...j.fj..v..
142E:04D0 AB 06 00 08 83 C4 08 68 04 06 66 FF 76 F8 FF 76 .......h..f.v..v
142E:04E0 FE 9A 87 3C 00 08 83 C4 08 81 46 F8 04 06 6A 01 ...<......F...j.
142E:04F0 66 6A 04 FF 76 FE 9A AB 06 00 08 83 C4 08 68 10 fj..v.........h.
142E:0500 02 66 FF 76 F8 FF 76 FE 9A 87 3C 00 08 83 C4 08 .f.v..v...<.....
142E:0510 81 46 F8 10 02 FF 76 FE 9A 93 2A 00 08 59 68 01 .F....v...*..Yh.
142E:0520 80 1E 68 23 21 9A 15 36 00 08 83 C4 06 89 46 FE ..h#!..6......F.
142E:0530 83 7E FE FF 75 0C 1E 68 23 21 9A F3 03 3F 26 83 .~..u..h#!...?&.
142E:0540 C4 04 6A 00 66 6A 04 FF 76 FE 9A AB 06 00 08 83 ..j.fj..v.......
142E:0550 C4 08 68 84 03 66 FF 76 F8 FF 76 FE 9A 87 3C 00 ..h..f.v..v...<.
142E:0560 08 83 C4 08 81 46 F8 84 03 6A 01 66 6A 04 FF 76 .....F...j.fj..v
142E:0570 FE 9A AB 06 00 08 83 C4 08 68 84 03 66 FF 76 F8 .........h..f.v.
142E:0580 FF 76 FE 9A 87 3C 00 08 83 C4 08 81 46 F8 84 03 .v...<......F...
142E:0590 6A 01 66 6A 04 FF 76 FE 9A AB 06 00 08 83 C4 08 j.fj..v.........
142E:05A0 68 2C 01 66 FF 76 F8 FF 76 FE 9A 87 3C 00 08 83 h,.f.v..v...<...
142E:05B0 C4 08 81 46 F8 2C 01 6A 01 66 6A 04 FF 76 FE 9A ...F.,.j.fj..v..
142E:05C0 AB 06 00 08 83 C4 08 68 84 03 66 FF 76 F8 FF 76 .......h..f.v..v
142E:05D0 FE 9A 87 3C 00 08 83 C4 08 81 46 F8 84 03 FF 76 ...<......F....v
142E:05E0 FE 9A 93 2A 00 08 59 68 01 80 1E 68 2F 21 9A 15 ...*..Yh...h/!..
142E:05F0 36 00 08 83 C4 06 89 46 FE 83 7E FE FF 75 0C 1E 6......F..~..u..
142E:0600 68 2F 21 9A F3 03 3F 26 83 C4 04 6A 00 66 6A 04 h/!...?&...j.fj.
142E:0610 FF 76 FE 9A AB 06 00 08 83 C4 08 68 8A 02 66 FF .v.........h..f.
142E:0620 76 F8 FF 76 FE 9A 87 3C 00 08 83 C4 08 81 46 F8 v..v...<......F.
142E:0630 8A 02 6A 01 66 6A 04 FF 76 FE 9A AB 06 00 08 83 ..j.fj..v.......
142E:0640 C4 08 68 B0 05 66 FF 76 F8 FF 76 FE 9A 87 3C 00 ..h..f.v..v...<.
142E:0650 08 83 C4 08 81 46 F8 B0 05 FF 76 FE 9A 93 2A 00 .....F....v...*.
142E:0660 08 59 68 01 80 1E 68 3C 21 9A 15 36 00 08 83 C4 .Yh...h<!..6....
142E:0670 06 89 46 FE 83 7E FE FF 75 0C 1E 68 3C 21 9A F3 ..F..~..u..h<!..
142E:0680 03 3F 26 83 C4 04 6A 00 66 6A 04 FF 76 FE 9A AB .?&...j.fj..v...
142E:0690 06 00 08 83 C4 08 B8 BA 28 8E C0 66 26 A1 CC A0 ........(..f&...
142E:06A0 66 89 46 F8 68 00 FA 66 FF 76 F8 FF 76 FE 9A 87 f.F.h..f.v..v...
142E:06B0 3C 00 08 83 C4 08 FF 76 FE 9A 93 2A 00 08 59 68 <......v...*..Yh
142E:06C0 01 80 1E 68 48 21 9A 15 36 00 08 83 C4 06 89 46 ...hH!..6......F
142E:06D0 FE 83 7E FE FF 75 0C 1E 68 48 21 9A F3 03 3F 26 ..~..u..hH!...?&
142E:06E0 83 C4 04 6A 00 66 6A 04 FF 76 FE 9A AB 06 00 08 ...j.fj..v......
142E:06F0 83 C4 08 B8 BA 28 8E C0 66 26 A1 E8 A0 66 89 46 .....(..f&...f.F
142E:0700 F8 C7 46 FC 00 00 EB 34 C4 5E F8 26 C6 07 14 26 ..F....4.^.&...&
142E:0710 C6 47 01 00 26 C6 47 02 11 26 C6 47 03 00 83 46 .G..&.G..&.G...F
142E:0720 F8 04 68 54 01 66 FF 76 F8 FF 76 FE 9A 87 3C 00 ..hT.f.v..v...<.
142E:0730 08 83 C4 08 81 46 F8 54 01 FF 46 FC 83 7E FC 03 .....F.T..F..~..
142E:0740 7C C6 FF 76 FE 9A 93 2A 00 08 59 68 01 80 1E 68 |..v...*..Yh...h
142E:0750 55 21 9A 15 36 00 08 83 C4 06 89 46 FE 83 7E FE U!..6......F..~.
142E:0760 FF 75 0C 1E 68 55 21 9A F3 03 3F 26 83 C4 04 6A .u..hU!...?&...j
142E:0770 01 16 8D 46 F7 50 FF 76 FE 9A 87 3C 00 08 83 C4 ...F.P.v...<....
142E:0780 08 6A 01 16 8D 46 F6 50 FF 76 FE 9A 87 3C 00 08 .j...F.P.v...<..
142E:0790 83 C4 08 8A 46 F6 B4 00 6B C0 03 50 B8 BA 28 8E ....F...k..P..(.
142E:07A0 C0 66 26 FF 36 43 A1 FF 76 FE 9A 87 3C 00 08 83 .f&.6C..v...<...
142E:07B0 C4 08 FF 76 FE 9A 93 2A 00 08 59 B8 BA 28 8E C0 ...v...*..Y..(..
142E:07C0 66 26 FF 36 43 A1 8A 46 F6 B4 00 48 50 8A 46 F7 f&.6C..F...HP.F.
142E:07D0 B4 00 50 9A 3B 04 76 24 83 C4 08 C9 CB B8 BA 28 ..P.;.v$.......(
142E:07E0 8E C0 26 C7 06 1F 2F 01 00 C7 06 D5 9F 01 00 B8 ..&.../.........
142E:07F0 BA 28 8E C0 26 C7 06 0D A1 03 00 B8 BA 28 8E C0 .(..&........(..
142E:0800 26 C6 06 47 A1 00 B8 BA 28 8E C0 26 A1 24 A5 A3 &..G....(..&.$..
142E:0810 FD 9F B8 BA 28 8E C0 26 A1 26 A5 A3 FF 9F CB B8 ....(..&.&......
142E:0820 BA 28 8E C0 26 A1 24 A5 A3 FD 9F B8 BA 28 8E C0 .(..&.$......(..
142E:0830 26 A1 26 A5 A3 FF 9F CB B8 BA 28 8E C0 26 C6 06 &.&.......(..&..
142E:0840 1E 2F 01 CB C8 0A 00 00 FA 9A E8 01 25 24 FB BA ./..........%$..
142E:0850 D4 03 B0 10 EE BA D5 03 EC A2 ED 9F 9A 67 01 31 .............g.1
142E:0860 23 0B C2 75 F7 B8 BA 28 8E C0 66 26 C7 06 48 A1 #..u...(..f&..H.
142E:0870 06 73 00 00 66 68 DC 3A 00 00 9A 38 1D 00 08 83 .s..fh.:...8....
142E:0880 C4 04 BB BA 28 8E C3 26 89 16 D2 A0 26 A3 D0 A0 ....(..&....&...
142E:0890 0B C2 75 17 B8 BA 28 8E C0 66 26 FF 36 48 A1 1E ..u...(..f&.6H..
142E:08A0 68 62 21 9A 3F 04 3F 26 83 C4 08 B8 BA 28 8E C0 hb!.?.?&.....(..
142E:08B0 66 26 81 2E 48 A1 DC 3A 00 00 66 68 6A EF 00 00 f&..H..:..fhj...
142E:08C0 9A 38 1D 00 08 83 C4 04 BB BA 28 8E C3 26 89 16 .8........(..&..
142E:08D0 D6 A0 26 A3 D4 A0 0B C2 75 17 B8 BA 28 8E C0 66 ..&.....u...(..f
142E:08E0 26 FF 36 48 A1 1E 68 76 21 9A 3F 04 3F 26 83 C4 &.6H..hv!.?.?&..
142E:08F0 08 B8 BA 28 8E C0 66 26 81 2E 48 A1 6A EF FF FF ...(..f&..H.j...
142E:0900 B8 BA 28 8E C0 66 26 A1 82 A8 BA BA 28 8E C2 66 ..(..f&.....(..f
142E:0910 26 A3 CC A0 66 68 80 3E 00 00 9A 38 1D 00 08 83 &...fh.>...8....
142E:0920 C4 04 BB BA 28 8E C3 26 89 16 E6 A0 26 A3 E4 A0 ....(..&....&...
142E:0930 0B C2 75 17 B8 BA 28 8E C0 66 26 FF 36 48 A1 1E ..u...(..f&.6H..
142E:0940 68 8B 21 9A 3F 04 3F 26 83 C4 08 B8 BA 28 8E C0 h.!.?.?&.....(..
142E:0950 66 26 81 2E 48 A1 80 3E 00 00 66 68 00 03 00 00 f&..H..>..fh....
142E:0960 9A 38 1D 00 08 83 C4 04 BB BA 28 8E C3 26 89 16 .8........(..&..
142E:0970 45 A1 26 A3 43 A1 0B C2 75 17 B8 BA 28 8E C0 66 E.&.C...u...(..f
142E:0980 26 FF 36 48 A1 1E 68 9C 21 9A 3F 04 3F 26 83 C4 &.6H..h.!.?.?&..
142E:0990 08 B8 BA 28 8E C0 66 26 81 2E 48 A1 00 03 00 00 ...(..f&..H.....
142E:09A0 66 68 08 04 00 00 9A 38 1D 00 08 83 C4 04 BB BA fh.....8........
142E:09B0 28 8E C3 26 89 16 EA A0 26 A3 E8 A0 0B C2 75 17 (..&....&.....u.
142E:09C0 B8 BA 28 8E C0 66 26 FF 36 48 A1 1E 68 AC 21 9A ..(..f&.6H..h.!.
142E:09D0 3F 04 3F 26 83 C4 08 B8 BA 28 8E C0 66 26 81 2E ?.?&.....(..f&..
142E:09E0 48 A1 08 04 00 00 66 68 90 01 00 00 9A 38 1D 00 H.....fh.....8..
142E:09F0 08 83 C4 04 89 16 CA 9F A3 C8 9F 0B C2 75 17 B8 .............u..
142E:0A00 BA 28 8E C0 66 26 FF 36 48 A1 1E 68 B8 21 9A 3F .(..f&.6H..h.!.?
142E:0A10 04 3F 26 83 C4 08 A1 CA 9F 8B 16 C8 9F 81 C2 C8 .?&.............
142E:0A20 00 A3 CE 9F 89 16 CC 9F B8 BA 28 8E C0 26 A1 EA ..........(..&..
142E:0A30 A0 26 8B 16 E8 A0 81 C2 58 01 BB BA 28 8E C3 26 .&......X...(..&
142E:0A40 A3 EE A0 26 89 16 EC A0 B8 BA 28 8E C0 26 A1 EE ...&......(..&..
142E:0A50 A0 26 8B 16 EC A0 81 C2 58 01 BB BA 28 8E C3 26 .&......X...(..&
142E:0A60 A3 F2 A0 26 89 16 F0 A0 B8 BA 28 8E C0 26 C7 06 ...&......(..&..
142E:0A70 0D A1 00 00 B8 BA 28 8E C0 26 C7 06 15 A1 BA 28 ......(..&.....(
142E:0A80 26 C7 06 13 A1 E8 A0 8E C0 26 C7 06 19 A1 BA 28 &........&.....(
142E:0A90 26 C7 06 17 A1 EC A0 8E C0 26 C7 06 1D A1 BA 28 &........&.....(
142E:0AA0 26 C7 06 1B A1 F0 A0 8E C0 26 C7 06 21 A1 BA 28 &........&..!..(
142E:0AB0 26 C7 06 1F A1 EC A0 8E C0 66 26 A1 13 A1 66 A3 &........f&...f.
142E:0AC0 D0 20 0E E8 48 F5 B8 BA 28 8E C0 26 C6 06 47 A1 . ..H...(..&..G.
142E:0AD0 00 C7 06 D3 9F 00 00 B8 62 28 8E C0 26 80 0E 00 ........b(..&...
142E:0AE0 00 20 C7 06 E3 9F 00 00 B8 BA 28 8E C0 26 FF 36 . ........(..&.6
142E:0AF0 24 A5 9A 2E 08 00 08 59 9A AC 09 97 11 6A 03 9A $......Y.....j..
142E:0B00 DF 0D 32 12 59 BA BA 28 8E C2 26 A3 1F 2F 9A 82 ..2.Y..(..&../..
142E:0B10 02 76 24 66 FF 36 CC 9F 66 FF 36 C8 9F B8 BA 28 .v$f.6..f.6....(
142E:0B20 8E C0 66 26 FF 36 CC A0 B8 BA 28 8E C0 66 26 FF ..f&.6....(..f&.
142E:0B30 36 D4 A0 B8 BA 28 8E C0 66 26 FF 36 D0 A0 9A DA 6....(..f&.6....
142E:0B40 04 12 13 83 C4 14 66 6A 00 6A 00 9A 8A 05 12 13 ......fj.j......
142E:0B50 83 C4 06 9A 94 0E 12 13 9A 68 10 12 13 B8 BA 28 .........h.....(
142E:0B60 8E C0 26 C6 06 0C A1 00 66 C7 06 D7 9F 00 00 00 ..&.....f.......
142E:0B70 00 C7 06 D3 9F 00 00 C6 06 D0 9F 01 C7 06 6E 20 ..............n
142E:0B80 00 00 C7 06 E1 9F 00 00 C6 06 EA 9F 00 C7 06 E7 ................
142E:0B90 9F 00 00 B8 BA 28 8E C0 26 8C 1E 2E 30 26 C7 06 .....(..&...0&..
142E:0BA0 2C 30 C8 20 FA 9A E8 01 25 24 FB B8 BA 28 8E C0 ,0. ....%$...(..
142E:0BB0 66 26 FF 36 CC A0 B8 BA 28 8E C0 66 26 FF 36 E4 f&.6....(..f&.6.
142E:0BC0 A0 9A FB 11 D5 18 83 C4 08 FA 9A 86 02 25 24 FB .............%$.
142E:0BD0 B8 BA 28 8E C0 26 C6 06 1E 2F 00 B8 BA 28 8E C0 ..(..&.../...(..
142E:0BE0 26 C7 06 1F 2F 00 00 C7 46 FE 01 00 C7 46 FC 01 &.../...F....F..
142E:0BF0 00 9A 90 23 00 08 0B C0 74 05 9A A6 20 00 08 C7 ...#....t... ...
142E:0C00 46 F8 00 00 EB 1F BA DA 03 EC A2 D1 9F F6 06 D1 F...............
142E:0C10 9F 08 75 F2 BA DA 03 EC A2 D1 9F B4 00 A9 08 00 ..u.............
142E:0C20 74 F2 FF 46 F8 A1 E1 9F F7 D8 1B C0 40 40 3B 46 t..F........@@;F
142E:0C30 F8 7F D3 66 83 06 D7 9F 1E 83 3E D5 9F 00 74 72 ...f......>...tr
142E:0C40 B8 BA 28 8E C0 26 FF 0E 0D A1 26 A1 0D A1 0B C0 ..(..&....&.....
142E:0C50 75 60 B8 BA 28 8E C0 26 C7 06 0D A1 03 00 B8 BA u`..(..&........
142E:0C60 28 8E C0 26 A0 47 A1 FE C0 BA BA 28 8E C2 26 A2 (..&.G.....(..&.
142E:0C70 47 A1 B8 BA 28 8E C0 26 80 3E 47 A1 04 75 0E C7 G...(..&.>G..u..
142E:0C80 06 D5 9F 00 00 8E C0 26 C6 06 47 A1 00 B8 BA 28 .......&..G....(
142E:0C90 8E C0 26 A0 47 A1 98 C1 E0 02 BA BA 28 8B D8 8E ..&.G.......(...
142E:0CA0 C2 26 8B 87 15 A1 26 8B 97 13 A1 A3 D2 20 89 16 .&....&...... ..
142E:0CB0 D0 20 8B 46 FA 40 BB 04 00 99 F7 FB 89 56 FA 83 . [email protected]..
142E:0CC0 3E E1 9F 00 74 14 83 7E FE 00 74 0E 83 7E FA 00 >...t..~..t..~..
142E:0CD0 75 25 6A 00 1E 68 BD 21 EB 15 A0 D0 9F B4 00 0B u%j..h.!........
142E:0CE0 C0 75 14 83 7E FA 00 75 0E 6A 00 1E 68 C5 21 9A .u..~..u.j..h.!.
142E:0CF0 D2 08 9F 20 83 C4 06 B8 BA 28 8E C0 26 FF 36 1F ... .....(..&.6.
142E:0D00 2F FF 36 FF 9F FF 36 FD 9F 9A 8A 05 12 13 83 C4 /.6...6.........
142E:0D10 06 80 3E E9 9F 00 74 42 A0 E9 9F 98 2D 08 00 8B ..>...tB....-...
142E:0D20 D8 83 FB 09 77 2F D1 E3 2E FF A7 1F 12 6A 00 1E ....w/.......j..
142E:0D30 68 CD 21 9A D2 08 9F 20 83 C4 06 EB 18 6A 00 1E h.!.... .....j..
142E:0D40 68 D4 21 EB EE 6A 00 1E 68 DF 21 EB E6 6A 00 1E h.!..j..h.!..j..
142E:0D50 68 E8 21 EB DE C6 06 E9 9F 00 B8 BA 28 8E C0 26 h.!.........(..&
142E:0D60 C7 06 1F 2F 00 00 9A 94 0E 12 13 FA 9A E8 01 25 .../...........%
142E:0D70 24 FB 9A E2 0F 12 13 FA 9A 86 02 25 24 FB 83 3E $..........%$..>
142E:0D80 DF 9F 00 74 09 66 C7 06 D7 9F 00 00 00 00 C7 06 ...t.f..........
142E:0D90 DF 9F 00 00 80 3E D0 9F 02 75 12 83 3E E1 9F 00 .....>...u..>...
142E:0DA0 75 0B 66 C7 06 6A 20 24 FA FF FF EB 20 80 3E D0 u.f..j $.... .>.
142E:0DB0 9F 01 74 4D 66 0F BF 06 6E 20 66 6B C0 64 66 BB ..tMf...n fk.df.
142E:0DC0 0F 00 00 00 66 99 66 F7 FB 66 A3 6A 20 66 A1 6A ....f.f..f.j f.j
142E:0DD0 20 66 BB 2C 01 00 00 66 99 66 F7 FB 66 A3 DB 9F f.,...f.f..f...
142E:0DE0 66 A1 D7 9F 66 0F AF 06 D7 9F 66 0F AF 06 DB 9F f...f.....f.....
142E:0DF0 66 D1 E0 66 BB 40 42 0F 00 66 99 66 F7 FB A3 D3 [email protected]....
142E:0E00 9F 83 3E E7 9F 00 75 03 E9 10 02 C7 46 FE 00 00 ..>...u.....F...
142E:0E10 83 7E FC 00 74 13 C7 46 FC 00 00 6A 00 1E 68 F0 .~..t..F...j..h.
142E:0E20 21 9A D2 08 9F 20 83 C4 06 A0 EA 9F 98 8B D8 8A !.... ..........
142E:0E30 87 70 20 A2 EB 9F 80 3E EB 9F 7F 75 1F C6 06 EB .p ....>...u....
142E:0E40 9F 00 A0 EA 9F FE C8 A2 EA 9F 80 3E EC 9F 00 74 ...........>...t
142E:0E50 14 66 C7 06 EF 9F 64 00 00 00 EB 09 66 C7 06 EF .f....d.....f...
142E:0E60 9F 22 00 00 00 A0 EB 9F A2 EC 9F A0 EA 9F FE C0 ."..............
142E:0E70 A2 EA 9F A0 ED 9F 00 06 EB 9F BA DA 03 EC A2 D1 ................
142E:0E80 9F B4 00 A9 08 00 74 F2 BA D4 03 B0 10 EE BA D5 ......t.........
142E:0E90 03 A0 EB 9F EE 66 83 3E EF 9F 01 7C 03 E9 76 01 .....f.>...|..v.
142E:0EA0 A0 EC 9F 98 0B C0 74 03 E9 6B 01 68 01 80 1E 68 ......t..k.h...h
142E:0EB0 3C 21 9A 15 36 00 08 83 C4 06 A3 E5 9F 83 3E E5 <!..6.........>.
142E:0EC0 9F FF 75 0C 1E 68 3C 21 9A F3 03 3F 26 83 C4 04 ..u..h<!...?&...
142E:0ED0 6A 00 66 6A 04 FF 36 E5 9F 9A AB 06 00 08 83 C4 j.fj..6.........
142E:0EE0 08 68 00 FA B8 BA 28 8E C0 66 26 FF 36 CC A0 FF .h....(..f&.6...
142E:0EF0 36 E5 9F 9A 87 3C 00 08 83 C4 08 FF 36 E5 9F 9A 6....<......6...
142E:0F00 93 2A 00 08 59 66 FF 36 CC 9F 66 FF 36 C8 9F B8 .*..Yf.6..f.6...
142E:0F10 BA 28 8E C0 66 26 FF 36 CC A0 B8 BA 28 8E C0 66 .(..f&.6....(..f
142E:0F20 26 FF 36 D4 A0 B8 BA 28 8E C0 66 26 FF 36 D0 A0 &.6....(..f&.6..
142E:0F30 9A DA 04 12 13 83 C4 14 66 6A 00 6A 00 9A 8A 05 ........fj.j....
142E:0F40 12 13 83 C4 06 9A 94 0E 12 13 C7 06 F9 9F C7 00 ................
142E:0F50 FA 9A E8 01 25 24 FB C7 06 F7 9F 01 00 C7 06 FB ....%$..........
142E:0F60 9F 01 00 C7 06 F3 9F A0 00 A1 F9 9F A3 F5 9F EB ................
142E:0F70 45 A0 F5 9F 2A 06 F9 9F A2 D2 9F FF 36 FB 9F FF E...*.......6...
142E:0F80 36 F5 9F FF 36 F3 9F B4 00 50 B8 BA 28 8E C0 66 6...6....P..(..f
142E:0F90 26 FF 36 CC A0 9A D7 10 12 13 83 C4 0C 81 3E F7 &.6...........>.
142E:0FA0 9F A1 00 73 0D FF 06 F7 9F 83 06 FB 9F 02 FF 0E ...s............
142E:0FB0 F3 9F FF 06 F5 9F 81 3E F5 9F C8 00 72 B3 FF 0E .......>....r...
142E:0FC0 F9 9F 83 3E F9 9F 00 75 8E 9A E2 0F 12 13 B8 BA ...>...u........
142E:0FD0 28 8E C0 26 C6 06 0C A1 00 66 C7 06 D7 9F 00 00 (..&.....f......
142E:0FE0 00 00 C7 06 D3 9F 00 00 C6 06 D0 9F 01 C7 06 6E ...............n
142E:0FF0 20 00 00 C7 06 E1 9F 00 00 C7 06 E7 9F 00 00 B8 ...............
142E:1000 01 00 89 46 FC 89 46 FE C6 06 EA 9F 00 FA 9A 86 ...F..F.........
142E:1010 02 25 24 FB EB 05 66 FF 0E EF 9F B8 BA 28 8E C0 .%$...f......(..
142E:1020 26 A0 1E 2F B4 00 0B C0 75 0A 83 3E E3 9F 00 75 &../....u..>...u
142E:1030 03 E9 BD FB FA 9A E8 01 25 24 FB 9A E2 0F 12 13 ........%$......
142E:1040 83 3E E3 9F 00 74 05 9A 0F 00 94 10 B8 BA 28 8E .>...t........(.
142E:1050 C0 66 26 FF 36 E4 A0 9A 9B 12 D5 18 83 C4 04 B8 .f&.6...........
142E:1060 BA 28 8E C0 66 26 C7 06 2C 30 00 00 00 00 83 3E .(..f&..,0.....>
142E:1070 E3 9F 00 74 03 E9 D6 00 66 6A 00 6A 01 66 6A 00 ...t....fj.j.fj.
142E:1080 6A 00 6A 01 6A 01 6A 00 6A 01 9A 04 00 53 23 83 j.j.j.j.j....S#.
142E:1090 C4 14 FA 9A 86 02 25 24 FB 9A 67 01 31 23 BB BA ......%$..g.1#..
142E:10A0 28 8E C3 26 89 16 0A A1 26 A3 08 A1 0B C2 74 E9 (..&....&.....t.
142E:10B0 B8 BA 28 8E C0 26 C4 1E 08 A1 26 8A 07 B4 00 89 ..(..&....&.....
142E:10C0 46 F6 B9 04 00 BB 0F 12 2E 8B 07 3B 46 F6 74 07 F..........;F.t.
142E:10D0 83 C3 02 E2 F3 EB 4D 2E FF 67 08 66 68 25 00 58 ......M..g.fh%.X
142E:10E0 00 66 68 25 00 40 00 66 68 46 00 14 00 1E 68 FA .fh%[email protected].
142E:10F0 21 9A A3 00 31 0E 83 C4 10 0B C0 74 1C B8 BA 28 !...1......t...(
142E:1100 8E C0 26 C6 06 0C A1 01 66 6A 00 6A 05 9A BA 00 ..&.....fj.j....
142E:1110 31 23 83 C4 06 EB 0D EB 00 B8 BA 28 8E C0 26 C6 1#.........(..&.
142E:1120 06 1E 2F 00 B8 BA 28 8E C0 26 A0 0C A1 B4 00 0B ../...(..&......
142E:1130 C0 75 10 B8 BA 28 8E C0 26 80 3E 1E 2F 00 74 03 .u...(..&.>./.t.
142E:1140 E9 56 FF 9A 67 01 31 23 0B C2 75 F7 EB 0B B8 BA .V..g.1#..u.....
142E:1150 28 8E C0 26 C6 06 0C A1 01 B8 BA 28 8E C0 26 A0 (..&.......(..&.
142E:1160 0C A1 B4 00 0B C0 75 03 E9 28 FA FA 9A E8 01 25 ......u..(.....%
142E:1170 24 FB B8 BA 28 8E C0 66 26 C7 06 2C 30 00 00 00 $...(..f&..,0...
142E:1180 00 9A 62 03 76 24 66 6A 00 6A 05 9A BA 00 31 23 ..b.v$fj.j....1#
142E:1190 83 C4 06 B8 BA 28 8E C0 66 26 FF 36 D0 A0 9A 24 .....(..f&.6...$
142E:11A0 1C 00 08 83 C4 04 B8 BA 28 8E C0 66 26 FF 36 D4 ........(..f&.6.
142E:11B0 A0 9A 24 1C 00 08 83 C4 04 B8 BA 28 8E C0 66 26 ..$........(..f&
142E:11C0 FF 36 E4 A0 9A 24 1C 00 08 83 C4 04 B8 BA 28 8E .6...$........(.
142E:11D0 C0 66 26 FF 36 43 A1 9A 24 1C 00 08 83 C4 04 B8 .f&.6C..$.......
142E:11E0 BA 28 8E C0 66 26 FF 36 E8 A0 9A 24 1C 00 08 83 .(..f&.6...$....
142E:11F0 C4 04 66 FF 36 C8 9F 9A 24 1C 00 08 83 C4 04 B8 ..f.6...$.......
142E:1200 62 28 8E C0 26 80 26 00 00 DF A1 E3 9F C9 CB 03 b(..&.&.........
142E:1210 00 04 00 05 00 10 00 DB 10 19 11 DB 10 19 11 3D ...............=
142E:1220 0D 2D 0D 55 0D 55 0D 55 0D 55 0D 55 0D 55 0D 45 .-.U.U.U.U.U.U.E
|
server-core/src/main/java/io/onedev/server/search/entity/issue/IssueQuery.g4
|
programlife555/onedev
| 0 |
1799
|
grammar IssueQuery;
query
: WS* (criteria|All) WS* (WS OrderBy WS+ order (WS+ And WS+ order)* WS*)? EOF
| WS* OrderBy WS+ order (WS+ And WS+ order)* WS* EOF
| WS* EOF
;
criteria
: operator=(Mine|Outstanding|Closed|SubmittedByMe) #OperatorCriteria
| operator=(SubmittedBy|FixedInBuild) WS+ criteriaValue=Quoted #OperatorValueCriteria
| FixedBetween WS+ revisionCriteria WS+ And WS+ revisionCriteria #FixedBetweenCriteria
| criteriaField=Quoted WS+ operator=(IsMe|IsEmpty) #FieldOperatorCriteria
| criteriaField=Quoted WS+ operator=(Is|IsGreaterThan|IsLessThan|IsBefore|IsAfter|Contains) WS+ criteriaValue=Quoted #FieldOperatorValueCriteria
| criteria WS+ And WS+ criteria #AndCriteria
| criteria WS+ Or WS+ criteria #OrCriteria
| Not WS* LParens WS* criteria WS* RParens #NotCriteria
| LParens WS* criteria WS* RParens #ParensCriteria
;
revisionCriteria
: revisionType=(Build|Branch|Tag|Commit) WS+ revisionValue=Quoted
;
order
: orderField=Quoted WS* (WS+ direction=(Asc|Desc))?
;
Mine
: 'mine'
;
All
: 'all'
;
Outstanding
: 'outstanding'
;
Closed
: 'closed'
;
OrderBy
: 'order' WS+ 'by'
;
SubmittedBy
: 'submitted' WS+ 'by'
;
FixedInBuild
: 'fixed' WS+ 'in' WS+ 'build'
;
FixedBetween
: 'fixed' WS+ 'between'
;
SubmittedByMe
: 'submitted' WS+ 'by' WS+ 'me'
;
Is
: 'is'
;
IsMe
: 'is' WS+ 'me'
;
Contains
: 'contains'
;
IsGreaterThan
: 'is' WS+ 'greater' WS+ 'than'
;
IsLessThan
: 'is' WS+ 'less' WS+ 'than'
;
IsAfter
: 'is' WS+ 'after'
;
IsBefore
: 'is' WS+ 'before'
;
IsEmpty
: 'is' WS+ 'empty'
;
Build
: 'build'
;
Branch
: 'branch'
;
Tag
: 'tag'
;
Commit
: 'commit'
;
And
: 'and'
;
Or
: 'or'
;
Not
: 'not'
;
Asc
: 'asc'
;
Desc
: 'desc'
;
LParens
: '('
;
RParens
: ')'
;
Quoted
: '"' ('\\'.|~[\\"])+? '"'
;
WS
: ' '
;
Identifier
: [a-zA-Z0-9:_/\\+\-;]+
;
|
src/base/commands/util-commands.ads
|
RREE/ada-util
| 60 |
11606
|
-----------------------------------------------------------------------
-- util-commands -- Support to make command line tools
-- Copyright (C) 2017, 2018, 2019 <NAME>
-- Written by <NAME> (<EMAIL>)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
private with Util.Strings.Vectors;
private with Ada.Strings.Unbounded;
-- = Command Line Utilities =
-- The `Util.Commands` package provides a support to help in writing command line
-- applications. It allows to have several commands in the application, each of them
-- being identified by a unique name. Each command has its own options and arguments.
-- The command line support is built arround several children packages.
--
-- The `Util.Commands.Drivers` package is a generic package that must be instantiated
-- to define the list of commands that the application supports. It provides operations
-- to register commands and then to execute them with a list of arguments. When a
-- command is executed, it gets its name, the command arguments and an application
-- context. The application context can be used to provide arbitrary information that
-- is needed by the application.
--
-- The `Util.Commands.Parsers` package provides the support to parse the command
-- line arguments.
--
-- The `Util.Commands.Consoles` package is a generic package that can help for the
-- implementation of a command to display its results. Its use is optional.
--
-- == Command arguments ==
-- The `Argument_List` interface defines a common interface to get access to the command
-- line arguments. It has several concrete implementations. This is the interface type
-- that is used by commands registered and executed in the driver.
--
-- The `Default_Argument_List` gives access to the program command line arguments through
-- the `Ada.Command_Line` package.
--
-- The `String_Argument_List` allows to split a string into a list of arguments. It can
-- be used to build new command line arguments.
--
-- @include util-commands-drivers.ads
-- @include util-commands-parsers.ads
--
-- == Example ==
-- First, an application context type is defined to allow a command to get some application
-- specific information. The context type is passed during the instantiation of the
-- `Util.Commands.Drivers` package and will be passed to commands through the `Execute`
-- procedure.
--
-- type Context_Type is limited record
-- ... -- Some application specific data
-- end record;
--
-- package Drivers is
-- new Util.Commands.Drivers
-- (Context_Type => Context_Type,
-- Config_Parser => Util.Commands.Parsers.GNAT_Parser.Config_Parser,
-- Driver_Name => "tool");
--
-- Then an instance of the command driver must be declared. Commands are then registered
-- to the command driver so that it is able to find them and execute them.
--
-- Driver : Drivers.Driver_Type;
--
-- A command can be implemented by a simple procedure or by using the `Command_Type`
-- abstract tagged record and implementing the `Execute` procedure:
--
-- procedure Command_1 (Name : in String;
-- Args : in Argument_List'Class;
-- Context : in out Context_Type);
--
-- type My_Command is new Drivers.Command_Type with null record;
-- procedure Execute (Command : in out My_Command;
-- Name : in String;
-- Args : in Argument_List'Class;
-- Context : in out Context_Type);
--
-- Commands are registered during the application initialization.
-- And registered in the driver by using the `Add_Command` procedure:
--
-- Driver.Add_Command (Name => "cmd1",
-- Description => "",
-- Handler => Command_1'Access);
--
-- A command is executed by giving its name and a list of arguments. By using the
-- `Default_Argument_List` type, it is possible to give to the command the application
-- command line arguments.
--
-- Ctx : Context_Type;
-- Args : Util.Commands.Default_Argument_List (0);
-- ...
-- Driver.Execute ("cmd1", Args, Ctx);
--
package Util.Commands is
-- Exception raised when a command was not found.
Not_Found : exception;
-- The argument list interface that gives access to command arguments.
type Argument_List is limited interface;
-- Get the number of arguments available.
function Get_Count (List : in Argument_List) return Natural is abstract;
-- Get the argument at the given position.
function Get_Argument (List : in Argument_List;
Pos : in Positive) return String is abstract;
-- Get the command name.
function Get_Command_Name (List : in Argument_List) return String is abstract;
type Default_Argument_List (Offset : Natural) is new Argument_List with null record;
-- Get the number of arguments available.
overriding
function Get_Count (List : in Default_Argument_List) return Natural;
-- Get the argument at the given position.
overriding
function Get_Argument (List : in Default_Argument_List;
Pos : in Positive) return String;
-- Get the command name.
function Get_Command_Name (List : in Default_Argument_List) return String;
type String_Argument_List (Max_Length : Positive;
Max_Args : Positive) is new Argument_List with private;
-- Set the argument list to the given string and split the arguments.
procedure Initialize (List : in out String_Argument_List;
Line : in String);
-- Get the number of arguments available.
overriding
function Get_Count (List : in String_Argument_List) return Natural;
-- Get the argument at the given position.
overriding
function Get_Argument (List : in String_Argument_List;
Pos : in Positive) return String;
-- Get the command name.
overriding
function Get_Command_Name (List : in String_Argument_List) return String;
-- The argument list interface that gives access to command arguments.
type Dynamic_Argument_List is limited new Argument_List with private;
-- Get the number of arguments available.
function Get_Count (List : in Dynamic_Argument_List) return Natural;
-- Get the argument at the given position.
function Get_Argument (List : in Dynamic_Argument_List;
Pos : in Positive) return String;
-- Get the command name.
function Get_Command_Name (List : in Dynamic_Argument_List) return String;
function No_Translate (Message : in String) return String is (Message) with Inline;
private
type Argument_Pos is array (Natural range <>) of Natural;
type String_Argument_List (Max_Length : Positive;
Max_Args : Positive) is new Argument_List
with record
Count : Natural := 0;
Length : Natural := 0;
Line : String (1 .. Max_Length);
Start_Pos : Argument_Pos (0 .. Max_Args) := (others => 0);
End_Pos : Argument_Pos (0 .. Max_Args) := (others => 0);
end record;
type Dynamic_Argument_List is limited new Argument_List with record
List : Util.Strings.Vectors.Vector;
Name : Ada.Strings.Unbounded.Unbounded_String;
end record;
end Util.Commands;
|
programs/oeis/267/A267587.asm
|
neoneye/loda
| 22 |
19459
|
<reponame>neoneye/loda<filename>programs/oeis/267/A267587.asm
; A267587: Middle column of the "Rule 169" elementary cellular automaton starting with a single ON (black) cell.
; 1,0,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
mov $1,1
lpb $0
sub $0,1
mul $1,$0
bin $0,2
lpe
mov $0,$1
|
programs/oeis/212/A212959.asm
|
neoneye/loda
| 22 |
86591
|
; A212959: Number of (w,x,y) such that w,x,y are all in {0,...,n} and |w-x| = |x-y|.
; 1,4,11,20,33,48,67,88,113,140,171,204,241,280,323,368,417,468,523,580,641,704,771,840,913,988,1067,1148,1233,1320,1411,1504,1601,1700,1803,1908,2017,2128,2243,2360,2481,2604,2731,2860,2993,3128,3267
mov $1,6
mul $1,$0
add $1,8
mul $1,$0
div $1,4
add $1,1
mov $0,$1
|
test/asset/agda-stdlib-1.0/Data/Digit.agda
|
omega12345/agda-mode
| 0 |
2029
|
<gh_stars>0
------------------------------------------------------------------------
-- The Agda standard library
--
-- Digits and digit expansions
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Digit where
open import Data.Nat using (ℕ; zero; suc; pred; _+_; _*_; _≤?_; _≤′_)
open import Data.Nat.Properties
open import Data.Nat.Solver
open import Data.Fin as Fin using (Fin; zero; suc; toℕ)
open import Data.Char using (Char)
open import Data.List.Base
open import Data.Product
open import Data.Vec as Vec using (Vec; _∷_; [])
open import Data.Nat.DivMod
open import Induction.Nat using (<′-rec; <′-Rec)
open import Relation.Nullary using (yes; no)
open import Relation.Nullary.Decidable
open import Relation.Binary using (Decidable)
open import Relation.Binary.PropositionalEquality as P using (_≡_; refl)
open import Function
open +-*-Solver
------------------------------------------------------------------------
-- Digits
-- Digit b is the type of digits in base b.
Digit : ℕ → Set
Digit b = Fin b
-- Some specific digit kinds.
Decimal = Digit 10
Bit = Digit 2
-- Some named digits.
0b : Bit
0b = zero
1b : Bit
1b = suc zero
------------------------------------------------------------------------
-- Showing digits
-- The characters used to show the first 16 digits.
digitChars : Vec Char 16
digitChars =
'0' ∷ '1' ∷ '2' ∷ '3' ∷ '4' ∷ '5' ∷ '6' ∷ '7' ∷ '8' ∷ '9' ∷
'a' ∷ 'b' ∷ 'c' ∷ 'd' ∷ 'e' ∷ 'f' ∷ []
-- showDigit shows digits in base ≤ 16.
showDigit : ∀ {base} {base≤16 : True (base ≤? 16)} →
Digit base → Char
showDigit {base≤16 = base≤16} d =
Vec.lookup digitChars (Fin.inject≤ d (toWitness base≤16))
------------------------------------------------------------------------
-- Digit expansions
Expansion : ℕ → Set
Expansion base = List (Fin base)
-- fromDigits takes a digit expansion of a natural number, starting
-- with the _least_ significant digit, and returns the corresponding
-- natural number.
fromDigits : ∀ {base} → Expansion base → ℕ
fromDigits [] = 0
fromDigits {base} (d ∷ ds) = toℕ d + fromDigits ds * base
-- toDigits b n yields the digits of n, in base b, starting with the
-- _least_ significant digit.
--
-- Note that the list of digits is always non-empty.
toDigits : (base : ℕ) {base≥2 : True (2 ≤? base)} (n : ℕ) →
∃ λ (ds : Expansion base) → fromDigits ds ≡ n
toDigits zero {base≥2 = ()} _
toDigits (suc zero) {base≥2 = ()} _
toDigits (suc (suc k)) n = <′-rec Pred helper n
where
base = suc (suc k)
Pred = λ n → ∃ λ ds → fromDigits ds ≡ n
cons : ∀ {m} (r : Fin base) → Pred m → Pred (toℕ r + m * base)
cons r (ds , eq) = (r ∷ ds , P.cong (λ i → toℕ r + i * base) eq)
open ≤-Reasoning
lem : ∀ x k r → 2 + x ≤′ r + (1 + x) * (2 + k)
lem x k r = ≤⇒≤′ $ begin
2 + x
≤⟨ m≤m+n _ _ ⟩
2 + x + (x + (1 + x) * k + r)
≡⟨ solve 3 (λ x r k → con 2 :+ x :+ (x :+ (con 1 :+ x) :* k :+ r)
:=
r :+ (con 1 :+ x) :* (con 2 :+ k))
refl x r k ⟩
r + (1 + x) * (2 + k)
∎
helper : ∀ n → <′-Rec Pred n → Pred n
helper n rec with n divMod base
helper .(toℕ r + 0 * base) rec | result zero r refl = ([ r ] , refl)
helper .(toℕ r + suc x * base) rec | result (suc x) r refl =
cons r (rec (suc x) (lem (pred (suc x)) k (toℕ r)))
|
oeis/176/A176806.asm
|
neoneye/loda-programs
| 11 |
90606
|
; A176806: Consider asymmetric 1-D random walk with set of possible jumps {-1,+1,+2}. Sequence gives number of paths of length n ending at origin.
; Submitted by <NAME>
; 1,0,2,3,6,20,35,105,238,588,1512,3630,9339,23166,58487,148148,373230,949416,2406248,6122142,15591856,39729000,101432982,259049230,662421643,1695149220,4341026900,11125755615,28530984915,73213888650,187980163110,482906682675
mov $4,$0
add $0,1
lpb $0
sub $0,1
mov $2,$1
bin $2,$0
trn $0,1
mov $3,$4
bin $3,$1
add $1,1
mul $3,$2
add $5,$3
lpe
mov $0,$5
|
src/driver.adb
|
eyeonechi/invalid-behaviour-conservative-analysis
| 0 |
17883
|
<gh_stars>0
with Instruction;
use Instruction;
with Machine;
use Machine;
with Debug; use Debug;
procedure Driver with SPARK_Mode is
Prog : Program := (others => (Op => NOP));
Code : ReturnCode;
Result : Integer;
HasInvalidBehaviour : Boolean;
begin
-- initialise the random number generators used to generate
-- random instructions. Commenting this out may yield predictable
-- (i.e. non-random) output
Instruction.Init;
-- generate a random program
Put_Line("Generating Random Program...");
for I in Prog'Range loop
GenerateRandomInstr(Prog(I));
end loop;
Put_Line("Analysing Program for Invalid Behaviour...");
HasInvalidBehaviour := DetectInvalidBehaviour(Prog,MAX_PROGRAM_LENGTH);
Put("Analysis Result: ");
Put(HasInvalidBehaviour'Image); New_Line;
-- run the program
Put_Line("Executing program...");
ExecuteProgram(Prog,MAX_PROGRAM_LENGTH,Code,Result);
Put("Return Code: ");
Put(Code'Image);
if Code = Success then
Put(" Result: "); Put(Result);
end if;
New_Line;
end Driver;
|
oeis/124/A124725.asm
|
neoneye/loda-programs
| 11 |
10357
|
; A124725: Triangle read by rows: T(n,k) = binomial(n,k) + binomial(n,k+2) (0 <= k <= n).
; Submitted by <NAME>
; 1,1,1,2,2,1,4,4,3,1,7,8,7,4,1,11,15,15,11,5,1,16,26,30,26,16,6,1,22,42,56,56,42,22,7,1,29,64,98,112,98,64,29,8,1,37,93,162,210,210,162,93,37,9,1,46,130,255,372,420,372,255,130,46,10,1,56,176,385,627,792,792,627
lpb $0
add $2,1
sub $0,$2
add $1,1
lpe
bin $1,$0
add $0,2
bin $2,$0
add $2,$1
mov $0,$2
|
src/API/protypo-api-consumers-buffers.adb
|
fintatarta/protypo
| 0 |
25316
|
<reponame>fintatarta/protypo<filename>src/API/protypo-api-consumers-buffers.adb
pragma Ada_2012;
with Ada.Unchecked_Deallocation;
package body Protypo.Api.Consumers.Buffers is
-------------
-- Process --
-------------
overriding procedure Process (Consumer : in out Buffer; Parameter : String)
is
begin
if Consumer.Data /= Null_Unbounded_String then
Consumer.Data := Consumer.Data & Ascii.Lf;
end if;
Consumer.Data := Consumer.Data & Parameter;
end Process;
function New_Buffer return Buffer_Access
is
begin
return new Buffer'(Data => Null_Unbounded_String);
end New_Buffer;
--------------
-- Get_Data --
--------------
function Get_Data (Consumer : Buffer) return String is
begin
return To_String (Consumer.Data);
end Get_Data;
procedure Destroy (Item : in out Buffer_Access)
is
procedure Free is
new Ada.Unchecked_Deallocation (Object => Buffer,
Name => Buffer_Access);
begin
Free (Item);
end Destroy;
end Protypo.Api.Consumers.Buffers;
|
kernel/asm_x86_64/irq_stub.asm
|
BrownieOS/lux
| 2 |
104311
|
;; lux OS kernel
;; copyright (c) 2018 by <NAME>
format elf64
use64
section '.text'
macro irq_enter
{
cli
push rax
push rbx
push rcx
push rdx
push rsi
push rdi
push rbp
push r8
push r9
push r10
push r11
push r12
push r13
push r14
push r15
}
macro irq_exit
{
pop r15
pop r14
pop r13
pop r12
pop r11
pop r10
pop r9
pop r8
pop rbp
pop rdi
pop rsi
pop rdx
pop rcx
pop rbx
pop rax
}
public pic0_spurious_stub
pic0_spurious_stub:
irq_enter
extrn pic0_spurious
call pic0_spurious
irq_exit
iretq
public pic1_spurious_stub
pic1_spurious_stub:
irq_enter
extrn pic1_spurious
call pic1_spurious
irq_exit
iretq
public lapic_spurious_stub
lapic_spurious_stub:
irq_enter
extrn lapic_spurious
call lapic_spurious
irq_exit
iretq
public timer_irq_stub
timer_irq_stub:
irq_enter
extrn timer_irq
call timer_irq
irq_exit
iretq
public acpi_irq_stub
acpi_irq_stub:
irq_enter
extrn acpi_irq
call acpi_irq
irq_exit
iretq
|
oeis/314/A314899.asm
|
neoneye/loda-programs
| 11 |
161756
|
<reponame>neoneye/loda-programs<gh_stars>10-100
; A314899: Coordination sequence Gal.6.153.3 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>
; 1,5,9,14,19,24,29,34,39,44,49,53,58,63,67,72,77,82,87,92,97,102,107,111,116,121,125,130,135,140,145,150,155,160,165,169,174,179,183,188,193,198,203,208,213,218,223,227,232,237
mov $4,$0
add $4,1
mov $5,$0
lpb $4
mov $0,$5
sub $4,1
sub $0,$4
mov $2,$0
mov $3,1
lpb $0
sub $0,1
sub $0,$3
add $0,3
sub $2,2
mul $0,$2
mod $0,12
div $0,4
mul $6,2
gcd $6,2
add $6,$3
mov $2,$6
mov $3,2
lpe
add $6,1
add $1,$6
lpe
mov $0,$1
|
libsrc/_DEVELOPMENT/adt/b_vector/c/sccz80/b_vector_capacity.asm
|
jpoikela/z88dk
| 640 |
1696
|
<filename>libsrc/_DEVELOPMENT/adt/b_vector/c/sccz80/b_vector_capacity.asm
; size_t b_vector_capacity(b_vector_t *v)
SECTION code_clib
SECTION code_adt_b_vector
PUBLIC b_vector_capacity
EXTERN asm_b_vector_capacity
defc b_vector_capacity = asm_b_vector_capacity
; SDCC bridge for Classic
IF __CLASSIC
PUBLIC _b_vector_capacity
defc _b_vector_capacity = b_vector_capacity
ENDIF
|
src/kernel/idt.asm
|
karlek/lapis
| 1 |
84920
|
bits 64
; Interrupt Gates, interrupts are automatically disabled upon entry and reenabled upon IRET
extern exception_handler
extern warn_interrupt
extern keyboard_handler
extern mouse_handler
extern ata_primary_handler
extern ata_secondary_handler
extern timer_handler
%macro pushaq 0
push rdi
push rsi
push rdx
push rcx
push rax
push r8
push r9
%endmacro
%macro popaq 0
pop r9
pop r8
pop rax
pop rcx
pop rdx
pop rsi
pop rdi
%endmacro
isr_double_fault:
pushaq
mov rdi, 0x8
call warn_interrupt
call exception_handler
popaq
iretq
isr_general_protection_fault:
pushaq
mov rdi, 0xd
call warn_interrupt
call exception_handler
popaq
iretq
isr_page_fault:
pushaq
mov rdi, 0xe
call warn_interrupt
call exception_handler
popaq
iretq
irq_timer:
pushaq
call timer_handler
popaq
iretq
irq_keyboard:
pushaq
call keyboard_handler
popaq
iretq
irq_mouse:
pushaq
call mouse_handler
popaq
iretq
irq_primary_ata:
pushaq
call ata_primary_handler
popaq
iretq
irq_secondary_ata:
pushaq
call ata_secondary_handler
popaq
iretq
%macro reserved 1
reserved_%1:
pushaq
mov rdi, %1
call warn_interrupt
popaq
nop
%endmacro
%macro not_implemented 1
not_implemented_%1:
pushaq
mov rdi, %1
call warn_interrupt
popaq
nop
%endmacro
; Generate the labels.
not_implemented 0
not_implemented 1
not_implemented 2
not_implemented 3
not_implemented 4
not_implemented 5
not_implemented 6
not_implemented 7
not_implemented 9
not_implemented 10
not_implemented 11
not_implemented 12
not_implemented 16
not_implemented 17
not_implemented 18
not_implemented 19
not_implemented 20
not_implemented 21
not_implemented 28
not_implemented 29
not_implemented 30
not_implemented 34
not_implemented 35
not_implemented 36
not_implemented 37
not_implemented 38
not_implemented 39
not_implemented 40
not_implemented 41
not_implemented 42
not_implemented 43
not_implemented 45
not_implemented 46
not_implemented 47
reserved 15
reserved 22
reserved 23
reserved 24
reserved 25
reserved 26
reserved 27
reserved 31
global isr_stub_table
isr_stub_table:
; 0 Divide-by-zero Error
dq not_implemented_0
; 1 Debug
dq not_implemented_1
; 2 Non-maskable Interrupt
dq not_implemented_2
; 3 Breakpoint
dq not_implemented_3
; 4 Overflow
dq not_implemented_4
; 5 Bound Range Exceeded
dq not_implemented_5
; 6 Invalid Opcode
dq not_implemented_6
; 7 Device Not Available
dq not_implemented_7
; 8 Double Fault
dq isr_double_fault
; 9 Coprocessor Segment Overrun
dq not_implemented_9
; 10 Invalid TSS
dq not_implemented_10
; 11 Segment Not Present
dq not_implemented_11
; 12 Stack-Segment Fault
dq not_implemented_12
; 13 General Protection Fault
dq isr_general_protection_fault
; 14 Page Fault
dq isr_page_fault
; 15 Reserved
dq reserved_15
; 16 x87 Floating-Point Exception
dq not_implemented_16
; 17 Alignment Check
dq not_implemented_17
; 18 Machine Check
dq not_implemented_18
; 19 SIMD Floating-Point Exception
dq not_implemented_19
; 20 Virtualization Exception
dq not_implemented_20
; 21 Control Protection Exception
dq not_implemented_21
; 22 Reserved
dq reserved_22
; 23 Reserved
dq reserved_23
; 24 Reserved
dq reserved_24
; 25 Reserved
dq reserved_25
; 26 Reserved
dq reserved_26
; 27 Reserved
dq reserved_27
; 28 Hypervisor Injection Exception
dq not_implemented_28
; 29 VMM Communication Exception
dq not_implemented_29
; 30 Security Exception
dq not_implemented_30
; 31 Reserved
dq reserved_31
; 32 Remapped: Programmable Interrupt Timer Interrupt
dq irq_timer
; 33 Remapped: Keyboard Interrupt
dq irq_keyboard
; 34 Remapped: Cascade
dq not_implemented_34
; 35 Remapped: COM2
dq not_implemented_35
; 36 Remapped: COM1
dq not_implemented_36
; 37 Remapped: LPT2
dq not_implemented_37
; 38 Remapped: Floppy Disk
dq not_implemented_38
; 39 Remapped: LPT1
dq not_implemented_39
; 40 Remapped: CMOS real-time clock
dq not_implemented_40
; 41 Remapped: Free for peripherals
dq not_implemented_41
; 42 Remapped: Free for peripherals
dq not_implemented_42
; 43 Remapped: Free for peripherals
dq not_implemented_43
; 44 Remapped: PS2 Mouse
dq irq_mouse
; 45 Remapped: FPU
dq not_implemented_45
; 46 Remapped: Primary ATA Hard Disk
dq irq_primary_ata
; 47 Remapped: Secondary ATA Hard Disk
dq irq_secondary_ata
|
src/maths/rtch-maths.ads
|
Lucretia/raytracer_challenge
| 4 |
24822
|
with Ada.Numerics.Generic_Elementary_Functions;
package RTCH.Maths with
Pure is
pragma Warnings (Off); -- Turn off "unused" warning.
package Float_Elementary_Functions is new Ada.Numerics.Generic_Elementary_Functions (Float);
use Float_Elementary_Functions;
pragma Warnings (On);
Epsilon : constant := 0.00001;
function Equals (Left, Right : in Float) return Boolean is (if abs (Left - Right) < Epsilon then True else False);
end RTCH.Maths;
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_1926.asm
|
ljhsiun2/medusa
| 9 |
29340
|
<gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r15
push %r9
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x3072, %rsi
lea addresses_UC_ht+0xe592, %rdi
nop
nop
nop
sub $62898, %r15
mov $96, %rcx
rep movsw
nop
nop
nop
nop
nop
add %rbx, %rbx
lea addresses_D_ht+0x13a82, %rsi
lea addresses_WC_ht+0x92, %rdi
nop
dec %r9
mov $26, %rcx
rep movsb
nop
nop
nop
nop
nop
xor $7581, %rdi
lea addresses_WC_ht+0xc192, %rsi
lea addresses_WC_ht+0x1a92, %rdi
clflush (%rdi)
nop
nop
nop
nop
sub $61005, %rbp
mov $126, %rcx
rep movsb
nop
nop
nop
cmp $53312, %rdi
lea addresses_normal_ht+0x67a6, %r9
nop
nop
nop
nop
lfence
movl $0x61626364, (%r9)
nop
nop
cmp %rbx, %rbx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r9
pop %r15
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r14
push %r9
push %rdi
push %rdx
push %rsi
// Faulty Load
lea addresses_WC+0xea92, %rsi
nop
nop
nop
nop
sub %r11, %r11
mov (%rsi), %r9w
lea oracles, %rdx
and $0xff, %r9
shlq $12, %r9
mov (%rdx,%r9,1), %r9
pop %rsi
pop %rdx
pop %rdi
pop %r9
pop %r14
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_WC', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_WC', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': True}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_D_ht', 'congruent': 3, 'same': True}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 4, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'38': 21829}
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
*/
|
samples/compress.adb
|
RREE/ada-util
| 60 |
17618
|
-----------------------------------------------------------------------
-- compress -- Compress file using Util.Streams.Buffered.LZMA
-- Copyright (C) 2019, 2021 <NAME>
-- Written by <NAME> (<EMAIL>)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.Text_IO;
with Ada.Command_Line;
with Ada.Streams.Stream_IO;
with Util.Streams.Files;
with Util.Streams.Buffered.Lzma;
procedure Compress is
procedure Compress_File (Source : in String;
Destination : in String);
procedure Compress_File (Source : in String;
Destination : in String) is
In_Stream : aliased Util.Streams.Files.File_Stream;
Out_Stream : aliased Util.Streams.Files.File_Stream;
Compressor : aliased Util.Streams.Buffered.Lzma.Compress_Stream;
begin
In_Stream.Open (Mode => Ada.Streams.Stream_IO.In_File, Name => Source);
Out_Stream.Create (Mode => Ada.Streams.Stream_IO.Out_File, Name => Destination);
Compressor.Initialize (Output => Out_Stream'Unchecked_Access, Size => 32768);
Util.Streams.Copy (From => In_Stream, Into => Compressor);
end Compress_File;
begin
if Ada.Command_Line.Argument_Count /= 2 then
Ada.Text_IO.Put_Line ("Usage: compress source destination");
return;
end if;
Compress_File (Source => Ada.Command_Line.Argument (1),
Destination => Ada.Command_Line.Argument (2));
end Compress;
|
Cubical/Categories/Type.agda
|
apabepa10/cubical
| 0 |
6935
|
<reponame>apabepa10/cubical
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Categories.Type where
open import Cubical.Foundations.Prelude
open import Cubical.Categories.Category
open Precategory
module _ ℓ where
TYPE : Precategory (ℓ-suc ℓ) ℓ
TYPE .ob = Type ℓ
TYPE .Hom[_,_] A B = A → B
TYPE .id A = λ x → x
TYPE ._⋆_ f g = λ x → g (f x)
TYPE .⋆IdL f = refl
TYPE .⋆IdR f = refl
TYPE .⋆Assoc f g h = refl
|
test/Fail/Polarity-pragma-in-safe-mode.agda
|
cruhland/agda
| 1,989 |
9079
|
<reponame>cruhland/agda
{-# OPTIONS --safe #-}
postulate F : Set → Set
{-# POLARITY F ++ #-}
|
test/Fail/Issue3340.agda
|
cruhland/agda
| 1,989 |
5405
|
open import Agda.Primitive
open import Agda.Builtin.Equality
variable
ℓ : Level
A : Set ℓ
P : A → Set ℓ
x y : A
f : (x : A) → P x
cong : x ≡ y → f x ≡ f y
cong refl = refl
|
programs/oeis/124/A124350.asm
|
neoneye/loda
| 22 |
240250
|
<gh_stars>10-100
; A124350: a(n) = 4*n*(floor(n^2/2)+1). For n>=3, this is the number of directed Hamiltonian paths on the n-prism graph.
; 0,4,24,60,144,260,456,700,1056,1476,2040,2684,3504,4420,5544,6780,8256,9860,11736,13756,16080,18564,21384,24380,27744,31300,35256,39420,44016,48836,54120,59644,65664,71940,78744,85820,93456,101380,109896,118716
mov $1,$0
pow $0,2
add $0,2
div $0,2
mul $0,$1
mul $0,4
|
Validation/pyFrame3DD-master/gcc-master/gcc/ada/eval_fat.ads
|
djamal2727/Main-Bearing-Analytical-Model
| 0 |
15190
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- E V A L _ F A T --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2020, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. 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 provides for compile-time evaluation of static calls to the
-- floating-point attribute functions. It is the compile-time equivalent of
-- the System.Fat_Gen runtime package. The coding is quite similar, as are
-- the subprogram specs, except that the type is passed as an explicit
-- first parameter (and used via ttypes, to obtain the necessary information
-- about the characteristics of the type for computing the results.
with Types; use Types;
with Uintp; use Uintp;
with Urealp; use Urealp;
package Eval_Fat is
subtype UI is Uint;
-- The compile time representation of universal integer
subtype T is Ureal;
-- The compile time representation of floating-point values
subtype R is Entity_Id;
-- The compile time representation of the floating-point root type
-- The following functions perform the operation implied by their name
-- which corresponds to the name of the attribute which they compute.
-- The arguments correspond to the attribute function arguments.
function Adjacent (RT : R; X, Towards : T) return T;
function Ceiling (RT : R; X : T) return T;
function Compose (RT : R; Fraction : T; Exponent : UI) return T;
function Copy_Sign (RT : R; Value, Sign : T) return T;
function Exponent (RT : R; X : T) return UI;
function Floor (RT : R; X : T) return T;
function Fraction (RT : R; X : T) return T;
function Leading_Part (RT : R; X : T; Radix_Digits : UI) return T;
function Model (RT : R; X : T) return T;
function Pred (RT : R; X : T) return T;
function Remainder (RT : R; X, Y : T) return T;
function Rounding (RT : R; X : T) return T;
function Scaling (RT : R; X : T; Adjustment : UI) return T;
function Succ (RT : R; X : T) return T;
function Truncation (RT : R; X : T) return T;
function Unbiased_Rounding (RT : R; X : T) return T;
-- The following global declarations are used by the Machine attribute
type Rounding_Mode is (Floor, Ceiling, Round, Round_Even);
for Rounding_Mode use (0, 1, 2, 3);
-- Used to indicate rounding mode for Machine attribute
-- Note that C code in gigi knows that Round_Even is 3
-- The Machine attribute is special, in that it takes an extra argument
-- indicating the rounding mode, and also an argument Enode that is a
-- node used to post warnings (e.g. if asked to convert a negative zero
-- on a machine for which Signed_Zeros is False).
function Machine
(RT : R;
X : T;
Mode : Rounding_Mode;
Enode : Node_Id) return T;
procedure Decompose_Int
(RT : R;
X : T;
Fraction : out UI;
Exponent : out UI;
Mode : Rounding_Mode);
-- Decomposes a floating-point number into fraction and exponent parts.
-- The Fraction value returned is an integer representing the value
-- Fraction * Scale, where Scale is the value (Machine_Radix_Value (RT) **
-- Machine_Mantissa_Value (RT)). The value is obtained by using biased
-- rounding (halfway cases round away from zero), round to even, a floor
-- operation or a ceiling operation depending on the setting of Mode (see
-- corresponding descriptions in Urealp).
end Eval_Fat;
|
software/hal/hal/src/hal-framebuffer.ads
|
TUM-EI-RCS/StratoX
| 12 |
7464
|
<gh_stars>10-100
with HAL.Bitmap;
package HAL.Framebuffer is
subtype FB_Color_Mode is HAL.Bitmap.Bitmap_Color_Mode range
HAL.Bitmap.ARGB_8888 .. HAL.Bitmap.AL_88;
type Display_Orientation is
(Default, Landscape, Portrait);
type Wait_Mode is (Polling, Interrupt);
type Frame_Buffer_Display is limited interface;
type Frame_Buffer_Display_Access is access all Frame_Buffer_Display'Class;
function Get_Max_Layers
(Display : Frame_Buffer_Display) return Positive
is abstract;
function Is_Supported
(Display : Frame_Buffer_Display;
Mode : FB_Color_Mode) return Boolean
is abstract;
procedure Initialize
(Display : in out Frame_Buffer_Display;
Orientation : Display_Orientation := Default;
Mode : Wait_Mode := Interrupt) is abstract;
procedure Set_Orientation
(Display : in out Frame_Buffer_Display;
Orientation : Display_Orientation) is abstract;
procedure Set_Mode
(Display : in out Frame_Buffer_Display;
Mode : Wait_Mode) is abstract;
function Initialized
(Display : Frame_Buffer_Display) return Boolean is abstract;
function Get_Width
(Display : Frame_Buffer_Display) return Positive is abstract;
function Get_Height
(Display : Frame_Buffer_Display) return Positive is abstract;
function Is_Swapped
(Display : Frame_Buffer_Display) return Boolean is abstract;
-- Whether X/Y coordinates are considered Swapped by the drawing primitives
-- This simulates Landscape/Portrait orientation on displays not supporting
-- hardware orientation change
procedure Set_Background
(Display : Frame_Buffer_Display; R, G, B : Byte) is abstract;
procedure Initialize_Layer
(Display : in out Frame_Buffer_Display;
Layer : Positive;
Mode : FB_Color_Mode;
X : Natural := 0;
Y : Natural := 0;
Width : Positive := Positive'Last;
Height : Positive := Positive'Last) is abstract;
-- All layers are double buffered, so an explicit call to Update_Layer
-- needs to be performed to actually display the current buffer attached
-- to the layer.
-- Alloc is called to create the actual buffer.
function Initialized
(Display : Frame_Buffer_Display;
Layer : Positive) return Boolean is abstract;
procedure Update_Layer
(Display : in out Frame_Buffer_Display;
Layer : Positive;
Copy_Back : Boolean := False) is abstract;
-- Updates the layer so that the hidden buffer is displayed.
procedure Update_Layers
(Display : in out Frame_Buffer_Display) is abstract;
-- Updates all initialized layers at once with their respective hidden
-- buffer
function Get_Color_Mode
(Display : Frame_Buffer_Display;
Layer : Positive) return FB_Color_Mode is abstract;
-- Retrieves the current color mode for the layer.
function Get_Hidden_Buffer
(Display : Frame_Buffer_Display;
Layer : Positive) return HAL.Bitmap.Bitmap_Buffer'Class is abstract;
-- Retrieves the current hidden buffer for the layer.
function Get_Pixel_Size
(Display : Frame_Buffer_Display;
Layer : Positive) return Positive is abstract;
-- Retrieves the current hidden buffer for the layer.
end HAL.Framebuffer;
|
testutil/ahven/ahven-parameters.ads
|
Letractively/ada-util
| 60 |
11725
|
<reponame>Letractively/ada-util
--
-- Copyright (c) 2008 <NAME> <<EMAIL>>
--
-- Permission to use, copy, modify, and distribute this software for any
-- purpose with or without fee is hereby granted, provided that the above
-- copyright notice and this permission notice appear in all copies.
--
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
--
with Ahven.Framework;
package Ahven.Parameters is
Invalid_Parameter : exception;
type Parameter_Info is private;
type Parameter_Mode is (NORMAL_PARAMETERS, TAP_PARAMETERS);
procedure Parse_Parameters (Mode : Parameter_Mode;
Info : out Parameter_Info);
-- Parse Ada.Command_Line parameters and put the results
-- to the Info parameter. Raises Invalid_Parameter if
-- some parameter is invalid.
procedure Usage (Mode : Parameter_Mode := NORMAL_PARAMETERS);
-- Print usage.
function Capture (Info : Parameter_Info) return Boolean;
-- Capture Ada.Text_IO output?
function Verbose (Info : Parameter_Info) return Boolean;
-- Use verbose mode?
function XML_Results (Info : Parameter_Info) return Boolean;
-- Output XML?
function Single_Test (Info : Parameter_Info) return Boolean;
-- Run a single test (case/suite/routine) only?
function Test_Name (Info : Parameter_Info) return String;
-- Return the name of the test passed as a parameter.
function Result_Dir (Info : Parameter_Info) return String;
-- Return the directory for XML results.
function Timeout (Info : Parameter_Info) return Framework.Test_Duration;
-- Return the timeout value for a test.
private
type Parameter_Info is record
Verbose_Output : Boolean := True;
Xml_Output : Boolean := False;
Capture_Output : Boolean := False;
Test_Name : Natural := 0;
-- Position of test name in the argument array
Result_Dir : Natural := 0;
-- Position of results dir in the argument array
Timeout : Framework.Test_Duration := 0.0;
end record;
end Ahven.Parameters;
|
alloy4fun_models/trashltl/models/3/ncxB7SoEZQGhkAzAf.als
|
Kaixi26/org.alloytools.alloy
| 0 |
1487
|
<reponame>Kaixi26/org.alloytools.alloy
open main
pred idncxB7SoEZQGhkAzAf_prop4 {
some f: File | eventually f in Trash
}
pred __repair { idncxB7SoEZQGhkAzAf_prop4 }
check __repair { idncxB7SoEZQGhkAzAf_prop4 <=> prop4o }
|
Cubical/Algebra/Module.agda
|
marcinjangrzybowski/cubical
| 301 |
7450
|
{-# OPTIONS --safe #-}
module Cubical.Algebra.Module where
open import Cubical.Algebra.Module.Base public
|
libsrc/stdio_new/error/stdio_success_znc.asm
|
meesokim/z88dk
| 8 |
171423
|
<filename>libsrc/stdio_new/error/stdio_success_znc.asm
; stdio_success_znc
; 05.2008 aralbrec
PUBLIC stdio_success_znc
; exit : hl = 0 and carry reset
pop hl
.stdio_success_znc
ld hl,0
or a
ret
|
source/strings/a-suenco.ads
|
ytomino/drake
| 33 |
7158
|
pragma License (Unrestricted);
-- Ada 2012
package Ada.Strings.UTF_Encoding.Conversions is
pragma Pure;
-- Conversions between various encoding schemes
function Convert (
Item : UTF_String;
Input_Scheme : Encoding_Scheme;
Output_Scheme : Encoding_Scheme;
Output_BOM : Boolean := False)
return UTF_String;
-- function from binary to 8 is missing, use from binary to binary
function Convert (
Item : UTF_String;
Input_Scheme : Encoding_Scheme;
Output_BOM : Boolean := False)
return UTF_16_Wide_String;
-- extended
-- This function convets from binary to 32.
function Convert (
Item : UTF_String;
Input_Scheme : Encoding_Scheme;
Output_BOM : Boolean := False)
return UTF_32_Wide_Wide_String;
-- function from 8 to binary is missing, use from binary to binary
function Convert (
Item : UTF_8_String;
Output_BOM : Boolean := False)
return UTF_16_Wide_String;
-- extended
-- This function convets from 8 to 32.
function Convert (
Item : UTF_8_String;
Output_BOM : Boolean := False)
return UTF_32_Wide_Wide_String;
function Convert (
Item : UTF_16_Wide_String;
Output_Scheme : Encoding_Scheme;
Output_BOM : Boolean := False)
return UTF_String;
function Convert (
Item : UTF_16_Wide_String;
Output_BOM : Boolean := False)
return UTF_8_String;
-- extended
-- This function convets from 16 to 32.
function Convert (
Item : UTF_16_Wide_String;
Output_BOM : Boolean := False)
return UTF_32_Wide_Wide_String;
-- extended
-- This function convets from 32 to binary.
function Convert (
Item : UTF_32_Wide_Wide_String;
Output_Scheme : Encoding_Scheme;
Output_BOM : Boolean := False)
return UTF_String;
-- extended
-- This function convets from 32 to 8.
function Convert (
Item : UTF_32_Wide_Wide_String;
Output_BOM : Boolean := False)
return UTF_8_String;
-- extended
-- This function convets from 32 to 16.
function Convert (
Item : UTF_32_Wide_Wide_String;
Output_BOM : Boolean := False)
return UTF_16_Wide_String;
end Ada.Strings.UTF_Encoding.Conversions;
|
fili-core/src/main/antlr4/com/yahoo/bard/webservice/web/havingparser/HavingsLex.g4
|
huangchengmin97/fili
| 166 |
3316
|
<filename>fili-core/src/main/antlr4/com/yahoo/bard/webservice/web/havingparser/HavingsLex.g4<gh_stars>100-1000
lexer grammar HavingsLex;
options { }
tokens { OPERATOR, PARAMETER, KEY, VALUE, ESCAPED_VALUE, HAVING_VALUE }
// Reused from metric
// Numeric value fragments
fragment DOT: '.' ;
fragment DIGITS : [0-9] ;
fragment SCIENTIFIC_NOTATION : [eE] ;
fragment SIGNS : [+\-] ;
OPEN_PARENTHESIS : '(' -> pushMode(PARAM_MODE);
CLOSE_PARENTHESIS : ')' ;
COMMA : ',';
DASH: '-';
ID : [a-zA-Z0-9_]+;
WS : [ \t\n\r]+ -> skip;
OPEN_BRACKET : '[' -> pushMode(HAVING_VALUE_MODE);
// Having Operators
mode PARAM_MODE;
WS0 : [ \t\n\r]+ -> skip;
COMMA0 : ',' -> type(COMMA);
ID2 : [a-zA-Z0-9_|]+ -> type(ID);
EQUALS: '=' -> pushMode(VALUE_MODE);
CLOSE_PARENTHESIS2 : ')' -> type(CLOSE_PARENTHESIS), popMode ;
mode VALUE_MODE;
WS1 : [ \t\n\r]+ -> skip;
COMMA1 : ',' -> type(COMMA) ;
// I don't think you need to escape \, only '
ESCAPED_VALUE : '(' ( '\\)' | ~[)] )* ')' -> type(ESCAPED_VALUE), popMode;
UNESCAPED_VALUE : [a-zA-Z0-9_]+ -> type(VALUE), popMode;
// end of reused from metric
// Having specific syntax
// having values mode
mode HAVING_VALUE_MODE;
WS2 : [ \t\n\r]+ -> skip;
COMMA2 : ',' -> type(COMMA);
NUMERIC_VALUE : ( SIGNS? DIGITS+ (DOT DIGITS*)? ( SCIENTIFIC_NOTATION SIGNS? DIGITS+) ?
| SIGNS? DOT DIGITS+ ( SCIENTIFIC_NOTATION SIGNS? DIGITS+ )?
) {setText(getText().trim());} -> type(HAVING_VALUE);
CLOSE_BRACKET : ']' -> popMode;
|
source/types.ads
|
jquorning/WeDo
| 1 |
12583
|
<filename>source/types.ads
--
-- The author disclaims copyright to this source code. In place of
-- a legal notice, here is a blessing:
--
-- May you do good and not evil.
-- May you find forgiveness for yourself and forgive others.
-- May you share freely, not taking more than you give.
--
-----------------------------------------------------------------------------
-- Common types
--
with Ada.Containers.Vectors;
with Ada.Strings.Unbounded;
package Types is
type Job_Id is new Long_Integer; -- Interfaces.Integer_64;
package US renames Ada.Strings.Unbounded;
type Job_Desc is
record
Id : Types.Job_Id;
Title : US.Unbounded_String;
end record;
type Job_Index is new Positive;
package Job_Sets is
new Ada.Containers.Vectors (Job_Index, Job_Desc);
type Job_Info is
record
Title : US.Unbounded_String;
Parent : Types.Job_Id;
Owner : US.Unbounded_String;
end record;
end Types;
|
src/os/preferences/macos/set_terminal_theme.applescript
|
mariusmateoc/dotfiles
| 0 |
1942
|
<reponame>mariusmateoc/dotfiles
#!/usr/bin/osascript
tell application "Terminal"
local allOpenedWindows
local initialOpenedWindows
local windowID
set themeName to "Tomorrow Night"
(* Store the IDs of all the open terminal windows. *)
set initialOpenedWindows to id of every window
(* Open the custom theme so that it gets added to the list
of available terminal themes (note: this will open two
additional terminal windows). *)
do shell script "open '" & themeName & ".terminal'"
(* Wait a little bit to ensure that the custom theme is added. *)
delay 1
(* Set the custom theme as the default terminal theme. *)
set default settings to settings set themeName
(* Get the IDs of all the currently opened terminal windows. *)
set allOpenedWindows to id of every window
repeat with windowID in allOpenedWindows
(* Close the additional windows that were opened in order
to add the custom theme to the list of terminal themes. *)
if initialOpenedWindows does not contain windowID then
close (every window whose id is windowID)
(* Change the theme for the initial opened terminal windows
to remove the need to close them in order for the custom
theme to be applied. *)
else
set current settings of tabs of (every window whose id is windowID) to settings set themeName
end if
end repeat
end tell
|
source/tasking/machine-w64-mingw32/s-natint.ads
|
ytomino/drake
| 33 |
29633
|
<gh_stars>10-100
pragma License (Unrestricted);
-- implementation unit specialized for Windows
with C;
package System.Native_Interrupts is
pragma Preelaborate;
subtype Interrupt_Id is C.signed_int;
function Is_Blocked (Interrupt : Interrupt_Id) return Boolean is (False);
procedure Block (Interrupt : Interrupt_Id)
with Import, Convention => Ada, External_Name => "__drake_program_error";
-- signal mask is not available in mingw-w64
procedure Unblock (Interrupt : Interrupt_Id) is null;
pragma Inline (Unblock); -- [gcc-7] can not skip calling null procedure
procedure Raise_Interrupt (Interrupt : Interrupt_Id);
end System.Native_Interrupts;
|
src/main/fragment/mos6502-common/vwum1=_word1_vdum2.asm
|
jbrandwood/kickc
| 2 |
98470
|
lda {m2}+2
sta {m1}
lda {m2}+3
sta {m1}+1
|
src/Tactic/Nat/Subtract/Lemmas.agda
|
t-more/agda-prelude
| 0 |
3262
|
<filename>src/Tactic/Nat/Subtract/Lemmas.agda
module Tactic.Nat.Subtract.Lemmas where
open import Prelude
open import Tactic.Nat.NF
open import Tactic.Nat.Exp
open import Container.Bag
open import Tactic.Nat.Simpl
open import Prelude.Nat.Properties
open import Prelude.List.Properties
open import Tactic.Nat.Auto.Lemmas
open import Tactic.Nat.Simpl.Lemmas
open import Tactic.Nat.Auto
open import Tactic.Nat.Simpl
open import Tactic.Nat.Subtract.Exp
sub-cancel : (a : Nat) → a - a ≡ 0
sub-cancel zero = refl
sub-cancel (suc a) = sub-cancel a
sub-add-r : (a b c : Nat) → a - (b + c) ≡ a - b - c
sub-add-r a zero c = refl
sub-add-r zero (suc b) zero = refl
sub-add-r zero (suc b) (suc c) = refl
sub-add-r (suc a) (suc b) c = sub-add-r a b c
lem-sub-zero : (a b c : Nat) → b + c ≡ a → c ≡ a - b
lem-sub-zero ._ zero c refl = refl
lem-sub-zero ._ (suc b) c refl = lem-sub-zero _ b c refl
lem-zero-sub : (a b c : Nat) → b ≡ a + c → 0 ≡ a - b
lem-zero-sub zero ._ zero refl = refl
lem-zero-sub zero ._ (suc c) refl = refl
lem-zero-sub (suc a) ._ c refl = lem-zero-sub a _ c refl
lem-sub : (a b u v : Nat) → b + u ≡ a + v → u - v ≡ a - b
lem-sub zero zero u ._ refl = sub-cancel u
lem-sub zero (suc b) u ._ refl = sym $ lem-zero-sub u (suc b + u) (suc b) auto
lem-sub (suc a) zero ._ v refl = sym $ lem-sub-zero (suc a + v) v (suc a) auto
lem-sub (suc a) (suc b) u v eq = lem-sub a b u v (suc-inj eq)
sub-mul-distr-l : (a b c : Nat) → (a - b) * c ≡ a * c - b * c
sub-mul-distr-l zero b c = (_* c) $≡ lem-zero-sub 0 b b refl ʳ⟨≡⟩ lem-zero-sub 0 (b * c) (b * c) refl
sub-mul-distr-l (suc a) zero c = refl
sub-mul-distr-l (suc a) (suc b) c =
sub-mul-distr-l a b c ⟨≡⟩
lem-sub (suc a * c) (suc b * c) (a * c) (b * c) auto
sub-mul-distr-r : (a b c : Nat) → a * (b - c) ≡ a * b - a * c
sub-mul-distr-r a b c =
auto ⟨≡⟩ sub-mul-distr-l b c a
⟨≡⟩ cong₂ _-_ (mul-commute b a) (mul-commute c a)
-- The evaluator that doesn't generate x * 1 + 0 is the same as the
-- one that does.
lem-eval-sns-sn : ∀ n ρ → ⟦ n ⟧sns ρ ≡ ⟦ n ⟧sn ρ
private
lem-eval-sns-sn-t : ∀ t ρ → ⟦ t ⟧sts ρ ≡ ⟦ t ⟧st ρ
lem-eval-sns-sn-a : ∀ a ρ → ⟦ a ⟧sas ρ ≡ ⟦ a ⟧sa ρ
lem-eval-sns-sn-a (var x) ρ = refl
lem-eval-sns-sn-a (a ⟨-⟩ b) ρ = _-_ $≡ lem-eval-sns-sn a ρ *≡ lem-eval-sns-sn b ρ
lem-eval-sns-sn-t [] ρ = refl
lem-eval-sns-sn-t (x ∷ []) ρ = lem-eval-sns-sn-a x ρ ⟨≡⟩ auto
lem-eval-sns-sn-t (x ∷ y ∷ t) ρ = _*_ $≡ lem-eval-sns-sn-a x ρ *≡ lem-eval-sns-sn-t (y ∷ t) ρ
lem-eval-sns-sn [] ρ = refl
lem-eval-sns-sn ((k , t) ∷ []) ρ = _*_ k $≡ lem-eval-sns-sn-t t ρ ⟨≡⟩ auto
lem-eval-sns-sn ((k , t) ∷ t₁ ∷ n) ρ = _+_ $≡ (_*_ k $≡ lem-eval-sns-sn-t t ρ)
*≡ lem-eval-sns-sn (t₁ ∷ n) ρ
-- The evaluation that the termination checker lets us write is the
-- same as the one we want to write.
private
lem-eval-sn-n-t : ∀ t ρ → ⟦ t ⟧st ρ ≡ productR (map (atomEnv ρ) t)
lem-eval-sn-n-t [] ρ = refl
lem-eval-sn-n-t (x ∷ t) ρ = (⟦ x ⟧sa ρ *_) $≡ lem-eval-sn-n-t t ρ
lem-eval-sn-n : ∀ n ρ → ⟦ n ⟧sn ρ ≡ ⟦ n ⟧n (atomEnv ρ)
lem-eval-sn-n [] ρ = refl
lem-eval-sn-n ((k , t) ∷ n) ρ = _+_ $≡ (_*_ k $≡ lem-eval-sn-n-t t ρ) *≡ lem-eval-sn-n n ρ
private
lem-env : ∀ ρ x → atomEnvS ρ x ≡ atomEnv ρ x
lem-env ρ (var x) = refl
lem-env ρ (a ⟨-⟩ b) = _-_ $≡ lem-eval-sns-sn a ρ *≡ lem-eval-sns-sn b ρ
-- Combining the above equalities.
lem-eval-sn-nS : ∀ n ρ → ⟦ n ⟧sn ρ ≡ ⟦ n ⟧n (atomEnvS ρ)
lem-eval-sn-nS n ρ = lem-eval-sn-n n ρ ⟨≡⟩ʳ lem-eval-env (atomEnvS ρ) (atomEnv ρ) (lem-env ρ) n
lem-eval-sns-nS : ∀ n ρ → ⟦ n ⟧sns ρ ≡ ⟦ n ⟧n (atomEnvS ρ)
lem-eval-sns-nS n ρ = lem-eval-sns-sn n ρ ⟨≡⟩ lem-eval-sn-nS n ρ
lem-eval-sns-ns : ∀ n ρ → ⟦ n ⟧sns ρ ≡ ⟦ n ⟧ns (atomEnvS ρ)
lem-eval-sns-ns n ρ = lem-eval-sns-nS n ρ ⟨≡⟩ʳ ns-sound n (atomEnvS ρ)
⟨-⟩-sound′ : ∀ a b ρ → ⟦ a -nf′ b ⟧n (atomEnv ρ) ≡ ⟦ a ⟧n (atomEnv ρ) - ⟦ b ⟧n (atomEnv ρ)
⟨-⟩-sound′ a b ρ with cancel a b | λ i j → cancel-complete′ i j a b (atomEnv ρ)
⟨-⟩-sound′ a b ρ | d , [] | complete =
let u = ⟦ a ⟧n (atomEnv ρ)
v = ⟦ b ⟧n (atomEnv ρ)
k = ⟦ d ⟧n (atomEnv ρ) in
lem-sub-zero u v k (complete v u auto ⟨≡⟩ auto)
⟨-⟩-sound′ a b ρ | [] , d ∷ ds | complete =
let u = ⟦ a ⟧n (atomEnv ρ)
v = ⟦ b ⟧n (atomEnv ρ)
k = ⟦ d ∷ ds ⟧n (atomEnv ρ) in
lem-zero-sub u v k (auto ⟨≡⟩ complete v u auto)
⟨-⟩-sound′ a b ρ | u ∷ us , v ∷ vs | complete =
let eval = λ x → ⟦ x ⟧n (atomEnv ρ) in
(⟦ u ∷ us ⟧sn ρ - ⟦ v ∷ vs ⟧sn ρ) * 1 + 0 + 0
≡⟨ auto ⟩
⟦ u ∷ us ⟧sn ρ - ⟦ v ∷ vs ⟧sn ρ
≡⟨ cong₂ _-_ (lem-eval-sn-n (u ∷ us) ρ) (lem-eval-sn-n (v ∷ vs) ρ) ⟩
eval (u ∷ us) - eval (v ∷ vs)
≡⟨ lem-sub (eval a) (eval b) (eval (u ∷ us)) (eval (v ∷ vs)) (complete (eval b) (eval a) auto) ⟩
eval a - eval b ∎
⟨-⟩-sound : ∀ a b ρ → ⟦ a -nf b ⟧n (atomEnv ρ) ≡ ⟦ a ⟧n (atomEnv ρ) - ⟦ b ⟧n (atomEnv ρ)
⟨-⟩-sound a b ρ with is-subtraction a
⟨-⟩-sound a b ρ | no = ⟨-⟩-sound′ a b ρ
⟨-⟩-sound ._ c ρ | a ⟨-⟩ b =
let eval = λ x → ⟦ x ⟧n (atomEnv ρ) in
⟨-⟩-sound′ a (b +nf c) ρ ⟨≡⟩
(eval a -_) $≡ ⟨+⟩-sound b c (atomEnv ρ) ⟨≡⟩
sub-add-r (eval a) (eval b) (eval c) ⟨≡⟩
(_- eval c) $≡ (_-_ $≡ lem-eval-sn-n a ρ *≡ lem-eval-sn-n b ρ) ʳ⟨≡⟩
(_- eval c) $≡ auto
⟨*⟩-sound₁ : ∀ a b ρ → ⟦ a *nf₁ b ⟧n (atomEnv ρ) ≡ ⟦ a ⟧n (atomEnv ρ) * ⟦ b ⟧n (atomEnv ρ)
private
sound-mul-ktm′ : ∀ t a ρ → ⟦ t *ktm′ a ⟧n (atomEnv ρ) ≡ ⟦ t ⟧t (atomEnv ρ) * ⟦ a ⟧n (atomEnv ρ)
sound-mul-tm : ∀ s t ρ → ⟦ s *tm t ⟧n (atomEnv ρ) ≡ ⟦ s ⟧t (atomEnv ρ) * ⟦ t ⟧t (atomEnv ρ)
sound-mul-tm s t ρ with is-subtraction-tm t
sound-mul-tm (x , a) (y , b) ρ | no =
follows-from (x * y *_ $≡ map-merge a b (atomEnv ρ))
sound-mul-tm s ._ ρ | a ⟨-⟩ b =
let eval x = ⟦ x ⟧n (atomEnv ρ)
evalt x = ⟦ x ⟧t (atomEnv ρ) in
⟨-⟩-sound (s *ktm′ a) (s *ktm′ b) ρ ⟨≡⟩
_-_ $≡ sound-mul-ktm′ s a ρ *≡ sound-mul-ktm′ s b ρ ⟨≡⟩
sub-mul-distr-r (evalt s) (eval a) (eval b) ʳ⟨≡⟩
(evalt s *_) $≡ (_-_ $≡ lem-eval-sn-n a ρ *≡ lem-eval-sn-n b ρ) ʳ⟨≡⟩
auto
sound-mul-ktm′ t [] ρ = auto
sound-mul-ktm′ t (x ∷ a) ρ =
let eval x = ⟦ x ⟧n (atomEnv ρ)
evalt x = ⟦ x ⟧t (atomEnv ρ) in
⟨+⟩-sound (t *tm x) (t *ktm′ a) (atomEnv ρ) ⟨≡⟩
_+_ $≡ sound-mul-tm t x ρ *≡ sound-mul-ktm′ t a ρ ⟨≡⟩ʳ
mul-distr-l (evalt t) (evalt x) (eval a)
sound-mul-ktm : ∀ t a ρ → ⟦ t *ktm a ⟧n (atomEnv ρ) ≡ ⟦ t ⟧t (atomEnv ρ) * ⟦ a ⟧n (atomEnv ρ)
sound-mul-ktm t a ρ with is-subtraction-tm t
sound-mul-ktm t a ρ | no = sound-mul-ktm′ t a ρ
sound-mul-ktm ._ c ρ | a ⟨-⟩ b =
let eval x = ⟦ x ⟧n (atomEnv ρ) in
⟨-⟩-sound (a *nf₁ c) (b *nf₁ c) ρ ⟨≡⟩
_-_ $≡ ⟨*⟩-sound₁ a c ρ *≡ ⟨*⟩-sound₁ b c ρ ⟨≡⟩
sub-mul-distr-l (eval a) (eval b) (eval c) ʳ⟨≡⟩
(_* eval c) $≡ (_-_ $≡ lem-eval-sn-n a ρ *≡ lem-eval-sn-n b ρ) ʳ⟨≡⟩
auto
⟨*⟩-sound₁ [] b ρ = refl
⟨*⟩-sound₁ (t ∷ a) b ρ =
let eval x = ⟦ x ⟧n (atomEnv ρ)
evalt x = ⟦ x ⟧t (atomEnv ρ) in
⟨+⟩-sound (t *ktm b) (a *nf₁ b) (atomEnv ρ) ⟨≡⟩
_+_ $≡ sound-mul-ktm t b ρ *≡ ⟨*⟩-sound₁ a b ρ ⟨≡⟩ʳ
mul-distr-r (evalt t) (eval a) (eval b)
sound-sub : ∀ e ρ → ⟦ e ⟧se ρ ≡ ⟦ normSub e ⟧sn ρ
sound-sub (var x) ρ = auto
sound-sub (lit 0) ρ = refl
sound-sub (lit (suc n)) ρ = auto
sound-sub (e ⟨+⟩ e₁) ρ =
cong₂ _+_ (sound-sub e ρ ⟨≡⟩ lem-eval-sn-n (normSub e) ρ)
(sound-sub e₁ ρ ⟨≡⟩ lem-eval-sn-n (normSub e₁) ρ) ⟨≡⟩
⟨+⟩-sound (normSub e) (normSub e₁) (atomEnv ρ) ʳ⟨≡⟩ʳ
lem-eval-sn-n (normSub (e ⟨+⟩ e₁)) ρ
sound-sub (e ⟨*⟩ e₁) ρ =
cong₂ _*_ (sound-sub e ρ ⟨≡⟩ lem-eval-sn-n (normSub e) ρ)
(sound-sub e₁ ρ ⟨≡⟩ lem-eval-sn-n (normSub e₁) ρ) ⟨≡⟩
⟨*⟩-sound₁ (normSub e) (normSub e₁) ρ ʳ⟨≡⟩ʳ
lem-eval-sn-n (normSub (e ⟨*⟩ e₁)) ρ
sound-sub (e ⟨-⟩ e₁) ρ =
cong₂ _-_ (sound-sub e ρ ⟨≡⟩ lem-eval-sn-n (normSub e) ρ)
(sound-sub e₁ ρ ⟨≡⟩ lem-eval-sn-n (normSub e₁) ρ) ⟨≡⟩
⟨-⟩-sound (normSub e) (normSub e₁) ρ ʳ⟨≡⟩ʳ
lem-eval-sn-n (normSub (e ⟨-⟩ e₁)) ρ
liftNFSubEq : ∀ e₁ e₂ ρ → ⟦ normSub e₁ ⟧sn ρ ≡ ⟦ normSub e₂ ⟧sn ρ → ⟦ e₁ ⟧se ρ ≡ ⟦ e₂ ⟧se ρ
liftNFSubEq e₁ e₂ ρ eq = eraseEquality $ sound-sub e₁ ρ ⟨≡⟩ eq ⟨≡⟩ʳ sound-sub e₂ ρ
unliftNFSubEq : ∀ e₁ e₂ ρ → ⟦ e₁ ⟧se ρ ≡ ⟦ e₂ ⟧se ρ → ⟦ normSub e₁ ⟧sn ρ ≡ ⟦ normSub e₂ ⟧sn ρ
unliftNFSubEq e₁ e₂ ρ eq = eraseEquality $ sound-sub e₁ ρ ʳ⟨≡⟩ eq ⟨≡⟩ sound-sub e₂ ρ
SubExpEq : SubExp → SubExp → Env Var → Set
SubExpEq e₁ e₂ ρ = ⟦ e₁ ⟧se ρ ≡ ⟦ e₂ ⟧se ρ
CancelSubEq : SubExp → SubExp → Env Var → Set
CancelSubEq e₁ e₂ ρ = NFEqS (cancel (normSub e₁) (normSub e₂)) (atomEnvS ρ)
simplifySubEq : ∀ e₁ e₂ (ρ : Env Var) → CancelSubEq e₁ e₂ ρ → SubExpEq e₁ e₂ ρ
simplifySubEq e₁ e₂ ρ H = liftNFSubEq e₁ e₂ ρ $
lem-eval-sn-nS (normSub e₁) ρ ⟨≡⟩
cancel-sound (normSub e₁) (normSub e₂) (atomEnvS ρ) H ⟨≡⟩ʳ
lem-eval-sn-nS (normSub e₂) ρ
complicateSubEq : ∀ e₁ e₂ ρ → SubExpEq e₁ e₂ ρ → CancelSubEq e₁ e₂ ρ
complicateSubEq e₁ e₂ ρ H =
cancel-complete (normSub e₁) (normSub e₂) (atomEnvS ρ) $
lem-eval-sn-nS (normSub e₁) ρ ʳ⟨≡⟩
unliftNFSubEq e₁ e₂ ρ H ⟨≡⟩
lem-eval-sn-nS (normSub e₂) ρ
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.