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 |
|---|---|---|---|---|
programs/oeis/336/A336705.asm | neoneye/loda | 22 | 87851 | <reponame>neoneye/loda
; A336705: Coordination sequence for the half-Manhattan lattice.
; 1,3,7,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160,164,168,172,176,180,184,188,192,196,200,204,208,212,216,220,224,228
mov $1,$0
mul $0,8
sub $0,2
dif $0,2
sub $1,1
mul $1,2
mov $2,2
bin $2,$1
trn $0,$2
add $0,1
|
kernel/arch/i386/bios32.asm | squirrelcom/tritium-os | 17 | 7980 | ; BIOS32 function:
; Execute function in BIOS (see VESA32 in idt-asm.asm for VESA related bios functions)
;
; Inputs:
; al - Function
; other registers, vary
;
; Outputs:
; varies
;
; Note: you will most likely have to reload the PIT
; Macros to make it easier to access data and code copied to 0x7C00
%define INT32_LENGTH (_int32_end-_int32)
%define FIXADDR(addr) (((addr)-_int32)+0x7C00)
; Macros for the storevars at 0x7C00
%define sv_bx FIXADDR(storevars.bx)
%define sv_cx FIXADDR(storevars.cx)
%define sv_dx FIXADDR(storevars.dx)
%define sv_si FIXADDR(storevars.si)
%define sv_di FIXADDR(storevars.di)
%define sv_func FIXADDR(storevars.func)
global bios32
bios32:
cli
; Store registers so we can use them
mov [storevars.func],ax
mov [storevars.bx],bx
mov [storevars.cx],cx
mov [storevars.dx],dx
mov [storevars.si],si
mov [storevars.di],di
; Copy the _int32 function (et al) to 0x7C00 (below 1MiB)
mov esi,_int32
mov edi,0x7C00
mov ecx,INT32_LENGTH
cld
rep movsb
; Relocate the stored variables to where the rest of the data is
mov ax,[storevars.bx]
mov [sv_bx],ax
mov ax,[storevars.cx]
mov [sv_cx],ax
mov ax,[storevars.dx]
mov [sv_dx],ax
mov ax,[storevars.si]
mov [sv_si],ax
mov ax,[storevars.di]
mov [sv_di],ax
mov ax,[storevars.func]
mov [sv_func],ax
; Jump to code under 1MiB so we can run in 16 bit mode
jmp 0x00007C00
[BITS 32]
_int32:
; Store any remaining registers so we don't mess anything up in C
mov [store32.esp],esp
mov [store32.ebp],ebp
; Store the cr3 in case the BIOS messes it up
mov eax,cr3
mov [store32.cr3],eax
; Disable paging
mov eax,cr0
and eax,0x7FFFFFFF
mov cr0,eax
; Store existing GDTs and IDTs and load temporary ones
sgdt [FIXADDR(gdt32)]
sidt [FIXADDR(idt32)]
lgdt [FIXADDR(gdt16)]
lidt [FIXADDR(idt16)]
; Switch to 16 bit protected mode
jmp word 0x08:FIXADDR(_intp16)
[BITS 16]
_intp16:
; Load all the segment registers with the data segment
mov ax,0x10
mov ds,ax
mov es,ax
mov fs,ax
mov gs,ax
mov ss,ax
; Disable protected mode
mov eax,cr0
and al, 0xFE
mov cr0,eax
; Jump to realmode
jmp word 0x0000:FIXADDR(_intr16)
_intr16:
; Load all the data segments with 0
mov ax,0
mov ss,ax
mov ds,ax
mov es,ax
mov fs,ax
mov gs,ax
; Set a temporary stack
mov sp,0x7B00
mov ax,[sv_func]
cmp ax,0x1553
je .bios_shutdown
jmp .fn_err
.bios_shutdown:
; Connect to realmode BIOS APM interface (if not already)
mov ax,0x5301
xor bx,bx
mov dx,1
int 0x15
; Set APM to version 1.2 (if not already)
mov ax,0x530E
xor bx,bx
mov cx,0x102
int 0x15
; Enable BIOS APM (if not already)
mov ax, 0x5308
mov bx,1
mov cx,1
int 0x15
; Use BIOS function 0x5307 to shut down the computer.
;mov ax,0x1000
;mov ax,ss
;mov sp,0xf000
mov ax,0x5307
mov bx,1
mov cx,3
int 0x15
; Just do a hlt. Interrupts are already disabled. Tell the user to power off their computer manually.
hlt
.fn_err:
mov ax,0xFFFF
; Return to protected mode!
.returnpm:
; Store the return values
mov [FIXADDR(storevars.error)],ax
; Turn on protected mode (this is same as "or cr0,1")
mov eax,cr0
inc eax
mov cr0,eax
; Load 32 bit GDT
lgdt [FIXADDR(gdt32)]
; Jump to 32 bit protected mode
jmp 0x08:FIXADDR(returnpm32)
[BITS 32]
; We're back in 32 bit protected mode land!
returnpm32:
; Load all the data segments
mov ax,0x10
mov ss,ax
mov ds,ax
mov es,ax
mov fs,ax
mov gs,ax
; Use the protected mode IDT
lidt [FIXADDR(idt32)]
; Re-enable paging
mov eax,cr0
or eax,0x80000000
mov cr0,eax
; Restore cr3
mov eax,[store32.cr3]
mov cr3,eax
; Reload GDT with paging enabled (otherwise we will triple fault on sti)
lgdt [FIXADDR(gdt32)]
; Restore PIC (see idt.c for values)
mov al,0x11
out 0x20,al
out 0xA0,al
mov al,0x20
out 0x21,al
mov al,40
out 0xA1,al
mov al,4
out 0x21,al
sub al,2
out 0xA1,al
dec al
out 0x21,al
out 0xA1,al
xor al,al
out 0x21,al
out 0xA1,al
mov ax,[FIXADDR(storevars.error)]
; Re-enable interrupts
sti
; Finally, return to the callee
ret
gdt32:
dw 0
dd 0
idt32:
dw 0
dd 0
idt16:
dw 0x03FF
dd 0
gdt16_struct:
dq 0
dw 0xFFFF
dw 0
db 0
db 10011010b
db 10001111b
db 0
dw 0xFFFF
dw 0
db 0
db 10010010b
db 10001111b
db 0
gdt16:
dw gdt16 - gdt16_struct - 1
dd FIXADDR(gdt16_struct)
storevars:
.bx dw 0
.cx dw 0
.dx dw 0
.si dw 0
.di dw 0
.func dw 0
.error dw 0
_int32_end:
store32:
.esp dd 0
.ebp dd 0
.cr3 dd 0 |
oeis/204/A204575.asm | neoneye/loda-programs | 11 | 22312 | ; A204575: Squares such that [a(n)/2] is again a square (A055792), written in binary.
; Submitted by <NAME>
; 0,1,1001,100100001,10011001001001,1010001010010000001,101011001001001011001001,10110111001100110101000100001,1100001001111011011000010110001001,110011100111010101001010101001000000001
seq $0,55792 ; a(n) and floor(a(n)/2) are both squares; i.e., squares which remain squares when written in base 2 and last digit is removed.
seq $0,7088 ; The binary numbers (or binary words, or binary vectors, or binary expansion of n): numbers written in base 2.
|
Sources/Globe_3d/globe_3d-options.adb | ForYouEyesOnly/Space-Convoy | 1 | 285 | <reponame>ForYouEyesOnly/Space-Convoy
package body GLOBE_3D.Options is
function Is_debug_mode return Boolean is
begin
return
show_normals or
show_portals or
full_check_objects or
filter_portal_depth;
end Is_debug_mode;
end GLOBE_3D.Options;
|
libsrc/video/tms9918/add_raster_nmi.asm | jpoikela/z88dk | 640 | 80312 | <filename>libsrc/video/tms9918/add_raster_nmi.asm
SECTION code_clib
PUBLIC add_raster_int
PUBLIC _add_raster_int
EXTERN nmi_install_isr
defc add_raster_int = nmi_install_isr
defc _add_raster_int = nmi_install_isr
|
CPU/cpu_test/test_storage/1_set_load.asm | SilenceX12138/MIPS-Microsystems | 55 | 104023 | <filename>CPU/cpu_test/test_storage/1_set_load.asm
#initial
lui $1,0x2819
ori $1,$1,0x9384
lui $2,0x7cfd
ori $2,$2,0x5738
lui $3,0x883c
ori $3,$3,0x8847
lui $4,0x9382
ori $4,$4,0xacfe
sw $1,0($0)
sw $2,4($0)
sw $3,8($0)
sw $4,12($0)
#lh
ori $5,$0,1
slti $5,$5,2
lh $1,1($5)
lh $2,3($5)
sltiu $6,$0,238
ori $7,$0,7
lh $2,5($6)
lh $3,7($6)
lui $2,0xffff
ori $2,$2,0xfffe
slti $5,$2,-1
lui $4,0xfffe
xor $4,$5,$4
lh $3,9($5)
lh $4,11($5)
lh $5,13($5)
#lb
ori $5,$0,1
ori $6,$0,2
sltu $1,$5,$6
lb $2,-1($1)
lb $3,0($1)
lb $4,3($1)
lui $2,0xffff
ori $2,$2,0xffff
slt $3,$0,$2
sra $4,$2,1
lb $6,6($3)
lb $4,9($3)
lb $5,7($3)
lui $2,0xffff
ori $2,$2,0xfffe
ori $3,$0,1
sltu $3,$2,$3
ori $2,$0,0x9827
andi $5,$2,0x3826
lb $5,10($3)
lb $6,13($3)
lb $7,11($3)
#lhu
ori $5,$0,10
ori $6,$0,2
sltu $5,$5,$6
lhu $1,0($5)
lhu $2,2($5)
lui $2,0xffff
ori $2,$2,0xffff
slt $6,$0,$2
ori $7,$0,7
lhu $2,4($6)
lhu $3,6($6)
lui $2,0xffff
ori $2,$2,0xfffe
ori $3,$0,1
sltu $5,$2,$3
lui $4,0xfffe
xor $4,$5,$4
lhu $3,8($5)
lhu $4,10($5)
lhu $5,12($5)
#lbu
ori $5,$0,10
slti $1,$5,2
lbu $2,0($1)
lbu $3,1($1)
lbu $4,3($1)
lui $2,0xffff
ori $2,$2,0xfffc
sltiu $3,$2,1
sra $4,$2,1
lbu $6,5($3)
lbu $4,8($3)
lbu $5,7($3)
lui $2,0xffff
ori $2,$2,0xfffe
slti $3,$2,-1
ori $2,$0,0x9827
andi $5,$2,0x3826
lbu $5,9($3)
lbu $6,11($3)
lbu $7,10($3)
|
notes/fixed-points/LFPs/List.agda | asr/fotc | 11 | 16331 | ------------------------------------------------------------------------------
-- Equivalence of definitions of total lists
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K #-}
module LFPs.List where
open import FOTC.Base
open import FOTC.Base.List
open import FOTC.Data.Nat.UnaryNumbers
------------------------------------------------------------------------------
module LFP where
-- List is a least fixed-point of a functor
-- The functor.
ListF : (D → Set) → D → Set
ListF A xs = xs ≡ [] ∨ (∃[ x' ] ∃[ xs' ] xs ≡ x' ∷ xs' ∧ A xs')
-- List is the least fixed-point of ListF. i.e.
postulate
List : D → Set
-- List is a pre-fixed point of ListF, i.e.
--
-- ListF List ≤ List.
--
-- Peter: It corresponds to the introduction rules.
List-in : ∀ {xs} → xs ≡ [] ∨ (∃[ x' ] ∃[ xs' ] xs ≡ x' ∷ xs' ∧ List xs') →
List xs
-- The higher-order version.
List-in-ho : {xs : D} → ListF List xs → List xs
-- List is the least pre-fixed point of ListF, i.e.
--
-- ∀ A. ListF A ≤ A ⇒ List ≤ A.
--
-- Peter: It corresponds to the elimination rule of an inductively
-- defined predicate.
List-ind :
(A : D → Set) →
(∀ {xs} → xs ≡ [] ∨ (∃[ x' ] ∃[ xs' ] xs ≡ x' ∷ xs' ∧ A xs') → A xs) →
∀ {xs} → List xs → A xs
-- Higher-order version.
List-ind-ho :
(A : D → Set) →
(∀ {xs} → ListF A xs → A xs) →
∀ {xs} → List xs → A xs
----------------------------------------------------------------------------
-- List-in and List-in-ho are equivalents
List-in-fo : ∀ {xs} → xs ≡ [] ∨ (∃[ x' ] ∃[ xs' ] xs ≡ x' ∷ xs' ∧ List xs') →
List xs
List-in-fo = List-in-ho
List-in-ho' : {xs : D} → ListF List xs → List xs
List-in-ho' = List-in-ho
----------------------------------------------------------------------------
-- List-ind and List-ind-ho are equivalents
List-ind-fo :
(A : D → Set) →
(∀ {xs} → xs ≡ [] ∨ (∃[ x' ] ∃[ xs' ] xs ≡ x' ∷ xs' ∧ A xs') → A xs) →
∀ {xs} → List xs → A xs
List-ind-fo = List-ind-ho
List-ind-ho' :
(A : D → Set) →
(∀ {xs} → ListF A xs → A xs) →
∀ {xs} → List xs → A xs
List-ind-ho' = List-ind
----------------------------------------------------------------------------
-- The data constructors of List.
lnil : List []
lnil = List-in (inj₁ refl)
lcons : ∀ x {xs} → List xs → List (x ∷ xs)
lcons x {xs} Lxs = List-in (inj₂ (x , xs , refl , Lxs))
----------------------------------------------------------------------------
-- The type theoretical induction principle for List.
List-ind' : (A : D → Set) →
A [] →
(∀ x {xs} → A xs → A (x ∷ xs)) →
∀ {xs} → List xs → A xs
List-ind' A A[] is = List-ind A prf
where
prf : ∀ {xs} → xs ≡ [] ∨ (∃[ x' ] ∃[ xs' ] xs ≡ x' ∷ xs' ∧ A xs') → A xs
prf (inj₁ xs≡[]) = subst A (sym xs≡[]) A[]
prf (inj₂ (x' , xs' , h₁ , Axs')) = subst A (sym h₁) (is x' Axs')
----------------------------------------------------------------------------
-- Example
xs : D
xs = 0' ∷ true ∷ 1' ∷ false ∷ []
xs-List : List xs
xs-List = lcons 0' (lcons true (lcons 1' (lcons false lnil)))
------------------------------------------------------------------------------
module Data where
data List : D → Set where
lnil : List []
lcons : ∀ x {xs} → List xs → List (x ∷ xs)
-- Induction principle.
List-ind : (A : D → Set) →
A [] →
(∀ x {xs} → A xs → A (x ∷ xs)) →
∀ {xs} → List xs → A xs
List-ind A A[] h lnil = A[]
List-ind A A[] h (lcons x Lxs) = h x (List-ind A A[] h Lxs)
----------------------------------------------------------------------------
-- List-in
List-in : ∀ {xs} → xs ≡ [] ∨ (∃[ x' ] ∃[ xs' ] xs ≡ x' ∷ xs' ∧ List xs') →
List xs
List-in {xs} h = case prf₁ prf₂ h
where
prf₁ : xs ≡ [] → List xs
prf₁ xs≡[] = subst List (sym xs≡[]) lnil
prf₂ : ∃[ x' ] ∃[ xs' ] xs ≡ x' ∷ xs' ∧ List xs' → List xs
prf₂ (x' , xs' , prf , Lxs') = subst List (sym prf) (lcons x' Lxs')
----------------------------------------------------------------------------
-- The fixed-point induction principle for List.
List-ind' :
(A : D → Set) →
(∀ {xs} → xs ≡ [] ∨ (∃[ x' ] ∃[ xs' ] xs ≡ x' ∷ xs' ∧ A xs') → A xs) →
∀ {xs} → List xs → A xs
List-ind' A h Lxs = List-ind A h₁ h₂ Lxs
where
h₁ : A []
h₁ = h (inj₁ refl)
h₂ : ∀ y {ys} → A ys → A (y ∷ ys)
h₂ y {ys} Ays = h (inj₂ (y , ys , refl , Ays))
|
alloy4fun_models/trashltl/models/17/BP9SRic6yDQGMt9Jd.als | Kaixi26/org.alloytools.alloy | 0 | 234 | <reponame>Kaixi26/org.alloytools.alloy<gh_stars>0
open main
pred idBP9SRic6yDQGMt9Jd_prop18 {
always all p : Protected | p not in Protected' => p in Trash'
}
pred __repair { idBP9SRic6yDQGMt9Jd_prop18 }
check __repair { idBP9SRic6yDQGMt9Jd_prop18 <=> prop18o } |
xlwings/xlwings.applescript | Vip1225/testxlwings | 0 | 1160 | # Allows to run the script from Script Editor for testing
VbaHandler("TestString")
on VbaHandler(ParameterString)
set {PYTHONPATH, PythonInterpreter, PythonCommand, WORKBOOK_FULLNAME, ApplicationFullName, LOG_FILE} to SplitString(ParameterString, ",")
set ShellCommand to PythonInterpreter & " -B -u -W ignore -c \"import sys, os;sys.path.extend(os.path.normcase(os.path.expandvars('" & PYTHONPATH & "')).split(';'));" & ¬
PythonCommand & " \" \"" & WORKBOOK_FULLNAME & "\" \"from_xl\" \"" & ApplicationFullName & "\" > /dev/null 2>\"" & LOG_FILE & "\" & "
try
do shell script "source ~/.bash_profile"
return do shell script "source ~/.bash_profile;" & ShellCommand
on error errMsg number errNumber
try
# Try again without sourcing .bash_profile
return do shell script ShellCommand
on error errMsg number errNumber
return 1
end try
end try
end VbaHandler
on SplitString(TheBigString, fieldSeparator)
# From <NAME>'s "Mail from Excel 2016 with Mac Mail example": www.rondebruin.nl
tell AppleScript
set oldTID to text item delimiters
set text item delimiters to fieldSeparator
set theItems to text items of TheBigString
set text item delimiters to oldTID
end tell
return theItems
end SplitString
|
src/gen/gstreamer-gst_low_level-gstreamer_0_10_gst_base_gstbytereader_h.ads | persan/A-gst | 1 | 17866 | pragma Ada_2005;
pragma Style_Checks (Off);
pragma Warnings (Off);
with Interfaces.C; use Interfaces.C;
with GLIB; -- with GStreamer.GST_Low_Level.glibconfig_h;
with glib;
with glib.Values;
with System;
limited with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h;
with System;
package GStreamer.GST_Low_Level.gstreamer_0_10_gst_base_gstbytereader_h is
-- arg-macro: function GST_BYTE_READER (reader)
-- return (GstByteReader *) (reader);
-- arg-macro: procedure gst_byte_reader_dup_string (reader, str)
-- gst_byte_reader_dup_string_utf8(reader,str)
-- arg-macro: procedure gst_byte_reader_skip_string (reader)
-- gst_byte_reader_skip_string_utf8(reader)
-- arg-macro: procedure gst_byte_reader_get_string (reader, str)
-- gst_byte_reader_get_string_utf8(reader,str)
-- arg-macro: procedure gst_byte_reader_peek_string (reader, str)
-- gst_byte_reader_peek_string_utf8(reader,str)
-- arg-macro: procedure GST_BYTE_READER_INIT (data, size)
-- {data, size, 0}
-- arg-macro: procedure GST_BYTE_READER_INIT_FROM_BUFFER (buffer)
-- {GST_BUFFER_DATA (buffer), GST_BUFFER_SIZE (buffer), 0}
-- arg-macro: procedure gst_byte_reader_get_remaining (reader)
-- _gst_byte_reader_get_remaining_inline(reader)
-- arg-macro: procedure gst_byte_reader_get_size (reader)
-- _gst_byte_reader_get_size_inline(reader)
-- arg-macro: procedure gst_byte_reader_get_pos (reader)
-- _gst_byte_reader_get_pos_inline(reader)
-- arg-macro: procedure gst_byte_reader_get_uint8 (reader, val)
-- G_LIKELY(_gst_byte_reader_get_uint8_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_get_int8 (reader, val)
-- G_LIKELY(_gst_byte_reader_get_int8_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_get_uint16_le (reader, val)
-- G_LIKELY(_gst_byte_reader_get_uint16_le_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_get_int16_le (reader, val)
-- G_LIKELY(_gst_byte_reader_get_int16_le_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_get_uint16_be (reader, val)
-- G_LIKELY(_gst_byte_reader_get_uint16_be_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_get_int16_be (reader, val)
-- G_LIKELY(_gst_byte_reader_get_int16_be_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_get_uint24_le (reader, val)
-- G_LIKELY(_gst_byte_reader_get_uint24_le_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_get_int24_le (reader, val)
-- G_LIKELY(_gst_byte_reader_get_int24_le_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_get_uint24_be (reader, val)
-- G_LIKELY(_gst_byte_reader_get_uint24_be_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_get_int24_be (reader, val)
-- G_LIKELY(_gst_byte_reader_get_int24_be_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_get_uint32_le (reader, val)
-- G_LIKELY(_gst_byte_reader_get_uint32_le_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_get_int32_le (reader, val)
-- G_LIKELY(_gst_byte_reader_get_int32_le_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_get_uint32_be (reader, val)
-- G_LIKELY(_gst_byte_reader_get_uint32_be_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_get_int32_be (reader, val)
-- G_LIKELY(_gst_byte_reader_get_int32_be_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_get_uint64_le (reader, val)
-- G_LIKELY(_gst_byte_reader_get_uint64_le_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_get_int64_le (reader, val)
-- G_LIKELY(_gst_byte_reader_get_int64_le_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_get_uint64_be (reader, val)
-- G_LIKELY(_gst_byte_reader_get_uint64_be_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_get_int64_be (reader, val)
-- G_LIKELY(_gst_byte_reader_get_int64_be_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_peek_uint8 (reader, val)
-- G_LIKELY(_gst_byte_reader_peek_uint8_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_peek_int8 (reader, val)
-- G_LIKELY(_gst_byte_reader_peek_int8_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_peek_uint16_le (reader, val)
-- G_LIKELY(_gst_byte_reader_peek_uint16_le_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_peek_int16_le (reader, val)
-- G_LIKELY(_gst_byte_reader_peek_int16_le_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_peek_uint16_be (reader, val)
-- G_LIKELY(_gst_byte_reader_peek_uint16_be_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_peek_int16_be (reader, val)
-- G_LIKELY(_gst_byte_reader_peek_int16_be_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_peek_uint24_le (reader, val)
-- G_LIKELY(_gst_byte_reader_peek_uint24_le_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_peek_int24_le (reader, val)
-- G_LIKELY(_gst_byte_reader_peek_int24_le_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_peek_uint24_be (reader, val)
-- G_LIKELY(_gst_byte_reader_peek_uint24_be_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_peek_int24_be (reader, val)
-- G_LIKELY(_gst_byte_reader_peek_int24_be_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_peek_uint32_le (reader, val)
-- G_LIKELY(_gst_byte_reader_peek_uint32_le_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_peek_int32_le (reader, val)
-- G_LIKELY(_gst_byte_reader_peek_int32_le_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_peek_uint32_be (reader, val)
-- G_LIKELY(_gst_byte_reader_peek_uint32_be_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_peek_int32_be (reader, val)
-- G_LIKELY(_gst_byte_reader_peek_int32_be_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_peek_uint64_le (reader, val)
-- G_LIKELY(_gst_byte_reader_peek_uint64_le_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_peek_int64_le (reader, val)
-- G_LIKELY(_gst_byte_reader_peek_int64_le_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_peek_uint64_be (reader, val)
-- G_LIKELY(_gst_byte_reader_peek_uint64_be_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_peek_int64_be (reader, val)
-- G_LIKELY(_gst_byte_reader_peek_int64_be_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_get_float32_le (reader, val)
-- G_LIKELY(_gst_byte_reader_get_float32_le_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_get_float32_be (reader, val)
-- G_LIKELY(_gst_byte_reader_get_float32_be_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_get_float64_le (reader, val)
-- G_LIKELY(_gst_byte_reader_get_float64_le_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_get_float64_be (reader, val)
-- G_LIKELY(_gst_byte_reader_get_float64_be_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_peek_float32_le (reader, val)
-- G_LIKELY(_gst_byte_reader_peek_float32_le_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_peek_float32_be (reader, val)
-- G_LIKELY(_gst_byte_reader_peek_float32_be_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_peek_float64_le (reader, val)
-- G_LIKELY(_gst_byte_reader_peek_float64_le_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_peek_float64_be (reader, val)
-- G_LIKELY(_gst_byte_reader_peek_float64_be_inline(reader,val))
-- arg-macro: procedure gst_byte_reader_dup_data (reader, size, val)
-- G_LIKELY(_gst_byte_reader_dup_data_inline(reader,size,val))
-- arg-macro: procedure gst_byte_reader_get_data (reader, size, val)
-- G_LIKELY(_gst_byte_reader_get_data_inline(reader,size,val))
-- arg-macro: procedure gst_byte_reader_peek_data (reader, size, val)
-- G_LIKELY(_gst_byte_reader_peek_data_inline(reader,size,val))
-- arg-macro: procedure gst_byte_reader_skip (reader, nbytes)
-- G_LIKELY(_gst_byte_reader_skip_inline(reader,nbytes))
-- GStreamer byte reader
-- *
-- * Copyright (C) 2008 <NAME> <<EMAIL>.uk>.
-- * Copyright (C) 2009 <NAME> <tim centricular net>
-- *
-- * This library is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU Library General Public
-- * License as published by the Free Software Foundation; either
-- * version 2 of the License, or (at your option) any later version.
-- *
-- * This library 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
-- * Library General Public License for more details.
-- *
-- * You should have received a copy of the GNU Library General Public
-- * License along with this library; if not, write to the
-- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-- * Boston, MA 02111-1307, USA.
--
--*
-- * GstByteReader:
-- * @data: Data from which the bit reader will read
-- * @size: Size of @data in bytes
-- * @byte: Current byte position
-- *
-- * A byte reader instance.
--
type GstByteReader is record
data : access GLIB.guint8; -- gst/base/gstbytereader.h:40
size : aliased GLIB.guint; -- gst/base/gstbytereader.h:41
byte : aliased GLIB.guint; -- gst/base/gstbytereader.h:43
end record;
pragma Convention (C_Pass_By_Copy, GstByteReader); -- gst/base/gstbytereader.h:44
-- skipped anonymous struct anon_309
-- Byte position
function gst_byte_reader_new (data : access GLIB.guint8; size : GLIB.guint) return access GstByteReader; -- gst/base/gstbytereader.h:46
pragma Import (C, gst_byte_reader_new, "gst_byte_reader_new");
function gst_byte_reader_new_from_buffer (buffer : access constant GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer) return access GstByteReader; -- gst/base/gstbytereader.h:47
pragma Import (C, gst_byte_reader_new_from_buffer, "gst_byte_reader_new_from_buffer");
procedure gst_byte_reader_free (reader : access GstByteReader); -- gst/base/gstbytereader.h:48
pragma Import (C, gst_byte_reader_free, "gst_byte_reader_free");
procedure gst_byte_reader_init
(reader : access GstByteReader;
data : access GLIB.guint8;
size : GLIB.guint); -- gst/base/gstbytereader.h:50
pragma Import (C, gst_byte_reader_init, "gst_byte_reader_init");
procedure gst_byte_reader_init_from_buffer (reader : access GstByteReader; buffer : access constant GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer); -- gst/base/gstbytereader.h:51
pragma Import (C, gst_byte_reader_init_from_buffer, "gst_byte_reader_init_from_buffer");
function gst_byte_reader_set_pos (reader : access GstByteReader; pos : GLIB.guint) return GLIB.gboolean; -- gst/base/gstbytereader.h:53
pragma Import (C, gst_byte_reader_set_pos, "gst_byte_reader_set_pos");
function gst_byte_reader_get_pos (reader : access constant GstByteReader) return GLIB.guint; -- gst/base/gstbytereader.h:55
pragma Import (C, gst_byte_reader_get_pos, "gst_byte_reader_get_pos");
function gst_byte_reader_get_remaining (reader : access constant GstByteReader) return GLIB.guint; -- gst/base/gstbytereader.h:56
pragma Import (C, gst_byte_reader_get_remaining, "gst_byte_reader_get_remaining");
function gst_byte_reader_get_size (reader : access constant GstByteReader) return GLIB.guint; -- gst/base/gstbytereader.h:58
pragma Import (C, gst_byte_reader_get_size, "gst_byte_reader_get_size");
function gst_byte_reader_skip (reader : access GstByteReader; nbytes : GLIB.guint) return GLIB.gboolean; -- gst/base/gstbytereader.h:60
pragma Import (C, gst_byte_reader_skip, "gst_byte_reader_skip");
function gst_byte_reader_get_uint8 (reader : access GstByteReader; val : access GLIB.guint8) return GLIB.gboolean; -- gst/base/gstbytereader.h:62
pragma Import (C, gst_byte_reader_get_uint8, "gst_byte_reader_get_uint8");
function gst_byte_reader_get_int8 (reader : access GstByteReader; val : access GLIB.gint8) return GLIB.gboolean; -- gst/base/gstbytereader.h:63
pragma Import (C, gst_byte_reader_get_int8, "gst_byte_reader_get_int8");
function gst_byte_reader_get_uint16_le (reader : access GstByteReader; val : access GLIB.guint16) return GLIB.gboolean; -- gst/base/gstbytereader.h:64
pragma Import (C, gst_byte_reader_get_uint16_le, "gst_byte_reader_get_uint16_le");
function gst_byte_reader_get_int16_le (reader : access GstByteReader; val : access GLIB.gint16) return GLIB.gboolean; -- gst/base/gstbytereader.h:65
pragma Import (C, gst_byte_reader_get_int16_le, "gst_byte_reader_get_int16_le");
function gst_byte_reader_get_uint16_be (reader : access GstByteReader; val : access GLIB.guint16) return GLIB.gboolean; -- gst/base/gstbytereader.h:66
pragma Import (C, gst_byte_reader_get_uint16_be, "gst_byte_reader_get_uint16_be");
function gst_byte_reader_get_int16_be (reader : access GstByteReader; val : access GLIB.gint16) return GLIB.gboolean; -- gst/base/gstbytereader.h:67
pragma Import (C, gst_byte_reader_get_int16_be, "gst_byte_reader_get_int16_be");
function gst_byte_reader_get_uint24_le (reader : access GstByteReader; val : access GLIB.guint32) return GLIB.gboolean; -- gst/base/gstbytereader.h:68
pragma Import (C, gst_byte_reader_get_uint24_le, "gst_byte_reader_get_uint24_le");
function gst_byte_reader_get_int24_le (reader : access GstByteReader; val : access GLIB.gint32) return GLIB.gboolean; -- gst/base/gstbytereader.h:69
pragma Import (C, gst_byte_reader_get_int24_le, "gst_byte_reader_get_int24_le");
function gst_byte_reader_get_uint24_be (reader : access GstByteReader; val : access GLIB.guint32) return GLIB.gboolean; -- gst/base/gstbytereader.h:70
pragma Import (C, gst_byte_reader_get_uint24_be, "gst_byte_reader_get_uint24_be");
function gst_byte_reader_get_int24_be (reader : access GstByteReader; val : access GLIB.gint32) return GLIB.gboolean; -- gst/base/gstbytereader.h:71
pragma Import (C, gst_byte_reader_get_int24_be, "gst_byte_reader_get_int24_be");
function gst_byte_reader_get_uint32_le (reader : access GstByteReader; val : access GLIB.guint32) return GLIB.gboolean; -- gst/base/gstbytereader.h:72
pragma Import (C, gst_byte_reader_get_uint32_le, "gst_byte_reader_get_uint32_le");
function gst_byte_reader_get_int32_le (reader : access GstByteReader; val : access GLIB.gint32) return GLIB.gboolean; -- gst/base/gstbytereader.h:73
pragma Import (C, gst_byte_reader_get_int32_le, "gst_byte_reader_get_int32_le");
function gst_byte_reader_get_uint32_be (reader : access GstByteReader; val : access GLIB.guint32) return GLIB.gboolean; -- gst/base/gstbytereader.h:74
pragma Import (C, gst_byte_reader_get_uint32_be, "gst_byte_reader_get_uint32_be");
function gst_byte_reader_get_int32_be (reader : access GstByteReader; val : access GLIB.gint32) return GLIB.gboolean; -- gst/base/gstbytereader.h:75
pragma Import (C, gst_byte_reader_get_int32_be, "gst_byte_reader_get_int32_be");
function gst_byte_reader_get_uint64_le (reader : access GstByteReader; val : access GLIB.guint64) return GLIB.gboolean; -- gst/base/gstbytereader.h:76
pragma Import (C, gst_byte_reader_get_uint64_le, "gst_byte_reader_get_uint64_le");
function gst_byte_reader_get_int64_le (reader : access GstByteReader; val : access GLIB.gint64) return GLIB.gboolean; -- gst/base/gstbytereader.h:77
pragma Import (C, gst_byte_reader_get_int64_le, "gst_byte_reader_get_int64_le");
function gst_byte_reader_get_uint64_be (reader : access GstByteReader; val : access GLIB.guint64) return GLIB.gboolean; -- gst/base/gstbytereader.h:78
pragma Import (C, gst_byte_reader_get_uint64_be, "gst_byte_reader_get_uint64_be");
function gst_byte_reader_get_int64_be (reader : access GstByteReader; val : access GLIB.gint64) return GLIB.gboolean; -- gst/base/gstbytereader.h:79
pragma Import (C, gst_byte_reader_get_int64_be, "gst_byte_reader_get_int64_be");
function gst_byte_reader_peek_uint8 (reader : access constant GstByteReader; val : access GLIB.guint8) return GLIB.gboolean; -- gst/base/gstbytereader.h:81
pragma Import (C, gst_byte_reader_peek_uint8, "gst_byte_reader_peek_uint8");
function gst_byte_reader_peek_int8 (reader : access constant GstByteReader; val : access GLIB.gint8) return GLIB.gboolean; -- gst/base/gstbytereader.h:82
pragma Import (C, gst_byte_reader_peek_int8, "gst_byte_reader_peek_int8");
function gst_byte_reader_peek_uint16_le (reader : access constant GstByteReader; val : access GLIB.guint16) return GLIB.gboolean; -- gst/base/gstbytereader.h:83
pragma Import (C, gst_byte_reader_peek_uint16_le, "gst_byte_reader_peek_uint16_le");
function gst_byte_reader_peek_int16_le (reader : access constant GstByteReader; val : access GLIB.gint16) return GLIB.gboolean; -- gst/base/gstbytereader.h:84
pragma Import (C, gst_byte_reader_peek_int16_le, "gst_byte_reader_peek_int16_le");
function gst_byte_reader_peek_uint16_be (reader : access constant GstByteReader; val : access GLIB.guint16) return GLIB.gboolean; -- gst/base/gstbytereader.h:85
pragma Import (C, gst_byte_reader_peek_uint16_be, "gst_byte_reader_peek_uint16_be");
function gst_byte_reader_peek_int16_be (reader : access constant GstByteReader; val : access GLIB.gint16) return GLIB.gboolean; -- gst/base/gstbytereader.h:86
pragma Import (C, gst_byte_reader_peek_int16_be, "gst_byte_reader_peek_int16_be");
function gst_byte_reader_peek_uint24_le (reader : access constant GstByteReader; val : access GLIB.guint32) return GLIB.gboolean; -- gst/base/gstbytereader.h:87
pragma Import (C, gst_byte_reader_peek_uint24_le, "gst_byte_reader_peek_uint24_le");
function gst_byte_reader_peek_int24_le (reader : access constant GstByteReader; val : access GLIB.gint32) return GLIB.gboolean; -- gst/base/gstbytereader.h:88
pragma Import (C, gst_byte_reader_peek_int24_le, "gst_byte_reader_peek_int24_le");
function gst_byte_reader_peek_uint24_be (reader : access constant GstByteReader; val : access GLIB.guint32) return GLIB.gboolean; -- gst/base/gstbytereader.h:89
pragma Import (C, gst_byte_reader_peek_uint24_be, "gst_byte_reader_peek_uint24_be");
function gst_byte_reader_peek_int24_be (reader : access constant GstByteReader; val : access GLIB.gint32) return GLIB.gboolean; -- gst/base/gstbytereader.h:90
pragma Import (C, gst_byte_reader_peek_int24_be, "gst_byte_reader_peek_int24_be");
function gst_byte_reader_peek_uint32_le (reader : access constant GstByteReader; val : access GLIB.guint32) return GLIB.gboolean; -- gst/base/gstbytereader.h:91
pragma Import (C, gst_byte_reader_peek_uint32_le, "gst_byte_reader_peek_uint32_le");
function gst_byte_reader_peek_int32_le (reader : access constant GstByteReader; val : access GLIB.gint32) return GLIB.gboolean; -- gst/base/gstbytereader.h:92
pragma Import (C, gst_byte_reader_peek_int32_le, "gst_byte_reader_peek_int32_le");
function gst_byte_reader_peek_uint32_be (reader : access constant GstByteReader; val : access GLIB.guint32) return GLIB.gboolean; -- gst/base/gstbytereader.h:93
pragma Import (C, gst_byte_reader_peek_uint32_be, "gst_byte_reader_peek_uint32_be");
function gst_byte_reader_peek_int32_be (reader : access constant GstByteReader; val : access GLIB.gint32) return GLIB.gboolean; -- gst/base/gstbytereader.h:94
pragma Import (C, gst_byte_reader_peek_int32_be, "gst_byte_reader_peek_int32_be");
function gst_byte_reader_peek_uint64_le (reader : access constant GstByteReader; val : access GLIB.guint64) return GLIB.gboolean; -- gst/base/gstbytereader.h:95
pragma Import (C, gst_byte_reader_peek_uint64_le, "gst_byte_reader_peek_uint64_le");
function gst_byte_reader_peek_int64_le (reader : access constant GstByteReader; val : access GLIB.gint64) return GLIB.gboolean; -- gst/base/gstbytereader.h:96
pragma Import (C, gst_byte_reader_peek_int64_le, "gst_byte_reader_peek_int64_le");
function gst_byte_reader_peek_uint64_be (reader : access constant GstByteReader; val : access GLIB.guint64) return GLIB.gboolean; -- gst/base/gstbytereader.h:97
pragma Import (C, gst_byte_reader_peek_uint64_be, "gst_byte_reader_peek_uint64_be");
function gst_byte_reader_peek_int64_be (reader : access constant GstByteReader; val : access GLIB.gint64) return GLIB.gboolean; -- gst/base/gstbytereader.h:98
pragma Import (C, gst_byte_reader_peek_int64_be, "gst_byte_reader_peek_int64_be");
function gst_byte_reader_get_float32_le (reader : access GstByteReader; val : access GLIB.gfloat) return GLIB.gboolean; -- gst/base/gstbytereader.h:100
pragma Import (C, gst_byte_reader_get_float32_le, "gst_byte_reader_get_float32_le");
function gst_byte_reader_get_float32_be (reader : access GstByteReader; val : access GLIB.gfloat) return GLIB.gboolean; -- gst/base/gstbytereader.h:101
pragma Import (C, gst_byte_reader_get_float32_be, "gst_byte_reader_get_float32_be");
function gst_byte_reader_get_float64_le (reader : access GstByteReader; val : access GLIB.gdouble) return GLIB.gboolean; -- gst/base/gstbytereader.h:102
pragma Import (C, gst_byte_reader_get_float64_le, "gst_byte_reader_get_float64_le");
function gst_byte_reader_get_float64_be (reader : access GstByteReader; val : access GLIB.gdouble) return GLIB.gboolean; -- gst/base/gstbytereader.h:103
pragma Import (C, gst_byte_reader_get_float64_be, "gst_byte_reader_get_float64_be");
function gst_byte_reader_peek_float32_le (reader : access constant GstByteReader; val : access GLIB.gfloat) return GLIB.gboolean; -- gst/base/gstbytereader.h:105
pragma Import (C, gst_byte_reader_peek_float32_le, "gst_byte_reader_peek_float32_le");
function gst_byte_reader_peek_float32_be (reader : access constant GstByteReader; val : access GLIB.gfloat) return GLIB.gboolean; -- gst/base/gstbytereader.h:106
pragma Import (C, gst_byte_reader_peek_float32_be, "gst_byte_reader_peek_float32_be");
function gst_byte_reader_peek_float64_le (reader : access constant GstByteReader; val : access GLIB.gdouble) return GLIB.gboolean; -- gst/base/gstbytereader.h:107
pragma Import (C, gst_byte_reader_peek_float64_le, "gst_byte_reader_peek_float64_le");
function gst_byte_reader_peek_float64_be (reader : access constant GstByteReader; val : access GLIB.gdouble) return GLIB.gboolean; -- gst/base/gstbytereader.h:108
pragma Import (C, gst_byte_reader_peek_float64_be, "gst_byte_reader_peek_float64_be");
function gst_byte_reader_dup_data
(reader : access GstByteReader;
size : GLIB.guint;
val : System.Address) return GLIB.gboolean; -- gst/base/gstbytereader.h:110
pragma Import (C, gst_byte_reader_dup_data, "gst_byte_reader_dup_data");
function gst_byte_reader_get_data
(reader : access GstByteReader;
size : GLIB.guint;
val : System.Address) return GLIB.gboolean; -- gst/base/gstbytereader.h:111
pragma Import (C, gst_byte_reader_get_data, "gst_byte_reader_get_data");
function gst_byte_reader_peek_data
(reader : access constant GstByteReader;
size : GLIB.guint;
val : System.Address) return GLIB.gboolean; -- gst/base/gstbytereader.h:112
pragma Import (C, gst_byte_reader_peek_data, "gst_byte_reader_peek_data");
function gst_byte_reader_dup_string_utf8 (reader : access GstByteReader; str : System.Address) return GLIB.gboolean; -- gst/base/gstbytereader.h:117
pragma Import (C, gst_byte_reader_dup_string_utf8, "gst_byte_reader_dup_string_utf8");
function gst_byte_reader_dup_string_utf16 (reader : access GstByteReader; str : System.Address) return GLIB.gboolean; -- gst/base/gstbytereader.h:118
pragma Import (C, gst_byte_reader_dup_string_utf16, "gst_byte_reader_dup_string_utf16");
function gst_byte_reader_dup_string_utf32 (reader : access GstByteReader; str : System.Address) return GLIB.gboolean; -- gst/base/gstbytereader.h:119
pragma Import (C, gst_byte_reader_dup_string_utf32, "gst_byte_reader_dup_string_utf32");
function gst_byte_reader_skip_string_utf8 (reader : access GstByteReader) return GLIB.gboolean; -- gst/base/gstbytereader.h:124
pragma Import (C, gst_byte_reader_skip_string_utf8, "gst_byte_reader_skip_string_utf8");
function gst_byte_reader_skip_string_utf16 (reader : access GstByteReader) return GLIB.gboolean; -- gst/base/gstbytereader.h:125
pragma Import (C, gst_byte_reader_skip_string_utf16, "gst_byte_reader_skip_string_utf16");
function gst_byte_reader_skip_string_utf32 (reader : access GstByteReader) return GLIB.gboolean; -- gst/base/gstbytereader.h:126
pragma Import (C, gst_byte_reader_skip_string_utf32, "gst_byte_reader_skip_string_utf32");
function gst_byte_reader_get_string_utf8 (reader : access GstByteReader; str : System.Address) return GLIB.gboolean; -- gst/base/gstbytereader.h:134
pragma Import (C, gst_byte_reader_get_string_utf8, "gst_byte_reader_get_string_utf8");
function gst_byte_reader_peek_string_utf8 (reader : access constant GstByteReader; str : System.Address) return GLIB.gboolean; -- gst/base/gstbytereader.h:135
pragma Import (C, gst_byte_reader_peek_string_utf8, "gst_byte_reader_peek_string_utf8");
function gst_byte_reader_masked_scan_uint32
(reader : access constant GstByteReader;
mask : GLIB.guint32;
pattern : GLIB.guint32;
offset : GLIB.guint;
size : GLIB.guint) return GLIB.guint; -- gst/base/gstbytereader.h:137
pragma Import (C, gst_byte_reader_masked_scan_uint32, "gst_byte_reader_masked_scan_uint32");
--*
-- * GST_BYTE_READER_INIT:
-- * @data: Data from which the #GstByteReader should read
-- * @size: Size of @data in bytes
-- *
-- * A #GstByteReader must be initialized with this macro, before it can be
-- * used. This macro can used be to initialize a variable, but it cannot
-- * be assigned to a variable. In that case you have to use
-- * gst_byte_reader_init().
-- *
-- * Since: 0.10.22
--
--*
-- * GST_BYTE_READER_INIT_FROM_BUFFER:
-- * @buffer: Buffer from which the #GstByteReader should read
-- *
-- * A #GstByteReader must be initialized with this macro, before it can be
-- * used. This macro can used be to initialize a variable, but it cannot
-- * be assigned to a variable. In that case you have to use
-- * gst_byte_reader_init().
-- *
-- * Since: 0.10.22
--
-- unchecked variants
procedure gst_byte_reader_skip_unchecked (reader : access GstByteReader; nbytes : GLIB.guint); -- gst/base/gstbytereader.h:173
pragma Import (C, gst_byte_reader_skip_unchecked, "gst_byte_reader_skip_unchecked");
--
function gst_byte_reader_get_uint8_unchecked (reader : access GstByteReader) return GLIB.guint8; -- gst/base/gstbytereader.h:196
pragma Import (C, gst_byte_reader_get_uint8_unchecked, "gst_byte_reader_get_uint8_unchecked");
function gst_byte_reader_peek_uint8_unchecked (reader : access constant GstByteReader) return GLIB.guint8; -- gst/base/gstbytereader.h:196
pragma Import (C, gst_byte_reader_peek_uint8_unchecked, "gst_byte_reader_peek_uint8_unchecked");
--
function gst_byte_reader_get_int8_unchecked (reader : access GstByteReader) return GLIB.gint8; -- gst/base/gstbytereader.h:197
pragma Import (C, gst_byte_reader_get_int8_unchecked, "gst_byte_reader_get_int8_unchecked");
function gst_byte_reader_peek_int8_unchecked (reader : access constant GstByteReader) return GLIB.gint8; -- gst/base/gstbytereader.h:197
pragma Import (C, gst_byte_reader_peek_int8_unchecked, "gst_byte_reader_peek_int8_unchecked");
--
function gst_byte_reader_get_uint16_le_unchecked (reader : access GstByteReader) return GLIB.guint16; -- gst/base/gstbytereader.h:199
pragma Import (C, gst_byte_reader_get_uint16_le_unchecked, "gst_byte_reader_get_uint16_le_unchecked");
function gst_byte_reader_peek_uint16_le_unchecked (reader : access constant GstByteReader) return GLIB.guint16; -- gst/base/gstbytereader.h:199
pragma Import (C, gst_byte_reader_peek_uint16_le_unchecked, "gst_byte_reader_peek_uint16_le_unchecked");
--
function gst_byte_reader_get_uint16_be_unchecked (reader : access GstByteReader) return GLIB.guint16; -- gst/base/gstbytereader.h:200
pragma Import (C, gst_byte_reader_get_uint16_be_unchecked, "gst_byte_reader_get_uint16_be_unchecked");
function gst_byte_reader_peek_uint16_be_unchecked (reader : access constant GstByteReader) return GLIB.guint16; -- gst/base/gstbytereader.h:200
pragma Import (C, gst_byte_reader_peek_uint16_be_unchecked, "gst_byte_reader_peek_uint16_be_unchecked");
--
function gst_byte_reader_get_int16_le_unchecked (reader : access GstByteReader) return GLIB.gint16; -- gst/base/gstbytereader.h:201
pragma Import (C, gst_byte_reader_get_int16_le_unchecked, "gst_byte_reader_get_int16_le_unchecked");
function gst_byte_reader_peek_int16_le_unchecked (reader : access constant GstByteReader) return GLIB.gint16; -- gst/base/gstbytereader.h:201
pragma Import (C, gst_byte_reader_peek_int16_le_unchecked, "gst_byte_reader_peek_int16_le_unchecked");
--
function gst_byte_reader_get_int16_be_unchecked (reader : access GstByteReader) return GLIB.gint16; -- gst/base/gstbytereader.h:202
pragma Import (C, gst_byte_reader_get_int16_be_unchecked, "gst_byte_reader_get_int16_be_unchecked");
function gst_byte_reader_peek_int16_be_unchecked (reader : access constant GstByteReader) return GLIB.gint16; -- gst/base/gstbytereader.h:202
pragma Import (C, gst_byte_reader_peek_int16_be_unchecked, "gst_byte_reader_peek_int16_be_unchecked");
--
function gst_byte_reader_get_uint32_le_unchecked (reader : access GstByteReader) return GLIB.guint32; -- gst/base/gstbytereader.h:204
pragma Import (C, gst_byte_reader_get_uint32_le_unchecked, "gst_byte_reader_get_uint32_le_unchecked");
function gst_byte_reader_peek_uint32_le_unchecked (reader : access constant GstByteReader) return GLIB.guint32; -- gst/base/gstbytereader.h:204
pragma Import (C, gst_byte_reader_peek_uint32_le_unchecked, "gst_byte_reader_peek_uint32_le_unchecked");
--
function gst_byte_reader_get_uint32_be_unchecked (reader : access GstByteReader) return GLIB.guint32; -- gst/base/gstbytereader.h:205
pragma Import (C, gst_byte_reader_get_uint32_be_unchecked, "gst_byte_reader_get_uint32_be_unchecked");
function gst_byte_reader_peek_uint32_be_unchecked (reader : access constant GstByteReader) return GLIB.guint32; -- gst/base/gstbytereader.h:205
pragma Import (C, gst_byte_reader_peek_uint32_be_unchecked, "gst_byte_reader_peek_uint32_be_unchecked");
--
function gst_byte_reader_get_int32_le_unchecked (reader : access GstByteReader) return GLIB.gint32; -- gst/base/gstbytereader.h:206
pragma Import (C, gst_byte_reader_get_int32_le_unchecked, "gst_byte_reader_get_int32_le_unchecked");
function gst_byte_reader_peek_int32_le_unchecked (reader : access constant GstByteReader) return GLIB.gint32; -- gst/base/gstbytereader.h:206
pragma Import (C, gst_byte_reader_peek_int32_le_unchecked, "gst_byte_reader_peek_int32_le_unchecked");
--
function gst_byte_reader_get_int32_be_unchecked (reader : access GstByteReader) return GLIB.gint32; -- gst/base/gstbytereader.h:207
pragma Import (C, gst_byte_reader_get_int32_be_unchecked, "gst_byte_reader_get_int32_be_unchecked");
function gst_byte_reader_peek_int32_be_unchecked (reader : access constant GstByteReader) return GLIB.gint32; -- gst/base/gstbytereader.h:207
pragma Import (C, gst_byte_reader_peek_int32_be_unchecked, "gst_byte_reader_peek_int32_be_unchecked");
--
function gst_byte_reader_get_uint24_le_unchecked (reader : access GstByteReader) return GLIB.guint32; -- gst/base/gstbytereader.h:209
pragma Import (C, gst_byte_reader_get_uint24_le_unchecked, "gst_byte_reader_get_uint24_le_unchecked");
function gst_byte_reader_peek_uint24_le_unchecked (reader : access constant GstByteReader) return GLIB.guint32; -- gst/base/gstbytereader.h:209
pragma Import (C, gst_byte_reader_peek_uint24_le_unchecked, "gst_byte_reader_peek_uint24_le_unchecked");
--
function gst_byte_reader_get_uint24_be_unchecked (reader : access GstByteReader) return GLIB.guint32; -- gst/base/gstbytereader.h:210
pragma Import (C, gst_byte_reader_get_uint24_be_unchecked, "gst_byte_reader_get_uint24_be_unchecked");
function gst_byte_reader_peek_uint24_be_unchecked (reader : access constant GstByteReader) return GLIB.guint32; -- gst/base/gstbytereader.h:210
pragma Import (C, gst_byte_reader_peek_uint24_be_unchecked, "gst_byte_reader_peek_uint24_be_unchecked");
-- fix up the sign for 24-bit signed ints stored in 32-bit signed ints
function gst_byte_reader_get_int24_le_unchecked (reader : access GstByteReader) return GLIB.gint32; -- gst/base/gstbytereader.h:213
pragma Import (C, gst_byte_reader_get_int24_le_unchecked, "gst_byte_reader_get_int24_le_unchecked");
function gst_byte_reader_peek_int24_le_unchecked (reader : access constant GstByteReader) return GLIB.gint32; -- gst/base/gstbytereader.h:213
pragma Import (C, gst_byte_reader_peek_int24_le_unchecked, "gst_byte_reader_peek_int24_le_unchecked");
function gst_byte_reader_get_int24_be_unchecked (reader : access GstByteReader) return GLIB.gint32; -- gst/base/gstbytereader.h:215
pragma Import (C, gst_byte_reader_get_int24_be_unchecked, "gst_byte_reader_get_int24_be_unchecked");
function gst_byte_reader_peek_int24_be_unchecked (reader : access constant GstByteReader) return GLIB.gint32; -- gst/base/gstbytereader.h:215
pragma Import (C, gst_byte_reader_peek_int24_be_unchecked, "gst_byte_reader_peek_int24_be_unchecked");
--
function gst_byte_reader_get_uint64_le_unchecked (reader : access GstByteReader) return GLIB.guint64; -- gst/base/gstbytereader.h:218
pragma Import (C, gst_byte_reader_get_uint64_le_unchecked, "gst_byte_reader_get_uint64_le_unchecked");
function gst_byte_reader_peek_uint64_le_unchecked (reader : access constant GstByteReader) return GLIB.guint64; -- gst/base/gstbytereader.h:218
pragma Import (C, gst_byte_reader_peek_uint64_le_unchecked, "gst_byte_reader_peek_uint64_le_unchecked");
--
function gst_byte_reader_get_uint64_be_unchecked (reader : access GstByteReader) return GLIB.guint64; -- gst/base/gstbytereader.h:219
pragma Import (C, gst_byte_reader_get_uint64_be_unchecked, "gst_byte_reader_get_uint64_be_unchecked");
function gst_byte_reader_peek_uint64_be_unchecked (reader : access constant GstByteReader) return GLIB.guint64; -- gst/base/gstbytereader.h:219
pragma Import (C, gst_byte_reader_peek_uint64_be_unchecked, "gst_byte_reader_peek_uint64_be_unchecked");
--
function gst_byte_reader_get_int64_le_unchecked (reader : access GstByteReader) return GLIB.gint64; -- gst/base/gstbytereader.h:220
pragma Import (C, gst_byte_reader_get_int64_le_unchecked, "gst_byte_reader_get_int64_le_unchecked");
function gst_byte_reader_peek_int64_le_unchecked (reader : access constant GstByteReader) return GLIB.gint64; -- gst/base/gstbytereader.h:220
pragma Import (C, gst_byte_reader_peek_int64_le_unchecked, "gst_byte_reader_peek_int64_le_unchecked");
--
function gst_byte_reader_get_int64_be_unchecked (reader : access GstByteReader) return GLIB.gint64; -- gst/base/gstbytereader.h:221
pragma Import (C, gst_byte_reader_get_int64_be_unchecked, "gst_byte_reader_get_int64_be_unchecked");
function gst_byte_reader_peek_int64_be_unchecked (reader : access constant GstByteReader) return GLIB.gint64; -- gst/base/gstbytereader.h:221
pragma Import (C, gst_byte_reader_peek_int64_be_unchecked, "gst_byte_reader_peek_int64_be_unchecked");
--
function gst_byte_reader_get_float32_le_unchecked (reader : access GstByteReader) return GLIB.gfloat; -- gst/base/gstbytereader.h:223
pragma Import (C, gst_byte_reader_get_float32_le_unchecked, "gst_byte_reader_get_float32_le_unchecked");
function gst_byte_reader_peek_float32_le_unchecked (reader : access constant GstByteReader) return GLIB.gfloat; -- gst/base/gstbytereader.h:223
pragma Import (C, gst_byte_reader_peek_float32_le_unchecked, "gst_byte_reader_peek_float32_le_unchecked");
--
function gst_byte_reader_get_float32_be_unchecked (reader : access GstByteReader) return GLIB.gfloat; -- gst/base/gstbytereader.h:224
pragma Import (C, gst_byte_reader_get_float32_be_unchecked, "gst_byte_reader_get_float32_be_unchecked");
function gst_byte_reader_peek_float32_be_unchecked (reader : access constant GstByteReader) return GLIB.gfloat; -- gst/base/gstbytereader.h:224
pragma Import (C, gst_byte_reader_peek_float32_be_unchecked, "gst_byte_reader_peek_float32_be_unchecked");
--
function gst_byte_reader_get_float64_le_unchecked (reader : access GstByteReader) return GLIB.gdouble; -- gst/base/gstbytereader.h:225
pragma Import (C, gst_byte_reader_get_float64_le_unchecked, "gst_byte_reader_get_float64_le_unchecked");
function gst_byte_reader_peek_float64_le_unchecked (reader : access constant GstByteReader) return GLIB.gdouble; -- gst/base/gstbytereader.h:225
pragma Import (C, gst_byte_reader_peek_float64_le_unchecked, "gst_byte_reader_peek_float64_le_unchecked");
--
function gst_byte_reader_get_float64_be_unchecked (reader : access GstByteReader) return GLIB.gdouble; -- gst/base/gstbytereader.h:226
pragma Import (C, gst_byte_reader_get_float64_be_unchecked, "gst_byte_reader_get_float64_be_unchecked");
function gst_byte_reader_peek_float64_be_unchecked (reader : access constant GstByteReader) return GLIB.gdouble; -- gst/base/gstbytereader.h:226
pragma Import (C, gst_byte_reader_peek_float64_be_unchecked, "gst_byte_reader_peek_float64_be_unchecked");
function gst_byte_reader_peek_data_unchecked (reader : access constant GstByteReader) return access GLIB.guint8; -- gst/base/gstbytereader.h:231
pragma Import (C, gst_byte_reader_peek_data_unchecked, "gst_byte_reader_peek_data_unchecked");
function gst_byte_reader_get_data_unchecked (reader : access GstByteReader; size : GLIB.guint) return access GLIB.guint8; -- gst/base/gstbytereader.h:237
pragma Import (C, gst_byte_reader_get_data_unchecked, "gst_byte_reader_get_data_unchecked");
function gst_byte_reader_dup_data_unchecked (reader : access GstByteReader; size : GLIB.guint) return access GLIB.guint8; -- gst/base/gstbytereader.h:247
pragma Import (C, gst_byte_reader_dup_data_unchecked, "gst_byte_reader_dup_data_unchecked");
-- Unchecked variants that should not be used
-- skipped func _gst_byte_reader_get_pos_unchecked
-- skipped func _gst_byte_reader_get_remaining_unchecked
-- skipped func _gst_byte_reader_get_size_unchecked
-- inlined variants (do not use directly)
-- skipped func _gst_byte_reader_get_remaining_inline
-- skipped func _gst_byte_reader_get_size_inline
-- skipped func _gst_byte_reader_get_uint8_inline
-- skipped func _gst_byte_reader_peek_uint8_inline
-- skipped func _gst_byte_reader_get_int8_inline
-- skipped func _gst_byte_reader_peek_int8_inline
-- skipped func _gst_byte_reader_get_uint16_le_inline
-- skipped func _gst_byte_reader_peek_uint16_le_inline
-- skipped func _gst_byte_reader_get_uint16_be_inline
-- skipped func _gst_byte_reader_peek_uint16_be_inline
-- skipped func _gst_byte_reader_get_int16_le_inline
-- skipped func _gst_byte_reader_peek_int16_le_inline
-- skipped func _gst_byte_reader_get_int16_be_inline
-- skipped func _gst_byte_reader_peek_int16_be_inline
-- skipped func _gst_byte_reader_get_uint32_le_inline
-- skipped func _gst_byte_reader_peek_uint32_le_inline
-- skipped func _gst_byte_reader_get_uint32_be_inline
-- skipped func _gst_byte_reader_peek_uint32_be_inline
-- skipped func _gst_byte_reader_get_int32_le_inline
-- skipped func _gst_byte_reader_peek_int32_le_inline
-- skipped func _gst_byte_reader_get_int32_be_inline
-- skipped func _gst_byte_reader_peek_int32_be_inline
-- skipped func _gst_byte_reader_get_uint24_le_inline
-- skipped func _gst_byte_reader_peek_uint24_le_inline
-- skipped func _gst_byte_reader_get_uint24_be_inline
-- skipped func _gst_byte_reader_peek_uint24_be_inline
-- skipped func _gst_byte_reader_get_int24_le_inline
-- skipped func _gst_byte_reader_peek_int24_le_inline
-- skipped func _gst_byte_reader_get_int24_be_inline
-- skipped func _gst_byte_reader_peek_int24_be_inline
-- skipped func _gst_byte_reader_get_uint64_le_inline
-- skipped func _gst_byte_reader_peek_uint64_le_inline
-- skipped func _gst_byte_reader_get_uint64_be_inline
-- skipped func _gst_byte_reader_peek_uint64_be_inline
-- skipped func _gst_byte_reader_get_int64_le_inline
-- skipped func _gst_byte_reader_peek_int64_le_inline
-- skipped func _gst_byte_reader_get_int64_be_inline
-- skipped func _gst_byte_reader_peek_int64_be_inline
-- skipped func _gst_byte_reader_get_float32_le_inline
-- skipped func _gst_byte_reader_peek_float32_le_inline
-- skipped func _gst_byte_reader_get_float32_be_inline
-- skipped func _gst_byte_reader_peek_float32_be_inline
-- skipped func _gst_byte_reader_get_float64_le_inline
-- skipped func _gst_byte_reader_peek_float64_le_inline
-- skipped func _gst_byte_reader_get_float64_be_inline
-- skipped func _gst_byte_reader_peek_float64_be_inline
-- we use defines here so we can add the G_LIKELY()
-- skipped func _gst_byte_reader_dup_data_inline
-- skipped func _gst_byte_reader_get_data_inline
-- skipped func _gst_byte_reader_peek_data_inline
-- skipped func _gst_byte_reader_get_pos_inline
-- skipped func _gst_byte_reader_skip_inline
end GStreamer.GST_Low_Level.gstreamer_0_10_gst_base_gstbytereader_h;
|
alloy4fun_models/trainstlt/models/4/Pc5ox8ZgzfLqteivi.als | Kaixi26/org.alloytools.alloy | 0 | 2460 | <filename>alloy4fun_models/trainstlt/models/4/Pc5ox8ZgzfLqteivi.als
open main
pred idPc5ox8ZgzfLqteivi_prop5 {
all t:Train | t.pos' in t.pos.prox
}
pred __repair { idPc5ox8ZgzfLqteivi_prop5 }
check __repair { idPc5ox8ZgzfLqteivi_prop5 <=> prop5o } |
agda/Number/Instances/QuoQ/Definitions.agda | mchristianl/synthetic-reals | 3 | 1310 | <gh_stars>1-10
{-# OPTIONS --cubical --no-import-sorts --allow-unsolved-metas #-}
module Number.Instances.QuoQ.Definitions where
open import Agda.Primitive renaming (_⊔_ to ℓ-max; lsuc to ℓ-suc; lzero to ℓ-zero)
open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ; assoc to ∙-assoc)
open import Cubical.Foundations.Logic renaming (inl to inlᵖ; inr to inrᵖ)
open import Cubical.Relation.Nullary.Base renaming (¬_ to ¬ᵗ_)
open import Cubical.Relation.Binary.Base
open import Cubical.Data.Sum.Base renaming (_⊎_ to infixr 4 _⊎_)
open import Cubical.Data.Sigma.Base renaming (_×_ to infixr 4 _×_)
open import Cubical.Data.Sigma
open import Cubical.Data.Bool as Bool using (Bool; not; true; false)
open import Cubical.Data.Empty renaming (elim to ⊥-elim; ⊥ to ⊥⊥) -- `⊥` and `elim`
open import Cubical.Foundations.Logic renaming (¬_ to ¬ᵖ_; inl to inlᵖ; inr to inrᵖ)
open import Function.Base using (it; _∋_; _$_)
open import Cubical.Foundations.Isomorphism
open import Cubical.HITs.PropositionalTruncation --.Properties
open import Utils using (!_; !!_)
open import MoreLogic.Reasoning
open import MoreLogic.Definitions
open import MoreLogic.Properties
open import MorePropAlgebra.Definitions hiding (_≤''_)
open import MorePropAlgebra.Structures
open import MorePropAlgebra.Bundles
open import MorePropAlgebra.Consequences
open import Number.Structures2
open import Number.Bundles2
open import Cubical.Data.NatPlusOne using (HasFromNat; 1+_; ℕ₊₁; ℕ₊₁→ℕ)
open import Cubical.HITs.SetQuotients as SetQuotient using () renaming (_/_ to _//_)
open import Cubical.Data.Nat.Literals
open import Cubical.Data.Bool
open import Number.Prelude.Nat
open import Number.Prelude.QuoInt
open import Cubical.HITs.Ints.QuoInt using (HasFromNat)
open import Cubical.HITs.Rationals.QuoQ using
( ℚ
; onCommonDenom
; onCommonDenomSym
; eq/
; _//_
; _∼_
)
renaming
( [_] to [_]ᶠ
; ℕ₊₁→ℤ to [1+_ⁿ]ᶻ
)
abstract
private
lemma1 : ∀ a b₁ b₂ c → (a ·ᶻ b₁) ·ᶻ (b₂ ·ᶻ c) ≡ (a ·ᶻ c) ·ᶻ (b₂ ·ᶻ b₁)
lemma1 a b₁ b₂ c =
(a ·ᶻ b₁) ·ᶻ (b₂ ·ᶻ c) ≡⟨ sym $ ·ᶻ-assoc a b₁ (b₂ ·ᶻ c) ⟩
a ·ᶻ (b₁ ·ᶻ (b₂ ·ᶻ c)) ≡⟨ (λ i → a ·ᶻ ·ᶻ-assoc b₁ b₂ c i) ⟩
a ·ᶻ ((b₁ ·ᶻ b₂) ·ᶻ c) ≡⟨ (λ i → a ·ᶻ ·ᶻ-comm (b₁ ·ᶻ b₂) c i) ⟩
a ·ᶻ (c ·ᶻ (b₁ ·ᶻ b₂)) ≡⟨ ·ᶻ-assoc a c (b₁ ·ᶻ b₂) ⟩
(a ·ᶻ c) ·ᶻ (b₁ ·ᶻ b₂) ≡⟨ (λ i → (a ·ᶻ c) ·ᶻ ·ᶻ-comm b₁ b₂ i) ⟩
(a ·ᶻ c) ·ᶻ (b₂ ·ᶻ b₁) ∎
·ᶻ-commʳ : ∀ a b c → (a ·ᶻ b) ·ᶻ c ≡ (a ·ᶻ c) ·ᶻ b
·ᶻ-commʳ a b c = (a ·ᶻ b) ·ᶻ c ≡⟨ sym $ ·ᶻ-assoc a b c ⟩
a ·ᶻ (b ·ᶻ c) ≡⟨ (λ i → a ·ᶻ ·ᶻ-comm b c i) ⟩
a ·ᶻ (c ·ᶻ b) ≡⟨ ·ᶻ-assoc a c b ⟩
(a ·ᶻ c) ·ᶻ b ∎
∼-preserves-<ᶻ : ∀ aᶻ aⁿ bᶻ bⁿ → (aᶻ , aⁿ) ∼ (bᶻ , bⁿ) → [ ((aᶻ <ᶻ 0) ⇒ (bᶻ <ᶻ 0)) ⊓ ((0 <ᶻ aᶻ) ⇒ (0 <ᶻ bᶻ)) ]
∼-preserves-<ᶻ aᶻ aⁿ bᶻ bⁿ r = γ where
aⁿᶻ = [1+ aⁿ ⁿ]ᶻ
bⁿᶻ = [1+ bⁿ ⁿ]ᶻ
0<aⁿᶻ : [ 0 <ᶻ aⁿᶻ ]
0<aⁿᶻ = ℕ₊₁.n aⁿ , +ⁿ-comm (ℕ₊₁.n aⁿ) 1
0<bⁿᶻ : [ 0 <ᶻ bⁿᶻ ]
0<bⁿᶻ = ℕ₊₁.n bⁿ , +ⁿ-comm (ℕ₊₁.n bⁿ) 1
γ : [ ((aᶻ <ᶻ 0) ⇒ (bᶻ <ᶻ 0)) ⊓ ((0 <ᶻ aᶻ) ⇒ (0 <ᶻ bᶻ)) ]
γ .fst aᶻ<0 = (
aᶻ <ᶻ 0 ⇒ᵖ⟨ ·ᶻ-preserves-<ᶻ aᶻ 0 bⁿᶻ 0<bⁿᶻ ⟩
aᶻ ·ᶻ bⁿᶻ <ᶻ 0 ·ᶻ bⁿᶻ ⇒ᵖ⟨ (subst (λ p → [ aᶻ ·ᶻ bⁿᶻ <ᶻ p ]) $ ·ᶻ-nullifiesˡ bⁿᶻ) ⟩
aᶻ ·ᶻ bⁿᶻ <ᶻ 0 ⇒ᵖ⟨ subst (λ p → [ p <ᶻ 0 ]) r ⟩
bᶻ ·ᶻ aⁿᶻ <ᶻ 0 ⇒ᵖ⟨ subst (λ p → [ bᶻ ·ᶻ aⁿᶻ <ᶻ p ]) (sym (·ᶻ-nullifiesˡ aⁿᶻ)) ⟩
bᶻ ·ᶻ aⁿᶻ <ᶻ 0 ·ᶻ aⁿᶻ ⇒ᵖ⟨ ·ᶻ-reflects-<ᶻ bᶻ 0 aⁿᶻ 0<aⁿᶻ ⟩
bᶻ <ᶻ 0 ◼ᵖ) .snd aᶻ<0
γ .snd 0<aᶻ = (
0 <ᶻ aᶻ ⇒ᵖ⟨ ·ᶻ-preserves-<ᶻ 0 aᶻ bⁿᶻ 0<bⁿᶻ ⟩
0 ·ᶻ bⁿᶻ <ᶻ aᶻ ·ᶻ bⁿᶻ ⇒ᵖ⟨ (subst (λ p → [ p <ᶻ aᶻ ·ᶻ bⁿᶻ ]) $ ·ᶻ-nullifiesˡ bⁿᶻ) ⟩
0 <ᶻ aᶻ ·ᶻ bⁿᶻ ⇒ᵖ⟨ subst (λ p → [ 0 <ᶻ p ]) r ⟩
0 <ᶻ bᶻ ·ᶻ aⁿᶻ ⇒ᵖ⟨ subst (λ p → [ p <ᶻ bᶻ ·ᶻ aⁿᶻ ]) (sym (·ᶻ-nullifiesˡ aⁿᶻ)) ⟩
0 ·ᶻ aⁿᶻ <ᶻ bᶻ ·ᶻ aⁿᶻ ⇒ᵖ⟨ ·ᶻ-reflects-<ᶻ 0 bᶻ aⁿᶻ 0<aⁿᶻ ⟩
0 <ᶻ bᶻ ◼ᵖ) .snd 0<aᶻ
-- < on ℤ × ℕ₊₁ in terms of < on ℤ
_<'_ : ℤ × ℕ₊₁ → ℤ × ℕ₊₁ → hProp ℓ-zero
(aᶻ , aⁿ) <' (bᶻ , bⁿ) =
let aⁿᶻ = [1+ aⁿ ⁿ]ᶻ
bⁿᶻ = [1+ bⁿ ⁿ]ᶻ
in (aᶻ ·ᶻ bⁿᶻ) <ᶻ (bᶻ ·ᶻ aⁿᶻ)
private
lem1 : ∀ x y z → [ 0 <ᶻ y ] → [ 0 <ᶻ z ] → (0 <ᶻ (x ·ᶻ y)) ≡ (0 <ᶻ (x ·ᶻ z))
lem1 x y z p q =
0 <ᶻ (x ·ᶻ y) ≡⟨ (λ i → ·ᶻ-nullifiesˡ y (~ i) <ᶻ x ·ᶻ y) ⟩
(0 ·ᶻ y) <ᶻ (x ·ᶻ y) ≡⟨ sym $ ·ᶻ-creates-<ᶻ-≡ 0 x y p ⟩
0 <ᶻ x ≡⟨ ·ᶻ-creates-<ᶻ-≡ 0 x z q ⟩
(0 ·ᶻ z) <ᶻ (x ·ᶻ z) ≡⟨ (λ i → ·ᶻ-nullifiesˡ z i <ᶻ x ·ᶻ z) ⟩
0 <ᶻ (x ·ᶻ z) ∎
<'-respects-∼ˡ : ∀ a b x → a ∼ b → a <' x ≡ b <' x
<'-respects-∼ˡ a@(aᶻ , aⁿ) b@(bᶻ , bⁿ) x@(xᶻ , xⁿ) a~b = γ where
aⁿᶻ = [1+ aⁿ ⁿ]ᶻ; 0<aⁿᶻ : [ 0 <ᶻ aⁿᶻ ]; 0<aⁿᶻ = 0<ᶻpos[suc] _
bⁿᶻ = [1+ bⁿ ⁿ]ᶻ; 0<bⁿᶻ : [ 0 <ᶻ bⁿᶻ ]; 0<bⁿᶻ = 0<ᶻpos[suc] _
xⁿᶻ = [1+ xⁿ ⁿ]ᶻ
p : aᶻ ·ᶻ bⁿᶻ ≡ bᶻ ·ᶻ aⁿᶻ
p = a~b
γ : ((aᶻ ·ᶻ xⁿᶻ) <ᶻ (xᶻ ·ᶻ aⁿᶻ)) ≡ ((bᶻ ·ᶻ xⁿᶻ) <ᶻ (xᶻ ·ᶻ bⁿᶻ))
γ = aᶻ ·ᶻ xⁿᶻ <ᶻ xᶻ ·ᶻ aⁿᶻ ≡⟨ ·ᶻ-creates-<ᶻ-≡ (aᶻ ·ᶻ xⁿᶻ) (xᶻ ·ᶻ aⁿᶻ) bⁿᶻ 0<bⁿᶻ ⟩
aᶻ ·ᶻ xⁿᶻ ·ᶻ bⁿᶻ <ᶻ xᶻ ·ᶻ aⁿᶻ ·ᶻ bⁿᶻ ≡⟨ (λ i → ·ᶻ-commʳ aᶻ xⁿᶻ bⁿᶻ i <ᶻ xᶻ ·ᶻ aⁿᶻ ·ᶻ bⁿᶻ) ⟩
aᶻ ·ᶻ bⁿᶻ ·ᶻ xⁿᶻ <ᶻ xᶻ ·ᶻ aⁿᶻ ·ᶻ bⁿᶻ ≡⟨ (λ i → p i ·ᶻ xⁿᶻ <ᶻ xᶻ ·ᶻ aⁿᶻ ·ᶻ bⁿᶻ) ⟩
bᶻ ·ᶻ aⁿᶻ ·ᶻ xⁿᶻ <ᶻ xᶻ ·ᶻ aⁿᶻ ·ᶻ bⁿᶻ ≡⟨ (λ i → ·ᶻ-commʳ bᶻ aⁿᶻ xⁿᶻ i <ᶻ ·ᶻ-commʳ xᶻ aⁿᶻ bⁿᶻ i) ⟩
bᶻ ·ᶻ xⁿᶻ ·ᶻ aⁿᶻ <ᶻ xᶻ ·ᶻ bⁿᶻ ·ᶻ aⁿᶻ ≡⟨ sym $ ·ᶻ-creates-<ᶻ-≡ (bᶻ ·ᶻ xⁿᶻ) (xᶻ ·ᶻ bⁿᶻ) aⁿᶻ 0<aⁿᶻ ⟩
bᶻ ·ᶻ xⁿᶻ <ᶻ xᶻ ·ᶻ bⁿᶻ ∎
<'-respects-∼ʳ : ∀ x a b → a ∼ b → x <' a ≡ x <' b
<'-respects-∼ʳ x@(xᶻ , xⁿ) a@(aᶻ , aⁿ) b@(bᶻ , bⁿ) a~b =
let aⁿᶻ = [1+ aⁿ ⁿ]ᶻ; 0<aⁿᶻ : [ 0 <ᶻ aⁿᶻ ]; 0<aⁿᶻ = 0<ᶻpos[suc] _
bⁿᶻ = [1+ bⁿ ⁿ]ᶻ; 0<bⁿᶻ : [ 0 <ᶻ bⁿᶻ ]; 0<bⁿᶻ = 0<ᶻpos[suc] _
xⁿᶻ = [1+ xⁿ ⁿ]ᶻ
p : aᶻ ·ᶻ bⁿᶻ ≡ bᶻ ·ᶻ aⁿᶻ
p = a~b
in xᶻ ·ᶻ aⁿᶻ <ᶻ aᶻ ·ᶻ xⁿᶻ ≡⟨ (λ i → xᶻ ·ᶻ aⁿᶻ <ᶻ ·ᶻ-comm aᶻ xⁿᶻ i) ⟩
xᶻ ·ᶻ aⁿᶻ <ᶻ xⁿᶻ ·ᶻ aᶻ ≡⟨ ·ᶻ-creates-<ᶻ-≡ (xᶻ ·ᶻ aⁿᶻ) (xⁿᶻ ·ᶻ aᶻ) bⁿᶻ 0<bⁿᶻ ⟩
xᶻ ·ᶻ aⁿᶻ ·ᶻ bⁿᶻ <ᶻ xⁿᶻ ·ᶻ aᶻ ·ᶻ bⁿᶻ ≡⟨ (λ i → xᶻ ·ᶻ aⁿᶻ ·ᶻ bⁿᶻ <ᶻ ·ᶻ-assoc xⁿᶻ aᶻ bⁿᶻ (~ i)) ⟩
xᶻ ·ᶻ aⁿᶻ ·ᶻ bⁿᶻ <ᶻ xⁿᶻ ·ᶻ (aᶻ ·ᶻ bⁿᶻ) ≡⟨ (λ i → xᶻ ·ᶻ aⁿᶻ ·ᶻ bⁿᶻ <ᶻ xⁿᶻ ·ᶻ (p i)) ⟩
xᶻ ·ᶻ aⁿᶻ ·ᶻ bⁿᶻ <ᶻ xⁿᶻ ·ᶻ (bᶻ ·ᶻ aⁿᶻ) ≡⟨ (λ i → ·ᶻ-commʳ xᶻ aⁿᶻ bⁿᶻ i <ᶻ ·ᶻ-assoc xⁿᶻ bᶻ aⁿᶻ i) ⟩
xᶻ ·ᶻ bⁿᶻ ·ᶻ aⁿᶻ <ᶻ xⁿᶻ ·ᶻ bᶻ ·ᶻ aⁿᶻ ≡⟨ sym $ ·ᶻ-creates-<ᶻ-≡ (xᶻ ·ᶻ bⁿᶻ) (xⁿᶻ ·ᶻ bᶻ) aⁿᶻ 0<aⁿᶻ ⟩
xᶻ ·ᶻ bⁿᶻ <ᶻ xⁿᶻ ·ᶻ bᶻ ≡⟨ (λ i → xᶻ ·ᶻ bⁿᶻ <ᶻ ·ᶻ-comm xⁿᶻ bᶻ i) ⟩
xᶻ ·ᶻ bⁿᶻ <ᶻ bᶻ ·ᶻ xⁿᶻ ∎
infixl 4 _<_
_<_ : hPropRel ℚ ℚ ℓ-zero
a < b = SetQuotient.rec2 {R = _∼_} {B = hProp ℓ-zero} isSetHProp _<'_ <'-respects-∼ˡ <'-respects-∼ʳ a b
_≤_ : hPropRel ℚ ℚ ℓ-zero
x ≤ y = ¬ᵖ (y < x)
min' : ℤ × ℕ₊₁ → ℤ × ℕ₊₁ → ℤ
min' (aᶻ , aⁿ) (bᶻ , bⁿ) =
let aⁿᶻ = [1+ aⁿ ⁿ]ᶻ
bⁿᶻ = [1+ bⁿ ⁿ]ᶻ
in minᶻ (aᶻ ·ᶻ bⁿᶻ) (bᶻ ·ᶻ aⁿᶻ)
max' : ℤ × ℕ₊₁ → ℤ × ℕ₊₁ → ℤ
max' (aᶻ , aⁿ) (bᶻ , bⁿ) =
let aⁿᶻ = [1+ aⁿ ⁿ]ᶻ
bⁿᶻ = [1+ bⁿ ⁿ]ᶻ
in maxᶻ (aᶻ ·ᶻ bⁿᶻ) (bᶻ ·ᶻ aⁿᶻ)
min'-sym : ∀ x y → min' x y ≡ min' y x
min'-sym (aᶻ , aⁿ) (bᶻ , bⁿ) = minᶻ-comm (aᶻ ·ᶻ [1+ bⁿ ⁿ]ᶻ) (bᶻ ·ᶻ [1+ aⁿ ⁿ]ᶻ)
max'-sym : ∀ x y → max' x y ≡ max' y x
max'-sym (aᶻ , aⁿ) (bᶻ , bⁿ) = maxᶻ-comm (aᶻ ·ᶻ [1+ bⁿ ⁿ]ᶻ) (bᶻ ·ᶻ [1+ aⁿ ⁿ]ᶻ)
min'-respects-∼ : (a@(aᶻ , aⁿ) b@(bᶻ , bⁿ) x@(xᶻ , xⁿ) : ℤ × ℕ₊₁)
→ a ∼ b
→ [1+ bⁿ ⁿ]ᶻ ·ᶻ min' a x ≡ [1+ aⁿ ⁿ]ᶻ ·ᶻ min' b x
min'-respects-∼ a@(aᶻ , aⁿ) b@(bᶻ , bⁿ) x@(xᶻ , xⁿ) a~b =
bⁿᶻ ·ᶻ minᶻ (aᶻ ·ᶻ xⁿᶻ) (xᶻ ·ᶻ aⁿᶻ) ≡⟨ ·ᶻ-minᶻ-distribˡ (aᶻ ·ᶻ xⁿᶻ) (xᶻ ·ᶻ aⁿᶻ) bⁿᶻ 0≤bⁿᶻ ⟩
minᶻ (bⁿᶻ ·ᶻ (aᶻ ·ᶻ xⁿᶻ)) (bⁿᶻ ·ᶻ (xᶻ ·ᶻ aⁿᶻ)) ≡⟨ (λ i → minᶻ (·ᶻ-assoc bⁿᶻ aᶻ xⁿᶻ i) (bⁿᶻ ·ᶻ (xᶻ ·ᶻ aⁿᶻ))) ⟩
minᶻ ((bⁿᶻ ·ᶻ aᶻ) ·ᶻ xⁿᶻ) (bⁿᶻ ·ᶻ (xᶻ ·ᶻ aⁿᶻ)) ≡⟨ (λ i → minᶻ ((·ᶻ-comm bⁿᶻ aᶻ i) ·ᶻ xⁿᶻ) (bⁿᶻ ·ᶻ (xᶻ ·ᶻ aⁿᶻ))) ⟩
minᶻ ((aᶻ ·ᶻ bⁿᶻ) ·ᶻ xⁿᶻ) (bⁿᶻ ·ᶻ (xᶻ ·ᶻ aⁿᶻ)) ≡⟨ (λ i → minᶻ (p i ·ᶻ xⁿᶻ) (bⁿᶻ ·ᶻ (xᶻ ·ᶻ aⁿᶻ))) ⟩
minᶻ ((bᶻ ·ᶻ aⁿᶻ) ·ᶻ xⁿᶻ) (bⁿᶻ ·ᶻ (xᶻ ·ᶻ aⁿᶻ)) ≡⟨ (λ i → minᶻ (·ᶻ-comm bᶻ aⁿᶻ i ·ᶻ xⁿᶻ) (·ᶻ-assoc bⁿᶻ xᶻ aⁿᶻ i)) ⟩
minᶻ ((aⁿᶻ ·ᶻ bᶻ) ·ᶻ xⁿᶻ) ((bⁿᶻ ·ᶻ xᶻ) ·ᶻ aⁿᶻ) ≡⟨ (λ i → minᶻ (·ᶻ-assoc aⁿᶻ bᶻ xⁿᶻ (~ i)) (·ᶻ-comm (bⁿᶻ ·ᶻ xᶻ) aⁿᶻ i)) ⟩
minᶻ (aⁿᶻ ·ᶻ (bᶻ ·ᶻ xⁿᶻ)) (aⁿᶻ ·ᶻ (bⁿᶻ ·ᶻ xᶻ)) ≡⟨ sym $ ·ᶻ-minᶻ-distribˡ (bᶻ ·ᶻ xⁿᶻ) (bⁿᶻ ·ᶻ xᶻ) aⁿᶻ 0≤aⁿᶻ ⟩
aⁿᶻ ·ᶻ minᶻ (bᶻ ·ᶻ xⁿᶻ) (bⁿᶻ ·ᶻ xᶻ) ≡⟨ (λ i → aⁿᶻ ·ᶻ minᶻ (bᶻ ·ᶻ xⁿᶻ) (·ᶻ-comm bⁿᶻ xᶻ i)) ⟩
aⁿᶻ ·ᶻ minᶻ (bᶻ ·ᶻ xⁿᶻ) (xᶻ ·ᶻ bⁿᶻ) ∎
where
aⁿᶻ = [1+ aⁿ ⁿ]ᶻ
bⁿᶻ = [1+ bⁿ ⁿ]ᶻ
xⁿᶻ = [1+ xⁿ ⁿ]ᶻ
p : aᶻ ·ᶻ bⁿᶻ ≡ bᶻ ·ᶻ aⁿᶻ
p = a~b
0≤aⁿᶻ : [ 0 ≤ᶻ aⁿᶻ ]
0≤aⁿᶻ (k , p) = snotzⁿ $ sym (+ⁿ-suc k _) ∙ p
0≤bⁿᶻ : [ 0 ≤ᶻ bⁿᶻ ]
0≤bⁿᶻ (k , p) = snotzⁿ $ sym (+ⁿ-suc k _) ∙ p
-- same proof as for min
max'-respects-∼ : (a@(aᶻ , aⁿ) b@(bᶻ , bⁿ) x@(xᶻ , xⁿ) : ℤ × ℕ₊₁)
→ a ∼ b
→ [1+ bⁿ ⁿ]ᶻ ·ᶻ max' a x ≡ [1+ aⁿ ⁿ]ᶻ ·ᶻ max' b x
max'-respects-∼ a@(aᶻ , aⁿ) b@(bᶻ , bⁿ) x@(xᶻ , xⁿ) a~b =
bⁿᶻ ·ᶻ maxᶻ (aᶻ ·ᶻ xⁿᶻ) (xᶻ ·ᶻ aⁿᶻ) ≡⟨ ·ᶻ-maxᶻ-distribˡ (aᶻ ·ᶻ xⁿᶻ) (xᶻ ·ᶻ aⁿᶻ) bⁿᶻ 0≤bⁿᶻ ⟩
maxᶻ (bⁿᶻ ·ᶻ (aᶻ ·ᶻ xⁿᶻ)) (bⁿᶻ ·ᶻ (xᶻ ·ᶻ aⁿᶻ)) ≡⟨ (λ i → maxᶻ (·ᶻ-assoc bⁿᶻ aᶻ xⁿᶻ i) (bⁿᶻ ·ᶻ (xᶻ ·ᶻ aⁿᶻ))) ⟩
maxᶻ ((bⁿᶻ ·ᶻ aᶻ) ·ᶻ xⁿᶻ) (bⁿᶻ ·ᶻ (xᶻ ·ᶻ aⁿᶻ)) ≡⟨ (λ i → maxᶻ ((·ᶻ-comm bⁿᶻ aᶻ i) ·ᶻ xⁿᶻ) (bⁿᶻ ·ᶻ (xᶻ ·ᶻ aⁿᶻ))) ⟩
maxᶻ ((aᶻ ·ᶻ bⁿᶻ) ·ᶻ xⁿᶻ) (bⁿᶻ ·ᶻ (xᶻ ·ᶻ aⁿᶻ)) ≡⟨ (λ i → maxᶻ (p i ·ᶻ xⁿᶻ) (bⁿᶻ ·ᶻ (xᶻ ·ᶻ aⁿᶻ))) ⟩
maxᶻ ((bᶻ ·ᶻ aⁿᶻ) ·ᶻ xⁿᶻ) (bⁿᶻ ·ᶻ (xᶻ ·ᶻ aⁿᶻ)) ≡⟨ (λ i → maxᶻ (·ᶻ-comm bᶻ aⁿᶻ i ·ᶻ xⁿᶻ) (·ᶻ-assoc bⁿᶻ xᶻ aⁿᶻ i)) ⟩
maxᶻ ((aⁿᶻ ·ᶻ bᶻ) ·ᶻ xⁿᶻ) ((bⁿᶻ ·ᶻ xᶻ) ·ᶻ aⁿᶻ) ≡⟨ (λ i → maxᶻ (·ᶻ-assoc aⁿᶻ bᶻ xⁿᶻ (~ i)) (·ᶻ-comm (bⁿᶻ ·ᶻ xᶻ) aⁿᶻ i)) ⟩
maxᶻ (aⁿᶻ ·ᶻ (bᶻ ·ᶻ xⁿᶻ)) (aⁿᶻ ·ᶻ (bⁿᶻ ·ᶻ xᶻ)) ≡⟨ sym $ ·ᶻ-maxᶻ-distribˡ (bᶻ ·ᶻ xⁿᶻ) (bⁿᶻ ·ᶻ xᶻ) aⁿᶻ 0≤aⁿᶻ ⟩
aⁿᶻ ·ᶻ maxᶻ (bᶻ ·ᶻ xⁿᶻ) (bⁿᶻ ·ᶻ xᶻ) ≡⟨ (λ i → aⁿᶻ ·ᶻ maxᶻ (bᶻ ·ᶻ xⁿᶻ) (·ᶻ-comm bⁿᶻ xᶻ i)) ⟩
aⁿᶻ ·ᶻ maxᶻ (bᶻ ·ᶻ xⁿᶻ) (xᶻ ·ᶻ bⁿᶻ) ∎
where
aⁿᶻ = [1+ aⁿ ⁿ]ᶻ
bⁿᶻ = [1+ bⁿ ⁿ]ᶻ
xⁿᶻ = [1+ xⁿ ⁿ]ᶻ
p : aᶻ ·ᶻ bⁿᶻ ≡ bᶻ ·ᶻ aⁿᶻ
p = a~b
0≤aⁿᶻ : [ 0 ≤ᶻ aⁿᶻ ]
0≤aⁿᶻ (k , p) = snotzⁿ $ sym (+ⁿ-suc k _) ∙ p
0≤bⁿᶻ : [ 0 ≤ᶻ bⁿᶻ ]
0≤bⁿᶻ (k , p) = snotzⁿ $ sym (+ⁿ-suc k _) ∙ p
min : ℚ → ℚ → ℚ
min a b = onCommonDenomSym min' min'-sym min'-respects-∼ a b
max : ℚ → ℚ → ℚ
max a b = onCommonDenomSym max' max'-sym max'-respects-∼ a b
-- injᶻⁿ⁺¹ : ∀ x → [ 0 <ᶻ x ] → Σ[ y ∈ ℕ₊₁ ] x ≡ [1+ y ⁿ]ᶻ
-- injᶻⁿ⁺¹ (signed spos zero) p = ⊥-elim {A = λ _ → Σ[ y ∈ ℕ₊₁ ] ℤ.posneg i0 ≡ [1+ y ⁿ]ᶻ} (¬-<ⁿ-zero p)
-- injᶻⁿ⁺¹ (signed sneg zero) p = ⊥-elim {A = λ _ → Σ[ y ∈ ℕ₊₁ ] ℤ.posneg i1 ≡ [1+ y ⁿ]ᶻ} (¬-<ⁿ-zero p)
-- injᶻⁿ⁺¹ (ℤ.posneg i) p = ⊥-elim {A = λ _ → Σ[ y ∈ ℕ₊₁ ] ℤ.posneg i ≡ [1+ y ⁿ]ᶻ} (¬-<ⁿ-zero p)
-- injᶻⁿ⁺¹ (signed spos (suc n)) p = 1+ n , refl
absᶻ⁺¹ : ℤ → ℕ₊₁
absᶻ⁺¹ (pos zero) = 1+ 0
absᶻ⁺¹ (neg zero) = 1+ 0
absᶻ⁺¹ (posneg i) = 1+ 0
absᶻ⁺¹ (pos (suc n)) = 1+ n
absᶻ⁺¹ (neg (suc n)) = 1+ n
-- absᶻ⁺¹-identity⁺ : ∀ x → [ 0 <ⁿ x ] → [1+ absᶻ⁺¹ (pos x) ⁿ]ᶻ ≡ pos x
-- absᶻ⁺¹-identity⁺ zero p = ⊥-elim {A = λ _ → [1+ absᶻ⁺¹ (pos zero) ⁿ]ᶻ ≡ pos zero} (<ⁿ-irrefl 0 p)
-- absᶻ⁺¹-identity⁺ (suc x) p = refl
--
-- absᶻ⁺¹-identity⁻ : ∀ x → [ 0 <ⁿ x ] → [1+ absᶻ⁺¹ (neg x) ⁿ]ᶻ ≡ pos x
-- absᶻ⁺¹-identity⁻ zero p = ⊥-elim {A = λ _ → [1+ absᶻ⁺¹ (neg zero) ⁿ]ᶻ ≡ pos zero} (<ⁿ-irrefl 0 p)
-- absᶻ⁺¹-identity⁻ (suc x) p = refl
absᶻ⁺¹-identity : ∀ x → [ x #ᶻ 0 ] → [1+ absᶻ⁺¹ x ⁿ]ᶻ ≡ pos (absᶻ x)
absᶻ⁺¹-identity (pos zero) p = ⊥-elim {A = λ _ → pos 1 ≡ pos 0} $ #ᶻ⇒≢ (posneg i0) p refl
absᶻ⁺¹-identity (neg zero) p = ⊥-elim {A = λ _ → pos 1 ≡ pos 0} $ #ᶻ⇒≢ (posneg i1) p posneg
absᶻ⁺¹-identity (posneg i) p = ⊥-elim {A = λ _ → pos 1 ≡ pos 0} $ #ᶻ⇒≢ (posneg i ) p (λ j → posneg (i ∧ j))
absᶻ⁺¹-identity (pos (suc n)) p = refl
absᶻ⁺¹-identity (neg (suc n)) p = refl
absᶻ⁺¹-identityⁿ : ∀ x → [ x #ᶻ 0 ] → suc (ℕ₊₁.n (absᶻ⁺¹ x)) ≡ absᶻ x
absᶻ⁺¹-identityⁿ x p i = absᶻ (absᶻ⁺¹-identity x p i)
sign' : ℤ × ℕ₊₁ → Sign
sign' (z , n) = signᶻ z
sign'-preserves-∼ : (a b : ℤ × ℕ₊₁) → a ∼ b → sign' a ≡ sign' b
sign'-preserves-∼ a@(aᶻ , aⁿ) b@(bᶻ , bⁿ) p = sym (lem aᶻ bⁿ) ∙ ψ ∙ lem bᶻ aⁿ where
a' = absᶻ aᶻ ·ⁿ suc (ℕ₊₁.n bⁿ)
b' = absᶻ bᶻ ·ⁿ suc (ℕ₊₁.n aⁿ)
γ : signed (signᶻ aᶻ ⊕ spos) a' ≡ signed (signᶻ bᶻ ⊕ spos) b'
γ = p
ψ : signᶻ (signed (signᶻ aᶻ ⊕ spos) a') ≡ signᶻ (signed (signᶻ bᶻ ⊕ spos) b')
ψ i = signᶻ (γ i)
lem : ∀ x y → signᶻ (signed (signᶻ x ⊕ spos) (absᶻ x ·ⁿ suc (ℕ₊₁.n y))) ≡ signᶻ x
lem (pos zero) y = refl
lem (neg zero) y = refl
lem (posneg i) y = refl
lem (pos (suc n)) y = refl
lem (neg (suc n)) y = refl
sign : ℚ → Sign
sign = SetQuotient.rec {R = _∼_} {B = Sign} Bool.isSetBool sign' sign'-preserves-∼
sign-signᶻ-identity : ∀ z n → sign [ z , n ]ᶠ ≡ signᶻ z
sign-signᶻ-identity z n = refl
|
hardware/eraser.asm | bhargavkumar040/android-source-browsing.device--google--accessory--adk2012-demo | 0 | 164738 | <filename>hardware/eraser.asm
;
; Copyright (C) 2012 The Android Open Source Project
;
; 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.
; ADK2 Sam3X Eraser Controller
; Author: Fuller
; serial DTR line as clock on GP0
; serial RTS line as data on GP1
; GP2 output controls Sam3X erase feature
; GP0, input, /DTR
; GP1, input, /RTS
; GP2, output, erase
; GP3, input, internal pull-up, floating
#include "P10F200.INC"
; configuration bits
__CONFIG (_WDT_OFF&_CP_ON&_MCLRE_OFF)
; memory map
; only 16 bytes of RAM starting at 0x10
udata
GPIO_sampled res 1
GPIO_sampledQ res 1
magicKeyL res 1
magicKeyH res 1
tick0 res 1
tick1 res 1
code 0x00
; initialize microcontroller
movlw (1<<NOT_GPWU|1<<PS2|1<<PS1|1<<PS0) ; no wake up, pull-ups
; TMR0 at 1:256 for low power
option
bcf GPIO, GP2
movlw (1<<GP3|1<<GP1|1<<GP0) ; GP2 is only output
tris GPIO
; initialize variables
clrf magicKeyH
clrf magicKeyL
bsf GPIO_sampled, GP0 ; can't get false rise if assume high
sampler:
movf GPIO_sampled, W ; old stale sample
movwf GPIO_sampledQ ; clock pipe for edge detection
movf GPIO, W ; fresh sample
movwf GPIO_sampled ; sampled copy of IO's
; check for rising clock edge
btfss GPIO_sampled, GP0
goto sampler ; if not set, then it's not rising
btfsc GPIO_sampledQ, GP0 ; if old is clear, then rising
goto sampler
shifter:
movf GPIO, W ; sample the data
movwf GPIO_sampledQ ; reuse the same memory location
btfss GPIO_sampledQ, GP0
goto sampler ; if clock has already dropped, abort
bsf STATUS, C
btfss GPIO_sampledQ, GP1 ; sets C to match GP1 for shift in
bcf STATUS, C
rrf magicKeyH ; first half of..
rrf magicKeyL ; 16-bit shift through C
movlw 0xac
subwf magicKeyH, W
btfss STATUS, Z ; check for key-pattern match
goto sampler
movlw 0x5a
subwf magicKeyL, W
btfss STATUS, Z ; check for key-pattern match
goto sampler
erase:
; begin erase trigger
bsf GPIO, GP2
; delay for erase trigger period, estimate 393mS for this code...
delay:
clrf tick0
clrf tick1
delayLoop:
; inc16
incf tick0
btfsc STATUS, Z
incf tick1
btfss STATUS, Z
goto delayLoop
; end erase trigger
bcf GPIO, GP2
goto sampler
end
|
alloy4fun_models/trashltl/models/11/W8PSZNmKABNuZFypb.als | Kaixi26/org.alloytools.alloy | 0 | 1038 | <gh_stars>0
open main
pred idW8PSZNmKABNuZFypb_prop12 {
always all f: File | eventually f in Trash
}
pred __repair { idW8PSZNmKABNuZFypb_prop12 }
check __repair { idW8PSZNmKABNuZFypb_prop12 <=> prop12o } |
src/fot/FOTC/README.agda | asr/fotc | 11 | 14889 | ------------------------------------------------------------------------------
-- First-Order Theory of Combinators (FOTC)
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K #-}
-- Code accompanying the paper "Combining Interactive and Automatic
-- Reasoning in First Order Theories of Functional Programs" by <NAME>, <NAME> and <NAME> (FoSSaCS 2012).
-- The code presented here does not match the paper exactly.
module FOTC.README where
------------------------------------------------------------------------------
-- Description
-- Verification of functional programs using a version of Azcel's
-- First-Order Theory of Combinators and showing the combination of
-- interactive proofs with automatics proofs carried out by
-- first-order automatic theorem provers (ATPs).
------------------------------------------------------------------------------
-- For the paper, prerequisites, tested versions of the ATPs and use,
-- see https://github.com/asr/fotc/.
------------------------------------------------------------------------------
-- Conventions
-- If the module's name ends in 'I' the module contains interactive
-- proofs, if it ends in 'ATP' the module contains combined proofs,
-- otherwise the module contains definitions and/or interactive proofs
-- that are used by the interactive and combined proofs.
------------------------------------------------------------------------------
-- Base axioms
open import FOTC.Base
-- Properties for the base axioms
open import FOTC.Base.PropertiesATP
open import FOTC.Base.PropertiesI
-- Axioms for lists, colists, streams, etc.
open import FOTC.Base.List
-- Properties for axioms for lists, colists, streams, etc
open import FOTC.Base.List.PropertiesATP
open import FOTC.Base.List.PropertiesI
------------------------------------------------------------------------------
-- Booleans
-- The axioms
open import FOTC.Data.Bool
-- The inductive predicate
open import FOTC.Data.Bool.Type
-- Properties
open import FOTC.Data.Bool.PropertiesATP
open import FOTC.Data.Bool.PropertiesI
------------------------------------------------------------------------------
-- Natural numbers
-- The axioms
open import FOTC.Data.Nat
-- The inductive predicate
open import FOTC.Data.Nat.Type
-- Properties
open import FOTC.Data.Nat.PropertiesATP
open import FOTC.Data.Nat.PropertiesI
open import FOTC.Data.Nat.PropertiesByInductionATP
open import FOTC.Data.Nat.PropertiesByInductionI
-- Divisibility relation
open import FOTC.Data.Nat.Divisibility.By0.PropertiesATP
open import FOTC.Data.Nat.Divisibility.By0.PropertiesI
open import FOTC.Data.Nat.Divisibility.NotBy0.PropertiesATP
open import FOTC.Data.Nat.Divisibility.NotBy0.PropertiesI
-- Induction
open import FOTC.Data.Nat.Induction.Acc.WF-I
open import FOTC.Data.Nat.Induction.NonAcc.LexicographicI
-- Inequalites
open import FOTC.Data.Nat.Inequalities.EliminationPropertiesATP
open import FOTC.Data.Nat.Inequalities.EliminationPropertiesI
open import FOTC.Data.Nat.Inequalities.PropertiesATP
open import FOTC.Data.Nat.Inequalities.PropertiesI
-- Unary numbers
open import FOTC.Data.Nat.UnaryNumbers.Inequalities.PropertiesATP
open import FOTC.Data.Nat.UnaryNumbers.TotalityATP
------------------------------------------------------------------------------
-- Lists
-- The axioms
open import FOTC.Data.List
-- The inductive predicate
open import FOTC.Data.List.Type
-- Properties
open import FOTC.Data.List.PropertiesATP
open import FOTC.Data.List.PropertiesI
-- Well-founded induction
open import FOTC.Data.List.WF-Relation.LT-Cons.Induction.Acc.WF-I
open import FOTC.Data.List.WF-Relation.LT-Cons.PropertiesI
open import FOTC.Data.List.WF-Relation.LT-Length.Induction.Acc.WF-I
open import FOTC.Data.List.WF-Relation.LT-Length.PropertiesI
------------------------------------------------------------------------------
-- Lists of natural numbers
-- The inductive predicate
open import FOTC.Data.Nat.List
-- Properties
open import FOTC.Data.Nat.List.PropertiesATP
open import FOTC.Data.Nat.List.PropertiesI
------------------------------------------------------------------------------
-- Co-inductive natural numbers
-- Some axioms
open import FOTC.Data.Conat
-- The co-inductive predicate
open import FOTC.Data.Conat.Type
-- Properties
open import FOTC.Data.Conat.PropertiesATP
open import FOTC.Data.Conat.PropertiesI
-- Equality
open import FOTC.Data.Conat.Equality.Type
-- Equality properties
open import FOTC.Data.Conat.Equality.PropertiesATP
open import FOTC.Data.Conat.Equality.PropertiesI
------------------------------------------------------------------------------
-- Streams
-- Some axioms
open import FOTC.Data.Stream
-- The co-inductive predicate
open import FOTC.Data.Stream.Type
-- Properties
open import FOTC.Data.Stream.PropertiesATP
open import FOTC.Data.Stream.PropertiesI
-- Equality properties
open import FOTC.Data.Stream.Equality.PropertiesATP
open import FOTC.Data.Stream.Equality.PropertiesI
------------------------------------------------------------------------------
-- Bisimilary relation
-- The co-inductive predicate
open import FOTC.Relation.Binary.Bisimilarity.Type
-- Properties
open import FOTC.Relation.Binary.Bisimilarity.PropertiesATP
open import FOTC.Relation.Binary.Bisimilarity.PropertiesI
------------------------------------------------------------------------------
-- Verification of programs
-- Burstall's sort list algorithm: A structurally recursive algorithm
open import FOTC.Program.SortList.CorrectnessProofATP
open import FOTC.Program.SortList.CorrectnessProofI
-- The division algorithm: A non-structurally recursive algorithm
open import FOTC.Program.Division.CorrectnessProofATP
open import FOTC.Program.Division.CorrectnessProofI
-- The GCD algorithm: A non-structurally recursive algorithm
open import FOTC.Program.GCD.Partial.CorrectnessProofATP
open import FOTC.Program.GCD.Partial.CorrectnessProofI
open import FOTC.Program.GCD.Total.CorrectnessProofATP
open import FOTC.Program.GCD.Total.CorrectnessProofI
-- The nest function: A very simple function with nested recursion
open import FOTC.Program.Nest.PropertiesATP
-- The McCarthy 91 function: A function with nested recursion
open import FOTC.Program.McCarthy91.PropertiesATP
-- The mirror function: A function with higher-order recursion
open import FOTC.Program.Mirror.PropertiesATP
open import FOTC.Program.Mirror.PropertiesI
-- The map-iterate property: A property using co-induction
open import FOTC.Program.MapIterate.MapIterateATP
open import FOTC.Program.MapIterate.MapIterateI
-- The alternating bit protocol: A program using induction and co-induction
open import FOTC.Program.ABP.CorrectnessProofATP
open import FOTC.Program.ABP.CorrectnessProofI
-- The iter₀ function: A partial function
open import FOTC.Program.Iter0.PropertiesATP
open import FOTC.Program.Iter0.PropertiesI
-- The Collatz function: A function without a termination proof
open import FOTC.Program.Collatz.PropertiesATP
open import FOTC.Program.Collatz.PropertiesI
|
Transynther/x86/_processed/NONE/_ht_zr_un_/i7-7700_9_0x48.log_21829_813.asm | ljhsiun2/medusa | 9 | 174146 | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r14
push %r15
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0x3f5, %rsi
lea addresses_UC_ht+0x1b69d, %rdi
nop
nop
inc %r15
mov $90, %rcx
rep movsl
nop
nop
nop
nop
nop
cmp %rbp, %rbp
lea addresses_UC_ht+0x783d, %rbp
clflush (%rbp)
nop
nop
and %r14, %r14
mov (%rbp), %r15
nop
nop
nop
nop
add $30963, %rcx
lea addresses_WC_ht+0x5a3d, %rcx
nop
inc %rax
mov $0x6162636465666768, %rdi
movq %rdi, %xmm6
vmovups %ymm6, (%rcx)
inc %r15
lea addresses_UC_ht+0xdabd, %rsi
lea addresses_normal_ht+0x1b13d, %rdi
dec %r12
mov $22, %rcx
rep movsq
nop
nop
nop
inc %rcx
lea addresses_A_ht+0xf1d5, %r12
clflush (%r12)
nop
nop
nop
sub %r14, %r14
mov (%r12), %rax
nop
nop
nop
nop
inc %rsi
lea addresses_WT_ht+0x1ac3d, %r12
nop
nop
nop
nop
xor %rcx, %rcx
mov $0x6162636465666768, %rsi
movq %rsi, %xmm6
movups %xmm6, (%r12)
nop
nop
nop
nop
sub %rsi, %rsi
lea addresses_normal_ht+0x1574d, %rsi
lea addresses_WT_ht+0x1cf3d, %rdi
nop
cmp $29030, %r12
mov $77, %rcx
rep movsq
nop
nop
nop
cmp $13690, %rbp
lea addresses_UC_ht+0xbb3d, %rcx
dec %r15
movb (%rcx), %r12b
nop
nop
nop
inc %r14
lea addresses_UC_ht+0x3e7f, %r14
nop
nop
nop
nop
inc %rax
movups (%r14), %xmm2
vpextrq $1, %xmm2, %r12
nop
and %rax, %rax
lea addresses_normal_ht+0x7d9d, %rax
clflush (%rax)
nop
nop
nop
nop
nop
sub $57833, %rsi
movups (%rax), %xmm2
vpextrq $1, %xmm2, %rbp
nop
nop
nop
nop
nop
dec %rcx
lea addresses_WT_ht+0x1783d, %rbp
nop
nop
nop
xor %rsi, %rsi
mov (%rbp), %rax
cmp %rbp, %rbp
lea addresses_UC_ht+0x5fc8, %rsi
lea addresses_UC_ht+0x1143d, %rdi
cmp %r12, %r12
mov $52, %rcx
rep movsl
nop
nop
nop
nop
xor $2124, %rax
lea addresses_D_ht+0x15e3d, %rsi
lea addresses_WT_ht+0x17129, %rdi
nop
nop
nop
nop
inc %rbp
mov $122, %rcx
rep movsw
nop
nop
nop
sub $21560, %r12
lea addresses_UC_ht+0xc3d, %r12
nop
nop
nop
nop
cmp $4845, %rcx
movl $0x61626364, (%r12)
nop
nop
nop
nop
nop
and %rcx, %rcx
lea addresses_normal_ht+0x1303d, %rcx
nop
xor %r14, %r14
mov (%rcx), %edi
nop
nop
and $32343, %rbp
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r15
pop %r14
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r15
push %r8
push %rbp
push %rcx
push %rdi
push %rdx
// Store
mov $0x54cf510000000aca, %rdx
nop
nop
nop
nop
nop
cmp %rcx, %rcx
movw $0x5152, (%rdx)
// Exception!!!
nop
nop
nop
mov (0), %r15
nop
nop
nop
nop
cmp $4291, %r15
// Store
lea addresses_US+0x61d5, %rdi
nop
nop
nop
nop
dec %rbp
movw $0x5152, (%rdi)
add %r15, %r15
// Store
mov $0x3d, %rbp
nop
nop
nop
xor $14342, %rcx
movb $0x51, (%rbp)
add $5743, %r8
// Faulty Load
lea addresses_A+0xdc3d, %rbp
sub $20338, %rdi
movups (%rbp), %xmm1
vpextrq $0, %xmm1, %rdx
lea oracles, %rcx
and $0xff, %rdx
shlq $12, %rdx
mov (%rcx,%rdx,1), %rdx
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r8
pop %r15
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': True, 'congruent': 0, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 2, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_P', 'AVXalign': True, 'congruent': 10, 'size': 1, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': True}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 10, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 9, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 3, 'size': 8, 'same': True, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 11, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 8, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': True, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 5, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 10, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 10, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 11, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 10, 'size': 4, 'same': False, 'NT': True}}
{'47': 335, '46': 10, '00': 21473, 'c4': 2, 'c5': 1, '44': 8}
00 00 00 47 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 47 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 47 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 46 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 47 00 00 00 47 00 00 00 00 00 00 47 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 47 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 47 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 47 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 47 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 47 00 00 00 00 00 00 00 00 47 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 47 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 47 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 47 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 47 00 00 00 00 00 00 00 00 00 00 00 00 47 00 00 00 00 00 00 00 47 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 47 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 47 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 47 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 47 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 47
*/
|
execution_hints/c11_strengthening_seq.als | mpardalos/memalloy | 20 | 2256 | pred c11_strengthening_seq[X:Exec] {
/*
e1:W[na](a,1) || e2:R[rlx](x,1) || e5: R[rlx](y,1)
|| [ctrl] || [ctrl]
|| e3:R[na](a,1) || e6: W[rlx](x,1)
|| [ctrl] ||
|| e4:W[rlx](y,1) ||
*/
some disj e1,e2,e3,e4,e5,e6 : E {
X.EV = e1+e2+e3+e4+e5+e6
X.R = e2+e3+e5
X.W = e1+e4+e6
X.F = none
X.A = e2+e4+e5+e6
X.REL = none
X.ACQ = none
X.SC = none
X.ad = none->none
X.dd = none->none
X.cd = (e2->e3) + (e3->e4) + (e5->e6)
X.sb = ^((e2->e3)+(e3->e4)) + (e5->e6)
X.sloc = sq[e1+e3] + sq[e2+e6] + sq[e4+e5]
X.sthd = sq[e1] + sq[e2+e3+e4] + sq[e5+e6]
X.rf = (e1->e3) + (e6->e2) + (e4->e5)
X.co = none->none
}
}
|
Irvine/Examples/ch07/32 bit/imul.asm | alieonsido/ASM_TESTING | 0 | 97687 | <filename>Irvine/Examples/ch07/32 bit/imul.asm<gh_stars>0
; IMUL Examples (imul.asm)
; This program shows exmples of various IMUL formats.
INCLUDE Irvine32.inc
.data
byte1 SBYTE -4
byte2 SBYTE +5
.code
main PROC
; Example 1
mov al,48
mov bl,4
imul bl ; AX = 00C0h, OF = 1
; Example 2
mov al,-4
mov bl,4
imul bl ; AX = FFF0, OF = 0
; Example 3
mov ax,48
mov bx,4
imul bx ; DX:AX = 000000C0h, OF = 0
; Example 4
mov eax,+4823424
mov ebx,-423
imul ebx ; EDX:EAX = FFFFFFFF86635D80h, OF = 0
; Example 5
.data
word1 SWORD 4
dword1 SDWORD 4
.code
mov ax,-16
mov bx,2
imul bx,ax ; BX = -32
imul bx,2 ; BX = -64
imul bx,word1 ; BX = -256
mov eax,-16
mov ebx,2
imul ebx,eax ; EBX = -32
imul ebx,2 ; EBX = -64
imul ebx,dword1 ; EBX = -256
; Example 6
mov ax,-32000
imul ax,2 ; OF = 1, CF = 1
; Example 7
imul bx,word1,-16 ; BX = -64
imul ebx,dword1,-16 ; EBX = -64
imul ebx,dword1,-2000000000 ; OF = 1, CF = 1
exit
main ENDP
END main |
src/bitmap_buffer.adb | KLOC-Karsten/adaoled | 0 | 17513 | <gh_stars>0
with Interfaces; use Interfaces;
with Bitmap_Graphics; use Bitmap_Graphics;
package body Bitmap_Buffer is
-- Set the color for the whole buffer.
procedure Set(Buf: Buffer_Ref; Clr: Color) is
Val: Unsigned_8;
begin
case Clr is
when White => Val := 255;
when Black => Val := 0;
end case;
for I in 1 .. Buf.Data'Last loop
Buf.Data(I) := Val;
end loop;
end Set;
-- Set the color for one point in the graphics buffer.
procedure Set
(Buf: Buffer_Ref; -- The graphic buffer
P : Point; -- Point to draw
Clr: Color) -- Color for point P
is
Index : Natural; -- Index of the byte in buffer
Old_Val, New_Val : Unsigned_8; -- Old and new value for this byte
begin
if P.X <= Width and P.Y <= Height then
Index := P.X + (P.Y / 8) * Width;
Old_Val := Buf.Data(Index);
case Clr is
when White =>
New_Val := Old_Val or Shift_Left(1, P.Y mod 8);
when Black =>
New_Val := Old_Val or Shift_Left(0, P.Y mod 8);
end case;
Buf.Data(Index) := New_Val;
end if;
end Set;
function Pt(P: Point; X,Y:Integer) return Point is
begin
return (P.X + X, P.Y + Y);
end Pt;
function Pt(X,Y:Natural) return Point is
begin
return (X, Y);
end Pt;
-- Draw a point with size "Size" at poiny X,Y.
procedure Dot(Buf:Buffer_Ref; P:Point; Size:Positive:=1; Clr:Color:=White) is
begin
for Dx in -(Size-1) .. (Size-1) loop
for Dy in -(Size-1) .. (Size-1) loop
Set(Buf, Pt(P, Dx, Dy), Clr);
end loop;
end loop;
end Dot;
procedure Swap(X: in out Natural; Y: in out Natural) is
Tmp : Natural;
begin
Tmp := X; X := Y; Y := Tmp;
end Swap;
procedure Line
(Buf:Buffer_Ref; P,Q: Point; Size:Positive:=1; Clr:Color:=White)
is
X, Y: Natural;
Dx, Dy : Integer;
Step_X, Step_Y: Integer;
Esp : Integer;
begin
if P.X <= Width and P.Y <= Height and Q.X <= Width and Q.Y <= Height then
if P.X < Q.X then
Dx := Q.X - P.X; Step_X := 1;
else
Dx := P.X - Q.X; Step_X := -1;
end if;
if P.Y < Q.Y then
Dy := P.Y - Q.Y; -- ! Dy needs to be negative
Step_Y := 1;
else
Dy := Q.Y - P.Y;
Step_Y := -1;
end if;
X := P.X; Y := P.Y;
Esp := Dx + Dy;
-- int32_t dy =(int32_t)Yend -(int32_t)Ystart <= 0 ? Yend - Ystart : Ystart - Yend;
loop
Dot(Buf, Pt(X, Y), Size, Clr);
if 2 * Esp >= dy then
exit when X = Q.X;
Esp := Esp + dy;
X := X + Step_X;
end if;
if 2 * Esp <= dx then
exit when Y = Q.Y;
Esp := Esp + dx;
Y := Y + Step_Y;
end if;
end loop;
end if;
end Line;
procedure Rectangle
(Buf:Buffer_Ref; P,Q: Point; Size:Positive:=1; Clr:Color:=White) is
begin
Line(Buf, P, Pt(Q.X, P.Y), Size, Clr);
Line(Buf, P, Pt(P.X, Q.Y), Size, Clr);
Line(Buf, Q, Pt(Q.X, P.Y), Size, Clr);
Line(Buf, Q, Pt(P.X, Q.Y), Size, Clr);
end Rectangle;
procedure Fill_Rectangle
(Buf:Buffer_Ref; P,Q: Point; Clr:Color:=White)
is
Y_A, Y_B: Natural;
begin
if P.Y < Q.Y then
Y_A := P.Y; Y_B := Q.Y;
else
Y_A := Q.Y; Y_B := P.Y;
end if;
for Y in Y_A .. Y_B loop
Line(Buf, Pt(P.X, Y), Pt(Q.X, Y), 1, Clr);
end loop;
end Fill_Rectangle;
procedure Circle
(Buf:Buffer_Ref; P: Point; R: Natural; Size: Positive:=1; Clr: Color:=White)
is
X, Y: Integer;
Esp : Integer;
begin
X := 0;
Y := R;
Esp := 3 - (R * 2);
while X <= Y loop
Dot(Buf, Pt(P.X + X, P.Y + Y), Size, Clr); --1
Dot(Buf, Pt(P.X - X, P.Y + Y), Size, Clr); --2
Dot(Buf, Pt(P.X - Y, P.Y + X), Size, Clr); --3
Dot(Buf, Pt(P.X - Y, P.Y - X), Size, Clr); --4
Dot(Buf, Pt(P.X - X, P.Y - Y), Size, Clr); --5
Dot(Buf, Pt(P.X + X, P.Y - Y), Size, Clr); --6
Dot(Buf, Pt(P.X + Y, P.Y - X), Size, Clr); --7
Dot(Buf, Pt(P.X + Y, P.Y + X), Size, Clr); --0
if Esp < 0 then
Esp := Esp + (4 * X + 6);
else
Esp := Esp + (10 + 4 * (X - Y));
Y := Y - 1;
end if;
X := X + 1;
end loop;
end Circle;
procedure Fill_Circle
(Buf:Buffer_Ref; P: Point; R: Natural; Clr: Color:=White)
is
X,Y: Integer;
Esp : Integer;
begin
X := 0;
Y := R;
Esp := 3 - (R * 2);
while X <= Y loop
for Count_Y in X .. (Y-1) loop
null;
Dot(Buf, Pt(P.X + X, P.Y + Count_Y), 1, Clr); --1
Dot(Buf, Pt(P.X - X, P.Y + Count_Y), 1, Clr); --2
Dot(Buf, Pt(P.X - Count_Y, P.Y + X), 1, Clr); --3
Dot(Buf, Pt(P.X - Count_Y, P.Y - X), 1, Clr); --4
Dot(Buf, Pt(P.X - X, P.Y - Count_Y), 1, Clr); --5
Dot(Buf, Pt(P.X + X, P.Y - Count_Y), 1, Clr); --6
Dot(Buf, Pt(P.X + Count_Y, P.Y - X), 1, Clr); --7
Dot(Buf, Pt(P.X + Count_Y, P.Y + X), 1, Clr);
end loop;
if Esp < 0 then
Esp := Esp+ ( 4 * X + 6);
else
Esp := Esp + (10 + 4 *(X - Y ));
Y := Y - 1;
end if;
X := X+1;
end loop;
end Fill_Circle;
procedure Draw_Char
(Buf : Buffer_Ref;
X, Y : Natural;
Ch : Character;
Font_Ref : Font_Access;
Fgnd, Bgnd : Color)
is
Value : Unsigned_8;
Size, Offset : Natural;
Mask : constant Unsigned_8 := 16#80#;
Masked_Value: Unsigned_8;
begin
if Font_Ref.Width mod 8 = 0 then
Size := Font_Ref.Height * (Font_Ref.Width / 8);
else
Size := Font_Ref.Height * (Font_Ref.Width / 8 + 1);
end if;
Offset := (Character'Pos(Ch) - Character'Pos(' ')) * size;
Value := Font_Ref.Data(Offset);
for Page in 0 .. (Font_Ref.Height-1) loop
Column_Loop:
for Column in 0 .. (Font_Ref.Width-1) loop
Masked_Value := Value and (Shift_Right(Mask, Column mod 8)) ;
if Bgnd = Black then
if Masked_Value /= 0 then
Set(Buf, Pt(X + Column, Y + Page), Fgnd);
end if;
else
if Masked_Value /= 0 then
Set(Buf, Pt(X + Column, Y + Page), Fgnd);
else
Set(Buf, Pt(X + Column, Y + Page), Bgnd);
end if;
end if;
if Column mod 8 = 7 then
Offset := Offset + 1;
Value := Font_Ref.Data(Offset);
end if;
end loop Column_Loop;
if Font_Ref.Width mod 8 /= 0 then
Offset := Offset + 1;
Value := Font_Ref.Data(Offset);
end if;
end loop;
end Draw_Char;
procedure Put
(Buf : Buffer_Ref;
P : Point;
Ch : Character;
Size: Positive;
Fgnd: Color:= White;
Bgnd: Color:= Black)
is
F : Font_Access;
begin
F := Bitmap_Graphics.Get_Font(Size);
Draw_Char(Buf, P.X, P.Y, Ch, F, Fgnd, Bgnd);
end Put;
procedure Draw_Str
(Buf : Buffer_Ref;
P : Point;
Str : String;
Font_Ref: Font_Access;
Fgnd : Color:= White;
Bgnd : Color:= Black)
is
X : Natural := P.X; -- Current x position
Y : Natural := P.Y; -- Current y position
begin
for I in 1 .. Str'Last loop
-- if the X direction is filled, then continue at next line
if (X + Font_Ref.Width) > Width then
X := P.X;
Y := Y + Font_Ref.Height;
end if;
-- If the Y direction is full, reposition to P
if (Y + Font_Ref.Height) > Height then
X := P.X;
Y := P.Y;
end if;
Draw_Char(Buf, X, Y, Str(I), Font_Ref, Fgnd, Bgnd);
X := X + Font_Ref.Width;
end loop;
end Draw_Str;
-- Draw a string into the graphics buffer.
procedure Put
(Buf : Buffer_Ref;
P : Point;
Str : String;
Size: Positive;
Fgnd: Color:= White;
Bgnd: Color:= Black)
is
F : Font_Access;
begin
F := Get_Font(Size);
Draw_Str(Buf, P, Str, F, Fgnd, Bgnd);
end Put;
procedure Draw_Num
(Buf : Buffer_Ref;
X, Y : Natural;
Num : Natural;
Font_Ref : Font_Access;
Fgnd, Bgnd : Color)
is
Str : String(1..128);
Pos : Positive := 1;
Rev_Str : String(1..128);
Rev_Pos : Positive := 1;
Number : Integer := Num;
begin
-- Converts a number to a string
while Number > 0 loop
Rev_Str(Rev_Pos) := Character'Val(Number mod 10 + Character'Pos('0'));
Rev_Pos := Rev_Pos + 1;
Number := Number / 10;
end loop;
-- The string is inverted
while Rev_Pos > 1 loop
Str(Pos) := Rev_Str(Rev_Pos-1);
Pos := Pos + 1;
Rev_Pos := Rev_Pos -1;
end loop;
Draw_Str(Buf, Pt(X, Y), Str(1.. (Pos-1)), Font_Ref, Fgnd, Bgnd);
end Draw_Num;
-- Draw a number into the graphics buffer.
procedure Put
(Buf : Buffer_Ref;
P : Point;
Num : Natural;
Size: Positive;
Fgnd: Color:= White;
Bgnd: Color:= Black)
is
F : Font_Access;
begin
F := Get_Font(Size);
Draw_Num(Buf, P.X, P.Y, Num, F, Fgnd, Bgnd);
end Put;
procedure Bitmap
(Buf : Buffer_Ref;
P : Point;
Bytes : Byte_Array_Access;
Siz : Size)
is
Byte_Width : Natural := (Siz.Width + 7)/8;
Byte : Unsigned_8;
Mask : Unsigned_8;
Masked_Value : Unsigned_8;
begin
for J in 0 .. (Siz.Height-1) loop
for I in 0 .. (Siz.Width-1) loop
Byte := Bytes(J * Byte_Width + I / 8);
Mask := Shift_Right(128, I mod 8);
Masked_Value := Byte and Mask;
if Masked_Value /= 0 then
Dot(Buf, Pt(P.X + I, P.Y + J));
end if;
end loop;
end loop;
end Bitmap;
procedure Bitmap
(Buf : Buffer_Ref;
P : Point;
Icon : Bitmap_Icon)
is
Width : Natural;
Height : Natural;
Data : Byte_Array_Access;
begin
Get_Icon(Icon, Width, Height, Data);
Bitmap(Buf, P, Data, (Width, Height));
end;
end Bitmap_Buffer;
|
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/discr35.adb | best08618/asylo | 7 | 8320 | -- { dg-do compile }
package body Discr35 is
procedure Proc1 is
R : Rec2 := Null_Rec2;
begin
null;
end;
procedure Proc2 is
R : Rec2;
begin
R := Null_Rec2;
end;
end Discr35;
|
programs/oeis/010/A010903.asm | jmorken/loda | 1 | 245330 | ; A010903: Pisot sequence E(3,13): a(n) = floor(a(n-1)^2/a(n-2) + 1/2).
; 3,13,56,241,1037,4462,19199,82609,355448,1529413,6580721,28315366,121834667,524227237,2255632184,9705479209,41760499493,179686059838,773148800711,3326685824041,14313982718072,61589856118237,265007332436969,1140267093830134,4906313471839763
add $0,1
mov $1,1
lpb $0
sub $0,1
add $2,$1
mov $1,$2
mul $1,2
add $3,$2
add $1,$3
lpe
|
test/Common/Float.agda | KDr2/agda | 0 | 15319 | <reponame>KDr2/agda
{-# OPTIONS --cubical-compatible #-}
module Common.Float where
open import Agda.Builtin.Float public
open import Common.String
floatToString : Float -> String
floatToString = primShowFloat
|
src/zmq.adb | sonneveld/adazmq | 0 | 8162 | with Ada.Unchecked_Conversion;
with Interfaces.C.Strings;
with ZMQ_Constants;
package body ZMQ is
use type System.Address;
use type Interfaces.C.int;
use type Interfaces.C.size_t;
use type Interfaces.C.unsigned;
-- Conversion
function Convert is new Ada.Unchecked_Conversion
(Source => Interfaces.C.size_t,
Target => Interfaces.C.unsigned_long);
function Convert is new Ada.Unchecked_Conversion
(Source => System.Address,
Target => Interfaces.C.Strings.chars_ptr);
function Convert is new Ada.Unchecked_Conversion
(Source => Interfaces.C.Strings.chars_ptr,
Target => System.Address);
function Convert (Value : Context_Type'Class) return System.Address is (Value.Impl_Ptr);
function Convert (Value : Context_Option_Names) return Interfaces.C.int
is
begin
case Value is
when ZMQ_IO_THREADS => return ZMQ_Constants.ZMQ_IO_THREADS;
when ZMQ_MAX_SOCKETS => return ZMQ_Constants.ZMQ_MAX_SOCKETS;
when ZMQ_IPV6 => return ZMQ_Constants.ZMQ_IPV6;
end case;
end Convert;
function Convert (Value : Socket_Type'Class) return System.Address is (Value.Impl_Ptr);
function Convert (Value : Socket_Types) return Interfaces.C.int
is
begin
case Value is
when ZMQ_PAIR => return ZMQ_Constants.ZMQ_PAIR;
when ZMQ_PUB => return ZMQ_Constants.ZMQ_PUB;
when ZMQ_SUB => return ZMQ_Constants.ZMQ_SUB;
when ZMQ_REQ => return ZMQ_Constants.ZMQ_REQ;
when ZMQ_REP => return ZMQ_Constants.ZMQ_REP;
when ZMQ_DEALER => return ZMQ_Constants.ZMQ_DEALER;
when ZMQ_ROUTER => return ZMQ_Constants.ZMQ_ROUTER;
when ZMQ_PULL => return ZMQ_Constants.ZMQ_PULL;
when ZMQ_PUSH => return ZMQ_Constants.ZMQ_PUSH;
when ZMQ_XPUB => return ZMQ_Constants.ZMQ_XPUB;
when ZMQ_XSUB => return ZMQ_Constants.ZMQ_XSUB;
when ZMQ_STREAM => return ZMQ_Constants.ZMQ_STREAM;
end case;
end Convert;
function Convert (Value : Socket_Option_Names) return Interfaces.C.int
is
begin
case Value is
when ZMQ_AFFINITY => return ZMQ_Constants.ZMQ_AFFINITY;
when ZMQ_IDENTITY => return ZMQ_Constants.ZMQ_IDENTITY;
when ZMQ_SUBSCRIBE => return ZMQ_Constants.ZMQ_SUBSCRIBE;
when ZMQ_UNSUBSCRIBE => return ZMQ_Constants.ZMQ_UNSUBSCRIBE;
when ZMQ_RATE => return ZMQ_Constants.ZMQ_RATE;
when ZMQ_RECOVERY_IVL => return ZMQ_Constants.ZMQ_RECOVERY_IVL;
when ZMQ_SNDBUF => return ZMQ_Constants.ZMQ_SNDBUF;
when ZMQ_RCVBUF => return ZMQ_Constants.ZMQ_RCVBUF;
when ZMQ_RCVMORE => return ZMQ_Constants.ZMQ_RCVMORE;
when ZMQ_FD => return ZMQ_Constants.ZMQ_FD;
when ZMQ_EVENTS => return ZMQ_Constants.ZMQ_EVENTS;
when ZMQ_TYPE => return ZMQ_Constants.ZMQ_TYPE;
when ZMQ_LINGER => return ZMQ_Constants.ZMQ_LINGER;
when ZMQ_RECONNECT_IVL => return ZMQ_Constants.ZMQ_RECONNECT_IVL;
when ZMQ_BACKLOG => return ZMQ_Constants.ZMQ_BACKLOG;
when ZMQ_RECONNECT_IVL_MAX => return ZMQ_Constants.ZMQ_RECONNECT_IVL_MAX;
when ZMQ_MAXMSGSIZE => return ZMQ_Constants.ZMQ_MAXMSGSIZE;
when ZMQ_SNDHWM => return ZMQ_Constants.ZMQ_SNDHWM;
when ZMQ_RCVHWM => return ZMQ_Constants.ZMQ_RCVHWM;
when ZMQ_MULTICAST_HOPS => return ZMQ_Constants.ZMQ_MULTICAST_HOPS;
when ZMQ_RCVTIMEO => return ZMQ_Constants.ZMQ_RCVTIMEO;
when ZMQ_SNDTIMEO => return ZMQ_Constants.ZMQ_SNDTIMEO;
when ZMQ_LAST_ENDPOINT => return ZMQ_Constants.ZMQ_LAST_ENDPOINT;
when ZMQ_ROUTER_MANDATORY => return ZMQ_Constants.ZMQ_ROUTER_MANDATORY;
when ZMQ_TCP_KEEPALIVE => return ZMQ_Constants.ZMQ_TCP_KEEPALIVE;
when ZMQ_TCP_KEEPALIVE_CNT => return ZMQ_Constants.ZMQ_TCP_KEEPALIVE_CNT;
when ZMQ_TCP_KEEPALIVE_IDLE => return ZMQ_Constants.ZMQ_TCP_KEEPALIVE_IDLE;
when ZMQ_TCP_KEEPALIVE_INTVL => return ZMQ_Constants.ZMQ_TCP_KEEPALIVE_INTVL;
when ZMQ_TCP_ACCEPT_FILTER => return ZMQ_Constants.ZMQ_TCP_ACCEPT_FILTER;
when ZMQ_IMMEDIATE => return ZMQ_Constants.ZMQ_IMMEDIATE;
when ZMQ_XPUB_VERBOSE => return ZMQ_Constants.ZMQ_XPUB_VERBOSE;
when ZMQ_ROUTER_RAW => return ZMQ_Constants.ZMQ_ROUTER_RAW;
when ZMQ_IPV6 => return ZMQ_Constants.ZMQ_IPV6;
when ZMQ_MECHANISM => return ZMQ_Constants.ZMQ_MECHANISM;
when ZMQ_PLAIN_SERVER => return ZMQ_Constants.ZMQ_PLAIN_SERVER;
when ZMQ_PLAIN_USERNAME => return ZMQ_Constants.ZMQ_PLAIN_USERNAME;
when ZMQ_PLAIN_PASSWORD => return ZMQ_Constants.ZMQ_PLAIN_PASSWORD;
when ZMQ_CURVE_SERVER => return ZMQ_Constants.ZMQ_CURVE_SERVER;
when ZMQ_CURVE_PUBLICKEY => return ZMQ_Constants.ZMQ_CURVE_PUBLICKEY;
when ZMQ_CURVE_SECRETKEY => return ZMQ_Constants.ZMQ_CURVE_SECRETKEY;
when ZMQ_CURVE_SERVERKEY => return ZMQ_Constants.ZMQ_CURVE_SERVERKEY;
when ZMQ_PROBE_ROUTER => return ZMQ_Constants.ZMQ_PROBE_ROUTER;
when ZMQ_REQ_CORRELATE => return ZMQ_Constants.ZMQ_REQ_CORRELATE;
when ZMQ_REQ_RELAXED => return ZMQ_Constants.ZMQ_REQ_RELAXED;
when ZMQ_CONFLATE => return ZMQ_Constants.ZMQ_CONFLATE;
when ZMQ_ZAP_DOMAIN => return ZMQ_Constants.ZMQ_ZAP_DOMAIN;
end case;
end Convert;
procedure Version (Major : out Natural; Minor : out Natural; Patch : out Natural)
is
c_major : aliased Interfaces.C.int;
c_minor : aliased Interfaces.C.int;
c_patch : aliased Interfaces.C.int;
begin
ZMQ_Thin.zmq_version (c_major'Access, c_minor'Access, c_patch'Access);
Major := Natural (c_major);
Minor := Natural (c_minor);
Patch := Natural (c_patch);
end Version;
function Errno return Integer
is
begin
return Integer (ZMQ_Thin.zmq_errno);
end Errno;
function Strerror (Err_Num : Integer) return String
is
c_errnum : constant Interfaces.C.int := Interfaces.C.int (Err_Num);
c_strerror : constant Interfaces.C.Strings.chars_ptr := ZMQ_Thin.zmq_strerror (c_errnum);
begin
return Interfaces.C.Strings.Value (c_strerror);
end Strerror;
procedure Raise_Errno is
Error_Number : constant Integer := Errno;
begin
raise ZMQ_Error with "[" & Error_Number'Img & "] " & Strerror (Error_Number);
end Raise_Errno;
pragma No_Return (Raise_Errno);
-- Context
-- ------------------------------------------------------------------------
overriding procedure Initialize (Cxt : in out Context_Type) is
begin
Setup (Cxt);
end Initialize;
overriding procedure Finalize (Cxt : in out Context_Type) is
begin
if Cxt.Impl_Ptr /= System.Null_Address then
Term (Cxt);
end if;
end Finalize;
procedure Setup (Cxt : in out Context_Type) is
c_cxt : constant System.Address := ZMQ_Thin.zmq_ctx_new;
begin
if c_cxt /= System.Null_Address then
Cxt.Impl_Ptr := c_cxt;
else
Raise_Errno;
end if;
end Setup;
function New_Context return Context_Type
is
begin
return Cxt : Context_Type do
Setup (Cxt);
end return;
end New_Context;
procedure Term (Context : in out Context_Type)
is
c_res : Interfaces.C.int;
begin
c_res := ZMQ_Thin.zmq_ctx_term (Convert (Context));
if c_res = 0 then
Context.Impl_Ptr := System.Null_Address;
return;
else
Raise_Errno;
end if;
end Term;
procedure Shutdown (Context : Context_Type)
is
c_res : Interfaces.C.int;
begin
c_res := ZMQ_Thin.zmq_ctx_shutdown (Convert (Context));
if c_res = 0 then
return;
else
Raise_Errno;
end if;
end Shutdown;
procedure Set (Context : Context_Type; Name : Context_Option_Names; Value : Natural)
is
c_res : Interfaces.C.int;
begin
c_res := ZMQ_Thin.zmq_ctx_set (Convert (Context), Convert (Name), Interfaces.C.int (Value));
if c_res = 0 then
return;
else
Raise_Errno;
end if;
end Set;
function Get (Context : Context_Type; Name : Context_Option_Names) return Natural
is
c_res : Interfaces.C.int;
begin
c_res := ZMQ_Thin.zmq_ctx_get (Convert (Context), Convert (Name));
if c_res >= 0 then
return Natural (c_res);
else
Raise_Errno;
end if;
end Get;
function New_Socket (Context : Context_Type; Instance_Type : Socket_Types) return Socket_Type'Class
is
begin
return S : Socket_Type do
Setup (S, Context, Instance_Type);
end return;
end New_Socket;
-- Message_Type
-- ------------------------------------------------------------------------
overriding procedure Initialize (M : in out Message_Type) is
begin
M.Msg_Internals.u_u := (others => 0);
Setup (M);
end Initialize;
overriding procedure Finalize (M : in out Message_Type) is
begin
Close (M);
end Finalize;
procedure Setup (M : in out Message_Type; Size : Integer := 0)
is
c_size : constant Interfaces.C.size_t := Interfaces.C.size_t (Size);
c_res : Interfaces.C.int;
begin
c_res := ZMQ_Thin.zmq_msg_init_size (M.Msg_Internals'Access, c_size);
if c_res = 0 then
return;
else
Raise_Errno;
end if;
end Setup;
function Create_Message (Size : Integer := 0) return Message_Type
is
begin
return M : Message_Type do
M.Msg_Internals.u_u := (others => 0);
Setup (M, Size);
end return;
end Create_Message;
procedure Setup (M : in out Message_Type; Value : String)
is
c_size : constant Interfaces.C.size_t := Interfaces.C.size_t (Value'Length);
c_res : Interfaces.C.int;
c_data : System.Address;
begin
c_res := ZMQ_Thin.zmq_msg_init_size (M.Msg_Internals'Access, c_size);
if c_res /= 0 then
Raise_Errno;
end if;
c_data := ZMQ_Thin.zmq_msg_data (M.Msg_Internals'Access);
if c_data = System.Null_Address then
Raise_Errno;
end if;
declare
Data_String : String (1 .. Value'Length);
for Data_String'Address use c_data;
begin
Data_String (1 .. Value'Length) := Value (Value'First .. Value'Last);
end;
end Setup;
function Create_Message (Value : String) return Message_Type
is
begin
return M : Message_Type do
M.Msg_Internals.u_u := (others => 0);
Setup (M, Value);
end return;
end Create_Message;
procedure Send (M : in out Message_Type; S : Socket_Type'Class; Do_Not_Wait : Boolean := False; Send_More : Boolean := False)
is
Expected_Length : constant Integer := Size (M);
c_flags : Interfaces.C.unsigned := 0;
c_res : Interfaces.C.int;
begin
c_flags := 0;
if Do_Not_Wait then
c_flags := c_flags or ZMQ_Constants.ZMQ_DONTWAIT;
end if;
if Send_More then
c_flags := c_flags or ZMQ_Constants.ZMQ_SNDMORE;
end if;
c_res := ZMQ_Thin.zmq_msg_send (M.Msg_Internals'Access, Convert (S), c_flags);
if c_res >= 0 and then Interfaces.C.int (Expected_Length) = c_res then
return;
elsif c_res >= 0 then
raise ZMQ_Error with "Entire Message_Type wasn't sent.";
else
Raise_Errno;
end if;
end Send;
procedure Recv (M : in out Message_Type; S : Socket_Type'Class; Do_Not_Wait : Boolean := False)
is
c_flags : Interfaces.C.unsigned := 0;
c_res : Interfaces.C.int;
begin
c_flags := 0;
if Do_Not_Wait then
c_flags := c_flags or ZMQ_Constants.ZMQ_DONTWAIT;
end if;
c_res := ZMQ_Thin.zmq_msg_recv (M.Msg_Internals'Access, Convert (S), c_flags);
if c_res >= 0 then
return;
else
Raise_Errno;
end if;
end Recv;
procedure Close (M : in out Message_Type)
is
c_res : Interfaces.C.int;
begin
c_res := ZMQ_Thin.zmq_msg_close (M.Msg_Internals'Access);
if c_res = 0 then
return;
else
Raise_Errno;
end if;
end Close;
procedure Move (Dest : in out Message_Type; Src : in out Message_Type)
is
c_res : Interfaces.C.int;
begin
c_res := ZMQ_Thin.zmq_msg_move (Dest.Msg_Internals'Access, Src.Msg_Internals'Access);
if c_res = 0 then
return;
else
Raise_Errno;
end if;
end Move;
procedure Copy (Dest : in out Message_Type; Src : in out Message_Type)
is
c_res : Interfaces.C.int;
begin
c_res := ZMQ_Thin.zmq_msg_copy (Dest.Msg_Internals'Access, Src.Msg_Internals'Access);
if c_res = 0 then
return;
else
Raise_Errno;
end if;
end Copy;
-- TODO date returning other types..
function Data (M : in out Message_Type) return String
is
c_data : System.Address;
c_size : Interfaces.C.size_t;
begin
c_data := ZMQ_Thin.zmq_msg_data (M.Msg_Internals'Access);
if c_data = System.Null_Address then
Raise_Errno;
end if;
c_size := ZMQ_Thin.zmq_msg_size (M.Msg_Internals'Access);
declare
Result_Str : String (1 .. Integer (c_size));
for Result_Str'Address use c_data;
begin
return Result_Str;
end;
end Data;
function Size (M : in out Message_Type) return Natural
is
c_res : Interfaces.C.size_t;
begin
c_res := ZMQ_Thin.zmq_msg_size (M.Msg_Internals'Access);
return Natural (c_res);
end Size;
function More (M : in out Message_Type) return Boolean
is
c_res : Interfaces.C.int;
begin
c_res := ZMQ_Thin.zmq_msg_more (M.Msg_Internals'Access);
return c_res /= 0;
end More;
function Src_FD (M : in out Message_Type) return Integer
is
c_res : Interfaces.C.int;
begin
c_res := ZMQ_Thin.zmq_msg_get (M.Msg_Internals'Access, ZMQ_Constants.ZMQ_SRCFD);
if c_res >= 0 then
return Integer (c_res);
else
Raise_Errno;
end if;
end Src_FD;
function Shared (M : in out Message_Type) return Boolean
is
c_res : Interfaces.C.int;
begin
c_res := ZMQ_Thin.zmq_msg_get (M.Msg_Internals'Access, ZMQ_Constants.ZMQ_SHARED);
if c_res >= 0 then
return c_res /= 0;
else
Raise_Errno;
end if;
end Shared;
-- Socket
-- ------------------------------------------------------------------------
overriding procedure Initialize (S : in out Socket_Type)
is
begin
S.Impl_Ptr := System.Null_Address;
end Initialize;
overriding procedure Finalize (S : in out Socket_Type)
is
begin
if S.Impl_Ptr /= System.Null_Address then
Close (S);
end if;
end Finalize;
procedure Setup (S : in out Socket_Type; Context : Context_Type'Class; Instance_Type : Socket_Types)
is
c_socket : System.Address;
begin
c_socket := ZMQ_Thin.zmq_socket (Convert (Context), Convert (Instance_Type));
if c_socket /= System.Null_Address then
S.Impl_Ptr := c_socket;
else
Raise_Errno;
end if;
end Setup;
procedure Close (S : in out Socket_Type)
is
c_res : Interfaces.C.int;
begin
c_res := ZMQ_Thin.zmq_close (Convert (S));
if c_res = 0 then
S.Impl_Ptr := System.Null_Address;
return;
else
Raise_Errno;
end if;
end Close;
procedure Set_Sock_Opt (S : Socket_Type; Option : Socket_Option_Names; Option_Value : Integer)
is
c_optval : constant Interfaces.C.int := Interfaces.C.int (Option_Value);
c_optval_ptr : constant System.Address := c_optval'Address;
c_optvallen : constant Interfaces.C.size_t := c_optval'Size / 8;
c_res : Interfaces.C.int;
begin
c_res := ZMQ_Thin.zmq_setsockopt (Convert (S), Convert (Option), c_optval_ptr, c_optvallen);
if c_res = 0 then
return;
else
Raise_Errno;
end if;
end Set_Sock_Opt;
procedure Set_Sock_Opt (S : Socket_Type; Option : Socket_Option_Names; Option_Value : Long_Long_Integer)
is
c_optval : constant Interfaces.C.long := Interfaces.C.long (Option_Value);
c_optval_ptr : constant System.Address := c_optval'Address;
c_optvallen : constant Interfaces.C.size_t := c_optval'Size / 8;
c_res : Interfaces.C.int;
begin
c_res := ZMQ_Thin.zmq_setsockopt (Convert (S), Convert (Option), c_optval_ptr, c_optvallen);
if c_res = 0 then
return;
else
Raise_Errno;
end if;
end Set_Sock_Opt;
procedure Set_Sock_Opt (S : Socket_Type; Option : Socket_Option_Names; Option_Value : String)
is
c_optval : Interfaces.C.Strings.chars_ptr := Interfaces.C.Strings.New_String (Option_Value);
c_optvallen : constant Interfaces.C.size_t := Option_Value'Length;
c_res : Interfaces.C.int;
begin
c_res := ZMQ_Thin.zmq_setsockopt (Convert (S), Convert (Option), Convert (c_optval), c_optvallen);
Interfaces.C.Strings.Free (c_optval);
if c_res = 0 then
return;
else
Raise_Errno;
end if;
end Set_Sock_Opt;
-- function zmq_getsockopt (s : System.Address; option : Interfaces.C.int; optval : System.Address; optvallen : access Interfaces.C.size_t) return Interfaces.C.int;
function Get_Sock_Opt (S : Socket_Type; Option : Socket_Option_Names) return Integer
is
c_optval : aliased Interfaces.C.int;
c_optval_ptr : constant System.Address := c_optval'Address;
c_optvallen : aliased Interfaces.C.size_t := c_optval'Size / 8;
c_res : Interfaces.C.int;
begin
c_res := ZMQ_Thin.zmq_getsockopt (Convert (S), Convert (Option), c_optval_ptr, c_optvallen'Access);
if c_res = 0 then
return Integer (c_optval);
else
Raise_Errno;
end if;
end Get_Sock_Opt;
function Get_Sock_Opt (S : Socket_Type; Option : Socket_Option_Names) return Long_Long_Integer
is
c_optval : aliased Interfaces.C.long;
c_optval_ptr : constant System.Address := c_optval'Address;
c_optvallen : aliased Interfaces.C.size_t := c_optval'Size / 8;
c_res : Interfaces.C.int;
begin
c_res := ZMQ_Thin.zmq_getsockopt (Convert (S), Convert (Option), c_optval_ptr, c_optvallen'Access);
if c_res = 0 then
return Long_Long_Integer (c_optval);
else
Raise_Errno;
end if;
end Get_Sock_Opt;
function Get_Sock_Opt (S : Socket_Type; Option : Socket_Option_Names) return String
is
Buf_Size : constant Integer := 4096;
c_optval : aliased String (1.. Buf_Size);
c_optval_ptr : constant System.Address := c_optval'Address;
c_optvallen : aliased Interfaces.C.size_t := c_optval'Length;
c_res : Interfaces.C.int;
begin
c_res := ZMQ_Thin.zmq_getsockopt (Convert (S), Convert (Option), c_optval_ptr, c_optvallen'Access);
if c_optvallen >= Interfaces.C.size_t (Buf_Size) then
raise ZMQ_Error with "string option too large.";
end if;
if c_res = 0 then
return c_optval (1 .. Integer (c_optvallen));
else
Raise_Errno;
end if;
end Get_Sock_Opt;
procedure Bind (S : Socket_Type; Address : String)
is
c_addr : Interfaces.C.Strings.chars_ptr := Interfaces.C.Strings.New_String (Address);
c_res : Interfaces.C.int;
begin
c_res := ZMQ_Thin.zmq_bind (Convert (S), c_addr);
Interfaces.C.Strings.Free (c_addr);
if c_res = 0 then
return;
else
Raise_Errno;
end if;
end Bind;
procedure Connect (S : Socket_Type; Address : String)
is
c_addr : Interfaces.C.Strings.chars_ptr := Interfaces.C.Strings.New_String (Address);
c_res : Interfaces.C.int;
begin
c_res := ZMQ_Thin.zmq_connect (Convert (S), c_addr);
Interfaces.C.Strings.Free (c_addr);
if c_res = 0 then
return;
else
Raise_Errno;
end if;
end Connect;
procedure Unbind (S : Socket_Type; Address : String)
is
c_addr : Interfaces.C.Strings.chars_ptr := Interfaces.C.Strings.New_String (Address);
c_res : Interfaces.C.int;
begin
c_res := ZMQ_Thin.zmq_unbind (Convert (S), c_addr);
Interfaces.C.Strings.Free (c_addr);
if c_res = 0 then
return;
else
Raise_Errno;
end if;
end Unbind;
procedure Disconnect (S : Socket_Type; Address : String)
is
c_addr : Interfaces.C.Strings.chars_ptr := Interfaces.C.Strings.New_String (Address);
c_res : Interfaces.C.int;
begin
c_res := ZMQ_Thin.zmq_disconnect (Convert (S), c_addr);
Interfaces.C.Strings.Free (c_addr);
if c_res = 0 then
return;
else
Raise_Errno;
end if;
end Disconnect;
-- TODO: What about an array of flags?
procedure Send (S : Socket_Type; Buf : String; Do_Not_Wait : Boolean := False; Send_More : Boolean := False)
is
c_buf : constant System.Address := Buf'Address; -- TODO is this okay? or ptr to first item better?
c_len : constant Interfaces.C.size_t := Buf'Length;
c_flags : Interfaces.C.unsigned := 0;
c_res : Interfaces.C.int;
begin
c_flags := 0;
if Do_Not_Wait then
c_flags := c_flags or ZMQ_Constants.ZMQ_DONTWAIT;
end if;
if Send_More then
c_flags := c_flags or ZMQ_Constants.ZMQ_SNDMORE;
end if;
c_res := ZMQ_Thin.zmq_send (Convert (S), c_buf, c_len, c_flags);
if c_res >= 0 and then Interfaces.C.size_t (c_res) = c_len then
return;
elsif c_res >= 0 then
raise ZMQ_Error with "Entire Message_Type wasn't sent.";
else
Raise_Errno;
end if;
end Send;
function Recv (S : Socket_Type; Do_Not_Wait : Boolean := False) return String
is
Buf_Size : constant Integer := 32*1024;
Buf : String (1 .. Buf_Size);
c_buf : constant System.Address := Buf (Buf'First)'Address;
c_len : constant Interfaces.C.size_t := Buf'Length;
c_flags : Interfaces.C.unsigned := 0;
c_res : Interfaces.C.int;
begin
c_flags := 0;
if Do_Not_Wait then
c_flags := c_flags or ZMQ_Constants.ZMQ_DONTWAIT;
end if;
c_res := ZMQ_Thin.zmq_recv (Convert (S), c_buf, c_len, c_flags);
if c_res >= 0 and then c_res /= Interfaces.C.int (Buf_Size) then
return Buf (1 .. Integer (c_res));
elsif c_res >= 0 then
raise ZMQ_Error with "Received Message_Type was truncated.";
else
Raise_Errno;
end if;
end Recv;
-- Polling
-- ------------------------------------------------------------------------
procedure Setup (PE : in out Poll_Item_Type; S : Socket_Type'Class; Poll_In : Boolean := False; Poll_Out : Boolean := False)
is
begin
PE.S_Impl_Ptr := S.Impl_Ptr;
PE.FD := 0;
PE.Poll_In := Poll_In;
PE.Poll_Out := Poll_Out;
PE.Poll_Error := False;
PE.Result_In := False;
PE.Result_Out := False;
PE.Result_Error := False;
end Setup;
function New_Poll_Item (S : Socket_Type'Class; Poll_In : Boolean := False; Poll_Out : Boolean := False) return Poll_Item_Type
is
begin
return PE : Poll_Item_Type do
Setup (PE, S, Poll_In, Poll_Out);
end return;
end New_Poll_Item;
procedure Setup (PE : in out Poll_Item_Type; FD : Integer; Poll_In : Boolean := False; Poll_Out : Boolean := False; Poll_Error : Boolean := False)
is
begin
PE.S_Impl_Ptr := System.Null_Address;
PE.FD := Interfaces.C.int (FD);
PE.Poll_In := Poll_In;
PE.Poll_Out := Poll_Out;
PE.Poll_Error := Poll_Error;
PE.Result_In := False;
PE.Result_Out := False;
PE.Result_Error := False;
end Setup;
function New_Poll_Item (FD : Integer; Poll_In : Boolean := False; Poll_Out : Boolean := False; Poll_Error : Boolean := False) return Poll_Item_Type
is
begin
return PE : Poll_Item_Type do
Setup (PE, FD, Poll_In, Poll_Out, Poll_Error);
end return;
end New_Poll_Item;
function Is_Readable (PE : Poll_Item_Type) return Boolean is (PE.Result_In);
function Is_Writable (PE : Poll_Item_Type) return Boolean is (PE.Result_Out);
function Has_Error (PE : Poll_Item_Type) return Boolean is (PE.Result_Error);
type C_Poll_Item_Array is array (Natural range <>) of aliased ZMQ_Thin.zmq_pollitem_t;
pragma Convention (C, C_Poll_Item_Array);
function Convert (PE : Poll_Item_Type) return ZMQ_Thin.zmq_pollitem_t
is
begin
return Result : ZMQ_Thin.zmq_pollitem_t do
Result.socket := PE.S_Impl_Ptr;
Result.fd := PE.FD;
Result.events := 0;
if PE.Poll_In then
Result.events := Interfaces.C.short (Interfaces.C.unsigned (Result.events) or ZMQ_Constants.ZMQ_POLLIN);
end if;
if PE.Poll_Out then
Result.events := Interfaces.C.short (Interfaces.C.unsigned (Result.events) or ZMQ_Constants.ZMQ_POLLOUT);
end if;
if PE.Poll_Error then
Result.events := Interfaces.C.short (Interfaces.C.unsigned (Result.events) or ZMQ_Constants.ZMQ_POLLERR);
end if;
end return;
end Convert;
procedure Transfer_Result (Dest : in out Poll_Item_Type; Src : ZMQ_Thin.zmq_pollitem_t)
is
begin
Dest.Result_In := (Interfaces.C.unsigned(Src.revents) and ZMQ_Constants.ZMQ_POLLIN) /= 0;
Dest.Result_Out := (Interfaces.C.unsigned(Src.revents) and ZMQ_Constants.ZMQ_POLLOUT) /= 0;
end;
function Poll (Entries : in out Poll_Item_Array_Type; Timeout : Long_Long_Integer := -1) return Natural
is
c_items : aliased C_Poll_Item_Array (Entries'First .. Entries'Last);
c_items_ptr : constant access ZMQ_Thin.zmq_pollitem_t := c_items (c_items'First)'Access;
c_nitems : constant Interfaces.C.int := Interfaces.C.int (Entries'Length);
c_timeout : constant Interfaces.C.long := Interfaces.C.long (Timeout);
c_res : Interfaces.C.int;
begin
for I in Entries'Range loop
c_items (I) := Convert (Entries (I));
end loop;
c_res := ZMQ_Thin.zmq_poll (c_items_ptr, c_nitems, c_timeout);
if c_res < 0 then
Raise_Errno;
end if;
for I in Entries'Range loop
Transfer_Result (Entries (I), c_items (I));
end loop;
return Natural (c_res);
end Poll;
procedure Poll (Entries : in out Poll_Item_Array_Type; Timeout : Long_Long_Integer := -1)
is
Dummy : Natural;
begin
Dummy := Poll (Entries, Timeout);
end Poll;
-- Proxy
-- ------------------------------------------------------------------------
-- TODO, merge these? using the optional parameters?
procedure Proxy (Frontend : Socket_Type'Class; Backend : Socket_Type'Class; Capture : Socket_Type'Class := ZMQ.No_Socket)
is
c_res : Interfaces.C.int;
begin
c_res := ZMQ_Thin.zmq_proxy (Convert (Frontend), Convert (Backend), Convert (Capture));
-- proxy is expected to always return an error.
if c_res = 0 then
return;
else
Raise_Errno;
end if;
end Proxy;
procedure Proxy_Steerable (Frontend : Socket_Type'Class; Backend : Socket_Type'Class; Capture : Socket_Type'Class := ZMQ.No_Socket; Control : Socket_Type'Class := ZMQ.No_Socket)
is
c_res : Interfaces.C.int;
begin
c_res := ZMQ_Thin.zmq_proxy_steerable (Convert (Frontend), Convert (Backend), Convert (Capture), Convert (Control));
-- proxy_steerable can terminate cleanly
if c_res = 0 then
return;
else
Raise_Errno;
end if;
end Proxy_Steerable;
end ZMQ;
|
Ivy.Asm/boot/start.asm | HoloVector/PolarisOS | 3 | 169652 | start:
jmp start_program
nop
oemname db 'ETS'
bytespersector dw 512
sectorspercluster db 1
ressectors dw 1
numcopiesfat db 2
maxallocrootdir dw 224
maxsectors dw 2880 ;for 1.44 mbytes disk
mediadescriptor db 0f0h ;fd = 2 sides 18 sectors
sectorsperfat dw 9
sectorspertrack dw 18
heads dw 2
hiddensectors dd 0
hugesectors dd 0 ;if sectors > 65536
drivenumber db 0
db 0
bootsignature db 029h ;extended boot signature
volumeid dd 0 |
smsq/sbas/init.asm | olifink/smsqe | 0 | 92602 | <reponame>olifink/smsqe
; SBAS_INIT - Initialise SBASIC vars V2.02 1992 <NAME> QJUMP
section sbas
xdef sb_initv
xdef sb_initc
xref sb_resch
xref sb_inallc
xref sb_inchan
xref gu_achp0
xref uq_opcon
xref sb_job
xref sb_chk$heap
include 'dev8_keys_sys'
include 'dev8_keys_sbasic'
include 'dev8_keys_qdos_sms'
include 'dev8_keys_qlv'
include 'dev8_mac_assert'
;+++
; Initialise SBASIC variables area
; The SuperBASIC stub area is already set
;
; d0-d3 scratch
; a0/a1 scratch
; a6 cr pointer to base of Job / pointer to SBASIC variables
;---
sb_initv
sbi.skip equ $20
lea sbi.skip(a6),a1 ; clear data area
moveq #0,d0
move.w #(sb.jobsz-sbi.skip-sb.alstk)/4,d1 ; but do not bother with stack
sbi_clmem
move.l d0,(a1)+
dbra d1,sbi_clmem
lea sb_vars-sb_offs(a6),a6 ; from now on, this is the only a6
move.l #sb.flag,sb_flag(a6) ; flag it as genuine
moveq #4,d3 ; amount on stack
add.l a7,d3 ; base of stack
move.l #sb.prstl,sb_prstl(a6) ; limit of stack
sub.l a6,d3
move.l d3,sb_prstp(a6)
move.l d3,sb_prstb(a6) ; processor stack pointers!!!!
moveq #sms.info,d0
trap #do.smsq
move.l sys_sbab(a0),a0
move.l sb_offs+sb_qlibr(a0),sb_qlibr(a6) ; set QLIB pointer
lea sb_job,a0 ; base of job
move.l a0,sb_sbjob(a6) ; set it
lea sb_chk$heap,a0 ; heap checking patch
move.l a0,sb_chkhp(a6) ; set it
assert sb.edt,$ff
st sb_edt(a6) ; program not up to date
jmp sb_inallc ; initial allocation
;+++
; Initialise SBASIC Job 0 channels
;---
sb_initc
lea con0,a1
bsr.s sbi_open
lea con1,a1
bsr.s sbi_open
lea con2,a1
sbi_open ; $$redundant?
jsr uq_opcon ; open console
moveq #ch.len,d1
jsr sb_resch ; reserve channel space
move.l sb_chanp(a6),a2
jsr sb_inchan
move.l a2,sb_chanp(a6)
moveq #0,d0
rts
con0 dc.b 255,1,0,4
dc.w 512,52,0,204
con1 dc.b 255,1,2,7
dc.w 256,202,256,0
con2 dc.b 255,1,7,2
dc.w 256,202,0,0
end
|
programs/oeis/072/A072172.asm | neoneye/loda | 22 | 22801 | ; A072172: a(n) = (2*n+1)*5^(2*n+1).
; 5,375,15625,546875,17578125,537109375,15869140625,457763671875,12969970703125,362396240234375,10013580322265625,274181365966796875,7450580596923828125,201165676116943359375,5401670932769775390625,144354999065399169921875,3841705620288848876953125,101863406598567962646484375,2692104317247867584228515625,70940586738288402557373046875,1864464138634502887725830078125,48885340220294892787933349609375,1278976924368180334568023681640625,33395508580724708735942840576171875,870414851306122727692127227783203125
mul $0,2
add $0,1
mov $1,5
pow $1,$0
mul $1,$0
mov $0,$1
|
antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlLexer.g4 | RYH61/iotdb | 0 | 6981 | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
lexer grammar SqlLexer;
/**
* 1. Whitespace
*/
// Instead of discarding whitespace completely, send them to a channel invisable to the parser, so
// that the lexer could still produce WS tokens for the CLI's highlighter.
WS
:
[ \u000B\t\r\n]+ -> channel(HIDDEN)
;
/**
* 2. Keywords, new keywords should be added into IdentifierParser.g4
*/
// Common Keywords
ADD
: A D D
;
AFTER
: A F T E R
;
ALIAS
: A L I A S
;
ALIGN
: A L I G N
;
ALIGNED
: A L I G N E D
;
ALL
: A L L
;
ALTER
: A L T E R
;
ANY
: A N Y
;
APPEND
: A P P E N D
;
AS
: A S
;
ASC
: A S C
;
ATTRIBUTES
: A T T R I B U T E S
;
AUTOREGISTER
: A U T O R E G I S T E R
;
BEFORE
: B E F O R E
;
BEGIN
: B E G I N
;
BOUNDARY
: B O U N D A R Y
;
BY
: B Y
;
CACHE
: C A C H E
;
CHILD
: C H I L D
;
CLEAR
: C L E A R
;
CLUSTER
: C L U S T E R
;
CONCAT
: C O N C A T
;
CONFIGURATION
: C O N F I G U R A T I O N
;
CONTINUOUS
: C O N T I N U O U S
;
COUNT
: C O U N T
;
CONTAIN
: C O N T A I N
;
CQ
: C Q
;
CQS
: C Q S
;
CREATE
: C R E A T E
;
DEBUG
: D E B U G
;
DELETE
: D E L E T E
;
DESC
: D E S C
;
DESCRIBE
: D E S C R I B E
;
DEVICE
: D E V I C E
;
DEVICES
: D E V I C E S
;
DISABLE
: D I S A B L E
;
DROP
: D R O P
;
END
: E N D
;
EVERY
: E V E R Y
;
EXPLAIN
: E X P L A I N
;
FILL
: F I L L
;
FLUSH
: F L U S H
;
FOR
: F O R
;
FROM
: F R O M
;
FULL
: F U L L
;
FUNCTION
: F U N C T I O N
;
FUNCTIONS
: F U N C T I O N S
;
GLOBAL
: G L O B A L
;
GRANT
: G R A N T
;
GROUP
: G R O U P
;
INDEX
: I N D E X
;
INFO
: I N F O
;
INSERT
: I N S E R T
;
INTO
: I N T O
;
KILL
: K I L L
;
LABEL
: L A B E L
;
LAST
: L A S T
;
LATEST
: L A T E S T
;
LEVEL
: L E V E L
;
LIKE
: L I K E
;
LIMIT
: L I M I T
;
LINEAR
: L I N E A R
;
LINK
: L I N K
;
LIST
: L I S T
;
LOAD
: L O A D
;
LOCK
: L O C K
;
MERGE
: M E R G E
;
METADATA
: M E T A D A T A
;
NODES
: N O D E S
;
NOW
: N O W
;
OF
: O F
;
OFF
: O F F
;
OFFSET
: O F F S E T
;
ON
: O N
;
ORDER
: O R D E R
;
PARTITION
: P A R T I T I O N
;
PASSWORD
: <NAME>
;
PATHS
: P A T H S
;
PIPE
: P I P E
;
PIPES
: P I P E S
;
PIPESERVER
: P I P E S E R V E R
;
PIPESINK
: P I P E S I N K
;
PIPESINKS
: P I P E S I N K S
;
PIPESINKTYPE
: P I P E S I N K T Y P E
;
PREVIOUS
: P R E V I O U S
;
PREVIOUSUNTILLAST
: P R E V I O U S U N T I L L A S T
;
PRIVILEGES
: P R I V I L E G E S
;
PROCESSLIST
: P R O C E S S L I S T
;
PROPERTY
: P R O P E R T Y
;
PRUNE
: P R U N E
;
QUERIES
: Q U E R I E S
;
QUERY
: Q U E R Y
;
READONLY
: R E A D O N L Y
;
REGEXP
: R E G E X P
;
REMOVE
: R E M O V E
;
RENAME
: R E N A M E
;
RESAMPLE
: R E S A M P L E
;
RESOURCE
: R E S O U R C E
;
REVOKE
: R E V O K E
;
ROLE
: R O L E
;
ROOT
: R O O T
;
SCHEMA
: S C H E M A
;
SELECT
: S E L E C T
;
SET
: S E T
;
SETTLE
: S E T T L E
;
SGLEVEL
: S G L E V E L
;
SHOW
: S H O W
;
SLIMIT
: S L I M I T
;
SOFFSET
: S O F F S E T
;
STORAGE
: S T O R A G E
;
START
: S T A R T
;
STOP
: S T O P
;
SYSTEM
: S Y S T E M
;
TAGS
: T A G S
;
TASK
: T A S K
;
TEMPLATE
: T E M P L A T E
;
TEMPLATES
: T E M P L A T E S
;
TIME
: T I M E
;
TIMESERIES
: T I M E S E R I E S
;
TIMESTAMP
: T I M E S T A M P
;
TO
: T O
;
TOLERANCE
: T O L E R A N C E
;
TOP
: T O P
;
TRACING
: T R A C I N G
;
TRIGGER
: T R I G G E R
;
TRIGGERS
: T R I G G E R S
;
TTL
: T T L
;
UNLINK
: U N L I N K
;
UNLOAD
: U N L O A D
;
UNSET
: U N S E T
;
UPDATE
: U P D A T E
;
UPSERT
: U P S E R T
;
USER
: U S E R
;
USING
: U S I N G
;
VALUES
: V A L U E S
;
VERIFY
: V E R I F Y
;
VERSION
: V E R S I O N
;
WATERMARK_EMBEDDING
: W A T E R M A R K '_' E M B E D D I N G
;
WHERE
: W H E R E
;
WITH
: W I T H
;
WITHOUT
: W I T H O U T
;
WRITABLE
: W R I T A B L E
;
// Privileges Keywords
PRIVILEGE_VALUE
: SET_STORAGE_GROUP | DELETE_STORAGE_GROUP
| CREATE_TIMESERIES | INSERT_TIMESERIES | READ_TIMESERIES | DELETE_TIMESERIES
| CREATE_USER | DELETE_USER | MODIFY_PASSWORD | LIST_USER
| GRANT_USER_PRIVILEGE | REVOKE_USER_PRIVILEGE | GRANT_USER_ROLE | REVOKE_USER_ROLE
| CREATE_ROLE | DELETE_ROLE | LIST_ROLE | GRANT_ROLE_PRIVILEGE | REVOKE_ROLE_PRIVILEGE
| CREATE_FUNCTION | DROP_FUNCTION | CREATE_TRIGGER | DROP_TRIGGER | START_TRIGGER | STOP_TRIGGER
| CREATE_CONTINUOUS_QUERY | DROP_CONTINUOUS_QUERY
;
SET_STORAGE_GROUP
: S E T '_' S T O R A G E '_' G R O U P
;
DELETE_STORAGE_GROUP
: D E L E T E '_' S T O R A G E '_' G R O U P
;
CREATE_TIMESERIES
: C R E A T E '_' T I M E S E R I E S
;
INSERT_TIMESERIES
: I N S E R T '_' T I M E S E R I E S
;
READ_TIMESERIES
: R E A D '_' T I M E S E R I E S
;
DELETE_TIMESERIES
: D E L E T E '_' T I M E S E R I E S
;
CREATE_USER
: C R E A T E '_' U S E R
;
DELETE_USER
: D E L E T E '_' U S E R
;
MODIFY_PASSWORD
: M O D I F Y '_' P A S S W O R D
;
LIST_USER
: L I S T '_' U S E R
;
GRANT_USER_PRIVILEGE
: G R A N T '_' U S E R '_' P R I V I L E G E
;
REVOKE_USER_PRIVILEGE
: R E V O K E '_' U S E R '_' P R I V I L E G E
;
GRANT_USER_ROLE
: G R A N T '_' U S E R '_' R O L E
;
REVOKE_USER_ROLE
: R E V O K E '_' U S E R '_' R O L E
;
CREATE_ROLE
: C R E A T E '_' R O L E
;
DELETE_ROLE
: D E L E T E '_' R O L E
;
LIST_ROLE
: L I S T '_' R O L E
;
GRANT_ROLE_PRIVILEGE
: G R A N T '_' R O L E '_' P R I V I L E G E
;
REVOKE_ROLE_PRIVILEGE
: R E V O K E '_' R O L E '_' P R I V I L E G E
;
CREATE_FUNCTION
: C R E A T E '_' F U N C T I O N
;
DROP_FUNCTION
: D R O P '_' F U N C T I O N
;
CREATE_TRIGGER
: C R E A T E '_' T R I G G E R
;
DROP_TRIGGER
: D R O P '_' T R I G G E R
;
START_TRIGGER
: S T A R T '_' T R I G G E R
;
STOP_TRIGGER
: S T O P '_' T R I G G E R
;
CREATE_CONTINUOUS_QUERY
: C R E A T E '_' C O N T I N U O U S '_' Q U E R Y
;
DROP_CONTINUOUS_QUERY
: D R O P '_' C O N T I N U O U S '_' Q U E R Y
;
SCHEMA_REPLICATION_FACTOR
: S C H E M A '_' R E P L I C A T I O N '_' F A C T O R
;
DATA_REPLICATION_FACTOR
: D A T A '_' R E P L I C A T I O N '_' F A C T O R
;
TIME_PARTITION_INTERVAL
: T I M E '_' P A R T I T I O N '_' I N T E R V A L
;
/**
* 3. Operators
*/
// Operators. Arithmetics
MINUS : '-';
PLUS : '+';
DIV : '/';
MOD : '%';
// Operators. Comparation
OPERATOR_DEQ : '==';
OPERATOR_SEQ : '=';
OPERATOR_GT : '>';
OPERATOR_GTE : '>=';
OPERATOR_LT : '<';
OPERATOR_LTE : '<=';
OPERATOR_NEQ : '!=' | '<>';
OPERATOR_IN : I N;
OPERATOR_AND
: A N D
| '&'
| '&&'
;
OPERATOR_OR
: O R
| '|'
| '||'
;
OPERATOR_NOT
: N O T | '!'
;
OPERATOR_CONTAINS
: C O N T A I N S
;
/**
* 4. Constructors Symbols
*/
DOT : '.';
COMMA : ',';
SEMI: ';';
STAR: '*';
DOUBLE_STAR: '**';
LR_BRACKET : '(';
RR_BRACKET : ')';
LS_BRACKET : '[';
RS_BRACKET : ']';
/**
* 5. Literals
*/
// String Literal
STRING_LITERAL
: DQUOTA_STRING
| SQUOTA_STRING
;
// Date & Time Literal
DURATION_LITERAL
: (INTEGER_LITERAL+ (Y|M O|W|D|H|M|S|M S|U S|N S))+
;
DATETIME_LITERAL
: DATE_LITERAL ((T | WS) TIME_LITERAL (('+' | '-') INTEGER_LITERAL ':' INTEGER_LITERAL)?)?
;
fragment DATE_LITERAL
: INTEGER_LITERAL '-' INTEGER_LITERAL '-' INTEGER_LITERAL
| INTEGER_LITERAL '/' INTEGER_LITERAL '/' INTEGER_LITERAL
| INTEGER_LITERAL '.' INTEGER_LITERAL '.' INTEGER_LITERAL
;
fragment TIME_LITERAL
: INTEGER_LITERAL ':' INTEGER_LITERAL ':' INTEGER_LITERAL (DOT INTEGER_LITERAL)?
;
// Number Literal
INTEGER_LITERAL
: DEC_DIGIT+
;
EXPONENT_NUM_PART
: DEC_DIGIT+ ('e'|'E') ('+'|'-')? DEC_DIGIT+
;
fragment DEC_DIGIT
: [0-9]
;
// Boolean Literal
BOOLEAN_LITERAL
: T R U E
| F A L S E
;
// Other Literals
NULL_LITERAL
: N U L L
;
NAN_LITERAL
: N A N
;
/**
* 6. ID
*/
ID
: NAME_CHAR+
;
QUOTED_ID
: BQUOTA_STRING
;
fragment NAME_CHAR
: 'A'..'Z'
| 'a'..'z'
| '0'..'9'
| '_'
| ':'
| '@'
| '#'
| '$'
| '{'
| '}'
| CN_CHAR
;
fragment CN_CHAR
: '\u2E80'..'\u9FFF'
;
fragment DQUOTA_STRING
: '"' ( '\\'. | '""' | ~('"') )* '"'
;
fragment SQUOTA_STRING
: '\'' ( '\\'. | '\'\'' |~('\'') )* '\''
;
fragment BQUOTA_STRING
: '`' ( '\\' ~('`') | '``' | ~('`') )* '`'
;
// Characters and write it this way for case sensitivity
fragment A: [aA];
fragment B: [bB];
fragment C: [cC];
fragment D: [dD];
fragment E: [eE];
fragment F: [fF];
fragment G: [gG];
fragment H: [hH];
fragment I: [iI];
fragment J: [jJ];
fragment K: [kK];
fragment L: [lL];
fragment M: [mM];
fragment N: [nN];
fragment O: [oO];
fragment P: [pP];
fragment Q: [qQ];
fragment R: [rR];
fragment S: [sS];
fragment T: [tT];
fragment U: [uU];
fragment V: [vV];
fragment W: [wW];
fragment X: [xX];
fragment Y: [yY];
fragment Z: [zZ]; |
source/oasis/program-elements-formal_unconstrained_array_types.ads | reznikmm/gela | 0 | 30421 | -- SPDX-FileCopyrightText: 2019 <NAME> <<EMAIL>>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Program.Elements.Formal_Type_Definitions;
with Program.Lexical_Elements;
with Program.Elements.Expressions;
with Program.Elements.Component_Definitions;
package Program.Elements.Formal_Unconstrained_Array_Types is
pragma Pure (Program.Elements.Formal_Unconstrained_Array_Types);
type Formal_Unconstrained_Array_Type is
limited interface
and Program.Elements.Formal_Type_Definitions.Formal_Type_Definition;
type Formal_Unconstrained_Array_Type_Access is
access all Formal_Unconstrained_Array_Type'Class with Storage_Size => 0;
not overriding function Index_Subtypes
(Self : Formal_Unconstrained_Array_Type)
return not null Program.Elements.Expressions.Expression_Vector_Access
is abstract;
not overriding function Component_Definition
(Self : Formal_Unconstrained_Array_Type)
return not null Program.Elements.Component_Definitions
.Component_Definition_Access is abstract;
type Formal_Unconstrained_Array_Type_Text is limited interface;
type Formal_Unconstrained_Array_Type_Text_Access is
access all Formal_Unconstrained_Array_Type_Text'Class
with Storage_Size => 0;
not overriding function To_Formal_Unconstrained_Array_Type_Text
(Self : in out Formal_Unconstrained_Array_Type)
return Formal_Unconstrained_Array_Type_Text_Access is abstract;
not overriding function Array_Token
(Self : Formal_Unconstrained_Array_Type_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function Left_Bracket_Token
(Self : Formal_Unconstrained_Array_Type_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function Right_Bracket_Token
(Self : Formal_Unconstrained_Array_Type_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function Of_Token
(Self : Formal_Unconstrained_Array_Type_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
end Program.Elements.Formal_Unconstrained_Array_Types;
|
core/src/main/resources/eu/mihosoft/vmf/vmftext/antlr/TypeMapping.g4 | miho/VMF-Text | 9 | 4681 | grammar TypeMapping;
typeMappingCode: typemappings+=typeMapping* ;
typeMapping:
'TypeMap' '(' (applyTo+=Identifier (',' applyTo+=Identifier)*)? ')' '{'
entries+=mapping*
'}'
;
mapping:
'('? ('rule:')? ruleName=Identifier '->' ('type:')? typeName=javaType ')'? ('via'|'=')
(
('('|'{')
('toType' ':')? stringToTypeCode = STRING_SINGLE ',' ('toString' ':')? typeToStringCode = STRING_SINGLE (',' + ('default' ':')? defaultCode = STRING_SINGLE)?
(')'|'}')
|
('('|'{')
stringToTypeCode = STRING_SINGLE
(')'|'}')
|
('toType' ':')? stringToTypeCode = STRING_SINGLE
)
;
javaType
: JavaIdentifier '[' ']'
| JavaIdentifier typeArguments
| JavaIdentifier
;
typeBound
: 'extends' javaType
| 'extends' javaType additionalBound*
;
additionalBound
: '&' javaType
;
typeArguments
: '<' typeArgumentList '>'
;
typeArgumentList
: typeArgument (',' typeArgument)*
;
typeArgument
: javaType
| wildcard
;
wildcard
: '?' wildcardBounds?
;
wildcardBounds
: 'extends' javaType
| 'super' javaType
;
// ANTLR
JavaIdentifier : Identifier ('.' Identifier)+
;
// Derived from ANTR4 grammar (we use the same Identifier for rules and Java classes)
Identifier: NameStartChar NameChar*
;
STRING_DOUBLE: '"' (~["\\\r\n] | ESCAPE_SEQUENCE)* '"';
STRING_SINGLE: '\'' (~['\\\r\n] | ESCAPE_SEQUENCE)* '\'';
fragment ESCAPE_SEQUENCE
: '\\' [btnfr"\\]
;
fragment
NameChar
: NameStartChar
| '0'..'9'
| '_'
| '\u00B7'
| '\u0300'..'\u036F'
| '\u203F'..'\u2040'
;
fragment
NameStartChar
: 'A'..'Z' | 'a'..'z'
| '\u00C0'..'\u00D6'
| '\u00D8'..'\u00F6'
| '\u00F8'..'\u02FF'
| '\u0370'..'\u037D'
| '\u037F'..'\u1FFF'
| '\u200C'..'\u200D'
| '\u2070'..'\u218F'
| '\u2C00'..'\u2FEF'
| '\u3001'..'\uD7FF'
| '\uF900'..'\uFDCF'
| '\uFDF0'..'\uFFFD'
;
//
// Whitespace and comments
//
WS : [ \t\r\n]+ -> skip
;
COMMENT
: '/*' .*? '*/' -> channel(HIDDEN)
;
LINE_COMMENT
: '//' ~[\r\n]* -> channel(HIDDEN)
; |
list_next_meeting.scpt | digitalsushi/applescript_show_next_outlook_meeting | 1 | 2233 | #!/usr/bin/osascript
-- This script will output a terse string
-- indicating when your next meeting is occuring, and
-- also where. This could be useful for many reasons.
-- I use this inside a tmux info pane so that I can focus
-- on a terminal window without missing a meeting alert.
on replace(A, B, theText)
set {TID, AppleScript'stext item delimiters} to {AppleScript'stext item delimiters, {A}}
set {theTextItems, AppleScript'stext item delimiters} to {text items of theText, {B}}
set {theText, AppleScript'stext item delimiters} to {theTextItems as text, TID}
return theText
end replace
set Cals2Check to "Calendar"
set curdate to current date
set outsidedate to (curdate + 43200) --The number at the end determines how many seconds to look into the future for a meeting
set delims to AppleScript's text item delimiters
if Cals2Check contains ", " then
set AppleScript's text item delimiters to {", "}
else
set AppleScript's text item delimiters to {","}
end if
set caltitles to every text item of Cals2Check
set AppleScript's text item delimiters to delims
tell application "Microsoft Outlook"
--We need to get the ID of each calendar, as the names are not always unique (this may be an issue with mounted shared calendars)
set calIDs to {}
repeat with i from 1 to number of items in caltitles
set caltitle to item i of caltitles
set calIDs to calIDs & (id of every calendar whose name is caltitle)
end repeat
--Now we get a list of events from each of the calendar that match our time criteria
set calEvents to {}
repeat with i from 1 to number of items in calIDs
set CalID to item i of calIDs
tell (calendar id CalID)
set calEvents to calEvents & (every calendar event whose (start time > (curdate - 300)) and (start time < (outsidedate)))
end tell
end repeat
--we grab the "next" calendar event
set nextEventTitle to {}
repeat with i from 1 to number of items in calEvents
if nextEventTitle is {} then
set nextEventTitle to item i of calEvents
else
if start time of item i of calEvents is less than start time of item 1 of nextEventTitle then
set nextEventTitle to item i of calEvents
end if
end if
end repeat
if nextEventTitle is not {} then
set MeetingLocation to location of item 1 of nextEventTitle
if MeetingLocation is missing value then
set MeetingLocation to "?"
end if
set MeetingTitle to subject of item 1 of nextEventTitle
set MeetingStartDate to start time of item 1 of nextEventTitle
set MeetingStartTime to time string of MeetingStartDate
set revisedTime to MeetingStartTime as string
set myAMPM to text -1 thru -3 of revisedTime
set revisedTime to text 1 thru -7 of revisedTime
set cleanLocation to my replace("ConfRm_","",MeetingLocation)
set cleanLocation to my replace(" (Rangeway)","",cleanLocation)
return MeetingTitle & "->" & cleanLocation & "@" & revisedTime
else
return "No meeting in the time frame specified"
end if
end tell
|
cmd/print/print_rm.asm | minblock/msdos | 0 | 245805 | <reponame>minblock/msdos<filename>cmd/print/print_rm.asm
page 60,132
;/*
; * Microsoft Confidential
; * Copyright (C) Microsoft Corporation 1991
; * All Rights Reserved.
; */
; $SALUT (4,25,30,41)
INCLUDE pridefs.INC
BREAK <Resident Portion Messages>
;
; DOS PRINT
;
; Resident Portion Messages
;
; 02/15/84 MAU Created as a separate link module
; from the include file. should
; always be linked first!!
;
; 05/20/87 FJG Change format to new Message Service
; Routines
;
CodeR Segment public para
ASSUME CS:CodeR,DS:nothing,ES:nothing,SS:nothing
public R_MES_BUFF
;--------------------------------------
;INT 24 messages A La COMMAND
;--------------------------------------
R_MES_BUFF LABEL WORD ; Room is generated for:
db 512 dup(?) ; ERR0
; ERR1
; ERR2
; ERR3
; ERR4
; ERR5
; ERR6
; ERR7
; ERR8
; ERR9
; ERR10
; ERR11
; ERR12
;
CodeR EndS
End
|
programs/oeis/304/A304273.asm | neoneye/loda | 22 | 92390 | ; A304273: The concatenation of the first n terms is the smallest positive even number with n digits when written in base 3/2 (cf. A024629).
; 2,1,0,1,1,0,0,0,1,1,0,1,0,0,1,1,0,1,0,1,0,0,1,1,0,1,0,0,1,0,1,0,0,0,0,0,1,1,0,1,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,0,1,1,0,1,0,1,0,0,1,0,0,1,1,1,1,0,1,1,0,1,1,1,1,1,1,0,1,0,0,0,0,0,1,1,0,1,1,0,1
lpb $0
mov $2,$0
mov $0,0
seq $2,205083 ; Parity of A070885.
sub $2,2
lpe
mov $0,$2
add $0,2
|
AVR/Speck64_128_FasterLowRAM.asm | openluopworld/simon-speck | 2 | 174635 | /*
* Speck64_128_FasterLowRAM.asm
*
* Created: 2015/6/10 20:41:07
* Author: LuoPeng
*/
.def currentRound = r16;
.def totalRound = r17;
.def zero = r18;
.dseg
plainText: .byte 8 ; the 8 bytes of plaintext, from high byte to low byte.
cipherText: .byte 8 ; the 8 bytes of ciphertext, from high byte to low byte.
.cseg
/*
* the main function
*/
main:
; plaintext: 3b726574 7475432d(0x)
; ciphertext shoud be:8c6fa548 454e028b(0x)
ldi r26, low(plainText);
ldi r27, high(plainText);
ldi r16, 0x3b;
st x+, r16;
ldi r16, 0x72;
st x+, r16;
ldi r16, 0x65;
st x+, r16;
ldi r16, 0x74;
st x+, r16;
ldi r16, 0x74;
st x+, r16;
ldi r16, 0x75;
st x+, r16;
ldi r16, 0x43;
st x+, r16;
ldi r16, 0x2d;
st x+, r16;
call encryption;
ret;
/*
* Subroutine: encryption
* Function: the faster low RAM implementation of Speck64/128
*
* The round keys are also in flash.
* Two rounds can be implemented without the use of the Move instruction at the final.
*/
encryption:
clr currentRound; the initial value is 0
ldi totalRound, 13; two rounds were done every time. So, loop count is 13(27/2) and a final loop is needed.
clr zero; the initial value is 0
; load plainText fromr RAM to registers.
ldi r26, low(plainText);
ldi r27, high(plainText);
ld r7, x+;
ld r6, x+;
ld r5, x+;
ld r4, x+;
ld r3, x+;
ld r2, x+;
ld r1, x+;
ld r0, x+;
ldi r30, low(keys<<1);
ldi r31, high(keys<<1);
loop:
// loop1
; load k: [r15, r14, r13, r12], r12 is the lowest byte
lpm r12, z+;
lpm r13, z+;
lpm r14, z+;
lpm r15, z+;
; x = S(8)( S(-8)(x) + y)
add r5, r0; x1 = x1 + y0
adc r6, r1; x2 = x2 + y1
adc r7, r2; x3 = x3 + y2
adc r4, r3; x0 = x0 + y3;
; k = ( S(-8)(x) + y ) eor k
eor r12, r5;
eor r13, r6;
eor r14, r7;
eor r15, r4;
; y = s(3)y
lsl r0; loop 1
rol r1;
rol r2;
rol r3;
adc r0, zero;
lsl r0; loop 2
rol r1;
rol r2;
rol r3;
adc r0, zero;
lsl r0; loop 3
rol r1;
rol r2;
rol r3;
adc r0, zero;
; y = S(3)(y) eor ( S(-8)(x) + y ) eor k
eor r0, r12;
eor r1, r13;
eor r2, r14;
eor r3, r15;
// loop 2
lpm r4, z+;
lpm r5, z+;
lpm r6, z+;
lpm r7, z+;
add r13, r0; x1 = x1 + y0
adc r14, r1; x2 = x2 + y1
adc r15, r2; x3 = x3 + y2
adc r12, r3; x0 = x0 + y3;
eor r4, r13;
eor r5, r14;
eor r6, r15;
eor r7, r12;
lsl r0; loop 1
rol r1;
rol r2;
rol r3;
adc r0, zero;
lsl r0; loop 2
rol r1;
rol r2;
rol r3;
adc r0, zero;
lsl r0; loop 3
rol r1;
rol r2;
rol r3;
adc r0, zero;
eor r0, r4;
eor r1, r5;
eor r2, r6;
eor r3, r7;
; finished?
inc currentRound;
cp currentRound, totalRound;
breq lastRound;
jmp loop;
lastRound:
/*
* the last round
*/
; load k: [r15, r14, r13, r12], r12 is the lowest byte
lpm r12, z+;
lpm r13, z+;
lpm r14, z+;
lpm r15, z+;
; x = S(8)( S(-8)(x) + y)
add r5, r0; x1 = x1 + y0
adc r6, r1; x2 = x2 + y1
adc r7, r2; x3 = x3 + y2
adc r4, r3; x0 = x0 + y3;
; k = ( S(-8)(x) + y ) eor k
eor r12, r5;
eor r13, r6;
eor r14, r7;
eor r15, r4;
; y = s(3)y
lsl r0; loop 1
rol r1;
rol r2;
rol r3;
adc r0, zero;
lsl r0; loop 2
rol r1;
rol r2;
rol r3;
adc r0, zero;
lsl r0; loop 3
rol r1;
rol r2;
rol r3;
adc r0, zero;
; y = S(3)(y) eor ( S(-8)(x) + y ) eor k
eor r0, r12;
eor r1, r13;
eor r2, r14;
eor r3, r15;
; move the value to X
; can be deleted, so store cipher text directly from [r15,r14,r13,r12]
movw r4, r12; r5:r4 = r13:r12
movw r6, r14; r7:r6 = r15:r14
/*st x+, r15;
st x+, r14;
st x+, r13;
st x+, r12;*/
st x+, r7;
st x+, r6;
st x+, r5;
st x+, r4;
st x+, r3;
st x+, r2;
st x+, r1;
st x+, r0;
ret;
; the 27*4 bytes of round keys
keys:
.db 0x00, 0x01, 0x02, 0x03;
.db 0x09, 0x03, 0x1d, 0x13;
.db 0x53, 0x0d, 0xd8, 0xbb;
.db 0xf3, 0x4d, 0x33, 0x0d;
.db 0x65, 0x35, 0xa4, 0x7f;
.db 0x55, 0xce, 0xe6, 0x67;
.db 0xd2, 0xb3, 0x8c, 0xe9;
.db 0xbd, 0x6c, 0xc7, 0xaa;
.db 0xc8, 0x51, 0x59, 0x7f;
.db 0xc2, 0x82, 0xfa, 0x03;
.db 0xad, 0x33, 0x35, 0x31;
.db 0x82, 0x08, 0xf7, 0xdf;
.db 0x93, 0x7c, 0x48, 0x9e;
.db 0x28, 0xb9, 0x34, 0xa9;
.db 0xf5, 0xde, 0x2e, 0xdd;
.db 0x8d, 0x38, 0xe6, 0x8b;
.db 0x89, 0x6b, 0x70, 0x1f;
.db 0xf8, 0xaa, 0x87, 0x2b;
.db 0x17, 0x6c, 0xd7, 0x12;
.db 0x6c, 0xcd, 0xac, 0x6e;
.db 0x12, 0xb9, 0x1a, 0x6a;
.db 0xca, 0x6b, 0xbc, 0x10;
.db 0x32, 0xdd, 0x57, 0x60;
.db 0x81, 0xb3, 0xc9, 0xd3;
.db 0x3d, 0x81, 0x47, 0xb3;
.db 0x35, 0x3c, 0x11, 0x8c;
.db 0x3a, 0x52, 0x6b, 0xfe; |
ruby/coroutine/win64/Context.asm | bkmgit/ruby-packer | 2,793 | 8408 | <gh_stars>1000+
;;
;; This file is part of the "Coroutine" project and released under the MIT License.
;;
;; Created by <NAME> on 10/5/2018.
;; Copyright, 2018, by <NAME>. All rights reserved.
;;
.code
coroutine_transfer proc
; Save the thread information block:
push qword ptr gs:[8]
push qword ptr gs:[16]
; Save caller registers:
push rbp
push rbx
push rdi
push rsi
push r12
push r13
push r14
push r15
movaps [rsp - 24], xmm6
movaps [rsp - 40], xmm7
movaps [rsp - 56], xmm8
movaps [rsp - 72], xmm9
movaps [rsp - 88], xmm10
movaps [rsp - 104], xmm11
movaps [rsp - 120], xmm12
movaps [rsp - 136], xmm13
movaps [rsp - 152], xmm14
movaps [rsp - 168], xmm15
; Save caller stack pointer:
mov [rcx], rsp
; Restore callee stack pointer:
mov rsp, [rdx]
movaps xmm15, [rsp - 168]
movaps xmm14, [rsp - 152]
movaps xmm13, [rsp - 136]
movaps xmm12, [rsp - 120]
movaps xmm11, [rsp - 104]
movaps xmm10, [rsp - 88]
movaps xmm9, [rsp - 72]
movaps xmm8, [rsp - 56]
movaps xmm7, [rsp - 40]
movaps xmm6, [rsp - 24]
; Restore callee stack:
pop r15
pop r14
pop r13
pop r12
pop rsi
pop rdi
pop rbx
pop rbp
; Restore the thread information block:
pop qword ptr gs:[16]
pop qword ptr gs:[8]
; Put the first argument into the return value:
mov rax, rcx
; We pop the return address and jump to it:
ret
coroutine_transfer endp
coroutine_trampoline proc
; Do not remove this. This forces 16-byte alignment when entering the coroutine.
ret
coroutine_trampoline endp
end
|
oeis/135/A135008.asm | neoneye/loda-programs | 11 | 83936 | ; A135008: Decimal expansion of 8/e.
; Submitted by <NAME>
; 2,9,4,3,0,3,5,5,2,9,3,7,1,5,3,8,5,7,2,7,6,4,1,9,0,1,6,1,2,9,1,6,8,6,9,3,9,5,6,6,4,8,9,0,4,8,2,5,4,1,4,2,6,7,6,0,6,2,6,9,4,4,1,3,5,7,9,6,9,1,9,6,5,9,5,9,1,9,8,4,2,6,8,5,7,1,7,8,1,9,4,7,6,7,3,5,7,1,4,9
bin $1,$0
mov $2,1
mov $3,$0
mul $3,4
lpb $3
add $5,$2
mov $1,$5
add $1,$5
add $2,$1
mul $1,2
sub $3,1
mul $5,$3
lpe
mul $1,2
mov $4,10
pow $4,$0
div $2,$4
div $1,$2
mov $0,$1
mod $0,10
|
Groups/Examples/Examples.agda | Smaug123/agdaproofs | 4 | 17261 | {-# OPTIONS --safe --warning=error --with-K #-}
open import Sets.EquivalenceRelations
open import Groups.Definition
open import Orders
open import Rings.Definition
open import Numbers.Integers.Integers
open import Numbers.Integers.Multiplication
open import Setoids.Setoids
open import LogicalFormulae
open import Sets.FinSet
open import Functions
open import Numbers.Naturals.Definition
open import Numbers.Naturals.Order
open import Numbers.Naturals.Semiring
open import Numbers.Naturals.WithK
open import Numbers.Modulo.Definition
open import Numbers.Modulo.Addition
open import Numbers.Modulo.Group
open import Rings.Examples.Examples
open import Numbers.Primes.PrimeNumbers
open import Groups.Lemmas
open import Groups.Homomorphisms.Definition
open import Groups.Homomorphisms.Lemmas
open import Groups.Isomorphisms.Definition
open import Groups.Cyclic.Definition
open import Groups.QuotientGroup.Definition
open import Groups.Subgroups.Definition
open import Groups.Subgroups.Normal.Definition
module Groups.Examples.Examples where
trivialGroup : Group (reflSetoid (FinSet 1)) λ _ _ → fzero
Group.+WellDefined trivialGroup _ _ = refl
Group.0G trivialGroup = fzero
Group.inverse trivialGroup _ = fzero
Group.+Associative trivialGroup = refl
Group.identRight trivialGroup {fzero} = refl
Group.identRight trivialGroup {fsucc ()}
Group.identLeft trivialGroup {fzero} = refl
Group.identLeft trivialGroup {fsucc ()}
Group.invLeft trivialGroup = refl
Group.invRight trivialGroup = refl
elementPowZ : (n : ℕ) → (elementPower ℤGroup (nonneg 1) (nonneg n)) ≡ nonneg n
elementPowZ zero = refl
elementPowZ (succ n) rewrite elementPowZ n = refl
ℤCyclic : CyclicGroup ℤGroup
CyclicGroup.generator ℤCyclic = nonneg 1
CyclicGroup.cyclic ℤCyclic {nonneg x} = (nonneg x , elementPowZ x)
CyclicGroup.cyclic ℤCyclic {negSucc x} = (negSucc x , ans)
where
ans : (Group.inverse ℤGroup ((nonneg 1) +Z elementPower ℤGroup (nonneg 1) (nonneg x))) ≡ negSucc x
ans rewrite elementPowZ x = refl
elementPowZn : (n : ℕ) → {pr : 0 <N succ (succ n)} → (power : ℕ) → (powerLess : power <N succ (succ n)) → {p : 1 <N succ (succ n)} → elementPower (ℤnGroup (succ (succ n)) pr) (record { x = 1 ; xLess = p }) (nonneg power) ≡ record { x = power ; xLess = powerLess }
elementPowZn n zero powerLess = equalityZn _ _ refl
elementPowZn n {pr} (succ power) powerLess {p} with TotalOrder.totality ℕTotalOrder (ℤn.x (elementPower (ℤnGroup (succ (succ n)) pr) (record { x = 1 ; xLess = p }) (nonneg power))) (succ n)
elementPowZn n {pr} (succ power) powerLess {p} | inl (inl x) = equalityZn _ _ (applyEquality succ v)
where
t : elementPower (ℤnGroup (succ (succ n)) pr) (record { x = 1 ; xLess = succPreservesInequality (succIsPositive n) }) (nonneg power) ≡ record { x = power ; xLess = PartialOrder.<Transitive (TotalOrder.order ℕTotalOrder) (a<SuccA power) powerLess }
t = elementPowZn n {pr} power (PartialOrder.<Transitive (TotalOrder.order ℕTotalOrder) (a<SuccA power) powerLess) {succPreservesInequality (succIsPositive n)}
u : elementPower (ℤnGroup (succ (succ n)) pr) (record { x = 1 ; xLess = p }) (nonneg power) ≡ record { x = power ; xLess = PartialOrder.<Transitive (TotalOrder.order ℕTotalOrder) (a<SuccA power) powerLess }
u rewrite <NRefl p (succPreservesInequality (succIsPositive n)) = t
v : ℤn.x (elementPower (ℤnGroup (succ (succ n)) pr) (record { x = 1 ; xLess = p }) (nonneg power)) ≡ power
v rewrite u = refl
elementPowZn n {pr} (succ power) powerLess {p} | inl (inr x) with elementPower (ℤnGroup (succ (succ n)) pr) (record { x = 1 ; xLess = p }) (nonneg power)
elementPowZn n {pr} (succ power) powerLess {p} | inl (inr x) | record { x = x' ; xLess = xLess } = exFalso (noIntegersBetweenXAndSuccX _ x xLess)
elementPowZn n {pr} (succ power) powerLess {p} | inr x with inspect (elementPower (ℤnGroup (succ (succ n)) pr) (record { x = 1 ; xLess = p }) (nonneg power))
elementPowZn n {pr} (succ power) powerLess {p} | inr x | record { x = x' ; xLess = p' } with≡ inspected rewrite elementPowZn n {pr} power (PartialOrder.<Transitive (TotalOrder.order ℕTotalOrder) (a<SuccA power) powerLess) {p} | x = exFalso (PartialOrder.irreflexive (TotalOrder.order ℕTotalOrder) powerLess)
ℤnCyclic : (n : ℕ) → (pr : 0 <N n) → CyclicGroup (ℤnGroup n pr)
ℤnCyclic zero ()
CyclicGroup.generator (ℤnCyclic (succ zero) pr) = record { x = 0 ; xLess = pr }
CyclicGroup.cyclic (ℤnCyclic (succ zero) pr) {record { x = zero ; xLess = xLess }} rewrite <NRefl xLess (succIsPositive 0) | <NRefl pr (succIsPositive 0) = (nonneg 0 , refl)
CyclicGroup.cyclic (ℤnCyclic (succ zero) _) {record { x = succ x ; xLess = xLess }} = exFalso (zeroNeverGreater (canRemoveSuccFrom<N xLess))
ℤnCyclic (succ (succ n)) pr = record { generator = record { x = 1 ; xLess = succPreservesInequality (succIsPositive n) } ; cyclic = λ {x} → ans x }
where
ans : (z : ℤn (succ (succ n)) pr) → Sg ℤ (λ i → (elementPower (ℤnGroup (succ (succ n)) pr) (record { x = 1 ; xLess = succPreservesInequality (succIsPositive n) }) i) ≡ z)
ans record { x = x ; xLess = xLess } = nonneg x , elementPowZn n x xLess
multiplyByNHom : (n : ℕ) → GroupHom ℤGroup ℤGroup (λ i → i *Z nonneg n)
GroupHom.groupHom (multiplyByNHom n) {x} {y} = lemma1
where
open Setoid (reflSetoid ℤ)
open Group ℤGroup
lemma : nonneg n *Z (x +Z y) ≡ (nonneg n) *Z x +Z nonneg n *Z y
lemma = Ring.*DistributesOver+ ℤRing {nonneg n} {x} {y}
lemma1 : (x +Z y) *Z nonneg n ≡ x *Z nonneg n +Z y *Z nonneg n
lemma1 rewrite Ring.*Commutative ℤRing {x +Z y} {nonneg n} | Ring.*Commutative ℤRing {x} {nonneg n} | Ring.*Commutative ℤRing {y} {nonneg n} = lemma
GroupHom.wellDefined (multiplyByNHom n) {x} {.x} refl = refl
modNExampleGroupHom : (n : ℕ) → (pr : 0 <N n) → GroupHom ℤGroup (ℤnGroup n pr) (mod n pr)
GroupHom.groupHom (modNExampleGroupHom n 0<n) {x} {y} = {!!}
GroupHom.wellDefined (modNExampleGroupHom n 0<n) {x} {.x} refl = refl
intoZn : {n : ℕ} → {pr : 0 <N n} → (x : ℕ) → (x<n : x <N n) → mod n pr (nonneg x) ≡ record { x = x ; xLess = x<n }
intoZn {zero} {()}
intoZn {succ n} {0<n} x x<n with divisionAlg (succ n) x
intoZn {succ n} {0<n} x x<n | record { quot = quot ; rem = rem ; pr = pr ; remIsSmall = inl y ; quotSmall = quotSmall } = equalityZn _ _ (modIsUnique (record { quot = quot ; rem = rem ; pr = pr ; remIsSmall = inl y ; quotSmall = quotSmall }) (record { quot = 0 ; rem = x ; pr = ans ; remIsSmall = inl x<n ; quotSmall = inl (succIsPositive n)}))
where
ans : n *N 0 +N x ≡ x
ans rewrite multiplicationNIsCommutative n 0 = refl
intoZn {succ n} {0<n} x x<n | record { quot = quot ; rem = rem ; pr = pr ; remIsSmall = inr () ; quotSmall = quotSmall }
quotientZn : (n : ℕ) → (pr : 0 <N n) → GroupIso (quotientGroupByHom ℤGroup (modNExampleGroupHom n pr)) (ℤnGroup n pr) (mod n pr)
GroupHom.groupHom (GroupIso.groupHom (quotientZn n pr)) = GroupHom.groupHom (modNExampleGroupHom n pr)
GroupHom.wellDefined (GroupIso.groupHom (quotientZn n pr)) {x} {y} x~y = need
where
given : mod n pr (x +Z (Group.inverse ℤGroup y)) ≡ record { x = 0 ; xLess = pr }
given = x~y
given' : (mod n pr x) +n (mod n pr (Group.inverse ℤGroup y)) ≡ record { x = 0 ; xLess = pr }
given' = transitivity (equalityCommutative (GroupHom.groupHom (modNExampleGroupHom n pr))) given
given'' : (mod n pr x) +n Group.inverse (ℤnGroup n pr) (mod n pr y) ≡ record { x = 0 ; xLess = pr}
given'' = transitivity (applyEquality (λ i → mod n pr x +n i) (equalityCommutative (homRespectsInverse (modNExampleGroupHom n pr)))) given'
need : mod n pr x ≡ mod n pr y
need = transferToRight (ℤnGroup n pr) given''
SetoidInjection.wellDefined (SetoidBijection.inj (GroupIso.bij (quotientZn n pr))) {x} {y} x=y = {!!}
SetoidSurjection.wellDefined (SetoidBijection.surj (GroupIso.bij (quotientZn n pr))) {x} {y} = SetoidInjection.wellDefined (SetoidBijection.inj (GroupIso.bij (quotientZn n pr))) {x} {y}
SetoidInjection.injective (SetoidBijection.inj (GroupIso.bij (quotientZn n pr))) {x} {y} fx~fy = need
where
given : mod n pr x +n Group.inverse (ℤnGroup n pr) (mod n pr y) ≡ record { x = 0 ; xLess = pr }
given = transferToRight'' (ℤnGroup n pr) fx~fy
given' : mod n pr (x +Z (Group.inverse ℤGroup y)) ≡ record { x = 0 ; xLess = pr }
given' = identityOfIndiscernablesLeft _≡_ given (equalityCommutative (transitivity (GroupHom.groupHom (modNExampleGroupHom n pr) {x}) (applyEquality (λ i → mod n pr x +n i) (homRespectsInverse (modNExampleGroupHom n pr)))))
need' : (mod n pr x) +n (mod n pr (Group.inverse ℤGroup y)) ≡ record { x = 0 ; xLess = pr }
need' rewrite equalityCommutative (GroupHom.groupHom (modNExampleGroupHom n pr) {x} {Group.inverse ℤGroup y}) = given'
need : mod n pr (x +Z (Group.inverse ℤGroup y)) ≡ record { x = 0 ; xLess = pr}
need = identityOfIndiscernablesLeft _≡_ need' (equalityCommutative (GroupHom.groupHom (modNExampleGroupHom n pr)))
SetoidSurjection.surjective (SetoidBijection.surj (GroupIso.bij (quotientZn n pr))) {record { x = x ; xLess = xLess }} = nonneg x , intoZn x xLess
trivialGroupHom : {a b : _} {A : Set a} {S : Setoid {a} {b} A} {_+_ : A → A → A} (G : Group S _+_) → GroupHom trivialGroup G (λ _ → Group.0G G)
GroupHom.groupHom (trivialGroupHom {S = S} G) = symmetric identRight
where
open Setoid S
open Group G
open Equivalence eq
GroupHom.wellDefined (trivialGroupHom {S = S} G) _ = Equivalence.reflexive (Setoid.eq S)
|
newitems/general/tables.asm | fcard/z3randomizer | 0 | 175929 | ; Properties for sprites for new items:
; 000000BF
; |||||||'--1 = Is Fire / 0 = Isn't Fire
; ||||||'---1 = Is Bomb / 0 = Isn't Bomb
; |||||'----Unused
; ||||'-----Unused
; |||'------Unused
; ||'-------Unused
; |'--------Unused
; '---------Unused
SpecialSpriteProperties:
; 0x00-0x0F
db $00, $00, $00, $00
db $00, $00, $00, $00
db $00, $00, $00, $00
db $00, $00, $00, $00
; 0x10-0x1F
db $00, $00, $00, $00
db $00, $00, $00, $00
db $00, $00, $00, $00
db $00, $00, $00, $00
; 0x20-0x2F
db $00, $00, $00, $00
db $00, $00, $00, $00
db $00, $00, $00, $00
db $00, $00, $00, $00
; 0x30-0x3F
db $00, $00, $00, $00
db $00, $00, $00, $00
db $00, $00, $00, $00
db $00, $00, $00, $00
; 0x40-0x4F
db $00, $00, $00, $00
db $00, $00, $00, $00
db $00, $00, $02, $00 ; ??, ??, Bomb
db $00, $00, $00, $00
; 0x50-0x5F
db $00, $00, $00, $00
db $00, $01, $00, $00 ; ??, Fireball
db $00, $00, $00, $00
db $00, $00, $00, $00
; 0x60-0x6F
db $00, $01, $00, $00 ; ??, Beamos Laser
db $00, $00, $00, $00
db $00, $00, $00, $00
db $00, $00, $00, $00
; 0x70-0x7F
db $01, $00, $00, $00 ; helmasaur fireball
db $00, $00, $00, $00
db $00, $00, $00, $00
db $00, $00, $01, $01 ; ??, ??, Guruguru Bar Clockwise, Guruguru Bar Counterclockwise
; 0x80-0x8F
db $01, $00, $00, $00 ; Winder
db $00, $00, $00, $01 ; ??, ??, ??, Kodongo's Fire
db $00, $00, $00, $00
db $00, $00, $00, $00
; 0x90-0x9F
db $00, $00, $00, $00
db $00, $00, $00, $00
db $00, $00, $00, $00
db $00, $00, $00, $00
; 0xA0-0xAF
db $00, $00, $00, $00
db $00, $00, $00, $00
db $00, $00, $00, $00
db $00, $00, $00, $00
; 0xB0-0xBF
db $00, $00, $00, $00
db $00, $00, $00, $00
db $00, $00, $00, $00
db $00, $00, $00, $00
; 0xC0-0xCF
db $00, $00, $00, $00
db $00, $00, $00, $00
db $00, $01, $00, $00 ; ??, ganon firebat
db $00, $00, $00, $00
; 0xD0-0xDF
db $00, $00, $00, $00
db $00, $00, $00, $00
db $00, $00, $00, $00
db $00, $00, $00, $00
; 0xE0-0xEF
db $00, $00, $00, $00
db $00, $00, $00, $00
db $00, $00, $00, $00
db $00, $00, $00, $00
; 0xF0-0xF5
db $00, $00, $00, $00
db $00, $00
!SpriteProp = $1CC0
SetSpriteProperties:
PHK : PLB
LDA SpecialSpriteProperties, Y : STA.l !SpriteProp, X
LDA $040A : LDY $1B ; thing we wrote over
RTL
|
P6/P6Judger - 100 testpoints/testpoint/testpoint95.asm | flyinglandlord/BUAA-CO-2021 | 5 | 18322 | <gh_stars>1-10
ori $1, $0, 0
ori $2, $0, 8
ori $3, $0, 14
ori $4, $0, 7
sw $3, 0($0)
sw $3, 4($0)
sw $1, 8($0)
sw $1, 12($0)
sw $2, 16($0)
sw $1, 20($0)
sw $3, 24($0)
sw $3, 28($0)
sw $1, 32($0)
sw $3, 36($0)
sw $3, 40($0)
sw $3, 44($0)
sw $4, 48($0)
sw $3, 52($0)
sw $2, 56($0)
sw $3, 60($0)
sw $1, 64($0)
sw $1, 68($0)
sw $1, 72($0)
sw $1, 76($0)
sw $1, 80($0)
sw $2, 84($0)
sw $1, 88($0)
sw $1, 92($0)
sw $1, 96($0)
sw $4, 100($0)
sw $2, 104($0)
sw $1, 108($0)
sw $4, 112($0)
sw $2, 116($0)
sw $3, 120($0)
sw $1, 124($0)
mflo $1
mthi $2
mult $1, $1
slti $3, $2, 10
TAG1:
multu $3, $3
bgez $3, TAG2
mtlo $3
beq $3, $3, TAG2
TAG2:
mtlo $3
lb $3, 0($3)
lui $4, 9
mult $4, $3
TAG3:
bltz $4, TAG4
sll $0, $0, 0
bgez $4, TAG4
sll $0, $0, 0
TAG4:
mthi $4
mfhi $1
beq $1, $4, TAG5
mthi $1
TAG5:
sltiu $3, $1, 11
bltz $1, TAG6
sll $0, $0, 0
sb $3, 0($3)
TAG6:
mtlo $3
bltz $3, TAG7
xori $4, $3, 10
lh $2, 0($3)
TAG7:
multu $2, $2
bgtz $2, TAG8
andi $4, $2, 4
mthi $2
TAG8:
mfhi $4
mfhi $1
lui $3, 5
sll $0, $0, 0
TAG9:
sub $3, $4, $4
multu $4, $3
mfhi $1
bne $4, $3, TAG10
TAG10:
lbu $2, 0($1)
mthi $1
mult $1, $1
subu $3, $1, $2
TAG11:
sh $3, 0($3)
lui $4, 15
sll $0, $0, 0
lui $1, 15
TAG12:
divu $1, $1
sltu $1, $1, $1
blez $1, TAG13
lui $3, 4
TAG13:
bltz $3, TAG14
mfhi $2
mflo $4
multu $3, $2
TAG14:
lui $4, 4
multu $4, $4
sll $0, $0, 0
bne $4, $4, TAG15
TAG15:
sltiu $3, $4, 8
sllv $4, $4, $3
lhu $4, 0($3)
lhu $4, 0($3)
TAG16:
sw $4, 0($4)
sh $4, 0($4)
mflo $4
lh $2, 0($4)
TAG17:
lui $4, 13
lh $2, 0($2)
mflo $4
addiu $4, $4, 1
TAG18:
divu $4, $4
mult $4, $4
sb $4, 0($4)
lb $2, 0($4)
TAG19:
srav $1, $2, $2
mflo $2
beq $2, $2, TAG20
mfhi $3
TAG20:
sub $4, $3, $3
mult $4, $4
mult $3, $4
bgez $4, TAG21
TAG21:
lui $4, 11
lui $4, 15
sll $0, $0, 0
or $2, $4, $4
TAG22:
sll $0, $0, 0
lui $2, 1
sltu $3, $2, $2
multu $2, $3
TAG23:
lui $1, 6
bltz $3, TAG24
ori $4, $3, 2
lui $3, 10
TAG24:
sll $0, $0, 0
mfhi $3
bgez $3, TAG25
sh $3, 0($3)
TAG25:
lw $4, 0($3)
mflo $2
mtlo $4
mult $4, $2
TAG26:
lw $2, 0($2)
beq $2, $2, TAG27
sra $2, $2, 7
mflo $3
TAG27:
multu $3, $3
sb $3, 0($3)
multu $3, $3
beq $3, $3, TAG28
TAG28:
slti $3, $3, 9
lbu $2, 0($3)
div $3, $3
sb $3, 0($3)
TAG29:
mthi $2
beq $2, $2, TAG30
mfhi $3
mthi $3
TAG30:
blez $3, TAG31
mfhi $4
bgtz $4, TAG31
mthi $4
TAG31:
mtlo $4
mtlo $4
blez $4, TAG32
sh $4, 0($4)
TAG32:
multu $4, $4
mtlo $4
sb $4, 0($4)
subu $2, $4, $4
TAG33:
mthi $2
mthi $2
lui $2, 5
mthi $2
TAG34:
multu $2, $2
lui $4, 3
slt $2, $2, $2
mult $4, $2
TAG35:
bgez $2, TAG36
lui $4, 11
lhu $3, 0($2)
bne $4, $2, TAG36
TAG36:
lui $2, 8
sll $0, $0, 0
mthi $3
lui $1, 12
TAG37:
mfhi $1
xor $3, $1, $1
mflo $2
mflo $3
TAG38:
addu $2, $3, $3
srl $2, $2, 15
lh $4, 0($3)
bgez $4, TAG39
TAG39:
lui $3, 12
lui $4, 0
multu $4, $4
lui $1, 5
TAG40:
sltu $3, $1, $1
bltz $1, TAG41
lui $2, 2
sll $0, $0, 0
TAG41:
addu $4, $2, $2
srav $4, $2, $4
sll $0, $0, 0
mtlo $2
TAG42:
sra $4, $1, 13
lui $4, 9
mult $4, $1
mflo $3
TAG43:
bgtz $3, TAG44
lui $3, 9
lui $2, 14
mflo $2
TAG44:
multu $2, $2
slti $3, $2, 0
lui $1, 10
xor $1, $3, $2
TAG45:
mthi $1
mflo $4
mfhi $3
sltiu $4, $1, 9
TAG46:
mfhi $2
div $4, $4
multu $4, $2
mtlo $4
TAG47:
lui $4, 9
divu $2, $4
blez $2, TAG48
sll $0, $0, 0
TAG48:
mflo $4
mthi $2
sb $2, 0($4)
xor $1, $4, $4
TAG49:
bgtz $1, TAG50
lh $3, 0($1)
bne $1, $1, TAG50
and $1, $3, $3
TAG50:
lui $2, 15
mult $2, $2
lh $2, 0($1)
sw $2, 0($1)
TAG51:
mfhi $2
beq $2, $2, TAG52
mflo $1
bltz $2, TAG52
TAG52:
multu $1, $1
sw $1, 0($1)
bgez $1, TAG53
multu $1, $1
TAG53:
mult $1, $1
andi $2, $1, 5
nor $3, $2, $2
beq $2, $3, TAG54
TAG54:
sw $3, 1($3)
slti $4, $3, 11
beq $4, $3, TAG55
mthi $3
TAG55:
andi $4, $4, 10
lh $3, 0($4)
bne $3, $4, TAG56
lbu $3, 1($3)
TAG56:
div $3, $3
mthi $3
sb $3, -255($3)
sh $3, -255($3)
TAG57:
mflo $2
lui $1, 9
mtlo $2
sb $3, 0($2)
TAG58:
srl $2, $1, 11
mflo $3
blez $1, TAG59
sh $3, -288($2)
TAG59:
lui $4, 3
mfhi $3
bne $3, $3, TAG60
sll $0, $0, 0
TAG60:
mult $3, $3
lui $2, 0
multu $2, $3
beq $3, $3, TAG61
TAG61:
mthi $2
mthi $2
addi $3, $2, 7
mfhi $4
TAG62:
mfhi $1
or $3, $1, $4
lbu $2, 0($4)
srl $1, $3, 8
TAG63:
srlv $3, $1, $1
lui $2, 5
bgtz $1, TAG64
lui $2, 3
TAG64:
sll $0, $0, 0
andi $1, $2, 5
subu $2, $2, $1
mflo $4
TAG65:
blez $4, TAG66
srav $4, $4, $4
bne $4, $4, TAG66
mflo $3
TAG66:
bne $3, $3, TAG67
ori $2, $3, 7
beq $2, $3, TAG67
xori $2, $2, 3
TAG67:
bgez $2, TAG68
mthi $2
blez $2, TAG68
sb $2, 0($2)
TAG68:
sra $1, $2, 14
srlv $3, $2, $1
ori $4, $2, 15
mtlo $4
TAG69:
multu $4, $4
sb $4, 0($4)
subu $2, $4, $4
mflo $1
TAG70:
sll $0, $0, 0
blez $1, TAG71
lui $2, 11
subu $1, $4, $2
TAG71:
slti $1, $1, 9
bgez $1, TAG72
div $1, $1
subu $3, $1, $1
TAG72:
lhu $2, 0($3)
addiu $4, $2, 3
lb $1, 0($3)
mthi $3
TAG73:
lb $2, 0($1)
beq $2, $2, TAG74
xor $2, $2, $2
beq $2, $2, TAG74
TAG74:
lui $3, 1
lui $3, 9
mult $3, $2
mult $2, $2
TAG75:
lui $3, 15
sll $0, $0, 0
mflo $4
addiu $3, $3, 6
TAG76:
mfhi $4
lui $1, 13
bltz $4, TAG77
sub $1, $1, $4
TAG77:
sll $0, $0, 0
sll $0, $0, 0
blez $4, TAG78
sll $0, $0, 0
TAG78:
sb $4, 0($4)
lui $2, 4
bltz $2, TAG79
mthi $2
TAG79:
srav $2, $2, $2
lui $4, 4
sll $3, $2, 2
multu $3, $2
TAG80:
lui $3, 12
xori $3, $3, 0
mflo $2
lui $4, 13
TAG81:
mtlo $4
sll $0, $0, 0
mtlo $4
bne $4, $4, TAG82
TAG82:
sra $2, $4, 8
mfhi $2
divu $4, $4
beq $2, $2, TAG83
TAG83:
sh $2, 0($2)
lui $2, 7
mflo $3
addu $3, $2, $2
TAG84:
bne $3, $3, TAG85
srlv $1, $3, $3
subu $4, $3, $1
subu $3, $4, $1
TAG85:
sll $0, $0, 0
beq $3, $3, TAG86
ori $3, $3, 12
sw $3, 0($3)
TAG86:
mtlo $3
sll $1, $3, 8
sll $0, $0, 0
beq $3, $1, TAG87
TAG87:
mfhi $3
beq $1, $3, TAG88
sll $0, $0, 0
bgez $1, TAG88
TAG88:
lui $1, 10
bne $1, $1, TAG89
mfhi $4
lui $2, 14
TAG89:
addiu $2, $2, 3
andi $1, $2, 8
sltiu $4, $2, 3
sll $0, $0, 0
TAG90:
sw $4, 0($4)
lh $2, 0($4)
slti $1, $4, 15
lhu $4, 0($2)
TAG91:
mult $4, $4
mtlo $4
mthi $4
lui $2, 8
TAG92:
xor $4, $2, $2
mthi $2
xori $1, $2, 13
sll $0, $0, 0
TAG93:
lui $1, 3
beq $1, $1, TAG94
lui $1, 6
lw $2, 0($1)
TAG94:
sll $0, $0, 0
beq $2, $2, TAG95
multu $2, $2
mfhi $2
TAG95:
mtlo $2
lui $1, 3
blez $1, TAG96
sll $0, $0, 0
TAG96:
mflo $2
sb $2, 0($3)
mflo $4
lui $3, 14
TAG97:
mfhi $3
sb $3, 0($3)
mtlo $3
mthi $3
TAG98:
blez $3, TAG99
multu $3, $3
lhu $1, 0($3)
mflo $2
TAG99:
mtlo $2
bne $2, $2, TAG100
mtlo $2
bne $2, $2, TAG100
TAG100:
lui $4, 14
bltz $4, TAG101
mflo $3
bgtz $3, TAG101
TAG101:
addiu $1, $3, 13
div $1, $1
ori $3, $3, 4
beq $3, $3, TAG102
TAG102:
and $2, $3, $3
mtlo $2
bgtz $2, TAG103
mflo $3
TAG103:
srl $2, $3, 5
mflo $1
lbu $4, -4100($1)
bgez $2, TAG104
TAG104:
xori $1, $4, 13
lui $1, 9
ori $2, $1, 10
mflo $4
TAG105:
mthi $4
bgez $4, TAG106
div $4, $4
mthi $4
TAG106:
bne $4, $4, TAG107
ori $2, $4, 14
mult $4, $2
sh $4, -4100($4)
TAG107:
sll $0, $0, 0
lui $2, 0
bne $2, $2, TAG108
mfhi $4
TAG108:
beq $4, $4, TAG109
mflo $1
lb $1, 0($1)
bltz $1, TAG109
TAG109:
mfhi $1
subu $1, $1, $1
mult $1, $1
nor $4, $1, $1
TAG110:
addiu $3, $4, 3
srav $3, $4, $4
lbu $3, 1($3)
sb $3, 0($3)
TAG111:
sw $3, 0($3)
lui $1, 13
lw $2, 0($3)
ori $4, $2, 4
TAG112:
bgtz $4, TAG113
sw $4, 0($4)
sltu $1, $4, $4
andi $2, $1, 1
TAG113:
sltiu $4, $2, 4
lui $3, 1
slti $1, $4, 4
add $1, $4, $2
TAG114:
mthi $1
sllv $2, $1, $1
srl $1, $2, 11
lw $1, 0($2)
TAG115:
div $1, $1
bne $1, $1, TAG116
mthi $1
bgez $1, TAG116
TAG116:
mthi $1
sh $1, 0($1)
and $3, $1, $1
lui $2, 8
TAG117:
mtlo $2
sll $0, $0, 0
mtlo $2
multu $2, $2
TAG118:
sra $3, $2, 7
subu $1, $2, $2
lui $1, 14
sll $0, $0, 0
TAG119:
sll $0, $0, 0
bgez $2, TAG120
mtlo $3
addu $2, $2, $3
TAG120:
mult $2, $2
lui $2, 14
beq $2, $2, TAG121
div $2, $2
TAG121:
mtlo $2
subu $1, $2, $2
mfhi $4
sb $2, 0($1)
TAG122:
lb $4, 0($4)
slt $3, $4, $4
sllv $1, $3, $4
mtlo $4
TAG123:
sh $1, 0($1)
beq $1, $1, TAG124
mflo $3
bltz $1, TAG124
TAG124:
add $4, $3, $3
sw $4, 0($4)
blez $4, TAG125
lui $3, 3
TAG125:
bltz $3, TAG126
mult $3, $3
sll $0, $0, 0
blez $3, TAG126
TAG126:
div $3, $3
multu $3, $3
mfhi $2
mthi $2
TAG127:
sb $2, 0($2)
div $2, $2
lui $3, 3
beq $3, $3, TAG128
TAG128:
divu $3, $3
mthi $3
sll $0, $0, 0
div $3, $3
TAG129:
xor $3, $3, $3
lui $3, 7
bltz $3, TAG130
sll $0, $0, 0
TAG130:
mflo $3
bgtz $3, TAG131
mfhi $1
sw $3, 0($1)
TAG131:
srav $4, $1, $1
lb $1, 0($1)
bgez $1, TAG132
sb $4, 0($1)
TAG132:
mult $1, $1
mflo $1
sw $1, 0($1)
lhu $1, 0($1)
TAG133:
bgez $1, TAG134
lui $4, 2
mfhi $1
add $2, $1, $1
TAG134:
bne $2, $2, TAG135
lui $4, 15
lb $3, 0($2)
mtlo $2
TAG135:
bgez $3, TAG136
mult $3, $3
xori $4, $3, 5
mthi $3
TAG136:
mflo $1
divu $4, $1
mult $1, $1
bne $4, $4, TAG137
TAG137:
mtlo $1
lui $1, 5
sll $0, $0, 0
bne $1, $1, TAG138
TAG138:
lui $4, 12
xor $4, $3, $4
lui $3, 10
bgez $4, TAG139
TAG139:
lui $2, 8
bne $3, $3, TAG140
divu $2, $2
sll $0, $0, 0
TAG140:
sll $0, $0, 0
sra $1, $1, 8
mtlo $1
mtlo $1
TAG141:
sll $0, $0, 0
mthi $1
ori $4, $1, 7
mflo $4
TAG142:
subu $2, $4, $4
lui $3, 6
mflo $2
mult $2, $2
TAG143:
lui $2, 1
mtlo $2
div $2, $2
blez $2, TAG144
TAG144:
sll $4, $2, 10
lui $3, 6
beq $2, $4, TAG145
sltiu $4, $4, 7
TAG145:
mflo $2
xori $3, $4, 10
mflo $2
beq $2, $3, TAG146
TAG146:
sb $2, 0($2)
sb $2, 0($2)
ori $2, $2, 14
lbu $2, 0($2)
TAG147:
ori $4, $2, 10
beq $4, $2, TAG148
divu $4, $4
srl $4, $2, 5
TAG148:
srlv $3, $4, $4
bltz $3, TAG149
mtlo $3
multu $3, $3
TAG149:
bgtz $3, TAG150
mflo $4
sb $4, 0($3)
sh $3, 0($4)
TAG150:
lw $3, 0($4)
bgez $3, TAG151
srlv $1, $4, $3
sb $1, 0($3)
TAG151:
and $1, $1, $1
andi $2, $1, 14
mflo $1
addiu $2, $1, 10
TAG152:
lhu $3, 0($2)
add $1, $3, $3
blez $1, TAG153
lhu $4, 0($3)
TAG153:
lb $4, 0($4)
sllv $4, $4, $4
addu $2, $4, $4
mflo $1
TAG154:
sra $3, $1, 7
lui $4, 13
mfhi $1
mfhi $1
TAG155:
multu $1, $1
lui $4, 3
addi $4, $1, 5
lw $3, 0($1)
TAG156:
mfhi $4
mflo $1
blez $3, TAG157
xori $4, $1, 13
TAG157:
lbu $3, 0($4)
mult $3, $3
lui $2, 6
blez $2, TAG158
TAG158:
lui $3, 2
beq $3, $2, TAG159
div $3, $3
lui $2, 1
TAG159:
sll $0, $0, 0
mfhi $2
beq $2, $2, TAG160
ori $3, $2, 11
TAG160:
addiu $1, $3, 4
lui $4, 3
sll $0, $0, 0
mflo $4
TAG161:
sllv $4, $4, $4
xor $3, $4, $4
sltiu $3, $4, 13
mthi $3
TAG162:
ori $4, $3, 6
mthi $4
or $3, $3, $3
mthi $3
TAG163:
beq $3, $3, TAG164
mtlo $3
andi $3, $3, 6
mfhi $3
TAG164:
beq $3, $3, TAG165
sb $3, 0($3)
bne $3, $3, TAG165
sub $3, $3, $3
TAG165:
mfhi $4
beq $4, $3, TAG166
lbu $2, 0($4)
lbu $3, 0($2)
TAG166:
sb $3, 0($3)
addu $4, $3, $3
blez $3, TAG167
mtlo $4
TAG167:
mtlo $4
addu $3, $4, $4
mthi $4
mtlo $3
TAG168:
beq $3, $3, TAG169
mult $3, $3
divu $3, $3
div $3, $3
TAG169:
sw $3, 0($3)
mthi $3
lh $2, 0($3)
sltiu $1, $2, 10
TAG170:
mfhi $2
mthi $1
sb $1, 0($1)
sb $1, 0($1)
TAG171:
lb $3, 0($2)
sw $3, 0($3)
addu $1, $2, $3
mflo $2
TAG172:
sw $2, 0($2)
beq $2, $2, TAG173
mfhi $2
lhu $2, 0($2)
TAG173:
sllv $1, $2, $2
bltz $2, TAG174
mthi $2
div $1, $2
TAG174:
bgtz $1, TAG175
lh $3, 0($1)
mthi $1
addi $3, $3, 0
TAG175:
lui $4, 1
nor $1, $3, $3
addiu $3, $1, 3
xori $2, $1, 4
TAG176:
bgtz $2, TAG177
div $2, $2
mult $2, $2
lui $1, 13
TAG177:
sll $0, $0, 0
mult $1, $1
div $1, $1
xor $2, $1, $1
TAG178:
lui $3, 9
sll $2, $3, 12
sll $0, $0, 0
lui $3, 11
TAG179:
sll $0, $0, 0
lui $2, 13
lui $2, 10
bne $2, $2, TAG180
TAG180:
div $2, $2
sll $0, $0, 0
mult $2, $2
addiu $3, $3, 1
TAG181:
bne $3, $3, TAG182
sll $0, $0, 0
slt $4, $2, $2
blez $4, TAG182
TAG182:
subu $4, $4, $4
sltiu $3, $4, 3
beq $4, $3, TAG183
addiu $4, $3, 8
TAG183:
sb $4, 0($4)
div $4, $4
divu $4, $4
mult $4, $4
TAG184:
lui $2, 1
addiu $4, $2, 8
sll $0, $0, 0
beq $3, $3, TAG185
TAG185:
mfhi $2
mflo $3
bne $2, $2, TAG186
or $3, $3, $3
TAG186:
mfhi $3
mflo $2
multu $3, $3
nor $3, $3, $3
TAG187:
srl $3, $3, 14
bltz $3, TAG188
div $3, $3
sll $0, $0, 0
TAG188:
sb $2, 0($2)
lui $4, 11
mthi $2
addu $1, $2, $4
TAG189:
lui $4, 14
sll $0, $0, 0
blez $4, TAG190
sll $0, $0, 0
TAG190:
mthi $4
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
TAG191:
slt $1, $4, $4
lui $1, 15
mthi $1
mflo $3
TAG192:
sb $3, 0($3)
mthi $3
lui $4, 9
beq $3, $3, TAG193
TAG193:
lui $1, 15
sll $0, $0, 0
lui $1, 7
mthi $1
TAG194:
mthi $1
mthi $1
addu $2, $1, $1
srl $3, $1, 6
TAG195:
mflo $3
bne $3, $3, TAG196
lb $1, 0($3)
xor $4, $3, $3
TAG196:
mthi $4
blez $4, TAG197
mflo $3
bltz $3, TAG197
TAG197:
slti $2, $3, 7
lui $3, 1
bne $3, $3, TAG198
mthi $2
TAG198:
mflo $2
slt $1, $3, $3
bgez $1, TAG199
mfhi $4
TAG199:
bgtz $4, TAG200
multu $4, $4
bne $4, $4, TAG200
lui $4, 14
TAG200:
lui $2, 3
sb $4, 0($4)
multu $4, $2
lui $4, 1
TAG201:
mfhi $1
sll $0, $0, 0
lui $3, 5
bne $1, $3, TAG202
TAG202:
mthi $3
multu $3, $3
bgez $3, TAG203
sll $0, $0, 0
TAG203:
bgez $3, TAG204
lui $1, 5
bltz $3, TAG204
sw $1, 0($3)
TAG204:
bgtz $1, TAG205
addiu $3, $1, 15
addi $4, $1, 1
bne $3, $3, TAG205
TAG205:
sltu $4, $4, $4
mflo $3
bne $4, $4, TAG206
lui $1, 14
TAG206:
sll $0, $0, 0
sll $0, $0, 0
bne $2, $1, TAG207
multu $1, $1
TAG207:
sll $0, $0, 0
ori $2, $4, 2
sw $2, 0($4)
mult $2, $4
TAG208:
lhu $1, 0($2)
mtlo $2
divu $1, $2
bne $1, $1, TAG209
TAG209:
mflo $3
sll $3, $1, 6
mtlo $1
lh $1, 0($3)
TAG210:
srav $4, $1, $1
addiu $3, $1, 3
multu $3, $4
lui $3, 15
TAG211:
sll $0, $0, 0
mflo $2
sw $3, 0($2)
mfhi $3
TAG212:
sw $3, 0($3)
lui $3, 4
lui $3, 0
mflo $2
TAG213:
sub $3, $2, $2
lw $2, 0($3)
mflo $4
bgez $3, TAG214
TAG214:
subu $4, $4, $4
lbu $2, 0($4)
srav $1, $4, $4
beq $1, $1, TAG215
TAG215:
lui $2, 4
bgtz $1, TAG216
sll $0, $0, 0
sra $2, $2, 1
TAG216:
sll $0, $0, 0
mfhi $1
mult $1, $2
mthi $2
TAG217:
add $3, $1, $1
blez $1, TAG218
mult $1, $1
bne $3, $1, TAG218
TAG218:
mthi $3
subu $2, $3, $3
blez $2, TAG219
andi $2, $2, 8
TAG219:
sllv $1, $2, $2
mult $2, $1
lui $4, 10
mfhi $3
TAG220:
sra $3, $3, 13
mfhi $1
sh $3, 0($3)
mfhi $1
TAG221:
multu $1, $1
mtlo $1
mthi $1
sll $3, $1, 1
TAG222:
mthi $3
mult $3, $3
beq $3, $3, TAG223
mfhi $2
TAG223:
mtlo $2
mfhi $1
lui $2, 3
lb $1, 0($1)
TAG224:
slt $3, $1, $1
sra $2, $1, 5
lui $2, 4
mult $3, $2
TAG225:
lui $1, 10
sllv $2, $2, $1
sll $0, $0, 0
subu $3, $1, $2
TAG226:
sll $0, $0, 0
mthi $3
sltiu $1, $3, 12
mthi $1
TAG227:
srav $4, $1, $1
sltu $1, $1, $4
lhu $1, 0($1)
mult $1, $1
TAG228:
lw $1, 0($1)
addi $2, $1, 0
bne $1, $2, TAG229
sw $2, 0($1)
TAG229:
mthi $2
mfhi $4
bne $4, $4, TAG230
sw $4, 0($2)
TAG230:
mtlo $4
sw $4, 0($4)
lbu $4, 0($4)
mflo $4
TAG231:
nor $4, $4, $4
lui $1, 12
lb $4, 1($4)
lui $1, 12
TAG232:
lui $3, 6
divu $3, $1
srlv $1, $3, $1
div $3, $1
TAG233:
addu $3, $1, $1
mthi $3
beq $1, $1, TAG234
srl $4, $1, 8
TAG234:
mfhi $3
lui $3, 6
mflo $2
bne $3, $3, TAG235
TAG235:
lui $3, 6
div $2, $3
sb $2, 0($2)
mfhi $2
TAG236:
lb $2, 0($2)
bne $2, $2, TAG237
sra $1, $2, 5
sb $2, 0($2)
TAG237:
lui $2, 5
mthi $2
mflo $1
bgez $1, TAG238
TAG238:
addi $3, $1, 9
mult $1, $1
lbu $4, 0($3)
mfhi $1
TAG239:
multu $1, $1
sra $1, $1, 5
srlv $4, $1, $1
ori $4, $1, 3
TAG240:
mthi $4
sllv $2, $4, $4
slti $4, $2, 9
lw $4, 0($4)
TAG241:
sra $4, $4, 5
lui $3, 5
lui $1, 2
addiu $3, $4, 2
TAG242:
bltz $3, TAG243
div $3, $3
lui $1, 15
bgtz $3, TAG243
TAG243:
srav $2, $1, $1
srav $2, $1, $2
sll $0, $0, 0
divu $2, $1
TAG244:
blez $1, TAG245
divu $1, $1
sll $0, $0, 0
lui $1, 8
TAG245:
lui $3, 14
addiu $4, $1, 7
lui $4, 7
or $4, $1, $3
TAG246:
beq $4, $4, TAG247
sll $0, $0, 0
mtlo $4
mthi $4
TAG247:
bgtz $4, TAG248
sll $0, $0, 0
div $4, $4
mthi $4
TAG248:
mflo $1
divu $4, $1
sll $0, $0, 0
lbu $3, 0($1)
TAG249:
lb $4, 0($3)
lui $2, 10
bne $2, $4, TAG250
mflo $1
TAG250:
mfhi $3
srl $1, $1, 0
beq $3, $3, TAG251
and $3, $1, $1
TAG251:
slti $2, $3, 12
mthi $2
xor $3, $2, $3
lui $2, 5
TAG252:
div $2, $2
sll $0, $0, 0
xor $3, $2, $2
mflo $1
TAG253:
srl $3, $1, 12
lui $3, 0
lb $4, 0($3)
mult $4, $3
TAG254:
lw $1, 0($4)
lbu $2, 0($4)
sw $4, 0($2)
mthi $1
TAG255:
multu $2, $2
ori $3, $2, 9
divu $3, $3
sw $3, 0($2)
TAG256:
subu $4, $3, $3
bne $4, $4, TAG257
nor $2, $4, $4
bgez $3, TAG257
TAG257:
mthi $2
sh $2, 1($2)
sll $3, $2, 12
mfhi $2
TAG258:
bltz $2, TAG259
mthi $2
sb $2, 0($2)
srl $2, $2, 7
TAG259:
div $2, $2
lui $4, 12
mult $4, $4
mthi $4
TAG260:
mtlo $4
mflo $4
bgtz $4, TAG261
sll $0, $0, 0
TAG261:
multu $1, $1
beq $1, $1, TAG262
multu $1, $1
beq $1, $1, TAG262
TAG262:
multu $1, $1
addu $2, $1, $1
lhu $1, -256($1)
mflo $3
TAG263:
bltz $3, TAG264
mthi $3
multu $3, $3
mtlo $3
TAG264:
mflo $4
lui $1, 2
lui $2, 4
lui $1, 9
TAG265:
subu $3, $1, $1
lui $2, 4
beq $2, $2, TAG266
mult $3, $3
TAG266:
sra $4, $2, 11
sll $0, $0, 0
sll $0, $0, 0
bne $2, $4, TAG267
TAG267:
divu $4, $4
mthi $4
mthi $4
sra $4, $4, 6
TAG268:
divu $4, $4
ori $1, $4, 6
bgtz $1, TAG269
lui $4, 1
TAG269:
mtlo $4
divu $4, $4
srl $3, $4, 7
blez $4, TAG270
TAG270:
mtlo $3
div $3, $3
and $1, $3, $3
multu $1, $3
TAG271:
subu $2, $1, $1
mtlo $2
sw $2, -512($1)
beq $2, $1, TAG272
TAG272:
lui $4, 12
mfhi $1
lhu $2, 0($2)
lbu $3, 0($1)
TAG273:
beq $3, $3, TAG274
mtlo $3
lh $1, 0($3)
multu $1, $3
TAG274:
mult $1, $1
sw $1, 0($1)
mflo $1
bgtz $1, TAG275
TAG275:
mult $1, $1
mthi $1
lb $3, 0($1)
mult $3, $1
TAG276:
mthi $3
bne $3, $3, TAG277
mtlo $3
mfhi $4
TAG277:
mult $4, $4
mult $4, $4
lb $3, 0($4)
lui $2, 15
TAG278:
beq $2, $2, TAG279
mult $2, $2
mthi $2
mflo $3
TAG279:
mult $3, $3
lbu $4, 0($3)
mfhi $3
lui $1, 10
TAG280:
beq $1, $1, TAG281
sll $0, $0, 0
mtlo $1
mthi $1
TAG281:
mult $1, $1
lui $3, 4
bgtz $3, TAG282
sll $0, $0, 0
TAG282:
bgez $1, TAG283
lui $3, 14
blez $1, TAG283
lb $4, 0($1)
TAG283:
mtlo $4
blez $4, TAG284
mfhi $2
sh $4, 0($2)
TAG284:
lui $1, 5
mflo $2
sltiu $2, $2, 10
mfhi $1
TAG285:
mflo $4
lui $4, 3
divu $4, $4
addu $2, $1, $4
TAG286:
multu $2, $2
ori $3, $2, 0
mflo $1
mult $2, $3
TAG287:
mfhi $4
sb $4, 0($4)
subu $4, $1, $1
mfhi $2
TAG288:
bltz $2, TAG289
lui $3, 15
divu $2, $3
lui $3, 5
TAG289:
bne $3, $3, TAG290
srav $1, $3, $3
and $2, $3, $3
mthi $3
TAG290:
sll $0, $0, 0
ori $4, $2, 4
sll $0, $0, 0
mflo $3
TAG291:
mult $3, $3
slti $1, $3, 10
mult $1, $3
addu $3, $3, $1
TAG292:
mfhi $2
beq $3, $2, TAG293
lb $4, 0($3)
lb $3, 0($3)
TAG293:
multu $3, $3
multu $3, $3
bne $3, $3, TAG294
lui $4, 6
TAG294:
divu $4, $4
srl $2, $4, 8
sltiu $3, $2, 9
bgez $4, TAG295
TAG295:
lw $3, 0($3)
bne $3, $3, TAG296
lbu $3, 0($3)
mult $3, $3
TAG296:
bne $3, $3, TAG297
mfhi $4
lw $2, 0($4)
sb $3, 0($3)
TAG297:
mflo $3
lui $3, 6
lui $2, 5
bgez $2, TAG298
TAG298:
xor $4, $2, $2
beq $4, $2, TAG299
mfhi $1
addiu $2, $2, 13
TAG299:
srlv $3, $2, $2
xori $1, $3, 1
subu $3, $1, $2
lui $3, 0
TAG300:
mflo $2
mflo $4
sw $2, 0($4)
bgez $4, TAG301
TAG301:
lb $1, 0($4)
lui $2, 6
blez $1, TAG302
sb $2, 0($4)
TAG302:
mfhi $1
sll $0, $0, 0
mfhi $2
sw $4, 0($2)
TAG303:
mthi $2
subu $4, $2, $2
sw $4, 0($2)
sw $4, 0($2)
TAG304:
mult $4, $4
sllv $1, $4, $4
beq $1, $1, TAG305
sb $1, 0($1)
TAG305:
mflo $3
bltz $3, TAG306
mflo $2
sb $2, 0($2)
TAG306:
andi $1, $2, 11
mflo $4
bltz $2, TAG307
mtlo $2
TAG307:
sh $4, 0($4)
beq $4, $4, TAG308
lbu $4, 0($4)
sll $4, $4, 11
TAG308:
multu $4, $4
slti $3, $4, 12
andi $3, $4, 10
xor $1, $3, $3
TAG309:
lbu $1, 0($1)
lui $2, 10
addi $2, $1, 7
sub $4, $2, $1
TAG310:
lui $1, 5
sll $0, $0, 0
div $1, $4
mtlo $4
TAG311:
div $1, $1
multu $1, $1
bne $1, $1, TAG312
lui $4, 12
TAG312:
subu $4, $4, $4
mult $4, $4
and $3, $4, $4
bltz $4, TAG313
TAG313:
sh $3, 0($3)
mfhi $3
lui $2, 9
multu $2, $3
TAG314:
sll $0, $0, 0
lui $1, 7
mthi $2
beq $1, $1, TAG315
TAG315:
sll $0, $0, 0
bne $1, $1, TAG316
lui $4, 1
srl $3, $4, 5
TAG316:
mfhi $4
divu $4, $4
sb $3, -2048($3)
mtlo $3
TAG317:
sll $0, $0, 0
bgtz $4, TAG318
sll $0, $0, 0
slt $2, $4, $4
TAG318:
mthi $2
bltz $2, TAG319
andi $1, $2, 3
bne $2, $1, TAG319
TAG319:
sw $1, 0($1)
blez $1, TAG320
mfhi $3
bne $3, $1, TAG320
TAG320:
addiu $4, $3, 4
mfhi $2
sltu $4, $4, $2
mflo $3
TAG321:
beq $3, $3, TAG322
addu $3, $3, $3
lui $2, 12
lhu $4, 0($3)
TAG322:
blez $4, TAG323
mthi $4
lui $2, 4
mult $2, $4
TAG323:
bgtz $2, TAG324
or $4, $2, $2
addi $3, $2, 12
divu $4, $3
TAG324:
sra $2, $3, 4
sw $3, -4096($3)
blez $2, TAG325
lui $3, 6
TAG325:
sll $0, $0, 0
bltz $4, TAG326
sll $0, $0, 0
blez $4, TAG326
TAG326:
mthi $4
bgtz $4, TAG327
div $4, $4
bne $4, $4, TAG327
TAG327:
sll $0, $0, 0
sll $0, $0, 0
divu $4, $3
beq $4, $4, TAG328
TAG328:
mtlo $3
mfhi $1
bltz $3, TAG329
sll $0, $0, 0
TAG329:
sra $2, $3, 11
beq $2, $2, TAG330
mflo $4
divu $3, $4
TAG330:
beq $4, $4, TAG331
lui $2, 15
sw $4, 0($2)
lui $1, 5
TAG331:
sll $0, $0, 0
sllv $1, $1, $3
addiu $3, $1, 10
sll $0, $0, 0
TAG332:
sll $0, $0, 0
lui $3, 2
sll $0, $0, 0
sllv $3, $2, $2
TAG333:
sll $0, $0, 0
slti $3, $3, 6
mtlo $3
mfhi $4
TAG334:
bltz $4, TAG335
sra $4, $4, 7
lui $2, 0
blez $4, TAG335
TAG335:
srlv $3, $2, $2
sb $2, 0($2)
bne $2, $3, TAG336
lh $2, 0($3)
TAG336:
addiu $1, $2, 12
mfhi $4
mfhi $1
beq $2, $1, TAG337
TAG337:
mflo $3
sll $0, $0, 0
beq $3, $1, TAG338
xori $1, $1, 5
TAG338:
mult $1, $1
mtlo $1
bne $1, $1, TAG339
sll $0, $0, 0
TAG339:
sll $0, $0, 0
mtlo $4
bne $4, $4, TAG340
mtlo $4
TAG340:
beq $4, $4, TAG341
sll $0, $0, 0
lh $3, 0($4)
slt $3, $3, $4
TAG341:
mflo $2
bne $2, $3, TAG342
sw $2, 0($3)
mfhi $3
TAG342:
lbu $2, 0($3)
sh $2, 0($3)
lhu $2, 0($2)
mfhi $2
TAG343:
div $2, $2
mfhi $4
mfhi $1
mult $1, $1
TAG344:
sw $1, 0($1)
beq $1, $1, TAG345
slti $3, $1, 13
mult $1, $3
TAG345:
sb $3, 0($3)
addu $2, $3, $3
slt $1, $2, $3
multu $1, $1
TAG346:
lhu $2, 0($1)
mult $1, $1
or $4, $2, $2
bgez $1, TAG347
TAG347:
sll $0, $0, 0
mthi $4
sra $1, $4, 14
bne $1, $2, TAG348
TAG348:
lb $3, 0($1)
bgtz $3, TAG349
multu $1, $1
mfhi $2
TAG349:
bgez $2, TAG350
mtlo $2
xori $2, $2, 9
mthi $2
TAG350:
lui $1, 1
multu $1, $1
bltz $2, TAG351
mflo $1
TAG351:
beq $1, $1, TAG352
sb $1, 0($1)
mthi $1
mtlo $1
TAG352:
mfhi $3
bltz $3, TAG353
mthi $1
mfhi $1
TAG353:
bgtz $1, TAG354
lhu $4, 0($1)
bltz $4, TAG354
mult $1, $1
TAG354:
mthi $4
sw $4, -256($4)
multu $4, $4
sb $4, -256($4)
TAG355:
mflo $2
mtlo $2
multu $2, $2
mult $2, $2
TAG356:
lui $2, 13
mthi $2
bne $2, $2, TAG357
sltu $1, $2, $2
TAG357:
mult $1, $1
bne $1, $1, TAG358
lw $4, 0($1)
mult $4, $4
TAG358:
mtlo $4
and $2, $4, $4
lui $4, 1
lhu $2, -256($2)
TAG359:
bgez $2, TAG360
lw $4, -256($2)
sltu $4, $4, $2
addiu $2, $4, 9
TAG360:
div $2, $2
mtlo $2
sh $2, -256($2)
bne $2, $2, TAG361
TAG361:
sll $0, $0, 0
mfhi $4
lui $2, 0
lui $3, 5
TAG362:
sll $0, $0, 0
mfhi $2
bltz $2, TAG363
srlv $1, $3, $2
TAG363:
beq $1, $1, TAG364
sll $0, $0, 0
sw $1, 0($1)
mult $1, $1
TAG364:
nor $4, $1, $1
bgtz $1, TAG365
sll $0, $0, 0
bltz $1, TAG365
TAG365:
slti $1, $4, 1
lb $1, 0($1)
xor $1, $1, $4
addu $2, $1, $4
TAG366:
divu $2, $2
sll $0, $0, 0
sll $0, $0, 0
xori $1, $2, 2
TAG367:
div $1, $1
xori $2, $1, 13
sll $0, $0, 0
sll $0, $0, 0
TAG368:
xori $3, $4, 3
blez $3, TAG369
mthi $4
and $2, $4, $4
TAG369:
div $2, $2
lui $3, 2
sll $0, $0, 0
addiu $4, $3, 4
TAG370:
srlv $4, $4, $4
bgez $4, TAG371
multu $4, $4
mtlo $4
TAG371:
beq $4, $4, TAG372
mfhi $3
mflo $1
lb $1, 0($3)
TAG372:
mfhi $3
lui $3, 7
addiu $1, $3, 6
sll $0, $0, 0
TAG373:
mthi $1
lui $2, 12
sll $0, $0, 0
mflo $3
TAG374:
lui $2, 11
sll $0, $0, 0
lui $2, 5
sll $0, $0, 0
TAG375:
lui $1, 3
sll $0, $0, 0
beq $1, $1, TAG376
sll $0, $0, 0
TAG376:
divu $3, $3
addu $3, $3, $3
mfhi $4
lhu $3, 0($4)
TAG377:
subu $3, $3, $3
sb $3, 0($3)
bne $3, $3, TAG378
lui $4, 9
TAG378:
mflo $3
sb $3, 0($3)
bne $4, $3, TAG379
sb $3, 0($3)
TAG379:
lui $2, 4
lui $4, 4
beq $3, $2, TAG380
sllv $4, $2, $2
TAG380:
mflo $4
lb $1, 0($4)
mfhi $1
lui $3, 10
TAG381:
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
multu $2, $1
TAG382:
sll $0, $0, 0
blez $2, TAG383
mfhi $2
sra $3, $2, 13
TAG383:
lui $2, 15
lui $1, 1
ori $1, $2, 2
lui $4, 12
TAG384:
mfhi $2
ori $2, $2, 12
sh $2, 0($2)
mult $2, $4
TAG385:
lui $4, 15
lw $1, 0($2)
lui $4, 11
multu $2, $1
TAG386:
sll $0, $0, 0
lui $4, 8
slt $2, $4, $4
bne $2, $4, TAG387
TAG387:
sw $2, 0($2)
mflo $2
bltz $2, TAG388
srl $3, $2, 9
TAG388:
mthi $3
sll $0, $0, 0
bltz $3, TAG389
mult $3, $3
TAG389:
sll $0, $0, 0
sll $0, $0, 0
bne $3, $4, TAG390
subu $1, $3, $4
TAG390:
mtlo $1
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
TAG391:
subu $4, $2, $2
lui $4, 1
mfhi $2
div $4, $2
TAG392:
bne $2, $2, TAG393
multu $2, $2
mult $2, $2
blez $2, TAG393
TAG393:
xori $2, $2, 10
mflo $1
mtlo $2
divu $1, $2
TAG394:
lui $4, 10
sll $0, $0, 0
srl $2, $3, 11
srl $3, $1, 6
TAG395:
lui $1, 15
sll $0, $0, 0
div $3, $1
sll $0, $0, 0
TAG396:
sll $0, $0, 0
mtlo $1
beq $1, $1, TAG397
sll $1, $1, 3
TAG397:
sll $0, $0, 0
ori $1, $1, 3
mflo $3
mtlo $1
TAG398:
divu $3, $3
bne $3, $3, TAG399
mfhi $2
sra $1, $3, 13
TAG399:
mflo $2
mtlo $2
bgez $2, TAG400
mflo $1
TAG400:
andi $3, $1, 3
sllv $1, $3, $1
sllv $3, $1, $3
sb $1, 0($3)
TAG401:
bgtz $3, TAG402
lbu $1, 0($3)
sllv $4, $3, $3
addiu $3, $1, 10
TAG402:
lw $2, 0($3)
mthi $3
multu $2, $3
lui $4, 1
TAG403:
lui $4, 8
sltiu $2, $4, 5
mthi $4
mthi $4
TAG404:
mfhi $4
bne $4, $2, TAG405
sll $0, $0, 0
mthi $4
TAG405:
sll $0, $0, 0
mthi $4
sll $0, $0, 0
addu $4, $4, $4
TAG406:
slti $3, $4, 14
div $3, $4
slt $4, $3, $4
lbu $2, 0($4)
TAG407:
srav $4, $2, $2
sw $2, 0($2)
bgez $4, TAG408
mflo $3
TAG408:
mfhi $2
sltu $2, $2, $3
blez $2, TAG409
lw $1, 0($2)
TAG409:
add $3, $1, $1
lui $2, 2
xor $2, $3, $2
lui $3, 8
TAG410:
sll $0, $0, 0
mfhi $1
lui $3, 15
mthi $1
TAG411:
sll $0, $0, 0
addiu $4, $3, 15
mfhi $4
sh $4, 0($4)
TAG412:
mult $4, $4
mthi $4
mthi $4
multu $4, $4
TAG413:
blez $4, TAG414
sltu $3, $4, $4
sltu $4, $4, $3
sltiu $3, $4, 7
TAG414:
xori $1, $3, 14
multu $1, $3
xori $3, $1, 12
mtlo $1
TAG415:
sltu $4, $3, $3
mult $4, $3
addiu $4, $3, 15
sllv $1, $4, $3
TAG416:
mtlo $1
bne $1, $1, TAG417
sh $1, 0($1)
xor $3, $1, $1
TAG417:
bgez $3, TAG418
lhu $4, 0($3)
ori $1, $4, 14
lw $2, 0($1)
TAG418:
sll $0, $0, 0
xori $3, $2, 12
srl $2, $3, 10
andi $4, $3, 0
TAG419:
subu $4, $4, $4
mult $4, $4
sh $4, 0($4)
slti $3, $4, 1
TAG420:
beq $3, $3, TAG421
sb $3, 0($3)
addu $3, $3, $3
lui $3, 10
TAG421:
bltz $3, TAG422
mfhi $1
subu $3, $1, $3
bgez $3, TAG422
TAG422:
sb $3, 1($3)
lui $2, 15
mtlo $2
lui $1, 5
TAG423:
xor $1, $1, $1
mthi $1
andi $4, $1, 9
mthi $1
TAG424:
lh $4, 0($4)
mflo $2
beq $4, $4, TAG425
sh $4, -511($4)
TAG425:
lui $1, 5
bne $1, $1, TAG426
multu $2, $2
blez $2, TAG426
TAG426:
xori $3, $1, 14
beq $3, $3, TAG427
addiu $4, $3, 4
lui $3, 12
TAG427:
subu $2, $3, $3
mthi $3
bgtz $2, TAG428
lui $4, 9
TAG428:
mtlo $4
lui $3, 3
sll $0, $0, 0
sll $0, $0, 0
TAG429:
bltz $2, TAG430
multu $2, $2
multu $2, $2
mult $2, $2
TAG430:
mfhi $2
srlv $1, $2, $2
mfhi $4
sh $2, 0($2)
TAG431:
sw $4, 0($4)
mthi $4
lui $3, 3
bne $4, $4, TAG432
TAG432:
sll $0, $0, 0
bltz $3, TAG433
addiu $1, $3, 9
mflo $2
TAG433:
lui $1, 15
sltiu $4, $2, 1
mflo $2
mfhi $2
TAG434:
mflo $3
add $4, $3, $2
lui $4, 0
mflo $3
TAG435:
mthi $3
sh $3, 0($3)
bltz $3, TAG436
mult $3, $3
TAG436:
mtlo $3
blez $3, TAG437
mthi $3
bltz $3, TAG437
TAG437:
mtlo $3
multu $3, $3
mflo $3
srl $2, $3, 10
TAG438:
sw $2, 0($2)
lui $4, 1
nor $3, $4, $4
multu $4, $2
TAG439:
subu $2, $3, $3
mthi $3
sra $3, $2, 15
addi $4, $3, 7
TAG440:
lui $2, 14
subu $1, $4, $2
sll $0, $0, 0
blez $4, TAG441
TAG441:
lui $4, 0
bne $4, $4, TAG442
lbu $3, 0($4)
bltz $4, TAG442
TAG442:
lhu $3, 0($3)
and $2, $3, $3
beq $3, $3, TAG443
sb $3, 0($3)
TAG443:
add $1, $2, $2
lbu $2, 0($1)
lbu $3, 0($2)
mult $2, $2
TAG444:
bgez $3, TAG445
mthi $3
beq $3, $3, TAG445
sltu $1, $3, $3
TAG445:
ori $2, $1, 9
lbu $4, 0($1)
slt $3, $2, $2
mult $4, $3
TAG446:
multu $3, $3
mtlo $3
mthi $3
bltz $3, TAG447
TAG447:
mfhi $2
mtlo $2
addiu $1, $3, 2
lui $3, 10
TAG448:
beq $3, $3, TAG449
lui $3, 9
add $2, $3, $3
divu $3, $3
TAG449:
bgez $2, TAG450
lui $2, 1
multu $2, $2
sltiu $4, $2, 5
TAG450:
mult $4, $4
lhu $3, 0($4)
blez $3, TAG451
lw $1, 0($4)
TAG451:
lui $3, 13
bltz $1, TAG452
div $1, $3
lui $4, 8
TAG452:
beq $4, $4, TAG453
sll $0, $0, 0
divu $4, $4
multu $4, $4
TAG453:
sll $0, $0, 0
sltu $3, $4, $4
lhu $1, 0($3)
beq $3, $4, TAG454
TAG454:
mult $1, $1
mthi $1
mfhi $2
multu $2, $2
TAG455:
andi $1, $2, 8
mtlo $2
mfhi $1
lui $1, 5
TAG456:
sll $0, $0, 0
mflo $1
multu $1, $1
bgtz $1, TAG457
TAG457:
mfhi $1
lui $3, 11
mthi $3
sll $0, $0, 0
TAG458:
mfhi $1
lui $3, 3
sll $0, $0, 0
sll $0, $0, 0
TAG459:
mtlo $3
lui $2, 1
mthi $2
ori $2, $2, 8
TAG460:
mtlo $2
beq $2, $2, TAG461
ori $1, $2, 5
xori $4, $1, 4
TAG461:
mflo $3
blez $4, TAG462
subu $3, $3, $3
lui $1, 10
TAG462:
bne $1, $1, TAG463
mtlo $1
bne $1, $1, TAG463
sll $0, $0, 0
TAG463:
ori $1, $2, 6
mthi $1
mtlo $1
sltu $2, $1, $2
TAG464:
multu $2, $2
lui $3, 9
mfhi $1
mthi $3
TAG465:
mult $1, $1
bgtz $1, TAG466
slt $4, $1, $1
or $1, $4, $4
TAG466:
beq $1, $1, TAG467
lhu $3, 0($1)
sh $1, 0($1)
lui $2, 0
TAG467:
lb $2, 0($2)
mflo $1
mfhi $1
lbu $4, 0($1)
TAG468:
mtlo $4
bgtz $4, TAG469
sub $1, $4, $4
sb $1, 0($1)
TAG469:
bgez $1, TAG470
sll $2, $1, 8
beq $1, $1, TAG470
mult $1, $1
TAG470:
bltz $2, TAG471
addu $4, $2, $2
multu $4, $4
sw $4, 0($2)
TAG471:
mtlo $4
lui $4, 12
div $4, $4
andi $4, $4, 15
TAG472:
addiu $3, $4, 5
mfhi $4
subu $4, $4, $3
bne $4, $4, TAG473
TAG473:
sll $0, $0, 0
div $4, $3
mtlo $4
mult $4, $4
TAG474:
mtlo $3
nor $3, $3, $3
mthi $3
beq $3, $3, TAG475
TAG475:
ori $4, $3, 12
mthi $4
beq $4, $4, TAG476
lw $3, 2($4)
TAG476:
bltz $3, TAG477
multu $3, $3
addi $4, $3, 15
mtlo $3
TAG477:
lb $4, 0($4)
blez $4, TAG478
mflo $3
lbu $4, 0($4)
TAG478:
lb $1, 0($4)
lbu $3, 0($1)
lbu $4, 0($4)
subu $3, $3, $4
TAG479:
bltz $3, TAG480
and $1, $3, $3
lui $1, 9
beq $1, $3, TAG480
TAG480:
sll $0, $0, 0
bne $1, $1, TAG481
andi $2, $1, 10
mthi $1
TAG481:
mult $2, $2
bgtz $2, TAG482
lw $4, 0($2)
srav $2, $4, $2
TAG482:
mult $2, $2
andi $4, $2, 11
mthi $4
lui $3, 7
TAG483:
sll $0, $0, 0
lui $1, 4
sltiu $1, $3, 2
bgtz $1, TAG484
TAG484:
subu $2, $1, $1
sh $2, 0($2)
bgez $1, TAG485
lui $1, 10
TAG485:
multu $1, $1
bne $1, $1, TAG486
sll $1, $1, 15
bne $1, $1, TAG486
TAG486:
lhu $4, 0($1)
lhu $3, 0($1)
sltiu $1, $4, 11
sb $4, 0($3)
TAG487:
mfhi $1
div $1, $1
beq $1, $1, TAG488
sb $1, 0($1)
TAG488:
mfhi $4
div $4, $1
divu $1, $1
addi $2, $4, 5
TAG489:
mtlo $2
lbu $2, 0($2)
lui $4, 5
beq $4, $2, TAG490
TAG490:
lui $3, 0
mflo $4
xori $1, $3, 9
lui $1, 12
TAG491:
sll $0, $0, 0
mfhi $1
lui $1, 1
bne $1, $1, TAG492
TAG492:
mfhi $3
mflo $2
mult $3, $1
or $2, $2, $2
TAG493:
multu $2, $2
bne $2, $2, TAG494
lui $3, 0
lb $3, 0($2)
TAG494:
blez $3, TAG495
lbu $3, 0($3)
sb $3, 0($3)
lhu $2, 0($3)
TAG495:
lb $2, 0($2)
mflo $3
sb $2, 0($2)
multu $3, $2
TAG496:
bne $3, $3, TAG497
sb $3, 0($3)
mtlo $3
mtlo $3
TAG497:
lbu $4, 0($3)
bne $4, $3, TAG498
lbu $1, 0($4)
lui $1, 2
TAG498:
beq $1, $1, TAG499
sll $0, $0, 0
lui $3, 5
mfhi $3
TAG499:
lui $1, 0
mtlo $1
blez $3, TAG500
mtlo $3
TAG500:
mfhi $4
mflo $3
lbu $4, 0($3)
bltz $1, TAG501
TAG501:
nor $2, $4, $4
bgez $4, TAG502
addiu $1, $4, 2
andi $1, $2, 15
TAG502:
lui $4, 4
mfhi $3
mthi $1
srl $3, $4, 1
TAG503:
mfhi $2
beq $3, $3, TAG504
sll $0, $0, 0
mfhi $2
TAG504:
lui $1, 13
lui $3, 4
lui $2, 4
addiu $3, $3, 8
TAG505:
mthi $3
ori $3, $3, 9
lui $2, 9
addu $4, $2, $2
TAG506:
mtlo $4
lui $2, 1
mfhi $1
sll $0, $0, 0
TAG507:
sra $3, $1, 14
sltu $2, $1, $1
sll $1, $3, 1
mtlo $1
TAG508:
mfhi $1
bne $1, $1, TAG509
sll $0, $0, 0
bgez $1, TAG509
TAG509:
divu $1, $1
mtlo $1
lui $3, 5
multu $1, $3
TAG510:
bgtz $3, TAG511
mthi $3
mfhi $1
bne $3, $3, TAG511
TAG511:
lui $1, 2
divu $1, $1
multu $1, $1
sll $0, $0, 0
TAG512:
mfhi $2
sll $0, $0, 0
sll $0, $0, 0
mult $3, $3
TAG513:
sll $0, $0, 0
mfhi $1
sll $0, $0, 0
mfhi $1
TAG514:
sb $1, 0($1)
sra $1, $1, 12
lui $1, 8
subu $4, $1, $1
TAG515:
lui $1, 9
bne $4, $1, TAG516
sll $0, $0, 0
beq $1, $4, TAG516
TAG516:
div $1, $1
lui $4, 4
slt $2, $4, $4
slt $1, $1, $4
TAG517:
mflo $4
nor $3, $4, $1
bgtz $4, TAG518
sb $4, 2($3)
TAG518:
mfhi $4
multu $4, $4
ori $1, $3, 5
lui $2, 7
TAG519:
sltiu $1, $2, 13
beq $1, $1, TAG520
and $1, $1, $1
lw $1, 0($1)
TAG520:
lui $1, 6
sll $0, $0, 0
sh $1, 2($3)
lui $4, 4
TAG521:
mtlo $4
beq $4, $4, TAG522
mtlo $4
mult $4, $4
TAG522:
bne $4, $4, TAG523
mtlo $4
bgtz $4, TAG523
div $4, $4
TAG523:
mthi $4
sltu $1, $4, $4
sll $0, $0, 0
bne $1, $1, TAG524
TAG524:
lui $4, 13
lhu $4, 0($1)
andi $4, $4, 5
lui $4, 14
TAG525:
bgez $4, TAG526
lui $3, 13
beq $3, $4, TAG526
sltu $4, $3, $4
TAG526:
sll $0, $0, 0
lui $3, 0
bne $3, $3, TAG527
sltu $3, $4, $3
TAG527:
blez $3, TAG528
mthi $3
bltz $3, TAG528
sb $3, 0($3)
TAG528:
beq $3, $3, TAG529
sb $3, 0($3)
beq $3, $3, TAG529
div $3, $3
TAG529:
beq $3, $3, TAG530
lui $3, 12
lbu $4, 0($3)
bgez $4, TAG530
TAG530:
mflo $3
bgtz $4, TAG531
mtlo $4
sw $3, 0($4)
TAG531:
mfhi $2
bne $2, $3, TAG532
sb $3, 0($3)
bltz $3, TAG532
TAG532:
mtlo $2
mult $2, $2
ori $2, $2, 9
lui $1, 11
TAG533:
blez $1, TAG534
ori $3, $1, 3
mflo $3
bne $1, $1, TAG534
TAG534:
sb $3, 0($3)
mflo $4
andi $1, $4, 8
lui $4, 6
TAG535:
mtlo $4
lui $2, 4
blez $4, TAG536
addu $4, $2, $2
TAG536:
ori $3, $4, 2
xori $3, $4, 3
sll $0, $0, 0
sll $0, $0, 0
TAG537:
sll $0, $0, 0
srlv $3, $3, $3
multu $3, $3
addu $2, $3, $3
TAG538:
mflo $2
mtlo $2
bne $2, $2, TAG539
mflo $1
TAG539:
lh $3, 0($1)
lh $3, 0($1)
addu $4, $3, $3
sh $4, -512($4)
TAG540:
mthi $4
sw $4, -512($4)
lb $1, -512($4)
sb $4, 0($1)
TAG541:
lbu $3, 0($1)
mult $1, $1
bne $3, $3, TAG542
subu $1, $1, $3
TAG542:
mtlo $1
srlv $3, $1, $1
mtlo $1
mult $1, $3
TAG543:
lhu $2, 0($3)
bltz $3, TAG544
mflo $3
mfhi $4
TAG544:
sw $4, 0($4)
sw $4, 0($4)
sw $4, 0($4)
add $2, $4, $4
TAG545:
mflo $2
mult $2, $2
mult $2, $2
sw $2, 0($2)
TAG546:
mflo $1
mult $1, $1
srlv $1, $2, $2
mult $1, $2
TAG547:
sh $1, 0($1)
lh $4, 0($1)
mthi $1
sw $4, 0($1)
TAG548:
multu $4, $4
sw $4, 0($4)
mult $4, $4
bne $4, $4, TAG549
TAG549:
mult $4, $4
lui $3, 11
sll $0, $0, 0
mflo $1
TAG550:
blez $1, TAG551
xori $1, $1, 0
sll $4, $1, 3
ori $2, $1, 9
TAG551:
lui $2, 9
bne $2, $2, TAG552
divu $2, $2
addu $4, $2, $2
TAG552:
bne $4, $4, TAG553
mult $4, $4
sll $0, $0, 0
bltz $3, TAG553
TAG553:
ori $4, $3, 8
bltz $3, TAG554
div $3, $4
bgez $4, TAG554
TAG554:
mflo $4
multu $4, $4
lbu $3, 0($4)
blez $3, TAG555
TAG555:
addi $4, $3, 9
lui $2, 13
xori $4, $3, 7
nor $1, $4, $2
TAG556:
mult $1, $1
mtlo $1
div $1, $1
lui $2, 5
TAG557:
mult $2, $2
lui $3, 11
sll $0, $0, 0
blez $3, TAG558
TAG558:
mtlo $3
beq $3, $3, TAG559
ori $1, $3, 13
lui $1, 1
TAG559:
subu $4, $1, $1
addiu $3, $4, 0
lui $1, 6
addiu $2, $1, 15
TAG560:
lui $1, 1
bgez $1, TAG561
multu $2, $1
mtlo $1
TAG561:
divu $1, $1
mfhi $1
bne $1, $1, TAG562
sra $4, $1, 14
TAG562:
sub $2, $4, $4
mthi $4
sub $4, $2, $2
addi $3, $4, 12
TAG563:
bgez $3, TAG564
lui $3, 13
mfhi $1
divu $1, $3
TAG564:
multu $1, $1
mflo $4
sh $1, 0($1)
mflo $4
TAG565:
mflo $4
bgtz $4, TAG566
sra $2, $4, 14
lw $3, 0($4)
TAG566:
bltz $3, TAG567
mtlo $3
subu $4, $3, $3
sh $4, 0($4)
TAG567:
mfhi $3
mthi $3
addi $4, $3, 13
lui $4, 0
TAG568:
mtlo $4
beq $4, $4, TAG569
mtlo $4
mfhi $4
TAG569:
lhu $4, 0($4)
lw $3, 0($4)
mtlo $3
bne $4, $4, TAG570
TAG570:
mtlo $3
lh $1, 0($3)
bgez $1, TAG571
or $1, $1, $1
TAG571:
lui $2, 11
mthi $1
sllv $3, $2, $2
srl $1, $3, 3
TAG572:
mthi $1
bltz $1, TAG573
mtlo $1
bgez $1, TAG573
TAG573:
mthi $1
sll $0, $0, 0
div $1, $1
mflo $4
TAG574:
bgez $4, TAG575
lui $2, 6
multu $2, $2
andi $3, $4, 1
TAG575:
sll $0, $0, 0
sll $0, $0, 0
mflo $2
mthi $2
TAG576:
lui $1, 13
bne $1, $2, TAG577
mflo $1
lb $4, 0($2)
TAG577:
bgtz $4, TAG578
sb $4, 0($4)
sb $4, 0($4)
div $4, $4
TAG578:
lbu $3, 0($4)
sb $3, 0($3)
mflo $4
sb $4, 0($4)
TAG579:
mult $4, $4
addiu $2, $4, 0
slt $2, $4, $2
sh $4, 0($2)
TAG580:
or $4, $2, $2
mthi $2
lui $1, 3
beq $4, $4, TAG581
TAG581:
mflo $3
lui $1, 0
mult $1, $1
lb $4, 0($3)
TAG582:
beq $4, $4, TAG583
slti $4, $4, 13
mtlo $4
divu $4, $4
TAG583:
beq $4, $4, TAG584
mflo $3
sw $3, 0($3)
lhu $4, 0($3)
TAG584:
lui $3, 3
bne $3, $4, TAG585
mfhi $2
bgtz $4, TAG585
TAG585:
sb $2, 0($2)
mflo $3
bgez $3, TAG586
mult $3, $3
TAG586:
lui $2, 9
lui $1, 13
mtlo $2
div $2, $1
TAG587:
divu $1, $1
sll $0, $0, 0
mtlo $1
mthi $1
TAG588:
sll $0, $0, 0
slti $1, $1, 0
nor $4, $1, $1
div $1, $4
TAG589:
bltz $4, TAG590
mult $4, $4
addi $3, $4, 10
sb $3, 0($4)
TAG590:
lui $1, 14
lui $3, 6
bgez $3, TAG591
lui $2, 7
TAG591:
lui $1, 0
bltz $1, TAG592
mflo $3
addu $4, $1, $2
TAG592:
mtlo $4
blez $4, TAG593
mthi $4
mfhi $1
TAG593:
xori $2, $1, 1
blez $2, TAG594
sll $0, $0, 0
mthi $2
TAG594:
bne $2, $2, TAG595
slt $4, $2, $2
srlv $1, $2, $2
sll $0, $0, 0
TAG595:
mult $4, $4
srlv $1, $4, $4
lui $1, 6
sll $0, $0, 0
TAG596:
lhu $3, 0($4)
srlv $3, $4, $3
lui $4, 13
addiu $2, $3, 10
TAG597:
slti $2, $2, 8
mult $2, $2
bltz $2, TAG598
mflo $3
TAG598:
subu $2, $3, $3
bltz $3, TAG599
mfhi $2
mfhi $1
TAG599:
lui $1, 14
divu $1, $1
bgtz $1, TAG600
mfhi $3
TAG600:
lui $2, 10
sll $0, $0, 0
mult $2, $3
bne $3, $2, TAG601
TAG601:
multu $2, $2
sll $0, $0, 0
mflo $1
subu $1, $2, $2
TAG602:
bne $1, $1, TAG603
mtlo $1
sb $1, 0($1)
mult $1, $1
TAG603:
mfhi $4
srav $4, $4, $1
mult $1, $4
lhu $1, 0($4)
TAG604:
bgtz $1, TAG605
srl $4, $1, 6
srlv $3, $4, $1
sb $1, 0($4)
TAG605:
mtlo $3
lui $4, 7
mult $4, $4
sll $0, $0, 0
TAG606:
sll $0, $0, 0
addu $4, $4, $4
bgez $4, TAG607
sll $0, $0, 0
TAG607:
divu $4, $4
sll $0, $0, 0
mtlo $4
lui $4, 2
TAG608:
sll $0, $0, 0
srl $4, $4, 10
mflo $4
mflo $4
TAG609:
mflo $2
sll $0, $0, 0
beq $2, $2, TAG610
mflo $2
TAG610:
bltz $2, TAG611
ori $4, $2, 14
mflo $2
mflo $2
TAG611:
sll $0, $0, 0
lui $3, 4
and $3, $3, $3
lui $3, 11
TAG612:
bgtz $3, TAG613
mtlo $3
bgtz $3, TAG613
or $1, $3, $3
TAG613:
mult $1, $1
nor $1, $1, $1
sh $1, 1($1)
beq $1, $1, TAG614
TAG614:
sll $0, $0, 0
lui $4, 10
sll $0, $0, 0
bne $1, $4, TAG615
TAG615:
sll $0, $0, 0
sll $0, $0, 0
mfhi $4
mtlo $4
TAG616:
bgez $4, TAG617
lui $3, 6
mfhi $4
sw $4, 0($4)
TAG617:
bne $4, $4, TAG618
subu $1, $4, $4
mult $4, $1
bgez $1, TAG618
TAG618:
lui $2, 8
lui $3, 4
divu $3, $2
srl $3, $1, 6
TAG619:
subu $2, $3, $3
multu $2, $2
mfhi $3
srav $4, $3, $3
TAG620:
lh $4, 0($4)
addu $4, $4, $4
blez $4, TAG621
mfhi $1
TAG621:
mfhi $3
lui $2, 5
slti $4, $1, 8
bgez $4, TAG622
TAG622:
div $4, $4
sb $4, 0($4)
mult $4, $4
mflo $2
TAG623:
mfhi $2
lui $4, 9
srl $4, $2, 13
mult $4, $2
TAG624:
bne $4, $4, TAG625
multu $4, $4
lhu $1, 0($4)
mfhi $1
TAG625:
xor $3, $1, $1
srl $2, $3, 3
beq $3, $2, TAG626
mflo $4
TAG626:
mult $4, $4
bgtz $4, TAG627
sw $4, 0($4)
sh $4, 0($4)
TAG627:
beq $4, $4, TAG628
sb $4, 0($4)
mult $4, $4
lui $2, 2
TAG628:
lb $1, 0($2)
beq $2, $2, TAG629
xor $3, $1, $1
beq $1, $3, TAG629
TAG629:
mthi $3
mult $3, $3
sra $1, $3, 7
sllv $3, $1, $1
TAG630:
lui $3, 2
mfhi $2
beq $3, $3, TAG631
multu $2, $3
TAG631:
beq $2, $2, TAG632
sw $2, 0($2)
sll $4, $2, 13
sw $4, 0($4)
TAG632:
sub $4, $4, $4
lui $1, 3
bne $1, $4, TAG633
sll $2, $4, 12
TAG633:
sw $2, 0($2)
mult $2, $2
sh $2, 0($2)
mthi $2
TAG634:
mfhi $3
bgtz $3, TAG635
lui $4, 10
sll $0, $0, 0
TAG635:
lui $2, 10
lbu $1, 0($3)
sll $1, $1, 1
bne $1, $1, TAG636
TAG636:
mult $1, $1
srl $1, $1, 4
multu $1, $1
mthi $1
TAG637:
bltz $1, TAG638
mflo $1
srlv $2, $1, $1
lbu $1, 0($1)
TAG638:
beq $1, $1, TAG639
mtlo $1
bgtz $1, TAG639
lui $1, 14
TAG639:
xori $2, $1, 8
lui $3, 5
lh $4, 0($2)
ori $4, $4, 9
TAG640:
sh $4, -2313($4)
lui $4, 2
bgez $4, TAG641
and $4, $4, $4
TAG641:
sll $0, $0, 0
bne $4, $4, TAG642
srav $4, $4, $4
sll $0, $0, 0
TAG642:
sll $0, $0, 0
lui $4, 7
srl $2, $4, 0
beq $1, $4, TAG643
TAG643:
mthi $2
mthi $2
mfhi $4
divu $2, $4
TAG644:
sll $0, $0, 0
bne $1, $4, TAG645
mfhi $1
mult $1, $1
TAG645:
mflo $2
bgez $1, TAG646
subu $3, $2, $2
addi $3, $1, 9
TAG646:
beq $3, $3, TAG647
sb $3, 0($3)
div $3, $3
lbu $4, 0($3)
TAG647:
lui $1, 2
mult $4, $1
mthi $1
addiu $4, $4, 12
TAG648:
blez $4, TAG649
sll $0, $0, 0
sll $0, $0, 0
mflo $2
TAG649:
sh $2, 0($2)
addu $1, $2, $2
sb $1, 0($1)
srl $4, $1, 10
TAG650:
mfhi $1
lw $4, 0($4)
slt $3, $1, $1
mult $1, $3
TAG651:
addu $3, $3, $3
lhu $3, 0($3)
sw $3, 0($3)
sltiu $1, $3, 3
TAG652:
sltu $2, $1, $1
beq $1, $1, TAG653
mthi $1
blez $2, TAG653
TAG653:
mtlo $2
sw $2, 0($2)
lui $2, 4
bgez $2, TAG654
TAG654:
div $2, $2
sll $0, $0, 0
mtlo $2
lui $3, 13
TAG655:
mflo $3
and $1, $3, $3
mthi $1
sll $0, $0, 0
TAG656:
beq $3, $3, TAG657
sll $0, $0, 0
addu $2, $3, $3
mfhi $2
TAG657:
mthi $2
mfhi $4
sll $0, $0, 0
mthi $2
TAG658:
bltz $1, TAG659
sll $0, $0, 0
sltiu $2, $1, 9
mtlo $1
TAG659:
bne $2, $2, TAG660
sra $1, $2, 14
mtlo $2
lui $3, 7
TAG660:
sllv $3, $3, $3
multu $3, $3
sll $0, $0, 0
bne $3, $3, TAG661
TAG661:
mfhi $3
addu $2, $3, $3
mult $3, $3
xori $4, $3, 4
TAG662:
bltz $4, TAG663
nor $2, $4, $4
mfhi $4
multu $2, $4
TAG663:
sh $4, 0($4)
bltz $4, TAG664
lh $4, 0($4)
bgtz $4, TAG664
TAG664:
lui $2, 3
sltu $4, $2, $2
sll $2, $4, 1
mfhi $2
TAG665:
lui $1, 15
lui $3, 5
blez $3, TAG666
multu $2, $2
TAG666:
sll $0, $0, 0
lui $3, 12
mflo $4
addiu $1, $3, 4
TAG667:
beq $1, $1, TAG668
addiu $4, $1, 15
div $4, $4
lb $1, 0($4)
TAG668:
sll $0, $0, 0
sll $0, $0, 0
addiu $1, $3, 15
blez $3, TAG669
TAG669:
mfhi $1
mfhi $3
srl $1, $3, 12
bne $1, $1, TAG670
TAG670:
subu $1, $1, $1
mflo $1
slt $1, $1, $1
bne $1, $1, TAG671
TAG671:
lbu $1, 0($1)
multu $1, $1
lw $2, 0($1)
mflo $4
TAG672:
mfhi $4
and $1, $4, $4
bgtz $1, TAG673
mthi $4
TAG673:
mfhi $1
lui $2, 2
bltz $1, TAG674
mthi $1
TAG674:
lui $3, 12
xori $1, $2, 13
mthi $3
mflo $4
TAG675:
srav $4, $4, $4
mtlo $4
andi $3, $4, 11
lw $3, 0($3)
TAG676:
sltu $1, $3, $3
mfhi $4
mfhi $4
slt $4, $3, $1
TAG677:
lui $1, 5
lui $4, 8
mthi $4
srav $1, $4, $4
TAG678:
srav $1, $1, $1
or $2, $1, $1
lui $1, 14
sll $0, $0, 0
TAG679:
mfhi $2
or $3, $4, $4
addu $2, $4, $3
sll $0, $0, 0
TAG680:
mflo $3
mfhi $2
lbu $2, 0($3)
mtlo $3
TAG681:
lui $2, 7
mtlo $2
lui $4, 10
sll $0, $0, 0
TAG682:
sll $0, $0, 0
sll $0, $0, 0
lui $1, 6
addiu $4, $4, 14
TAG683:
beq $4, $4, TAG684
slt $2, $4, $4
bgtz $4, TAG684
lui $4, 6
TAG684:
div $4, $4
mfhi $1
lui $1, 3
addiu $1, $1, 5
TAG685:
lui $4, 6
multu $4, $4
lui $4, 7
bltz $4, TAG686
TAG686:
ori $4, $4, 11
mfhi $4
mult $4, $4
sw $4, 0($4)
TAG687:
lhu $2, 0($4)
multu $2, $4
multu $2, $2
subu $2, $2, $2
TAG688:
mthi $2
bgtz $2, TAG689
lui $4, 3
mflo $2
TAG689:
sll $0, $0, 0
divu $4, $4
sll $0, $0, 0
mthi $4
TAG690:
sh $2, -1296($2)
mfhi $1
mfhi $4
sllv $2, $2, $4
TAG691:
sll $0, $0, 0
bgez $2, TAG692
mtlo $3
addi $1, $2, 7
TAG692:
mtlo $1
mfhi $4
sll $0, $0, 0
mflo $4
TAG693:
bgtz $4, TAG694
lui $2, 3
lhu $3, 0($4)
lw $3, 0($3)
TAG694:
mfhi $1
sll $0, $0, 0
bgez $1, TAG695
mthi $1
TAG695:
sltiu $4, $1, 14
sb $1, 0($4)
sll $0, $0, 0
mflo $1
TAG696:
multu $1, $1
sll $0, $0, 0
bne $1, $1, TAG697
mthi $1
TAG697:
srlv $2, $1, $1
bgtz $1, TAG698
subu $3, $2, $2
srlv $2, $2, $1
TAG698:
sra $4, $2, 4
sll $3, $2, 6
sll $0, $0, 0
ori $2, $3, 1
TAG699:
sra $3, $2, 0
mthi $2
andi $1, $2, 1
srlv $2, $1, $1
TAG700:
multu $2, $2
lbu $3, 0($2)
mfhi $3
xori $3, $3, 4
TAG701:
sh $3, 0($3)
bne $3, $3, TAG702
lui $1, 2
sh $3, 0($3)
TAG702:
mthi $1
lui $2, 10
sll $0, $0, 0
bne $1, $1, TAG703
TAG703:
addu $2, $1, $1
srl $3, $1, 6
sll $0, $0, 0
bltz $3, TAG704
TAG704:
mult $3, $3
blez $3, TAG705
nor $3, $3, $3
mthi $3
TAG705:
lui $2, 2
multu $2, $3
slt $3, $3, $3
beq $2, $3, TAG706
TAG706:
mflo $1
subu $3, $3, $1
sll $0, $0, 0
bltz $4, TAG707
TAG707:
sb $4, -12288($4)
lw $1, -12288($4)
lb $4, -1280($1)
blez $4, TAG708
TAG708:
xori $2, $4, 7
lb $4, 0($2)
bne $4, $2, TAG709
lui $2, 12
TAG709:
lui $2, 1
xori $2, $2, 11
divu $2, $2
lui $4, 3
TAG710:
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
divu $4, $1
TAG711:
lui $2, 4
slt $2, $2, $2
mult $2, $2
srlv $1, $1, $2
TAG712:
bgtz $1, TAG713
mthi $1
sh $1, 0($1)
lhu $2, 0($1)
TAG713:
beq $2, $2, TAG714
slti $2, $2, 0
mfhi $1
mflo $1
TAG714:
bne $1, $1, TAG715
mthi $1
lui $2, 12
bgtz $1, TAG715
TAG715:
mthi $2
div $2, $2
lui $1, 8
sll $0, $0, 0
TAG716:
beq $1, $1, TAG717
addiu $2, $1, 10
lui $1, 0
sb $2, 0($1)
TAG717:
lui $3, 5
divu $1, $1
beq $1, $3, TAG718
mflo $2
TAG718:
xor $2, $2, $2
mthi $2
lui $3, 11
mflo $3
TAG719:
mfhi $1
divu $3, $3
sll $4, $1, 9
lb $1, 0($4)
TAG720:
multu $1, $1
mthi $1
bgez $1, TAG721
lh $4, 0($1)
TAG721:
mflo $3
nor $3, $3, $4
mfhi $1
lui $2, 5
TAG722:
sll $0, $0, 0
sll $0, $0, 0
mflo $3
divu $2, $4
TAG723:
mult $3, $3
srav $1, $3, $3
lui $4, 1
lui $1, 2
TAG724:
addiu $4, $1, 0
sra $1, $1, 2
xori $2, $4, 7
div $1, $1
TAG725:
bne $2, $2, TAG726
lui $1, 10
sll $0, $0, 0
sll $0, $0, 0
TAG726:
sll $0, $0, 0
xori $3, $2, 14
addiu $3, $3, 13
mthi $2
TAG727:
divu $3, $3
mthi $3
bltz $3, TAG728
mtlo $3
TAG728:
divu $3, $3
mthi $3
bne $3, $3, TAG729
addiu $1, $3, 7
TAG729:
bne $1, $1, TAG730
lui $3, 7
slti $1, $3, 13
bgez $1, TAG730
TAG730:
mfhi $3
sll $0, $0, 0
bgtz $3, TAG731
mult $1, $1
TAG731:
sll $0, $0, 0
sll $3, $2, 8
mtlo $2
mfhi $2
TAG732:
lui $1, 1
bgez $1, TAG733
lb $1, 0($2)
mult $2, $1
TAG733:
lb $1, 0($1)
lui $2, 14
bgez $1, TAG734
mthi $2
TAG734:
bne $2, $2, TAG735
nor $4, $2, $2
beq $2, $4, TAG735
lui $1, 4
TAG735:
beq $1, $1, TAG736
lui $4, 13
mfhi $2
lb $1, 0($2)
TAG736:
lui $1, 3
mthi $1
sll $0, $0, 0
bne $1, $3, TAG737
TAG737:
multu $3, $3
mfhi $1
sra $1, $3, 2
andi $1, $3, 1
TAG738:
sub $3, $1, $1
bltz $3, TAG739
mfhi $3
sub $3, $3, $1
TAG739:
divu $3, $3
sll $0, $0, 0
sll $0, $0, 0
blez $3, TAG740
TAG740:
andi $4, $3, 6
sll $0, $0, 0
lui $2, 13
bne $1, $2, TAG741
TAG741:
mflo $2
beq $2, $2, TAG742
mthi $2
ori $2, $2, 0
TAG742:
mtlo $2
addu $2, $2, $2
sh $2, 0($2)
blez $2, TAG743
TAG743:
mtlo $2
mflo $4
div $2, $2
lh $1, 0($4)
TAG744:
slti $4, $1, 10
mflo $1
mfhi $2
bgtz $1, TAG745
TAG745:
ori $4, $2, 15
or $4, $2, $2
mtlo $2
mflo $2
TAG746:
xori $3, $2, 12
mult $3, $3
slti $1, $2, 13
lb $2, 0($1)
TAG747:
lbu $4, 0($2)
divu $2, $2
mthi $2
blez $4, TAG748
TAG748:
nor $1, $4, $4
andi $4, $4, 7
lui $2, 10
xor $2, $4, $2
TAG749:
bltz $2, TAG750
mflo $4
bgtz $2, TAG750
xori $1, $4, 3
TAG750:
nop
nop
test_end:
beq $0, $0, test_end
nop |
Transynther/x86/_processed/AVXALIGN/_ht_zr_un_/i9-9900K_12_0xca_notsx.log_21829_572.asm | ljhsiun2/medusa | 9 | 165742 | .global s_prepare_buffers
s_prepare_buffers:
push %r15
push %r8
push %r9
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WC_ht+0x1c81e, %rdi
nop
nop
nop
nop
add $2695, %rcx
vmovups (%rdi), %ymm2
vextracti128 $1, %ymm2, %xmm2
vpextrq $1, %xmm2, %r8
nop
nop
nop
nop
dec %rsi
lea addresses_UC_ht+0x1291e, %rbp
nop
nop
nop
nop
and %rdx, %rdx
mov (%rbp), %r9w
nop
nop
nop
nop
xor %r9, %r9
lea addresses_UC_ht+0x19450, %r8
nop
nop
nop
nop
nop
sub $32503, %rdi
mov $0x6162636465666768, %r9
movq %r9, %xmm7
movups %xmm7, (%r8)
nop
nop
nop
nop
xor %rdx, %rdx
lea addresses_normal_ht+0x649e, %rsi
nop
nop
nop
nop
nop
dec %r8
mov $0x6162636465666768, %rbp
movq %rbp, %xmm4
vmovups %ymm4, (%rsi)
nop
nop
nop
nop
add $87, %rsi
lea addresses_D_ht+0xe34e, %rsi
lea addresses_D_ht+0x1e09e, %rdi
nop
nop
dec %r15
mov $79, %rcx
rep movsw
nop
nop
inc %r15
lea addresses_normal_ht+0xb89e, %r15
add %rsi, %rsi
movl $0x61626364, (%r15)
nop
nop
nop
and %rbp, %rbp
lea addresses_A_ht+0x689e, %rsi
lea addresses_D_ht+0x1a7e, %rdi
nop
nop
nop
nop
cmp %rbp, %rbp
mov $110, %rcx
rep movsw
nop
nop
nop
sub $46884, %rcx
lea addresses_D_ht+0x17a9e, %rbp
clflush (%rbp)
nop
nop
nop
add $14600, %rsi
mov $0x6162636465666768, %rdx
movq %rdx, %xmm2
vmovups %ymm2, (%rbp)
nop
nop
nop
nop
add %r15, %r15
lea addresses_WC_ht+0xa09e, %rsi
lea addresses_UC_ht+0x1e29e, %rdi
inc %r15
mov $125, %rcx
rep movsl
nop
sub $45132, %r9
lea addresses_WC_ht+0xca9e, %rsi
sub %rdx, %rdx
movw $0x6162, (%rsi)
nop
nop
nop
add $52593, %rdx
lea addresses_UC_ht+0x1dcde, %rsi
lea addresses_WC_ht+0x931e, %rdi
nop
nop
nop
nop
sub %r15, %r15
mov $89, %rcx
rep movsb
nop
nop
nop
nop
nop
and $15031, %rbp
lea addresses_normal_ht+0x68de, %rbp
nop
cmp %rdx, %rdx
mov (%rbp), %si
dec %rsi
lea addresses_UC_ht+0x3f9e, %rsi
lea addresses_UC_ht+0x154fe, %rdi
nop
nop
nop
nop
nop
xor $20549, %rbp
mov $88, %rcx
rep movsb
nop
nop
nop
nop
cmp $61961, %rsi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r8
pop %r15
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r13
push %r14
push %r8
push %rbx
push %rcx
// Store
lea addresses_RW+0xfe3e, %r14
nop
nop
nop
nop
nop
cmp %rcx, %rcx
movw $0x5152, (%r14)
dec %r13
// Store
lea addresses_normal+0xe5fe, %r13
nop
nop
cmp %r10, %r10
mov $0x5152535455565758, %rcx
movq %rcx, %xmm7
vmovups %ymm7, (%r13)
nop
nop
nop
nop
nop
sub $59224, %r14
// Store
lea addresses_RW+0x13f2e, %rbx
clflush (%rbx)
nop
nop
nop
nop
and %r8, %r8
movb $0x51, (%rbx)
nop
nop
nop
nop
nop
add $40667, %rbx
// Store
lea addresses_PSE+0x18c9e, %r11
nop
dec %r14
movb $0x51, (%r11)
add $19959, %rcx
// Store
lea addresses_normal+0x53db, %r11
nop
nop
nop
and %r8, %r8
mov $0x5152535455565758, %r14
movq %r14, %xmm3
movups %xmm3, (%r11)
nop
nop
nop
sub %r10, %r10
// Load
lea addresses_D+0xf73e, %r13
nop
cmp %rbx, %rbx
movb (%r13), %r8b
and $5353, %r10
// Faulty Load
lea addresses_PSE+0x18c9e, %r8
nop
nop
nop
nop
cmp %r14, %r14
movaps (%r8), %xmm4
vpextrq $1, %xmm4, %rcx
lea oracles, %r8
and $0xff, %rcx
shlq $12, %rcx
mov (%r8,%rcx,1), %rcx
pop %rcx
pop %rbx
pop %r8
pop %r14
pop %r13
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_PSE', 'NT': True, 'AVXalign': False, 'size': 8, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_RW', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 5}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 2}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_RW', 'NT': True, 'AVXalign': False, 'size': 1, 'congruent': 3}}
{'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 2}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': True, 'size': 16, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 7}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 7}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 9}}
{'OP': 'REPM', 'src': {'same': True, 'congruent': 3, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 8, 'type': 'addresses_D_ht'}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 9}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 10, 'type': 'addresses_A_ht'}, 'dst': {'same': False, 'congruent': 5, 'type': 'addresses_D_ht'}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 9}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 10, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_UC_ht'}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 9}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_UC_ht'}, 'dst': {'same': True, 'congruent': 7, 'type': 'addresses_WC_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 4}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 5, 'type': 'addresses_UC_ht'}}
{'46': 28, '00': 20955, '45': 845, '72': 1}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 00 45 00 00 00 00 00 00 00 00 00 45 45 00 45 00 00 00 00 00 00 00 00 45 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 45 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 45 45 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 46 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 46 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 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/C/nettle/nettle-3.0/x86_64/gcm-hash8.asm | GaloisInc/hacrypto | 34 | 178217 | <reponame>GaloisInc/hacrypto
C x86_64/gcm-hash8.asm
ifelse(<
Copyright (C) 2013 <NAME>
This file is part of GNU Nettle.
GNU Nettle is free software: you can redistribute it and/or
modify it under the terms of either:
* the GNU Lesser General Public License as published by the Free
Software Foundation; either version 3 of the License, or (at your
option) any later version.
or
* the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your
option) any later version.
or both in parallel, as here.
GNU Nettle 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 copies of the GNU General Public License and
the GNU Lesser General Public License along with this program. If
not, see http://www.gnu.org/licenses/.
>)
C Register usage:
define(<KEY>, <%rdi>)
define(<XP>, <%rsi>)
define(<LENGTH>, <%rdx>)
define(<SRC>, <%rcx>)
define(<X0>, <%rax>)
define(<X1>, <%rbx>)
define(<CNT>, <%ebp>)
define(<T0>, <%r8>)
define(<T1>, <%r9>)
define(<T2>, <%r10>)
define(<Z0>, <%r11>)
define(<Z1>, <%r12>)
define(<SHIFT_TABLE>, <%r13>)
.file "gcm-hash8.asm"
C void gcm_hash (const struct gcm_key *key, union gcm_block *x,
C size_t length, const uint8_t *data)
.text
ALIGN(16)
PROLOGUE(_nettle_gcm_hash8)
W64_ENTRY(4, 0)
push %rbx
push %rbp
push %r12
push %r13
sub $16, LENGTH
lea .Lshift_table(%rip), SHIFT_TABLE
mov (XP), X0
mov 8(XP), X1
jc .Lfinal
ALIGN(16)
.Lblock_loop:
xor (SRC), X0
xor 8(SRC), X1
.Lblock_mul:
rol $8, X1
movzbl LREG(X1), XREG(T1)
shl $4, T1
mov (KEY, T1), Z0
mov 8(KEY, T1), Z1
C shift Z1, Z0, transforming
C +-----------------------+-----------------------+
C |15 14 13 12 11 10 09 08|07 06 05 04 03 02 01 00|
C +-----------------------+-----------------------+
C into
C +-----------------------+-----------------------+
C |14 13 12 11 10 09 08 07|06 05 04 03 02 01 00 |
C +-----------------------+-----------------+-----+
C xor |T[15]|
C +-----+
mov $7, CNT
ALIGN(16)
.Loop_X1:
mov Z1, T1
shr $56, T1
shl $8, Z1
mov Z0, T0
shl $8, Z0
shr $56, T0
movzwl (SHIFT_TABLE, T1, 2), XREG(T1)
xor T1, Z0
rol $8, X1
movzbl LREG(X1), XREG(T2)
shl $4, T2
xor (KEY, T2), Z0
add T0, Z1
xor 8(KEY, T2), Z1
decl CNT
jne .Loop_X1
mov $7, CNT
ALIGN(16)
.Loop_X0:
mov Z1, T1
shr $56, T1
shl $8, Z1
mov Z0, T0
shl $8, Z0
shr $56, T0
movzwl (SHIFT_TABLE, T1, 2), XREG(T1)
xor T1, Z0
rol $8, X0
movzbl LREG(X0), XREG(T2)
shl $4, T2
xor (KEY, T2), Z0
add T0, Z1
xor 8(KEY, T2), Z1
decl CNT
jne .Loop_X0
mov Z1, T1
shr $56, T1
shl $8, Z1
mov Z0, T0
shl $8, Z0
shr $56, T0
movzwl (SHIFT_TABLE, T1, 2), XREG(T1)
xor T1, Z0
rol $8, X0
movzbl LREG(X0), XREG(T2)
shl $4, T2
mov (KEY, T2), X0
xor Z0, X0
add T0, Z1
mov 8(KEY, T2), X1
xor Z1, X1
add $16, SRC
sub $16, LENGTH
jnc .Lblock_loop
.Lfinal:
add $16, LENGTH
jnz .Lpartial
mov X0, (XP)
mov X1, 8(XP)
pop %r13
pop %r12
pop %rbp
pop %rbx
W64_EXIT(4, 0)
ret
.Lpartial:
C Read and xor partial block, then jump back into the loop
C with LENGTH == 0.
cmp $8, LENGTH
jc .Llt8
C 8 <= LENGTH < 16
xor (SRC), X0
add $8, SRC
sub $8, LENGTH
jz .Lblock_mul
call .Lread_bytes
xor T0, X1
jmp .Lblock_mul
.Llt8: C 0 < LENGTH < 8
call .Lread_bytes
xor T0, X0
jmp .Lblock_mul
C Read 0 < LENGTH < 8 bytes at SRC, result in T0
.Lread_bytes:
xor T0, T0
sub $1, SRC
ALIGN(16)
.Lread_loop:
shl $8, T0
orb (SRC, LENGTH), LREG(T0)
.Lread_next:
sub $1, LENGTH
jnz .Lread_loop
ret
EPILOGUE(_nettle_gcm_hash8)
define(<W>, <0x$2$1>)
RODATA
ALIGN(2)
.Lshift_table:
.short W(00,00),W(01,c2),W(03,84),W(02,46),W(07,08),W(06,ca),W(04,8c),W(05,4e)
.short W(0e,10),W(0f,d2),W(0d,94),W(0c,56),W(09,18),W(08,da),W(0a,9c),W(0b,5e)
.short W(1c,20),W(1d,e2),W(1f,a4),W(1e,66),W(1b,28),W(1a,ea),W(18,ac),W(19,6e)
.short W(12,30),W(13,f2),W(11,b4),W(10,76),W(15,38),W(14,fa),W(16,bc),W(17,7e)
.short W(38,40),W(39,82),W(3b,c4),W(3a,06),W(3f,48),W(3e,8a),W(3c,cc),W(3d,0e)
.short W(36,50),W(37,92),W(35,d4),W(34,16),W(31,58),W(30,9a),W(32,dc),W(33,1e)
.short W(24,60),W(25,a2),W(27,e4),W(26,26),W(23,68),W(22,aa),W(20,ec),W(21,2e)
.short W(2a,70),W(2b,b2),W(29,f4),W(28,36),W(2d,78),W(2c,ba),W(2e,fc),W(2f,3e)
.short W(70,80),W(71,42),W(73,04),W(72,c6),W(77,88),W(76,4a),W(74,0c),W(75,ce)
.short W(7e,90),W(7f,52),W(7d,14),W(7c,d6),W(79,98),W(78,5a),W(7a,1c),W(7b,de)
.short W(6c,a0),W(6d,62),W(6f,24),W(6e,e6),W(6b,a8),W(6a,6a),W(68,2c),W(69,ee)
.short W(62,b0),W(63,72),W(61,34),W(60,f6),W(65,b8),W(64,7a),W(66,3c),W(67,fe)
.short W(48,c0),W(49,02),W(4b,44),W(4a,86),W(4f,c8),W(4e,0a),W(4c,4c),W(4d,8e)
.short W(46,d0),W(47,12),W(45,54),W(44,96),W(41,d8),W(40,1a),W(42,5c),W(43,9e)
.short W(54,e0),W(55,22),W(57,64),W(56,a6),W(53,e8),W(52,2a),W(50,6c),W(51,ae)
.short W(5a,f0),W(5b,32),W(59,74),W(58,b6),W(5d,f8),W(5c,3a),W(5e,7c),W(5f,be)
.short W(e1,00),W(e0,c2),W(e2,84),W(e3,46),W(e6,08),W(e7,ca),W(e5,8c),W(e4,4e)
.short W(ef,10),W(ee,d2),W(ec,94),W(ed,56),W(e8,18),W(e9,da),W(eb,9c),W(ea,5e)
.short W(fd,20),W(fc,e2),W(fe,a4),W(ff,66),W(fa,28),W(fb,ea),W(f9,ac),W(f8,6e)
.short W(f3,30),W(f2,f2),W(f0,b4),W(f1,76),W(f4,38),W(f5,fa),W(f7,bc),W(f6,7e)
.short W(d9,40),W(d8,82),W(da,c4),W(db,06),W(de,48),W(df,8a),W(dd,cc),W(dc,0e)
.short W(d7,50),W(d6,92),W(d4,d4),W(d5,16),W(d0,58),W(d1,9a),W(d3,dc),W(d2,1e)
.short W(c5,60),W(c4,a2),W(c6,e4),W(c7,26),W(c2,68),W(c3,aa),W(c1,ec),W(c0,2e)
.short W(cb,70),W(ca,b2),W(c8,f4),W(c9,36),W(cc,78),W(cd,ba),W(cf,fc),W(ce,3e)
.short W(91,80),W(90,42),W(92,04),W(93,c6),W(96,88),W(97,4a),W(95,0c),W(94,ce)
.short W(9f,90),W(9e,52),W(9c,14),W(9d,d6),W(98,98),W(99,5a),W(9b,1c),W(9a,de)
.short W(8d,a0),W(8c,62),W(8e,24),W(8f,e6),W(8a,a8),W(8b,6a),W(89,2c),W(88,ee)
.short W(83,b0),W(82,72),W(80,34),W(81,f6),W(84,b8),W(85,7a),W(87,3c),W(86,fe)
.short W(a9,c0),W(a8,02),W(aa,44),W(ab,86),W(ae,c8),W(af,0a),W(ad,4c),W(ac,8e)
.short W(a7,d0),W(a6,12),W(a4,54),W(a5,96),W(a0,d8),W(a1,1a),W(a3,5c),W(a2,9e)
.short W(b5,e0),W(b4,22),W(b6,64),W(b7,a6),W(b2,e8),W(b3,2a),W(b1,6c),W(b0,ae)
.short W(bb,f0),W(ba,32),W(b8,74),W(b9,b6),W(bc,f8),W(bd,3a),W(bf,7c),W(be,be)
|
resources/scripts/api/bgpview.ads | mindfuckup/Amass | 0 | 22416 | <reponame>mindfuckup/Amass
-- Copyright 2021 <NAME>. All rights reserved.
-- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
local json = require("json")
name = "BGPView"
type = "api"
function start()
setratelimit(1)
end
function asn(ctx, addr, asn)
local cfg = datasrc_config()
if (cfg == nil) then
return
end
local prefix
if (asn == 0) then
if (addr == "") then
return
end
local ip, prefix = getcidr(ctx, addr, cfg.ttl)
if (ip == "") then
return
end
asn = getasn(ctx, ip, prefix, cfg.ttl)
if (asn == 0) then
return
end
end
local a = asinfo(ctx, asn, cfg.ttl)
if (a == nil) then
return
end
local cidrs = netblocks(ctx, asn, cfg.ttl)
if (cidrs == nil or #cidrs == 0) then
return
end
if (prefix == "") then
prefix = cidrs[1]
parts = split(prefix, "/")
addr = parts[1]
end
newasn(ctx, {
['addr']=addr,
['asn']=asn,
['prefix']=prefix,
['cc']=a.cc,
['registry']=a.registry,
['desc']=a.desc,
['netblocks']=cidrs,
})
end
function getcidr(ctx, addr, ttl)
local resp = cacherequest(ctx, "https://api.bgpview.io/ip/" .. addr, ttl)
if (resp == "") then
return "", 0
end
local j = json.decode(resp)
if (j == nil or j.status ~= "ok" or j.status_message ~= "Query was successful") then
return "", 0
end
local ip = j.data.rir_allocation.ip
local cidr = j.data.rir_allocation.cidr
return ip, cidr
end
function getasn(ctx, ip, cidr, ttl)
local u = "https://api.bgpview.io/prefix/" .. ip .. "/" .. tostring(cidr)
local resp = cacherequest(ctx, u, ttl)
if resp == "" then
return 0
end
local j = json.decode(resp)
if (j == nil or j.status ~= "ok" or j.status_message ~= "Query was successful") then
return 0
end
local last = #(j.data.asns)
if (last == 0) then
return 0
end
return j.data.asns[last].asn
end
function asinfo(ctx, asn, ttl)
resp = cacherequest(ctx, "https://api.bgpview.io/asn/" .. tostring(asn), ttl)
if (resp == "") then
return nil
end
j = json.decode(resp)
if (j == nil or j.status ~= "ok" or j.status_message ~= "Query was successful") then
return nil
end
local registry = ""
if (#(j.data.rir_allocation) > 0) then
registry = j.data.rir_allocation.rir_name
end
local name = ""
if (j.data.name ~= nil) then
name = name .. j.data.name
end
if (j.data.description_full ~= nil) then
name = name .. " -"
for _, desc in pairs(j.data.description_full) do
name = name .. " " .. desc
end
end
return {
['asn']=asn,
desc=name,
cc=j.data.country_code,
['registry']=registry,
}
end
function netblocks(ctx, asn, ttl)
local u = "https://api.bgpview.io/asn/" .. tostring(asn) .. "/prefixes"
local resp = cacherequest(ctx, u, ttl)
if (resp == "") then
return nil
end
local j = json.decode(resp)
if (j == nil or j.status ~= "ok" or j.status_message ~= "Query was successful") then
return nil
end
local netblocks = {}
for i, p in pairs(j.data.ipv4_prefixes) do
table.insert(netblocks, p.ip .. "/" .. tostring(p.cidr))
end
for i, p in pairs(j.data.ipv6_prefixes) do
table.insert(netblocks, p.ip .. "/" .. tostring(p.cidr))
end
return netblocks
end
function cacherequest(ctx, url, ttl)
local resp, err = request(ctx, {
['url']=url,
headers={['Content-Type']="application/json"},
})
if (err ~= nil and err ~= "") then
return ""
end
return resp
end
function split(str, delim)
local result = {}
local pattern = "[^%" .. delim .. "]+"
local matches = find(str, pattern)
if (matches == nil or #matches == 0) then
return result
end
for i, match in pairs(matches) do
table.insert(result, match)
end
return result
end
|
tests/syntax_test_data_directives.asm | dougmasten/dougmasten-sublime-assembly-6809 | 5 | 17543 | <reponame>dougmasten/dougmasten-sublime-assembly-6809
# SYNTAX TEST "Packages/Assembly-6809/Assembly-6809.sublime-syntax"
# <- source.mc6809
buffer_size equ $a1a2
; Include one or more constant bytes (seperated by commas) in the output
fcb 1,2,3 comment
# ^^^ storage.type
# ^ constant.numeric.decimal
# ^ operator.separator
# ^ constant.numeric.decimal
# ^ operator.separator
# ^ constant.numeric.decimal
# ^^^^^^^ comment.line
.db $a,$b,$c comment
# ^^^ storage.type
# ^^ constant.numeric.hexadecimal
# ^ operator.separator
# ^^ constant.numeric.hexadecimal
# ^ operator.separator
# ^^ constant.numeric.hexadecimal
# ^^^^^^^ comment.line
.byte %01010101,%10101010,%10010110 comment
# ^^^^^ storage.type
# ^^^^^^^^^ constant.numeric.binary
# ^ operator.separator
# ^^^^^^^^^ constant.numeric.binary
# ^ operator.separator
# ^^^^^^^^^ constant.numeric.binary
# ^^^^^^^ comment.line
; Include one or more words (seperated by commas) in the output
fdb 65535,0,65535 comment
# ^^^ storage.type
# ^^^^^ constant.numeric.decimal
# ^ operator.separator
# ^ constant.numeric.decimal
# ^ operator.separator
# ^^^^^ constant.numeric.decimal
# ^^^^^^^ comment.line
.dw $aaaa,$bbbb,$cccc comment
# ^^^ storage.type
# ^^^^^ constant.numeric.hexadecimal
# ^ operator.separator
# ^^^^^ constant.numeric.hexadecimal
# ^ operator.separator
# ^^^^^ constant.numeric.hexadecimal
# ^^^^^^^ comment.line
.word %0000111100001111,%1111000011110000 comment
# ^^^^^ storage.type
# ^^^^^^^^^^^^^^^^^ constant.numeric.binary
# ^ operator.separator
# ^^^^^^^^^^^^^^^^^ constant.numeric.binary
# ^^^^^^^ comment.line
; Include one or more double words (seperated by commas) in the output
fqb 1,2,3,4 comment
# ^^^ storage.type
# ^ constant.numeric.decimal
# ^ operator.separator
# ^ constant.numeric.decimal
# ^ operator.separator
# ^ constant.numeric.decimal
# ^ operator.separator
# ^ constant.numeric.decimal
# ^^^^^^^ comment.line
.quad 1,2,3,4 comment
# ^^^^^ storage.type
# ^ constant.numeric.decimal
# ^ operator.separator
# ^ constant.numeric.decimal
# ^ operator.separator
# ^ constant.numeric.decimal
# ^ operator.separator
# ^ constant.numeric.decimal
# ^^^^^^^ comment.line
.4byte 1,2,3,4 comment
# ^^^^^^ storage.type
# ^ constant.numeric.decimal
# ^ operator.separator
# ^ constant.numeric.decimal
# ^ operator.separator
# ^ constant.numeric.decimal
# ^ operator.separator
# ^ constant.numeric.decimal
# ^^^^^^^ comment.line
; Include a string of text in the output
fcc /Testing/ comment
# ^^^ storage.type
; ^ punctuation.definition.string.begin
; ^^^^^^^^^ string.quoted.other
; ^ punctuation.definition.string.end
.ascii "Testing" comment
# ^^^^^^ storage.type
# ^ punctuation.definition.string.begin
# ^^^^^^^^^ string.quoted.double
# ^ punctuation.definition.string.end
# ^^^^^^^ comment.line
.str "Testing" comment
# ^^^^ storage.type
# ^ punctuation.definition.string.begin
# ^^^^^^^^^ string.quoted.double
# ^ punctuation.definition.string.end
# ^^^^^^^ comment.line
; Include a NUL terminated string of text in the output
fcn "Testing" comment
# ^^^ storage.type
# ^ punctuation.definition.string.begin
# ^^^^^^^^^ string.quoted.double
# ^ punctuation.definition.string.end
fcz "Testing" comment
# ^^^ storage.type
# ^ punctuation.definition.string.begin
# ^^^^^^^^^ string.quoted.double
# ^ punctuation.definition.string.end
.asciz "Testing" comment
# ^^^^^^ storage.type
# ^ punctuation.definition.string.begin
# ^^^^^^^^^ string.quoted.double
# ^ punctuation.definition.string.end
.strz "Testing" comment
# ^^^^^ storage.type
# ^ punctuation.definition.string.begin
# ^^^^^^^^^ string.quoted.double
# ^ punctuation.definition.string.end
# ^^^^^^^ comment.line
; Include a string of text in the output with bit 7 of the final byte set.
fcs /Testing/ comment
# ^^^ storage.type
# ^^^^^^^^^ string.unquoted
.ascis "Testing" comment
# ^^^^^^ storage.type
# ^ punctuation.definition.string.begin
# ^^^^^^^^^ string.quoted.double
# ^ punctuation.definition.string.end
# ^^^^^^^ comment.line
.strs "Testing" comment
# ^^^^^ storage.type
# ^ punctuation.definition.string.begin
# ^^^^^^^^^ string.quoted.double
# ^ punctuation.definition.string.end
# ^^^^^^^ comment.line
; Include a number of NUL bytes in the output
zmb 80 comment
# ^^^ storage.type
# ^^ constant.numeric.decimal
# ^^^^^^^ comment.line
; Include a number of zero words in the output
zmd 128 comment
# ^^^ storage.type
# ^^^ constant.numeric.decimal
# ^^^^^^^ comment.line
; Include a number of zero double-words in the output
zmq 128 comment
# ^^^ storage.type
# ^^^ constant.numeric.decimal
# ^^^^^^^ comment.line
; Reserve a number of bytes in the output
rmb 32*32*32 comment
# ^^^ storage.type
# ^^ constant.numeric.decimal
# ^ keyword.operator.arithmetic
# ^^ constant.numeric.decimal
# ^ keyword.operator.arithmetic
# ^^ constant.numeric.decimal
# ^^^^^^^ comment.line
rmb buffer_size comment
# ^^^ storage.type
# ^^^^^^^^^^^ constant.other
# ^^^^^^^ comment.line
.blkb 32 comment
# ^^^^^ storage.type
# ^^ constant.numeric.decimal
# ^^^^^^^ comment.line
.ds 32 comment
# ^^^ storage.type
# ^^ constant.numeric.decimal
# ^^^^^^^ comment.line
.rs 32 comment
# ^^^ storage.type
# ^^ constant.numeric.decimal
# ^^^^^^^ comment.line
; Reserve a number of words in the output
rmd 128+31-$f comment
# ^^^ storage.type
# ^^^ constant.numeric.decimal
# ^ keyword.operator.arithmetic
# ^^ constant.numeric.decimal
# ^ keyword.operator.arithmetic
# ^^ constant.numeric.hexadecimal
# ^^^^^^^ comment.line
; Reserve a number of double-words in the output
rmq 32 comment
# ^^^ storage.type
# ^^ constant.numeric.decimal
# ^^^^^^^ comment.line
; Treat the contents of filename as a string of bytes to be included
includebin syntax_test_6809_mnemonics.asm
# ^^^^^^^^^^ support.function.directive.misc
; Insert size bytes of byte
fill $ff,10 comment
# ^^^^ storage.type
# ^^^ constant.numeric.hexadecimal
# ^ operator.separator
# ^^ constant.numeric.decimal
# ^^^^^^^ comment.line
rzb 10
# ^^^ storage.type
# ^^ constant.numeric.decimal
zmb 10
# ^^^ storage.type
# ^^ constant.numeric.decimal
bsz 10
# ^^^ storage.type
# ^^ constant.numeric.decimal
|
Transynther/x86/_processed/AVXALIGN/_zr_/i7-8650U_0xd2.log_9099_1077.asm | ljhsiun2/medusa | 9 | 165839 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r8
push %rax
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_A_ht+0x1d783, %rcx
nop
add $51198, %rsi
movl $0x61626364, (%rcx)
nop
nop
sub %r8, %r8
lea addresses_WT_ht+0x8569, %rsi
lea addresses_WT_ht+0x89c9, %rdi
cmp %rax, %rax
mov $14, %rcx
rep movsb
nop
nop
nop
nop
and $35158, %rax
lea addresses_WC_ht+0x81f, %rcx
cmp $53618, %rdx
mov (%rcx), %edi
nop
nop
sub $2704, %rcx
lea addresses_A_ht+0x4949, %rdi
nop
nop
nop
nop
inc %r8
movl $0x61626364, (%rdi)
dec %r12
lea addresses_D_ht+0x19049, %rax
nop
nop
nop
add $23455, %rsi
mov (%rax), %di
nop
nop
nop
nop
cmp $557, %rdi
lea addresses_normal_ht+0x9549, %rax
nop
nop
nop
nop
add $56634, %rsi
movups (%rax), %xmm1
vpextrq $0, %xmm1, %rcx
nop
nop
nop
nop
and %rax, %rax
lea addresses_UC_ht+0x165c9, %r8
nop
nop
nop
nop
nop
dec %rdi
mov (%r8), %esi
nop
nop
nop
nop
dec %r12
lea addresses_D_ht+0x14d49, %rsi
lea addresses_UC_ht+0x165a1, %rdi
nop
nop
nop
nop
add $9128, %rbp
mov $26, %rcx
rep movsw
nop
nop
nop
nop
and $14156, %rbp
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r8
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r14
push %r8
push %rax
push %rdx
push %rsi
// Store
lea addresses_RW+0xdf49, %r11
nop
nop
sub %r10, %r10
movl $0x51525354, (%r11)
nop
nop
nop
nop
nop
xor %rdx, %rdx
// Store
mov $0x74580c0000000549, %r8
nop
nop
nop
add $615, %r11
movl $0x51525354, (%r8)
nop
nop
nop
nop
nop
cmp %r8, %r8
// Store
lea addresses_RW+0x5b49, %r11
nop
nop
nop
nop
xor $22974, %r14
movl $0x51525354, (%r11)
nop
nop
nop
nop
and $50514, %r10
// Faulty Load
lea addresses_WC+0x10549, %r14
nop
nop
sub %rax, %rax
vmovaps (%r14), %ymm5
vextracti128 $1, %ymm5, %xmm5
vpextrq $0, %xmm5, %r11
lea oracles, %rax
and $0xff, %r11
shlq $12, %r11
mov (%rax,%r11,1), %r11
pop %rsi
pop %rdx
pop %rax
pop %r8
pop %r14
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'size': 4, 'AVXalign': True, 'NT': False, 'congruent': 8, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'size': 4, 'AVXalign': False, 'NT': True, 'congruent': 9, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 32, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False, 'NT': True, 'congruent': 8, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}}
{'00': 9099}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
programs/oeis/158/A158253.asm | karttu/loda | 1 | 14769 | <reponame>karttu/loda
; A158253: 289n - 1.
; 288,577,866,1155,1444,1733,2022,2311,2600,2889,3178,3467,3756,4045,4334,4623,4912,5201,5490,5779,6068,6357,6646,6935,7224,7513,7802,8091,8380,8669,8958,9247,9536,9825,10114,10403,10692,10981,11270,11559,11848,12137,12426,12715,13004,13293,13582,13871,14160,14449,14738,15027,15316,15605,15894,16183,16472,16761,17050,17339,17628,17917,18206,18495,18784,19073,19362,19651,19940,20229,20518,20807,21096,21385,21674,21963,22252,22541,22830,23119,23408,23697,23986,24275,24564,24853,25142,25431,25720,26009,26298,26587,26876,27165,27454,27743,28032,28321,28610,28899,29188,29477,29766,30055,30344,30633,30922,31211,31500,31789,32078,32367,32656,32945,33234,33523,33812,34101,34390,34679,34968,35257,35546,35835,36124,36413,36702,36991,37280,37569,37858,38147,38436,38725,39014,39303,39592,39881,40170,40459,40748,41037,41326,41615,41904,42193,42482,42771,43060,43349,43638,43927,44216,44505,44794,45083,45372,45661,45950,46239,46528,46817,47106,47395,47684,47973,48262,48551,48840,49129,49418,49707,49996,50285,50574,50863,51152,51441,51730,52019,52308,52597,52886,53175,53464,53753,54042,54331,54620,54909,55198,55487,55776,56065,56354,56643,56932,57221,57510,57799,58088,58377,58666,58955,59244,59533,59822,60111,60400,60689,60978,61267,61556,61845,62134,62423,62712,63001,63290,63579,63868,64157,64446,64735,65024,65313,65602,65891,66180,66469,66758,67047,67336,67625,67914,68203,68492,68781,69070,69359,69648,69937,70226,70515,70804,71093,71382,71671,71960,72249
mov $1,$0
mul $1,289
add $1,288
|
assembler/tests/t_hmcs4x/t_hmcs4x.asm | paulscottrobson/RCA-Cosmac-VIP-III | 0 | 16433 | cpu HD614023
page 0
lai 7
ld #7,a ; AS-specific equivalent
lbi 12
ld #12,b ; AS-specific equivalent
lmid 3,$7f
ld #3,$7f ; AS-specific equivalent
lmiiy 4
ld #4,m+ ; AS-specific equivalent
lab
ld b,a ; AS-specific equivalent
lba
ld a,b ; AS-specific equivalent
lay
ld y,a ; AS-specific equivalent
laspx
ld spx,a ; AS-specific equivalent
laspy
ld spy,a ; AS-specific equivalent
lamr 5
ld mr5,a ; AS-specific equivalent
xmra 1
xch a,mr1 ; AS-specific equivalent
xch mr1,a ; AS-specific equivalent
lwi 3
ld #3,w ; AS-specific equivalent
lxi 2
ld #2,x ; AS-specific equivalent
lyi 4
ld #4,y ; AS-specific equivalent
lxa
ld a,x ; AS-specific equivalent
lya
ld a,y ; AS-specific equivalent
iy
inc y ; AS-specific equivalent
dy
dec y ; AS-specific equivalent
ayy
add a,y ; AS-specific equivalent
syy
sub a,y ; AS-specific equivalent
xspx
xch x,spx ; AS-specific equivalent
xch spx,x ; AS-specific equivalent
xspy
xch y,spy ; AS-specific equivalent
xch spy,y ; AS-specific equivalent
xspxy
lam
ld m,a ; AS-specific equivalent
lamx
lamy
lamxy
lamd $7e
ld $7e,a ; AS-specific equivalent
lbm
ld m,b ; AS-specific equivalent
lbmx
lbmy
lbmxy
lma
ld a,m ; AS-specific equivalent
lmax
lmay
lmaxy
lmad $7d
ld a,$7d ; AS-specific equivalent
lmaiy
ld a,m+ ; AS-specific equivalent
lmaiyx
lmady
ld a,m- ; AS-specific equivalent
lmadyx
xma
xch a,m ; AS-specific equivalent
xch m,a
xmax
xmay
xmaxy
xmad $7d
xch a,$7d ; AS-specific equivalent
xch $7d,a ; AS-specific equivalent
xmb
xch b,m ; AS-specific equivalent
xch m,b ; AS-specific equivalent
xmbx
xmby
xmbxy
ai 5
add #5,a ; AS-specific equivalent
ib
inc b ; AS-specific equivalent
db
dec b ; AS-specific equivalent
daa
das
nega
comb
rotr
rotl
sec
bset ca ; AS-specific equivalent
rec
bclr ca ; AS-specific equivalent
tc
btst ca ; AS-specific equivalent
am
add m,a ; AS-specific equivalent
amd $7c
add $7c,a ; AS-specific equivalent
amc
adc m,a ; AS-specific equivalent
amcd $7b
adc $7b,a ; AS-specific equivalent
smc
sbc m,a ; AS-specific equivalent
smcd $7a
sbc $7a,a ; AS-specific equivalent
or
or b,a ; AS-specific equivalent
anm
and m,a ; AS-specific equivalent
anmd $79
and $79,a ; AS-specific equivalent
orm
or m,a ; AS-specific equivalent
ormd $78
or $78,a ; AS-specific equivalent
eorm
eor m,a ; AS-specific equivalent
eormd $77
eor $77,a ; AS-specific equivalent
inem 6
cp ne,m,#6 ; AS-specific equivalent
cp ne,#6,m ; AS-specific equivalent
inemd 5,$76
cp ne,$76,#5 ; AS-specific equivalent
cp ne,#5,$76 ; AS-specific equivalent
anem
cp ne,m,a ; AS-specific equivalent
cp ne,a,m ; AS-specific equivalent
anemd $75
cp ne,$75,a ; AS-specific equivalent
cp ne,a,$75 ; AS-specific equivalent
bnem
cp ne,m,b ; AS-specific equivalent
cp ne,b,m ; AS-specific equivalent
ynei 9
cp ne,#9,y ; AS-specific equivalent
cp ne,y,#9 ; AS-specific equivalent
ilem 8
cp le,m,#8 ; AS-specific equivalent
ilemd 7,$74
cp le,$74,#7 ; AS-specific equivalent
alem
cp le,m,a ; AS-specific equivalent
alemd $73
cp le,$73,a ; AS-specific equivalent
blem
cp le,m,b ; AS-specific equivalent
alei 2
cp le,#2,a ; AS-specific equivalent
sem 1
bset 1,m ; AS-specific equivalent
semd 2,$72
bset 2,$72 ; AS-specific equivalent
rem 3
bclr 3,m ; AS-specific equivalent
remd 0,$71
bclr 0,$71 ; AS-specific equivalent
tm 1
btst 1,m ; AS-specific equivalent
tmd 2,$70
btst 2,$70 ; AS-specific equivalent
br $ab
brl $7ab
jmpl $7ab
cal 5
call $7ab
tbr 4
rtn
rtni
sed
sedd 1
red
redd 2
td
tdd 3
lar 4
lbr 5
lra 6
lrb 7
p 8
nop
sby
stop
|
kernel/asmfunc.asm | three-0-3/my-mikanos | 0 | 167555 | ; asmfunc.asm
;
; System V AMD64 Calling Convention
; Registers: RDI, RSI, RDX, RCX, R8, R9
bits 64
section .text
global IoOut32 ; void IoOut32(uint16_t addr, uint32_t data);
IoOut32:
mov dx, di ; dx = addr
mov eax, esi ; eax = data
out dx, eax
ret
global IoIn32 ; uint32_t IoIn32(uint16_t addr);
IoIn32:
mov dx, di ; dx = addr
in eax, dx
ret
global GetCS ; uint16_t GetCS(void);
GetCS:
mov ax, cs
ret
global LoadIDT ; void LoadIDT(uint16_t limit, uint64_t offset);
LoadIDT:
push rbp ; save the base pointer
mov rbp, rsp ; save the current stack pointer in rbp
sub rsp, 10
mov [rsp], di ; limit
mov [rsp + 2], rsi ; offset
lidt [rsp]
mov rsp, rbp ; load the stack pointer from rbp
pop rbp ; load the base pointer
ret
global LoadGDT ; void LoadGDT(uint16_t limit, uint64_t offset);
LoadGDT:
push rbp
mov rbp, rsp
sub rsp, 10
mov [rsp], di ; limit
mov [rsp + 2], rsi ; offset
lgdt [rsp]
mov rsp, rbp ; load the stack pointer from rbp
pop rbp ; load the base pointer
ret
global SetDSAll ; void SetDSAll(uint16_t value);
SetDSAll:
mov ds, di
mov es, di
mov fs, di
mov gs, di
ret
global SetCSSS ; void SetCSSS(uint16_t cs, uint16_t ss);
SetCSSS:
push rbp
mov rbp, rsp
mov ss, si ; ss
mov rax, .next ; to continue from .next after retf
push rdi ; cs
push rax ; rip
o64 retf ; use retf as mov cannot be used to set cs
.next:
mov rsp, rbp
pop rbp
ret
global SetCR3 ; void SetCR3(uint64_t value)
SetCR3:
mov cr3, rdi ; value
ret
extern kernel_main_stack
extern KernelMainNewStack
global KernelMain
KernelMain:
mov rsp, kernel_main_stack + 1024 * 1024 ; set the bottom address for new stack
call KernelMainNewStack
.fin: ; IP never returns here but just in case
hlt
jmp .fin |
Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnarl/a-intnam.ads | djamal2727/Main-Bearing-Analytical-Model | 0 | 22901 | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . I N T E R R U P T S . N A M E S --
-- --
-- S p e c --
-- --
-- Copyright (C) 1995-2020, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
------------------------------------------------------------------------------
-- The standard implementation of this spec contains only dummy interrupt
-- names. These dummy entries permit checking out code for correctness of
-- semantics, even if interrupts are not supported.
-- For specific implementations that fully support interrupts, this package
-- spec is replaced by an implementation dependent version that defines the
-- interrupts available on the system.
package Ada.Interrupts.Names is
-- All identifiers in this unit are implementation defined
pragma Implementation_Defined;
DUMMY_INTERRUPT_1 : constant Interrupt_ID := 1;
DUMMY_INTERRUPT_2 : constant Interrupt_ID := 2;
end Ada.Interrupts.Names;
|
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48_notsx.log_6_1948.asm | ljhsiun2/medusa | 9 | 10966 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x1aa52, %rbx
nop
add %rdi, %rdi
mov $0x6162636465666768, %rcx
movq %rcx, (%rbx)
nop
nop
nop
nop
add %r11, %r11
lea addresses_WT_ht+0xe04a, %rsi
lea addresses_UC_ht+0x18cd2, %rdi
nop
nop
nop
add $32076, %r10
mov $49, %rcx
rep movsw
nop
nop
and $23265, %rcx
lea addresses_D_ht+0x109d2, %rcx
nop
nop
nop
nop
xor $41532, %rbx
vmovups (%rcx), %ymm6
vextracti128 $1, %ymm6, %xmm6
vpextrq $1, %xmm6, %rdi
nop
nop
dec %r10
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r15
push %r8
push %r9
push %rdi
push %rdx
push %rsi
// Store
mov $0x4bd4870000000cda, %rsi
nop
nop
nop
nop
add $21563, %r12
movb $0x51, (%rsi)
nop
sub %r8, %r8
// Store
lea addresses_A+0x97b2, %r15
nop
nop
nop
nop
xor %rdx, %rdx
movl $0x51525354, (%r15)
nop
cmp $46065, %rdi
// Store
lea addresses_UC+0x97ee, %rsi
nop
nop
nop
nop
add %rdx, %rdx
mov $0x5152535455565758, %rdi
movq %rdi, %xmm0
movups %xmm0, (%rsi)
add $42627, %rdx
// Faulty Load
lea addresses_A+0x1bd2, %r9
clflush (%r9)
nop
and %r15, %r15
vmovups (%r9), %ymm4
vextracti128 $1, %ymm4, %xmm4
vpextrq $0, %xmm4, %rsi
lea oracles, %rdx
and $0xff, %rsi
shlq $12, %rsi
mov (%rdx,%rsi,1), %rsi
pop %rsi
pop %rdx
pop %rdi
pop %r9
pop %r8
pop %r15
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_A', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_NC', 'congruent': 2}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': True, 'size': 4, 'type': 'addresses_A', 'congruent': 5}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_UC', 'congruent': 2}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_A', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_D_ht', 'congruent': 7}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 6, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_WT_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_D_ht', 'congruent': 9}}
{'00': 6}
00 00 00 00 00 00
*/
|
bootloader/print.asm | rares985/wood-os | 2 | 93777 | ; 16-bit print function
;
; Parameters:
; BX - address of string to be printed
;
; Print is performed with the help of a BIOS function (interrupt 0x10)
print:
pusha
mov ah, 0x0e ; Tell BIOS to output in tele-type mode
print_char:
mov al, [bx] ; Move first character of string into AL for printing
cmp al, 0 ; Check exit condition - null terminator found
je done
int 0x10 ; Print the character stored in AL
add bx, 1 ; Go to the next character in the string
jmp print_char ; And repeat
done:
popa
ret
|
Grammar/antlr4/Perl.g4 | sudeephazra/perl-on-netbeans | 6 | 2146 | grammar Perl;
@parser::header {package org.language.perl.grammar;}
@lexer::header {package org.language.perl.grammar;}
// @parser::members {
// public List<SyntaxError> syntaxErrors = new ArrayList<SyntaxError>();
// public String getErrorMessage(RecognitionException e, String[] tokenNames) {
// String message = super.getErrorMessage(e, tokenNames);
// SyntaxError syntaxError = new SyntaxError();
// syntaxError.exception = e;
// syntaxError.message = message;
// syntaxErrors.add(syntaxError);
// return message;
// }
// public static class SyntaxError {
// public RecognitionException exception;
// public String message;
// public int line;
// public int charPositionInLine;
// }
// }
prog:
// (.)+
statements+
EOF;
statements:
import_statements
| comment_statements
| variable_declaration
| print_statement
| package_declaration
;
import_statements:
import_statement+
;
import_statement:
(
use_statement
| require_statement
)+
;
package_declaration:
'package' (CHARACTERS+ (COLON COLON (CHARACTERS+))*) SEMI_COLON
;
print_statement:
'print' ( VARIABLE | SPECIAL_VAR ) SEMI_COLON+
| 'print' '(' VARIABLE (',' VARIABLE)* ')' SEMI_COLON+
| 'print' '(' SPECIAL_VAR (',' SPECIAL_VAR)* ')' SEMI_COLON+
;
use_statement:
'use' (CHARACTERS+) SEMI_COLON
| 'use' (CHARACTERS+ (COLON COLON (CHARACTERS+))*) SEMI_COLON
| 'use' STRING SEMI_COLON
;
require_statement:
'require' (CHARACTERS+) SEMI_COLON
| 'require' (CHARACTERS+ (COLON COLON (CHARACTERS+))*) SEMI_COLON
| 'require' (DIGIT+ (DOT (DIGIT+))*) SEMI_COLON
| 'require' STRING SEMI_COLON
;
variable_declaration:
VARIABLE_SCOPE? VARIABLE SEMI_COLON
| VARIABLE_SCOPE? '(' VARIABLE (',' VARIABLE)* ')' SEMI_COLON
;
comment_statements:
comment_statement+
;
comment_statement:
COMMENT
;
WHITESPACE
: (' '|'\t'|'\n'|'\r')+ ->channel(HIDDEN);
COMMENT
: '#' ~('\n'|'\r')* '\r'? '\n'
;
VARIABLE_SCOPE:
'my' | 'our' | 'local' | 'global'
;
COMMANDS: 'NULL' | '__FILE__' | '__LINE__' | '__PACKAGE__' | '__DATA__' | '__END__' | 'AUTOLOAD'
| 'BEGIN' | 'CORE' | 'DESTROY' | 'END' | 'EQ' | 'GE' | 'GT' | 'INIT' | 'LE' | 'LT' | 'NE' | 'CHECK'
| 'abs' | 'accept' | 'alarm' | 'and' | 'atan2' | 'bind' | 'binmode' | 'bless' | 'caller' | 'chdir'
| 'chmod' | 'chomp' | 'chop' | 'chown' | 'chr' | 'chroot' | 'close' | 'closedir' | 'cmp' | 'connect'
| 'continue' | 'cos' | 'crypt' | 'dbmclose' | 'dbmopen' | 'defined' | 'delete' | 'die' | 'do' | 'dump'
| 'each' | 'else' | 'elsif' | 'endgrent' | 'endhostent' | 'endnetent' | 'endprotoent' | 'endpwent'
| 'endservent' | 'eof' | 'eq' | 'eval' | 'exec' | 'exists' | 'exit' | 'exp' | 'fcntl' | 'fileno'
| 'flock' | 'for' | 'foreach' | 'fork' | 'format' | 'formline' | 'ge' | 'getc' | 'getgrent' | 'getgrgid'
| 'getgrnam' | 'gethostbyaddr' | 'gethostbyname' | 'gethostent' | 'getlogin' | 'getnetbyaddr'
| 'getnetbyname' | 'getnetent' | 'getpeername' | 'getpgrp' | 'getppid' | 'getpriority'
| 'getprotobyname' | 'getprotobynumber' | 'getprotoent' | 'getpwent' | 'getpwnam' | 'getpwuid'
| 'getservbyname' | 'getservbyport' | 'getservent' | 'getsockname' | 'getsockopt' | 'glob' | 'gmtime'
| 'goto' | 'grep' | 'gt' | 'hex' | 'if' | 'index' | 'int' | 'ioctl' | 'join' | 'keys' | 'kill' | 'last'
| 'lc' | 'lcfirst' | 'le' | 'length' | 'link' | 'listen' | 'localtime' | 'lock' | 'log'
| 'lstat' | 'lt' | 'map' | 'mkdir' | 'msgctl' | 'msgget' | 'msgrcv' | 'msgsnd' | 'ne'
| 'next' | 'no' | 'not' | 'oct' | 'open' | 'opendir' | 'or' | 'ord' | 'pack' | 'package'
| 'pipe' | 'pop' | 'pos' | 'print' | 'printf' | 'prototype' | 'push' | 'quotemeta'
| 'rand' | 'read' | 'readdir' | 'readline' | 'readlink' | 'readpipe' | 'recv'
| 'redo' | 'ref' | 'rename' | 'require' | 'reset' | 'return' | 'reverse' | 'rewinddir' | 'rindex'
| 'rmdir' | 'scalar' | 'seek' | 'seekdir' | 'select' | 'semctl' | 'semget' | 'semop' | 'send'
| 'setgrent' | 'sethostent' | 'setnetent' | 'setpgrp' | 'setpriority' | 'setprotoent' | 'setpwent'
| 'setservent' | 'setsockopt' | 'shift' | 'shmctl' | 'shmget' | 'shmread' | 'shmwrite' | 'shutdown'
| 'sin' | 'sleep' | 'socket' | 'socketpair' | 'sort' | 'splice' | 'split' | 'sprintf' | 'sqrt'
| 'srand' | 'stat' | 'study' | 'sub' | 'substr' | 'symlink' | 'syscall' | 'sysopen' | 'sysread'
| 'sysseek' | 'system' | 'syswrite' | 'tell' | 'telldir' | 'tie' | 'tied' | 'time' | 'times'
| 'truncate' | 'uc' | 'ucfirst' | 'umask' | 'undef' | 'unless' | 'unlink' | 'unpack' | 'unshift'
| 'untie' | 'until' | 'use' | 'utime' | 'values' | 'vec' | 'wait' | 'waitpid' | 'wantarray' | 'warn'
| 'while' | 'write' | 'xor'
;
SPECIAL_VAR
: (
'*^A' | '*^C' | '*^D' | '*^E' | '*^F' | '*^I' | '*^L' | '*^N'
| '*^O' | '*^P' | '*^R' | '*^S' | '*^T' | '*^V' | '*^W' | '*^X'
| '*/' | '*?' | '*%' | '*@' | '*_' | '*-' | '*+' | '*.' | '*|' | '*,'
| '*;' | '*~' | '*:' | '*^' | '*<' | '*>' | '*(' | '*)' /* | '*$' TODO, watch out: 5*$x */
| '*\'' | '*\\' | '$$m' | '$$s' | '$"'
| '$^A' | '$^C' | '$^D' | '$^E' | '$^F' | '$^H' | '$^I' | '$^L' | '$^M'
| '$^N' | '$^O' | '$^P' | '$^R' | '$^S' | '$^T' | '$^V' | '$^W' | '$^X'
| '$/' | '$?' | '$%' | '$@' | '$_' | '$-' | '$+' | '$.' | '$|' | '$!'
| '$;' | '$~' | '$$' | '$`' | '$<' | '$>' | '$(' | '$)' | '$,'
| '$[' | '$]' | '$:' | '$*' | '$#' | '$=' | '$^' | '$&'
| '$\'' | '$\\' | '@+' | '@-' | '@_' | '@$' | '%!' | '%@' | '%^H'
);
//Brackets
LBRACK : '[' ;
RBRACK : ']' ;
LPAREN : '(' ;
RPAREN : ')' ;
LCURLY : '{';
RCURLY : '}';
//Symbols
COMMA : ',' ;
SEMI_COLON : ';';
COLON : ':';
DOT : '.';
BACKSLASH : '\\';
CARET : '^';
UNDERSCORE : '_';
PIPE : '|';
AMPERSAND : '&';
//Mathematical operators
EQUAL : '=';
PLUS : '+';
MINUS : '-';
MULTIPLY: '*';
DIVIDE : '/';
GT : '>';
LT : '<';
//Quotes
SQUOTE : '\'';
DQUOTE : '"';
HASH_LITERAL: '#';
QUESTIONMARK_LITERAL: '?';
EXCLAMATION_LITERAL: '!';
SCALAR_VAR : '$';
ARRAY_VAR : '@';
HASH_VAR : '%';
DIGIT: '0'..'9'+;
fragment DIGITS : '1'..'9' '0'..'9'*;
fragment OCTAL_DIGITS : '0' '0'..'7'+;
fragment HEX_DIGITS : '0x' ('0'..'9' | 'a'..'f' | 'A'..'F')+;
VARIABLE : (SCALAR_VAR | ARRAY_VAR | HASH_VAR) (SCALAR_VAR | ARRAY_VAR | HASH_VAR | HASH_LITERAL)? ('a'..'z'|'A'..'Z'|'0'..'9'|'_')+ ;
NUMBER: DIGITS | OCTAL_DIGITS | HEX_DIGITS;
fragment CHAR
: 'a'..'z'|'A'..'Z';
CHARACTERS
: CHAR (CHAR | DIGITS)*;
ESCAPE_SEQUENCE
: '\\' ('"'|'\''|'/'|'\\'|'|') ;
STRING
: '"' (ESCAPE_SEQUENCE|WHITESPACE|.)*? '"'
| '\'' (ESCAPE_SEQUENCE|WHITESPACE|.)*? '\''
| 'q' ('q'|'w'|'r')? '|' (ESCAPE_SEQUENCE|.)*? '|'
| 'q' ('q'|'w'|'r')? '/' (ESCAPE_SEQUENCE|.)*? '/'
| 'q' ('q'|'w'|'r')? '{' (ESCAPE_SEQUENCE|.)*? '}'
| 'q' ('q'|'w'|'r')? '(' (ESCAPE_SEQUENCE|.)*? ')'
;
|
PRG/levels/Fortress/7-F1.asm | narfman0/smb3_pp1 | 0 | 84481 | <filename>PRG/levels/Fortress/7-F1.asm<gh_stars>0
; Original address was $B28E
; World 7 first fortress brick/boss
.word W7F1_AltL ; Alternate level layout
.word Empty_ObjLayout ; Alternate object layout
.byte LEVEL1_SIZE_08 | LEVEL1_YSTART_0B0
.byte LEVEL2_BGPAL_04 | LEVEL2_OBJPAL_08 | LEVEL2_XSTART_18
.byte LEVEL3_TILESET_02 | LEVEL3_VSCROLL_FREE | LEVEL3_PIPENOTEXIT
.byte LEVEL4_BGBANK_INDEX(2) | LEVEL4_INITACT_NOTHING
.byte LEVEL5_BGM_FORTRESS | LEVEL5_TIME_200
.byte $60, $00, $3F, $4F, $70, $00, $3A, $4F, $21, $00, $1F, $22, $00, $1F, $23, $00
.byte $1F, $24, $00, $1F, $25, $00, $1F, $26, $00, $1F, $27, $00, $1F, $2C, $0E, $17
.byte $2D, $0E, $17, $2E, $0E, $17, $2D, $00, $17, $2E, $00, $18, $2F, $00, $19, $30
.byte $00, $19, $31, $00, $1F, $32, $00, $1F, $33, $00, $1F, $34, $00, $1F, $35, $00
.byte $1F, $36, $00, $1F, $37, $00, $1F, $00, $00, $E0, $29, $1A, $00, $E0, $29, $0D
.byte $0C, $E0, $01, $28, $13, $11, $29, $13, $11, $2A, $13, $11, $2B, $13, $11, $2D
.byte $1B, $1E, $2E, $1A, $1F, $2F, $19, $16, $30, $18, $17, $0B, $1E, $00, $2C, $11
.byte $0D, $21, $10, $1F, $22, $10, $1F, $23, $10, $1F, $24, $10, $1F, $25, $10, $1F
.byte $26, $10, $1F, $27, $10, $1F, $31, $10, $1F, $32, $10, $1F, $33, $10, $1F, $34
.byte $10, $1F, $35, $10, $1F, $36, $10, $1F, $37, $10, $1F, $28, $20, $19, $29, $20
.byte $19, $2A, $20, $19, $2B, $20, $19, $2C, $20, $19, $18, $21, $00, $00, $2A, $F9
.byte $1A, $21, $20, $19, $22, $20, $19, $23, $20, $19, $24, $20, $19, $25, $20, $19
.byte $26, $20, $19, $27, $20, $19, $2F, $20, $19, $30, $20, $19, $31, $20, $19, $32
.byte $20, $19, $33, $20, $19, $34, $20, $19, $35, $20, $19, $36, $20, $19, $37, $20
.byte $19, $00, $34, $E1, $13, $19, $34, $E1, $05, $16, $3F, $E0, $03, $13, $34, $E0
.byte $05, $11, $39, $E1, $00, $30, $36, $00, $17, $35, $00, $7A, $3A, $40, $0D, $0D
.byte $44, $E0, $01, $32, $40, $22, $2B, $46, $F1, $00, $48, $F7, $1A, $70, $58, $38
.byte $16, $00, $50, $EF, $1F, $10, $50, $E8, $07, $37, $59, $A1, $10, $58, $E4, $07
.byte $11, $63, $60, $10, $6F, $E8, $00, $E0, $68, $E5, $E1, $68, $82, $E2, $68, $82
.byte $E3, $68, $D4, $FF
|
Lab_5/Forum(Notes)/group5.ex1.asm | nickbel7/ntua-microprocessors-systems | 0 | 28510 | <reponame>nickbel7/ntua-microprocessors-systems
; Microcomputer Systems - Flow Y [6th Semester]
; <NAME> - 031 17 198 - <EMAIL>
; <NAME> - 031 17 165 - <EMAIL>
; 5rd Group of Exercises
; 1st Exercise
; ----------------------- MACROS---------------------------
; PRINT CHAR
PRINT MACRO CHAR
PUSH AX
PUSH DX
MOV DL,CHAR
MOV AH,2
INT 21H
POP DX
POP AX
ENDM PRINT
; EXIT TO DOS
EXIT MACRO
MOV AX,4C00H
INT 21H
ENDM EXIT
; PRINT STRING
PRNT_STR MACRO STRING
MOV DX,OFFSET STRING
MOV AH,9
INT 21H
ENDM PRNT_STR
; READ ASCII CODED DIGIT
READ MACRO
MOV AH,8
INT 21H
ENDM READ
; -----------------------------------------------------------
DATA_SEG SEGMENT
NEW_LINE DB 0AH,0DH,'$'
QUIT_LINE DB "Time to quit...",0AH,0DH,'$'
DATA_SEG ENDS
CODE_SEG SEGMENT
ASSUME CS:CODE_SEG, DS:DATA_SEG
MAIN PROC FAR ; we consider the first digit to be the MS 4-bit
MOV AX,DATA_SEG ; important segment arrangements
MOV DS,AX
CALL HEX_KEYB ; get hex digit
CMP AL,'Q' ; if it's 'Q' end it
JE QUIT
MOV DH,AL ; save it in DH
CALL HEX_KEYB ; get then next hex digit
CMP AL,'Q' ; check for 'Q'
JE QUIT
MOV DL,AL ; save it in DL
CLC ; clear carry, ready for left-slide
SHL DH,4 ; slide DH by 4 and the OR it with DL
OR DL,DH
; from now on we print the different forms of DL
PUSH DX
; print the hex form of input number
SAR DH,4 ; manipulate the MS bits
AND DH,0FH
ADD DH,30H ; ASCII code them
CMP DH,39H
JLE PRINT_H
ADD DH,07H ; if it's a letter, then correct the ASCII by adding 07H
PRINT_H:
PRINT DH ; and print their hex form
AND DL,0FH ; isolate 4 LS bits
ADD DL,30H ; ASCII code them
CMP DL,39H
JLE PRINT_L
ADD DL,07H ; if it's a letter, then correct the ASCII by adding 07H
PRINT_L:
PRINT DL ; print their hex form
PRINT 'h'
POP DX ; restore DX
PRINT '='
CALL PRINT_DEC
PRINT '='
CALL PRINT_OCT
PRINT '='
CALL PRINT_BIN
PRNT_STR NEW_LINE
JMP MAIN
QUIT:
PRNT_STR QUIT_LINE
EXIT
MAIN ENDP
; ----------------------- ROUTINES ---------------------------
; PRINT DECIMAL FORM OF DL
PRINT_DEC PROC NEAR ; input: DL
; prints its decimal form
PUSH AX ; save registers
PUSH CX
PUSH DX
MOV CX,1 ; initialize digit counter
MOV AL,DL
MOV DL,10
LD:
MOV AH,0 ; divide number by 10
DIV DL
PUSH AX ; save quotient
CMP AL,0 ; if quot = 0, start printing
JE PRNT_10
INC CX ; increase counter (aka digits number)
JMP LD ; repeat dividing quotients by 10
PRNT_10:
POP AX ; get digit
MOV AL,AH
MOV AH,0
ADD AX,'0' ; ASCII coded
PRINT AL ; print
LOOP PRNT_10 ; repeat till no more digits
PRINT 'd'
POP DX
POP CX ; restore registers
POP AX
RET
PRINT_DEC ENDP
; PRINT OCTAL FORM OF DL
PRINT_OCT PROC NEAR ; input: DL
; prints its octal form
PUSH AX ; save registers
PUSH CX
PUSH DX
MOV CX,1 ; initialize digit counter
MOV AL,DL
MOV DL,8
LO:
MOV AH,0 ; divide number by 8
DIV DL
PUSH AX ; save quotient
CMP AL,0 ; if quot = 0, start printing
JE PRNT_8
INC CX ; increase counter (aka digits number)
JMP LO ; repeat dividing quotients by 8
PRNT_8:
POP AX ; get digit
MOV AL,AH
MOV AH,0
ADD AX,'0' ; ASCII coded
PRINT AL ; print
LOOP PRNT_8 ; repeat till no more digits
PRINT 'o'
POP DX ; restore registers
POP CX
POP AX
RET
PRINT_OCT ENDP
; PRINT BINARY FORM OF DL
PRINT_BIN PROC NEAR ; input: DL
; prints its binary form
PUSH AX ; save registers
PUSH CX
PUSH DX
MOV CX,1 ; initialize digit counter
MOV AL,DL
MOV DL,2
LB:
MOV AH,0 ; divide number by 2
DIV DL
PUSH AX ; save quotient
CMP AL,0 ; if quot = 0, start printing
JE PRNT_2
INC CX ; increase counter (aka digits number)
JMP LB ; repeat dividing quotients by 2
PRNT_2:
POP AX ; get digit
MOV AL,AH
MOV AH,0
ADD AX,'0' ; ASCII coded
PRINT AL ; print
LOOP PRNT_2 ; repeat till no more digits
PRINT 'b'
POP DX ; restore registers
POP CX
POP AX
RET
PRINT_BIN ENDP
; READ A HEX DIGIT (ONLY HEX DIGITS ARE ACCEPTED) --> AL
HEX_KEYB PROC NEAR
IGNORE:
READ
CMP AL,30H ; if input < 30H ('0') then ignore it
JL IGNORE
CMP AL,39H ; if input > 39H ('9') then it may be a hex letter
JG CHECK_LETTER
SUB AL,30H ; otherwise make it a hex number
JMP INPUT_OK
CHECK_LETTER:
CMP AL,'Q' ; if input = 'Q', then return to quit
JE INPUT_OK
CMP AL,'A' ; if input < 'A' then ignore it
JL IGNORE
CMP AL,'F' ; if input > 'F' then ignore it
JG IGNORE
SUB AL,37H ; otherwise make it a hex number
INPUT_OK:
RET
HEX_KEYB ENDP
; --------------------------------------------------------------
CODE_SEG ENDS
END MAIN |
game/data/menu_mode_select/tileset.asm | sgadrat/super-tilt-bro | 91 | 169695 | <reponame>sgadrat/super-tilt-bro
MENU_MODE_SELECTION_TILESET_BANK = CURRENT_BANK_NUMBER
tileset_menu_mode_selection:
; Tileset's size in tiles (zero means 256)
.byt (tileset_menu_mode_selection_end-tileset_menu_mode_selection_tiles)/16
tileset_menu_mode_selection_tiles:
.byt %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000
.byt %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000
.byt %00001111, %00000011, %00000100, %00001000, %00000000, %01010000, %00100000, %01110000
.byt %00001111, %00111100, %01111000, %01110000, %01110000, %01110000, %01110000, %01110000
.byt %11110000, %11000000, %00100000, %00010000, %00000000, %00001010, %00011111, %00000000
.byt %11110000, %00111100, %00011110, %00001110, %00001110, %00011111, %00000000, %00000000
.byt %00000001, %00000000, %00000000, %00000000, %00000000, %00000010, %00000101, %00000110
.byt %00000001, %00000001, %00000001, %00000001, %00000011, %00000011, %00000110, %00000110
.byt %10000000, %00000000, %00000000, %00000000, %00000000, %10000000, %11000000, %01100000
.byt %10000000, %10000000, %10000000, %10000000, %11000000, %11000000, %01100000, %01100000
.byt %11100000, %10000000, %00000000, %00000000, %00001000, %00100110, %01010011, %01110001
.byt %11100000, %01110000, %01111000, %01111100, %01110110, %01110011, %01110001, %01110000
.byt %00000111, %00000001, %00000000, %00000000, %00010000, %10101010, %01000100, %10001110
.byt %00000111, %00001110, %00011110, %00111110, %01101110, %11001110, %10001110, %00001110
.byt %01111111, %01000111, %00000000, %00000000, %00000000, %00010000, %00101000, %00111111
.byt %01111111, %00111000, %00111000, %00111000, %00111000, %00111000, %00111000, %00111111
.byt %11111111, %11111100, %00000010, %00000001, %00000000, %00010000, %00100000, %11110000
.byt %11111111, %00000011, %00000001, %00000000, %00000000, %00010000, %00110000, %11110000
.byt %00011111, %00000111, %00001000, %00010000, %00000000, %10100000, %01000000, %11100000
.byt %00011111, %01111000, %11110000, %11100000, %11100000, %11100000, %11100000, %11100000
.byt %11111000, %11100000, %00010000, %00001000, %00000000, %00000101, %00000010, %00000111
.byt %11111000, %00011110, %00001111, %00000111, %00000111, %00000111, %00000111, %00000111
.byt %11111111, %10001111, %00000000, %00000000, %00000000, %00100000, %01010000, %01110000
.byt %11111111, %01110000, %01110000, %01110000, %01110000, %01110000, %01110000, %01110000
.byt %11111100, %11110000, %00001000, %00000000, %00000000, %00000101, %00000010, %00000111
.byt %11111100, %00001110, %00000111, %00000111, %00000111, %00000111, %00000111, %00000111
.byt %01110000, %01010000, %00000000, %00100000, %00000000, %01000000, %00100000, %00011111
.byt %01110000, %01110000, %01110000, %01110000, %01111000, %00111100, %00011111, %00000000
.byt %00000000, %00000000, %00000000, %01110101, %00000000, %00000010, %00000100, %11111000
.byt %00000000, %00000000, %01111111, %00001110, %00011110, %00111100, %11111000, %00000000
.byt %00001110, %00001000, %00000000, %00010111, %00000100, %00000000, %00000000, %11111100
.byt %00001100, %00001100, %00011111, %00011100, %00111000, %01111000, %11111100, %00000000
.byt %01110000, %00100000, %00000000, %11010000, %00100000, %00000000, %00000000, %00111111
.byt %00110000, %00110000, %11111000, %00111000, %00011100, %00011110, %00111111, %00000000
.byt %01110000, %00100000, %00000000, %01010000, %00000000, %00000000, %00000000, %11111000
.byt %01110000, %01110000, %01110000, %01110000, %01110000, %01110000, %11111000, %00000000
.byt %00001110, %00001010, %00000000, %00000100, %00000000, %00000000, %00000000, %00011111
.byt %00001110, %00001110, %00001110, %00001110, %00001110, %00001110, %00011111, %00000000
.byt %00111111, %00010000, %00000000, %00101000, %00000000, %00000000, %00000000, %01111111
.byt %00111000, %00111000, %00111000, %00111000, %00111000, %00111000, %01111111, %00000000
.byt %11110000, %00110000, %00010000, %00000000, %00000000, %00000000, %00000000, %11111111
.byt %00110000, %00010000, %00000000, %00000000, %00000001, %00000011, %11111111, %00000000
.byt %11100000, %10100000, %00000000, %01000000, %00000000, %10000000, %01000000, %00111111
.byt %11100000, %11100000, %11100000, %11100000, %11110000, %01111000, %00111111, %00000000
.byt %00000111, %00000101, %00000000, %00000010, %00000000, %00000001, %00000010, %11111100
.byt %00000111, %00000111, %00000111, %00000111, %00001111, %00011110, %11111100, %00000000
.byt %01110000, %00100000, %00000000, %01010000, %00000000, %00000000, %00000000, %11111111
.byt %01110000, %01110000, %01110000, %01110000, %01110000, %01110000, %11111111, %00000000
.byt %00000111, %00000101, %00000000, %00000010, %00000000, %00000001, %00000010, %11111100
.byt %00000111, %00000111, %00000111, %00000111, %00000111, %00001110, %11111100, %00000000
.byt %00000000, %01111111, %01111111, %01111111, %01111111, %01111111, %01111111, %01111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %00000000, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11111100, %00000011, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %00000011, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %00000001, %11111110, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11111110, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %10000000, %01111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %01111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %00001111, %11110000, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11110000, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11100000, %00011111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %00011111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %00010000, %11101111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11101111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %00111111, %11000000, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11000000, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11100000, %00011111, %11111111, %11111111, %11111111, %11111111, %11111100, %11101010
.byt %00011111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111101
.byt %00000000, %11111110, %11111110, %11111110, %11111110, %11111110, %11111110, %11111110
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %00111111, %00111111
.byt %01111111, %01111110, %01111110, %01111110, %01111110, %01111110, %01111110, %01111110
.byt %11111110, %11111101, %11111101, %11111101, %11111101, %11111101, %11111101, %11111101
.byt %01010111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %10101111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %01111110, %01111110, %01111110, %01111110, %11111101, %11111101, %11111101, %11111101
.byt %10111111, %10111111, %10111111, %10111111, %01111110, %01111110, %01111110, %01111110
.byt %01111110, %01111111, %01100110, %01011111, %01111111, %10111111, %10111111, %10111111
.byt %11111101, %11111101, %11111101, %10111001, %11111100, %01111110, %01111110, %01111110
.byt %11111111, %11110111, %11100111, %10101111, %11011111, %11111111, %11111111, %11111111
.byt %11111111, %11111111, %11111111, %11011111, %00111111, %11111111, %11111111, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111110, %11111101
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111110, %11111101, %11111011
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %01111111, %10111111, %11011111
.byt %11111111, %11111111, %11111111, %11111111, %01111111, %10111111, %11011111, %01101111
.byt %11111111, %11111111, %11111111, %10011111, %11100111, %11110111, %11111001, %11111100
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %01111100, %01111110, %11111110, %01111110, %10111110, %10111110, %11111110, %10111110
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %11110000, %10000000, %10000000, %10000000
.byt %11111111, %11111111, %11111111, %11110000, %10001111, %01111111, %11111111, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %00001111, %00001111, %00011111, %00011111
.byt %11111111, %11111111, %11111111, %00001111, %11110001, %11111110, %11111111, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %01111111, %10111111, %11011111
.byt %10111111, %10111111, %10111111, %10111111, %10111111, %01111111, %01111111, %01111111
.byt %01111110, %01111110, %01111111, %01111111, %01111111, %11111111, %11111111, %11111111
.byt %11111011, %11110111, %11101111, %11011111, %10111111, %01111111, %11111111, %11111111
.byt %11110111, %11101111, %11011111, %10111111, %01111111, %11111111, %11111111, %11111111
.byt %11101111, %11110111, %11111011, %11111101, %11111110, %11111111, %11111111, %11111111
.byt %10110111, %01011011, %10101101, %01010110, %10101011, %01010101, %10101010, %01010101
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11111110, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %01111111, %10111111, %10111111, %01111111, %11000111, %10110001, %10111101, %10111110
.byt %11111111, %01111111, %01111111, %10111111, %10111111, %11111111, %11111110, %11111111
.byt %11111110, %11111110, %11111110, %11111110, %11111110, %11100010, %11101101, %11111101
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111101, %00011110, %01111110
.byt %11111111, %11111111, %11111111, %11011111, %11111111, %10111111, %10111000, %11110000
.byt %11110111, %11101111, %11011111, %11111111, %10111111, %11111000, %11110111, %11101111
.byt %11100000, %11110000, %11110010, %11100010, %10000000, %00000000, %00000000, %00000000
.byt %11111111, %11111111, %11101111, %10011101, %01111111, %11111111, %11111111, %11111111
.byt %00011111, %11110111, %11100111, %11111111, %10111111, %00011111, %01111000, %01110000
.byt %11110111, %11101111, %11011111, %10111111, %01011111, %11111000, %11110111, %11111111
.byt %11111111, %11111111, %11111111, %11111011, %11111111, %11111101, %11111101, %01111111
.byt %11101111, %11110111, %11111011, %11111111, %11111101, %11111111, %01111111, %11111110
.byt %01111111, %01111111, %01111111, %01111111, %01111111, %10111111, %10111111, %10111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %01111111, %01111111, %01111111
.byt %11110011, %11110111, %11101111, %11101111, %11101111, %11011111, %11011111, %10111111
.byt %11111111, %11101111, %11111111, %11111111, %11111111, %11111111, %11111111, %11011111
.byt %11111011, %11110011, %11111100, %11111100, %11111100, %11111100, %11111100, %11111100
.byt %11110111, %11111100, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11111111, %11111111, %00000000, %00000000, %00000000, %00000000, %00000000, %00111100
.byt %11111111, %00000000, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11111111, %10101010, %00000000, %00110110, %00110110, %00110110, %00110110, %00110110
.byt %10101010, %01010101, %11111111, %11111111, %11111111, %11001001, %11111111, %11111111
.byt %11101111, %10100111, %00011111, %00011111, %00011111, %00011111, %00011111, %00011111
.byt %10110111, %01011111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %10111111, %10011111, %11011111, %11100111, %11111011, %11111101, %11111110, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %11110111, %11111011, %11111101, %11111110
.byt %11111101, %11111101, %11111101, %11111101, %11111101, %11111101, %11111101, %10110101
.byt %11111110, %11111110, %11111110, %11111110, %11111110, %11111110, %11111110, %01111110
.byt %11100000, %11100000, %10100000, %10110111, %11111111, %11111111, %11111111, %11111111
.byt %11111111, %10111111, %11111111, %11111111, %11111111, %11111111, %11111111, %10111111
.byt %00000000, %00000000, %00000000, %10000000, %10000000, %10000000, %00000000, %00000000
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %01111111, %11111111, %11111111
.byt %01110000, %00011111, %00111111, %01111111, %11111111, %11111111, %00111111, %00111111
.byt %10001111, %11111111, %11111111, %11111111, %11111111, %00111111, %11111111, %11011111
.byt %11111110, %11110010, %11110000, %11110000, %11100000, %11100000, %11110000, %11110001
.byt %11110011, %11111101, %11111111, %11101111, %11111111, %11111111, %11111111, %11111111
.byt %10111111, %11111111, %01101111, %01100011, %01110110, %01111011, %01111110, %01111111
.byt %01111111, %00011111, %11011111, %11111101, %11111001, %11111100, %11111101, %11111101
.byt %11111111, %11111110, %11111101, %11111010, %01100011, %11011111, %01111111, %11111111
.byt %11111111, %11111111, %11111110, %11111101, %11111111, %00111111, %11111111, %11111111
.byt %01011111, %10111111, %10111111, %01111111, %10011111, %11101111, %11110001, %11111111
.byt %10111111, %01111111, %01111111, %10111111, %11111111, %11111111, %11111110, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %10111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %01111111
.byt %11111100, %11111100, %11111100, %11111100, %11111100, %11111100, %11111111, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %00111100, %00111100, %00111100, %00111100, %00111100, %00111100, %11111111, %11111111
.byt %11111111, %11111111, %11111111, %11101111, %11111111, %11111111, %11111111, %11111111
.byt %00110110, %00000000, %00000000, %00000000, %00000000, %00000000, %11111111, %11111111
.byt %11001001, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %00011111, %00011111, %00011111, %00011111, %00011111, %00011111, %11111111, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11000000, %11111110, %11111110, %01111110, %10111110, %10111110, %10111110, %11111110
.byt %10111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %10111111
.byt %10111111, %10111110, %11111110, %11011110, %11111111, %11111111, %11111111, %11111111
.byt %11111110, %11111111, %11011111, %11111111, %11101111, %11110111, %11111011, %11111100
.byt %00000000, %00000000, %00000000, %00000000, %00000000, %10000000, %10000000, %10000000
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %01111111
.byt %00011111, %00001111, %00001111, %00000111, %00000111, %00000111, %00000111, %00000110
.byt %11101111, %11111111, %11110111, %11111011, %11111111, %11111111, %11111110, %11111001
.byt %11110001, %11100001, %11000011, %10000011, %10000111, %10001111, %00011111, %00111111
.byt %11101111, %11011111, %10111111, %11111111, %11111111, %01111111, %11111111, %11111111
.byt %01111111, %01111111, %11111111, %10111111, %01111110, %01111110, %01111110, %01111110
.byt %11111101, %11111101, %01111101, %01111110, %11111101, %11111101, %11111101, %11111101
.byt %11011111, %11101111, %11111011, %11110111, %11111011, %11110111, %11100111, %11011111
.byt %11111111, %11111111, %11110111, %11111000, %11111101, %11111011, %11111111, %11101111
.byt %11111111, %11111101, %11100011, %00011111, %11111111, %11111111, %11111111, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %10111110, %11110001, %11111111, %11001111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11001111, %11101111, %11111111
.byt %11111111, %11111111, %11111111, %00111111, %11111111, %11111111, %11111111, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11111110, %11111110, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %10111111, %10111111, %01111100, %01111100, %01111100, %01111100, %01111100, %01111100
.byt %11111110, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %00000000, %10000000, %11110000, %11111111, %11111111, %11111111, %11100111, %11011111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11101111
.byt %00000000, %00000001, %00001111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %01111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %01111110, %01111110, %11111111, %01111111, %11111111, %01111111, %11111111, %11111111
.byt %11111101, %11111101, %01111111, %11111111, %01111111, %11111111, %01111111, %00000000
.byt %11111111, %00001111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11110000, %00000000
.byt %11111111, %10011111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %00000000
.byt %11111111, %11110101, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %00000000
.byt %11111111, %01111111, %11111111, %11111111, %11111111, %11111111, %11111101, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111110, %00000000
.byt %11111111, %11111111, %01111111, %00111111, %10011111, %11111111, %11110111, %11111111
.byt %00111111, %01111111, %11111111, %11111111, %11111111, %11011111, %00001111, %00000000
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111011, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111100, %00000000
.byt %11111111, %11111110, %11111111, %11111111, %11111111, %11111111, %11111011, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %00000111, %00000000
.byt %11111111, %11101010, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %00000000
.byt %10111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %00000000
.byt %11111111, %00111000, %11111111, %11111111, %11111111, %11111111, %10111011, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11000111, %00000000
.byt %11111100, %01111110, %11111110, %11111110, %11111110, %11111110, %11111110, %11101011
.byt %01111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %00010100
.byt %11111111, %11111111, %01111111, %00111111, %10011111, %11111111, %11110111, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11011111, %00001111, %00000000
.byt %00000000, %01111110, %00110011, %01110011, %01111011, %01101110, %01100000, %00100000
.byt %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000
.byt %00000000, %00011110, %00110011, %01100011, %01111110, %01101100, %01100110, %00100011
.byt %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000
.byt %00000000, %00111110, %01100011, %01100000, %01111000, %01100000, %00110000, %00011110
.byt %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000
.byt %00000000, %00011110, %00110011, %00110000, %00011100, %01000110, %01100110, %00111100
.byt %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000
.byt %00000000, %01111110, %00111111, %00001100, %00001100, %00001100, %00001100, %00000100
.byt %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000
.byt %00000000, %00011110, %00110011, %01100011, %01111011, %01111111, %01100011, %00100001
.byt %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
.byt %11111111, %10010001, %00000000, %00100000, %10000001, %11000011, %11100111, %11111111
tileset_menu_mode_selection_end:
|
src/databases-utilities.ads | skordal/databases | 0 | 9346 | -- Databases - A simple database library for Ada applications
-- (c) <NAME> 2019 <<EMAIL>>
-- Report bugs and issues on <https://github.com/skordal/databases/issues>
-- vim:ts=3:sw=3:et:si:sta
with Databases;
package Databases.Utilities is
-- Directly executes a statement and returns only the status:
function Execute (Database : in Databases.Database_Access; Statement : in String)
return Databases.Statement_Execution_Status;
end Databases.Utilities;
|
Thesis/IntChanges.agda | inc-lc/ilc-agda | 10 | 1179 | <filename>Thesis/IntChanges.agda
module Thesis.IntChanges where
open import Data.Integer.Base
open import Relation.Binary.PropositionalEquality
open import Thesis.Changes
open import Theorem.Groups-Nehemiah
private
intCh = ℤ
instance
intCS : ChangeStructure ℤ
intCS = record
{ Ch = ℤ
; ch_from_to_ = λ dv v1 v2 → v1 + dv ≡ v2
; isCompChangeStructure = record
{ isChangeStructure = record
{ _⊕_ = _+_
; fromto→⊕ = λ dv v1 v2 v2≡v1+dv → v2≡v1+dv
; _⊝_ = _-_
; ⊝-fromto = λ a b → n+[m-n]=m {a} {b}
}
; _⊚_ = λ da1 da2 → da1 + da2
; ⊚-fromto = i⊚-fromto
}
}
where
i⊚-fromto : (a1 a2 a3 : ℤ) (da1 da2 : intCh) →
a1 + da1 ≡ a2 → a2 + da2 ≡ a3 → a1 + (da1 + da2) ≡ a3
i⊚-fromto a1 a2 a3 da1 da2 a1+da1≡a2 a2+da2≡a3
rewrite sym (associative-int a1 da1 da2) | a1+da1≡a2 = a2+da2≡a3
|
programs/oeis/277/A277105.asm | karttu/loda | 1 | 94847 | ; A277105: a(n) = (27*3^n - 63)/2.
; 9,90,333,1062,3249,9810,29493,88542,265689,797130,2391453,7174422,21523329,64570050,193710213,581130702,1743392169,5230176570,15690529773,47071589382,141214768209,423644304690,1270932914133,3812798742462,11438396227449,34315188682410,102945566047293,308836698141942,926510094425889
mov $1,3
pow $1,$0
div $1,2
mul $1,81
add $1,9
|
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/slice8_pkg2.ads | best08618/asylo | 7 | 6865 | generic
Line_Length : Natural;
Max_Lines : Natural;
package Slice8_Pkg2 is
Subtype Index is Natural Range 0..Line_length;
Subtype Line_Count is Natural Range 0..Max_Lines;
Type Line (Size : Index := 0) is
Record
Data : String (1..Size);
End Record;
Type Lines is Array (Line_Count Range <>) of Line;
Type Paragraph (Size : Line_Count) is
Record
Data : Lines (1..Size);
End Record;
end Slice8_Pkg2;
|
Transynther/x86/_processed/AVXALIGN/_ht_st_zr_un_/i3-7100_9_0x84_notsx.log_21829_915.asm | ljhsiun2/medusa | 9 | 97257 | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r14
push %r8
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_A_ht+0x198, %rcx
nop
nop
nop
nop
sub %r8, %r8
mov (%rcx), %rdi
nop
nop
add %rbp, %rbp
lea addresses_A_ht+0x175b8, %rdx
nop
nop
nop
nop
cmp $7623, %rbp
mov $0x6162636465666768, %r11
movq %r11, (%rdx)
nop
nop
sub $55078, %rdx
lea addresses_WT_ht+0x1a998, %rdx
nop
nop
cmp $36744, %r14
mov (%rdx), %di
sub $15128, %rdx
lea addresses_A_ht+0x1e598, %r8
sub $37849, %r14
mov $0x6162636465666768, %rcx
movq %rcx, %xmm5
vmovups %ymm5, (%r8)
nop
add $53542, %r14
lea addresses_WT_ht+0x1bd68, %r14
sub $49873, %r11
and $0xffffffffffffffc0, %r14
movaps (%r14), %xmm7
vpextrq $0, %xmm7, %rcx
nop
nop
nop
nop
sub $31577, %r14
lea addresses_D_ht+0x147d8, %rcx
nop
nop
sub $31725, %rdi
movb (%rcx), %dl
add %r11, %r11
lea addresses_UC_ht+0x1b00, %rsi
lea addresses_A_ht+0x191c4, %rdi
clflush (%rsi)
nop
nop
nop
inc %r11
mov $13, %rcx
rep movsl
nop
sub $6032, %r11
lea addresses_UC_ht+0x1e68, %rbp
nop
dec %r8
mov (%rbp), %di
nop
and $2895, %rdi
lea addresses_UC_ht+0x19998, %rdx
clflush (%rdx)
nop
nop
nop
nop
add %r8, %r8
movups (%rdx), %xmm5
vpextrq $0, %xmm5, %rsi
nop
nop
nop
nop
cmp %rdi, %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r8
pop %r14
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r13
push %r9
push %rbp
push %rbx
push %rdx
// Load
lea addresses_WT+0x725a, %r9
nop
nop
nop
dec %r12
mov (%r9), %ebp
nop
sub %r13, %r13
// Faulty Load
lea addresses_UC+0x11998, %r9
nop
nop
nop
nop
nop
and %rbx, %rbx
movaps (%r9), %xmm6
vpextrq $1, %xmm6, %r13
lea oracles, %r9
and $0xff, %r13
shlq $12, %r13
mov (%r9,%r13,1), %r13
pop %rdx
pop %rbx
pop %rbp
pop %r9
pop %r13
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_UC', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT', 'same': False, 'size': 4, 'congruent': 1, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_UC', 'same': True, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_A_ht', 'same': False, 'size': 8, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 8, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 2, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 32, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 16, 'congruent': 4, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'same': False, 'size': 1, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 2, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 16, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'01': 20, '54': 1, '45': 3, 'dd': 1, '82': 1, 'd0': 2, '13': 1, '19': 1, '49': 5756, '02': 1, '46': 1, '08': 3, '00': 15851, 'c0': 1, '47': 172, '96': 1, 'b4': 1, 'dc': 1, 'b0': 2, '59': 1, '68': 2, '30': 1, '03': 3, 'e8': 1, '40': 1}
00 00 00 00 49 00 00 49 00 49 00 00 00 00 49 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 00 00 49 00 00 00 00 00 00 00 49 49 49 49 00 00 00 00 49 00 00 49 49 00 00 00 00 49 00 49 00 00 00 00 00 00 49 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 49 49 00 49 49 49 49 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 49 00 00 00 49 00 00 00 00 00 00 49 00 49 00 49 00 49 00 00 00 00 49 00 49 00 00 00 00 00 49 00 00 47 00 00 00 00 00 49 49 00 49 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 49 00 49 00 49 49 00 00 49 49 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 49 00 49 49 00 49 49 00 00 00 00 00 00 00 00 00 00 49 00 49 00 00 00 49 00 49 00 49 00 49 49 00 00 00 00 00 00 00 00 00 00 49 49 00 49 00 00 00 00 00 49 00 00 00 00 00 00 00 49 00 00 49 00 49 00 00 00 00 00 00 00 00 49 49 49 00 00 49 00 49 49 49 00 00 00 00 49 00 00 49 00 00 49 00 00 00 00 00 00 00 00 00 00 49 00 49 00 49 49 00 00 00 00 00 49 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 49 00 00 00 00 00 00 49 00 49 00 00 00 00 00 49 00 00 00 00 00 49 00 00 00 00 00 00 00 49 00 49 00 00 00 00 00 47 00 49 00 00 00 00 00 49 49 49 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 49 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 49 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 49 00 00 49 49 00 49 49 00 00 00 49 00 00 47 49 00 00 00 00 00 49 49 00 00 49 49 00 00 00 00 00 49 00 00 49 00 00 00 00 49 00 00 00 49 49 00 00 49 00 49 00 49 00 00 00 00 49 00 00 00 00 00 00 49 00 00 49 00 00 00 49 00 00 49 00 00 00 00 00 00 00 00 00 00 00 49 00 00 00 49 00 49 49 00 00 00 47 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 03 49 00 00 49 00 00 00 49 00 00 00 00 49 49 49 00 00 00 00 49 00 00 00 00 00 00 00 00 49 00 00 49 00 49 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 49 49 49 00 00 00 49 00 49 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 49 00 49 00 00 00 00 49 49 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 49 00 49 49 00 49 00 00 49 00 00 00 00 00 00 49 00 00 49 00 00 00 00 00 47 00 49 00 49 49 49 00 49 00 49 00 49 00 00 49 00 00 00 00 00 00 49 00 00 00 00 00 49 00 00 00 00 49 49 00 00 00 00 00 49 00 00 00 49 00 00 49 49 00 00 00 00 00 00 00 00 00 00 00 49 49 00 00 00 00 00 00 00 00 00 00 00 00 49 49 00 00 00 00 49 00 00 00 00 49 49 00 00 49 00 00 00 00 49 00 00 49 49 00 49 00 00 00 00 00 00 00 00 00 00 49 49 49 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 49 49 00 49 00 49
*/
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca.log_21829_1678.asm | ljhsiun2/medusa | 9 | 246035 | <filename>Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca.log_21829_1678.asm
.global s_prepare_buffers
s_prepare_buffers:
push %r15
push %r8
push %r9
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0x2292, %rsi
lea addresses_normal_ht+0x14292, %rdi
nop
nop
cmp $48224, %rdx
mov $1, %rcx
rep movsb
nop
nop
nop
nop
and $44009, %r9
lea addresses_D_ht+0x8c9e, %rsi
lea addresses_UC_ht+0x1ea92, %rdi
nop
and $12267, %rdx
mov $74, %rcx
rep movsl
nop
nop
nop
nop
cmp $4218, %r9
lea addresses_A_ht+0x10212, %r15
dec %r8
movups (%r15), %xmm6
vpextrq $0, %xmm6, %rcx
inc %rdi
lea addresses_D_ht+0x1e92, %rcx
nop
nop
nop
nop
cmp $6301, %rdi
movb $0x61, (%rcx)
nop
nop
xor $42828, %rdi
lea addresses_D_ht+0x4892, %r15
clflush (%r15)
nop
nop
nop
nop
nop
and $11020, %rcx
mov $0x6162636465666768, %rdx
movq %rdx, %xmm5
vmovups %ymm5, (%r15)
xor %rcx, %rcx
lea addresses_WC_ht+0x15692, %r9
cmp %rdi, %rdi
mov (%r9), %edx
nop
nop
nop
inc %rdx
lea addresses_D_ht+0x728b, %rsi
nop
nop
nop
nop
cmp %rdx, %rdx
mov (%rsi), %r15w
and $30930, %r8
lea addresses_WC_ht+0xe4ca, %rcx
nop
nop
sub %rdx, %rdx
movb (%rcx), %r15b
nop
nop
sub %rdx, %rdx
lea addresses_A_ht+0xf052, %r8
nop
add %rsi, %rsi
movw $0x6162, (%r8)
sub %r15, %r15
lea addresses_WC_ht+0x13292, %rsi
lea addresses_WC_ht+0xcc92, %rdi
nop
nop
add %rax, %rax
mov $45, %rcx
rep movsl
nop
nop
nop
cmp $51028, %r9
lea addresses_WT_ht+0xa292, %rdi
nop
nop
xor %r9, %r9
mov (%rdi), %rcx
and $64748, %rax
lea addresses_UC_ht+0x12492, %rcx
nop
sub $43075, %rdi
mov (%rcx), %esi
nop
nop
sub %rdx, %rdx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r8
pop %r15
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r13
push %r14
push %r9
push %rbp
push %rdi
// Store
mov $0x892, %rbp
nop
cmp $34150, %r13
mov $0x5152535455565758, %r9
movq %r9, (%rbp)
inc %r13
// Load
lea addresses_WT+0xa712, %r14
nop
nop
nop
nop
sub $21156, %rdi
mov (%r14), %r11d
nop
add %r11, %r11
// Load
lea addresses_UC+0x10dfa, %r10
sub %r14, %r14
movb (%r10), %r11b
nop
dec %r10
// Load
lea addresses_WC+0x1256c, %rdi
nop
nop
cmp %r11, %r11
mov (%rdi), %r13w
nop
nop
cmp %r10, %r10
// Faulty Load
lea addresses_D+0x1a92, %r9
clflush (%r9)
nop
inc %rbp
mov (%r9), %r14d
lea oracles, %r11
and $0xff, %r14
shlq $12, %r14
mov (%r11,%r14,1), %r14
pop %rdi
pop %rbp
pop %r9
pop %r14
pop %r13
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_D', 'same': True, 'AVXalign': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_P', 'same': False, 'AVXalign': False, 'congruent': 9}}
{'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_WT', 'same': False, 'AVXalign': False, 'congruent': 6}}
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_UC', 'same': False, 'AVXalign': False, 'congruent': 1}}
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_WC', 'same': False, 'AVXalign': False, 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_D', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 11}, 'dst': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 11}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_D_ht', 'congruent': 2}, 'dst': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 10}}
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 7}}
{'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 9}}
{'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 9}}
{'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 10}}
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_D_ht', 'same': True, 'AVXalign': False, 'congruent': 0}}
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 2}}
{'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 4}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 10}, 'dst': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 9}}
{'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 9}}
{'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 8}}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
|
samples/vsx_mem.c.power9_gcc-8.asm | seiko2plus/vsx_mem_test | 0 | 179281 | <filename>samples/vsx_mem.c.power9_gcc-8.asm<gh_stars>0
/test/samples/vsx_mem.c.power9_gcc-8.o: file format elf64-powerpcle
Disassembly of section .text:
0000000000000000 <INTRIN_schar>:
0: 00 00 26 2c cmpdi r6,0
4: 20 00 82 4d beqlr
8: 00 00 20 39 li r9,0
c: 00 00 00 60 nop
10: 19 4a 04 7c lxvx vs32,r4,r9
14: 19 4a 25 7c lxvx vs33,r5,r9
18: 00 08 00 10 vaddubm v0,v0,v1
1c: 19 4b 03 7c stxvx vs32,r3,r9
20: 10 00 29 39 addi r9,r9,16
24: 40 48 a6 7f cmpld cr7,r6,r9
28: 20 00 9d 4c blelr cr7
2c: 19 4a 04 7c lxvx vs32,r4,r9
30: 19 4a 25 7c lxvx vs33,r5,r9
34: 00 08 00 10 vaddubm v0,v0,v1
38: 19 4b 03 7c stxvx vs32,r3,r9
3c: 10 00 29 39 addi r9,r9,16
40: 40 48 a6 7f cmpld cr7,r6,r9
44: cc ff 9d 41 bgt cr7,10 <INTRIN_schar+0x10>
48: 20 00 80 4e blr
...
58: 00 00 00 60 nop
5c: 00 00 00 60 nop
0000000000000060 <INTRIN_short>:
60: 00 00 26 2c cmpdi r6,0
64: 20 00 82 4d beqlr
68: ff ff c6 38 addi r6,r6,-1
6c: 00 00 20 39 li r9,0
70: 02 e9 c6 78 rldicl r6,r6,61,4
74: 01 00 46 39 addi r10,r6,1
78: a6 03 49 7d mtctr r10
7c: 00 00 00 60 nop
80: 19 4a 04 7c lxvx vs32,r4,r9
84: 19 4a 25 7c lxvx vs33,r5,r9
88: 40 08 00 10 vadduhm v0,v0,v1
8c: 19 4b 03 7c stxvx vs32,r3,r9
90: 10 00 29 39 addi r9,r9,16
94: ec ff 00 42 bdnz 80 <INTRIN_short+0x20>
98: 20 00 80 4e blr
...
a8: 00 00 00 60 nop
ac: 00 00 00 60 nop
00000000000000b0 <INTRIN_int>:
b0: 00 00 26 2c cmpdi r6,0
b4: 20 00 82 4d beqlr
b8: ff ff c6 38 addi r6,r6,-1
bc: 00 00 20 39 li r9,0
c0: 02 f1 c6 78 rldicl r6,r6,62,4
c4: 01 00 46 39 addi r10,r6,1
c8: a6 03 49 7d mtctr r10
cc: 00 00 00 60 nop
d0: 19 4a 04 7c lxvx vs32,r4,r9
d4: 19 4a 25 7c lxvx vs33,r5,r9
d8: 80 08 00 10 vadduwm v0,v0,v1
dc: 19 4b 03 7c stxvx vs32,r3,r9
e0: 10 00 29 39 addi r9,r9,16
e4: ec ff 00 42 bdnz d0 <INTRIN_int+0x20>
e8: 20 00 80 4e blr
...
f8: 00 00 00 60 nop
fc: 00 00 00 60 nop
0000000000000100 <INTRIN_double>:
100: 00 00 26 2c cmpdi r6,0
104: 20 00 82 4d beqlr
108: ff ff c6 38 addi r6,r6,-1
10c: 00 00 20 39 li r9,0
110: 02 f9 c6 78 rldicl r6,r6,63,4
114: 01 00 46 39 addi r10,r6,1
118: a6 03 49 7d mtctr r10
11c: 00 00 00 60 nop
120: 18 4a 04 7c lxvx vs0,r4,r9
124: 18 4a 85 7d lxvx vs12,r5,r9
128: 00 63 00 f0 xvadddp vs0,vs0,vs12
12c: 18 4b 03 7c stxvx vs0,r3,r9
130: 10 00 29 39 addi r9,r9,16
134: ec ff 00 42 bdnz 120 <INTRIN_double+0x20>
138: 20 00 80 4e blr
...
148: 00 00 00 60 nop
14c: 00 00 00 60 nop
0000000000000150 <DEREF_schar>:
150: 00 00 26 2c cmpdi r6,0
154: 20 00 82 4d beqlr
158: 00 00 20 39 li r9,0
15c: 00 00 00 60 nop
160: 19 4a 04 7c lxvx vs32,r4,r9
164: 19 4a 25 7c lxvx vs33,r5,r9
168: 00 08 00 10 vaddubm v0,v0,v1
16c: 19 4b 03 7c stxvx vs32,r3,r9
170: 10 00 29 39 addi r9,r9,16
174: 40 48 a6 7f cmpld cr7,r6,r9
178: 20 00 9d 4c blelr cr7
17c: 19 4a 04 7c lxvx vs32,r4,r9
180: 19 4a 25 7c lxvx vs33,r5,r9
184: 00 08 00 10 vaddubm v0,v0,v1
188: 19 4b 03 7c stxvx vs32,r3,r9
18c: 10 00 29 39 addi r9,r9,16
190: 40 48 a6 7f cmpld cr7,r6,r9
194: cc ff 9d 41 bgt cr7,160 <DEREF_schar+0x10>
198: 20 00 80 4e blr
...
1a8: 00 00 00 60 nop
1ac: 00 00 00 60 nop
00000000000001b0 <DEREF_short>:
1b0: 00 00 26 2c cmpdi r6,0
1b4: 20 00 82 4d beqlr
1b8: ff ff c6 38 addi r6,r6,-1
1bc: 00 00 20 39 li r9,0
1c0: 02 e9 c6 78 rldicl r6,r6,61,4
1c4: 01 00 46 39 addi r10,r6,1
1c8: a6 03 49 7d mtctr r10
1cc: 00 00 00 60 nop
1d0: 19 4a 04 7c lxvx vs32,r4,r9
1d4: 19 4a 25 7c lxvx vs33,r5,r9
1d8: 40 08 00 10 vadduhm v0,v0,v1
1dc: 19 4b 03 7c stxvx vs32,r3,r9
1e0: 10 00 29 39 addi r9,r9,16
1e4: ec ff 00 42 bdnz 1d0 <DEREF_short+0x20>
1e8: 20 00 80 4e blr
...
1f8: 00 00 00 60 nop
1fc: 00 00 00 60 nop
0000000000000200 <DEREF_int>:
200: 00 00 26 2c cmpdi r6,0
204: 20 00 82 4d beqlr
208: ff ff c6 38 addi r6,r6,-1
20c: 00 00 20 39 li r9,0
210: 02 f1 c6 78 rldicl r6,r6,62,4
214: 01 00 46 39 addi r10,r6,1
218: a6 03 49 7d mtctr r10
21c: 00 00 00 60 nop
220: 19 4a 04 7c lxvx vs32,r4,r9
224: 19 4a 25 7c lxvx vs33,r5,r9
228: 80 08 00 10 vadduwm v0,v0,v1
22c: 19 4b 03 7c stxvx vs32,r3,r9
230: 10 00 29 39 addi r9,r9,16
234: ec ff 00 42 bdnz 220 <DEREF_int+0x20>
238: 20 00 80 4e blr
...
248: 00 00 00 60 nop
24c: 00 00 00 60 nop
0000000000000250 <DEREF_double>:
250: 00 00 26 2c cmpdi r6,0
254: 20 00 82 4d beqlr
258: ff ff c6 38 addi r6,r6,-1
25c: 00 00 20 39 li r9,0
260: 02 f9 c6 78 rldicl r6,r6,63,4
264: 01 00 46 39 addi r10,r6,1
268: a6 03 49 7d mtctr r10
26c: 00 00 00 60 nop
270: 18 4a 04 7c lxvx vs0,r4,r9
274: 18 4a 85 7d lxvx vs12,r5,r9
278: 00 63 00 f0 xvadddp vs0,vs0,vs12
27c: 18 4b 03 7c stxvx vs0,r3,r9
280: 10 00 29 39 addi r9,r9,16
284: ec ff 00 42 bdnz 270 <DEREF_double+0x20>
288: 20 00 80 4e blr
...
Disassembly of section .comment:
0000000000000000 <.comment>:
0: 00 47 43 43 bc- 26,so,4700 <DEREF_double+0x44b0>
4: 3a 20 28 55 rlwinm r8,r9,4,0,29
8: 62 75 6e 74 andis. r14,r3,30050
c: 75 20 38 2e cmpdi cr4,r24,8309
10: 33 2e 30 2d cmpdi cr2,r16,11827
14: 36 75 62 75 andis. r2,r11,30006
18: 6e 74 75 31 addic r11,r21,29806
1c: 29 20 38 2e cmpdi cr4,r24,8233
20: 33 2e 30 00 .long 0x302e33
Disassembly of section .eh_frame:
0000000000000000 <.eh_frame>:
0: 10 00 00 00 .long 0x10
4: 00 00 00 00 .long 0x0
8: 01 7a 52 00 .long 0x527a01
c: 04 78 41 01 .long 0x1417804
10: 1b 0c 01 00 .long 0x10c1b
14: 10 00 00 00 .long 0x10
18: 18 00 00 00 .long 0x18
1c: 00 00 00 00 .long 0x0
20: 58 00 00 00 .long 0x58
24: 00 00 00 00 .long 0x0
28: 10 00 00 00 .long 0x10
2c: 2c 00 00 00 .long 0x2c
30: 00 00 00 00 .long 0x0
34: 48 00 00 00 .long 0x48
38: 00 00 00 00 .long 0x0
3c: 10 00 00 00 .long 0x10
40: 40 00 00 00 .long 0x40
44: 00 00 00 00 .long 0x0
48: 48 00 00 00 .long 0x48
4c: 00 00 00 00 .long 0x0
50: 10 00 00 00 .long 0x10
54: 54 00 00 00 .long 0x54
58: 00 00 00 00 .long 0x0
5c: 48 00 00 00 .long 0x48
60: 00 00 00 00 .long 0x0
64: 10 00 00 00 .long 0x10
68: 68 00 00 00 .long 0x68
6c: 00 00 00 00 .long 0x0
70: 58 00 00 00 .long 0x58
74: 00 00 00 00 .long 0x0
78: 10 00 00 00 .long 0x10
7c: 7c 00 00 00 .long 0x7c
80: 00 00 00 00 .long 0x0
84: 48 00 00 00 .long 0x48
88: 00 00 00 00 .long 0x0
8c: 10 00 00 00 .long 0x10
90: 90 00 00 00 .long 0x90
94: 00 00 00 00 .long 0x0
98: 48 00 00 00 .long 0x48
9c: 00 00 00 00 .long 0x0
a0: 10 00 00 00 .long 0x10
a4: a4 00 00 00 .long 0xa4
a8: 00 00 00 00 .long 0x0
ac: 48 00 00 00 .long 0x48
b0: 00 00 00 00 .long 0x0
|
source/nodes/program-nodes-attribute_definition_clauses.adb | reznikmm/gela | 0 | 4222 | <reponame>reznikmm/gela<gh_stars>0
-- SPDX-FileCopyrightText: 2019 <NAME> <<EMAIL>>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
package body Program.Nodes.Attribute_Definition_Clauses is
function Create
(For_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Name : not null Program.Elements.Expressions.Expression_Access;
Use_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Expression : not null Program.Elements.Expressions.Expression_Access;
Semicolon_Token : not null Program.Lexical_Elements
.Lexical_Element_Access)
return Attribute_Definition_Clause is
begin
return Result : Attribute_Definition_Clause :=
(For_Token => For_Token, Name => Name, Use_Token => Use_Token,
Expression => Expression, Semicolon_Token => Semicolon_Token,
Enclosing_Element => null)
do
Initialize (Result);
end return;
end Create;
function Create
(Name : not null Program.Elements.Expressions
.Expression_Access;
Expression : not null Program.Elements.Expressions
.Expression_Access;
Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False)
return Implicit_Attribute_Definition_Clause is
begin
return Result : Implicit_Attribute_Definition_Clause :=
(Name => Name, Expression => Expression,
Is_Part_Of_Implicit => Is_Part_Of_Implicit,
Is_Part_Of_Inherited => Is_Part_Of_Inherited,
Is_Part_Of_Instance => Is_Part_Of_Instance, Enclosing_Element => null)
do
Initialize (Result);
end return;
end Create;
overriding function Name
(Self : Base_Attribute_Definition_Clause)
return not null Program.Elements.Expressions.Expression_Access is
begin
return Self.Name;
end Name;
overriding function Expression
(Self : Base_Attribute_Definition_Clause)
return not null Program.Elements.Expressions.Expression_Access is
begin
return Self.Expression;
end Expression;
overriding function For_Token
(Self : Attribute_Definition_Clause)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.For_Token;
end For_Token;
overriding function Use_Token
(Self : Attribute_Definition_Clause)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Use_Token;
end Use_Token;
overriding function Semicolon_Token
(Self : Attribute_Definition_Clause)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Semicolon_Token;
end Semicolon_Token;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Attribute_Definition_Clause)
return Boolean is
begin
return Self.Is_Part_Of_Implicit;
end Is_Part_Of_Implicit;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Attribute_Definition_Clause)
return Boolean is
begin
return Self.Is_Part_Of_Inherited;
end Is_Part_Of_Inherited;
overriding function Is_Part_Of_Instance
(Self : Implicit_Attribute_Definition_Clause)
return Boolean is
begin
return Self.Is_Part_Of_Instance;
end Is_Part_Of_Instance;
procedure Initialize
(Self : in out Base_Attribute_Definition_Clause'Class) is
begin
Set_Enclosing_Element (Self.Name, Self'Unchecked_Access);
Set_Enclosing_Element (Self.Expression, Self'Unchecked_Access);
null;
end Initialize;
overriding function Is_Attribute_Definition_Clause
(Self : Base_Attribute_Definition_Clause)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Attribute_Definition_Clause;
overriding function Is_Representation_Clause
(Self : Base_Attribute_Definition_Clause)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Representation_Clause;
overriding function Is_Clause
(Self : Base_Attribute_Definition_Clause)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Clause;
overriding procedure Visit
(Self : not null access Base_Attribute_Definition_Clause;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class) is
begin
Visitor.Attribute_Definition_Clause (Self);
end Visit;
overriding function To_Attribute_Definition_Clause_Text
(Self : in out Attribute_Definition_Clause)
return Program.Elements.Attribute_Definition_Clauses
.Attribute_Definition_Clause_Text_Access is
begin
return Self'Unchecked_Access;
end To_Attribute_Definition_Clause_Text;
overriding function To_Attribute_Definition_Clause_Text
(Self : in out Implicit_Attribute_Definition_Clause)
return Program.Elements.Attribute_Definition_Clauses
.Attribute_Definition_Clause_Text_Access is
pragma Unreferenced (Self);
begin
return null;
end To_Attribute_Definition_Clause_Text;
end Program.Nodes.Attribute_Definition_Clauses;
|
bb-runtimes/runtimes/ravenscar-full-stm32g474/gnat/s-expmod.ads | JCGobbi/Nucleo-STM32G474RE | 0 | 22158 | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . E X P _ M O D --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2021, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- --
-- --
-- --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This function performs exponentiation of a modular type with nonbinary
-- modulus values. Arithmetic is done in Long_Long_Unsigned, with explicit
-- accounting for the modulus value which is passed as the second argument.
-- Note that 1 is a binary modulus (2**0), so the compiler should not (and
-- will not) call this function with Modulus equal to 1.
with System.Unsigned_Types;
package System.Exp_Mod is
pragma Pure;
use type System.Unsigned_Types.Unsigned;
subtype Power_Of_2 is System.Unsigned_Types.Unsigned with
Dynamic_Predicate =>
Power_Of_2 /= 0 and then (Power_Of_2 and (Power_Of_2 - 1)) = 0;
function Exp_Modular
(Left : System.Unsigned_Types.Unsigned;
Modulus : System.Unsigned_Types.Unsigned;
Right : Natural) return System.Unsigned_Types.Unsigned
with
Pre => Modulus /= 0 and then Modulus not in Power_Of_2,
Post => Exp_Modular'Result = Left ** Right mod Modulus;
end System.Exp_Mod;
|
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/antlr4/imports/sqlserver/Literals.g4 | angelbi/shardingsphere | 0 | 746 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
lexer grammar Literals;
import Alphabet, Symbol;
IDENTIFIER_
: LBT_? DQ_? [a-zA-Z_$#\u0080-\uFFFF][a-zA-Z0-9_$#\u0080-\uFFFF\\@/]* DQ_? RBT_?
;
STRING_
: (DQ_ ( '\\'. | '""' | ~('"'| '\\') )* DQ_)
| (SQ_ ('\\'. | '\'\'' | ~('\'' | '\\'))* SQ_)
;
NUMBER_
: INT_NUM_
| FLOAT_NUM_
| DECIMAL_NUM_
;
INT_NUM_
: DIGIT+
;
FLOAT_NUM_
: INT_NUM_? DOT_? INT_NUM_ E (PLUS_ | MINUS_)? INT_NUM_
;
DECIMAL_NUM_
: INT_NUM_? DOT_ INT_NUM_
;
HEX_DIGIT_
: '0x' HEX_+ | 'X' SQ_ HEX_+ SQ_
;
BIT_NUM_
: '0b' ('0' | '1')+ | B SQ_ ('0' | '1')+ SQ_
;
NCHAR_TEXT
: N STRING_
;
fragment DIGIT
: [0-9]
;
fragment HEX_
: [0-9a-fA-F]
;
NAME_
: LBT_ [a-zA-Z_$#\\/@. ]+ RBT_
;
|
oeis/261/A261667.asm | neoneye/loda-programs | 11 | 97352 | ; A261667: Dimension of a certain space of duality relations arising in study of q-analogs of multiple zeta values.
; Submitted by <NAME>
; 0,0,0,0,1,2,6,12,25,48,90
sub $0,2
mov $2,1
mov $3,$0
mul $3,4
lpb $3
add $0,1
add $1,$2
add $5,$2
add $1,$5
add $2,$1
mul $1,2
sub $3,1
cmp $5,2
lpe
mul $2,$1
mov $4,10
pow $4,$0
cmp $6,0
add $4,$6
div $2,$4
mov $6,$2
cmp $6,0
add $2,$6
mov $0,$2
sub $0,1
|
oeis/147/A147625.asm | neoneye/loda-programs | 11 | 94143 | ; A147625: Octo-factorial numbers(4).
; 1,5,65,1365,39585,1464645,65909025,3493178325,213083877825,14702787569925,1132114642884225,96229744645159125,8949366251999798625,903885991451979661125,98523573068265783062625,11527258048987096618327125,1440907256123387077290890625,191640665064410481279688453125,27021333774081877860436071890625,4026178732338199801204974711703125,632110060977097368789181029737390625,104298160061221065850214869906669453125,18043581690591244392087172493853815390625,3265888285997015234967778221387540585703125
mov $2,4
mov $3,5
mov $4,$0
lpb $4
mul $2,$3
add $3,8
sub $4,1
lpe
mov $0,$2
div $0,4
|
libsrc/ctype/asm_iscntrl.asm | andydansby/z88dk-mk2 | 1 | 160065 | <filename>libsrc/ctype/asm_iscntrl.asm
; asm_iscntrl
XLIB asm_iscntrl
; determine if the char is in [A-Za-z]
; enter : a = char
; exit : carry = not a control char
; uses : f
.asm_iscntrl
cp 127
ccf
ret z
cp 32
ccf
ret
|
programs/oeis/017/A017476.asm | neoneye/loda | 22 | 14251 | ; A017476: a(n) = (11*n + 7)^4.
; 2401,104976,707281,2560000,6765201,14776336,28398241,49787136,81450625,126247696,187388721,268435456,373301041,506250000,671898241,875213056,1121513121,1416468496,1766100625,2176782336,2655237841,3208542736,3844124001,4569760000,5393580481,6324066576,7370050801,8540717056,9845600625,11294588176,12897917761,14666178816,16610312161,18741610000,21071715921,23612624896,26376683281,29376588816,32625390625,36136489216,39923636481,44000935696,48382841521,53084160000,58120048561,63506016016,69257922561,75391979776,81924750625,88873149456,96254442001,104086245376,112386528081,121173610000,130466162401,140283207936,150644120641,161568625936,173076800625,185189072896,197926222321,211309379856,225360027841,240100000000,255551481441,271737008656,288679469521,306402103296,324928500625,344282603536,364488705441,385571451136,407555836801,430467210000,454331269681,479174066176,505022001201,531901827856,559840650625,588865925376,619005459361,650287411216,682740290961,716392960000,751274631121,787414868496,824843587681,863591055616,903687890625,945165062416,988053892081,1032386052096,1078193566321,1125508810000,1174364509761,1224793743616,1276829940961,1330506882576,1385858700625,1442919878656
mul $0,11
add $0,7
pow $0,4
|
programs/oeis/033/A033118.asm | neoneye/loda | 22 | 9753 | ; A033118: Base 8 digits are, in order, the first n terms of the periodic sequence with initial period 1,0.
; 1,8,65,520,4161,33288,266305,2130440,17043521,136348168,1090785345,8726282760,69810262081,558482096648,4467856773185,35742854185480,285942833483841,2287542667870728,18300341342965825,146402730743726600,1171221845949812801,9369774767598502408,74958198140788019265,599665585126304154120,4797324681010433232961,38378597448083465863688,307028779584667726909505,2456230236677341815276040,19649841893418734522208321,157198735147349876177666568,1257589881178799009421332545,10060719049430392075370660360,80485752395443136602965282881,643886019163545092823722263048,5151088153308360742589778104385,41208705226466885940718224835080,329669641811735087525745798680641,2637357134493880700205966389445128,21098857075951045601647731115561025,168790856607608364813181848924488200
add $0,1
lpb $0
mov $2,$0
trn $0,2
mul $2,2
seq $2,94014 ; Expansion of (1-2x)/(1-8x^2).
add $3,$2
lpe
mov $0,$3
div $0,8
|
src/numerics-max_real_array.adb | sciencylab/lagrangian-solver | 0 | 7330 | separate (Numerics)
function Max_Real_Array (Item : in Real_Vector) return Real is
Result : Real := Item (Item'First);
begin
for N of Item loop
Result := Real'Max (Result, N);
end loop;
return Result;
end Max_Real_Array;
|
dd/qlnd/break.asm | olifink/smsqe | 0 | 177050 | <filename>dd/qlnd/break.asm
* Test for break 1985 <NAME> QJUMP
*
section nd
*
xdef nd_break test for break
*
include dev8_dd_qlnd_keys
*
* Test for break
*
* IPC commands to read rows of the keyboard
*
dc.w $02 position of CTRL
ipc_rr7 dc.b 9,1,0,0,0,0,7,2 read CTRL key row
dc.w $40 position of SPACE
ipc_rr1 dc.b 9,1,0,0,0,0,1,2 read SPACE key row
*
nd_break
movem.l d1/d5/d7/a3,-(sp) save volatiles
lea ipc_rr7(pc),a3 check CTRL key row
bsr.s ipc_do
beq.s ndb_exit not pressed
lea ipc_rr1(pc),a3 check SPACE key row
bsr.s ipc_do
ndb_exit
movem.l (sp)+,d1/d5/d7/a3
rts
ipc_do
moveq #mt.ipcom,d0 do command
trap #1
and.b -(a3),d1 check if key pressed
rts
end
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1032.asm | ljhsiun2/medusa | 9 | 85434 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r8
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0x19564, %rsi
lea addresses_A_ht+0x3a0a, %rdi
nop
and %r13, %r13
mov $68, %rcx
rep movsb
nop
nop
nop
nop
cmp %r8, %r8
lea addresses_WT_ht+0xa512, %rsi
lea addresses_D_ht+0x960a, %rdi
clflush (%rsi)
clflush (%rdi)
nop
sub $19828, %rbx
mov $43, %rcx
rep movsl
add %r8, %r8
lea addresses_normal_ht+0xc68a, %r8
and %r10, %r10
mov (%r8), %rsi
nop
nop
add %rdi, %rdi
lea addresses_WC_ht+0x178ea, %rcx
nop
nop
nop
sub %r10, %r10
mov (%rcx), %rbx
nop
nop
nop
nop
xor $18523, %r8
lea addresses_D_ht+0x1020a, %rbx
nop
nop
xor %r8, %r8
movb $0x61, (%rbx)
nop
nop
nop
add %rcx, %rcx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r8
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r8
push %rax
push %rbx
push %rcx
push %rdx
// Store
lea addresses_D+0xcf0a, %rcx
nop
nop
xor $16818, %rbx
mov $0x5152535455565758, %r8
movq %r8, (%rcx)
nop
nop
nop
nop
inc %rdx
// Faulty Load
lea addresses_A+0xe20a, %rcx
nop
nop
nop
add $60218, %r12
mov (%rcx), %edx
lea oracles, %rcx
and $0xff, %rdx
shlq $12, %rdx
mov (%rcx,%rdx,1), %rdx
pop %rdx
pop %rcx
pop %rbx
pop %rax
pop %r8
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_A', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 7}}
[Faulty Load]
{'src': {'type': 'addresses_A', 'AVXalign': False, 'size': 4, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 11, 'same': False}}
{'src': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}}
{'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 4}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'AVXalign': True, 'size': 8, 'NT': True, 'same': False, 'congruent': 5}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 11}}
{'35': 21829}
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
*/
|
vm_check/arithmetic/0_division.asm | skiff-vm/skiff | 0 | 22873 | <gh_stars>0
.init main
.debug 3
.float LHS 10.0
.float RHS 2.0
.float result 5.0
.code
integer_based:
mov i0 @15 ; LHS
mov i1 @5 ; RHS
mov i2 @3 ; Expected
div i0 i0 i1 ; Perform division
aseq i0 i2 ; Ensure things are equal
ret
float_based:
mov i1 @0 ; Load constants from 0 slot
mov i5 &LHS ; At offset of data item
lqw i1 i5 i5 ; Load LHS into i5 (retrieve data)
mov i6 &RHS ; At offset of data item
lqw i1 i6 i6 ; Load RHS into i6 (retrieve data)
mov i7 &result ; At offset of data item
lqw i1 i7 i7 ; Load expected result into i7 (retrieve data)
divf i5 i5 i6 ; Div LHS by RHS and store in i5
aseq i5 i7 ; Ensure that the result meets expectations
ret
main:
call integer_based ; Check integer based
call float_based ; Check float based
mov i0 @0 ; Load up expected return value
exit
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1972.asm | ljhsiun2/medusa | 9 | 97531 | <gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r15
push %r8
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x8c10, %r8
xor %r11, %r11
vmovups (%r8), %ymm4
vextracti128 $1, %ymm4, %xmm4
vpextrq $1, %xmm4, %r10
nop
nop
nop
nop
nop
xor %rsi, %rsi
lea addresses_WT_ht+0x1645a, %rbp
nop
nop
nop
nop
add %r8, %r8
mov $0x6162636465666768, %rsi
movq %rsi, %xmm6
movups %xmm6, (%rbp)
nop
nop
nop
inc %r11
lea addresses_A_ht+0x1f94, %r15
nop
nop
nop
nop
cmp $19476, %rdi
movups (%r15), %xmm3
vpextrq $1, %xmm3, %r10
nop
nop
xor $33503, %r11
lea addresses_D_ht+0xd414, %rsi
nop
nop
nop
nop
nop
and %rbp, %rbp
movb (%rsi), %r10b
nop
nop
nop
add %rbp, %rbp
lea addresses_A_ht+0x7614, %r8
nop
xor $50368, %rbp
mov (%r8), %r10
nop
nop
nop
nop
dec %r11
lea addresses_D_ht+0xe2ac, %rsi
nop
nop
nop
nop
nop
cmp %r15, %r15
movw $0x6162, (%rsi)
nop
nop
nop
nop
add %r11, %r11
lea addresses_D_ht+0x3814, %r11
nop
nop
nop
nop
nop
cmp %r8, %r8
mov (%r11), %rdi
xor $47006, %rsi
lea addresses_UC_ht+0x1e494, %rsi
lea addresses_UC_ht+0x5ccc, %rdi
nop
nop
nop
nop
inc %r11
mov $22, %rcx
rep movsw
nop
cmp $20789, %rcx
lea addresses_WC_ht+0xdf94, %r8
nop
xor %rbp, %rbp
mov (%r8), %cx
nop
nop
sub %rsi, %rsi
lea addresses_A_ht+0x15954, %rcx
inc %r10
movw $0x6162, (%rcx)
nop
sub %r11, %r11
lea addresses_WC_ht+0x11394, %r11
nop
nop
nop
nop
nop
sub $64037, %rsi
movb $0x61, (%r11)
nop
nop
nop
lfence
lea addresses_D_ht+0xfe74, %rsi
lea addresses_WC_ht+0x1b5b8, %rdi
nop
nop
nop
nop
add %r8, %r8
mov $24, %rcx
rep movsl
nop
nop
nop
cmp $4853, %rbp
lea addresses_D_ht+0xb94, %r15
nop
nop
nop
nop
sub $47329, %rdi
mov $0x6162636465666768, %r10
movq %r10, %xmm7
movups %xmm7, (%r15)
sub %rdi, %rdi
lea addresses_WT_ht+0x1e194, %r10
nop
and $15102, %rbp
mov $0x6162636465666768, %rcx
movq %rcx, %xmm4
vmovups %ymm4, (%r10)
nop
nop
nop
cmp %r11, %r11
lea addresses_WC_ht+0x1cb94, %rsi
lea addresses_D_ht+0x1d434, %rdi
nop
cmp $16166, %r10
mov $33, %rcx
rep movsl
nop
nop
nop
nop
nop
xor $14586, %rsi
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r8
pop %r15
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r15
push %rax
push %rbp
push %rbx
push %rcx
// Store
lea addresses_WC+0x7714, %r15
nop
nop
xor %rax, %rax
mov $0x5152535455565758, %rbp
movq %rbp, %xmm5
movups %xmm5, (%r15)
nop
nop
nop
nop
nop
add %r15, %r15
// Faulty Load
lea addresses_WT+0x8394, %r12
nop
nop
nop
nop
nop
add $13563, %rcx
vmovups (%r12), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $1, %xmm6, %rbp
lea oracles, %rbx
and $0xff, %rbp
shlq $12, %rbp
mov (%rbx,%rbp,1), %rbp
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r15
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_WT', 'NT': False, 'AVXalign': True, 'size': 1, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 6}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 2}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 1}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 7}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 7}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 7}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': True, 'size': 2, 'congruent': 3}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D_ht', 'NT': True, 'AVXalign': False, 'size': 8, 'congruent': 6}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_UC_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 8}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 1}}
{'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_WC_ht', 'NT': True, 'AVXalign': False, 'size': 1, 'congruent': 11}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 2, 'type': 'addresses_WC_ht'}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 10}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 8}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 9, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 5, 'type': 'addresses_D_ht'}}
{'39': 21829}
39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39
*/
|
oeis/019/A019444.asm | neoneye/loda-programs | 11 | 87862 | ; A019444: a_1, a_2, ..., is a permutation of the positive integers such that the average of each initial segment is an integer, using the greedy algorithm to define a_n.
; Submitted by <NAME>iga
; 1,3,2,6,8,4,11,5,14,16,7,19,21,9,24,10,27,29,12,32,13,35,37,15,40,42,17,45,18,48,50,20,53,55,22,58,23,61,63,25,66,26,69,71,28,74,76,30,79,31,82,84,33,87,34,90,92,36,95,97,38,100,39,103,105,41,108,110,43,113,44,116,118,46,121,47,124,126,49,129,131,51,134,52,137,139,54,142,144,56,147,57,150,152,59,155,60,158,160,62
seq $0,2251 ; Start with the nonnegative integers; then swap L(k) and U(k) for all k >= 1, where L = A000201, U = A001950 (lower and upper Wythoff sequences).
add $0,1
|
oeis/004/A004610.asm | neoneye/loda-programs | 11 | 246593 | ; A004610: Expansion of sqrt(6) in base 3.
; Submitted by <NAME>(s2)
; 2,1,1,0,0,1,0,2,0,0,0,2,2,0,2,1,1,1,1,2,2,1,1,2,2,0,1,2,2,1,2,0,1,0,1,0,0,0,2,1,2,2,1,1,0,0,1,1,1,1,1,2,0,0,1,0,1,1,1,1,2,2,0,0,2,1,0,2,2,1,1,2,1,0,1,0,1,1,0,1,0,0,1,2,0,1,0,2,2,1,0,1,1,0,1,1,2,1,0,2
mov $1,1
mov $2,1
mov $3,$0
add $3,2
mov $4,$0
add $4,2
mov $7,10
pow $7,$4
lpb $3
mov $4,$2
pow $4,2
mul $4,6
mov $5,$1
pow $5,2
add $4,$5
mov $6,$1
mov $1,$4
mul $6,$2
mul $6,2
mov $2,$6
mov $8,$4
div $8,$7
max $8,1
div $1,$8
div $2,$8
sub $3,1
mov $9,3
lpe
mov $3,$9
pow $3,$0
div $2,$3
div $1,$2
mod $1,$9
mov $0,$1
|
src/test/resources/RegistryLexer.g4 | google/polymorphicDSL | 3 | 169 | lexer grammar RegistryLexer;
import AlphaLexer, PolymorphicDslCommonLexer, BetaLexer;
|
data/pokemon/base_stats/hoenn/corphish.asm | Dev727/ancientplatinum | 0 | 1407 | <filename>data/pokemon/base_stats/hoenn/corphish.asm
db 0 ; 341 DEX NO
db 43, 80, 65, 35, 50, 35
; hp atk def spd sat sdf
db WATER, WATER ; type
db 205 ; catch rate
db 111 ; base exp
db NO_ITEM, NO_ITEM ; items
db GENDER_F50 ; gender ratio
db 100 ; unknown 1
db 15 ; step cycles to hatch
db 5 ; unknown 2
INCBIN "gfx/pokemon/hoenn/corphish/front.dimensions"
db 0, 0, 0, 0 ; padding
db GROWTH_FLUCTUATING ; growth rate
dn EGG_WATER_1, EGG_WATER_3 ; egg groups
; tm/hm learnset
tmhm
; end
|
src/kernel/x64/cpu.asm | 7E00h/septos | 1 | 177304 | BITS 64
global _asm_out_8
global _asm_out_16
global _asm_out_32
global _asm_in_8
global _asm_in_16
global _asm_in_32
global _asm_load_cr3
global _asm_read_cr3
section .text
_asm_out_8:
push rax
push rdx
movsx rdx, edi ; Address
movsx rax, esi ; Data
out dx, al
pop rdx
pop rax
ret
_asm_out_16:
push rax
push rdx
movsx rdx, edi ; Address
movsx rax, esi ; Data
out dx, ax
pop rdx
pop rax
ret
_asm_out_32:
push rax
push rdx
movsx rdx, edi ; Address
movsx rax, esi ; Data
out dx, eax
pop rdx
pop rax
ret
_asm_in_8:
push rdx
xor rax, rax
movsx rdx, edi ; Address
in al, dx
pop rdx
ret
_asm_in_16:
push rdx
xor rax, rax
movsx rdx, edi ; Address
in ax, dx
pop rdx
ret
_asm_in_32:
push rdx
xor rax, rax
movsx rdx, edi ; Address
in eax, dx
pop rdx
ret
_asm_load_cr3:
mov cr3, rdi
ret
_asm_read_cr3:
mov rax, cr3
ret |
test/Succeed/normalise-bug.agda | KDr2/agda | 1 | 14811 | <reponame>KDr2/agda<filename>test/Succeed/normalise-bug.agda
open import Agda.Builtin.Reflection renaming (bindTC to _>>=_)
open import Agda.Builtin.Sigma
open import Agda.Builtin.List
open import Agda.Builtin.Unit
open import Agda.Builtin.Nat
open import Agda.Builtin.Equality
infixr 0 _$_
_$_ : ∀ {a b}{A : Set a}{B : Set b} → (A → B) → (A → B)
f $ x = f x
map : {A B : Set} → (A → B) → List A → List B
map f [] = []
map f (x ∷ xs) = f x ∷ map f xs
reverseAcc : {A : Set} → List A → List A → List A
reverseAcc [] ys = ys
reverseAcc (x ∷ xs) ys = reverseAcc xs (x ∷ ys)
reverse : {A : Set} → List A → List A
reverse xs = reverseAcc xs []
data Vec (A : Set) : Nat → Set where
[] : Vec A 0
_∷_ : ∀ {n} (x : A) (xs : Vec A n) → Vec A (suc n)
macro
ntest : Name → Term → TC ⊤
ntest f a = do
(function te@(clause tel _ t ∷ [])) ← withReconstructed $ getDefinition f where
_ → typeError $ strErr "ERROR" ∷ []
t ← withReconstructed $ inContext (reverse tel) $ normalise t
quoteTC t >>= unify a
-- A record with parameters.
record X {n} (x : Vec Nat n) : Set where
constructor mk
field
c : Nat
-- A function that we will call at the unknown argument position
-- when defining the type of `f`.
[_] : ∀ {X} → X → Vec X 1
[ x ] = x ∷ []
-- The function that has two reconstructable arguments in the body.
f : X [ 1 ]
f = mk 1
-- Normalisation of the body of the function should also
-- normalise reconstructed arguments.
test : ntest f ≡ con (quote mk) (_ ∷ arg _ (con (quote Vec._∷_) _) ∷ _)
test = refl
|
programs/oeis/040/A040247.asm | karttu/loda | 0 | 7063 | ; A040247: Continued fraction for sqrt(264).
; 16,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32,4,32
sub $0,1
mod $0,2
mul $0,10
add $0,2
pow $0,2
mov $1,$0
div $1,20
mul $1,4
add $1,4
|
Experiment/ApplicativeOld.agda | rei1024/agda-misc | 3 | 14878 | <filename>Experiment/ApplicativeOld.agda
{-# OPTIONS --without-K --safe #-}
module Experiment.Applicative where
open import Function.Base
open import Relation.Binary.PropositionalEquality
record Functor (F : Set → Set) : Set₁ where
field
fmap : ∀ {A B} → (A → B) → F A → F B
field
fmap-id : ∀ {A} (x : F A) → fmap id x ≡ x
fmap-∘ : ∀ {A B C} (f : B → C) (g : A → B) (x : F A) →
fmap f (fmap g x) ≡ fmap (f ∘′ g) x
fmap-cong : ∀ {A B} {f g : A → B} {x : F A} →
(∀ v → f v ≡ g v) → fmap f x ≡ fmap g x
record Applicative (F : Set → Set) : Set₁ where
infixl 5 _<*>_
field
pure : ∀ {A} → A → F A
_<*>_ : ∀ {A B} → F (A → B) → F A → F B
field
identity : ∀ {A} (v : F A) → pure id <*> v ≡ v
composition : ∀ {A B C} (u : F (A → C)) (v : F (B → A)) (w : F B) →
pure _∘′_ <*> u <*> v <*> w ≡ u <*> (v <*> w)
homomorphism : ∀ {A B} (f : A → B) (x : A) → pure f <*> pure x ≡ pure (f x)
interchange : ∀ {A B} (u : F (A → B)) (y : A) →
u <*> pure y ≡ pure (_$ y) <*> u
-- <*>-cong : (∀ x → ff <*> pure x ≡ fg <*> pure x) → ff <*> fx ≡ fg <*> fx
homomorphism₂ : ∀ {A B C} (f : A → B → C) (x : A) (y : B) →
pure f <*> pure x <*> pure y ≡ pure (f x y)
homomorphism₂ f x y = begin
pure f <*> pure x <*> pure y ≡⟨ cong (_<*> pure y) $ homomorphism f x ⟩
pure (f x) <*> pure y ≡⟨ homomorphism (f x) y ⟩
pure (f x y) ∎
where open ≡-Reasoning
functor : Functor F
functor = record
{ fmap = λ f fx → pure f <*> fx
; fmap-id = identity
; fmap-∘ = λ f g x → begin
pure f <*> (pure g <*> x)
≡⟨ sym $ composition (pure f) (pure g) x ⟩
pure _∘′_ <*> pure f <*> pure g <*> x
≡⟨ cong (λ v → v <*> x) $ homomorphism₂ _∘′_ f g ⟩
pure (f ∘′ g) <*> x
∎
; fmap-cong = λ {A} {B} {f = f} {g = g} {x = x} f≡g → {! !}
}
where open ≡-Reasoning
liftA2 : ∀ {A B C} → (A → B → C) → F A → F B → F C
liftA2 f fx fy = pure f <*> fx <*> fy
{-
forall x y. p (q x y) = f x . g y
it follows from the above that
liftA2 p (liftA2 q u v) = liftA2 f u . liftA2 g v
-}
record ApplicativeViaZip (F : Set → Set) : Set₁ where
field
pair : F A → F B → F (A × B)
pair fx fy = ?
record Monad (F : Set → Set) : Set₁ where
infixl 5 _>>=_
field
return : ∀ {A} → A → F A
_>>=_ : ∀ {A B} → F A → (A → F B) → F B
field
identityˡ : ∀ {A B} (a : A) (k : A → F B) → return a >>= k ≡ k a
identityʳ : ∀ {A} (m : F A) → m >>= return ≡ m
assoc : ∀ {A B C} (m : F A) (k : A → F B) (h : B → F C) →
m >>= (λ x → k x >>= h) ≡ (m >>= k) >>= h
join : ∀ {A} → F (F A) → F A
join x = x >>= id
-- pure f <*> x ≡ pure g <*> x
m >>= k = join (fmap k m)
(∀ x → k x ≡ l x)
join (fmap k m)
join (fmap l m
liftM1 : ∀ {A B} → (A → B) → F A → F B
liftM1 f mx = mx >>= (λ x → return (f x))
functor : Functor F
functor = record
{ fmap = liftM1
; fmap-id = λ fx → identityʳ fx
; fmap-∘ = λ f g x → begin
liftM1 f (liftM1 g x) ≡⟨ refl ⟩
liftM1 g x >>= (λ y → return (f y)) ≡⟨ refl ⟩
(x >>= (λ y → return (g y))) >>= (λ y → return (f y))
≡⟨ sym $ assoc x (λ y → return (g y)) (λ y → return (f y)) ⟩
x >>= (λ y → return (g y) >>= (return ∘ f) )
≡⟨ cong (λ v → x >>= v) $ {! !} ⟩
x >>= (λ y → return (f (g y))) ≡⟨ refl ⟩
liftM1 (f ∘′ g) x ∎
}
where open ≡-Reasoning
applicative : Applicative F
applicative = record
{ pure = return
; _<*>_ = λ fab fa → fab >>= λ ab → fa >>= λ a → return (ab a)
; identity = λ v → begin
return id >>= (λ ab → v >>= λ a → return (ab a)) ≡⟨ identityˡ id _ ⟩
v >>= return ≡⟨ identityʳ v ⟩
v ∎
; composition = λ u v w → begin
return _∘′_ >>= (λ f → u >>= (return ∘ f)) >>= (λ f → v >>= (return ∘ f))
>>= (λ f → w >>= (return ∘ f)) ≡⟨ {! !} ⟩
u >>= (λ f → v >>= (λ g → w >>= (return ∘ g)) >>= (return ∘ f))
∎
; homomorphism = {! !}
; interchange = {! !}
}
where open ≡-Reasoning
{-
return _∘′_ >>= (λ f → u >>= (λ a → return (f a))) >>=
(λ f → v >>= (λ a → return (f a)))
>>= (λ f → w >>= (λ a → return (f a)))
≡
u >>=
(λ f →
v >>= (λ g → w >>= (λ a → return (g a))) >>=
(λ a → return (f a)))
-}
-- Traversable
|
agda-stdlib/src/Text/Pretty/Core.agda | DreamLinuxer/popl21-artifact | 5 | 634 | <filename>agda-stdlib/src/Text/Pretty/Core.agda
------------------------------------------------------------------------
-- The Agda standard library
--
-- Pretty Printing
-- This module is based on <NAME>'s functional pearl
-- "A Pretty But Not Greedy Printer"
------------------------------------------------------------------------
{-# OPTIONS --with-K #-}
module Text.Pretty.Core where
import Level
open import Data.Bool.Base using (Bool)
open import Data.Erased as Erased using (Erased) hiding (module Erased)
open import Data.List.Base as List using (List; []; _∷_)
open import Data.Nat.Base using (ℕ; zero; suc; _+_; _⊔_; _≤_; z≤n)
open import Data.Nat.Properties
open import Data.Product as Prod using (_×_; _,_; uncurry; proj₁; proj₂)
import Data.Product.Relation.Unary.All as Allᴾ
open import Data.Tree.Binary as Tree using (Tree; leaf; node)
open import Data.Tree.Binary.Relation.Unary.All as Allᵀ using (leaf; node)
import Data.Tree.Binary.Relation.Unary.All.Properties as Allᵀₚ
import Data.Tree.Binary.Properties as Treeₚ
open import Data.Maybe.Base as Maybe using (Maybe; nothing; just; maybe′)
open import Data.Maybe.Relation.Unary.All as Allᴹ using (nothing; just)
open import Data.String.Base as String
open import Data.String.Unsafe as Stringₚ
open import Function.Base
open import Relation.Nullary using (Dec)
open import Relation.Unary using (IUniversal; _⇒_)
open import Relation.Binary.PropositionalEquality
open import Data.Refinement hiding (map)
import Data.Refinement.Relation.Unary.All as Allᴿ
------------------------------------------------------------------------
-- Block of text
-- Content is a representation of the first line and the middle of the block.
-- We use a tree rather than a list for the middle of the block so that we can
-- extend it with lines on the left and on the line for free. We will ultimately
-- render the block by traversing the tree left to right in a depth-first manner.
Content : Set
Content = Maybe (String × Tree String)
size : Content → ℕ
size = maybe′ (suc ∘ Tree.size ∘ proj₂) 0
All : ∀ {p} (P : String → Set p) → (Content → Set p)
All P = Allᴹ.All (Allᴾ.All P (Allᵀ.All P))
All≤ : ℕ → Content → Set
All≤ n = All (λ s → length s ≤ n)
record Block : Set where
field
height : ℕ
block : [ xs ∈ Content ∣ size xs ≡ height ]
-- last line
lastWidth : ℕ
last : [ s ∈ String ∣ length s ≡ lastWidth ]
-- max of all the widths
maxWidth : [ n ∈ ℕ ∣ lastWidth ≤ n × All≤ n (block .value) ]
------------------------------------------------------------------------
-- Raw string
text : String → Block
text s = record
{ height = 0
; block = nothing , ⦇ refl ⦈
; lastWidth = width
; last = s , ⦇ refl ⦈
; maxWidth = width , ⦇ (≤-refl , nothing) ⦈
} where width = length s; open Erased
------------------------------------------------------------------------
-- Empty
empty : Block
empty = text ""
------------------------------------------------------------------------
-- Helper functions
node? : Content → String → Tree String → Content
node? (just (x , xs)) y ys = just (x , node xs y ys)
node? nothing y ys = just (y , ys)
∣node?∣ : ∀ b y ys → size (node? b y ys)
≡ size b + suc (Tree.size ys)
∣node?∣ (just (x , xs)) y ys = refl
∣node?∣ nothing y ys = refl
≤-Content : ∀ {m n} {b : Content} → m ≤ n → All≤ m b → All≤ n b
≤-Content {m} {n} m≤n = Allᴹ.map (Prod.map step (Allᵀ.map step))
where
step : ∀ {p} → p ≤ m → p ≤ n
step = flip ≤-trans m≤n
All≤-node? : ∀ {l m r n} →
All≤ n l → length m ≤ n → Allᵀ.All (λ s → length s ≤ n) r →
All≤ n (node? l m r)
All≤-node? nothing py pys = just (py , pys)
All≤-node? (just (px , pxs)) py pys = just (px , node pxs py pys)
------------------------------------------------------------------------
-- Appending two documents
private
module append (x y : Block) where
module x = Block x
module y = Block y
blockx = x.block .value
blocky = y.block .value
widthx = x.maxWidth .value
widthy = y.maxWidth .value
lastx = x.last .value
lasty = y.last .value
height : ℕ
height = (_+_ on Block.height) x y
lastWidth : ℕ
lastWidth = (_+_ on Block.lastWidth) x y
pad : Maybe String
pad with x.lastWidth
... | 0 = nothing
... | l = just (replicate l ' ')
size-pad : maybe′ length 0 pad ≡ x.lastWidth
size-pad with x.lastWidth
... | 0 = refl
... | l@(suc _) = length-replicate l
indent : Maybe String → String → String
indent = maybe′ _++_ id
size-indent : ∀ ma str → length (indent ma str)
≡ maybe′ length 0 ma + length str
size-indent nothing str = refl
size-indent (just pad) str = length-++ pad str
indents : Maybe String → Tree String → Tree String
indents = maybe′ (Tree.map ∘ _++_) id
size-indents : ∀ ma t → Tree.size (indents ma t) ≡ Tree.size t
size-indents nothing t = refl
size-indents (just pad) t = Treeₚ.size-map (pad ++_) t
unfold-indents : ∀ ma t → indents ma t ≡ Tree.map (indent ma) t
unfold-indents nothing t = sym (Treeₚ.map-id t)
unfold-indents (just pad) t = refl
vContent : Content × String
vContent with blocky
... | nothing = blockx
, lastx ++ lasty
... | just (hd , tl) = node?
{-,--------------,-}
{-|-} blockx {-|-}
{-|-} {-'---,-} {-,------------------,-}
{-|-} (lastx {-|-} ++ {-|-} hd) {-|-}
{-'------------------'-} {-|-} {-|-}
(indents pad {-|-} tl) {-,----'-}
, indent pad {-|-} lasty {-|-}
{-'-------------'-}
vBlock = proj₁ vContent
vLast = proj₂ vContent
isBlock : size blockx ≡ x.height → size blocky ≡ y.height →
size vBlock ≡ height
isBlock ∣x∣ ∣y∣ with blocky
... | nothing = begin
size blockx ≡⟨ ∣x∣ ⟩
x.height ≡˘⟨ +-identityʳ x.height ⟩
x.height + 0 ≡⟨ cong (_ +_) ∣y∣ ⟩
x.height + y.height ∎ where open ≡-Reasoning
... | just (hd , tl) = begin
∣node∣ ≡⟨ ∣node?∣ blockx middle rest ⟩
∣blockx∣ + suc (Tree.size rest) ≡⟨ cong ((size blockx +_) ∘′ suc) ∣rest∣ ⟩
∣blockx∣ + suc (Tree.size tl) ≡⟨ cong₂ _+_ ∣x∣ ∣y∣ ⟩
x.height + y.height ∎ where
open ≡-Reasoning
∣blockx∣ = size blockx
middle = lastx ++ hd
rest = indents pad tl
∣rest∣ = size-indents pad tl
∣node∣ = size (node? blockx middle rest)
block : [ xs ∈ Content ∣ size xs ≡ height ]
block .value = vBlock
block .proof = ⦇ isBlock (Block.block x .proof) (Block.block y .proof) ⦈
where open Erased
isLastLine : length lastx ≡ x.lastWidth →
length lasty ≡ y.lastWidth →
length vLast ≡ lastWidth
isLastLine ∣x∣ ∣y∣ with blocky
... | nothing = begin
length (lastx ++ lasty) ≡⟨ length-++ lastx lasty ⟩
length lastx + length lasty ≡⟨ cong₂ _+_ ∣x∣ ∣y∣ ⟩
x.lastWidth + y.lastWidth ∎ where open ≡-Reasoning
... | just (hd , tl) = begin
length (indent pad lasty) ≡⟨ size-indent pad lasty ⟩
maybe′ length 0 pad + length lasty ≡⟨ cong₂ _+_ size-pad ∣y∣ ⟩
x.lastWidth + y.lastWidth ∎ where open ≡-Reasoning
last : [ s ∈ String ∣ length s ≡ lastWidth ]
last .value = vLast
last .proof = ⦇ isLastLine (Block.last x .proof) (Block.last y .proof) ⦈
where open Erased
vMaxWidth : ℕ
vMaxWidth = widthx ⊔ (x.lastWidth + widthy)
isMaxWidth₁ : y.lastWidth ≤ widthy → lastWidth ≤ vMaxWidth
isMaxWidth₁ p = begin
lastWidth ≤⟨ +-monoʳ-≤ x.lastWidth p ⟩
x.lastWidth + widthy ≤⟨ n≤m⊔n _ _ ⟩
vMaxWidth ∎ where open ≤-Reasoning
isMaxWidth₂ : length lastx ≡ x.lastWidth →
x.lastWidth ≤ widthx →
All≤ widthx blockx →
All≤ widthy blocky →
All≤ vMaxWidth vBlock
isMaxWidth₂ ∣x∣≡ ∣x∣≤ ∣xs∣ ∣ys∣ with blocky
... | nothing = ≤-Content (m≤m⊔n _ _) ∣xs∣
isMaxWidth₂ ∣x∣≡ ∣x∣≤ ∣xs∣ (just (∣hd∣ , ∣tl∣))
| just (hd , tl) =
All≤-node? (≤-Content (m≤m⊔n _ _) ∣xs∣)
middle
(subst (Allᵀ.All _) (sym $ unfold-indents pad tl)
$ Allᵀₚ.map⁺ (indent pad) (Allᵀ.map (indented _) ∣tl∣))
where
middle : length (lastx ++ hd) ≤ vMaxWidth
middle = begin
length (lastx ++ hd) ≡⟨ length-++ lastx hd ⟩
length lastx + length hd ≡⟨ cong (_+ _) ∣x∣≡ ⟩
x.lastWidth + length hd ≤⟨ +-monoʳ-≤ x.lastWidth ∣hd∣ ⟩
x.lastWidth + widthy ≤⟨ n≤m⊔n _ _ ⟩
vMaxWidth ∎ where open ≤-Reasoning
indented : ∀ s → length s ≤ widthy →
length (indent pad s) ≤ vMaxWidth
indented s ∣s∣ = begin
length (indent pad s) ≡⟨ size-indent pad s ⟩
maybe′ length 0 pad + length s ≡⟨ cong (_+ _) size-pad ⟩
x.lastWidth + length s ≤⟨ +-monoʳ-≤ x.lastWidth ∣s∣ ⟩
x.lastWidth + widthy ≤⟨ n≤m⊔n (widthx) _ ⟩
vMaxWidth ∎ where open ≤-Reasoning
maxWidth : [ n ∈ ℕ ∣ lastWidth ≤ n × All≤ n vBlock ]
maxWidth .value = vMaxWidth
maxWidth .proof =
⦇ _,_ ⦇ isMaxWidth₁ (map proj₁ (Block.maxWidth y .proof)) ⦈
⦇ isMaxWidth₂ (Block.last x .proof)
(map proj₁ (Block.maxWidth x .proof))
(map proj₂ (Block.maxWidth x .proof))
(map proj₂ (Block.maxWidth y .proof))
⦈
⦈ where open Erased
infixl 4 _<>_
_<>_ : Block → Block → Block
x <> y = record { append x y }
------------------------------------------------------------------------
-- Flush (introduces a new line)
private
module flush (x : Block) where
module x = Block x
blockx = x.block .value
lastx = x.last .value
widthx = x.maxWidth .value
heightx = x.height
height = suc heightx
lastWidth = 0
vMaxWidth = widthx
last : [ s ∈ String ∣ length s ≡ lastWidth ]
last = "" , ⦇ refl ⦈ where open Erased
vContent = node? blockx lastx leaf
isBlock : size blockx ≡ heightx → size vContent ≡ height
isBlock ∣x∣ = begin
size vContent ≡⟨ ∣node?∣ blockx lastx leaf ⟩
size blockx + 1 ≡⟨ cong (_+ 1) ∣x∣ ⟩
heightx + 1 ≡⟨ +-comm heightx 1 ⟩
height ∎ where open ≡-Reasoning
block : [ xs ∈ Content ∣ size xs ≡ height ]
block .value = vContent
block .proof = Erased.map isBlock $ Block.block x .proof
maxWidth : [ n ∈ ℕ ∣ lastWidth ≤ n × All≤ n vContent ]
maxWidth .value = widthx
maxWidth .proof = map (z≤n ,_)
⦇ All≤-node? ⦇ proj₂ (Block.maxWidth x .proof) ⦈
⦇ middle (Block.last x .proof) ⦇ proj₁ (Block.maxWidth x .proof) ⦈ ⦈
(pure leaf)
⦈ where
open Erased
middle : length lastx ≡ x.lastWidth → x.lastWidth ≤ vMaxWidth →
length lastx ≤ vMaxWidth
middle p q = begin
length lastx ≡⟨ p ⟩
x.lastWidth ≤⟨ q ⟩
vMaxWidth ∎ where open ≤-Reasoning
flush : Block → Block
flush x = record { flush x }
------------------------------------------------------------------------
-- Other functions
render : Block → String
render x = unlines
$ maybe′ (uncurry (λ hd tl → hd ∷ Tree.Infix.toList tl)) []
$ node? (Block.block x .value) (Block.last x .value) leaf
valid : (width : ℕ) (b : Block) → Dec (Block.maxWidth b .value ≤ width)
valid width b = Block.maxWidth b .value ≤? width
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_1327.asm | ljhsiun2/medusa | 9 | 82584 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r14
push %r15
push %r8
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x13baf, %r15
nop
nop
nop
nop
nop
add $59359, %rbp
mov $0x6162636465666768, %r14
movq %r14, (%r15)
xor %rbp, %rbp
lea addresses_D_ht+0x1139a, %rsi
lea addresses_WC_ht+0x11ac3, %rdi
nop
nop
nop
dec %r15
mov $127, %rcx
rep movsl
dec %rsi
lea addresses_WT_ht+0x6c0f, %rsi
nop
nop
nop
nop
nop
xor $18195, %rbp
movw $0x6162, (%rsi)
nop
nop
nop
nop
add $61091, %rbp
lea addresses_normal_ht+0x10b2d, %rsi
nop
nop
nop
nop
nop
cmp $11900, %r8
movb $0x61, (%rsi)
nop
nop
nop
xor %r14, %r14
lea addresses_WC_ht+0x9d0f, %rbp
nop
nop
nop
nop
sub $19362, %r14
movups (%rbp), %xmm0
vpextrq $0, %xmm0, %rdi
nop
nop
nop
nop
and %rdi, %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r8
pop %r15
pop %r14
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r15
push %rax
push %rcx
// Store
lea addresses_RW+0x558f, %rcx
clflush (%rcx)
sub %r15, %r15
mov $0x5152535455565758, %r12
movq %r12, (%rcx)
dec %r15
// Store
lea addresses_US+0xd1e7, %r15
nop
and $60109, %r12
mov $0x5152535455565758, %rax
movq %rax, %xmm2
movaps %xmm2, (%r15)
nop
dec %r10
// Faulty Load
lea addresses_D+0xf50f, %r15
sub %rcx, %rcx
movb (%r15), %r12b
lea oracles, %r11
and $0xff, %r12
shlq $12, %r12
mov (%r11,%r12,1), %r12
pop %rcx
pop %rax
pop %r15
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_D', 'same': True, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_RW', 'same': False, 'size': 8, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_US', 'same': False, 'size': 16, 'congruent': 3, 'NT': True, 'AVXalign': True}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_D', 'same': True, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'type': 'addresses_normal_ht', 'same': True, 'size': 8, 'congruent': 1, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
{'src': {'type': 'addresses_D_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 2, 'congruent': 6, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 1, 'congruent': 1, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 16, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_452.asm | ljhsiun2/medusa | 9 | 21109 | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rdx
lea addresses_normal_ht+0x1695, %r12
nop
nop
nop
sub %rax, %rax
movb (%r12), %bl
nop
nop
nop
nop
nop
xor $55258, %rax
lea addresses_normal_ht+0x16d09, %rcx
clflush (%rcx)
nop
nop
nop
nop
mfence
movups (%rcx), %xmm4
vpextrq $0, %xmm4, %r12
nop
nop
inc %rbp
lea addresses_normal_ht+0xc971, %rdx
nop
nop
xor $14216, %rdi
movb $0x61, (%rdx)
sub $35354, %rdx
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r9
push %rbx
push %rcx
push %rdi
push %rdx
// Store
lea addresses_WC+0x13d49, %rdx
nop
nop
nop
nop
nop
sub %r11, %r11
movb $0x51, (%rdx)
inc %rdx
// Faulty Load
lea addresses_RW+0xbe49, %r9
nop
nop
nop
nop
add $15078, %rcx
movups (%r9), %xmm6
vpextrq $0, %xmm6, %rdi
lea oracles, %rcx
and $0xff, %rdi
shlq $12, %rdi
mov (%rcx,%rdi,1), %rdi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r9
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': True, 'type': 'addresses_RW', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_WC', 'size': 1, 'AVXalign': True}}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_RW', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': False}}
{'32': 21829}
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
*/
|
src/lolicon.adb | REWERK/lolicon | 51 | 6790 | <reponame>REWERK/lolicon
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
with GNAT.OS_Lib; use GNAT.OS_Lib;
procedure Lolicon is
Age : Integer;
procedure Intice is
begin
-- Nothing because weebs are already attracted to underage anime girls.
null;
end Intice;
procedure Call_The_FBI (Check: in Integer) is
Result : Integer;
Arguments : Argument_List :=
(1 => new String'("call_911"));
begin
if Check < 15 then
Spawn
(Program_Name => "call_911",
Args => Arguments,
Output_File_Descriptor => Standout,
Return_Code => Result
);
for Index in Arguments'Range loop
Free(Arguments(Index));
end loop;
else
put("Probably just something weird happened.");
end if;
end Call_The_FBI;
begin
put("What's the girl's age? ");
get(Age);
Call_The_FBI(Age);
end Lolicon;
|
Categories/Object/Products/N-ary.agda | copumpkin/categories | 98 | 1575 | <reponame>copumpkin/categories
{-# OPTIONS --universe-polymorphism #-}
open import Categories.Category
open import Categories.Object.Products
module Categories.Object.Products.N-ary {o ℓ e}
(C : Category o ℓ e)
(P : Products C)
where
open Category C
open Products P
open Equiv
import Categories.Object.Product
open Categories.Object.Product C
import Categories.Object.BinaryProducts
open Categories.Object.BinaryProducts C
import Categories.Object.BinaryProducts.N-ary
import Categories.Object.Terminal
open Categories.Object.Terminal C
open import Data.Nat
open import Data.Vec
open import Data.Vec.Properties
open import Data.Product.N-ary hiding ([])
import Level
open import Relation.Binary.PropositionalEquality as PropEq
using ()
renaming (_≡_ to _≣_
; refl to ≣-refl
; sym to ≣-sym
; cong to ≣-cong
)
open BinaryProducts binary
module NonEmpty = Categories.Object.BinaryProducts.N-ary C binary
open Terminal terminal
Prod : {n : ℕ} → Vec Obj n → Obj
Prod { zero} [] = ⊤
Prod {suc n} As = NonEmpty.Prod As
-- This whole module is made a great deal more heinous than it should be
-- by the fact that "xs ++ [] ≣ xs" is ill-typed, so I have to repeatedly
-- prove trivial corrolaries of that fact without using it directly.
-- I don't really know how to deal with that in a sane way.
πˡ : {n m : ℕ}
→ (As : Vec Obj n)
→ (Bs : Vec Obj m)
→ Prod (As ++ Bs) ⇒ Prod As
πˡ { zero} [] Bs = !
πˡ { suc n} (A ∷ As) (B ∷ Bs) = NonEmpty.πˡ (A ∷ As) (B ∷ Bs)
πˡ { suc zero} (A ∷ []) [] = id
πˡ {suc (suc n)} (A ∷ As) [] = ⟨ π₁ , πˡ As [] ∘ π₂ ⟩
πʳ : {n m : ℕ}
→ (As : Vec Obj n)
→ (Bs : Vec Obj m)
→ Prod (As ++ Bs) ⇒ Prod Bs
πʳ [] Bs = id
πʳ (A ∷ As) (B ∷ Bs) = NonEmpty.πʳ (A ∷ As) (B ∷ Bs)
πʳ As [] = !
glue : {n m : ℕ}{X : Obj}
→ (As : Vec Obj n)
→ (Bs : Vec Obj m)
→ (f : X ⇒ Prod As)
→ (g : X ⇒ Prod Bs)
→ X ⇒ Prod (As ++ Bs)
glue { zero} [] Bs f g = g
glue { suc n} (A ∷ As) (B ∷ Bs) f g = NonEmpty.glue (A ∷ As) (B ∷ Bs) f g
glue { suc zero} (A ∷ []) [] f g = f
glue {suc (suc n)} (A ∷ As) [] f g = ⟨ π₁ ∘ f , glue As [] (π₂ ∘ f) g ⟩
open HomReasoning
.commuteˡ : {n m : ℕ}{X : Obj}
→ (As : Vec Obj n)
→ (Bs : Vec Obj m)
→ {f : X ⇒ Prod As}
→ {g : X ⇒ Prod Bs}
→ πˡ As Bs ∘ glue As Bs f g ≡ f
commuteˡ { zero} [] Bs {f}{g} = !-unique₂ (! ∘ g) f
commuteˡ { suc n} (A ∷ As) (B ∷ Bs) {f}{g} = NonEmpty.commuteˡ (A ∷ As) (B ∷ Bs)
commuteˡ { suc zero} (A ∷ []) [] {f}{g} = identityˡ
commuteˡ {suc (suc n)} (A ∷ As) [] {f}{g} =
begin
⟨ π₁ , πˡ As [] ∘ π₂ ⟩ ∘ ⟨ π₁ ∘ f , glue As [] (π₂ ∘ f) g ⟩
↓⟨ ⟨⟩∘ ⟩
⟨ π₁ ∘ ⟨ π₁ ∘ f , glue As [] (π₂ ∘ f) g ⟩
, (πˡ As [] ∘ π₂) ∘ ⟨ π₁ ∘ f , glue As [] (π₂ ∘ f) g ⟩
⟩
↓⟨ ⟨⟩-congʳ assoc ⟩
⟨ π₁ ∘ ⟨ π₁ ∘ f , glue As [] (π₂ ∘ f) g ⟩
, πˡ As [] ∘ π₂ ∘ ⟨ π₁ ∘ f , glue As [] (π₂ ∘ f) g ⟩
⟩
↓⟨ ⟨⟩-cong₂ commute₁ (∘-resp-≡ʳ commute₂) ⟩
⟨ π₁ ∘ f , πˡ As [] ∘ glue As [] (π₂ ∘ f) g ⟩
↓⟨ ⟨⟩-congʳ (commuteˡ As []) ⟩
⟨ π₁ ∘ f , π₂ ∘ f ⟩
↓⟨ g-η ⟩
f
∎
.commuteʳ : {n m : ℕ}{X : Obj}
→ (As : Vec Obj n)
→ (Bs : Vec Obj m)
→ {f : X ⇒ Prod As}
→ {g : X ⇒ Prod Bs}
→ πʳ As Bs ∘ glue As Bs f g ≡ g
commuteʳ { zero} [] Bs {f}{g} = identityˡ
commuteʳ { suc n} (A ∷ As) (B ∷ Bs) {f}{g} = NonEmpty.commuteʳ (A ∷ As) (B ∷ Bs)
commuteʳ { suc zero} (A ∷ []) [] {f}{g} = !-unique₂ (! ∘ f) g
commuteʳ {suc (suc n)} (A ∷ As) [] {f}{g} = !-unique₂ (! ∘ glue (A ∷ As) [] f g) g
.N-universal : {n m : ℕ}{X : Obj}
→ (As : Vec Obj n)
→ (Bs : Vec Obj m)
→ {f : X ⇒ Prod As}
→ {g : X ⇒ Prod Bs}
→ {h : X ⇒ Prod (As ++ Bs) }
→ πˡ As Bs ∘ h ≡ f
→ πʳ As Bs ∘ h ≡ g
→ glue As Bs f g ≡ h
N-universal { zero} [] Bs {f}{g}{h} h-commuteˡ h-commuteʳ = trans (sym h-commuteʳ) identityˡ
N-universal { suc n} (A ∷ As) (B ∷ Bs) {f}{g}{h} h-commuteˡ h-commuteʳ = NonEmpty.N-universal (A ∷ As) (B ∷ Bs) h-commuteˡ h-commuteʳ
N-universal { suc zero} (A ∷ []) [] {f}{g}{h} h-commuteˡ h-commuteʳ = trans (sym h-commuteˡ) identityˡ
N-universal {suc (suc n)} (A ∷ As) [] {f}{g}{h} h-commuteˡ h-commuteʳ =
begin
⟨ π₁ ∘ f , glue As [] (π₂ ∘ f) g ⟩
↓⟨ ⟨⟩-congʳ (N-universal As [] π₂∘h-commuteˡ π₂∘h-commuteʳ) ⟩
⟨ π₁ ∘ f , π₂ ∘ h ⟩
↑⟨ ⟨⟩-congˡ π₁∘h-commuteˡ ⟩
⟨ π₁ ∘ h , π₂ ∘ h ⟩
↓⟨ g-η ⟩
h
∎
where
-- h-commuteˡ : ⟨ π₁ , πˡ As [] ∘ π₂ ⟩ ∘ h ≡ f
-- h-commuteʳ : (πʳ As [] ∘ π₂) ∘ h ≡ g
π₁∘h-commuteˡ : π₁ ∘ h ≡ π₁ ∘ f
π₁∘h-commuteˡ =
begin
π₁ ∘ h
↑⟨ commute₁ ⟩∘⟨ refl ⟩
(π₁ ∘ ⟨ π₁ , πˡ As [] ∘ π₂ ⟩) ∘ h
↓⟨ assoc ⟩
π₁ ∘ ⟨ π₁ , πˡ As [] ∘ π₂ ⟩ ∘ h
↓⟨ refl ⟩∘⟨ h-commuteˡ ⟩
π₁ ∘ f
∎
π₂∘h-commuteˡ : πˡ As [] ∘ π₂ ∘ h ≡ π₂ ∘ f
π₂∘h-commuteˡ =
begin
πˡ As [] ∘ π₂ ∘ h
↑⟨ assoc ⟩
(πˡ As [] ∘ π₂) ∘ h
↑⟨ commute₂ ⟩∘⟨ refl ⟩
(π₂ ∘ ⟨ π₁ , πˡ As [] ∘ π₂ ⟩) ∘ h
↓⟨ assoc ⟩
π₂ ∘ ⟨ π₁ , πˡ As [] ∘ π₂ ⟩ ∘ h
↓⟨ refl ⟩∘⟨ h-commuteˡ ⟩
π₂ ∘ f
∎
π₂∘h-commuteʳ : πʳ As [] ∘ π₂ ∘ h ≡ g
π₂∘h-commuteʳ = !-unique₂ (πʳ As [] ∘ π₂ ∘ h) g
isProduct : {n m : ℕ}
→ (As : Vec Obj n)
→ (Bs : Vec Obj m)
→ Product (Prod As) (Prod Bs)
isProduct {n}{m} As Bs = record
{ A×B = Prod (As ++ Bs)
; π₁ = πˡ As Bs
; π₂ = πʳ As Bs
; ⟨_,_⟩ = glue As Bs
; commute₁ = commuteˡ As Bs
; commute₂ = commuteʳ As Bs
; universal = N-universal As Bs
}
|
programs/pong.asm | SimonFJ20/jdh-8 | 911 | 19164 | ; ========
; = PONG =
; ========
@include "os/arch.asm"
@include "os/oscall.asm"
@org ADDR_RAM
; sizes
@define PADDLE_HEIGHT 16
@define BALL_SIZE 1
; paddles
@define PLEFT 0
@define PRIGHT 1
; run out of characters after this
@define MAX_SCORE 9
; keyboard port
@define KBPRT 2
jmp [main]
; dirty flags
@define dirty_scores 0x01
@define dirty_BORDER 0x02
@define dirty_PLEFT 0x04
@define dirty_PRIGHT 0x08
; key scancodes
@define SCAN_LU 0x1A
@define SCAN_LD 0x16
@define SCAN_RU 0x52
@define SCAN_RD 0x51
; key flags
@define KEY_LU 0x01
@define KEY_LD 0x02
@define KEY_RU 0x04
@define KEY_RD 0x08
; variables
paddles:
@dd 0x0000
pball:
@dd 0x0000
vball:
@dd 0x0000
scores:
@dd 0x0000
randn:
@db 0x00
dirty:
@dd 0x00
plball:
@dd 0x0000
keys:
@db 0x00
; TEXT
; places random number in z
rand:
push a
lw z, [randn]
mw a, 113
add a, z
sw [randn], a
pop a
ret
; resets the game
; a: last to score
reset:
pusha
; any score > 9? reset scores
lw a, [(scores + 0)]
lw b, [(scores + 1)]
cmp a, MAX_SCORE
mw h, f
cmp b, MAX_SCORE
and f, h
jle [.no_score_reset]
sw [(scores + 0)], 0
sw [(scores + 1)], 0
.no_score_reset:
; reset paddles
@define reset_PADDLE_HEIGHT ((SCREEN_HEIGHT - PADDLE_HEIGHT) / 2)
sw [(paddles + 0)], reset_PADDLE_HEIGHT
sw [(paddles + 1)], reset_PADDLE_HEIGHT
; reset ball
sw [(pball + 0)], ((SCREEN_WIDTH - BALL_SIZE) / 2)
call [rand]
and z, 0x7F
add z, ((SCREEN_HEIGHT - 0x7F) / 2)
sw [(pball + 1)], z
lw a, [(pball + 0)]
lw b, [(pball + 1)]
sw [(plball + 0)], a
sw [(plball + 1)], b
; ball velocity -> towards last to lose
jeq a, PRIGHT, [.neg_x]
sw [(vball + 0)], 1
jmp [.y]
.neg_x:
sw [(vball + 0)], (-1)
.y:
call [rand]
jms z, 0x1, [.neg_y]
sw [(vball + 1)], 1
jmp [.done]
.neg_y:
sw [(vball + 1)], (-1)
.done:
; reset screen
lda a, b, [ADDR_BANK]
lda c, d, [(SCANLINE_WIDTH_BYTES * SCREEN_HEIGHT)]
mw z, 0
call [memset]
sw [dirty], 0xFF
call [draw]
sw [dirty], 0x00
popa
ret
; draws a paddle
; a: which paddle to draw
; b: which byte to draw
draw_paddle:
pusha
mw d, a
mw z, b
; c <- paddle y
lda [paddles]
add16 h, l, a
lw c
; [ab] -> first byte
mw a, 0
mw b, SCANLINE_WIDTH_BYTES
call [mul16_8]
; add paddle offset
jeq d, PRIGHT, [.right]
mw d, (SCANLINE_OFFSET_BYTES + 1)
jmp [.cont]
.right:
mw d, ((SCANLINE_OFFSET_BYTES + SCREEN_WIDTH_BYTES) - 1)
.cont:
add16 a, b, d
; point into video RAM
add16 a, b, ADDR_BANK
; [cd] -> last byte
mw c, a
mw d, b
; add (stride * PADDLE_HEIGHT)
clb
push z
mw z, PADDLE_HEIGHT
.add:
add16 c, d, SCANLINE_WIDTH_BYTES
dec z
jnz z, [.add]
pop z
.loop:
sw a, b, z
add16 a, b, SCANLINE_WIDTH_BYTES
eq16 a, b, c, d
jz f, [.loop]
.done:
popa
ret
; draws the border
draw_border:
pusha
lda a, b, (ADDR_BANK + (SCANLINE_WIDTH_BYTES / 2))
mw c, 0
.loop:
mw z, c
and z, 0x01
jnz z, [.next]
lw d, a, b
or d, 0x80
sw a, b, d
inc16 a, b
lw d, a, b
or d, 0x01
sw a, b, d
dec16 a, b
.next:
add16 a, b, (SCANLINE_WIDTH_BYTES * 3)
add c, 3
jlt c, SCREEN_HEIGHT, [.loop]
.done:
popa
ret
; draws scores
draw_scores:
push a, c, d
mw d, 4
lw a, [(scores + 0)]
add a, '0'
mw c, ((SCREEN_WIDTH_BYTES / 2) - 2)
call [draw_char]
lw a, [(scores + 1)]
add a, '0'
mw c, ((SCREEN_WIDTH_BYTES / 2) + 1)
call [draw_char]
pop d, c, a
ret
; clears scores
clear_scores:
push a, c, d
mw a, ' '
mw d, 4
mw c, ((SCREEN_WIDTH_BYTES / 2) - 2)
call [draw_char]
mw c, ((SCREEN_WIDTH_BYTES / 2) + 1)
call [draw_char]
pop d, c, a
ret
; draws ball
; a: fill (>0) or clear (0)
draw_ball:
pusha
mw z, a
mw c, 0
.loop_c:
mw d, 0
.loop_d:
lw a, [(pball + 0)]
lw b, [(pball + 1)]
add a, c
add b, d
push c
mw c, z
call [set_pixel]
pop c
inc d
jne d, 2, [.loop_d]
inc c
jne c, 2, [.loop_c]
popa
ret
; dirty things according to ball's location
dirty_ball:
push a, b, c
lw a, [(pball + 0)]
lw b, [(pball + 1)]
lw c, [dirty]
; ball in middle? redraw border
jlt a, ((SCREEN_WIDTH / 2) - 2), [.dscores]
jgt a, ((SCREEN_WIDTH / 2) + 2), [.dscores]
or c, dirty_BORDER
.dscores:
jgt b, 16, [.dleft]
or c, dirty_scores
.dleft:
jgt a, 16, [.dright]
or c, dirty_PLEFT
.dright:
jlt a, (SCREEN_WIDTH - 16), [.done]
or c, dirty_PRIGHT
.done:
sw [dirty], c
pop c, b, a
ret
; renders everything which is dirty
draw:
pusha
; clear ball
lw a, [(pball + 0)]
lw b, [(pball + 1)]
lw c, [(plball + 0)]
lw d, [(plball + 1)]
sw [(pball + 0)], c
sw [(pball + 1)], d
push a, b
mw a, 0
call [draw_ball]
pop b, a
sw [(pball + 0)], a
sw [(pball + 1)], b
; draw dirty screen elements
lw c, [dirty]
jmn c, dirty_BORDER, [.dscores]
call [draw_border]
.dscores:
jmn c, dirty_scores, [.dleft]
call [draw_scores]
.dleft:
jmn c, dirty_PLEFT, [.dright]
mw a, PLEFT
mw b, 0xF0
call [draw_paddle]
.dright:
jmn c, dirty_PRIGHT, [.done]
mw a, PRIGHT
mw b, 0x0F
call [draw_paddle]
.done:
sw [dirty], 0
mw a, 1
call [draw_ball]
popa
ret
; updates keys with current keyboard data
check_keys:
push a, b, c
lw c, [keys]
inb a, KBPRT
; b <- pure scancode
mw b, a
and b, 0x7F
; determine key from scancode
.left_up:
jne b, SCAN_LU, [.left_down]
mw b, KEY_LU
jmp [.cont]
.left_down:
jne b, SCAN_LD, [.right_up]
mw b, KEY_LD
jmp [.cont]
.right_up:
jne b, SCAN_RU, [.right_down]
mw b, KEY_RU
jmp [.cont]
.right_down:
jne b, SCAN_RD, [.done]
mw b, KEY_RD
.cont:
jmn a, 0x80, [.down]
; clear bit (key up)
not b
and c, b
jmp [.done]
.down:
; set bit (key down)
or c, b
.done:
sw [keys], c
pop c, b, a
ret
; move a paddle
; a: which paddle
; b: direction (-1 or 1)
move_paddle:
pusha
; z <- ([cd] -> paddle byte)
lda c, d, [paddles]
add16 c, d, a
lw z, c, d
; check that movement is OK
jeq b, 1, [.down]
jeq z, 0, [.done]
jmp [.clear]
.down:
jgt z, (SCREEN_HEIGHT - PADDLE_HEIGHT), [.done]
.clear:
; clear paddle
push b
mw b, 0x00
call [draw_paddle]
pop b
; add and store
add z, b
sw c, d, z
; mark dirty
lw c, [dirty]
jeq a, PRIGHT, [.right]
or c, dirty_PLEFT
jmp [.mark]
.right:
or c, dirty_PRIGHT
.mark:
sw [dirty], c
.done:
popa
ret
; move_ball z flags
@define MB_INV_X 0x01
@define MB_INV_Y 0x02
@define MB_RESET_L 0x04
@define MB_RESET_R 0x08
; moves the ball
; returns z, combination of above flags according to move
move_ball:
push a, b, c, d
mw z, 0
; try movement by velocity
lw a, [(pball + 0)]
lw b, [(pball + 1)]
lw c, [(vball + 0)]
lw d, [(vball + 1)]
sw [(plball + 0)], a
sw [(plball + 1)], b
add a, c
add b, d
.left_paddle:
jgt a, (12 + BALL_SIZE), [.right_paddle]
jlt a, (12 + BALL_SIZE - 4), [.right_paddle]
lw c, [(paddles + 0)]
mw d, c
add d, PADDLE_HEIGHT
jlt b, c, [.right_paddle]
jgt b, d, [.right_paddle]
mw z, MB_INV_X
lw c, [keys]
and c, (KEY_LU | KEY_LD)
jz c, [.left_noinv]
jeq c, KEY_LD, [.left_down]
mw c, (-1)
jmp [.left_check]
.left_down:
mw c, 1
.left_check:
lw d, [(vball + 1)]
jeq c, d, [.left_noinv]
or z, MB_INV_Y
.left_noinv:
jmp [.apply]
.right_paddle:
jlt a, (SCREEN_WIDTH - 8 - BALL_SIZE), [.top_bound]
jgt a, (SCREEN_WIDTH - 8 - BALL_SIZE + 4), [.top_bound]
lw c, [(paddles + 1)]
mw d, c
add d, PADDLE_HEIGHT
jlt b, c, [.top_bound]
jgt b, d, [.top_bound]
mw z, MB_INV_X
lw c, [keys]
and c, (KEY_RU | KEY_RD)
jz c, [.right_noinv]
jeq c, KEY_RD, [.right_down]
mw c, (-1)
jmp [.right_check]
.right_down:
mw c, 1
.right_check:
lw d, [(vball + 1)]
jeq c, d, [.right_noinv]
or z, MB_INV_Y
.right_noinv:
jmp [.apply]
.top_bound:
jne b, 0, [.bottom_bound]
mw z, MB_INV_Y
jmp [.apply]
.bottom_bound:
jne b, (SCREEN_HEIGHT - BALL_SIZE), [.left_bound]
mw z, MB_INV_Y
jmp [.apply]
.left_bound:
jne a, 0, [.right_bound]
lw a, [(scores + 1)]
inc a
sw [(scores + 1)], a
mw z, MB_RESET_L
jmp [.apply]
.right_bound:
jne a, (SCREEN_WIDTH - BALL_SIZE), [.apply]
lw a, [(scores + 0)]
inc a
sw [(scores + 0)], a
mw z, MB_RESET_R
.apply:
jz z, [.store]
mw f, z
and f, (MB_RESET_L | MB_RESET_R)
jz f, [.invert]
jeq z, MB_RESET_R, [.right_score]
mw a, PLEFT
jmp [.do_reset]
.right_score:
mw a, PRIGHT
.do_reset:
call [reset]
jmp [.done]
.invert:
; invert according to z
jmn z, MB_INV_X, [.invert_y]
lw a, [(vball + 0)]
mw b, 0
sub b, a
sw [(vball + 0)], b
.invert_y:
jmn z, MB_INV_Y, [.done]
lw a, [(vball + 1)]
mw b, 0
sub b, a
sw [(vball + 1)], b
jmp [.done]
.store:
sw [(pball + 0)], a
sw [(pball + 1)], b
.done:
pop d, c, b, a
ret
main:
; memory bank -> screen
sw [ADDR_MB], 1
; seed random number generator
sw [randn], 13
call [reset]
mw z, 0
.loop:
call [check_keys]
; busy-wait, expects 1 MHz clock
mw c, 16
call [mul16_8]
inc z
jne z, 255, [.loop]
mw z, 0
; paddle movement
lw c, [keys]
.move_lu:
mw a, PLEFT
jmn c, KEY_LU, [.move_ld]
mw b, (-1)
call [move_paddle]
.move_ld:
jmn c, KEY_LD, [.move_ru]
mw b, 1
call [move_paddle]
.move_ru:
mw a, PRIGHT
jmn c, KEY_RU, [.move_rd]
mw b, (-1)
call [move_paddle]
.move_rd:
jmn c, KEY_RD, [.move_done]
mw b, 1
call [move_paddle]
.move_done:
; update
call [move_ball]
; loop again, do not render, if there was a reset
jms z, (MB_RESET_L | MB_RESET_R), [.loop]
; render
call [dirty_ball]
call [draw]
jmp [.loop]
ret
|
src/Data/QuadTree/Implementation/Definition.agda | JonathanBrouwer/research-project | 1 | 15584 | <gh_stars>1-10
module Data.QuadTree.Implementation.Definition where
open import Haskell.Prelude renaming (zero to Z; suc to S)
open import Data.Lens.Lens
open import Data.Logic
{-# FOREIGN AGDA2HS
{-# LANGUAGE Safe #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE Rank2Types #-}
import Data.Nat
import Data.Lens.Lens
import Data.Logic
#-}
---- Quadrants
-- A quadrant is either a leaf or a node with 4 sub-quadrants
data Quadrant (t : Set) : Set where
Leaf : t -> Quadrant t
Node : Quadrant t -> Quadrant t -> Quadrant t -> Quadrant t -> Quadrant t
{-# COMPILE AGDA2HS Quadrant deriving (Show, Eq) #-}
---- QuadTree
-- A quadtree is the width/height + the root quadrant
data QuadTree (t : Set) : Set where
Wrapper : (Nat × Nat) -> Quadrant t -> QuadTree t
{-# COMPILE AGDA2HS QuadTree deriving (Show, Eq) #-}
|
gyak/gyak9/kocsma.adb | balintsoos/LearnAda | 0 | 19603 | <gh_stars>0
with Ada.Text_IO; use Ada.Text_IO;
procedure Kocsma is
type Ital is (Sor, Bor, Palinka);
-- task Kocsmaros
task Kocsmaros is
entry Tolt( Mit: in Ital );
end Kocsmaros;
task body Kocsmaros is
begin
for I in 1..20 loop
accept Tolt ( Mit: in Ital ) do
Put_Line("Toltok " & Ital'Image(Mit) & 't');
case Mit is
when Sor => delay 1.0;
when Bor => delay 0.2;
when Palinka => delay 0.3;
end case;
end Tolt;
end loop;
end Kocsmaros;
-- end task Kocsmaros
-- task type Reszeg
task type Reszeg;
task body Reszeg is
Sorivas_Ideje: Duration := 1.0;
begin
Kocsmaros.Tolt(Palinka);
Put_Line("Benyomok egy felest.");
delay 0.1;
Kocsmaros.Tolt(Bor);
Put_Line("Benyomok egy pohar bort.");
delay 0.3;
loop
Kocsmaros.Tolt(Sor);
Put_Line("Benyomok egy korso sort.");
delay Sorivas_Ideje;
Sorivas_Ideje := 2 * Sorivas_Ideje;
end loop;
end Reszeg;
-- end task type Reszeg
type Reszeg_Access is access Reszeg;
R: Reszeg_Access;
begin
for I in 1..5 loop
delay 3.0;
Put_Line("Egy reszeg tevedt erre.");
R := new Reszeg;
end loop;
end Kocsma;
|
blink/blink.asm | sent-hil/arduino-assembly | 0 | 99805 | ;hello.asm
; turns on an LED which is connected to PB5 (digital out 13)
.include "./m328Pdef.inc"
ldi r16, 0b00100000
out DDRB, r16
out PortB, r16
mainloop:
eor r17, r16; invert output bit
out PORTB, r17; write to port
LDI R18, 255
LDI R19, 255
DEC R18
DEC R18
DEC R18
DEC R18
DEC R18
DEC R18
DEC R18
DEC R18
DEC R18
call wait; wait some time
rjmp mainloop; loop forever
wait:
push r16
push r17
push r18
ldi r16, 0x40; loop 0x400000 times
ldi r17, 0x00; ~12 million cycles
ldi r18, 0x00; ~0.7s at 16Mhz
_w0:
dec r18
brne _w0
dec r17
brne _w0
dec r16
brne _w0
pop r18
pop r17
pop r16
ret
|
Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0xca_notsx.log_21829_890.asm | ljhsiun2/medusa | 9 | 162629 | <gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r8
push %r9
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x1b3f5, %r8
nop
nop
nop
nop
xor %rdx, %rdx
movb $0x61, (%r8)
add $26487, %r9
lea addresses_WT_ht+0xaa29, %rsi
lea addresses_A_ht+0x1076d, %rdi
clflush (%rsi)
nop
cmp $43588, %r11
mov $23, %rcx
rep movsl
nop
nop
nop
nop
nop
sub %r9, %r9
lea addresses_D_ht+0xcdf1, %r11
add %r10, %r10
movb $0x61, (%r11)
nop
nop
nop
nop
nop
and $55298, %r11
lea addresses_A_ht+0x4ed9, %rsi
lea addresses_normal_ht+0x8ee1, %rdi
nop
nop
nop
nop
nop
cmp %r9, %r9
mov $87, %rcx
rep movsl
cmp $38054, %rdi
lea addresses_A_ht+0xcbf1, %rsi
nop
nop
cmp %r11, %r11
movb (%rsi), %cl
nop
nop
nop
nop
nop
cmp %rdx, %rdx
lea addresses_UC_ht+0x158d1, %rsi
lea addresses_WT_ht+0x18ff1, %rdi
nop
nop
cmp %r10, %r10
mov $38, %rcx
rep movsq
nop
nop
nop
nop
nop
add %rsi, %rsi
lea addresses_WC_ht+0xd631, %r11
nop
nop
add %rsi, %rsi
and $0xffffffffffffffc0, %r11
movntdqa (%r11), %xmm4
vpextrq $0, %xmm4, %rdi
nop
nop
nop
nop
sub %r10, %r10
lea addresses_WC_ht+0x13e31, %rsi
lea addresses_WC_ht+0x18cf1, %rdi
nop
nop
nop
nop
nop
cmp %r8, %r8
mov $103, %rcx
rep movsq
nop
xor %r11, %r11
lea addresses_WT_ht+0x129f1, %r11
nop
nop
nop
sub %r10, %r10
movb (%r11), %dl
and %rdi, %rdi
lea addresses_D_ht+0x163f1, %r11
sub $7956, %rsi
mov $0x6162636465666768, %r8
movq %r8, %xmm2
and $0xffffffffffffffc0, %r11
vmovntdq %ymm2, (%r11)
nop
dec %r9
lea addresses_WC_ht+0xf0a9, %rsi
lea addresses_A_ht+0x1b3f1, %rdi
nop
nop
and %r10, %r10
mov $110, %rcx
rep movsw
nop
cmp $31288, %r9
lea addresses_WT_ht+0x1b531, %rsi
lea addresses_A_ht+0xdd91, %rdi
nop
nop
nop
nop
sub $461, %r9
mov $41, %rcx
rep movsb
add $45199, %r10
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r9
pop %r8
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r15
push %rax
push %rdx
// Faulty Load
lea addresses_WT+0x9bf1, %rax
dec %rdx
movb (%rax), %r11b
lea oracles, %rdx
and $0xff, %r11
shlq $12, %r11
mov (%rdx,%r11,1), %r11
pop %rdx
pop %rax
pop %r15
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_WT', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': True, 'type': 'addresses_WT', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_WT_ht', 'size': 1, 'AVXalign': False}}
{'src': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False}}
{'src': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}}
{'src': {'same': False, 'congruent': 11, 'NT': False, 'type': 'addresses_A_ht', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}}
{'src': {'same': False, 'congruent': 6, 'NT': True, 'type': 'addresses_WC_ht', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}}
{'src': {'same': True, 'congruent': 9, 'NT': False, 'type': 'addresses_WT_ht', 'size': 1, 'AVXalign': True}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 11, 'NT': True, 'type': 'addresses_D_ht', 'size': 32, 'AVXalign': False}}
{'src': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}}
{'src': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}}
{'39': 21829}
39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39
*/
|
src/chapter_8/list_summation.asm | marinjurjevic/x86-64_programming | 0 | 22291 | ; Chapter 8
; 8.2 Example program, List Summation
; Simple example to the sum and average for
; a list of numbers.
; ***********************************
; Data declarations
section .data
; ------
; Define constants
SUCCESS equ 0
SYS_exit equ 60
; -----
; Define data
section .data
lst dd 1002, 1004, 1006, 1008, 10010
len dd 5
sum dd 0
avg dd 0
; **********************************
section .text
global _start
_start:
; -----
; Summation loop.
mov ecx, dword [len] ; get length value
mov rsi, 0 ; index = 0
sumLoop:
mov eax, dword [lst + rsi*4] ; get lst[rsi]
add dword [sum], eax ; update sum
inc rsi ; next element
loop sumLoop
; calculate avg
mov eax, dword [sum]
cdq
idiv dword [len]
mov dword [avg], eax
; ------
; Done, terminate program
last:
mov rax, SYS_exit ; call code for exit
mov rdi, SUCCESS ; exit with sucess
syscall
|
tests/src/test_placeholders.ads | TNO/Rejuvenation-Ada | 1 | 15670 | <reponame>TNO/Rejuvenation-Ada
with AUnit; use AUnit;
with AUnit.Test_Cases; use AUnit.Test_Cases;
package Test_Placeholders is
type Placeholders_Test_Case is
new Test_Case with null record;
overriding procedure Register_Tests
(T : in out Placeholders_Test_Case);
-- Register routines to be run
overriding function Name
(T : Placeholders_Test_Case)
return Message_String;
-- Provide name identifying the test case
end Test_Placeholders;
|
Inductive.agda | mr-ohman/general-induction | 0 | 12199 | <filename>Inductive.agda
module Inductive where
open import Level using (_⊔_)
open import Data.Nat hiding (_⊔_)
open import Data.Fin
open import Data.List hiding (map)
import Data.List as List
open import Data.Vec hiding (_++_)
open import Data.Product hiding (map)
open import Tuple using (Tuple; []; _∷_; unfoldToFunc; apply; proof₁; proof₂)
Const : Set₁
Const = List Set × List (List Set)
data TupleRec (A : Set) : List (List Set) → Set where
[] : TupleRec A []
_∷_ : ∀ {x xs} → ((Tuple x) → A) → TupleRec A xs → TupleRec A (x ∷ xs)
data Inductive {n} (A : Vec Const n) : Set where
construct : (m : Fin n)
(x : Tuple (proj₁ (lookup m A)))
(r : TupleRec (Inductive A) (proj₂ (lookup m A)))
→ Inductive A
unfoldToConFunc : List (List Set) → Set → Set
unfoldToConFunc [] B = B
unfoldToConFunc (As ∷ As₁) B = (unfoldToFunc As B) → unfoldToConFunc As₁ B
unfoldToRecFunc : List (List Set) → Set → Set → Set
unfoldToRecFunc [] B C = C
unfoldToRecFunc (As ∷ As₁) B C = (unfoldToFunc As B) → (unfoldToFunc As C) →
unfoldToRecFunc As₁ B C
proofCon : (As : List (List Set)) {B : Set}
→ (TupleRec B As → B) → unfoldToConFunc As B
proofCon [] B₁ = B₁ []
proofCon (As ∷ As₁) B₁ x = proofCon As₁ (λ x₁ → B₁ (proof₂ As x ∷ x₁))
-- The constrution function of an inductive instance
ConFunc : Set → Const → Set
ConFunc A (proj₁ , proj₂) = unfoldToFunc proj₁ (unfoldToConFunc proj₂ A)
-- The recursion function of an inductive instance
RecFunc : Set → Set → Const → Set
RecFunc A B (proj₁ , proj₂) = unfoldToFunc proj₁ (unfoldToRecFunc proj₂ A B)
recapply : ∀ {n} {A : Vec Const n} {B : Set}
{L : List Set} {R : List (List Set)}
→ RecFunc (Inductive A) B (L , R)
→ Tuple L → TupleRec (Inductive A) R → TupleRec B R → B
recapply {L = []} {[]} f [] [] [] = f
recapply {L = []} {R ∷ Rs} f [] (x ∷ x₁) (x₂ ∷ x₃) =
recapply {L = []} {R = Rs} (f (proof₁ R x) (proof₁ R x₂)) [] x₁ x₃
recapply {L = _ ∷ _} f (x₁ ∷ x₂) r c = recapply (f x₁) x₂ r c
rec : ∀ {n} {A : Vec Const n} {B : Set}
→ Tuple (toList (map (RecFunc (Inductive A) B) A))
→ Inductive A → B
rec {n} {A} {B} fs (construct m x r) = rec' A fs m x r
where mapRec : ∀ {m} → TupleRec (Inductive A) m → TupleRec B m
mapRec {m = []} [] = []
mapRec {m = _ ∷ _} (x₁ ∷ r₁) = (λ x₂ → rec fs (x₁ x₂)) ∷ mapRec r₁
rec' : ∀ {m}
→ (A' : Vec Const m)
→ Tuple (toList (map (RecFunc (Inductive A) B) A'))
→ (m' : Fin m)
→ Tuple (proj₁ (lookup m' A'))
→ TupleRec (Inductive A) (proj₂ (lookup m' A'))
→ B
rec' [] fs () x r
rec' (_ ∷ A') (f ∷ fs) zero x r = recapply f x r (mapRec r)
rec' (_ ∷ A') (f ∷ fs) (suc m) x r = rec' A' fs m x r
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_21829_1398.asm | ljhsiun2/medusa | 9 | 169752 | <filename>Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_21829_1398.asm
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r14
push %r8
push %r9
push %rbx
push %rcx
lea addresses_WC_ht+0x3200, %r11
nop
add $17958, %r8
mov (%r11), %r14d
nop
nop
cmp $17823, %r9
lea addresses_normal_ht+0x114c0, %r14
nop
nop
sub %rbx, %rbx
mov (%r14), %ecx
nop
cmp $875, %rcx
pop %rcx
pop %rbx
pop %r9
pop %r8
pop %r14
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
// Load
lea addresses_UC+0xe5a4, %rdx
nop
cmp %r13, %r13
movb (%rdx), %r12b
nop
cmp $22356, %rsi
// Store
lea addresses_A+0x1dcc0, %rbx
xor %rdi, %rdi
movw $0x5152, (%rbx)
sub $9652, %rbx
// Store
lea addresses_UC+0x93a0, %rcx
and $26923, %r12
movw $0x5152, (%rcx)
xor $37073, %r13
// Faulty Load
lea addresses_normal+0xa4c0, %rdx
xor %rsi, %rsi
mov (%rdx), %edi
lea oracles, %rcx
and $0xff, %rdi
shlq $12, %rdi
mov (%rcx,%rdi,1), %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 8, 'NT': True, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_UC'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_A'}}
{'OP': 'STOR', 'dst': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_UC'}}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 4, 'NT': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'34': 21829}
34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34
*/
|
courses/fundamentals_of_ada/labs/solar_system/adv_280_low_level_programming/question_4/src/solar_system-graphics.adb | AdaCore/training_material | 15 | 15742 | with Ada.Real_Time; use Ada.Real_Time;
package body Solar_System.Graphics is
procedure Draw_Body(Object : Body_Type; Canvas : Canvas_ID) is
begin
if Object.Visible then
Draw_Sphere(Canvas => Canvas,
Position => (Object.Pos.X, Object.Pos.Y, 0.0),
Radius => Object.Radius,
Color => Object.Color);
if Object.With_Tail then
for I in T_Tail'Range loop
Draw_Sphere(Canvas => Canvas,
Position => (Object.Tail(I).X, Object.Tail(I).Y, 0.0),
Radius => Object.Radius,
Color => Object.Color);
end loop;
end if;
end if;
end Draw_Body;
protected body Graphic_Context is
procedure Set_Window(W : Window_ID) is
begin
Window := W;
Canvas := Get_Canvas(W);
Is_Set := True;
end Set_Window;
entry Get_Window(W : out Window_ID; C : out Canvas_ID) when Is_Set is
begin
W := Window;
C := Canvas;
end Get_Window;
end Graphic_Context;
task body T_Display is
-- declare a variable Now of type Time to record current time
Now : Time;
-- declare a constant Period of 40 milliseconds of type Time_Span defining the loop period
Period : constant Time_Span := Milliseconds (30);
Canvas : Canvas_ID;
Window : Window_ID;
begin
Graphic_Context.Get_Window(Window, Canvas);
loop
Now := Clock;
for B of Bodies loop
Draw_Body(Object => B.Get_Data,
Canvas => Canvas);
end loop;
Swap_Buffers(Window);
delay until Now + Period;
end loop;
end T_Display;
end Solar_System.Graphics;
|
libsrc/target/multi8/graphics/w_pixel.asm | jpoikela/z88dk | 38 | 27613 | <reponame>jpoikela/z88dk<filename>libsrc/target/multi8/graphics/w_pixel.asm
EXTERN w_pixeladdress
EXTERN getmaxy
EXTERN getmaxx
EXTERN l_cmp
EXTERN __gfx_coords
EXTERN __vram_in
EXTERN __vram_out
; Generic code to handle the pixel commands
; Define NEEDxxx before including
push hl ;save x
call getmaxy ;hl = maxy
inc hl
call l_cmp
pop hl
ret nc
ex de,hl ;de = x, hl = y
push hl ;save y
call getmaxx
inc hl
call l_cmp
pop hl
ret nc
ex de,hl
ld (__gfx_coords),hl ;x
ld (__gfx_coords+2),de ;y
push bc
call w_pixeladdress
ld b,a
ld a,1
jr z, rotated ; pixel is at bit 0...
.plot_position
rlca
djnz plot_position
; a = byte holding pixel mask
; hl = address
rotated:
IF NEEDunplot
cpl
ENDIF
ld e,a ;Save the pixel mask
ld a,(__vram_in)
ld b,a
IF NEEDplot
; We need to flip in the planes we want and set the bit we want
or @00000110
out ($2a),a
ld a,e
or (hl)
ld (hl),a
ld a,b
or @00000101
out ($2a),a
ld a,e
or (hl)
ld (hl),a
ld a,b
or @00000011
out ($2a),a
ld a,e
or (hl)
ld (hl),a
ENDIF
IF NEEDunplot
or @00000110
out ($2a),a
ld a,e
and (hl)
ld (hl),a
ld a,b
or @00000101
out ($2a),a
ld a,e
and (hl)
ld (hl),a
ld a,b
or @00000011
out ($2a),a
ld a,e
and (hl)
ld (hl),a
ENDIF
IF NEEDxor
or @00000110
out ($2a),a
ld a,e
xor (hl)
ld (hl),a
ld a,b
or @00000101
out ($2a),a
ld a,e
xor (hl)
ld (hl),a
ld a,b
or @00000011
out ($2a),a
ld a,e
xor (hl)
ld (hl),a
ENDIF
IF NEEDpoint
or @00000110
out ($2a),a
ld d,(hl)
ld a,b
or @00000101
out ($2a),a
ld a,(hl)
or d
ld d,a
ld a,b
or @00000011
out ($2a),a
ld a,(hl)
or d
and e ;Bit to check
ENDIF
ld a,(__vram_out)
out ($2a),a
pop bc ;Restore callers
ret
|
data/wildPokemon/route10.asm | adhi-thirumala/EvoYellow | 0 | 22442 | <filename>data/wildPokemon/route10.asm
Route10Mons:
db $0F
db 16,ELECTABUZZ
db 18,MAREEP
db 18,MAGNEMITE
db 20,MAGNEMITE
db 17,NIDORAN_M
db 17,NIDORAN_F
db 22,MAGNEMITE
db 20,RATICATE
db 16,MACHOP
db 18,MACHOP
db $00
|
programs/oeis/293/A293710.asm | neoneye/loda | 22 | 97547 | ; A293710: Expansion of x^2/(1 - 4*x - 4*x^2 - x^3).
; 0,0,1,4,20,97,472,2296,11169,54332,264300,1285697,6254320,30424368,148000449,719953588,3502240516,17036776865,82876023112,403153440424,1961154631009,9540108308844,46408205199836,225754408665729,1098190563771104,5342188094947168
mul $0,2
trn $0,3
seq $0,52910 ; Expansion of 1 + 2/(1-2*x-x^3).
div $0,2
|
libsrc/rs232/cpc/sti/rs232_init.asm | andydansby/z88dk-mk2 | 1 | 15829 | <reponame>andydansby/z88dk-mk2
;
; z88dk RS232 Function
;
; Amstrad CPC (STI) version
;
; unsigned char rs232_init()
;
; $Id: rs232_init.asm,v 1.2 2008/06/05 14:31:24 stefano Exp $
XLIB rs232_init
rs232_init:
ld hl,0 ;RS_ERR_OK;
ret
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.