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 |
|---|---|---|---|---|
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/array8.adb | best08618/asylo | 7 | 27964 | <reponame>best08618/asylo<filename>gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/array8.adb
-- { dg-do compile }
-- { dg-options "-O2" }
PROCEDURE Array8 IS
function ID (I : Integer) return Integer is
begin
return I;
end;
SUBTYPE STB IS INTEGER RANGE ID(-8) .. -5;
TYPE TB IS ARRAY (STB RANGE <>) OF INTEGER;
GENERIC
B1 : TB;
PROCEDURE PROC1;
PROCEDURE PROC1 IS
BEGIN
IF B1'FIRST /= -8 THEN
raise Program_Error;
ELSIF B1'LAST /= ID(-5) THEN
raise Program_Error;
ELSIF B1 /= (7, 6, 5, 4) THEN
raise Program_Error;
END IF;
END;
PROCEDURE PROC2 IS NEW PROC1 ((7, 6, ID(5), 4));
BEGIN
PROC2;
END;
|
data/pokemon/base_stats/hoenn/castform_snowy.asm | Dev727/ancientplatinum | 0 | 13843 | <reponame>Dev727/ancientplatinum<filename>data/pokemon/base_stats/hoenn/castform_snowy.asm<gh_stars>0
db 0 ; 351 DEX NO
db 70, 70, 70, 70, 70, 70
; hp atk def spd sat sdf
db ICE, ICE ; type
db 45 ; catch rate
db 145 ; base exp
db MYSTIC_WATER, MYSTIC_WATER ; items
db GENDER_F50 ; gender ratio
db 100 ; unknown 1
db 25 ; step cycles to hatch
db 5 ; unknown 2
INCBIN "gfx/pokemon/hoenn/castform/front.dimensions"
db 0, 0, 0, 0 ; padding
db GROWTH_MEDIUM_FAST ; growth rate
dn EGG_FAIRY, EGG_INDETERMINATE ; egg groups
; tm/hm learnset
tmhm
; end
|
oeis/017/A017237.asm | neoneye/loda-programs | 11 | 88425 | ; A017237: a(n) = (9*n + 6)^5.
; 7776,759375,7962624,39135393,130691232,345025251,777600000,1564031349,2887174368,4984209207,8153726976,12762815625,19254145824,28153056843,40074642432,55730836701,75937500000,101621504799,133827821568,173726604657,222620278176,281950621875,353305857024,438427732293,539218609632,657748550151,796262400000,957186876249,1143137652768,1356926446107,1601568101376,1880287678125,2196527536224,2553954421743,2956466552832,3408200705601,3913539300000,4477117485699,5103830227968,5798839393557,6567580836576
mul $0,9
add $0,6
pow $0,5
|
src/third_party/nasm/test/fpu.asm | Mr-Sheep/naiveproxy | 2,219 | 89807 | <reponame>Mr-Sheep/naiveproxy
;Testname=test; Arguments=-fbin -ofpu.bin; Files=stdout stderr fpu.bin
; relaxed encodings for FPU instructions, which NASM should support
; -----------------------------------------------------------------
%define void
%define reg_fpu0 st0
%define reg_fpu st1
; no operands instead of one operand:
; F(U)COM(P), FCOM2, FCOMP3, FCOMP5
FCOM void
FCOMP void
FUCOM void
FUCOMP void
; FCOM2 void
; FCOMP3 void
; FCOMP5 void
; FLD, FST, FSTP, FSTP1, FSTP8, FSTP9
FLD void
FST void
FSTP void
; FSTP1 void
; FSTP8 void
; FSTP9 void
; FXCH, FXCH4, FXCH7, FFREE, FFREEP
FXCH void
; FXCH4 void
; FXCH7 void
FFREE void
FFREEP void
; no operands instead of two operands:
; FADD(P), FMUL(P), FSUBR(P), FSUB(P), FDIVR(P), FDIV(P)
FADD void
FADDP void
FMUL void
FMULP void
FSUBR void
FSUBRP void
FSUB void
FSUBP void
FDIVR void
FDIVRP void
FDIV void
FDIVP void
; one operand instead of two operands:
; FADD, FMUL, FSUB, FSUBR, FDIV, FDIVR
FADD reg_fpu
FMUL reg_fpu
FSUB reg_fpu
FSUBR reg_fpu
FDIV reg_fpu
FDIVR reg_fpu
; FADD, FMUL, FSUBR, FSUB, FDIVR, FDIV (with TO qualifier)
FADD to reg_fpu
FMUL to reg_fpu
FSUBR to reg_fpu
FSUB to reg_fpu
FDIVR to reg_fpu
FDIV to reg_fpu
; FADDP, FMULP, FSUBRP, FSUBP, FDIVRP, FDIVP
FADDP reg_fpu
FMULP reg_fpu
FSUBRP reg_fpu
FSUBP reg_fpu
FDIVRP reg_fpu
FDIVP reg_fpu
; FCMOV(N)B, FCMOV(N)E, FCMOV(N)BE, FCMOV(N)U, and F(U)COMI(P)
FCMOVB reg_fpu
FCMOVNB reg_fpu
FCMOVE reg_fpu
FCMOVNE reg_fpu
FCMOVBE reg_fpu
FCMOVNBE reg_fpu
FCMOVU reg_fpu
FCMOVNU reg_fpu
FCOMI reg_fpu
FCOMIP reg_fpu
FUCOMI reg_fpu
FUCOMIP reg_fpu
; two operands instead of one operand:
; these don't really exist, and thus are _NOT_ supported:
; FCOM reg_fpu,reg_fpu0
; FCOM reg_fpu0,reg_fpu
; FUCOM reg_fpu,reg_fpu0
; FUCOM reg_fpu0,reg_fpu
; FCOMP reg_fpu,reg_fpu0
; FCOMP reg_fpu0,reg_fpu
; FUCOMP reg_fpu,reg_fpu0
; FUCOMP reg_fpu0,reg_fpu
; FCOM2 reg_fpu,reg_fpu0
; FCOM2 reg_fpu0,reg_fpu
; FCOMP3 reg_fpu,reg_fpu0
; FCOMP3 reg_fpu0,reg_fpu
; FCOMP5 reg_fpu,reg_fpu0
; FCOMP5 reg_fpu0,reg_fpu
; FXCH reg_fpu,reg_fpu0
; FXCH reg_fpu0,reg_fpu
; FXCH4 reg_fpu,reg_fpu0
; FXCH4 reg_fpu0,reg_fpu
; FXCH7 reg_fpu,reg_fpu0
; FXCH7 reg_fpu0,reg_fpu
; EOF
|
alloy4fun_models/trashltl/models/16/iW6ZLyKsjLmPuoQxW.als | Kaixi26/org.alloytools.alloy | 0 | 1342 | <filename>alloy4fun_models/trashltl/models/16/iW6ZLyKsjLmPuoQxW.als
open main
pred idiW6ZLyKsjLmPuoQxW_prop17 {
always all f:File | f in Trash implies after f in Trash
}
pred __repair { idiW6ZLyKsjLmPuoQxW_prop17 }
check __repair { idiW6ZLyKsjLmPuoQxW_prop17 <=> prop17o } |
alloy4fun_models/trashltl/models/16/7RHmrouNQGBbuCe2z.als | Kaixi26/org.alloytools.alloy | 0 | 3078 | <filename>alloy4fun_models/trashltl/models/16/7RHmrouNQGBbuCe2z.als
open main
pred id7RHmrouNQGBbuCe2z_prop17 {
always (all f:Trash | after no Trash&f)
}
pred __repair { id7RHmrouNQGBbuCe2z_prop17 }
check __repair { id7RHmrouNQGBbuCe2z_prop17 <=> prop17o } |
Scripts Pack Source Items/Scripts Pack/Dock/3D Glass or 2D Black (10.5 - 10.7.5).applescript | Phorofor/ScriptsPack.macOS | 1 | 409 | <filename>Scripts Pack Source Items/Scripts Pack/Dock/3D Glass or 2D Black (10.5 - 10.7.5).applescript<gh_stars>1-10
# Scripts Pack - Tweak various preference variables in macOS
# <Phorofor, https://github.com/Phorofor/>
-- Dock change to 2D or 3D Snow Leopard, works with OS X Lion
-- Change Dock to 3D or 2D
-- Version compatible: Mac OS X Leopard (10.5)+
-- Preference Identifier: com.apple.dock
-- Preference Key: no-glass
-- Default value (boolean): NO
-- Preference location: ~/Library/Preferences/com.apple.dock.plist
set MacVer to do shell script "sw_vers -productVersion"
set Min to "10.5.0" as string
if MacVer < Min then
display alert "Outdated Mac OS Version!" message "You're using Mac OS " & MacVer & ". This script will only work properly with Mac OS Leopard (10.5) and later. This feature is currently unavailable at this time because there is no 3D Dock that is native to your current version." buttons ["OK"] as warning cancel button 1
else
set toggleBut to "Switch to 2D Dock"
set tZ to "2D Black Dock"
set sTz to "yes"
set bT to "You've decided to switch to the 2D Black Dock."
try
set prValue to do shell script "defaults read com.apple.dock no-glass -boolean"
if prValue = "1" then
set prValue to "The 2D Dock is currently enabled."
set toggleBut to "Switch to 3D Dock"
set tZ to "3D glass Dock?"
set sTz to "no"
set bT to "You decided to switch to the 3D Glass Dock."
else
set prValue to "The 3D Dock is currently enabled."
end if
on error
set prValue to "Undefined Setting. The 3D Dock is enabled bt default."
end try
display alert "Would you like to switch to the " & tZ message "When the 2D Dock is chosen it will switch to it, the Dock is similiar to OS X Tiger's Dock." & return & return & "Current setting: " & prValue buttons {"Cancel", "Clear", toggleBut} default button 3 cancel button 1
if the button returned of the result is toggleBut then
do shell script "defaults write com.apple.dock no-glass -boolean " & sTz
else
do shell script "defaults delete com.apple.dock no-glass"
set bT to "You've decided to clear the preference."
end if
tell application "System Events" to (name of every process)
if the result contains "Dock" then
tell application "Dock"
display alert bT & " The Dock needs to be restarted in order to apply your changes. Restart the Dock now?" buttons {"Don't restart", "Restart"} cancel button 1 default button 2
do shell script "killall Dock"
(* delay 3
display alert "The Dock has been restarted. You should be able to see the changes you've made." *)
end tell
else
display dialog bT & " You'll be able to see the changes the next time the Dock is running"
end if
end if |
tests/subnormal-target/src/crash.ads | TUM-EI-RCS/StratoX | 12 | 1152 | with System;
package Crash is
procedure Last_Chance_Handler
(Source_Location : System.Address; Line : Integer);
pragma Export (C, Last_Chance_Handler,
"__gnat_last_chance_handler");
end Crash;
|
Transynther/x86/_processed/AVXALIGN/_ht_un_/i9-9900K_12_0xa0_notsx.log_21829_2.asm | ljhsiun2/medusa | 9 | 3029 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r14
push %r15
push %r8
push %r9
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x723b, %r14
nop
nop
nop
nop
nop
cmp %r9, %r9
mov $0x6162636465666768, %r15
movq %r15, %xmm2
vmovups %ymm2, (%r14)
nop
nop
nop
nop
add %rax, %rax
lea addresses_UC_ht+0x15dd7, %r13
nop
sub $1425, %r8
mov $0x6162636465666768, %r9
movq %r9, (%r13)
nop
nop
nop
nop
nop
xor %r14, %r14
lea addresses_WT_ht+0x323b, %rsi
lea addresses_D_ht+0x1e7ab, %rdi
xor %r13, %r13
mov $28, %rcx
rep movsq
nop
nop
nop
sub %rcx, %rcx
lea addresses_WT_ht+0x1e93b, %rsi
lea addresses_WC_ht+0x153b, %rdi
nop
nop
add $47724, %r9
mov $121, %rcx
rep movsb
nop
nop
nop
nop
cmp $20018, %rsi
lea addresses_D_ht+0x1d83b, %rcx
nop
xor $49299, %r9
movb $0x61, (%rcx)
nop
nop
nop
nop
nop
dec %r15
lea addresses_normal_ht+0x11e3b, %r15
nop
nop
add $21161, %rcx
movl $0x61626364, (%r15)
nop
nop
nop
nop
sub $9921, %r9
lea addresses_WT_ht+0x83b, %rsi
xor $40599, %r15
mov $0x6162636465666768, %r14
movq %r14, %xmm6
vmovups %ymm6, (%rsi)
nop
nop
nop
nop
nop
cmp %r9, %r9
lea addresses_D_ht+0x913b, %r15
nop
nop
nop
inc %rcx
movups (%r15), %xmm1
vpextrq $1, %xmm1, %rdi
nop
nop
and %r9, %r9
lea addresses_normal_ht+0x1d63b, %rsi
lea addresses_A_ht+0x4587, %rdi
clflush (%rsi)
nop
nop
nop
dec %r8
mov $28, %rcx
rep movsq
inc %r9
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r8
pop %r15
pop %r14
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r15
push %r8
push %r9
push %rax
push %rbx
push %rcx
push %rdi
push %rsi
// Store
lea addresses_WC+0x172bb, %rbx
nop
nop
nop
nop
nop
xor %r9, %r9
mov $0x5152535455565758, %r8
movq %r8, %xmm0
movups %xmm0, (%rbx)
nop
nop
nop
cmp %rax, %rax
// Store
lea addresses_PSE+0x1f703, %r11
nop
nop
nop
nop
nop
inc %rcx
mov $0x5152535455565758, %r15
movq %r15, (%r11)
nop
nop
nop
dec %r11
// Store
lea addresses_A+0x1681b, %rax
clflush (%rax)
nop
nop
add %r15, %r15
movw $0x5152, (%rax)
nop
nop
nop
nop
sub $22569, %r15
// REPMOV
lea addresses_UC+0xb0bb, %rsi
lea addresses_D+0x110bb, %rdi
nop
inc %r9
mov $102, %rcx
rep movsq
nop
nop
nop
add $28874, %r15
// Load
lea addresses_WC+0x13e2b, %r11
nop
nop
nop
nop
nop
add %rsi, %rsi
movb (%r11), %bl
cmp %rcx, %rcx
// Store
lea addresses_D+0x8e3b, %rdi
nop
nop
nop
nop
and $15464, %r15
movl $0x51525354, (%rdi)
nop
nop
sub %rax, %rax
// Faulty Load
lea addresses_normal+0xd23b, %r9
nop
nop
nop
and %rsi, %rsi
vmovntdqa (%r9), %ymm2
vextracti128 $1, %ymm2, %xmm2
vpextrq $1, %xmm2, %r8
lea oracles, %rcx
and $0xff, %r8
shlq $12, %r8
mov (%rcx,%r8,1), %r8
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r9
pop %r8
pop %r15
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_normal', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 7}}
{'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 3}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 3}}
{'src': {'type': 'addresses_UC', 'congruent': 7, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D', 'congruent': 7, 'same': False}}
{'src': {'type': 'addresses_WC', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 3}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 10}}
[Faulty Load]
{'src': {'type': 'addresses_normal', 'AVXalign': False, 'size': 32, 'NT': True, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 11}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': True, 'size': 8, 'NT': False, 'same': False, 'congruent': 2}}
{'src': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 3, 'same': False}}
{'src': {'type': 'addresses_WT_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 9}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 8}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 9}}
{'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 8}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}}
{'08': 2, '72': 4, '44': 8445, '49': 13378}
44 49 49 49 49 49 49 44 44 49 44 49 49 49 44 49 49 44 49 44 49 49 44 49 44 49 44 49 44 49 44 44 44 49 44 49 44 49 44 44 44 49 44 49 49 49 49 49 44 44 49 49 49 49 44 49 49 49 44 49 44 49 49 49 44 49 49 44 49 49 49 49 49 44 44 49 49 49 49 49 44 49 44 49 49 49 49 49 49 44 49 49 44 49 49 49 49 44 49 44 49 44 49 49 44 44 44 44 44 49 44 49 44 44 49 44 49 49 49 49 44 49 44 44 49 49 44 49 49 49 44 44 49 49 49 49 49 49 44 49 49 49 49 49 44 49 49 44 44 49 44 44 49 49 49 44 44 44 44 44 49 49 49 44 49 49 44 49 44 49 49 49 49 44 44 44 49 49 44 49 44 44 49 49 44 44 49 49 44 49 49 49 49 44 44 44 44 49 44 49 44 44 49 49 44 49 44 49 44 49 44 49 49 44 44 49 49 44 49 49 44 44 49 49 44 49 44 44 49 44 49 49 44 49 49 49 49 49 49 49 49 44 49 44 49 44 49 44 44 49 49 44 44 44 44 49 49 44 44 49 49 49 44 49 44 49 44 49 49 44 49 44 49 49 49 49 49 49 44 44 49 49 49 44 44 44 49 44 49 49 49 49 49 44 49 44 49 44 49 44 49 49 49 44 49 49 49 44 49 44 49 44 49 44 49 49 49 49 44 44 49 44 44 49 49 49 49 49 49 49 44 49 49 44 49 49 49 44 49 49 49 44 49 49 44 44 44 49 49 44 49 49 49 49 49 49 49 44 49 44 44 49 49 44 44 49 44 44 49 49 44 49 49 44 49 49 49 49 49 49 44 49 44 44 49 49 49 49 49 49 49 44 44 44 44 49 44 44 44 49 49 44 49 44 44 44 49 44 49 49 44 49 49 49 44 49 49 49 49 44 44 44 49 49 49 44 49 49 49 44 44 49 49 44 44 44 49 49 49 44 49 44 49 49 49 49 49 49 44 49 49 44 49 49 49 44 49 44 44 49 49 49 44 49 44 44 49 44 49 49 49 49 49 49 49 44 49 44 44 49 49 44 44 49 44 49 49 49 49 44 44 49 49 44 44 44 44 49 49 49 49 49 44 44 44 44 44 49 49 49 49 44 49 49 49 44 49 49 49 49 44 49 44 49 49 44 44 44 44 49 49 49 44 49 44 49 44 49 44 44 49 49 44 44 44 44 49 44 49 49 49 44 44 49 44 44 49 44 49 49 49 44 49 49 49 49 49 49 44 49 44 49 44 49 49 44 49 44 44 44 44 44 44 44 49 49 44 49 44 49 44 49 49 49 44 49 49 44 49 49 49 44 49 49 49 44 49 44 44 49 44 49 49 49 49 49 49 49 49 44 44 49 49 49 44 49 49 44 49 49 44 49 49 44 49 49 49 49 49 49 44 44 49 44 49 49 49 49 44 49 49 49 44 49 49 49 49 44 44 49 49 44 49 44 49 49 49 44 44 44 44 44 49 44 49 49 49 49 49 49 44 49 44 44 44 44 44 49 49 49 44 44 49 49 49 44 49 49 49 49 44 49 44 49 44 44 44 49 49 49 49 44 44 44 49 49 49 49 49 49 44 49 49 49 44 49 44 49 49 44 49 49 44 49 44 49 44 49 44 49 44 44 49 44 49 49 49 49 49 49 44 49 44 49 49 49 49 49 44 49 44 49 44 49 49 49 49 44 49 44 49 44 44 44 44 44 44 44 44 44 44 49 49 49 44 49 44 49 49 49 49 44 49 49 44 49 49 49 44 44 44 49 49 49 49 44 49 44 49 44 49 44 49 49 49 44 49 44 49 49 44 44 49 49 49 49 49 49 49 49 44 49 49 49 49 49 49 49 49 49 44 44 49 49 49 49 44 49 49 49 49 49 49 49 49 49 49 44 44 49 49 49 49 44 44 49 44 49 49 44 49 49 44 49 44 44 44 49 49 49 49 44 49 44 44 49 44 49 49 49 44 44 44 44 44 49 44 49 44 49 44 49 49 49 49 44 49 44 49 49 49 49 44 49 44 44 49 49 44 49 49 49 49 49 49 49 44 44 49 49 49 49 49 49 49 49 49 49 49 44 49 44 44 44 44 49 49 49 49 49 49 49 49 49 44 49 49 44 44 49 49 49 49 49 49 49 49 49 44 44 44 49 49 44 49 49 49 49 44 49 44 49 49 44 49 49 49 44 44 49 49 44 49 44 49 44 44 44 49 49
*/
|
T3/E3T2.asm | abphilip-vit/College3 | 2 | 247103 | ORG 0000H
MOV DPTR,#0200H
MOV R1, #0EH
MOV R0, #40H
ALLEN:CLR A
MOVC A,@A+DPTR
MOV @R0,A
INC DPTR
INC R0
DJNZ R1,ALLEN
MOV R0,#40H
MOV R1,#60H
MOV R3,#0EH
ALLEN2: CLR A
MOV A,@R0
MOV @R1,A
INC R1
INC R0
DJNZ R3,ALLEN2
HERE: SJMP HERE
ORG 0200H
DB "VIT UNIVERSITY"
END |
test/mat/vulkan-math-mat4x2-test.adb | zrmyers/VulkanAda | 1 | 24469 | <reponame>zrmyers/VulkanAda<gh_stars>1-10
--------------------------------------------------------------------------------
-- MIT License
--
-- Copyright (c) 2021 <NAME>
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
--------------------------------------------------------------------------------
with Ada.Text_IO;
with Ada.Characters.Latin_1;
with Vulkan.Math.GenFMatrix;
with Vulkan.Math.Mat2x2;
with Vulkan.Math.Mat4x2;
with Vulkan.Math.Mat3x4;
with Vulkan.Math.GenFType;
with Vulkan.Math.Vec2;
with Vulkan.Math.Vec4;
with Vulkan.Test.Framework;
use Ada.Text_IO;
use Ada.Characters.Latin_1;
use Vulkan.Math.Mat2x2;
use Vulkan.Math.Mat4x2;
use Vulkan.Math.Mat3x4;
use Vulkan.Math.GenFType;
use Vulkan.Math.Vec2;
use Vulkan.Math.Vec4;
use Vulkan.Test.Framework;
--------------------------------------------------------------------------------
--< @group Vulkan Math Basic Types
--------------------------------------------------------------------------------
--< @summary
--< This package provides tests for single precision floating point mat4x2.
--------------------------------------------------------------------------------
package body Vulkan.Math.Mat4x2.Test is
-- Test Mat4x2
procedure Test_Mat4x2 is
vec1 : Vkm_Vec2 :=
Make_Vec2(1.0, 2.0);
vec2 : Vkm_Vec4 :=
Make_Vec4(1.0, 2.0, 3.0, 4.0);
mat1 : Vkm_Mat4x2 :=
Make_Mat4x2;
mat2 : Vkm_Mat4x2 :=
Make_Mat4x2(0.0, 1.0,
2.0, 3.0,
4.0, 5.0,
6.0, 7.0);
mat3 : Vkm_Mat4x2 :=
Make_Mat4x2(vec1, - vec1, 2.0 * vec1, - 2.0 * vec1);
mat4 : Vkm_Mat4x2 :=
Make_Mat4x2(mat2);
mat5 : Vkm_Mat2x2 :=
Make_Mat2x2(5.0);
mat6 : Vkm_Mat4x2 :=
Make_Mat4x2(mat5);
mat7 : Vkm_Mat3x4 :=
Make_Mat3x4(mat5);
begin
Put_Line(LF & "Testing Mat4x2 Constructors...");
Put_Line("mat1 " & mat1.Image);
Assert_Mat4x2_Equals(mat1, 0.0, 0.0,
0.0, 0.0,
0.0, 0.0,
0.0, 0.0);
Put_Line("mat2 " & mat2.Image);
Assert_Mat4x2_Equals(mat2, 0.0, 1.0,
2.0, 3.0,
4.0, 5.0,
6.0, 7.0);
Put_Line("mat3 " & mat3.Image);
Assert_Mat4x2_Equals(mat3, 1.0, 2.0,
-1.0, -2.0,
2.0, 4.0,
-2.0, -4.0);
Put_Line("mat4 " & mat4.Image);
Assert_Mat4x2_Equals(mat4, 0.0, 1.0,
2.0, 3.0,
4.0, 5.0,
6.0, 7.0);
Put_Line("mat6 " & mat6.Image);
Assert_Mat4x2_Equals(mat6, 5.0, 0.0,
0.0, 5.0,
0.0, 0.0,
0.0, 0.0);
Put_Line("Testing '=' operator...");
Put_Line(" mat2 != mat3");
Assert_Vkm_Bool_Equals(mat2 = mat3, False);
Put_Line(" mat4 != mat5");
Assert_Vkm_Bool_Equals(mat4 = mat5, False);
Put_Line(" mat4 = mat2");
Assert_Vkm_Bool_Equals(mat4 = mat2, True);
Put_Line(" Testing unary '+/-' operator");
Put_Line(" + mat4 = " & Image(+ mat4));
Assert_Mat4x2_Equals(+mat4, 0.0, 1.0,
2.0, 3.0,
4.0, 5.0,
6.0, 7.0);
Put_Line(" - mat4 = " & Image(- mat4));
Assert_Mat4x2_Equals(-mat4, -0.0, -1.0,
-2.0, -3.0,
-4.0, -5.0,
-6.0, -7.0);
Put_Line("+(- mat4) = " & Image(+(- mat4)));
Assert_Mat4x2_Equals(-mat4, -0.0, -1.0,
-2.0, -3.0,
-4.0, -5.0,
-6.0, -7.0);
Put_Line("Testing 'abs' operator...");
Put_Line(" abs(- mat4) = " & Image(abs(-mat4)));
Assert_Mat4x2_Equals(abs(-mat4), 0.0, 1.0,
2.0, 3.0,
4.0, 5.0,
6.0, 7.0);
Put_Line("Testing '+' operator...");
Put_Line(" mat4 + mat3 = " & Image(mat4 + mat3));
Assert_Mat4x2_Equals(mat4 + mat3, 1.0, 3.0,
1.0, 1.0,
6.0, 9.0,
4.0, 3.0);
Put_Line("Testing '-' operator...");
Put_Line(" mat4 - mat3 = " & Image(mat4 -mat3));
Assert_Mat4x2_Equals(mat4 - mat3, -1.0, -1.0,
3.0, 5.0,
2.0, 1.0,
8.0, 11.0);
Put_Line("Testing '*' operator...");
Put_Line(" mat4 * mat5 = " & Image(mat4 * mat5));
Assert_Mat4x2_Equals(mat4 * mat5, 0.0, 5.0,
10.0, 15.0,
20.0, 25.0,
30.0, 35.0);
Put_Line(" mat7 * mat4 = " & Image(mat7 * mat4));
Assert_Mat3x2_Equals(mat7 * mat4, 0.0, 5.0,
10.0, 15.0,
0.0, 0.0);
Put_Line(" mat4 * vec1 = " & Image(mat4 * vec1));
Assert_Vec4_Equals(mat4 * vec1, 2.0 , 8.0 , 14.0, 20.0);
Put_Line(" vec2 * mat4 = " & Image(vec2 * mat4));
Assert_Vec2_Equals(vec2 * mat4, 40.0 , 50.0 );
end Test_Mat4x2;
end Vulkan.Math.Mat4x2.Test;
|
tests/misc/256_files.asm | fengjixuchui/sjasmplus | 220 | 92956 | IFNDEF __ALREADY_INITIALIZED__ : DEFINE __ALREADY_INITIALIZED__
OUTPUT "256_files.bin"
x = 0
ENDIF
x = x+1 : DB x
|
src/definitions/defines.asm | Hacktix/gb-tictactoe | 8 | 80090 | ; Global Symbol Definitions
DEFAULT_DMG_PALETTE EQU %11100100
STACK_SIZE EQU $10
; Menu Symbol Definitions
MENU_1PLAYER_Y EQU 120
MENU_2PLAYER_Y EQU 136
MENU_FADEIN_TIMEOUT EQU 5
; Main Gameplay Symbol Definitions
GAMEPLAY_TILE_EMPTY EQU 8
CURSOR_BASE_POS_Y EQU 30
CURSOR_BASE_POS_X EQU 60
FIELD_SQUARE_WIDTH EQU 24
AI_TURN_TIMEOUT EQU 60
CURSOR_ANIM_TIMEOUT EQU 40
WIN_ANIM_TIMEOUT EQU 100
WIN_SYM_ANIM_TIMEOUT EQU 3
SYM_ANIM_MAX_SPEED EQU 3
SYM_ANIM_OFF_X EQU 2
SYM_ANIM_OFF_Y EQU 5 |
programs/oeis/173/A173536.asm | karttu/loda | 1 | 178492 | ; A173536: A173039(n) + A173259(n).
; 1,0,1,9,4,25,49,16,81,121,36,169,225,64,289,361,100,441,529,144,625,729,196,841,961,256,1089,1225,324,1369,1521,400,1681,1849,484,2025,2209,576,2401,2601,676,2809,3025,784,3249,3481,900,3721,3969,1024,4225,4489,1156,4761,5041,1296,5329
cal $0,265667 ; Permutation of nonnegative integers: a(n) = n + floor(n/3)*(-1)^(n mod 3).
mul $0,2
sub $1,$0
add $1,2
pow $1,2
div $1,4
|
Task/Partial-function-application/Ada/partial-function-application.ada | LaudateCorpus1/RosettaCodeData | 1 | 9119 | with Ada.Text_IO;
procedure Partial_Function_Application is
type Sequence is array(Positive range <>) of Integer;
-- declare a function FS with a generic parameter F and a normal parameter S
generic
with function F(I: Integer) return Integer; -- generic parameter
function FS (S: Sequence) return Sequence;
-- define FS
function FS (S: Sequence) return Sequence is
Result: Sequence(S'First .. S'Last);
begin
for Idx in S'Range loop
Result(Idx) := F(S(Idx));
end loop;
return Result;
end FS;
-- define functions F1 and F2
function F1(I: Integer) return Integer is
begin
return 2*I;
end F1;
function F2(I: Integer) return Integer is
begin
return I**2;
end F2;
-- instantiate the function FS by F1 and F2 (partially apply F1 and F2 to FS)
function FSF1 is new FS(F1);
function FSF2 is new FS(F2);
procedure Print(S: Sequence) is
begin
for Idx in S'Range loop
Ada.Text_IO.Put(Integer'Image(S(Idx)));
end loop;
Ada.Text_IO.New_Line;
end Print;
begin
Print(FSF1((0,1,2,3)));
Print(FSF2((0,1,2,3)));
Print(FSF1((2,4,6,8)));
Print(FSF2((2,4,6,8)));
end Partial_Function_Application;
|
25-My-First-Shredding-Memory.size.asm | blueset/7bh-solutions | 0 | 28993 | -- 7 Billion Humans --
-- 25: My First Shredding Memory --
-- Size: 5/5 --
-- Speed: 140/134 --
mem2 = nearest shredder
a:
mem1 = nearest datacube
pickup mem1
giveto mem2
jump a
|
Definition/LogicalRelation/Properties/Conversion.agda | CoqHott/logrel-mltt | 2 | 5471 | <reponame>CoqHott/logrel-mltt
{-# OPTIONS --safe #-}
open import Definition.Typed.EqualityRelation
module Definition.LogicalRelation.Properties.Conversion {{eqrel : EqRelSet}} where
open EqRelSet {{...}}
open import Definition.Untyped
open import Definition.Typed
open import Definition.Typed.RedSteps
open import Definition.Typed.Reduction
import Definition.Typed.Weakening as W
open import Definition.Typed.Properties
open import Definition.LogicalRelation
open import Definition.LogicalRelation.ShapeView
open import Definition.LogicalRelation.Irrelevance
open import Tools.Product
import Tools.PropositionalEquality as PE
import Data.Fin as Fin
import Data.Nat as Nat
-- Conversion of syntactic reduction closures.
convRed:*: : ∀ {t u A B Γ l} → Γ ⊢ t :⇒*: u ∷ A ^ l → Γ ⊢ A ≡ B ^ [ ! , l ] → Γ ⊢ t :⇒*: u ∷ B ^ l
convRed:*: [[ ⊢t , ⊢u , d ]] A≡B = [[ conv ⊢t A≡B , conv ⊢u A≡B , conv* d A≡B ]]
-- helper functions for the universe
convTermTUniv : ∀ {Γ A B t l l' r ll l< d r' ll' l<' el' d'}
(er : r PE.≡ r') (ellll' : ll PE.≡ ll') →
Γ ⊩⟨ l ⟩ t ∷ A ^ [ ! , next ll ] / Uᵣ (Uᵣ r ll l< PE.refl d) →
Γ ⊩⟨ l' ⟩ t ∷ B ^ [ ! , next ll ] / Uᵣ (Uᵣ r' ll' l<' el' d')
convTermTUniv {l< = l<} {l<' = l<'} {d' = d'} er ellll' (Uₜ K d typeK K≡K [t]) =
let dd = PE.subst (λ x → _ ⊢ _ :⇒*: Univ x _ ^ _) (PE.sym er) (PE.subst (λ x → _ ⊢ _ :⇒*: Univ _ x ^ [ ! , next x ]) (PE.sym ellll') d') in
reduction-irrelevant-Univ {l< = l<} {l<' = l<'} {el = PE.refl} {D = dd} {D' = d'} er (Uₜ K d typeK K≡K [t])
convEqTermTUniv : ∀ {Γ A B t u l r ll l< d dd} →
Γ ⊩⟨ l ⟩ t ≡ u ∷ A ^ [ ! , next ll ] / Uᵣ (Uᵣ r ll l< PE.refl d) →
Γ ⊩⟨ l ⟩ t ≡ u ∷ B ^ [ ! , next ll ] / Uᵣ (Uᵣ r ll l< PE.refl dd)
convEqTermTUniv {l = ι ¹} {r = r} {⁰} (Uₜ₌ [t] [u] A≡B [t≡u]) =
Uₜ₌ (convTermTUniv PE.refl PE.refl [t]) (convTermTUniv PE.refl PE.refl [u]) A≡B [t≡u]
convEqTermTUniv {l = ∞} {r = r} {¹} (Uₜ₌ [t] [u] A≡B [t≡u]) =
Uₜ₌ (convTermTUniv PE.refl PE.refl [t]) (convTermTUniv PE.refl PE.refl [u]) A≡B [t≡u]
mutual
-- Helper function for conversion of terms converting from left to right.
convTermT₁ : ∀ {Γ A B r t l l′} {[A] : Γ ⊩⟨ l ⟩ A ^ r} {[B] : Γ ⊩⟨ l′ ⟩ B ^ r}
→ ShapeView Γ l l′ A B r r [A] [B]
→ Γ ⊩⟨ l ⟩ A ≡ B ^ r / [A]
→ Γ ⊩⟨ l ⟩ t ∷ A ^ r / [A]
→ Γ ⊩⟨ l′ ⟩ t ∷ B ^ r / [B]
convTermT₁ (ℕᵥ D D′) A≡B t = t
convTermT₁ (Emptyᵥ D D′) A≡B t = t
convTermT₁ {r = [ ! , ll ]} (ne (ne K D neK K≡K) (ne K₁ D₁ neK₁ K≡K₁)) (ne₌ M D′ neM K≡M) (neₜ k d (neNfₜ neK₂ ⊢k k≡k)) =
let K≡K₁ = PE.subst (λ x → _ ⊢ _ ≡ x ^ _)
(whrDet* (red D′ , ne neM) (red D₁ , ne neK₁))
(≅-eq (~-to-≅ K≡M))
in neₜ k (convRed:*: d K≡K₁)
(neNfₜ neK₂ (conv ⊢k K≡K₁) (~-conv k≡k K≡K₁))
convTermT₁ {r = [ % , ll ]} (ne (ne K D neK K≡K) (ne K₁ D₁ neK₁ K≡K₁)) (ne₌ M D′ neM K≡M)
(neₜ d) = let K≡K₁ = PE.subst (λ x → _ ⊢ _ ≡ x ^ _)
(whrDet* (red D′ , ne neM) (red D₁ , ne neK₁))
(≅-eq (~-to-≅ K≡M))
in neₜ (conv d (reduction (red D) (red D₁) (ne neK) (ne neK₁) K≡K₁))
convTermT₁ {Γ = Γ} {r = [ ! , ι ll ]} (Πᵥ (Πᵣ rF lF lG _ _ F G D ⊢F ⊢G A≡A [F] [G] G-ext)
(Πᵣ rF₁ lF₁ lG₁ _ _ F₁ G₁ D₁ ⊢F₁ ⊢G₁ A≡A₁ [F]₁ [G]₁ G-ext₁))
(Π₌ F′ G′ D′ A≡B [F≡F′] [G≡G′])
(Πₜ f d funcF f≡f [f] [f]₁) =
let ΠF₁G₁≡ΠF′G′ = whrDet* (red D₁ , Πₙ) (D′ , Πₙ)
F₁≡F′ , rF₁≡rF′ , lF₁≡lF′ , G₁≡G′ , lG₁≡lG′ , lΠ≡lΠ₁ = Π-PE-injectivity ΠF₁G₁≡ΠF′G′
ΠFG≡ΠF₁G₁ = PE.subst (λ x → Γ ⊢ Π F ^ rF ° lF ▹ G ° lG ° ll ≡ x ^ [ ! , ι ll ]) (PE.sym ΠF₁G₁≡ΠF′G′)
(≅-eq A≡B)
in Πₜ f (convRed:*: d ΠFG≡ΠF₁G₁) funcF (≅-conv f≡f ΠFG≡ΠF₁G₁)
(λ {ρ} [ρ] ⊢Δ [a] [b] [a≡b] →
let [F≡F₁] = irrelevanceEqR′ (PE.cong (wk ρ) (PE.sym F₁≡F′))
([F] [ρ] ⊢Δ) ([F≡F′] [ρ] ⊢Δ)
[a]₁ = convTerm₂′ PE.refl (PE.sym rF₁≡rF′) (PE.cong ι (PE.sym lF₁≡lF′)) ([F] [ρ] ⊢Δ) ([F]₁ [ρ] ⊢Δ) [F≡F₁] [a]
[b]₁ = convTerm₂′ PE.refl (PE.sym rF₁≡rF′) (PE.cong ι (PE.sym lF₁≡lF′)) ([F] [ρ] ⊢Δ) ([F]₁ [ρ] ⊢Δ) [F≡F₁] [b]
[a≡b]₁ = convEqTerm₂′ (PE.sym rF₁≡rF′) (PE.cong ι (PE.sym lF₁≡lF′)) ([F] [ρ] ⊢Δ) ([F]₁ [ρ] ⊢Δ) [F≡F₁] [a≡b]
[G≡G₁] = irrelevanceEqR′ (PE.cong (λ x → wk (lift ρ) x [ _ ])
(PE.sym G₁≡G′))
([G] [ρ] ⊢Δ [a]₁)
([G≡G′] [ρ] ⊢Δ [a]₁)
in convEqTerm₁′ PE.refl (PE.cong ι (PE.sym lG₁≡lG′)) ([G] [ρ] ⊢Δ [a]₁) ([G]₁ [ρ] ⊢Δ [a]) [G≡G₁]
([f] [ρ] ⊢Δ [a]₁ [b]₁ [a≡b]₁))
(λ {ρ} [ρ] ⊢Δ [a] →
let [F≡F₁] = irrelevanceEqR′ (PE.cong (wk ρ) (PE.sym F₁≡F′))
([F] [ρ] ⊢Δ) ([F≡F′] [ρ] ⊢Δ)
[a]₁ = convTerm₂′ PE.refl (PE.sym rF₁≡rF′) (PE.cong ι (PE.sym lF₁≡lF′)) ([F] [ρ] ⊢Δ) ([F]₁ [ρ] ⊢Δ) [F≡F₁] [a]
[G≡G₁] = irrelevanceEqR′ (PE.cong (λ x → wk (lift ρ) x [ _ ])
(PE.sym G₁≡G′))
([G] [ρ] ⊢Δ [a]₁)
([G≡G′] [ρ] ⊢Δ [a]₁)
in convTerm₁′ PE.refl (PE.cong ι (PE.sym lG₁≡lG′)) ([G] [ρ] ⊢Δ [a]₁) ([G]₁ [ρ] ⊢Δ [a]) [G≡G₁] ([f]₁ [ρ] ⊢Δ [a]₁))
convTermT₁ {Γ = Γ} {r = [ % , ι ll ]} (Πᵥ (Πᵣ rF lF lG _ _ F G D ⊢F ⊢G A≡A [F] [G] G-ext)
(Πᵣ rF₁ lF₁ lG₁ _ _ F₁ G₁ D₁ ⊢F₁ ⊢G₁ A≡A₁ [F]₁ [G]₁ G-ext₁))
(Π₌ F′ G′ D′ A≡B [F≡F′] [G≡G′])
d = let ΠF₁G₁≡ΠF′G′ = whrDet* (red D₁ , Πₙ) (D′ , Πₙ)
F₁≡F′ , rF₁≡rF′ , lF₁≡lF′ , G₁≡G′ , lG₁≡lG′ = Π-PE-injectivity ΠF₁G₁≡ΠF′G′
ΠFG≡ΠF₁G₁ = PE.subst (λ x → Γ ⊢ Π F ^ rF ° lF ▹ G ° lG ° ll ≡ x ^ [ % , ι ll ]) (PE.sym ΠF₁G₁≡ΠF′G′)
(≅-eq A≡B)
in conv d ΠFG≡ΠF₁G₁
convTermT₁ {Γ = Γ} {r = [ % , ll ]} (∃ᵥ (∃ᵣ F G D ⊢F ⊢G A≡A [F] [G] G-ext)
(∃ᵣ F₁ G₁ D₁ ⊢F₁ ⊢G₁ A≡A₁ [F]₁ [G]₁ G-ext₁))
(∃₌ F′ G′ D′ A≡B [F≡F′] [G≡G′])
d = let ∃F₁G₁≡∃F′G′ = whrDet* (red D₁ , ∃ₙ) (D′ , ∃ₙ)
F₁≡F′ , G₁≡G′ = ∃-PE-injectivity ∃F₁G₁≡∃F′G′
∃FG≡∃F₁G₁ = PE.subst (λ x → Γ ⊢ ∃ F ▹ G ≡ x ^ [ % , ll ]) (PE.sym ∃F₁G₁≡∃F′G′)
(≅-eq A≡B)
in conv d ∃FG≡∃F₁G₁
convTermT₁ (Uᵥ (Uᵣ r l l< PE.refl d) (Uᵣ r' l' l<' el' d')) A≡B X =
let U≡U = whrDet* (A≡B , Uₙ) (red d' , Uₙ)
r≡r , l≡l = Univ-PE-injectivity U≡U
in convTermTUniv r≡r l≡l X
convTermT₁ (emb⁰¹ X) A≡B t = convTermT₁ X A≡B t
convTermT₁ (emb¹⁰ X) A≡B t = convTermT₁ X A≡B t
convTermT₁ (emb¹∞ X) A≡B t = convTermT₁ X A≡B t
convTermT₁ (emb∞¹ X) A≡B t = convTermT₁ X A≡B t
-- Helper function for conversion of terms converting from right to left.
convTermT₂ : ∀ {l l′ Γ A B r t} {[A] : Γ ⊩⟨ l ⟩ A ^ r} {[B] : Γ ⊩⟨ l′ ⟩ B ^ r}
→ ShapeView Γ l l′ A B r r [A] [B]
→ Γ ⊩⟨ l ⟩ A ≡ B ^ r / [A]
→ Γ ⊩⟨ l′ ⟩ t ∷ B ^ r / [B]
→ Γ ⊩⟨ l ⟩ t ∷ A ^ r / [A]
convTermT₂ (ℕᵥ D D′) A≡B t = t
convTermT₂ (Emptyᵥ D D′) A≡B t = t
convTermT₂ {r = [ ! , ll ]} (ne (ne K D neK K≡K) (ne K₁ D₁ neK₁ K≡K₁)) (ne₌ M D′ neM K≡M)
(neₜ k d (neNfₜ neK₂ ⊢k k≡k)) =
let K₁≡K = PE.subst (λ x → _ ⊢ x ≡ _ ^ _)
(whrDet* (red D′ , ne neM) (red D₁ , ne neK₁))
(sym (≅-eq (~-to-≅ K≡M)))
in neₜ k (convRed:*: d K₁≡K)
(neNfₜ neK₂ (conv ⊢k K₁≡K) (~-conv k≡k K₁≡K))
convTermT₂ {r = [ % , ll ]} (ne (ne K D neK K≡K) (ne K₁ D₁ neK₁ K≡K₁)) (ne₌ M D′ neM K≡M)
(neₜ d) = let K₁≡K = PE.subst (λ x → _ ⊢ x ≡ _ ^ _)
(whrDet* (red D′ , ne neM) (red D₁ , ne neK₁))
(sym (≅-eq (~-to-≅ K≡M)))
in neₜ (conv d (reduction (red D₁) (red D) (ne neK₁) (ne neK) K₁≡K))
convTermT₂ {Γ = Γ} {r = [ ! , ι ll ]} (Πᵥ (Πᵣ rF lF lG _ _ F G D ⊢F ⊢G A≡A [F] [G] G-ext)
(Πᵣ rF₁ lF₁ lG₁ _ _ F₁ G₁ D₁ ⊢F₁ ⊢G₁ A≡A₁ [F]₁ [G]₁ G-ext₁))
(Π₌ F′ G′ D′ A≡B [F≡F′] [G≡G′])
(Πₜ f d funcF f≡f [f] [f]₁) =
let ΠF₁G₁≡ΠF′G′ = whrDet* (red D₁ , Πₙ) (D′ , Πₙ)
F₁≡F′ , rF₁≡rF′ , lF₁≡lF′ , G₁≡G′ , lG₁≡lG′ , lΠ≡lΠ₁ = Π-PE-injectivity ΠF₁G₁≡ΠF′G′
ΠFG≡ΠF₁G₁ = PE.subst (λ x → Γ ⊢ Π F ^ rF ° lF ▹ G ° lG ° ll ≡ x ^ [ ! , ι ll ])
(PE.sym ΠF₁G₁≡ΠF′G′) (≅-eq A≡B)
in Πₜ f (convRed:*: d (sym ΠFG≡ΠF₁G₁)) funcF (≅-conv f≡f (sym ΠFG≡ΠF₁G₁))
(λ {ρ} [ρ] ⊢Δ [a] [b] [a≡b] →
let [F≡F₁] = irrelevanceEqR′ (PE.cong (wk ρ) (PE.sym F₁≡F′))
([F] [ρ] ⊢Δ) ([F≡F′] [ρ] ⊢Δ)
[a]₁ = convTerm₁′ (PE.sym rF₁≡rF′) (PE.cong ι (PE.sym lF₁≡lF′)) ([F] [ρ] ⊢Δ) ([F]₁ [ρ] ⊢Δ) [F≡F₁] [a]
[b]₁ = convTerm₁′ (PE.sym rF₁≡rF′) (PE.cong ι (PE.sym lF₁≡lF′)) ([F] [ρ] ⊢Δ) ([F]₁ [ρ] ⊢Δ) [F≡F₁] [b]
[a≡b]₁ = convEqTerm₁′ (PE.sym rF₁≡rF′) (PE.cong ι (PE.sym lF₁≡lF′)) ([F] [ρ] ⊢Δ) ([F]₁ [ρ] ⊢Δ) [F≡F₁] [a≡b]
[G≡G₁] = irrelevanceEqR′ (PE.cong (λ x → wk (lift ρ) x [ _ ])
(PE.sym G₁≡G′))
([G] [ρ] ⊢Δ [a])
([G≡G′] [ρ] ⊢Δ [a])
in convEqTerm₂′ PE.refl (PE.cong ι (PE.sym lG₁≡lG′)) ([G] [ρ] ⊢Δ [a]) ([G]₁ [ρ] ⊢Δ [a]₁)
[G≡G₁] ([f] [ρ] ⊢Δ [a]₁ [b]₁ [a≡b]₁))
(λ {ρ} [ρ] ⊢Δ [a] →
let [F≡F₁] = irrelevanceEqR′ (PE.cong (wk ρ) (PE.sym F₁≡F′))
([F] [ρ] ⊢Δ) ([F≡F′] [ρ] ⊢Δ)
[a]₁ = convTerm₁′ (PE.sym rF₁≡rF′) (PE.cong ι (PE.sym lF₁≡lF′)) ([F] [ρ] ⊢Δ) ([F]₁ [ρ] ⊢Δ) [F≡F₁] [a]
[G≡G₁] = irrelevanceEqR′ (PE.cong (λ x → wk (lift ρ) x [ _ ])
(PE.sym G₁≡G′))
([G] [ρ] ⊢Δ [a])
([G≡G′] [ρ] ⊢Δ [a])
in convTerm₂′ PE.refl PE.refl (PE.cong ι (PE.sym lG₁≡lG′)) ([G] [ρ] ⊢Δ [a]) ([G]₁ [ρ] ⊢Δ [a]₁)
[G≡G₁] ([f]₁ [ρ] ⊢Δ [a]₁))
convTermT₂ {Γ = Γ} {r = [ % , ι ll ]} (Πᵥ (Πᵣ rF lF lG _ _ F G D ⊢F ⊢G A≡A [F] [G] G-ext)
(Πᵣ rF₁ lF₁ lG₁ _ _ F₁ G₁ D₁ ⊢F₁ ⊢G₁ A≡A₁ [F]₁ [G]₁ G-ext₁))
(Π₌ F′ G′ D′ A≡B [F≡F′] [G≡G′])
d = let ΠF₁G₁≡ΠF′G′ = whrDet* (red D₁ , Πₙ) (D′ , Πₙ)
F₁≡F′ , rF₁≡rF′ , lF₁≡lF′ , G₁≡G′ , lG₁≡lG′ = Π-PE-injectivity ΠF₁G₁≡ΠF′G′
ΠFG≡ΠF₁G₁ = PE.subst (λ x → Γ ⊢ Π F ^ rF ° lF ▹ G ° lG ° ll ≡ x ^ [ % , ι ll ])
(PE.sym ΠF₁G₁≡ΠF′G′) (≅-eq A≡B)
in conv d (sym ΠFG≡ΠF₁G₁)
convTermT₂ {Γ = Γ} {r = [ % , ll ]} (∃ᵥ (∃ᵣ F G D ⊢F ⊢G A≡A [F] [G] G-ext)
(∃ᵣ F₁ G₁ D₁ ⊢F₁ ⊢G₁ A≡A₁ [F]₁ [G]₁ G-ext₁))
(∃₌ F′ G′ D′ A≡B [F≡F′] [G≡G′])
d = let ∃F₁G₁≡∃F′G′ = whrDet* (red D₁ , ∃ₙ) (D′ , ∃ₙ)
F₁≡F′ , G₁≡G′ = ∃-PE-injectivity ∃F₁G₁≡∃F′G′
∃FG≡∃F₁G₁ = PE.subst (λ x → Γ ⊢ ∃ F ▹ G ≡ x ^ [ % , ll ])
(PE.sym ∃F₁G₁≡∃F′G′) (≅-eq A≡B)
in conv d (sym ∃FG≡∃F₁G₁)
convTermT₂ (Uᵥ (Uᵣ r l l< el d) (Uᵣ r' l' l<' PE.refl d')) A≡B X =
let U≡U = whrDet* (A≡B , Uₙ) (red d' , Uₙ)
r≡r , l≡l = Univ-PE-injectivity U≡U
in convTermTUniv (PE.sym r≡r) (PE.sym l≡l) X
convTermT₂ (emb⁰¹ X) A≡B t = convTermT₂ X A≡B t
convTermT₂ (emb¹⁰ X) A≡B t = convTermT₂ X A≡B t
convTermT₂ (emb¹∞ X) A≡B t = convTermT₂ X A≡B t
convTermT₂ (emb∞¹ X) A≡B t = convTermT₂ X A≡B t
-- Conversion of terms converting from left to right.
convTerm₁ : ∀ {Γ A B r ll t l l′} ([A] : Γ ⊩⟨ l ⟩ A ^ [ r , ll ]) ([B] : Γ ⊩⟨ l′ ⟩ B ^ [ r , ll ])
→ Γ ⊩⟨ l ⟩ A ≡ B ^ [ r , ll ] / [A]
→ Γ ⊩⟨ l ⟩ t ∷ A ^ [ r , ll ] / [A]
→ Γ ⊩⟨ l′ ⟩ t ∷ B ^ [ r , ll ] / [B]
convTerm₁ [A] [B] A≡B t = convTermT₁ (goodCases [A] [B] A≡B) A≡B t
-- Conversion of terms converting from left to right. with PE
convTerm₁′ : ∀ {Γ A B r r' ll ll' t l l′} (eq : r PE.≡ r') (eql : ll PE.≡ ll')
([A] : Γ ⊩⟨ l ⟩ A ^ [ r , ll ]) ([B] : Γ ⊩⟨ l′ ⟩ B ^ [ r' , ll' ])
→ Γ ⊩⟨ l ⟩ A ≡ B ^ [ r , ll ] / [A]
→ Γ ⊩⟨ l ⟩ t ∷ A ^ [ r , ll ] / [A]
→ Γ ⊩⟨ l′ ⟩ t ∷ B ^ [ r' , ll' ] / [B]
convTerm₁′ PE.refl PE.refl [A] [B] A≡B t = convTerm₁ [A] [B] A≡B t
-- Conversion of terms converting from right to left.
convTerm₂ : ∀ {Γ A B r t l l′} ([A] : Γ ⊩⟨ l ⟩ A ^ r) ([B] : Γ ⊩⟨ l′ ⟩ B ^ r)
→ Γ ⊩⟨ l ⟩ A ≡ B ^ r / [A]
→ Γ ⊩⟨ l′ ⟩ t ∷ B ^ r / [B]
→ Γ ⊩⟨ l ⟩ t ∷ A ^ r / [A]
convTerm₂ [A] [B] A≡B t = convTermT₂ (goodCases [A] [B] A≡B) A≡B t
-- Conversion of terms converting from right to left
-- with some propsitionally equal types.
convTerm₂′ : ∀ {Γ A r r' ll ll' B B′ t l l′} → B PE.≡ B′ → r PE.≡ r' → ll PE.≡ ll'
→ ([A] : Γ ⊩⟨ l ⟩ A ^ [ r , ll ] ) ([B] : Γ ⊩⟨ l′ ⟩ B ^ [ r' , ll' ])
→ Γ ⊩⟨ l ⟩ A ≡ B′ ^ [ r , ll ] / [A]
→ Γ ⊩⟨ l′ ⟩ t ∷ B ^ [ r' , ll' ] / [B]
→ Γ ⊩⟨ l ⟩ t ∷ A ^ [ r , ll ] / [A]
convTerm₂′ PE.refl PE.refl PE.refl [A] [B] A≡B t = convTerm₂ [A] [B] A≡B t
-- Helper function for conversion of term equality converting from left to right.
convEqTermT₁ : ∀ {l l′ Γ A B r t u} {[A] : Γ ⊩⟨ l ⟩ A ^ r} {[B] : Γ ⊩⟨ l′ ⟩ B ^ r}
→ ShapeView Γ l l′ A B r r [A] [B]
→ Γ ⊩⟨ l ⟩ A ≡ B ^ r / [A]
→ Γ ⊩⟨ l ⟩ t ≡ u ∷ A ^ r / [A]
→ Γ ⊩⟨ l′ ⟩ t ≡ u ∷ B ^ r / [B]
convEqTermT₁ (ℕᵥ D D′) A≡B t≡u = t≡u
convEqTermT₁ (Emptyᵥ D D′) A≡B t≡u = t≡u
convEqTermT₁ {r = [ ! , ll ]} (ne (ne K D neK K≡K) (ne K₁ D₁ neK₁ K≡K₁)) (ne₌ M D′ neM K≡M)
(neₜ₌ k m d d′ (neNfₜ₌ neK₂ neM₁ k≡m)) =
let K≡K₁ = PE.subst (λ x → _ ⊢ _ ≡ x ^ _)
(whrDet* (red D′ , ne neM) (red D₁ , ne neK₁))
(≅-eq (~-to-≅ K≡M))
in neₜ₌ k m (convRed:*: d K≡K₁)
(convRed:*: d′ K≡K₁)
(neNfₜ₌ neK₂ neM₁ (~-conv k≡m K≡K₁))
convEqTermT₁ {r = [ % , ll ]} (ne (ne K D neK K≡K) (ne K₁ D₁ neK₁ K≡K₁)) (ne₌ M D′ neM K≡M)
(neₜ₌ d d′) =
let K≡K₁ = PE.subst (λ x → _ ⊢ _ ≡ x ^ _)
(whrDet* (red D′ , ne neM) (red D₁ , ne neK₁))
(≅-eq (~-to-≅ K≡M))
in neₜ₌ (conv d (reduction (red D) (red D₁) (ne neK) (ne neK₁) K≡K₁))
(conv d′ (reduction (red D) (red D₁) (ne neK) (ne neK₁) K≡K₁))
convEqTermT₁ {Γ = Γ} {r = [ ! , ι ll ]} (Πᵥ (Πᵣ rF lF lG lF≤ lG≤ F G D ⊢F ⊢G A≡A [F] [G] G-ext)
(Πᵣ rF₁ lF₁ lG₁ lF₁≤ lG₁≤ F₁ G₁ D₁ ⊢F₁ ⊢G₁ A≡A₁ [F]₁ [G]₁ G-ext₁))
(Π₌ F′ G′ D′ A≡B [F≡F′] [G≡G′])
(Πₜ₌ f g d d′ funcF funcG t≡u [t] [u] [t≡u]) =
let [A] = Πᵣ′ rF lF lG lF≤ lG≤ F G D ⊢F ⊢G A≡A [F] [G] G-ext
[B] = Πᵣ′ rF₁ lF₁ lG₁ lF₁≤ lG₁≤ F₁ G₁ D₁ ⊢F₁ ⊢G₁ A≡A₁ [F]₁ [G]₁ G-ext₁
[A≡B] = Π₌ F′ G′ D′ A≡B [F≡F′] [G≡G′]
ΠF₁G₁≡ΠF′G′ = whrDet* (red D₁ , Πₙ) (D′ , Πₙ)
ΠFG≡ΠF₁G₁ = PE.subst (λ x → Γ ⊢ Π F ^ rF ° lF ▹ G ° lG ° ll ≡ x ^ [ ! , ι ll ])
(PE.sym ΠF₁G₁≡ΠF′G′) (≅-eq A≡B)
in Πₜ₌ f g (convRed:*: d ΠFG≡ΠF₁G₁) (convRed:*: d′ ΠFG≡ΠF₁G₁)
funcF funcG (≅-conv t≡u ΠFG≡ΠF₁G₁)
(convTerm₁ [A] [B] [A≡B] [t]) (convTerm₁ [A] [B] [A≡B] [u])
(λ {ρ} [ρ] ⊢Δ [a] →
let F₁≡F′ , rF₁≡rF′ , lF₁≡lF′ , G₁≡G′ , lG₁≡lG′ , lΠ≡lΠ₁ = Π-PE-injectivity (whrDet* (red D₁ , Πₙ) (D′ , Πₙ))
[F≡F₁] = irrelevanceEqR′ (PE.cong (wk ρ) (PE.sym F₁≡F′))
([F] [ρ] ⊢Δ) ([F≡F′] [ρ] ⊢Δ)
[a]₁ = convTerm₂′ PE.refl (PE.sym rF₁≡rF′) (PE.cong ι (PE.sym lF₁≡lF′)) ([F] [ρ] ⊢Δ) ([F]₁ [ρ] ⊢Δ) [F≡F₁] [a]
[G≡G₁] = irrelevanceEqR′ (PE.cong (λ x → wk (lift ρ) x [ _ ])
(PE.sym G₁≡G′))
([G] [ρ] ⊢Δ [a]₁)
([G≡G′] [ρ] ⊢Δ [a]₁)
in convEqTerm₁′ PE.refl (PE.cong ι (PE.sym lG₁≡lG′)) ([G] [ρ] ⊢Δ [a]₁) ([G]₁ [ρ] ⊢Δ [a])
[G≡G₁] ([t≡u] [ρ] ⊢Δ [a]₁))
convEqTermT₁ {Γ = Γ} {r = [ % , ι ll ]} (Πᵥ (Πᵣ rF lF lG _ _ F G D ⊢F ⊢G A≡A [F] [G] G-ext)
(Πᵣ rF₁ lF₁ lG₁ _ _ F₁ G₁ D₁ ⊢F₁ ⊢G₁ A≡A₁ [F]₁ [G]₁ G-ext₁))
(Π₌ F′ G′ D′ A≡B [F≡F′] [G≡G′])
(d , d′) = let ΠF₁G₁≡ΠF′G′ = whrDet* (red D₁ , Πₙ) (D′ , Πₙ)
ΠFG≡ΠF₁G₁ = PE.subst (λ x → Γ ⊢ Π F ^ rF ° lF ▹ G ° lG ° ll ≡ x ^ [ % , ι ll ])
(PE.sym ΠF₁G₁≡ΠF′G′) (≅-eq A≡B)
in conv d ΠFG≡ΠF₁G₁ , conv d′ ΠFG≡ΠF₁G₁
convEqTermT₁ {Γ = Γ} {r = [ % , ll ]} (∃ᵥ (∃ᵣ F G D ⊢F ⊢G A≡A [F] [G] G-ext)
(∃ᵣ F₁ G₁ D₁ ⊢F₁ ⊢G₁ A≡A₁ [F]₁ [G]₁ G-ext₁))
(∃₌ F′ G′ D′ A≡B [F≡F′] [G≡G′])
(d , d′) = let ∃F₁G₁≡∃F′G′ = whrDet* (red D₁ , ∃ₙ) (D′ , ∃ₙ)
∃FG≡∃F₁G₁ = PE.subst (λ x → Γ ⊢ ∃ F ▹ G ≡ x ^ [ % , ll ])
(PE.sym ∃F₁G₁≡∃F′G′) (≅-eq A≡B)
in (conv d ∃FG≡∃F₁G₁) , conv d′ ∃FG≡∃F₁G₁
convEqTermT₁ (Uᵥ (Uᵣ r ll l< PE.refl d) (Uᵣ r' ll' l<' el' d')) A≡B X =
let U≡U = whrDet* (A≡B , Uₙ) (red d' , Uₙ)
r≡r , l≡l = Univ-PE-injectivity U≡U
dd = PE.subst (λ x → _ ⊢ _ :⇒*: Univ x _ ^ _) (PE.sym r≡r) (PE.subst (λ x → _ ⊢ _ :⇒*: Univ _ x ^ [ ! , next x ]) (PE.sym l≡l) d')
in reduction-irrelevant-Univ= {l< = l<} {l<' = l<'} {el = PE.refl} {el' = el'} {D = dd} {D' = d'} r≡r (convEqTermTUniv X)
convEqTermT₁ (emb⁰¹ X) A≡B t≡u = convEqTermT₁ X A≡B t≡u
convEqTermT₁ (emb¹⁰ X) A≡B t≡u = convEqTermT₁ X A≡B t≡u
convEqTermT₁ (emb¹∞ X) A≡B t≡u = convEqTermT₁ X A≡B t≡u
convEqTermT₁ (emb∞¹ X) A≡B t≡u = convEqTermT₁ X A≡B t≡u
-- Helper function for conversion of term equality converting from right to left.
convEqTermT₂ : ∀ {l l′ Γ A B t u r} {[A] : Γ ⊩⟨ l ⟩ A ^ r} {[B] : Γ ⊩⟨ l′ ⟩ B ^ r}
→ ShapeView Γ l l′ A B r r [A] [B]
→ Γ ⊩⟨ l ⟩ A ≡ B ^ r / [A]
→ Γ ⊩⟨ l′ ⟩ t ≡ u ∷ B ^ r / [B]
→ Γ ⊩⟨ l ⟩ t ≡ u ∷ A ^ r / [A]
convEqTermT₂ (ℕᵥ D D′) A≡B t≡u = t≡u
convEqTermT₂ (Emptyᵥ D D′) A≡B t≡u = t≡u
convEqTermT₂ {r = [ ! , ll ]} (ne (ne K D neK K≡K) (ne K₁ D₁ neK₁ K≡K₁)) (ne₌ M D′ neM K≡M)
(neₜ₌ k m d d′ (neNfₜ₌ neK₂ neM₁ k≡m)) =
let K₁≡K = PE.subst (λ x → _ ⊢ x ≡ _ ^ _)
(whrDet* (red D′ , ne neM) (red D₁ , ne neK₁))
(sym (≅-eq (~-to-≅ K≡M)))
in neₜ₌ k m (convRed:*: d K₁≡K) (convRed:*: d′ K₁≡K)
(neNfₜ₌ neK₂ neM₁ (~-conv k≡m K₁≡K))
convEqTermT₂ {r = [ % , ll ]} (ne (ne K D neK K≡K) (ne K₁ D₁ neK₁ K≡K₁)) (ne₌ M D′ neM K≡M)
(neₜ₌ d d′) =
let K₁≡K = PE.subst (λ x → _ ⊢ x ≡ _ ^ _)
(whrDet* (red D′ , ne neM) (red D₁ , ne neK₁))
(sym (≅-eq (~-to-≅ K≡M)))
in neₜ₌ (conv d (reduction (red D₁) (red D) (ne neK₁) (ne neK) K₁≡K))
(conv d′ (reduction (red D₁) (red D) (ne neK₁) (ne neK) K₁≡K))
convEqTermT₂ {Γ = Γ} {r = [ ! , ι ll ]} (Πᵥ (Πᵣ rF lF lG lF≤ lG≤ F G D ⊢F ⊢G A≡A [F] [G] G-ext)
(Πᵣ rF₁ lF₁ lG₁ lF₁≤ lG₁≤ F₁ G₁ D₁ ⊢F₁ ⊢G₁ A≡A₁ [F]₁ [G]₁ G-ext₁))
(Π₌ F′ G′ D′ A≡B [F≡F′] [G≡G′])
(Πₜ₌ f g d d′ funcF funcG t≡u [t] [u] [t≡u]) =
let [A] = Πᵣ′ rF lF lG lF≤ lG≤ F G D ⊢F ⊢G A≡A [F] [G] G-ext
[B] = Πᵣ′ rF₁ lF₁ lG₁ lF₁≤ lG₁≤ F₁ G₁ D₁ ⊢F₁ ⊢G₁ A≡A₁ [F]₁ [G]₁ G-ext₁
[A≡B] = Π₌ F′ G′ D′ A≡B [F≡F′] [G≡G′]
ΠF₁G₁≡ΠF′G′ = whrDet* (red D₁ , Πₙ) (D′ , Πₙ)
ΠFG≡ΠF₁G₁ = PE.subst (λ x → Γ ⊢ Π F ^ rF ° lF ▹ G ° lG ° ll ≡ x ^ [ ! , ι ll ])
(PE.sym ΠF₁G₁≡ΠF′G′) (≅-eq A≡B)
in Πₜ₌ f g (convRed:*: d (sym ΠFG≡ΠF₁G₁)) (convRed:*: d′ (sym ΠFG≡ΠF₁G₁))
funcF funcG (≅-conv t≡u (sym ΠFG≡ΠF₁G₁))
(convTerm₂ [A] [B] [A≡B] [t]) (convTerm₂ [A] [B] [A≡B] [u])
(λ {ρ} [ρ] ⊢Δ [a] →
let F₁≡F′ , rF₁≡rF′ , lF₁≡lF′ , G₁≡G′ , lG₁≡lG′ , lΠ≡lΠ₁ = Π-PE-injectivity (whrDet* (red D₁ , Πₙ) (D′ , Πₙ))
[F≡F₁] = irrelevanceEqR′ (PE.cong (wk ρ) (PE.sym F₁≡F′))
([F] [ρ] ⊢Δ) ([F≡F′] [ρ] ⊢Δ)
[a]₁ = convTerm₁′ (PE.sym rF₁≡rF′) (PE.cong ι (PE.sym lF₁≡lF′)) ([F] [ρ] ⊢Δ) ([F]₁ [ρ] ⊢Δ) [F≡F₁] [a]
[G≡G₁] = irrelevanceEqR′ (PE.cong (λ x → wk (lift ρ) x [ _ ])
(PE.sym G₁≡G′))
([G] [ρ] ⊢Δ [a])
([G≡G′] [ρ] ⊢Δ [a])
in convEqTerm₂′ PE.refl (PE.cong ι (PE.sym lG₁≡lG′)) ([G] [ρ] ⊢Δ [a]) ([G]₁ [ρ] ⊢Δ [a]₁)
[G≡G₁] ([t≡u] [ρ] ⊢Δ [a]₁))
convEqTermT₂ {Γ = Γ} {r = [ % , ι ll ]} (Πᵥ (Πᵣ rF lF lG _ _ F G D ⊢F ⊢G A≡A [F] [G] G-ext)
(Πᵣ rF₁ lF₁ lG₁ _ _ F₁ G₁ D₁ ⊢F₁ ⊢G₁ A≡A₁ [F]₁ [G]₁ G-ext₁))
(Π₌ F′ G′ D′ A≡B [F≡F′] [G≡G′])
(d , d′) =
let ΠF₁G₁≡ΠF′G′ = whrDet* (red D₁ , Πₙ) (D′ , Πₙ)
ΠFG≡ΠF₁G₁ = PE.subst (λ x → Γ ⊢ Π F ^ rF ° lF ▹ G ° lG ° ll ≡ x ^ [ % , ι ll ])
(PE.sym ΠF₁G₁≡ΠF′G′) (≅-eq A≡B)
in (conv d (sym ΠFG≡ΠF₁G₁)) , (conv d′ (sym ΠFG≡ΠF₁G₁))
convEqTermT₂ {Γ = Γ} {r = [ % , ll ]} (∃ᵥ (∃ᵣ F G D ⊢F ⊢G A≡A [F] [G] G-ext)
(∃ᵣ F₁ G₁ D₁ ⊢F₁ ⊢G₁ A≡A₁ [F]₁ [G]₁ G-ext₁))
(∃₌ F′ G′ D′ A≡B [F≡F′] [G≡G′])
(d , d′) =
let ∃F₁G₁≡∃F′G′ = whrDet* (red D₁ , ∃ₙ) (D′ , ∃ₙ)
∃FG≡∃F₁G₁ = PE.subst (λ x → Γ ⊢ ∃ F ▹ G ≡ x ^ [ % , ll ])
(PE.sym ∃F₁G₁≡∃F′G′) (≅-eq A≡B)
in (conv d (sym ∃FG≡∃F₁G₁)) , (conv d′ (sym ∃FG≡∃F₁G₁))
convEqTermT₂ (Uᵥ (Uᵣ r l l< el d) (Uᵣ r' l' l<' PE.refl d')) A≡B X =
let U≡U = whrDet* (A≡B , Uₙ) (red d' , Uₙ)
r≡r , l≡l = Univ-PE-injectivity (PE.sym U≡U)
dd = PE.subst (λ x → _ ⊢ _ :⇒*: Univ x _ ^ _) (PE.sym r≡r) (PE.subst (λ x → _ ⊢ _ :⇒*: Univ _ x ^ [ ! , next x ]) (PE.sym l≡l) d)
in reduction-irrelevant-Univ= {l< = l<'} {el = PE.refl} {D = dd} {D' = d} r≡r (convEqTermTUniv X)
convEqTermT₂ (emb⁰¹ X) A≡B t≡u = convEqTermT₂ X A≡B t≡u
convEqTermT₂ (emb¹⁰ X) A≡B t≡u = convEqTermT₂ X A≡B t≡u
convEqTermT₂ (emb¹∞ X) A≡B t≡u = convEqTermT₂ X A≡B t≡u
convEqTermT₂ (emb∞¹ X) A≡B t≡u = convEqTermT₂ X A≡B t≡u
-- Conversion of term equality converting from left to right.
convEqTerm₁ : ∀ {l l′ Γ A B t u r} ([A] : Γ ⊩⟨ l ⟩ A ^ r) ([B] : Γ ⊩⟨ l′ ⟩ B ^ r)
→ Γ ⊩⟨ l ⟩ A ≡ B ^ r / [A]
→ Γ ⊩⟨ l ⟩ t ≡ u ∷ A ^ r / [A]
→ Γ ⊩⟨ l′ ⟩ t ≡ u ∷ B ^ r / [B]
convEqTerm₁ [A] [B] A≡B t≡u = convEqTermT₁ (goodCases [A] [B] A≡B) A≡B t≡u
-- Conversion of term equality converting from left to right. with PE
convEqTerm₁′ : ∀ {l l′ Γ A B t u r r' ll ll'} (eq : r PE.≡ r') (eql : ll PE.≡ ll')
([A] : Γ ⊩⟨ l ⟩ A ^ [ r , ll ]) ([B] : Γ ⊩⟨ l′ ⟩ B ^ [ r' , ll' ])
→ Γ ⊩⟨ l ⟩ A ≡ B ^ [ r , ll ] / [A]
→ Γ ⊩⟨ l ⟩ t ≡ u ∷ A ^ [ r , ll ] / [A]
→ Γ ⊩⟨ l′ ⟩ t ≡ u ∷ B ^ [ r' , ll' ] / [B]
convEqTerm₁′ PE.refl PE.refl [A] [B] A≡B t≡u = convEqTerm₁ [A] [B] A≡B t≡u
-- Conversion of term equality converting from right to left.
convEqTerm₂ : ∀ {l l′ Γ A B t u r ll} ([A] : Γ ⊩⟨ l ⟩ A ^ [ r , ll ]) ([B] : Γ ⊩⟨ l′ ⟩ B ^ [ r , ll ])
→ Γ ⊩⟨ l ⟩ A ≡ B ^ [ r , ll ] / [A]
→ Γ ⊩⟨ l′ ⟩ t ≡ u ∷ B ^ [ r , ll ] / [B]
→ Γ ⊩⟨ l ⟩ t ≡ u ∷ A ^ [ r , ll ] / [A]
convEqTerm₂ [A] [B] A≡B t≡u = convEqTermT₂ (goodCases [A] [B] A≡B) A≡B t≡u
-- Conversion of term equality converting from right to left with PE
convEqTerm₂′ : ∀ {l l′ Γ A B t u r r' ll ll'} (eq : r PE.≡ r') (eql : ll PE.≡ ll')
([A] : Γ ⊩⟨ l ⟩ A ^ [ r , ll ]) ([B] : Γ ⊩⟨ l′ ⟩ B ^ [ r' , ll' ])
→ Γ ⊩⟨ l ⟩ A ≡ B ^ [ r , ll ] / [A]
→ Γ ⊩⟨ l′ ⟩ t ≡ u ∷ B ^ [ r' , ll' ] / [B]
→ Γ ⊩⟨ l ⟩ t ≡ u ∷ A ^ [ r , ll ] / [A]
convEqTerm₂′ PE.refl PE.refl [A] [B] A≡B t≡u = convEqTerm₂ [A] [B] A≡B t≡u
|
src/gen/gstreamer-gst_low_level-gstreamer_0_10_gst_gstbus_h.ads | persan/A-gst | 1 | 779 | <filename>src/gen/gstreamer-gst_low_level-gstreamer_0_10_gst_gstbus_h.ads
pragma Ada_2005;
pragma Style_Checks (Off);
pragma Warnings (Off);
with Interfaces.C; use Interfaces.C;
with glib;
with glib.Values;
with System;
with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstmessage_h;
with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstobject_h;
-- limited with GStreamer.GST_Low_Level.glib_2_0_glib_gqueue_h;
-- limited -- with GStreamer.GST_Low_Level.glib_2_0_glib_gthread_h;
with System;
with glib;
with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstclock_h;
-- limited with GStreamer.GST_Low_Level.glib_2_0_glib_gmain_h;
package GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbus_h is
-- unsupported macro: GST_TYPE_BUS (gst_bus_get_type ())
-- arg-macro: function GST_BUS (bus)
-- return G_TYPE_CHECK_INSTANCE_CAST ((bus), GST_TYPE_BUS, GstBus);
-- arg-macro: function GST_IS_BUS (bus)
-- return G_TYPE_CHECK_INSTANCE_TYPE ((bus), GST_TYPE_BUS);
-- arg-macro: function GST_BUS_CLASS (bclass)
-- return G_TYPE_CHECK_CLASS_CAST ((bclass), GST_TYPE_BUS, GstBusClass);
-- arg-macro: function GST_IS_BUS_CLASS (bclass)
-- return G_TYPE_CHECK_CLASS_TYPE ((bclass), GST_TYPE_BUS);
-- arg-macro: function GST_BUS_GET_CLASS (bus)
-- return G_TYPE_INSTANCE_GET_CLASS ((bus), GST_TYPE_BUS, GstBusClass);
-- arg-macro: function GST_BUS_CAST (bus)
-- return (GstBus*)(bus);
-- GStreamer
-- * Copyright (C) 2004 <NAME> <<EMAIL>>
-- *
-- * gstbus.h: Header for GstBus subsystem
-- *
-- * 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.
--
type GstBus;
type u_GstBus_u_gst_reserved_array is array (0 .. 2) of System.Address;
--subtype GstBus is u_GstBus; -- gst/gstbus.h:25
-- skipped empty struct u_GstBusPrivate
-- skipped empty struct GstBusPrivate
type GstBusClass;
type u_GstBusClass_u_gst_reserved_array is array (0 .. 3) of System.Address;
--subtype GstBusClass is u_GstBusClass; -- gst/gstbus.h:27
-- --- standard type macros ---
--*
-- * GstBusFlags:
-- * @GST_BUS_FLUSHING: The bus is currently dropping all messages
-- * @GST_BUS_FLAG_LAST: offset to define more flags
-- *
-- * The standard flags that a bus may have.
--
-- padding
subtype GstBusFlags is unsigned;
GST_BUS_FLUSHING : constant GstBusFlags := 16;
GST_BUS_FLAG_LAST : constant GstBusFlags := 32; -- gst/gstbus.h:54
--*
-- * GstBusSyncReply:
-- * @GST_BUS_DROP: drop the message
-- * @GST_BUS_PASS: pass the message to the async queue
-- * @GST_BUS_ASYNC: pass message to async queue, continue if message is handled
-- *
-- * The result values for a GstBusSyncHandler.
--
type GstBusSyncReply is
(GST_BUS_DROP,
GST_BUS_PASS,
GST_BUS_ASYNC);
pragma Convention (C, GstBusSyncReply); -- gst/gstbus.h:69
--*
-- * GstBusSyncHandler:
-- * @bus: the #GstBus that sent the message
-- * @message: the #GstMessage
-- * @data: user data that has been given, when registering the handler
-- *
-- * Handler will be invoked synchronously, when a new message has been injected
-- * into the bus. This function is mostly used internally. Only one sync handler
-- * can be attached to a given bus.
-- *
-- * If the handler returns GST_BUS_DROP, it should unref the message, else the
-- * message should not be unreffed by the sync handler.
-- *
-- * Returns: #GstBusSyncReply stating what to do with the message
--
type GstBusSyncHandler is access function
(arg1 : access GstBus;
arg2 : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstmessage_h.GstMessage;
arg3 : System.Address) return GstBusSyncReply;
pragma Convention (C, GstBusSyncHandler); -- gst/gstbus.h:86
--*
-- * GstBusFunc:
-- * @bus: the #GstBus that sent the message
-- * @message: the #GstMessage
-- * @data: user data that has been given, when registering the handler
-- *
-- * Specifies the type of function passed to gst_bus_add_watch() or
-- * gst_bus_add_watch_full(), which is called from the mainloop when a message
-- * is available on the bus.
-- *
-- * The message passed to the function will be unreffed after execution of this
-- * function so it should not be freed in the function.
-- *
-- * Note that this function is used as a GSourceFunc which means that returning
-- * FALSE will remove the GSource from the mainloop.
-- *
-- * Returns: %FALSE if the event source should be removed.
--
type GstBusFunc is access function
(arg1 : access GstBus;
arg2 : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstmessage_h.GstMessage;
arg3 : System.Address) return GLIB.gboolean;
pragma Convention (C, GstBusFunc); -- gst/gstbus.h:106
--*
-- * GstBus:
-- *
-- * The opaque #GstBus data structure.
--
type GstBus is record
object : aliased GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstobject_h.GstObject; -- gst/gstbus.h:115
queue : access GStreamer.GST_Low_Level.glib_2_0_glib_gqueue_h.GQueue; -- gst/gstbus.h:118
queue_lock : access GStreamer.GST_Low_Level.glib_2_0_glib_gthread_h.GMutex; -- gst/gstbus.h:119
sync_handler : GstBusSyncHandler; -- gst/gstbus.h:121
sync_handler_data : System.Address; -- gst/gstbus.h:122
signal_watch_id : aliased GLIB.guint; -- gst/gstbus.h:124
num_signal_watchers : aliased GLIB.guint; -- gst/gstbus.h:125
priv : System.Address; -- gst/gstbus.h:128
u_gst_reserved : u_GstBus_u_gst_reserved_array; -- gst/gstbus.h:129
end record;
pragma Convention (C_Pass_By_Copy, GstBus); -- gst/gstbus.h:113
--< private >
--< private >
type GstBusClass is record
parent_class : aliased GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstobject_h.GstObjectClass; -- gst/gstbus.h:134
message : access procedure (arg1 : access GstBus; arg2 : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstmessage_h.GstMessage); -- gst/gstbus.h:137
sync_message : access procedure (arg1 : access GstBus; arg2 : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstmessage_h.GstMessage); -- gst/gstbus.h:138
u_gst_reserved : u_GstBusClass_u_gst_reserved_array; -- gst/gstbus.h:141
end record;
pragma Convention (C_Pass_By_Copy, GstBusClass); -- gst/gstbus.h:132
-- signals
--< private >
function gst_bus_get_type return GLIB.GType; -- gst/gstbus.h:144
pragma Import (C, gst_bus_get_type, "gst_bus_get_type");
function gst_bus_new return access GstBus; -- gst/gstbus.h:146
pragma Import (C, gst_bus_new, "gst_bus_new");
function gst_bus_post (bus : access GstBus; message : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstmessage_h.GstMessage) return GLIB.gboolean; -- gst/gstbus.h:148
pragma Import (C, gst_bus_post, "gst_bus_post");
function gst_bus_have_pending (bus : access GstBus) return GLIB.gboolean; -- gst/gstbus.h:150
pragma Import (C, gst_bus_have_pending, "gst_bus_have_pending");
function gst_bus_peek (bus : access GstBus) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstmessage_h.GstMessage; -- gst/gstbus.h:151
pragma Import (C, gst_bus_peek, "gst_bus_peek");
function gst_bus_pop (bus : access GstBus) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstmessage_h.GstMessage; -- gst/gstbus.h:152
pragma Import (C, gst_bus_pop, "gst_bus_pop");
function gst_bus_pop_filtered (bus : access GstBus; types : GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstmessage_h.GstMessageType) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstmessage_h.GstMessage; -- gst/gstbus.h:153
pragma Import (C, gst_bus_pop_filtered, "gst_bus_pop_filtered");
function gst_bus_timed_pop (bus : access GstBus; timeout : GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstclock_h.GstClockTime) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstmessage_h.GstMessage; -- gst/gstbus.h:154
pragma Import (C, gst_bus_timed_pop, "gst_bus_timed_pop");
function gst_bus_timed_pop_filtered
(bus : access GstBus;
timeout : GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstclock_h.GstClockTime;
types : GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstmessage_h.GstMessageType) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstmessage_h.GstMessage; -- gst/gstbus.h:155
pragma Import (C, gst_bus_timed_pop_filtered, "gst_bus_timed_pop_filtered");
procedure gst_bus_set_flushing (bus : access GstBus; flushing : GLIB.gboolean); -- gst/gstbus.h:156
pragma Import (C, gst_bus_set_flushing, "gst_bus_set_flushing");
-- synchronous dispatching
procedure gst_bus_set_sync_handler
(bus : access GstBus;
func : GstBusSyncHandler;
data : System.Address); -- gst/gstbus.h:159
pragma Import (C, gst_bus_set_sync_handler, "gst_bus_set_sync_handler");
-- GSource based dispatching
function gst_bus_create_watch (bus : access GstBus) return access GStreamer.GST_Low_Level.glib_2_0_glib_gmain_h.GSource; -- gst/gstbus.h:162
pragma Import (C, gst_bus_create_watch, "gst_bus_create_watch");
function gst_bus_add_watch_full
(bus : access GstBus;
priority : GLIB.gint;
func : GstBusFunc;
user_data : System.Address;
notify : GStreamer.GST_Low_Level.glib_2_0_glib_gtypes_h.GDestroyNotify) return GLIB.guint; -- gst/gstbus.h:163
pragma Import (C, gst_bus_add_watch_full, "gst_bus_add_watch_full");
function gst_bus_add_watch
(bus : access GstBus;
func : GstBusFunc;
user_data : System.Address) return GLIB.guint; -- gst/gstbus.h:168
pragma Import (C, gst_bus_add_watch, "gst_bus_add_watch");
-- polling the bus
function gst_bus_poll
(bus : access GstBus;
events : GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstmessage_h.GstMessageType;
timeout : GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstclock_h.GstClockTimeDiff) return access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstmessage_h.GstMessage; -- gst/gstbus.h:173
pragma Import (C, gst_bus_poll, "gst_bus_poll");
-- signal based dispatching helper functions.
function gst_bus_async_signal_func
(bus : access GstBus;
message : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstmessage_h.GstMessage;
data : System.Address) return GLIB.gboolean; -- gst/gstbus.h:177
pragma Import (C, gst_bus_async_signal_func, "gst_bus_async_signal_func");
function gst_bus_sync_signal_handler
(bus : access GstBus;
message : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstmessage_h.GstMessage;
data : System.Address) return GstBusSyncReply; -- gst/gstbus.h:179
pragma Import (C, gst_bus_sync_signal_handler, "gst_bus_sync_signal_handler");
-- convenience api to add/remove a gsource that emits the async signals
procedure gst_bus_add_signal_watch (bus : access GstBus); -- gst/gstbus.h:183
pragma Import (C, gst_bus_add_signal_watch, "gst_bus_add_signal_watch");
procedure gst_bus_add_signal_watch_full (bus : access GstBus; priority : GLIB.gint); -- gst/gstbus.h:184
pragma Import (C, gst_bus_add_signal_watch_full, "gst_bus_add_signal_watch_full");
procedure gst_bus_remove_signal_watch (bus : access GstBus); -- gst/gstbus.h:185
pragma Import (C, gst_bus_remove_signal_watch, "gst_bus_remove_signal_watch");
procedure gst_bus_enable_sync_message_emission (bus : access GstBus); -- gst/gstbus.h:187
pragma Import (C, gst_bus_enable_sync_message_emission, "gst_bus_enable_sync_message_emission");
procedure gst_bus_disable_sync_message_emission (bus : access GstBus); -- gst/gstbus.h:188
pragma Import (C, gst_bus_disable_sync_message_emission, "gst_bus_disable_sync_message_emission");
end GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbus_h;
|
source/amf/uml/amf-internals-uml_operation_template_parameters.adb | svn2github/matreshka | 24 | 27873 | <gh_stars>10-100
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, <NAME> <<EMAIL>> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with AMF.Elements;
with AMF.Internals.Element_Collections;
with AMF.Internals.Helpers;
with AMF.Internals.Tables.UML_Attributes;
with AMF.Visitors.UML_Iterators;
with AMF.Visitors.UML_Visitors;
package body AMF.Internals.UML_Operation_Template_Parameters is
-------------------
-- Enter_Element --
-------------------
overriding procedure Enter_Element
(Self : not null access constant UML_Operation_Template_Parameter_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Visitor in AMF.Visitors.UML_Visitors.UML_Visitor'Class then
AMF.Visitors.UML_Visitors.UML_Visitor'Class
(Visitor).Enter_Operation_Template_Parameter
(AMF.UML.Operation_Template_Parameters.UML_Operation_Template_Parameter_Access (Self),
Control);
end if;
end Enter_Element;
-------------------
-- Leave_Element --
-------------------
overriding procedure Leave_Element
(Self : not null access constant UML_Operation_Template_Parameter_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Visitor in AMF.Visitors.UML_Visitors.UML_Visitor'Class then
AMF.Visitors.UML_Visitors.UML_Visitor'Class
(Visitor).Leave_Operation_Template_Parameter
(AMF.UML.Operation_Template_Parameters.UML_Operation_Template_Parameter_Access (Self),
Control);
end if;
end Leave_Element;
-------------------
-- Visit_Element --
-------------------
overriding procedure Visit_Element
(Self : not null access constant UML_Operation_Template_Parameter_Proxy;
Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Iterator in AMF.Visitors.UML_Iterators.UML_Iterator'Class then
AMF.Visitors.UML_Iterators.UML_Iterator'Class
(Iterator).Visit_Operation_Template_Parameter
(Visitor,
AMF.UML.Operation_Template_Parameters.UML_Operation_Template_Parameter_Access (Self),
Control);
end if;
end Visit_Element;
-----------------------------
-- Get_Parametered_Element --
-----------------------------
overriding function Get_Parametered_Element
(Self : not null access constant UML_Operation_Template_Parameter_Proxy)
return AMF.UML.Operations.UML_Operation_Access is
begin
return
AMF.UML.Operations.UML_Operation_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Parametered_Element
(Self.Element)));
end Get_Parametered_Element;
-----------------------------
-- Set_Parametered_Element --
-----------------------------
overriding procedure Set_Parametered_Element
(Self : not null access UML_Operation_Template_Parameter_Proxy;
To : AMF.UML.Operations.UML_Operation_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Parametered_Element
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Parametered_Element;
-----------------
-- Get_Default --
-----------------
overriding function Get_Default
(Self : not null access constant UML_Operation_Template_Parameter_Proxy)
return AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access is
begin
return
AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Default
(Self.Element)));
end Get_Default;
-----------------
-- Set_Default --
-----------------
overriding procedure Set_Default
(Self : not null access UML_Operation_Template_Parameter_Proxy;
To : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Default
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Default;
-----------------------
-- Get_Owned_Default --
-----------------------
overriding function Get_Owned_Default
(Self : not null access constant UML_Operation_Template_Parameter_Proxy)
return AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access is
begin
return
AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Default
(Self.Element)));
end Get_Owned_Default;
-----------------------
-- Set_Owned_Default --
-----------------------
overriding procedure Set_Owned_Default
(Self : not null access UML_Operation_Template_Parameter_Proxy;
To : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Owned_Default
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Owned_Default;
-----------------------------------
-- Get_Owned_Parametered_Element --
-----------------------------------
overriding function Get_Owned_Parametered_Element
(Self : not null access constant UML_Operation_Template_Parameter_Proxy)
return AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access is
begin
return
AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Parametered_Element
(Self.Element)));
end Get_Owned_Parametered_Element;
-----------------------------------
-- Set_Owned_Parametered_Element --
-----------------------------------
overriding procedure Set_Owned_Parametered_Element
(Self : not null access UML_Operation_Template_Parameter_Proxy;
To : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Owned_Parametered_Element
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Owned_Parametered_Element;
-----------------------------
-- Get_Parametered_Element --
-----------------------------
overriding function Get_Parametered_Element
(Self : not null access constant UML_Operation_Template_Parameter_Proxy)
return AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access is
begin
return
AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Parametered_Element
(Self.Element)));
end Get_Parametered_Element;
-----------------------------
-- Set_Parametered_Element --
-----------------------------
overriding procedure Set_Parametered_Element
(Self : not null access UML_Operation_Template_Parameter_Proxy;
To : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Parametered_Element
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Parametered_Element;
-------------------
-- Get_Signature --
-------------------
overriding function Get_Signature
(Self : not null access constant UML_Operation_Template_Parameter_Proxy)
return AMF.UML.Template_Signatures.UML_Template_Signature_Access is
begin
return
AMF.UML.Template_Signatures.UML_Template_Signature_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Signature
(Self.Element)));
end Get_Signature;
-------------------
-- Set_Signature --
-------------------
overriding procedure Set_Signature
(Self : not null access UML_Operation_Template_Parameter_Proxy;
To : AMF.UML.Template_Signatures.UML_Template_Signature_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Signature
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Signature;
end AMF.Internals.UML_Operation_Template_Parameters;
|
home/fade.asm | Dev727/ancientplatinum | 28 | 177353 | ; Functions to fade the screen in and out.
RotateFourPalettesRight::
ldh a, [hCGB]
and a
jr z, .dmg
ld hl, IncGradGBPalTable_00
ld b, 4
jr RotatePalettesRight
.dmg
ld hl, IncGradGBPalTable_08
ld b, 4
jr RotatePalettesRight
RotateThreePalettesRight::
ldh a, [hCGB]
and a
jr z, .dmg
ld hl, IncGradGBPalTable_05
ld b, 3
jr RotatePalettesRight
.dmg
ld hl, IncGradGBPalTable_13
ld b, 3
RotatePalettesRight::
; Rotate palettes to the right and fill with loaded colors from the left
; If we're already at the leftmost color, fill with the leftmost color
push de
ld a, [hli]
call DmgToCgbBGPals
ld a, [hli]
ld e, a
ld a, [hli]
ld d, a
call DmgToCgbObjPals
ld c, 8
call DelayFrames
pop de
dec b
jr nz, RotatePalettesRight
ret
RotateFourPalettesLeft::
ldh a, [hCGB]
and a
jr z, .dmg
ld hl, IncGradGBPalTable_04 - 1
ld b, 4
jr RotatePalettesLeft
.dmg
ld hl, IncGradGBPalTable_12 - 1
ld b, 4
jr RotatePalettesLeft
RotateThreePalettesLeft::
ldh a, [hCGB]
and a
jr z, .dmg
ld hl, IncGradGBPalTable_07 - 1
ld b, 3
jr RotatePalettesLeft
.dmg
ld hl, IncGradGBPalTable_15 - 1
ld b, 3
RotatePalettesLeft::
; Rotate palettes to the left and fill with loaded colors from the right
; If we're already at the rightmost color, fill with the rightmost color
push de
ld a, [hld]
ld d, a
ld a, [hld]
ld e, a
call DmgToCgbObjPals
ld a, [hld]
call DmgToCgbBGPals
ld c, 8
call DelayFrames
pop de
dec b
jr nz, RotatePalettesLeft
ret
IncGradGBPalTable_00:: dc 3,3,3,3, 3,3,3,3, 3,3,3,3
IncGradGBPalTable_01:: dc 3,3,3,2, 3,3,3,2, 3,3,3,2
IncGradGBPalTable_02:: dc 3,3,2,1, 3,3,2,1, 3,3,2,1
IncGradGBPalTable_03:: dc 3,2,1,0, 3,2,1,0, 3,2,1,0
IncGradGBPalTable_04:: dc 3,2,1,0, 3,2,1,0, 3,2,1,0
IncGradGBPalTable_05:: dc 2,1,0,0, 2,1,0,0, 2,1,0,0
IncGradGBPalTable_06:: dc 1,0,0,0, 1,0,0,0, 1,0,0,0
IncGradGBPalTable_07:: dc 0,0,0,0, 0,0,0,0, 0,0,0,0
; bgp obp1 obp2
IncGradGBPalTable_08:: dc 3,3,3,3, 3,3,3,3, 3,3,3,3
IncGradGBPalTable_09:: dc 3,3,3,2, 3,3,3,2, 3,3,2,0
IncGradGBPalTable_10:: dc 3,3,2,1, 3,2,1,0, 3,2,1,0
IncGradGBPalTable_11:: dc 3,2,1,0, 3,1,0,0, 3,2,0,0
IncGradGBPalTable_12:: dc 3,2,1,0, 3,1,0,0, 3,2,0,0
IncGradGBPalTable_13:: dc 2,1,0,0, 2,0,0,0, 2,1,0,0
IncGradGBPalTable_14:: dc 1,0,0,0, 1,0,0,0, 1,0,0,0
IncGradGBPalTable_15:: dc 0,0,0,0, 0,0,0,0, 0,0,0,0
|
Transynther/x86/_processed/P/_zr_un_/i3-7100_9_0x84_notsx.log_576_724.asm | ljhsiun2/medusa | 9 | 86361 | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r13
push %r9
push %rbp
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WC_ht+0x727f, %rcx
nop
nop
nop
nop
add %r13, %r13
mov (%rcx), %rbp
nop
nop
nop
nop
nop
dec %r9
lea addresses_A_ht+0x1d5ed, %rdx
nop
nop
nop
cmp %rbx, %rbx
mov $0x6162636465666768, %r12
movq %r12, %xmm6
vmovups %ymm6, (%rdx)
nop
and %rcx, %rcx
lea addresses_WC_ht+0x124ff, %rsi
lea addresses_normal_ht+0x13aff, %rdi
nop
nop
nop
nop
nop
cmp %rdx, %rdx
mov $18, %rcx
rep movsb
nop
nop
nop
and $919, %r13
lea addresses_WT_ht+0x141ef, %rsi
lea addresses_A_ht+0x3aff, %rdi
inc %rbp
mov $32, %rcx
rep movsb
nop
dec %r12
lea addresses_D_ht+0x56ff, %r12
nop
nop
nop
nop
sub %rdx, %rdx
movw $0x6162, (%r12)
nop
nop
nop
nop
nop
inc %rbx
lea addresses_UC_ht+0x6ff, %rdx
nop
nop
nop
nop
nop
cmp $40228, %rdi
mov $0x6162636465666768, %rbx
movq %rbx, (%rdx)
nop
nop
nop
dec %rbp
lea addresses_WT_ht+0xbdff, %rsi
lea addresses_normal_ht+0x19d0f, %rdi
nop
nop
nop
cmp %rbp, %rbp
mov $65, %rcx
rep movsw
nop
nop
xor $34511, %r13
lea addresses_UC_ht+0xa2ff, %r13
nop
nop
inc %rcx
movups (%r13), %xmm1
vpextrq $0, %xmm1, %rdx
xor $35994, %rbp
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r9
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r8
push %rcx
push %rdx
push %rsi
// Load
lea addresses_PSE+0x1ee3f, %r11
nop
nop
nop
nop
nop
and %r8, %r8
mov (%r11), %r12d
nop
nop
nop
cmp %r12, %r12
// Faulty Load
mov $0xaff, %r10
nop
nop
nop
add $2447, %rdx
mov (%r10), %r8
lea oracles, %rsi
and $0xff, %r8
shlq $12, %r8
mov (%rsi,%r8,1), %r8
pop %rsi
pop %rdx
pop %rcx
pop %r8
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_P', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_PSE', 'same': False, 'size': 4, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_P', 'same': True, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WC_ht', 'same': True, 'size': 8, 'congruent': 7, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 32, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 11, 'same': True}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 2, 'congruent': 8, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 8, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': True}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 16, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'00': 573, 'e8': 3}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
Appl/coop/FreeCell/freecell.asm | steakknife/pcgeos | 504 | 82016 | COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1993 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE: freecell.asm
AUTHOR: <NAME>, July 8, 1993
ROUTINES:
Name Description
---- -----------
FreeCellProcessOpenApplication Initial handler that gets everything
ready for a session of FreeCell.
Also begins a new game.
FreeCellProcessCloseApplication Performs necessary cleaning up
procedures when the application
is exited.
REVISION HISTORY:
Name Date Description
---- ---- -----------
MH 7/8/93 Initial verison
DESCRIPTION:
Implementation of the FreeCell class
$Id: freecell.asm,v 1.1 97/04/04 15:02:44 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CommonCode segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FreeCellProcessOpenApplication
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: This is the initial handler that gets everything
ready for a session of FreeCell.
CALLED BY: MSG_GEN_PROCESS_OPEN_APPLICATION
PASS: *ds:si = FreeCellProcessClass object
es = segment of FreeCellProcessClass
ax = message #
RETURN: nothing
DESTROYED: nothing
SIDE EFFECTS: nothing
PSEUDO CODE/STRATEGY:
- Dispatch this message to superclass.
- Dispatch SETUP_STUFF message to the FreeCell object.
- Dispatch NEW_GAME message to the FreeCell object.
REVISION HISTORY:
Name Date Description
---- ---- -----------
MH 7/ 8/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
FreeCellProcessOpenApplication method dynamic FreeCellProcessClass,
MSG_GEN_PROCESS_OPEN_APPLICATION
uses ax
.enter
;
; Allow our superclass to handle this message also.
;
mov di, offset es:FreeCellProcessClass
call ObjCallSuperNoLock
;
; Send SETUP_GAME_SETUP_STUFF message to FreeCell object
;
GetResourceHandleNS MyPlayingTable, bx
mov si, offset MyPlayingTable
mov di, mask MF_CALL or mask MF_FIXUP_DS
mov ax, MSG_GAME_SETUP_STUFF
call ObjMessage
;
; Send NEW_GAME message to FreeCell object.
;
mov di, mask MF_CALL or mask MF_FIXUP_DS
mov ax, MSG_FREECELL_NEW_GAME
call ObjMessage
.leave
ret
FreeCellProcessOpenApplication endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FreeCellProcessCloseApplication
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Performs necessary cleaning up procedures when the
application is exited.
CALLED BY: MSG_GEN_PROCESS_CLOSE_APPLICATION
PASS: *ds:si = FreeCellProcessClass object
es = segment of FreeCellProcessClass
ax = message #
RETURN: cx - handle of block to save (returned by call to
superclass).
DESTROYED: nothing
SIDE EFFECTS: nothing
PSEUDO CODE/STRATEGY:
- Send SHUTDOWN message to the FreeCell object.
- Dispatch this message to superclass.
REVISION HISTORY:
Name Date Description
---- ---- -----------
MH 7/ 9/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
FreeCellProcessCloseApplication method dynamic FreeCellProcessClass,
MSG_GEN_PROCESS_CLOSE_APPLICATION
uses ax, dx, bp
.enter
;
; Send SHUTDOWN message to FreeCell object.
;
GetResourceHandleNS MyPlayingTable, bx
mov si, offset MyPlayingTable
mov di, mask MF_CALL or mask MF_FIXUP_DS
mov ax, MSG_GAME_SHUTDOWN
call ObjMessage
;
; Allow our superclass to handle this message also.
;
mov di, offset es:FreeCellProcessClass
mov ax, MSG_GEN_PROCESS_CLOSE_APPLICATION
call ObjCallSuperNoLock
.leave
ret
FreeCellProcessCloseApplication endm
CommonCode ends
|
Bootloader programming/hello.asm | suriya-1403/Assemble-language | 0 | 85153 | [BITS 16]
[ORG 0x7C00]
MOVE SI, helloString
CALL PrintString
JMP $
Printcharacter:
MOV AH,0x0E
MOV BH,0x00
MOV BL,0x07
INT 0x10
RET
PrintString:
next_character:
MOV AL,[SI]
INC SI
OR AL,AL
JZ exit_function
CALL Printcharacter
JMP next_character
exit_function:
RET
helloString: db 'Hello World!',0
TIMES 510 - ($-$$) DB 0
DW 0xAA55 |
programs/oeis/135/A135449.asm | karttu/loda | 0 | 13889 | ; A135449: Period 5: repeat 1, 9, -7, 3, 5.
; 1,9,-7,3,5,1,9,-7,3,5,1,9,-7,3,5,1,9,-7,3,5,1,9,-7,3,5,1,9,-7,3,5,1,9,-7,3,5,1,9,-7,3,5,1,9,-7,3,5,1,9,-7,3,5,1,9,-7,3,5,1,9,-7,3,5,1,9,-7,3,5,1,9,-7,3,5,1,9,-7,3,5,1,9,-7,3,5,1,9,-7,3,5,1,9,-7,3,5,1,9,-7,3,5,1
add $0,1
mov $1,16
mov $2,3
mov $3,4
lpb $0,1
sub $0,1
div $3,2
sub $2,$3
mov $3,$2
trn $2,$1
mul $3,2
sub $3,$2
mov $1,$3
mul $1,2
mov $2,8
mul $3,2
add $3,7
lpe
sub $1,4
div $1,2
mul $1,2
add $1,1
|
FormalAnalyzer/models/apps/PowerIsOut.als | Mohannadcse/IoTCOM_BehavioralRuleExtractor | 0 | 2646 | module app_PowerIsOut
open IoTBottomUp as base
open cap_runIn
open cap_now
open cap_motionSensor
open cap_userInput
one sig app_PowerIsOut extends IoTApp {
motion1 : one cap_motionSensor,
phone1 : one cap_userInput,
} {
rules = r
//capabilities = motion1 + phone1
}
abstract sig cap_userInput_attr_phone1_val extends cap_userInput_attr_value_val {}
one sig cap_userInput_attr_phone1_val0 extends cap_userInput_attr_phone1_val {}
abstract sig r extends Rule {}
|
Appl/GeoCalc/Document/documentHead.asm | steakknife/pcgeos | 504 | 167902 | COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC/GEOS
MODULE: documentHead.asm<2>
FILE: documentHead.asm<2>
AUTHOR: <NAME>, <NAME>, 1992
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
Gene 6/ 4/92 Initial revision
DESCRIPTION:
GeoCalc sub-class of GrObjHeadClass
$Id: documentHead.asm,v 1.1 97/04/04 15:48:05 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeoCalcClassStructures segment resource
CHART< GeoCalcGrObjHeadClass >
GeoCalcClassStructures ends
UICode segment resource
if _CHARTS
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeoCalcGrObjHeadSetCurrentTool
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Subclass to set the current tool (and handle the ssheet)
CALLED BY: MSG_GH_SET_CURRENT_TOOL
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of GeoCalcGrObjHeadClass
ax - the message
cx:dx - fptr to Class of tool
bp - MSG_GO_GROBJ_SPECIFIC_INITIALIZE data
RETURN:
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 6/ 4/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeoCalcGrObjHeadSetCurrentTool method dynamic GeoCalcGrObjHeadClass, \
MSG_GH_SET_CURRENT_TOOL,
MSG_GH_SET_CURRENT_TOOL_WITH_DATA_BLOCK
push cx, dx
;
; Let the superclass do its thing
;
mov di, offset GeoCalcGrObjHeadClass
call ObjCallSuperNoLock
pop ax, dx
;PrintMessage <Nuke this if we ever get a real pen solution>
; The above PrintMessage commented out cause as of 6/10/93 we had a real
; pen solution for GeoCalc and this code was included in it.
; - Huan
;
; Set the display group focusable if the current tool is the GrObjText
; tool. This is to ensure that in pen mode, the display group does
; not grab the focus away from the edit bar.
clr cx
cmp ax, segment GrObjTextClass
jne 10$
cmp dx, offset GrObjTextClass
jne 10$
mov cx, TRUE
10$:
mov ax, MSG_GEOCALC_DISPLAY_GROUP_SET_FOCUSABLE
GetResourceHandleNS GCDisplayGroup, bx
mov si, offset GCDisplayGroup
mov di, mask MF_FIXUP_DS
call ObjMessage
;
; Notify all documents of the new tool
;
mov ax, MSG_GEOCALC_DOCUMENT_SET_TARGET_BASED_ON_TOOL
mov si, offset GCDocumentGroup ;in the same block!
call GenSendToChildren
ret
GeoCalcGrObjHeadSetCurrentTool endm
endif
UICode ends
|
oeis/092/A092476.asm | neoneye/loda-programs | 11 | 14632 | ; A092476: Numbers that are congruent to {1, 3, 9} mod 13.
; Submitted by <NAME>
; 1,3,9,14,16,22,27,29,35,40,42,48,53,55,61,66,68,74,79,81,87,92,94,100,105,107,113,118,120,126,131,133,139,144,146,152,157,159,165,170,172,178,183,185,191,196,198,204,209,211,217,222,224,230,235,237,243,248,250,256,261,263,269,274,276,282,287,289,295,300,302,308,313,315,321,326,328,334,339,341,347,352,354,360,365,367,373,378,380,386,391,393,399,404,406,412,417,419,425,430
mov $2,$0
mul $2,10
add $2,3
lpb $2
add $0,2
div $2,3
add $0,$2
mod $2,2
lpe
sub $0,4
|
prototyping/Luau/Value.agda | Tr4shh/Roblox-Luau | 0 | 10945 | module Luau.Value where
open import Agda.Builtin.Float using (Float)
open import Luau.Addr using (Addr)
open import Luau.Syntax using (Block; Expr; nil; addr; number)
open import Luau.Var using (Var)
data Value : Set where
nil : Value
addr : Addr → Value
number : Float → Value
val : ∀ {a} → Value → Expr a
val nil = nil
val (addr a) = addr a
val (number x) = number x
|
Structure/Categorical/Properties.agda | Lolirofle/stuff-in-agda | 6 | 4541 | module Structure.Categorical.Properties where
import Functional.Dependent as Fn
open import Lang.Instance
import Lvl
open import Logic
open import Logic.Predicate
open import Logic.Propositional
open import Structure.Setoid
import Structure.Categorical.Names as Names
import Structure.Operator.Names as Names
import Structure.Relator.Names as Names
open import Structure.Relator.Properties
open import Syntax.Function
open import Type
open import Type.Properties.Singleton
private variable ℓₒ ℓₘ ℓₑ : Lvl.Level
private variable Obj : Type{ℓₒ}
module Object where
module _ (Morphism : Obj → Obj → Type{ℓₘ}) where
open Names.ArrowNotation(Morphism)
module _ ⦃ morphism-equiv : ∀{x y} → Equiv{ℓₑ}(x ⟶ y) ⦄ where
-- An initial object is an object in which there is an unique morphism from it to every object.
Initial : Obj → Stmt
Initial(x) = (∀{y} → IsUnit(x ⟶ y))
-- An terminal object is an object in which there is an unique morphism to it from every object.
Terminal : Obj → Stmt
Terminal(y) = (∀{x} → IsUnit(x ⟶ y))
module Morphism where
module _ {Morphism : Obj → Obj → Type{ℓₘ}} ⦃ equiv-morphism : ∀{x y} → Equiv{ℓₑ}(Morphism x y) ⦄ where
open Names.ArrowNotation(Morphism)
module OperModule (_▫_ : Names.SwappedTransitivity(_⟶_)) where
record Associativity : Stmt{Lvl.of(Obj) Lvl.⊔ ℓₘ Lvl.⊔ ℓₑ} where
constructor intro
field proof : Names.Morphism.Associativity{Morphism = Morphism}(_▫_)
associativity = inst-fn Associativity.proof
module _ {x : Obj} (f : x ⟶ x) where
record Idempotent : Stmt{Lvl.of(Obj) Lvl.⊔ ℓₘ Lvl.⊔ ℓₑ} where
constructor intro
field proof : Names.Morphism.Idempotent{Morphism = Morphism}(_▫_)(f)
idempotent = inst-fn Idempotent.proof
module IdModule (id : Names.Reflexivity(_⟶_)) where
record Identityₗ : Stmt{Lvl.of(Obj) Lvl.⊔ ℓₘ Lvl.⊔ ℓₑ} where
constructor intro
field proof : Names.Morphism.Identityₗ(_▫_)(\{a} → id{a})
identityₗ = inst-fn Identityₗ.proof
record Identityᵣ : Stmt{Lvl.of(Obj) Lvl.⊔ ℓₘ Lvl.⊔ ℓₑ} where
constructor intro
field proof : Names.Morphism.Identityᵣ(_▫_)(\{a} → id{a})
identityᵣ = inst-fn Identityᵣ.proof
Identity = Identityₗ ∧ Identityᵣ
identity-left = inst-fn{X = Identity}(Identityₗ.proof Fn.∘ [∧]-elimₗ{Q = Identityᵣ})
identity-right = inst-fn{X = Identity}(Identityᵣ.proof Fn.∘ [∧]-elimᵣ{P = Identityₗ})
module _ {x : Obj} (f : x ⟶ x) where
record Involution : Stmt{Lvl.of(Obj) Lvl.⊔ ℓₘ Lvl.⊔ ℓₑ} where
constructor intro
field proof : Names.Morphism.Involution{Morphism = Morphism}(_▫_)(id)(f)
involution = inst-fn Involution.proof
module _ {x y : Obj} (f : x ⟶ y) where
module _ (f⁻¹ : y ⟶ x) where
-- A morphism have a right inverse morphism.
-- Also called: Split monomorphism, retraction
record Inverseₗ : Stmt{ℓₘ Lvl.⊔ ℓₑ} where
constructor intro
field proof : Names.Morphism.Inverseₗ(_▫_)(\{a} → id{a})(f)(f⁻¹)
inverseₗ = inst-fn Inverseₗ.proof
-- A morphism have a right inverse morphism.
-- Also called: Split epimorphism, section
record Inverseᵣ : Stmt{ℓₘ Lvl.⊔ ℓₑ} where
constructor intro
field proof : Names.Morphism.Inverseᵣ(_▫_)(\{a} → id{a})(f)(f⁻¹)
inverseᵣ = inst-fn Inverseᵣ.proof
Inverse = Inverseₗ ∧ Inverseᵣ
module Inverse(inverse : Inverse) where
instance
left : Inverseₗ
left = [∧]-elimₗ inverse
instance
right : Inverseᵣ
right = [∧]-elimᵣ inverse
Invertibleₗ = ∃(Inverseₗ)
Invertibleᵣ = ∃(Inverseᵣ)
-- A morphism is an isomorphism when it is invertible with respect to the operator.
-- For the set and functions category, it means that f is bijective.
Isomorphism : Stmt
Isomorphism = ∃(Inverse)
module Isomorphism ⦃ iso : Isomorphism ⦄ where
instance inverse = [∃]-proof iso
instance inverse-left = [∧]-elimₗ inverse
instance inverse-right = [∧]-elimᵣ inverse
inv : ⦃ Isomorphism ⦄ → (y ⟶ x)
inv ⦃ p ⦄ = [∃]-witness p
-- Proposition stating that two objects are isomorphic.
Isomorphic : Obj → Obj → Stmt
Isomorphic(x)(y) = ∃(Isomorphism{x}{y})
_⤖_ = Isomorphic
module _ {x : Obj} (f : ⟲ x) where
-- A morphism is an automorphism when it is an endomorphism and an isomorphism.
Automorphism : Stmt
Automorphism = Isomorphism(f)
Automorphic : Obj → Stmt
Automorphic(x) = ∃(Automorphism{x})
module _ {x y : Obj} (f : x ⟶ y) where
-- A morphism is an monomorphism when it is left-cancellable ("injective").
-- ∀{z}{g₁ g₂ : z ⟶ x} → (f ∘ g₁ ≡ f ∘ g₂) → (g₁ ≡ g₂)
record Monomorphism : Stmt{Lvl.of(Obj) Lvl.⊔ ℓₘ Lvl.⊔ ℓₑ} where
constructor intro
field
proof : ∀{z} → Names.CancellationOnₗ {T₂ = z ⟶ x} (_▫_) (f)
cancellationₗ = inst-fn Monomorphism.proof
-- A morphism is an epimorphism when it is right-cancellable ("surjective").
-- ∀{z}{g₁ g₂ : y ⟶ z} → (g₁ ∘ f ≡ g₂ ∘ f) → (g₁ ≡ g₂)
record Epimorphism : Stmt{Lvl.of(Obj) Lvl.⊔ ℓₘ Lvl.⊔ ℓₑ} where
constructor intro
field
proof : ∀{z} → Names.CancellationOnᵣ {T₁ = y ⟶ z} (_▫_) (f)
cancellationᵣ = inst-fn Epimorphism.proof
-- Proposition stating that two objects are monomorphic.
Monomorphic : Obj → Obj → Stmt
Monomorphic(x)(y) = ∃(Monomorphism{x}{y})
_↣_ = Monomorphic
-- Proposition stating that two objects are epimorphic.
Epimorphic : Obj → Obj → Stmt
Epimorphic(x)(y) = ∃(Epimorphism{x}{y})
_↠_ = Epimorphic
open OperModule public
open IdModule public
module Polymorphism where
module _ {Morphism : Obj → Obj → Type{ℓₘ}} ⦃ equiv-morphism : ∀{x y} → Equiv{ℓₑ}(Morphism x y) ⦄ where
open Names.ArrowNotation(Morphism)
module OperModule (_▫_ : Names.SwappedTransitivity(_⟶_)) where
module _ (x y : Obj) (f : ∀{x y} → (x ⟶ y)) where
record IdempotentOn : Stmt{Lvl.of(Obj) Lvl.⊔ ℓₘ Lvl.⊔ ℓₑ} where
constructor intro
field proof : Names.Polymorphism.IdempotentOn{Morphism = Morphism}(_▫_)(x)(y)(f)
idempotent-on = inst-fn IdempotentOn.proof
module IdModule (id : Names.Reflexivity(_⟶_)) where
module _ (x y : Obj) (f : ∀{x y} → (x ⟶ y)) where
record InvolutionOn : Stmt{Lvl.of(Obj) Lvl.⊔ ℓₘ Lvl.⊔ ℓₑ} where
constructor intro
field proof : Names.Polymorphism.InvolutionOn{Morphism = Morphism}(_▫_)(id) (x)(y) (f)
involution-on = inst-fn InvolutionOn.proof
module _ (f : ∀{x y} → (x ⟶ y)) where
record Involution : Stmt{Lvl.of(Obj) Lvl.⊔ ℓₘ Lvl.⊔ ℓₑ} where
constructor intro
field proof : Names.Polymorphism.Involution{Morphism = Morphism}(_▫_)(id)(f)
involution = inst-fn Involution.proof
module _ (inv : ∀{x y : Obj} → (x ⟶ y) → (y ⟶ x)) where
-- A morphism have a right inverse morphism.
-- Also called: Split monomorphism, retraction
record Inverterₗ : Stmt{Lvl.of(Obj) Lvl.⊔ ℓₘ Lvl.⊔ ℓₑ} where
constructor intro
field proof : ∀{x y : Obj}{f : x ⟶ y} → Names.Morphism.Inverseₗ(_▫_)(\{a} → id{a})(f)(inv f)
instance
inverseₗ : ∀{x y : Obj}{f : x ⟶ y} → Morphism.Inverseₗ(_▫_)(\{x} → id{x})(f)(inv f)
inverseₗ = Morphism.intro proof
inverterₗ = inst-fn Inverterₗ.proof
-- A morphism have a right inverse morphism.
-- Also called: Split epimorphism, section
record Inverterᵣ : Stmt{Lvl.of(Obj) Lvl.⊔ ℓₘ Lvl.⊔ ℓₑ} where
constructor intro
field proof : ∀{x y : Obj}{f : x ⟶ y} → Names.Morphism.Inverseᵣ(_▫_)(\{a} → id{a})(f)(inv f)
instance
inverseᵣ : ∀{x y : Obj}{f : x ⟶ y} → Morphism.Inverseᵣ(_▫_)(\{x} → id{x})(f)(inv f)
inverseᵣ = Morphism.intro proof
inverterᵣ = inst-fn Inverterᵣ.proof
Inverter = Inverterₗ ∧ Inverterᵣ
module Inverter(inverter : Inverter) where
instance
left : Inverterₗ
left = [∧]-elimₗ inverter
open Inverterₗ(left) public
instance
right : Inverterᵣ
right = [∧]-elimᵣ inverter
open Inverterᵣ(right) public
module _ {x y : Obj} {f : x ⟶ y} where
instance
inverse : Morphism.Inverse(_▫_)(\{x} → id{x})(f)(inv f)
inverse = [∧]-intro inverseₗ inverseᵣ
open Morphism.Inverse(_▫_)(\{x} → id{x})(f)(inv f)(inverse) renaming (left to inverseₗ ; right to inverseᵣ)
invertibleₗ : ∀{x y : Obj}{f : x ⟶ y} → Morphism.Invertibleₗ(_▫_)(\{x} → id{x})(f)
invertibleₗ {f = f} = [∃]-intro (inv f) ⦃ inverseₗ ⦄
invertibleᵣ : ∀{x y : Obj}{f : x ⟶ y} → Morphism.Invertibleᵣ(_▫_)(\{x} → id{x})(f)
invertibleᵣ {f = f} = [∃]-intro (inv f) ⦃ inverseᵣ ⦄
isomorphism : ∀{x y : Obj}{f : x ⟶ y} → Morphism.Isomorphism(_▫_)(\{x} → id{x})(f)
isomorphism {f = f} = [∃]-intro (inv f) ⦃ inverse ⦄
open OperModule public
open IdModule public
|
libsrc/_DEVELOPMENT/string/c/sdcc_iy/strrev_fastcall.asm | meesokim/z88dk | 0 | 2270 |
; char *strrev_fastcall(char *s)
SECTION code_string
PUBLIC _strrev_fastcall
EXTERN asm_strrev
defc _strrev_fastcall = asm_strrev
|
cards/bn5/ChipTransmission/136-G001 LeaderR.asm | RockmanEXEZone/MMBN-Mod-Card-Kit | 10 | 81979 | <filename>cards/bn5/ChipTransmission/136-G001 LeaderR.asm<gh_stars>1-10
.include "defaults_chip.asm"
table_file_jp equ "exe5-utf8.tbl"
table_file_en equ "bn5-utf8.tbl"
game_code_len equ 3
game_code equ 0x4252424A // BRBJ
game_code_2 equ 0x42524245 // BRBE
game_code_3 equ 0x42524250 // BRBP
card_type equ 2
card_id equ 1
card_no equ "001"
card_sub equ "Rare Chip Data Distribution!"
card_sub_x equ 20
card_name_jp_full equ "リーダーズレイド L"
card_name_jp_game equ "リーダーズレイド"
card_name_en_full equ "LeaderR L"
card_name_en_game equ "LeaderR"
card_desc_len equ 1
card_desc_1 equ "LeaderR L"
card_desc_2 equ ""
card_desc_3 equ ""
card_game_desc_jp_len equ 3
card_game_desc_jp_1 equ "ブルースとカーネル"
card_game_desc_jp_2 equ "リーダーどうしが"
card_game_desc_jp_3 equ "ゆめのきょうえん!"
card_game_desc_en_len equ 3
card_game_desc_en_1 equ "ProtoMan"
card_game_desc_en_2 equ "& Colonel"
card_game_desc_en_3 equ "together!"
card_chip_img equ "img_leaderr.bin"
card_chip_pal equ "pal_leaderr.bin"
card_chip_icon equ "dummy.bin"
card_chip_name_img equ "leaderr.img.bin"
card_chip_name_pal equ "leaderr.pal.bin" |
source/boot/constants.asm | kaiserschmarrn0/takao | 0 | 166304 | %define kernelPhysicalOffset 0xFFFFFFFFC0000000
|
programs/oeis/195/A195046.asm | karttu/loda | 0 | 22969 | <filename>programs/oeis/195/A195046.asm<gh_stars>0
; A195046: Concentric 15-gonal numbers.
; 0,1,15,31,60,91,135,181,240,301,375,451,540,631,735,841,960,1081,1215,1351,1500,1651,1815,1981,2160,2341,2535,2731,2940,3151,3375,3601,3840,4081,4335,4591,4860,5131,5415,5701,6000,6301,6615,6931,7260,7591,7935,8281,8640,9001,9375,9751,10140,10531,10935,11341,11760,12181,12615,13051,13500,13951,14415,14881,15360,15841,16335,16831,17340,17851,18375,18901,19440,19981,20535,21091,21660,22231,22815,23401,24000,24601,25215,25831,26460,27091,27735,28381,29040,29701,30375,31051,31740,32431,33135,33841,34560,35281,36015,36751,37500,38251,39015,39781,40560,41341,42135,42931,43740,44551,45375,46201,47040,47881,48735,49591,50460,51331,52215,53101,54000,54901,55815,56731,57660,58591,59535,60481,61440,62401,63375,64351,65340,66331,67335,68341,69360,70381,71415,72451,73500,74551,75615,76681,77760,78841,79935,81031,82140,83251,84375,85501,86640,87781,88935,90091,91260,92431,93615,94801,96000,97201,98415,99631,100860,102091,103335,104581,105840,107101,108375,109651,110940,112231,113535,114841,116160,117481,118815,120151,121500,122851,124215,125581,126960,128341,129735,131131,132540,133951,135375,136801,138240,139681,141135,142591,144060,145531,147015,148501,150000,151501,153015,154531,156060,157591,159135,160681,162240,163801,165375,166951,168540,170131,171735,173341,174960,176581,178215,179851,181500,183151,184815,186481,188160,189841,191535,193231,194940,196651,198375,200101,201840,203581,205335,207091,208860,210631,212415,214201,216000,217801,219615,221431,223260,225091,226935,228781,230640,232501
pow $0,2
mov $1,$0
mov $2,$0
div $2,4
mul $2,11
add $1,$2
|
tools/generator/meta.ads | reznikmm/gela | 0 | 25581 | -- SPDX-FileCopyrightText: 2019 <NAME> <<EMAIL>>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
package Meta is
pragma Pure;
end Meta; |
lab15/cases/potter.asm | Brant-Skywalker/ZJUI-ECE-120-SP21 | 0 | 84347 | ; sample test file for lab 14
.ORIG x5000
.FILL x40
.FILL x2E
.STRINGZ "poTTer."
.END
|
AMPS/code/Data.asm | NatsumiFox/AMPS-Sonic-3-Knuckles | 5 | 97532 | <reponame>NatsumiFox/AMPS-Sonic-3-Knuckles
; ===========================================================================
; ---------------------------------------------------------------------------
; Flags section. None of this is required, but I added it here to
; make it easier to debug built ROMS! If you would like easier
; assistance from Aurora, please keep this section intact!
; ---------------------------------------------------------------------------
dc.b "AMPS-v1.1" ; ident str
if safe
dc.b "s" ; safe mode enabled
else
dc.b " " ; safe mode disabled
endif
if FEATURE_FM6
dc.b "F6" ; FM6 enabled
endif
if FEATURE_SFX_MASTERVOL
dc.b "SM" ; sfx ignore master volume
endif
if FEATURE_UNDERWATER
dc.b "UW" ; underwater mode enabled
endif
if FEATURE_MODULATION
dc.b "MO" ; modulation enabled
endif
if FEATURE_MODENV
dc.b "ME" ; modulation envelope enabled
endif
if FEATURE_PORTAMENTO
dc.b "PM" ; portamento enabled
endif
if FEATURE_BACKUP
dc.b "BA" ; backup enabled
endif
; ===========================================================================
; ---------------------------------------------------------------------------
; Define music and SFX
; ---------------------------------------------------------------------------
if safe=0
listings off ; if in safe mode, list data section.
endif
__mus := MusOff
MusicIndex:
; Sonic 3 Prototype OST
ptrMusic CNZ1P, $20, CNZ2P, $20, ICZ1P, $20, ICZ2P, $20, LBZ1P, $20, LBZ2P, $20
ptrMusic KnucklesP, $20, CompetitionMenuP, $20, CreditsP, $20, Unknown, $20
; Sonic 3D OST
ptrMusic GGZ1, $20, GGZ2, $20, RRZ1, $20, RRZ2, $20, VVZ1, $20, VVZ2, $20, SSZ1, $20
ptrMusic SSZ2, $20, DDZ1, $20, DDZ2, $20, GGX1, $20, GGX2, $20, PPZ1, $20, PPZ2, $20
ptrMusic Boss1, $20, Boss2, $20, Boss4, $20, FinalBossD, $20, InvincibilityD, $20
ptrMusic SpecialStageD, $20, Intro, $00, MenuD, $20, EndingD, $00, CreditsD, $00
; Sonic 3 OST
ptrMusic AIZ1, $20, AIZ2, $20, HCZ1, $20, HCZ2, $20, MGZ1, $20, MGZ2, $20
ptrMusic CNZ1, $20, CNZ2, $20, ICZ1, $20, ICZ2, $20, LBZ1, $20, LBZ2, $20
ptrMusic Miniboss, $20, EndBoss, $20, FinalBoss, $20, Knuckles, $20
ptrMusic Invincibility, $20, ExtraLife, $00, TitleScreen, $00, Ending, $00
ptrMusic Credits, $00, DataSelect, $20, CompetitionMenu, $20, Drowning, $20
ptrMusic GotThroughAct, $00, GameOver, $00, Emerald, $00, Continue, $00
ptrMusic ALZ, $20, BPZ, $20, DPZ, $20, CGZ, $20, EMZ, $20, SpecialStage, $00
ptrMusic Gumball, $20, SlotMachine, $20, MagneticOrbs, $20
; Sonic & Knuckles OST
ptrMusic MHZ1, $20, MHZ2, $20, FBZ1, $20, FBZ2, $20, SOZ1, $20, SOZ2, $20
ptrMusic LRZ1, $20, HPZ, $20, SSZ, $20, DEZ1, $20, DEZ2, $20, DDZ, $20
ptrMusic MinibossK, $20, KnucklesK, $20, InvincibilityK, $20, ExtraLifeK, $00
ptrMusic TitleScreenK, $00, EndingK, $00, CreditsK, $00, SEGA, $00
MusCount = __mus-MusOff ; number of installed music tracks
SFXoff = __mus ; first SFX ID
__sfx := SFXoff
; ---------------------------------------------------------------------------
SoundIndex:
; Sonic 3 & Knuckles
ptrSFX $01, RingRight
ptrSFX 0, RingLeft, RingLoss, Splash, Break, Jump, Roll, Dash, Skid
ptrSFX 0, AirDing, Bubble, Drown, SpikeHit, Death, Spindash, BossHit
ptrSFX 0, FireShield, BubbleShield, ElectricShield, Flying, FlyTired
ptrSFX 0, FireAttack, BubbleAttack, ElectricAttack, InstaAttack, Grab
ptrSFX 0, GlideLand, GroundSlide, Shield, SuperTransform, SuperAlt
ptrSFX 0, Flipper, Switch, Starpost, Signpost, Register, SuperEmerald
ptrSFX 0, Collapse, BridgeCollapse, TrapDoor, Bumper, SmallBumpers, Clank
ptrSFX 0, FanLatch, Explode, MissileExplode, MissileThrow, MissileShoot
ptrSFX 0, Projectile, LevelProjectile, BossProjectile, Lazer, BossLazer
ptrSFX 0, DoorOpen, DoorMove, DoorClose, FlamethrowerQuiet, PushBlock
ptrSFX 0, SpikeMove, IceSpikes, FrostPuff, ThumpBoss, FloorThump, Thump
ptrSFX 0, Crash, FlipBridge, BlockConveyor, Spring, SpringLatch, Blast
ptrSFX 0, LaunchGrab, LaunchReady, LaunchGo, FloorLauncher, TubeLauncher
ptrSFX 0, WaterfallSplash, SandSplash, SandwallRise, Transporter, Alarm
ptrSFX 0, MushroomBounce, WeatherMachine, ChopTree, ChopStuck, LavaBall
ptrSFX 0, PulleyMove, TunnelBooster, BalloonPlatform, Balloon, Charging
ptrSFX 0, GravityMachine, Bouncy, GhostAppear, ChainTension, ChainTick
ptrSFX 0, GravityLift, EnemyBreath, PulleyGrab, Lightning, Targeting
ptrSFX 0, Hoverpad, MetalTransform, MetalLand, MetalSpark, BossRecovery
ptrSFX 0, BossHitFloor, BossActivate, EnergyZap, BossZoom, BossMagma
ptrSFX 0, BossHand, Continue, Error, BigRing, EnterSS, Goal, ActionBlock
ptrSFX 0, Diamonds, SlotMachine, BlueSphere, AllSpheres, Perfect, Geyser
ptrSFX $80, SlideSkidQuiet, WaterSkid, WaveHover, FanSmall, FanBig
ptrSFX $80, FlamethrowerLoud, GravityTunnel, TurbineHum, GumballTab
ptrSFX $80, ConveyorPlatform, MagneticSpike, WindQuiet, WindLoud
ptrSFX $80, Rumble, BigRumble, SpikeBalls, LightTunnel, CannonTurn
ptrSFX $80, LeafBlower, LavaFall, BossPanic, LargeShip, EggmanSiren
ptrSFX $80, Rising, BossRotate, DeathEggRiseLoud, DeathEggRiseQuiet
; unused S3K sfx
ptrSFX $80, SlideSkidLoud
; p-trSFX $80, SlideSkidLoud, UnknownSaw, UnknownSpin, UnknownZap
; p-trSFX 0, UnknownShield, UnknownCharge, UnknownShift, UnknownPump
; p-trSFX 0, UnknownPowerUp, UnknownPowerDown, UnknownRise, UnknownPlink
; p-trSFX 0, UnknownOminous, UnknownRevving, UnknownFlutter
; Sonic 3D sfx
; p-trSFX 0, FlickyCollect, FlickyChirp, FlickyHurt, UnknownCharge, UnknownShieldBroken
SFXcount = __sfx-SFXoff ; number of intalled sound effects
SFXlast = __sfx
; ===========================================================================
; ---------------------------------------------------------------------------
; Define samples
; ---------------------------------------------------------------------------
__samp := $80
SampleList:
sample $0000, Stop, Stop ; 80 - Stop sample (DO NOT EDIT)
sample $0100, Snare, Stop ; 81 - Snare
sample $0100, Tom, Stop, HighTom ; 82 - High Tom
sample $00CD, Tom, Stop, MidTom ; 83 - Mid Tom
sample $00AB, Tom, Stop, LowTom ; 84 - Low Tom
sample $0093, Tom, Stop, LowerTom ; 85 - Lower Tom
sample $0100, Kick, Stop ; 86 - Kick
sample $0100, KickSnare, Stop ; 87 - Kick Snare
sample $0100, CrashCymbal, Stop ; 88 - Crash Cymbal
sample $0100, RideCymbal, Stop ; 89 - Ride Cymbal
sample $0100, MetalBlock, Stop, HighMetalBlock ; 8A - High Metal Hit
sample $00D0, MetalBlock, Stop, LowMetalBlock ; 8B - Low Metal Hit
sample $0100, MutedWood, Stop ; 8C - Muted Wood Block
sample $0100, CowBell, Stop, HighCowBell ; 8D - High Cow Bell
sample $00C7, CowBell, Stop, LowCowBell ; 8E - Low Cow Bell
sample $0100, Clap, Stop ; 8F - Clap
sample $0100, ElecTom, Stop, HighElecTom ; 90 - High Electric Tom
sample $00C5, ElecTom, Stop, MidElecTom ; 91 - Mid Electric Tom
sample $00A8, ElecTom, Stop, LowElecTom ; 92 - Low Electric Tom
sample $008C, ElecTom, Stop, LowerElecTom ; 93 - Lower Electric Tom
sample $0100, HeavyTom, Stop, HighHeavyTom ; 94 - High Heavy Tom
sample $00CD, HeavyTom, Stop, MidHeavyTom ; 95 - Mid Heavy Tom
sample $00B3, HeavyTom, Stop, LowHeavyTom ; 96 - Low Heavy Tom
sample $0093, HeavyTom, Stop, LowerHeavyTom ; 97 - Lower Heavy Tom
sample $0100, Timpani, Stop, HighTimpani ; 98 - High Timpani
sample $00BA, Timpani, Stop, MidTimpani ; 99 - Mid Timpani
sample $00A9, Timpani, Stop, LowTimpani ; 9A - Low Timpani
sample $0100, LooseSnare, Stop ; 9B - Loose Snare
sample $0100, VocalClick, Stop ; 9C - Vocal Click
sample $0100, VocalKick, Stop ; 9D - Vocal Kick
sample $0100, VocalSnare, Stop ; 9E - Vocal Snare
sample $0100, JamHit, Stop ; 9F - Jam! Hit
sample $0100, JamHitShort, Stop ; A0 - Short Jam! Hit
sample $0100, GlassKick, Stop ; A1 - Glass Kick
sample $0100, GlassSmash, Stop ; A2 - Glass Smash
sample $0100, DanceSnare, Stop ; A3 - Dance Kick Snare
sample $0100, DanceKick, Stop ; A4 - Dance Kick
sample $0100, ComeOn, Stop ; A5 - Come On
sample $0100, HeavySnare, Stop ; A6 - Dance Snare
sample $0100, LowKick, Stop ; A7 - Low Kick
sample $0100, LowKickShort, Stop ; A8 - Short Low Kick
sample $0100, Whoo, Stop ; A9 - Whoo
sample $0100, Go, Stop ; AA - Go
sample $0100, SnareGo, Stop ; AB - Go with a Snare
sample $0100, PowerTom, Stop ; AC - Power Tom
sample $0100, Wood, Stop, HighWood ; AD - High Wood Block
sample $00C4, Wood, Stop, LowWood ; AE - Low Wood Block
sample $0100, Congo, Stop, HighCongo ; AF - High Congo Drum
sample $00AE, Congo, Stop, LowCongo ; B0 - Low Congo Drum
sample $0100, CrashHit, Stop ; B1 - Metal Crash Hit
sample $0100, EchoClap, Stop, HighEchoClap ; B2 - High Echoed Clap
sample $00C3, EchoClap, Stop, LowEchoClap ; B3 - Low Echoed Clap
sample $0100, OrchHit, Stop, HighOrchHit ; B4 - High Orchestral Hit
sample $00EF, OrchHit, Stop, MidOrchHit ; B5 - Mid Orchestral Hit
sample $0100, KickUh, Stop ; B6 - Kick Uh
sample $0100, ElecKick, Stop ; B7 - Eletric Kick
sample $0100, SynthHit, Stop ; B8 - Synth Hit
sample $0100, SynthHit, Stop, SynthHit2 ; B9 - Synth Hit 2
sample $0100, ReverseCrash, Stop ; BA - Reverse Fading Wind
sample $0100, Scratch, Stop ; BB - Scratch
sample $0100, SynthHit3, Stop ; BC - Synth Hit 3
sample $0100, HeavyKick, Stop ; BD - Heavy Kick
sample $0100, WhooCrash, Stop ; BE - Crash with a Whoo
sample $0100, SideStick, Stop ; BF - Side Stick
sample $0100, KickOh, Stop ; C0 - Kick Oh
sample $00E1, OrchHit, Stop, LowOrchHit ; C1 - Low Orchestral Hit
sample $00D1, OrchHit, Stop, LowerOrchHit ; C2 - Lower Orchestral Hit
sample $00C9, OrchHit, Stop, LowestOrchHit ; C3 - Lowest Orchestral Hit
sample $010B, OrchHit, Stop, HigherOrchHit ; C4 - Higher Orchestral Hit
sample $0100, EchoClapS3, Stop, HighEchoClapS3 ; C5 - High Echoed Clap (Sonic 3)
sample $00C3, EchoClapS3, Stop, LowEchoClapS3 ; C6 - Low Echoed Clap Hit (Sonic 3)
sample $0100, LowerKick, Stop ; 9B - Lower Kick (Sonic 3D)
sample $0100, BigOrchHit, Stop ; 9C - Orchestra Hit (Sonic 3D)
sample $0100, SEGA, Stop ; C7 - SEGA
; ===========================================================================
; ---------------------------------------------------------------------------
; Define volume envelopes and their data
; ---------------------------------------------------------------------------
vNone = $00
__venv := $01
VolEnvs:
volenv 01, 02, 03, 04, 05, 06, 07, 08
volenv 09, 0A, 0B, 0C, 0D, 0E, 0F, 10
volenv 11, 12, 13, 14, 15, 16, 17, 18
volenv 19, 1A, 1B, 1C, 1D, 1E, 1F, 20
volenv 21, 22, 23, 24, 25, 26, 27
VolEnvs_End:
; ---------------------------------------------------------------------------
vd0E:
vd01: dc.b $10, eStop
vd0F:
vd02: dc.b $00, $10, $20, $30, $40, $7F, eStop
vd03: dc.b $10, $08, $00, $00, $08, $10, $10, $10
dc.b $10, $10, $10, $10, $10, $10, $10, $10
dc.b $10, $18, $18, $18, $20, $20, $20, $28
dc.b eHold
vd04: dc.b $00, $00, $10, $18, $20, $20, $28, $28
dc.b $28, $30, $30, eHold
vd05: dc.b $18, $00, $08, $08, $08, $10, $18, $20
dc.b $20, $28, eHold
vd06: dc.b $00, $00, $08, $08, $10, $18, $20, $28
dc.b $28, $30, $40, $38, $38, $30, eHold
vd07: dc.b $01, $0C, $03, $0F, $02, $07, $03, $0F, eReset
vd08: dc.b $00, $00, $00, $10, $18, $18, $20, $28
dc.b $30, $38, $40, $48, $50, $58, $60, $7F
dc.b eStop
vd16:
vd09: dc.b $18, $10, $08, $08, $00, $00, $08, $10
dc.b $18, $20, eHold
vd0A: dc.b $08, $00, $00, $00, $00, $08, $08, $08
dc.b $10, $10, $10, $18, $18, $18, $18, $20
dc.b $20, $20, $28, $28, eHold
vd0B: dc.b $10, $20, $30, $40, $30, $20, $10, $00
dc.b $F0, eReset
vd0C: dc.b $00, $00, $08, $08, $18, $18, $20, $28
dc.b eStop
vd0D: dc.b $00, eHold
vd10: dc.b $08, $08, $08, $00, $00, $00, eHold
vd11: dc.b $08, $08, $08, $00, $00, $00, eHold
vd12: dc.b $18, $00, $08, $08, $08, $10, $08, $20
dc.b $20, $28, eHold
vd13: dc.b $00, $00, $08, $08, $10, $18, $20, $28
dc.b $28, $30, $40, $38, $38, $30, eHold
vd14: dc.b $50, $28, $00, $20, $40, eStop
vd15: dc.b $00, $00, $00, $10, $18, $18, $20, $28
dc.b $30, $38, $40, $48, $50, $58, $60, $78
dc.b eStop
vd17: dc.b $08, $00, $00, $00, $00, $08, $08, $08
dc.b $10, $10, $10, $10, $18, $18, $18, $20
dc.b $20, $20, $28, $28, eHold
vd18: dc.b $10, $20, $30, $40, $30, $20, $10, $00
dc.b eReset
vd19: dc.b $00, $00, $08, $08, $18, $18, $20, $28
dc.b eStop
vd1A: dc.b $00, $02, $04, $06, $08, $16, eStop
vd1B: dc.b $00, $00, $08, $08, $18, $18, $20, $28
dc.b eStop
vd1C: dc.b $20, $20, $20, $20, $18, $18, $18, $18
dc.b $10, $10, $10, $10, $08, $08, $08, $08
dc.b eStop
vd1D: dc.b $00, $00, $00, $00, $08, $08, $08, $08
dc.b $10, $10, $10, $10, $18, $18, $18, $18
dc.b $20, $20, $20, $20, $28, $28, $28, $28
dc.b $30, $30, $30, $30, $38, $38, $38, $38
dc.b $40, $40, $40, $40, $48, $48, $48, $48
dc.b $50, $50, $50, $50, eHold
vd1E: dc.b $00, $50, eStop
vd1F: dc.b $00, $10, $20, eHold
vd20: dc.b $30, $20, $10, $00, $00, $00, $00, $00
dc.b $08, $10, $20, $30, eHold
vd21: dc.b $00, $20, $20, $20, $20, $20, $20, $20
dc.b $20, $20, $20, $30, $30, $30, $40, $40
dc.b $50, eStop
vd22: dc.b $00, $10, $18, $20, $30, $38, eHold
vd23: dc.b $10, $08, $00, $00, $00, $10, $20, $38
dc.b eHold
vd24: dc.b $78, $08, $28, eStop
vd25: dc.b $40, $30, $10, $18, $20, $28, $30, $38
dc.b $40, $48, $50, $58, $60, $68, $78, $78
dc.b $7F, eStop
vd26: dc.b $00, $00, $00, $00, $00, $00, $00, $00
dc.b $00, $00, $08, $08, $08, $08, $08, $08
dc.b $08, $08, $08, $08, $10, $10, $10, $10
dc.b $10, $10, $10, $10, $10, $10, $18, $18
dc.b $18, $18, $18, $18, $18, $18, $18, $18
dc.b $20, $20, $20, $20, $20, $20, $20, $20
dc.b $20, $20, $28, $28, $28, $28, $28, $28
dc.b $28, $28, $28, $28, $30, $30, $30, $30
dc.b $30, $30, $30, $30, $30, $30, $38, $38
dc.b $38, $38, $38, $38, $38, $38, $38, $38
dc.b $40, $40, $40, $40, $40, $40, $40, $40
dc.b $40, $40, $48, $48, $48, $48, $48, $48
dc.b $48, $48, eStop
vd27: dc.b $00, $10, $10, $10, $18, $18, $18, $20
dc.b $20, $20, $28, $28, eStop
even
; ===========================================================================
; ---------------------------------------------------------------------------
; Define volume envelopes and their data
; ---------------------------------------------------------------------------
mNone = $00
__menv := $01
ModEnvs:
modenv 01, 02, 03, 04, 05, 06, 07, 08
ModEnvs_End:
; ---------------------------------------------------------------------------
if FEATURE_MODENV
md02: dc.b $00
md01: dc.b $01, $02, $01, $00,-$01,-$02,-$03,-$04
dc.b -$03,-$02,-$01, eHold
md03: dc.b $00, $00, $00, $00, $13, $26, $39, $4C
dc.b $5F, $72, $7F, $72, eHold
md04: dc.b $01, $02, $03, $02, $01, $00,-$01,-$02
dc.b -$03,-$02,-$01, $00, eLoop, $00
md05: dc.b $00, $00, $01, $03, $01, $00,-$01,-$03
dc.b -$01, $00, eLoop, $02
md06: dc.b $00, $00, $00, $00, $00, $0A, $14, $1E
dc.b $14, $0A, $00,-$0A,-$14,-$1E,-$14,-$0A
dc.b eLoop, $04
md07: dc.b $00, $00, $00, $00, $16, $2C, $42, $2C
dc.b $16, $00,-$16,-$2C,-$42,-$2C,-$16
dc.b eLoop, $03
md08: dc.b $01, $02, $03, $04, $03, $02, $01, $00
dc.b -$01,-$02,-$03,-$04,-$03,-$02,-$01, $00
dc.b eLoop, $01
even
endif
; ===========================================================================
; ---------------------------------------------------------------------------
; Include music, sound effects and voice bank
; ---------------------------------------------------------------------------
include "AMPS/Voices.s2a" ; include universal voice bank
; include SFX and music
sfxaddr: incSFX
musaddr: incMus
musend:
; ===========================================================================
; ---------------------------------------------------------------------------
; Include samples and filters
; ---------------------------------------------------------------------------
align $8000 ; must be aligned to bank. By the way, these are also set in Z80.asm. Be sure to check it out
fLog: binclude "AMPS/filters/Logarithmic.dat" ; logarithmic filter (no filter)
;fLinear: binclude "AMPS/filters/Linear.dat" ; linear filter (no filter)
dacaddr: asdata Z80E_Read*(MaxPitch/$100), $00
SWF_Stop: asdata $8000-(2*Z80E_Read*(MaxPitch/$100)), $80
SWFR_Stop: asdata Z80E_Read*(MaxPitch/$100), $00
; ---------------------------------------------------------------------------
incSWF Snare, Tom, Kick, KickSnare, CrashCymbal, RideCymbal, MetalBlock, MutedWood, Wood
incSWF CowBell, Clap, ElecTom, HeavyTom, Timpani, LooseSnare, VocalClick, VocalKick, SEGA
incSWF VocalSnare, JamHit, JamHitShort, GlassKick, GlassSmash, DanceSnare, DanceKick, Go
incSWF ComeOn, HeavySnare, LowKick, LowKickShort, Whoo, SnareGo, PowerTom, LowerKick
incSWF Congo, CrashHit, EchoClap, EchoClapS3, KickUh, ElecKick, SynthHit, ReverseCrash
incSWF SynthHit3, HeavyKick, WhooCrash, SideStick, KickOh, BigOrchHit, OrchHit, Scratch
even
listing on ; continue source listing
; ===========================================================================
|
programs/oeis/132/A132226.asm | neoneye/loda | 22 | 240887 | ; A132226: Placement sequence for the dense normalized fractal sequence A132224.
; 1,2,3,2,5,4,3,2,9,8,7,6,5,4,3,2,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,65,64,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30
seq $0,261693 ; Irregular triangle read by rows in which row n lists the positive odd numbers in decreasing order starting with 2^n - 1. T(0, 1) = 0 and T(n, k) for n >= 1, 1 <= k <= 2^(n-1).
mov $1,3
add $1,$0
div $1,2
mov $0,$1
|
mappings/c11_ppc.als | graymalkin/memalloy | 0 | 1317 | open ../archs/exec_C[SE] as SW
open ../archs/exec_ppc[HE] as HW
/*
A C11-to-Power mapping.
*/
module c11_ppc[SE,HE]
pred apply_map[X:Exec_C, X':Exec_PPC, map:SE->HE] {
X.EV = SE
X'.EV = HE
// two SW events cannot be compiled to a single HW event
map in X.EV lone -> X'.EV
// HW reads/writes cannot be invented by the compiler
all e : X'.(R+W) | one e.~map
// SW reads/writes cannot be discarded by the compiler
all e : X.(R+W) | some e.map
// a non-atomic or relaxed read compiles to a single read
all e : X.((R - W) - ACQ) {
one e.map
e.map in X'.R
}
// an acquire read compiles to a read followed by
// a control fence, with control dependencies inserted between the
// read and every event that is sequenced after it.
all e : X.((R - W) & ACQ - SC) | let e1 = e.map {
one e1
e1 in X'.R
e1 <: (X'.sb) in (X'.cd) & (isync[none->none,X'])
}
// an SC read compiles to a full fence followed by a read
// followed by a control fence, with control dependencies inserted
// between the read and every event that is sequenced after it
all e : X.((R - W) & SC) | let e1 = e.map {
one e1
e1 in X'.R
(X'.sb) :> e1 in (sync[none->none,X'])
e1 <: (X'.sb) in (X'.cd) & (isync[none->none,X'])
}
// a non-atomic or relaxed write compiles to a single write
all e : X.((W - R) - REL) {
one e.map
e.map in X'.W
}
// a release write compiles to a lightweight fence followed
// by a write
all e : X.((W - R) & REL - SC) | let e1 = e.map {
one e1
e1 in X'.W
(X'.sb) :> e1 in (lwsync[none->none,X'])
}
// an SC write compiles to a full fence followed by a write
all e : X.((W - R) & SC) | let e1 = e.map {
one e1
e1 in X'.W
(X'.sb) :> e1 in (sync[none->none,X'])
}
// a relaxed RMW compiles to a read followed by a write, with
// control dependencies inserted between the read and every
// event that is sequenced after it
all e : X.((R & W) - (ACQ + REL)) | some disj e1,e2 : X'.EV {
e.map = e1+e2
e1 in X'.R
e2 in X'.W
(e1 -> e2) in X'.atom & imm[X'.sb]
e1 <: (X'.sb) in X'.cd
}
// an acquire RMW compiles to a read followed by a write,
// followed by an isync, with control dependencies inserted
// between the read and every event that is sequenced after it
all e : X.((R & W & ACQ) - (REL + SC)) | some disj e1,e2 : X'.EV {
e.map = e1+e2
e1 in X'.R
e2 in X'.W
(e1 -> e2) in X'.atom & imm[X'.sb]
e1 <: (X'.sb) in X'.cd
e2 <: (X'.sb) in isync[none->none,X']
}
// a release RMW compiles to an lwsync, followed by a read, followed by
// a write, with control dependencies inserted between the read and
// every event that is sequenced after it
all e : X.((R & W & REL) - (ACQ + SC)) | some disj e1,e2 : X'.EV {
e.map = e1+e2
e1 in X'.R
e2 in X'.W
(e1 -> e2) in X'.atom & imm[X'.sb]
(X'.sb) :> e1 in lwsync[none->none,X']
e1 <: (X'.sb) in X'.cd
}
// an acquire/release RMW compiles to an lwsync, followed by a read,
// followed by a write, followed by an isync, with control
// dependencies inserted between the read and every event that is
// sequenced after it
all e : X.((R & W & REL & ACQ) - SC) | some disj e1,e2 : X'.EV {
e.map = e1+e2
e1 in X'.R
e2 in X'.W
(e1 -> e2) in X'.atom & imm[X'.sb]
(X'.sb) :> e1 in lwsync[none->none,X']
e1 <: (X'.sb) in X'.cd
e2 <: (X'.sb) in isync[none->none,X']
}
// an SC RMW compiles to an sync, followed by a read, followed by
// a write, followed by an isync, with control dependencies inserted
// between the read and every event that is sequenced after it
all e : X.(R & W & SC) | some disj e1,e2 : X'.EV {
e.map = e1+e2
e1 in X'.R
e2 in X'.W
(e1 -> e2) in X'.atom & imm[X'.sb]
(X'.sb) :> e1 in sync[none->none,X']
e1 <: (X'.sb) in X'.cd
e2 <: (X'.sb) in isync[none->none,X']
}
// release or acquire fences compile to lightweight fences
all e : X.(F & (ACQ + REL) - SC) {
(X.sb) . (stor[e]) . (X.sb) = map . (lwsync[none->none,X']) . ~map
}
// SC fences compile to full fences
all e : X.(F & SC) {
(X.sb) . (stor[e]) . (X.sb) = map . (sync[none->none,X']) . ~map
}
// sb edges are preserved (but more may be introduced)
X.sb in map . (X'.sb) . ~map
// the mapping preserves rf
X.rf = map . (X'.rf) . ~map
// the mapping preserves co
X.co = map . (X'.co) . ~map
// the mapping preserves address dependencies
X.ad = map . (X'.ad) . ~map
// the mapping preserves data dependencies
X.dd = map . (X'.dd) . ~map
// the mapping preserves locations
X.sloc = map . (X'.sloc) . ~map
// ctrl dependencies are preserved (but more may be introduced)
X.cd in map . (X'.cd) . ~map
// the mapping preserves threads
X.sthd = map . (X'.sthd) . ~map
}
|
programs/oeis/008/A008599.asm | neoneye/loda | 22 | 19262 | ; A008599: Multiples of 17.
; 0,17,34,51,68,85,102,119,136,153,170,187,204,221,238,255,272,289,306,323,340,357,374,391,408,425,442,459,476,493,510,527,544,561,578,595,612,629,646,663,680,697,714,731,748,765,782,799,816,833,850,867,884,901,918,935,952,969,986,1003,1020,1037,1054,1071,1088,1105,1122,1139,1156,1173,1190,1207,1224,1241,1258,1275,1292,1309,1326,1343,1360,1377,1394,1411,1428,1445,1462,1479,1496,1513,1530,1547,1564,1581,1598,1615,1632,1649,1666,1683
mul $0,17
|
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c4/c41203b.ada | best08618/asylo | 7 | 4458 | <reponame>best08618/asylo
-- C41203B.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- OBJECTIVE:
-- CHECK THAT THE NAME PART OF A SLICE MAY BE:
-- AN IDENTIFIER DENOTING A ONE DIMENSIONAL ARRAY OBJECT - N1;
-- AN IDENTIFIER DENOTING AN ACCESS OBJECT WHOSE VALUE
-- DESIGNATES A ONE DIMENSIONAL ARRAY OBJECT - N2;
-- A FUNCTION CALL DELIVERING A ONE DIMENSIONAL ARRAY OBJECT
-- USING PREDEFINED FUNCTIONS - &, AND THE LOGICAL OPERATORS
-- A USER-DEFINED FUNCTION - F1;
-- A FUNCTION CALL DELIVERING AN ACCESS VALUE THAT
-- DESIGNATES A ONE DIMENSIONAL ARRAY - F2;
-- A SLICE - N3;
-- AN INDEXED COMPONENT DENOTING A ONE DIMENSIONAL ARRAY OBJECT
-- (ARRAY OF ARRAYS) - N4;
-- AN IDENTIFIER PREFIXED BY THE NAME OF THE INNERMOST UNIT
-- ENCLOSING ITS DECLARATION - C41203B.N1;
-- A RECORD COMPONENT (OF A RECORD CONTAINING ONE OR MORE
-- ARRAYS WHOSE BOUNDS DEPEND ON A DISCRIMINANT) - N5.
-- CHECK THAT THE APPROPRIATE SLICE IS ACCESSED (FOR
-- DYNAMIC INDICES).
-- HISTORY:
-- WKB 08/05/81 CREATED ORIGINAL TEST.
-- SPS 02/04/83
-- BCB 08/02/88 MODIFIED HEADER FORMAT AND ADDED CALLS TO THE
-- LOGICAL OPERATORS.
-- BCB 04/16/90 ADDED TEST FOR PREFIX OF INDEXED COMPONENT HAVING
-- A LIMITED TYPE.
-- PWN 11/30/94 SUBTYPE QUALIFIED LITERALS FOR ADA 9X.
WITH REPORT;
USE REPORT;
PROCEDURE C41203B IS
TYPE T1 IS ARRAY (INTEGER RANGE <> ) OF INTEGER;
SUBTYPE A1 IS T1 (1..6);
N1 : A1 := (1,2,3,4,5,6);
BEGIN
TEST ("C41203B", "CHECK THAT THE NAME PART OF A SLICE MAY BE " &
"OF CERTAIN FORMS AND THAT THE APPROPRIATE " &
"SLICE IS ACCESSED (FOR DYNAMIC INDICES)");
DECLARE
TYPE T2 IS ARRAY (INTEGER RANGE <> ) OF BOOLEAN;
SUBTYPE A2 IS T2 (1..6);
TYPE A3 IS ACCESS A1;
TYPE A4 IS ARRAY (INTEGER RANGE 1..3 ) OF A1;
TYPE R (LENGTH : INTEGER) IS
RECORD
S : STRING (1..LENGTH);
END RECORD;
N2 : A3 := NEW A1'(1,2,3,4,5,6);
N3 : T1(1..7) := (1,2,3,4,5,6,7);
N4 : A4 := (1 => (1,2,3,4,5,6), 2 => (7,8,9,10,11,12),
3 => (13,14,15,16,17,18));
N5 : R(6) := (LENGTH => 6, S => "ABCDEF");
M2A : A2 := (TRUE,TRUE,TRUE,FALSE,FALSE,FALSE);
M2B : A2 := (TRUE,FALSE,TRUE,FALSE,TRUE,FALSE);
FUNCTION F1 RETURN A2 IS
BEGIN
RETURN (FALSE,FALSE,TRUE,FALSE,TRUE,TRUE);
END F1;
FUNCTION F2 RETURN A3 IS
BEGIN
RETURN N2;
END F2;
PROCEDURE P1 (X : IN T1; Y : IN OUT T1;
Z : OUT T1; W : IN STRING) IS
BEGIN
IF X /= (1,2) THEN
FAILED ("WRONG VALUE FOR IN PARAMETER - " & W);
END IF;
IF Y /= (3,4) THEN
FAILED ("WRONG VALUE FOR IN OUT PARAMETER - " & W);
END IF;
Y := (10,11);
Z := (12,13);
END P1;
PROCEDURE P2 (X : STRING) IS
BEGIN
IF X /= "BC" THEN
FAILED ("WRONG VALUE FOR IN PARAMETER - '&'");
END IF;
END P2;
PROCEDURE P3 (X : T2) IS
BEGIN
IF X /= (FALSE,TRUE,FALSE) THEN
FAILED ("WRONG VALUE FOR IN PARAMETER - F1");
END IF;
END P3;
PROCEDURE P5 (X : IN STRING; Y : IN OUT STRING;
Z : OUT STRING) IS
BEGIN
IF X /= "EF" THEN
FAILED ("WRONG VALUE FOR IN PARAMETER - N5");
END IF;
IF Y /= "CD" THEN
FAILED ("WRONG VALUE FOR IN OUT PARAMETER - N5");
END IF;
Y := "XY";
Z := "WZ";
END P5;
PROCEDURE P6 (X : T2) IS
BEGIN
IF X /= (FALSE,FALSE,TRUE) THEN
FAILED ("WRONG VALUE FOR IN PARAMETER - NOT");
END IF;
END P6;
PROCEDURE P7 (X : T2) IS
BEGIN
IF X /= (FALSE,TRUE,FALSE) THEN
FAILED ("WRONG VALUE FOR IN PARAMETER - AND");
END IF;
END P7;
PROCEDURE P8 (X : T2) IS
BEGIN
IF X /= (FALSE,TRUE,FALSE) THEN
FAILED ("WRONG VALUE FOR IN PARAMETER - OR");
END IF;
END P8;
PROCEDURE P9 (X : T2) IS
BEGIN
IF X /= (FALSE,TRUE,FALSE) THEN
FAILED ("WRONG VALUE FOR IN PARAMETER - XOR");
END IF;
END P9;
BEGIN
IF N1(IDENT_INT(1)..IDENT_INT(2)) /= (1,2) THEN
FAILED ("WRONG VALUE FOR EXPRESSION - N1");
END IF;
N1(IDENT_INT(1)..IDENT_INT(2)) := (7,8);
IF N1 /= (7,8,3,4,5,6) THEN
FAILED ("WRONG TARGET FOR ASSIGNMENT - N1");
END IF;
N1 := (1,2,3,4,5,6);
P1 (N1(IDENT_INT(1)..IDENT_INT(2)),
N1(IDENT_INT(3)..IDENT_INT(4)),
N1(IDENT_INT(5)..IDENT_INT(6)), "N1");
IF N1 /= (1,2,10,11,12,13) THEN
FAILED ("WRONG TARGET FOR (IN) OUT PARAMETER - N1");
END IF;
IF N2(IDENT_INT(4)..IDENT_INT(6)) /= (4,5,6) THEN
FAILED ("WRONG VALUE FOR EXPRESSION - N2");
END IF;
N2(IDENT_INT(4)..IDENT_INT(6)) := (7,8,9);
IF N2.ALL /= (1,2,3,7,8,9) THEN
FAILED ("WRONG TARGET FOR ASSIGNMENT - N2");
END IF;
N2.ALL := (1,2,5,6,3,4);
P1 (N2(IDENT_INT(1)..IDENT_INT(2)),
N2(IDENT_INT(5)..IDENT_INT(6)),
N2(IDENT_INT(3)..IDENT_INT(4)), "N2");
IF N2.ALL /= (1,2,12,13,10,11) THEN
FAILED ("WRONG TARGET FOR (IN) OUT PARAMETER - N2");
END IF;
IF "&" (STRING'("AB"),STRING'("CDEF"))(IDENT_INT(4)..IDENT_INT(6))
/= STRING'("DEF") THEN
FAILED ("WRONG VALUE FOR EXPRESSION - '&'");
END IF;
P2 ("&" ("AB","CD")(IDENT_INT(2)..IDENT_INT(3)));
IF "NOT" (M2A)(IDENT_INT(3)..IDENT_INT(5)) /=
(FALSE,TRUE,TRUE) THEN
FAILED ("WRONG VALUE FOR EXPRESSION - 'NOT'");
END IF;
P6 ("NOT" (M2A)(IDENT_INT(2)..IDENT_INT(4)));
IF "AND" (M2A,M2B)(IDENT_INT(3)..IDENT_INT(5)) /=
(TRUE,FALSE,FALSE) THEN
FAILED ("WRONG VALUE FOR EXPRESSION - 'AND'");
END IF;
P7 ("AND" (M2A,M2B)(IDENT_INT(2)..IDENT_INT(4)));
IF "OR" (M2A,M2B)(IDENT_INT(3)..IDENT_INT(5)) /=
(TRUE,FALSE,TRUE) THEN
FAILED ("WRONG VALUE FOR EXPRESSION - 'OR'");
END IF;
P8 ("OR" (M2A,M2B)(IDENT_INT(4)..IDENT_INT(6)));
IF "XOR" (M2A,M2B)(IDENT_INT(3)..IDENT_INT(5)) /=
(FALSE,FALSE,TRUE) THEN
FAILED ("WRONG VALUE FOR EXPRESSION - 'XOR'");
END IF;
P9 ("XOR" (M2A,M2B)(IDENT_INT(1)..IDENT_INT(3)));
IF F1(IDENT_INT(1)..IDENT_INT(2)) /= (FALSE,FALSE) THEN
FAILED ("WRONG VALUE FOR EXPRESSION - F1");
END IF;
P3 (F1(IDENT_INT(2)..IDENT_INT(4)));
N2 := NEW A1'(1,2,3,4,5,6);
IF F2(IDENT_INT(2)..IDENT_INT(6)) /= (2,3,4,5,6) THEN
FAILED ("WRONG VALUE FOR EXPRESSION - F2");
END IF;
F2(IDENT_INT(3)..IDENT_INT(3)) := (5 => 7);
IF N2.ALL /= (1,2,7,4,5,6) THEN
FAILED ("WRONG TARGET FOR ASSIGNMENT - F2");
END IF;
N2.ALL := (5,6,1,2,3,4);
P1 (F2(IDENT_INT(3)..IDENT_INT(4)),
F2(IDENT_INT(5)..IDENT_INT(6)),
F2(IDENT_INT(1)..IDENT_INT(2)), "F2");
IF N2.ALL /= (12,13,1,2,10,11) THEN
FAILED ("WRONG TARGET FOR (IN) OUT PARAMETER - F2");
END IF;
IF N3(2..7)(IDENT_INT(2)..IDENT_INT(4)) /= (2,3,4) THEN
FAILED ("WRONG VALUE FOR EXPRESSION - N3");
END IF;
N3(2..7)(IDENT_INT(4)..IDENT_INT(5)) := (8,9);
IF N3 /= (1,2,3,8,9,6,7) THEN
FAILED ("WRONG TARGET FOR ASSIGNMENT - N3");
END IF;
N3 := (5,3,4,1,2,6,7);
P1 (N3(2..7)(IDENT_INT(4)..IDENT_INT(5)),
N3(2..7)(IDENT_INT(2)..IDENT_INT(3)),
N3(2..7)(IDENT_INT(6)..IDENT_INT(7)), "N3");
IF N3 /= (5,10,11,1,2,12,13) THEN
FAILED ("WRONG TARGET FOR (IN) OUT PARAMETER - N3");
END IF;
IF N4(1)(IDENT_INT(3)..IDENT_INT(5)) /= (3,4,5) THEN
FAILED ("WRONG VALUE FOR EXPRESSION - N4");
END IF;
N4(2)(IDENT_INT(1)..IDENT_INT(3)) := (21,22,23);
IF N4 /= ((1,2,3,4,5,6),(21,22,23,10,11,12),
(13,14,15,16,17,18)) THEN
FAILED ("WRONG TARGET FOR ASSIGNMENT - N4");
END IF;
N4 := (1 => (18,19,20,21,22,23), 2 => (17,16,15,1,2,14),
3 => (7,3,4,5,6,8));
P1 (N4(2)(IDENT_INT(4)..IDENT_INT(5)),
N4(3)(IDENT_INT(2)..IDENT_INT(3)),
N4(1)(IDENT_INT(5)..IDENT_INT(6)), "N4");
IF N4 /= ((18,19,20,21,12,13),(17,16,15,1,2,14),
(7,10,11,5,6,8)) THEN
FAILED ("WRONG TARGET FOR (IN) OUT PARAMETER - N4");
END IF;
N1 := (1,2,3,4,5,6);
IF C41203B.N1(IDENT_INT(1)..IDENT_INT(2)) /= (1,2) THEN
FAILED ("WRONG VALUE FOR EXPRESSION - C41203B.N1");
END IF;
C41203B.N1(IDENT_INT(1)..IDENT_INT(2)) := (7,8);
IF N1 /= (7,8,3,4,5,6) THEN
FAILED ("WRONG TARGET FOR ASSIGNMENT - C41203B.N1");
END IF;
N1 := (1,2,3,4,5,6);
P1 (C41203B.N1(IDENT_INT(1)..IDENT_INT(2)),
C41203B.N1(IDENT_INT(3)..IDENT_INT(4)),
C41203B.N1(IDENT_INT(5)..IDENT_INT(6)), "C41203B.N1");
IF N1 /= (1,2,10,11,12,13) THEN
FAILED ("WRONG TARGET FOR (IN) OUT PARAMETER " &
"- C41203B.N1");
END IF;
IF N5.S(IDENT_INT(1)..IDENT_INT(5)) /= "ABCDE" THEN
FAILED ("WRONG VALUE FOR EXPRESSION - N5");
END IF;
N5.S(IDENT_INT(4)..IDENT_INT(6)) := "PQR";
IF N5.S /= "ABCPQR" THEN
FAILED ("WRONG TARGET FOR ASSIGNMENT - N5");
END IF;
N5.S := "ABCDEF";
P5 (N5.S(IDENT_INT(5)..IDENT_INT(6)),
N5.S(IDENT_INT(3)..IDENT_INT(4)),
N5.S(IDENT_INT(1)..IDENT_INT(2)));
IF N5.S /= "WZXYEF" THEN
FAILED ("WRONG TARGET FOR (IN) OUT PARAMETER - N5");
END IF;
DECLARE
PACKAGE P IS
TYPE LIM IS LIMITED PRIVATE;
TYPE A IS ARRAY(INTEGER RANGE <>) OF LIM;
PROCEDURE INIT (V : OUT LIM; X,Y,Z : INTEGER);
PROCEDURE ASSIGN (ONE : OUT LIM; TWO : LIM);
FUNCTION "=" (ONE,TWO : A) RETURN BOOLEAN;
PRIVATE
TYPE LIM IS ARRAY(1..3) OF INTEGER;
END P;
USE P;
H : A(1..5);
N6 : A(1..3);
PACKAGE BODY P IS
PROCEDURE INIT (V : OUT LIM; X,Y,Z : INTEGER) IS
BEGIN
V := (X,Y,Z);
END INIT;
PROCEDURE ASSIGN (ONE : OUT LIM; TWO : LIM) IS
BEGIN
ONE := TWO;
END ASSIGN;
FUNCTION "=" (ONE,TWO : A) RETURN BOOLEAN IS
BEGIN
IF ONE(1) = TWO(2) AND ONE(2) = TWO(3) AND
ONE(3) = TWO(4) THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;
END "=";
END P;
FUNCTION FR RETURN A IS
BEGIN
RETURN H;
END FR;
BEGIN
INIT (H(1),1,2,3);
INIT (H(2),4,5,6);
INIT (H(3),7,8,9);
INIT (H(4),10,11,12);
INIT (H(5),13,14,15);
INIT (N6(1),0,0,0);
INIT (N6(2),0,0,0);
INIT (N6(3),0,0,0);
ASSIGN (N6(1),H(2));
ASSIGN (N6(2),H(3));
ASSIGN (N6(3),H(4));
IF N6 /= FR(2..4) THEN
FAILED ("WRONG VALUE FROM LIMITED COMPONENT TYPE");
END IF;
END;
END;
RESULT;
END C41203B;
|
programs/oeis/115/A115364.asm | neoneye/loda | 22 | 179493 | ; A115364: a(n) = A000217(A001511(n)), where A001511 is one more than the 2-adic valuation of n, and A000217(n) is the n-th triangular number, binomial(n+1, 2).
; 1,3,1,6,1,3,1,10,1,3,1,6,1,3,1,15,1,3,1,6,1,3,1,10,1,3,1,6,1,3,1,21,1,3,1,6,1,3,1,10,1,3,1,6,1,3,1,15,1,3,1,6,1,3,1,10,1,3,1,6,1,3,1,28,1,3,1,6,1,3,1,10,1,3,1,6,1,3,1,15,1,3,1,6,1,3,1,10,1,3,1,6,1,3,1,21,1,3,1,6
lpb $0
sub $0,1
mul $0,2
dif $0,4
add $1,1
add $2,$1
lpe
add $1,$2
add $1,1
mov $0,$1
|
programs/oeis/034/A034387.asm | jmorken/loda | 1 | 92361 | ; A034387: Sum of primes <= n.
; 0,2,5,5,10,10,17,17,17,17,28,28,41,41,41,41,58,58,77,77,77,77,100,100,100,100,100,100,129,129,160,160,160,160,160,160,197,197,197,197,238,238,281,281,281,281,328,328,328,328,328,328,381,381,381,381,381,381,440,440,501,501,501,501,501,501,568,568,568,568,639,639,712,712,712,712,712,712,791,791,791,791,874,874,874,874,874,874,963,963,963,963,963,963,963,963,1060,1060,1060,1060,1161,1161,1264,1264,1264,1264,1371,1371,1480,1480,1480,1480,1593,1593,1593,1593,1593,1593,1593,1593,1593,1593,1593,1593,1593,1593,1720,1720,1720,1720,1851,1851,1851,1851,1851,1851,1988,1988,2127,2127,2127,2127,2127,2127,2127,2127,2127,2127,2276,2276,2427,2427,2427,2427,2427,2427,2584,2584,2584,2584,2584,2584,2747,2747,2747,2747,2914,2914,2914,2914,2914,2914,3087,3087,3087,3087,3087,3087,3266,3266,3447,3447,3447,3447,3447,3447,3447,3447,3447,3447,3638,3638,3831,3831,3831,3831,4028,4028,4227,4227,4227,4227,4227,4227,4227,4227,4227,4227,4227,4227,4438,4438,4438,4438,4438,4438,4438,4438,4438,4438,4438,4438,4661,4661,4661,4661,4888,4888,5117,5117,5117,5117,5350,5350,5350,5350,5350,5350,5589,5589,5830,5830,5830,5830,5830,5830,5830,5830,5830,5830
mov $2,$0
mov $4,$0
lpb $2
mov $0,$4
sub $2,1
sub $0,$2
mov $3,$0
add $3,1
cal $0,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
mul $3,$0
add $1,$3
lpe
|
programs/oeis/143/A143901.asm | karttu/loda | 1 | 90131 | ; A143901: Rectangular array R by antidiagonals: R(m,n) = floor((m*n+1)/2).
; 1,1,1,2,2,2,2,3,3,2,3,4,5,4,3,3,5,6,6,5,3,4,6,8,8,8,6,4,4,7,9,10,10,9,7,4,5,8,11,12,13,12,11,8,5,5,9,12,14,15,15,14,12,9,5,6,10,14,16,18,18,18,16,14,10,6,6,11,15,18,20,21,21,20,18,15,11,6,7,12,17,20,23,24,25,24
cal $0,59036 ; In a triangle of numbers (such as that in A059032, A059033, A059034) how many entries lie above position (n,k)? Answer: T(n,k) = (n+1)*(k+1)-1 (n >= 0, k >= 0).
div $0,2
mov $1,$0
add $1,1
|
test/Fail/TermSplicing1.agda | cruhland/agda | 1,989 | 8056 | open import Common.Prelude
open import Common.Reflection
module TermSplicing1 where
x = unquote (give Set)
|
alloy4fun_models/trashltl/models/12/oz9keCq89FbgTtZhG.als | Kaixi26/org.alloytools.alloy | 0 | 1040 | <reponame>Kaixi26/org.alloytools.alloy
open main
pred idoz9keCq89FbgTtZhG_prop13 {
always some f : File | f in Trash implies once f not in Trash
}
pred __repair { idoz9keCq89FbgTtZhG_prop13 }
check __repair { idoz9keCq89FbgTtZhG_prop13 <=> prop13o } |
Lista2/Lista2/Parte2/Programa14.asm | GustavoLR548/ACII-GLR | 1 | 6340 | .data
TEMP: .word 51
FLAG: .word -2
.text
#Pegando o endereco base da data
main:
ori $t0,$zero,0x1001 # t0 = 1001 # Observacao: t0 eh o vetor
sll $t0,$t0,16 # t0 = t0 *= 2^16 = 10010000
addi $t1,$zero, 30 # t1 = 0 + 30
addi $t2,$zero, 50 # t2 = 0 + 50
lw $s0,0($t0) # Resgatar o valor em "0(t0)"
#Primeiro Teste do AND
test1:
slt $t3, $s0, $t1 # se "s0" for menor do que "t1", t3 sera igual a 1 , caso contrario, sera igual a 0
beq $t3,$zero, test2 # va para a funcao "test2" se t3 for igual a zero
sw $zero,4($t0) # salve 0 na posicao "4" em "t0"
j fim
#Segundo Teste do AND
test2:
slt $t3, $t2, $s0 # se "t2" for menor do que "s0", t3 sera igual a 1 , caso contrario, sera igual a 0
beq $t3,$zero, verdade # va para a funcao "verdade" se "t3" for igual a zero
sw $zero,4($t0) # salve 0 na posicao "4" em "t0"
j fim
## if resp == true
verdade:
addi $s0, $zero, 1 # s0 = 1
sw $s0, 4($t0) # salve s0 na posicao "4" em "t0"
fim:
|
libsrc/_DEVELOPMENT/compress/aplib/z80/__aplib_getbit.asm | jpoikela/z88dk | 640 | 21862 | <reponame>jpoikela/z88dk
SECTION code_clib
SECTION code_compress_aplib
PUBLIC __aplib_getbit
EXTERN __aplib_var_bits
__aplib_getbit:
push bc
ld bc,(__aplib_var_bits)
rrc c
jr nc, l0
ld b,(hl)
inc hl
l0: ld a,c
and b
ld (__aplib_var_bits),bc
pop bc
ret
|
Cats/Category/Constructions/Exponential.agda | JLimperg/cats | 24 | 14189 | {-# OPTIONS --without-K --safe #-}
module Cats.Category.Constructions.Exponential where
open import Level
open import Cats.Category.Base
open import Cats.Category.Constructions.Product as Product using
(HasBinaryProducts)
open import Cats.Util.Conv
import Cats.Category.Constructions.Iso as Iso
import Cats.Category.Constructions.Unique as Unique
module Build {lo la l≈}
(Cat : Category lo la l≈)
{{hasBinaryProducts : HasBinaryProducts Cat}}
where
open Category Cat
open ≈-Reasoning
open Unique.Build Cat
open Iso.Build Cat
open HasBinaryProducts hasBinaryProducts
open _≅_
record Exp (B C : Obj) : Set (lo ⊔ la ⊔ l≈) where
field
Cᴮ : Obj
eval : Cᴮ × B ⇒ C
curry′ : ∀ {A} (f : A × B ⇒ C)
→ ∃![ f̃ ∈ A ⇒ Cᴮ ] (eval ∘ ⟨ f̃ × id ⟩ ≈ f)
curry : ∀ {A} → A × B ⇒ C → A ⇒ Cᴮ
curry f = curry′ f ⃗
eval-curry : ∀ {A} {f : A × B ⇒ C}
→ eval ∘ ⟨ curry f × id ⟩ ≈ f
eval-curry {f = f} = ∃!′.prop (curry′ f)
curry-unique : ∀ {A} {f : A × B ⇒ C} {g}
→ eval ∘ ⟨ g × id ⟩ ≈ f
→ curry f ≈ g
curry-unique {f = f} = ∃!′.unique (curry′ f)
uncurry : ∀ {A} → A ⇒ Cᴮ → A × B ⇒ C
uncurry f = eval ∘ ⟨ f × id ⟩
curry∘uncurry : ∀ {A} {f : A ⇒ Cᴮ}
→ curry (uncurry f) ≈ f
curry∘uncurry = curry-unique ≈.refl
uncurry∘curry : ∀ {A} {f : A × B ⇒ C}
→ uncurry (curry f) ≈ f
uncurry∘curry = eval-curry
instance HasObj-Exp : ∀ {B C} → HasObj (Exp B C) lo la l≈
HasObj-Exp = record { Cat = Cat ; _ᴼ = Exp.Cᴮ }
open Exp public
curry∘curry : ∀ {A B C Y Z} (Cᴮ : Exp B C) (Yᶻ : Exp Y Z)
→ {f : Cᴮ ᴼ × Y ⇒ Z} {g : A × B ⇒ C}
→ curry Yᶻ f ∘ curry Cᴮ g ≈ curry Yᶻ (f ∘ ⟨ curry Cᴮ g × id ⟩)
curry∘curry Cᴮ Yᶻ {f} {g} = ≈.sym (curry-unique Yᶻ (
begin
eval Yᶻ ∘ ⟨ curry Yᶻ f ∘ curry Cᴮ g × id ⟩
≈⟨ ∘-resp-r (⟨×⟩-resp ≈.refl (≈.sym id-l)) ⟩
eval Yᶻ ∘ ⟨ curry Yᶻ f ∘ curry Cᴮ g × id ∘ id ⟩
≈⟨ ∘-resp-r (≈.sym ⟨×⟩-∘) ⟩
eval Yᶻ ∘ ⟨ curry Yᶻ f × id ⟩ ∘ ⟨ curry Cᴮ g × id ⟩
≈⟨ unassoc ⟩
(eval Yᶻ ∘ ⟨ curry Yᶻ f × id ⟩) ∘ ⟨ curry Cᴮ g × id ⟩
≈⟨ ∘-resp-l (eval-curry Yᶻ) ⟩
f ∘ ⟨ curry Cᴮ g × id ⟩
∎
))
Exp-resp-≅ : ∀ {A A′ B B′}
→ A ≅ A′
→ B ≅ B′
→ (E : Exp A B) (E′ : Exp A′ B′)
→ E ᴼ ≅ E′ ᴼ
Exp-resp-≅ A≅A′ B≅B′ E E′ = record
{ forth = curry E′ (B≅B′ .forth ∘ eval E ∘ ⟨ id × A≅A′ .back ⟩)
; back = curry E (B≅B′ .back ∘ eval E′ ∘ ⟨ id × A≅A′ .forth ⟩)
-- Today in our series on 'trivial' properties (also copy-and-paste
-- programming).
; back-forth = ≈.trans (curry∘curry E′ E)
(curry-unique E (≈.trans (∘-resp-r ⟨×⟩-id) (≈.trans id-r
(≈.sym (≈.trans assoc (≈.trans (∘-resp-r (≈.trans assoc (≈.trans
(∘-resp-r (≈.trans ⟨×⟩-∘
(≈.trans (⟨×⟩-resp (≈.trans id-l (≈.sym id-r)) (≈.trans id-r (≈.sym id-l)))
(≈.sym ⟨×⟩-∘)))) (≈.trans unassoc (∘-resp-l (eval-curry E′))))))
(≈.trans unassoc (≈.trans (∘-resp-l (≈.trans unassoc
(≈.trans (∘-resp-l (B≅B′ .back-forth)) id-l)))
(≈.trans assoc (≈.trans (∘-resp-r (≈.trans ⟨×⟩-∘
(≈.trans (⟨×⟩-resp id-l (A≅A′ .back-forth)) ⟨×⟩-id))) id-r))))))))))
; forth-back = ≈.trans (curry∘curry E E′)
(curry-unique E′ (≈.trans (∘-resp-r ⟨×⟩-id) (≈.trans id-r
(≈.sym (≈.trans assoc (≈.trans (∘-resp-r (≈.trans assoc (≈.trans
(∘-resp-r (≈.trans ⟨×⟩-∘
(≈.trans (⟨×⟩-resp (≈.trans id-l (≈.sym id-r)) (≈.trans id-r (≈.sym id-l)))
(≈.sym ⟨×⟩-∘)))) (≈.trans unassoc (∘-resp-l (eval-curry E))))))
(≈.trans unassoc (≈.trans (∘-resp-l (≈.trans unassoc
(≈.trans (∘-resp-l (B≅B′ .forth-back)) id-l)))
(≈.trans assoc (≈.trans (∘-resp-r (≈.trans ⟨×⟩-∘
(≈.trans (⟨×⟩-resp id-l (A≅A′ .forth-back)) ⟨×⟩-id))) id-r))))))))))
}
record HasExponentials {lo la l≈}
(Cat : Category lo la l≈)
: Set (lo ⊔ la ⊔ l≈)
where
private open module Bld = Build Cat using (Exp)
open Category Cat
open Unique.Build Cat
open Iso.Build Cat
infixr 1 _↝′_ _↝_
field
{{hasBinaryProducts}} : HasBinaryProducts Cat
_↝′_ : ∀ B C → Exp B C
open HasBinaryProducts hasBinaryProducts
_↝_ : Obj → Obj → Obj
B ↝ C = (B ↝′ C) ᴼ
eval : ∀ {B C} → (B ↝ C) × B ⇒ C
eval {B} {C} = Bld.eval (B ↝′ C)
curry : ∀ {A B C} → A × B ⇒ C → A ⇒ B ↝ C
curry {B = B} {C} f = Bld.curry (B ↝′ C) f
uncurry : ∀ {A B C} → A ⇒ B ↝ C → A × B ⇒ C
uncurry {B = B} {C} = Bld.uncurry (B ↝′ C)
eval-curry : ∀ {A B C} {f : A × B ⇒ C}
→ eval ∘ ⟨ curry f × id ⟩ ≈ f
eval-curry {B = B} {C} = Bld.eval-curry (B ↝′ C)
curry-unique : ∀ {A B C} {f : A × B ⇒ C} {g}
→ eval ∘ ⟨ g × id ⟩ ≈ f
→ curry f ≈ g
curry-unique {B = B} {C} = Bld.curry-unique (B ↝′ C)
curry∘uncurry : ∀ {A B C} {f : A ⇒ B ↝ C}
→ curry (uncurry f) ≈ f
curry∘uncurry {B = B} {C} = Bld.curry∘uncurry (B ↝′ C)
uncurry∘curry : ∀ {A B C} {f : A × B ⇒ C}
→ uncurry (curry f) ≈ f
uncurry∘curry {B = B} {C} = Bld.uncurry∘curry (B ↝′ C)
curry∘curry : ∀ {A B C Y Z}
→ {f : (B ↝ C) × Y ⇒ Z} {g : A × B ⇒ C}
→ curry f ∘ curry g ≈ curry (f ∘ ⟨ curry g × id ⟩)
curry∘curry {B = B} {C} {Y} {Z} = Bld.curry∘curry (B ↝′ C) (Y ↝′ Z)
↝-resp-≅ : ∀ {A A′ B B′}
→ A ≅ A′
→ B ≅ B′
→ (A ↝ B) ≅ (A′ ↝ B′)
↝-resp-≅ {A} {A′} {B} {B′} A≅A′ B≅B′
= Bld.Exp-resp-≅ A≅A′ B≅B′ (A ↝′ B) (A′ ↝′ B′)
open Build public
|
source/rom30/r30_fadeLut.asm | evanbowman/Red | 5 | 22314 | SECTION "FADE_TO_WHITE_LUT", ROMX, BANK[30]
SprFadeToWhiteLut::
.blend_0::
DB $00,$00, $69,$72, $1A,$20, $03,$00,
DB $00,$00, $FF,$7F, $F8,$37, $5F,$19,
DB $00,$00, $B0,$61, $1A,$20, $03,$00,
DB $00,$00, $57,$73, $49,$2D, $21,$08,
DB $00,$00, $FF,$18, $49,$2D, $21,$08,
DB $00,$00, $00,$00, $00,$00, $00,$00,
DB $00,$00, $00,$00, $00,$00, $00,$00,
DB $BF,$05, $BF,$05, $BF,$05, $BF,$05,
.blend_0_end::
.blend_1::
DB $21,$04, $69,$72, $3A,$20, $23,$04,
DB $21,$04, $FF,$7F, $F8,$37, $5F,$19,
DB $21,$04, $B0,$61, $3A,$20, $23,$04,
DB $21,$04, $57,$73, $49,$2D, $21,$08,
DB $21,$04, $FF,$18, $49,$2D, $21,$08,
DB $21,$04, $21,$04, $21,$04, $21,$04,
DB $21,$04, $21,$04, $21,$04, $21,$04,
DB $BF,$05, $BF,$05, $BF,$05, $BF,$05,
.blend_1_end::
.blend_2::
DB $42,$08, $6A,$72, $5A,$24, $44,$08,
DB $42,$08, $FF,$7F, $F8,$3B, $7F,$1D,
DB $42,$08, $D0,$61, $5A,$24, $44,$08,
DB $42,$08, $57,$73, $6A,$31, $42,$0C,
DB $42,$08, $1F,$1D, $6A,$31, $42,$0C,
DB $42,$08, $42,$08, $42,$08, $42,$08,
DB $42,$08, $42,$08, $42,$08, $42,$08,
DB $DF,$09, $DF,$09, $DF,$09, $DF,$09,
.blend_2_end::
.blend_3::
DB $63,$0C, $8B,$72, $7A,$28, $65,$0C,
DB $63,$0C, $FF,$7F, $F8,$3B, $9F,$21,
DB $63,$0C, $D1,$61, $7A,$28, $65,$0C,
DB $63,$0C, $57,$73, $8B,$31, $63,$10,
DB $63,$0C, $3F,$21, $8B,$31, $63,$10,
DB $63,$0C, $63,$0C, $63,$0C, $63,$0C,
DB $63,$0C, $63,$0C, $63,$0C, $63,$0C,
DB $DF,$0D, $DF,$0D, $DF,$0D, $DF,$0D,
.blend_3_end::
.blend_4::
DB $84,$10, $8B,$72, $9A,$28, $86,$10,
DB $84,$10, $FF,$7F, $F8,$3F, $9F,$25,
DB $84,$10, $F1,$61, $9A,$28, $86,$10,
DB $84,$10, $58,$73, $8B,$35, $84,$14,
DB $84,$10, $5F,$25, $8B,$35, $84,$14,
DB $84,$10, $84,$10, $84,$10, $84,$10,
DB $84,$10, $84,$10, $84,$10, $84,$10,
DB $FF,$11, $FF,$11, $FF,$11, $FF,$11,
.blend_4_end::
.blend_5::
DB $A5,$14, $8C,$72, $BA,$2C, $A7,$14,
DB $A5,$14, $FF,$7F, $F9,$3F, $BF,$29,
DB $A5,$14, $F2,$65, $BA,$2C, $A7,$14,
DB $A5,$14, $58,$73, $AC,$39, $A5,$18,
DB $A5,$14, $5F,$29, $AC,$39, $A5,$18,
DB $A5,$14, $A5,$14, $A5,$14, $A5,$14,
DB $A5,$14, $A5,$14, $A5,$14, $A5,$14,
DB $FF,$15, $FF,$15, $FF,$15, $FF,$15,
.blend_5_end::
.blend_6::
DB $C6,$18, $AD,$72, $DA,$30, $C8,$18,
DB $C6,$18, $FF,$7F, $F9,$43, $DF,$29,
DB $C6,$18, $12,$66, $DA,$30, $C8,$18,
DB $C6,$18, $58,$73, $CD,$39, $C6,$1C,
DB $C6,$18, $7F,$29, $CD,$39, $C6,$1C,
DB $C6,$18, $C6,$18, $C6,$18, $C6,$18,
DB $C6,$18, $C6,$18, $C6,$18, $C6,$18,
DB $1F,$1A, $1F,$1A, $1F,$1A, $1F,$1A,
.blend_6_end::
.blend_7::
DB $E7,$1C, $AD,$72, $FB,$34, $E9,$1C,
DB $E7,$1C, $FF,$7F, $F9,$47, $DF,$2D,
DB $E7,$1C, $33,$66, $FB,$34, $E9,$1C,
DB $E7,$1C, $78,$73, $CD,$3D, $E7,$20,
DB $E7,$1C, $9F,$2D, $CD,$3D, $E7,$20,
DB $E7,$1C, $E7,$1C, $E7,$1C, $E7,$1C,
DB $E7,$1C, $E7,$1C, $E7,$1C, $E7,$1C,
DB $3F,$1E, $3F,$1E, $3F,$1E, $3F,$1E,
.blend_7_end::
.blend_8::
DB $08,$21, $CE,$72, $1B,$35, $0A,$21,
DB $08,$21, $FF,$7F, $F9,$47, $FF,$31,
DB $08,$21, $33,$66, $1B,$35, $0A,$21,
DB $08,$21, $79,$73, $EE,$41, $08,$25,
DB $08,$21, $BF,$31, $EE,$41, $08,$25,
DB $08,$21, $08,$21, $08,$21, $08,$21,
DB $08,$21, $08,$21, $08,$21, $08,$21,
DB $3F,$22, $3F,$22, $3F,$22, $3F,$22,
.blend_8_end::
.blend_9::
DB $29,$25, $CF,$72, $3B,$39, $2B,$25,
DB $29,$25, $FF,$7F, $FA,$4B, $1F,$36,
DB $29,$25, $54,$6A, $3B,$39, $2B,$25,
DB $29,$25, $79,$73, $0F,$42, $29,$29,
DB $29,$25, $BF,$35, $0F,$42, $29,$29,
DB $29,$25, $29,$25, $29,$25, $29,$25,
DB $29,$25, $29,$25, $29,$25, $29,$25,
DB $5F,$26, $5F,$26, $5F,$26, $5F,$26,
.blend_9_end::
.blend_10::
DB $4A,$29, $D0,$72, $5B,$3D, $4C,$29,
DB $4A,$29, $FF,$7F, $FA,$4B, $1F,$3A,
DB $4A,$29, $54,$6A, $5B,$3D, $4C,$29,
DB $4A,$29, $79,$73, $10,$46, $4A,$2D,
DB $4A,$29, $DF,$39, $10,$46, $4A,$2D,
DB $4A,$29, $4A,$29, $4A,$29, $4A,$29,
DB $4A,$29, $4A,$29, $4A,$29, $4A,$29,
DB $5F,$2A, $5F,$2A, $5F,$2A, $5F,$2A,
.blend_10_end::
.blend_11::
DB $6B,$2D, $F0,$76, $7B,$41, $6C,$2D,
DB $6B,$2D, $FF,$7F, $FA,$4F, $3F,$3A,
DB $6B,$2D, $75,$6A, $7B,$41, $6C,$2D,
DB $6B,$2D, $79,$77, $30,$4A, $6B,$31,
DB $6B,$2D, $FF,$39, $30,$4A, $6B,$31,
DB $6B,$2D, $6B,$2D, $6B,$2D, $6B,$2D,
DB $6B,$2D, $6B,$2D, $6B,$2D, $6B,$2D,
DB $7F,$2E, $7F,$2E, $7F,$2E, $7F,$2E,
.blend_11_end::
.blend_12::
DB $8C,$31, $F1,$76, $9B,$41, $8D,$31,
DB $8C,$31, $FF,$7F, $FA,$4F, $5F,$3E,
DB $8C,$31, $75,$6A, $9B,$41, $8D,$31,
DB $8C,$31, $7A,$77, $51,$4A, $8C,$35,
DB $8C,$31, $1F,$3E, $51,$4A, $8C,$35,
DB $8C,$31, $8C,$31, $8C,$31, $8C,$31,
DB $8C,$31, $8C,$31, $8C,$31, $8C,$31,
DB $7F,$32, $7F,$32, $7F,$32, $7F,$32,
.blend_12_end::
.blend_13::
DB $AD,$35, $12,$77, $BC,$45, $AE,$35,
DB $AD,$35, $DE,$7B, $DA,$53, $5E,$42,
DB $AD,$35, $96,$6A, $BC,$45, $AE,$35,
DB $AD,$35, $9A,$77, $52,$4E, $AD,$39,
DB $AD,$35, $3E,$42, $52,$4E, $AD,$39,
DB $AD,$35, $AD,$35, $AD,$35, $AD,$35,
DB $AD,$35, $AD,$35, $AD,$35, $AD,$35,
DB $9E,$36, $9E,$36, $9E,$36, $9E,$36,
.blend_13_end::
.blend_14::
DB $CE,$39, $12,$77, $DC,$49, $CF,$39,
DB $CE,$39, $FF,$7F, $FB,$57, $7F,$46,
DB $CE,$39, $B6,$6E, $DC,$49, $CF,$39,
DB $CE,$39, $9A,$77, $72,$52, $CE,$3D,
DB $CE,$39, $3F,$46, $72,$52, $CE,$3D,
DB $CE,$39, $CE,$39, $CE,$39, $CE,$39,
DB $CE,$39, $CE,$39, $CE,$39, $CE,$39,
DB $BF,$3A, $BF,$3A, $BF,$3A, $BF,$3A,
.blend_14_end::
.blend_15::
DB $EF,$3D, $13,$77, $FC,$4D, $F0,$3D,
DB $EF,$3D, $FF,$7F, $FB,$57, $9F,$4A,
DB $EF,$3D, $B7,$6E, $FC,$4D, $F0,$3D,
DB $EF,$3D, $9A,$77, $93,$52, $EF,$41,
DB $EF,$3D, $5F,$4A, $93,$52, $EF,$41,
DB $EF,$3D, $EF,$3D, $EF,$3D, $EF,$3D,
DB $EF,$3D, $EF,$3D, $EF,$3D, $EF,$3D,
DB $BF,$3E, $BF,$3E, $BF,$3E, $BF,$3E,
.blend_15_end::
.blend_16::
DB $10,$42, $34,$77, $1C,$4E, $11,$42,
DB $10,$42, $FF,$7F, $FB,$5B, $9F,$4A,
DB $10,$42, $D7,$6E, $1C,$4E, $11,$42,
DB $10,$42, $9B,$77, $94,$56, $10,$42,
DB $10,$42, $7F,$4A, $94,$56, $10,$42,
DB $10,$42, $10,$42, $10,$42, $10,$42,
DB $10,$42, $10,$42, $10,$42, $10,$42,
DB $DF,$42, $DF,$42, $DF,$42, $DF,$42,
.blend_16_end::
.blend_17::
DB $31,$46, $35,$77, $3C,$52, $32,$46,
DB $31,$46, $FF,$7F, $FB,$5B, $BF,$4E,
DB $31,$46, $D8,$6E, $3C,$52, $32,$46,
DB $31,$46, $9B,$77, $B5,$56, $31,$46,
DB $31,$46, $9F,$4E, $B5,$56, $31,$46,
DB $31,$46, $31,$46, $31,$46, $31,$46,
DB $31,$46, $31,$46, $31,$46, $31,$46,
DB $DF,$46, $DF,$46, $DF,$46, $DF,$46,
.blend_17_end::
.blend_18::
DB $52,$4A, $35,$77, $5C,$56, $53,$4A,
DB $52,$4A, $FF,$7F, $FC,$5F, $DF,$52,
DB $52,$4A, $F8,$72, $5C,$56, $53,$4A,
DB $52,$4A, $9B,$77, $D5,$5A, $52,$4A,
DB $52,$4A, $9F,$52, $D5,$5A, $52,$4A,
DB $52,$4A, $52,$4A, $52,$4A, $52,$4A,
DB $52,$4A, $52,$4A, $52,$4A, $52,$4A,
DB $FF,$4A, $FF,$4A, $FF,$4A, $FF,$4A,
.blend_18_end::
.blend_19::
DB $73,$4E, $56,$77, $7D,$5A, $74,$4E,
DB $73,$4E, $FF,$7F, $FC,$63, $DF,$56,
DB $73,$4E, $19,$73, $7D,$5A, $74,$4E,
DB $73,$4E, $BB,$77, $D6,$5E, $73,$4E,
DB $73,$4E, $BF,$56, $D6,$5E, $73,$4E,
DB $73,$4E, $73,$4E, $73,$4E, $73,$4E,
DB $73,$4E, $73,$4E, $73,$4E, $73,$4E,
DB $1F,$4F, $1F,$4F, $1F,$4F, $1F,$4F,
.blend_19_end::
.blend_20::
DB $94,$52, $57,$77, $9D,$5A, $95,$52,
DB $94,$52, $FF,$7F, $FC,$63, $FF,$5A,
DB $94,$52, $19,$73, $9D,$5A, $95,$52,
DB $94,$52, $BC,$77, $F7,$5E, $94,$52,
DB $94,$52, $DF,$5A, $F7,$5E, $94,$52,
DB $94,$52, $94,$52, $94,$52, $94,$52,
DB $94,$52, $94,$52, $94,$52, $94,$52,
DB $1F,$53, $1F,$53, $1F,$53, $1F,$53,
.blend_20_end::
.blend_21::
DB $B5,$56, $77,$7B, $BD,$5E, $B5,$56,
DB $B5,$56, $FF,$7F, $FC,$67, $1F,$5B,
DB $B5,$56, $3A,$73, $BD,$5E, $B5,$56,
DB $B5,$56, $BC,$7B, $17,$63, $B5,$56,
DB $B5,$56, $FF,$5A, $17,$63, $B5,$56,
DB $B5,$56, $B5,$56, $B5,$56, $B5,$56,
DB $B5,$56, $B5,$56, $B5,$56, $B5,$56,
DB $3F,$57, $3F,$57, $3F,$57, $3F,$57,
.blend_21_end::
.blend_22::
DB $D6,$5A, $78,$7B, $DD,$62, $D6,$5A,
DB $D6,$5A, $FF,$7F, $FC,$67, $1F,$5F,
DB $D6,$5A, $3A,$73, $DD,$62, $D6,$5A,
DB $D6,$5A, $BC,$7B, $18,$67, $D6,$5A,
DB $D6,$5A, $1F,$5F, $18,$67, $D6,$5A,
DB $D6,$5A, $D6,$5A, $D6,$5A, $D6,$5A,
DB $D6,$5A, $D6,$5A, $D6,$5A, $D6,$5A,
DB $3F,$5B, $3F,$5B, $3F,$5B, $3F,$5B,
.blend_22_end::
.blend_23::
DB $F7,$5E, $79,$7B, $FD,$66, $F7,$5E,
DB $F7,$5E, $FF,$7F, $FD,$6B, $3F,$63,
DB $F7,$5E, $5B,$77, $FD,$66, $F7,$5E,
DB $F7,$5E, $BC,$7B, $39,$67, $F7,$5E,
DB $F7,$5E, $1F,$63, $39,$67, $F7,$5E,
DB $F7,$5E, $F7,$5E, $F7,$5E, $F7,$5E,
DB $F7,$5E, $F7,$5E, $F7,$5E, $F7,$5E,
DB $5F,$5F, $5F,$5F, $5F,$5F, $5F,$5F,
.blend_23_end::
.blend_24::
DB $18,$63, $9A,$7B, $1D,$67, $18,$63,
DB $18,$63, $FF,$7F, $FD,$6B, $5F,$67,
DB $18,$63, $5B,$77, $1D,$67, $18,$63,
DB $18,$63, $BD,$7B, $5A,$6B, $18,$63,
DB $18,$63, $3F,$67, $5A,$6B, $18,$63,
DB $18,$63, $18,$63, $18,$63, $18,$63,
DB $18,$63, $18,$63, $18,$63, $18,$63,
DB $5F,$63, $5F,$63, $5F,$63, $5F,$63,
.blend_24_end::
.blend_25::
DB $39,$67, $9A,$7B, $3E,$6B, $39,$67,
DB $39,$67, $FF,$7F, $FD,$6F, $5F,$6B,
DB $39,$67, $7C,$77, $3E,$6B, $39,$67,
DB $39,$67, $DD,$7B, $5A,$6F, $39,$67,
DB $39,$67, $5F,$6B, $5A,$6F, $39,$67,
DB $39,$67, $39,$67, $39,$67, $39,$67,
DB $39,$67, $39,$67, $39,$67, $39,$67,
DB $7F,$67, $7F,$67, $7F,$67, $7F,$67,
.blend_25_end::
.blend_26::
DB $5A,$6B, $BB,$7B, $5E,$6F, $5A,$6B,
DB $5A,$6B, $FF,$7F, $FD,$73, $7F,$6B,
DB $5A,$6B, $9C,$77, $5E,$6F, $5A,$6B,
DB $5A,$6B, $DD,$7B, $7B,$6F, $5A,$6B,
DB $5A,$6B, $7F,$6B, $7B,$6F, $5A,$6B,
DB $5A,$6B, $5A,$6B, $5A,$6B, $5A,$6B,
DB $5A,$6B, $5A,$6B, $5A,$6B, $5A,$6B,
DB $9F,$6B, $9F,$6B, $9F,$6B, $9F,$6B,
.blend_26_end::
.blend_27::
DB $7B,$6F, $BC,$7B, $7E,$73, $7B,$6F,
DB $7B,$6F, $FF,$7F, $FE,$73, $9F,$6F,
DB $7B,$6F, $9D,$7B, $7E,$73, $7B,$6F,
DB $7B,$6F, $DD,$7B, $9C,$73, $7B,$6F,
DB $7B,$6F, $7F,$6F, $9C,$73, $7B,$6F,
DB $7B,$6F, $7B,$6F, $7B,$6F, $7B,$6F,
DB $7B,$6F, $7B,$6F, $7B,$6F, $7B,$6F,
DB $9F,$6F, $9F,$6F, $9F,$6F, $9F,$6F,
.blend_27_end::
.blend_28::
DB $9C,$73, $BC,$7B, $9E,$73, $9C,$73,
DB $9C,$73, $FF,$7F, $FE,$77, $9F,$73,
DB $9C,$73, $BD,$7B, $9E,$73, $9C,$73,
DB $9C,$73, $DE,$7B, $9C,$77, $9C,$73,
DB $9C,$73, $9F,$73, $9C,$77, $9C,$73,
DB $9C,$73, $9C,$73, $9C,$73, $9C,$73,
DB $9C,$73, $9C,$73, $9C,$73, $9C,$73,
DB $BF,$73, $BF,$73, $BF,$73, $BF,$73,
.blend_28_end::
.blend_29::
DB $BD,$77, $DD,$7B, $BE,$77, $BD,$77,
DB $BD,$77, $FF,$7F, $FE,$77, $BF,$77,
DB $BD,$77, $BE,$7B, $BE,$77, $BD,$77,
DB $BD,$77, $DE,$7B, $BD,$77, $BD,$77,
DB $BD,$77, $BF,$77, $BD,$77, $BD,$77,
DB $BD,$77, $BD,$77, $BD,$77, $BD,$77,
DB $BD,$77, $BD,$77, $BD,$77, $BD,$77,
DB $BF,$77, $BF,$77, $BF,$77, $BF,$77,
.blend_29_end::
.blend_30::
DB $DE,$7B, $DE,$7B, $DE,$7B, $DE,$7B,
DB $DE,$7B, $FF,$7F, $FE,$7B, $DF,$7B,
DB $DE,$7B, $DE,$7B, $DE,$7B, $DE,$7B,
DB $DE,$7B, $DE,$7B, $DE,$7B, $DE,$7B,
DB $DE,$7B, $DF,$7B, $DE,$7B, $DE,$7B,
DB $DE,$7B, $DE,$7B, $DE,$7B, $DE,$7B,
DB $DE,$7B, $DE,$7B, $DE,$7B, $DE,$7B,
DB $DF,$7B, $DF,$7B, $DF,$7B, $DF,$7B,
.blend_30_end::
.blend_31::
DB $FF,$7F, $FF,$7F, $FF,$7F, $FF,$7F,
DB $FF,$7F, $FF,$7F, $FF,$7F, $FF,$7F,
DB $FF,$7F, $FF,$7F, $FF,$7F, $FF,$7F,
DB $FF,$7F, $FF,$7F, $FF,$7F, $FF,$7F,
DB $FF,$7F, $FF,$7F, $FF,$7F, $FF,$7F,
DB $FF,$7F, $FF,$7F, $FF,$7F, $FF,$7F,
DB $FF,$7F, $FF,$7F, $FF,$7F, $FF,$7F,
DB $FF,$7F, $FF,$7F, $FF,$7F, $FF,$7F,
.blend_31_end::
BkgFadeToWhiteLut::
.blend_0::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $BF,$73, $53,$5E, $2A,$39, $86,$18,
DB $BF,$73, $EC,$31, $54,$62, $06,$2D,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $BF,$73, $53,$5E, $AD,$24, $27,$6A,
DB $BF,$73, $27,$6A, $43,$59, $14,$36,
DB $BF,$73, $5F,$4B, $55,$36, $00,$00,
DB $00,$00, $00,$00, $00,$00, $00,$00,
.blend_0_end::
.blend_1::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $BF,$73, $53,$5E, $2A,$39, $86,$18,
DB $BF,$73, $EC,$31, $54,$62, $06,$2D,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $BF,$73, $53,$5E, $AD,$24, $27,$6A,
DB $BF,$73, $27,$6A, $43,$59, $14,$36,
DB $BF,$73, $5F,$4B, $55,$36, $21,$04,
DB $21,$04, $21,$04, $21,$04, $21,$04,
.blend_1_end::
.blend_2::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $BF,$73, $53,$5E, $4B,$3D, $A7,$1C,
DB $BF,$73, $0D,$36, $54,$62, $27,$31,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $BF,$73, $53,$5E, $CE,$28, $28,$6A,
DB $BF,$73, $28,$6A, $64,$59, $14,$3A,
DB $BF,$73, $5F,$4B, $55,$3A, $42,$08,
DB $42,$08, $42,$08, $42,$08, $42,$08,
.blend_2_end::
.blend_3::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $BF,$73, $74,$5E, $6C,$3D, $C8,$20,
DB $BF,$73, $0D,$36, $75,$62, $48,$31,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $BF,$73, $74,$5E, $EE,$2C, $49,$6A,
DB $BF,$73, $49,$6A, $85,$59, $35,$3A,
DB $BF,$73, $5F,$4F, $75,$3A, $63,$0C,
DB $63,$0C, $63,$0C, $63,$0C, $63,$0C,
.blend_3_end::
.blend_4::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $BF,$73, $74,$62, $6C,$41, $E9,$24,
DB $BF,$73, $2E,$3A, $75,$62, $49,$35,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $BF,$73, $74,$62, $0F,$2D, $4A,$6A,
DB $BF,$73, $4A,$6A, $86,$5D, $35,$3E,
DB $BF,$73, $5F,$4F, $76,$3E, $84,$10,
DB $84,$10, $84,$10, $84,$10, $84,$10,
.blend_4_end::
.blend_5::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $BF,$73, $94,$62, $8D,$41, $0A,$29,
DB $BF,$73, $2F,$3E, $95,$66, $6A,$39,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $BF,$73, $94,$62, $2F,$31, $6A,$6A,
DB $BF,$73, $6A,$6A, $A7,$5D, $55,$3E,
DB $BF,$73, $5F,$53, $96,$3E, $A5,$14,
DB $A5,$14, $A5,$14, $A5,$14, $A5,$14,
.blend_5_end::
.blend_6::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $BF,$73, $95,$62, $AE,$45, $2A,$29,
DB $BF,$73, $4F,$3E, $96,$66, $8A,$39,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $BF,$73, $95,$62, $50,$35, $6B,$6A,
DB $BF,$73, $6B,$6A, $C8,$5D, $56,$42,
DB $BF,$73, $5F,$53, $96,$42, $C6,$18,
DB $C6,$18, $C6,$18, $C6,$18, $C6,$18,
.blend_6_end::
.blend_7::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $BF,$73, $95,$62, $AE,$45, $4B,$2D,
DB $BF,$73, $50,$42, $96,$66, $AB,$3D,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $BF,$73, $95,$62, $51,$35, $8C,$6E,
DB $BF,$73, $8C,$6E, $C9,$61, $76,$46,
DB $BF,$73, $7F,$53, $97,$46, $E7,$1C,
DB $E7,$1C, $E7,$1C, $E7,$1C, $E7,$1C,
.blend_7_end::
.blend_8::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $BF,$73, $B6,$66, $CF,$49, $4C,$31,
DB $BF,$73, $70,$42, $B6,$66, $AC,$41,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $BF,$73, $B6,$66, $71,$39, $8D,$6E,
DB $BF,$73, $8D,$6E, $EA,$61, $76,$46,
DB $BF,$73, $7F,$57, $B7,$46, $08,$21,
DB $08,$21, $08,$21, $08,$21, $08,$21,
.blend_8_end::
.blend_9::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $BF,$73, $B6,$66, $F0,$49, $6D,$35,
DB $BF,$73, $71,$46, $B7,$6A, $CD,$41,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $BF,$73, $B6,$66, $92,$3D, $AD,$6E,
DB $BF,$73, $AD,$6E, $0B,$62, $97,$4A,
DB $BF,$73, $7F,$57, $B7,$4A, $29,$25,
DB $29,$25, $29,$25, $29,$25, $29,$25,
.blend_9_end::
.blend_10::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $BF,$73, $D6,$66, $10,$4E, $8E,$39,
DB $BF,$73, $92,$4A, $D7,$6A, $EE,$45,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $BF,$73, $D6,$66, $B2,$41, $AE,$6E,
DB $BF,$73, $AE,$6E, $0C,$62, $97,$4A,
DB $BF,$73, $7F,$5B, $D8,$4A, $4A,$29,
DB $4A,$29, $4A,$29, $4A,$29, $4A,$29,
.blend_10_end::
.blend_11::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $BF,$77, $D7,$66, $11,$52, $AE,$39,
DB $BF,$77, $92,$4A, $D7,$6A, $0E,$4A,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $BF,$77, $D7,$66, $D3,$41, $AF,$6E,
DB $BF,$77, $AF,$6E, $2C,$66, $B7,$4E,
DB $BF,$77, $7F,$5B, $D8,$4E, $6B,$2D,
DB $6B,$2D, $6B,$2D, $6B,$2D, $6B,$2D,
.blend_11_end::
.blend_12::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $BF,$77, $F7,$6A, $32,$52, $CF,$3D,
DB $BF,$77, $B3,$4E, $F8,$6A, $0F,$4A,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $BF,$77, $F7,$6A, $F3,$45, $D0,$6E,
DB $BF,$77, $D0,$6E, $4D,$66, $B8,$4E,
DB $BF,$77, $7F,$5F, $F8,$4E, $8C,$31,
DB $8C,$31, $8C,$31, $8C,$31, $8C,$31,
.blend_12_end::
.blend_13::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $BE,$77, $F8,$6A, $52,$56, $F0,$41,
DB $BE,$77, $B3,$4E, $F8,$6A, $30,$4E,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $BE,$77, $F8,$6A, $F4,$49, $D1,$72,
DB $BE,$77, $D1,$72, $4E,$66, $D8,$52,
DB $BE,$77, $9E,$5F, $F9,$52, $AD,$35,
DB $AD,$35, $AD,$35, $AD,$35, $AD,$35,
.blend_13_end::
.blend_14::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $BF,$77, $F8,$6A, $53,$56, $11,$46,
DB $BF,$77, $D4,$52, $F8,$6E, $51,$52,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $BF,$77, $F8,$6A, $15,$4A, $F1,$72,
DB $BF,$77, $F1,$72, $6F,$6A, $D8,$56,
DB $BF,$77, $9F,$5F, $F9,$56, $CE,$39,
DB $CE,$39, $CE,$39, $CE,$39, $CE,$39,
.blend_14_end::
.blend_15::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $BF,$77, $18,$6B, $74,$5A, $32,$4A,
DB $BF,$77, $D5,$56, $19,$6F, $72,$52,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $BF,$77, $18,$6B, $35,$4E, $F2,$72,
DB $BF,$77, $F2,$72, $90,$6A, $F9,$56,
DB $BF,$77, $9F,$63, $19,$57, $EF,$3D,
DB $EF,$3D, $EF,$3D, $EF,$3D, $EF,$3D,
.blend_15_end::
.blend_16::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $DF,$77, $19,$6F, $94,$5A, $32,$4A,
DB $DF,$77, $F5,$56, $19,$6F, $72,$56,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $DF,$77, $19,$6F, $56,$52, $13,$73,
DB $DF,$77, $13,$73, $91,$6A, $F9,$5A,
DB $DF,$77, $9F,$63, $1A,$5B, $10,$42,
DB $10,$42, $10,$42, $10,$42, $10,$42,
.blend_16_end::
.blend_17::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $DF,$77, $39,$6F, $B5,$5E, $53,$4E,
DB $DF,$77, $F6,$5A, $3A,$6F, $93,$56,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $DF,$77, $39,$6F, $76,$56, $14,$73,
DB $DF,$77, $14,$73, $B2,$6A, $1A,$5B,
DB $DF,$77, $9F,$67, $3A,$5B, $31,$46,
DB $31,$46, $31,$46, $31,$46, $31,$46,
.blend_17_end::
.blend_18::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $DF,$77, $39,$6F, $B6,$5E, $74,$52,
DB $DF,$77, $17,$5F, $3A,$73, $B4,$5A,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $DF,$77, $39,$6F, $97,$56, $34,$73,
DB $DF,$77, $34,$73, $D3,$6E, $1A,$5F,
DB $DF,$77, $9F,$67, $3A,$5F, $52,$4A,
DB $52,$4A, $52,$4A, $52,$4A, $52,$4A,
.blend_18_end::
.blend_19::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $DF,$77, $3A,$6F, $D6,$62, $95,$56,
DB $DF,$77, $17,$5F, $3A,$73, $D5,$5E,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $DF,$77, $3A,$6F, $98,$5A, $35,$77,
DB $DF,$77, $35,$77, $D4,$6E, $3A,$63,
DB $DF,$77, $BF,$67, $3B,$63, $73,$4E,
DB $73,$4E, $73,$4E, $73,$4E, $73,$4E,
.blend_19_end::
.blend_20::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $DF,$77, $5A,$73, $F7,$62, $B6,$5A,
DB $DF,$77, $38,$63, $5B,$73, $D6,$5E,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $DF,$77, $5A,$73, $B8,$5E, $56,$77,
DB $DF,$77, $56,$77, $F5,$6E, $3B,$63,
DB $DF,$77, $BF,$6B, $5B,$63, $94,$52,
DB $94,$52, $94,$52, $94,$52, $94,$52,
.blend_20_end::
.blend_21::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $DF,$7B, $5B,$73, $F8,$66, $D6,$5A,
DB $DF,$7B, $38,$63, $5B,$73, $F6,$62,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $DF,$7B, $5B,$73, $D9,$5E, $57,$77,
DB $DF,$7B, $57,$77, $15,$73, $5B,$67,
DB $DF,$7B, $BF,$6B, $5B,$67, $B5,$56,
DB $B5,$56, $B5,$56, $B5,$56, $B5,$56,
.blend_21_end::
.blend_22::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $DF,$7B, $7B,$73, $18,$6B, $F7,$5E,
DB $DF,$7B, $59,$67, $7B,$73, $17,$67,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $DF,$7B, $7B,$73, $F9,$62, $58,$77,
DB $DF,$7B, $58,$77, $16,$73, $5B,$67,
DB $DF,$7B, $BF,$6F, $7C,$67, $D6,$5A,
DB $D6,$5A, $D6,$5A, $D6,$5A, $D6,$5A,
.blend_22_end::
.blend_23::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $DF,$7B, $7B,$73, $39,$6B, $18,$63,
DB $DF,$7B, $5A,$6B, $7C,$77, $38,$67,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $DF,$7B, $7B,$73, $1A,$67, $78,$77,
DB $DF,$7B, $78,$77, $37,$73, $7C,$6B,
DB $DF,$7B, $BF,$6F, $7C,$6B, $F7,$5E,
DB $F7,$5E, $F7,$5E, $F7,$5E, $F7,$5E,
.blend_23_end::
.blend_24::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $DF,$7B, $9C,$77, $5A,$6F, $19,$67,
DB $DF,$7B, $7A,$6B, $9C,$77, $39,$6B,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $DF,$7B, $9C,$77, $3A,$6B, $79,$77,
DB $DF,$7B, $79,$77, $58,$73, $7C,$6B,
DB $DF,$7B, $BF,$73, $9C,$6B, $18,$63,
DB $18,$63, $18,$63, $18,$63, $18,$63,
.blend_24_end::
.blend_25::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $DF,$7B, $9C,$77, $5A,$6F, $3A,$6B,
DB $DF,$7B, $7B,$6F, $9C,$77, $5A,$6F,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $DF,$7B, $9C,$77, $3B,$6B, $9A,$7B,
DB $DF,$7B, $9A,$7B, $59,$77, $9C,$6F,
DB $DF,$7B, $DF,$73, $9D,$6F, $39,$67,
DB $39,$67, $39,$67, $39,$67, $39,$67,
.blend_25_end::
.blend_26::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $DF,$7B, $9D,$77, $7B,$73, $5A,$6B,
DB $DF,$7B, $9B,$6F, $9D,$77, $7A,$6F,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $DF,$7B, $9D,$77, $5C,$6F, $9B,$7B,
DB $DF,$7B, $9B,$7B, $7A,$77, $9D,$73,
DB $DF,$7B, $DF,$73, $9D,$73, $5A,$6B,
DB $5A,$6B, $5A,$6B, $5A,$6B, $5A,$6B,
.blend_26_end::
.blend_27::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $DF,$7B, $BD,$77, $9C,$73, $7B,$6F,
DB $DF,$7B, $9C,$73, $BD,$7B, $9B,$73,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $DF,$7B, $BD,$77, $7C,$73, $BB,$7B,
DB $DF,$7B, $BB,$7B, $9B,$77, $BD,$73,
DB $DF,$7B, $DF,$77, $BD,$73, $7B,$6F,
DB $7B,$6F, $7B,$6F, $7B,$6F, $7B,$6F,
.blend_27_end::
.blend_28::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $DF,$7B, $BD,$7B, $9C,$77, $9C,$73,
DB $DF,$7B, $BD,$77, $BD,$7B, $9C,$77,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $DF,$7B, $BD,$7B, $9D,$73, $BC,$7B,
DB $DF,$7B, $BC,$7B, $9C,$7B, $BD,$77,
DB $DF,$7B, $DF,$77, $BE,$77, $9C,$73,
DB $9C,$73, $9C,$73, $9C,$73, $9C,$73,
.blend_28_end::
.blend_29::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $DF,$7B, $DE,$7B, $BD,$77, $BD,$77,
DB $DF,$7B, $BD,$77, $DE,$7B, $BD,$77,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $DF,$7B, $DE,$7B, $BD,$77, $DD,$7B,
DB $DF,$7B, $DD,$7B, $BD,$7B, $DE,$77,
DB $DF,$7B, $DF,$7B, $DE,$77, $BD,$77,
DB $BD,$77, $BD,$77, $BD,$77, $BD,$77,
.blend_29_end::
.blend_30::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $DF,$7B, $DE,$7B, $DE,$7B, $DE,$7B,
DB $DF,$7B, $DE,$7B, $DE,$7B, $DE,$7B,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $DF,$7B, $DE,$7B, $DE,$7B, $DE,$7B,
DB $DF,$7B, $DE,$7B, $DE,$7B, $DE,$7B,
DB $DF,$7B, $DF,$7B, $DE,$7B, $DE,$7B,
DB $DE,$7B, $DE,$7B, $DE,$7B, $DE,$7B,
.blend_30_end::
.blend_31::
DB $BF,$73, $1A,$20, $1A,$20, $00,$04,
DB $FF,$7F, $FF,$7F, $FF,$7F, $FF,$7F,
DB $FF,$7F, $FF,$7F, $FF,$7F, $FF,$7F,
DB $D7,$6A, $6B,$49, $00,$00, $00,$04,
DB $FF,$7F, $FF,$7F, $FF,$7F, $FF,$7F,
DB $FF,$7F, $FF,$7F, $FF,$7F, $FF,$7F,
DB $FF,$7F, $FF,$7F, $FF,$7F, $FF,$7F,
DB $FF,$7F, $FF,$7F, $FF,$7F, $FF,$7F,
.blend_31_end::
|
sdk-6.5.16/tools/led/example/lm12pcx456501.asm | copslock/broadcom_cpri | 0 | 172307 | ;
;
;
; This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
;
; Copyright 2007-2019 Broadcom Inc. All rights reserved.
;
;
; This is the default program for the 12 port 56501 based CX4 LM
; To start it, use the following commands from BCM:
;
; led load lm12pcx456504.hex
; led auto on
; led start
;
; There are 12 LEDS four each for 10G ports
; There is one bit per 10G LED with the following colors:
; ZERO Black
; ONE Green
;
; Each chip drives only its own LEDs and needs to write them in the order:
; L25,T25, R25, E25, ..., L28,T28, R28, E28
;
; Link up/down info cannot be derived from LINKEN or LINKUP, as the LED
; processor does not always have access to link status. This program
; assumes link status is kept current in bit 0 of RAM byte (0x80 + portnum).
; Generally, a program running on the main CPU must update these
; locations on link change; see linkscan callback in
; $SDK/src/appl/diag/ledproc.c.
;
; Current implementation:
;
; L25-L28 reflects 10G link status:
; Black: no link
; Green: Link
; T25-T28 reflects port 25-28 TX activity
; Black: idle
; Green: TX (pulse extended to 1/3 sec)
; R25-R28 reflects port 25-28 RX activity
; Black: idle
; Green: RX (pulse extended to 1/3 sec)
; E25-E28 reflects 10G link enable
; Black: Disable
; Green: Enable
;
TICKS EQU 1
SECOND_TICKS EQU (30*TICKS)
MIN_GE_PORT EQU 0
MAX_GE_PORT EQU 23
NUM_GE_PORT EQU 24
MIN_HG_PORT EQU 24
MAX_HG_PORT EQU 27
NUM_HG_PORT EQU 4
NUM_ALL_PORT EQU 28
MIN_PORT EQU 0
MAX_PORT EQU 27
NUM_PORT EQU 28
; The TX/RX activity lights will be extended for ACT_EXT_TICKS
; so they will be more visible.
ACT_EXT_TICKS EQU (SECOND_TICKS/3)
GIG_ALT_TICKS EQU (SECOND_TICKS/2)
HD_OFF_TICKS EQU (SECOND_TICKS/20)
HD_ON_TICKS EQU (SECOND_TICKS-HD_ON_TICKS)
TXRX_ALT_TICKS EQU (SECOND_TICKS/6)
;
; Main Update Routine
;
; This routine is called once per tick.
;
update:
; Put out 12 bits for 10G port
ld a, MIN_HG_PORT
up1_5:
port a
; LINKUP TX, RX, LINKEN
pushst LINKUP
call get_link
jnc link_down
tinv
link_down:
pack
pushst TX
tinv
pack
pushst RX
tinv
pack
pushst LINKEN
tinv
pack
inc a
cmp a,NUM_ALL_PORT
jnz up1_5
send 12 ; 1 * 4 * 3 = 12
;
; get_link
;
; This routine finds the link status LED for a port.
; Link info is in bit 0 of the byte read from PORTDATA[port]
;
; Inputs: Port number in a
; Outputs: Carry flag set if link is up, clear if link is down.
; Destroys: a, b
;
get_link:
ld b,PORTDATA
add b,a
ld b,(b)
tst b,0
ret
;
; Variables (SDK software initializes LED memory from 0x80-0xff to 0)
;
TXRX_ALT_COUNT equ 0xe0
HD_COUNT equ 0xe1
GIG_ALT_COUNT equ 0xe2
PORT_NUM equ 0xe3
;
; Port data, which must be updated continually by main CPU's
; linkscan task. See $SDK/src/appl/diag/ledproc.c for examples.
; In this program, bit 0 is assumed to contain the link up/down status.
;
PORTDATA equ 0x80 ; Size 24 + 4? bytes
;
; LED extension timers
;
RX_TIMERS equ 0xa0+0 ; NUM_PORT bytes
TX_TIMERS equ 0xa0+NUM_PORT ; NUM_PORT bytes
;
; Symbolic names for the bits of the port status fields
;
RX equ 0x0 ; received packet
TX equ 0x1 ; transmitted packet
COLL equ 0x2 ; collision indicator
SPEED_C equ 0x3 ; 100 Mbps
SPEED_M equ 0x4 ; 1000 Mbps
DUPLEX equ 0x5 ; half/full duplex
FLOW equ 0x6 ; flow control capable
LINKUP equ 0x7 ; link down/up status
LINKEN equ 0x8 ; link disabled/enabled status
ZERO equ 0xE ; always 0
ONE equ 0xF ; always 1
|
1-base/math/source/generic/pure/geometry/any_math-any_geometry.ads | charlie5/lace | 20 | 6613 | generic
package any_Math.any_Geometry
--
-- Provides a namespace and core types for geometry.
--
is
pragma Pure;
subtype Vertex_Id is Index;
type Vertex_Ids is array (Index range <>) of Vertex_Id;
subtype Triangle is Vertex_Ids (1 .. 3);
type Triangles is array (Index range <>) of Triangle;
function Image (Self : in Triangle) return String;
function Image (Self : in Triangles) return String;
--------
-- Model
--
type Model_Options is tagged null record;
default_Model_Options : constant Model_Options;
type Model_Triangles (Triangle_Count : Index) is tagged
record
Triangles : any_Geometry.Triangles (1 .. Triangle_Count);
end record;
function Image (Self : in Model_Triangles) return String;
type Model is abstract tagged
record
Triangles : access Model_Triangles'Class;
end record;
function Image (Self : in Model) return String;
----------------
-- Geometry Item
--
type Item is abstract tagged private;
procedure destroy (Self : in out Item) is abstract;
procedure expand (Self : access Item; By : in Real) is abstract;
private
type Item is abstract tagged
record
null;
end record;
default_Model_Options : constant Model_Options := (others => <>);
end any_Math.any_Geometry;
|
programs/oeis/132/A132297.asm | neoneye/loda | 22 | 82482 | ; A132297: Number of distinct Markov type classes of order 2 possible in binary strings of length n.
; 4,7,12,18,26,35,46,58,72,87,104,122,142,163,186,210,236,263,292
add $0,1
lpb $0
add $1,$0
cmp $2,0
mul $2,$0
sub $0,1
add $1,$2
lpe
add $1,2
mov $0,$1
|
oeis/206/A206248.asm | neoneye/loda-programs | 11 | 26008 | <reponame>neoneye/loda-programs
; A206248: Number of (n+1) X 2 0..3 arrays with every 2 X 2 subblock having zero permanent.
; 49,361,1600,9409,47089,258064,1343281,7198489,37945600,201895681,1068570721,5672499856,30061664689,159465247561,845443470400,4483691905729,23774527583569,126075439502224,668536407557041,3545138659498489,18798954662118400,99686999558415361,528616710372623041,2803139060314279696,14864407777651380529,78822648654316056361,417978733320595240000,2216447707137586362049,11753324114730954806449,62325243144918784090384,330496773863731762263601,1752550262096216678364889,9293380769836840690182400
add $0,3
seq $0,228661 ; Number of 2Xn binary arrays with top left value 1 and no two ones adjacent horizontally, diagonally or antidiagonally.
pow $0,2
div $0,4
|
linear_algebra/banded_lu.ads | jscparker/math_packages | 30 | 16185 | <reponame>jscparker/math_packages<gh_stars>10-100
---------------------------------------------------------------------------------
-- package Banded_LU, LU decomposition, equation solving for banded matrices
-- Copyright (C) 1995-2018 <NAME>
--
-- Permission to use, copy, modify, and/or distribute this software for any
-- purpose with or without fee is hereby granted, provided that the above
-- copyright notice and this permission notice appear in all copies.
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
---------------------------------------------------------------------------------
-- PACKAGE Banded_LU
--
-- LU decomposition and linear equation solving for banded matrices.
-- Uses Crout's method for LU decomposition of real valued matrices.
-- There's no pivoting, so iterative refinement is provided.
-- Iterative refinement can improve accuracy of equation solving
-- in cases in which the matrices are not diagonally dominant.
--
-- The decomposition can be performed on diagonal sub-blocks of
-- the matrix. (The block size must be > bandwidwidth of the matrix
-- or Constraint_Error is raised.)
--
-- Diagonally dominant matrices are a special class that doesn't need
-- pivoting in LU decomposition. A matrix is diagonally dominant if and
-- only if the absolute val of each diagonal element is > or = the sum
-- of the absolute vals of each off-diagonal on the same row as that diagonal
-- element.
--
-- In many cases non diagonally-dominant matrices are successfully
-- handled by this package, but more error accumulates than would
-- be present if we could do pivoting.
-- Procedure Refine_Solution does Newton iterations to reduce the error
-- in these solutions. Examples are provided in the test procedure.
--
-- The banded matrix is constructed as an array of row vectors.
-- Typically, the length of the row is very much smaller than the number
-- of rows. For example, if the matrix is tri-diagonal, then each row vector
-- has only three element. The middle element is the central diagonal of the
-- matrix.
--
-- The LU form of A can then be used to solve simultaneous linear
-- equations of the form A X = B. The column vector B is input
-- into procedure Solve, and the solution is returned as X.
--
--
-- PROCEDURE LU_decompose
--
-- matrix A:
-- To correctly construct A remember that the 1st index identifies the
-- row of the matrix element. The 2nd index of A is
-- is the Diagonal_ID, which is 0 for the central diagonal, and
-- negative for the lower diagonals. Diagonal_ID - Col - Row.
--
-- Final_Index:
-- The routine operates on a subset of full matrix. The subset
-- matrix starts at Starting_Index, and ends at Final_Index.
-- The matrix to be decomposed is logically (M X M) where
-- M = Final_Index - Starting_Index + 1. It is assumed that all
-- off-diagonals beyond No_Of_Off_Diagonals are 0.0.
--
--
-- PROCEDURE Solve
--
-- Solves for X in the equation A X = B. The matrix A_LU is
-- LU of A. In other words L*U = A, L is stored in the lower triangular
-- regions of A_LU, and U in the upper. (The original matrix A was written
-- over with LU.) The output of LU_Decompose is in suitable form for "Solve".
--
--
-- BANDED MATRIX FORMAT
--
-- You translate (Row, Col) to (I, Diagonal_id)
-- using the formula: I = Row, and Diagonal_id = Col - Row.
--
-- The banded matrix looks like:
--
-- Matrix (Row)(Diagonal_id)
--
-- where Diagonal_id is in
--
-- type Diag_Index is range -No_Of_Off_Diagonals..No_Of_Off_Diagonals;
--
-- and the matrix element at (Row, Col) has Diagonal_id = Col - Row.
--
-- Here is matrix-vector multiplication:
--
-- for Row in Index loop
-- Sum := 0.0;
-- Start := Max(Diag_Index'First + Row, Index'First)
-- Finish := Min(Diag_Index'Last + Row, Index'Last)
-- for Col in Start..Finish loop
-- Sum := Sum + Matrix(Row)(Col - Row) * Vector(Col);
-- end loop;
-- Result(Row) = Sum;
-- end loop;
--
-- Notice the outer index varies fastest this way, as Ada prefers.
--
generic
type Real is digits <>;
Max_Size_Of_Matrix : Positive;
No_Of_Off_Diagonals : Positive;
-- If this is 1, then if the matrix is tri-diagonal. Must be less than
-- Max_Size_Of_Matrix. If it equals or excedes Max_Size_Of_Matrix, then
-- an assertion will detect failure. Notice 0 off_diagonals not allowed.
package Banded_LU is
pragma Assert (No_Of_Off_Diagonals < Max_Size_Of_Matrix);
-- Number of off-diagonals must be less than size of matrix.
subtype Index is Integer range 0..Max_Size_Of_Matrix-1;
subtype Diag_Index is Integer range
-No_Of_Off_Diagonals..No_Of_Off_Diagonals;
-- There's arithmetic between these 2 indices, so we make them both type
-- Integer. We also use fact that Diagonal_ID is symmetric about 0.
type Row_Vector is array(Diag_Index) of Real;
type Banded_Matrix is array(Index) of Row_Vector;
-- The (Row, Col) element of the matrix is found at Matrix(Row)(Col - Row).
type Column is array(Index) of Real;
-- A column vector.
procedure LU_Decompose
(A : in out Banded_Matrix;
Diag_Inverse : out Column;
Final_Index : in Index := Index'Last;
Starting_Index : in Index := Index'First);
procedure Solve
(X : out Column;
B : in Column;
A_LU : in Banded_Matrix;
Diag_Inverse : in Column;
Final_Index : in Index := Index'Last;
Starting_Index : in Index := Index'First);
-- Solves for X in A*X = B. A_LU is the LU decomp of A, as returned by
-- LU_Decompose in matrix A.
procedure Refine_Solution
(X : out Column;
B : in Column;
A_LU : in Banded_Matrix;
Diag_Inverse : in Column;
A : in Banded_Matrix;
No_Of_Iterations : in Natural := 1;
Final_Index : in Index := Index'Last;
Starting_Index : in Index := Index'First);
-- Attempts to improve the numerical quality of solution of the linear
-- equations by use of Newton iteration.
-- (No pivoting is done in this version.)
function Matrix_Val
(A : Banded_Matrix;
Row : Index;
Col : Index)
return Real;
-- Given (Row, Column) the function returns the matrix element at
-- that location. Translates (Row, Col) to (I, Diagonal_id) using
-- the formula I = Row, and Diagonal_id = Col - Row.
--
-- Banded Matrices are by definition 0 everywhere except on the diagonal
-- bands. So 0 is returned if (Row, Col) is not in the banded region.
function Product
(A : in Banded_Matrix;
X : in Column;
Final_Index : in Index := Index'Last;
Starting_Index : in Index := Index'First)
return Column;
-- Multiplies a banded matrix by a column vector X.
-- Operates only on the diagonal block bounded by
-- Starting_Row = Starting_Index, and Final_Row = Final_Index.
private
Zero : constant Real := +0.0;
One : constant Real := +1.0;
Two : constant Real := +2.0;
Min_Allowed_Real : constant Real := Two ** (Real'Machine_Emin/4 + 2);
end Banded_LU;
|
src/numerics-sparse_matrices-has_same_dimensions.adb | sciencylab/lagrangian-solver | 0 | 13717 | <gh_stars>0
separate (Numerics.Sparse_Matrices)
function Has_Same_Dimensions (Left, Right : in Sparse_Matrix) return Boolean is
begin
if Left.N_Row /= Right.N_Row or else Left.N_Col /= Right.N_Col then
return False;
end if;
return True;
end Has_Same_Dimensions;
|
Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/a-nashfl.ads | djamal2727/Main-Bearing-Analytical-Model | 0 | 2410 | <filename>Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/a-nashfl.ads
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . N U M E R I C S . A U X _ S H O R T _ F L O A T --
-- --
-- S p e c --
-- (Short Float Wrapper in terms of Float) --
-- --
-- Copyright (C) 1992-2020, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package provides the basic computational interface for the
-- generic elementary functions. The functions in this unit are
-- wrappers for those in the Float package.
with Ada.Numerics.Aux_Float;
package Ada.Numerics.Aux_Short_Float is
pragma Pure;
subtype T is Short_Float;
package Aux renames Ada.Numerics.Aux_Float;
subtype W is Aux.T;
-- Use the Aux implementation.
function Sin (X : T) return T
is (T (Aux.Sin (W (X))));
function Cos (X : T) return T
is (T (Aux.Cos (W (X))));
function Tan (X : T) return T
is (T (Aux.Tan (W (X))));
function Exp (X : T) return T
is (T (Aux.Exp (W (X))));
function Sqrt (X : T) return T
is (T (Aux.Sqrt (W (X))));
function Log (X : T) return T
is (T (Aux.Log (W (X))));
function Acos (X : T) return T
is (T (Aux.Acos (W (X))));
function Asin (X : T) return T
is (T (Aux.Asin (W (X))));
function Atan (X : T) return T
is (T (Aux.Atan (W (X))));
function Sinh (X : T) return T
is (T (Aux.Sinh (W (X))));
function Cosh (X : T) return T
is (T (Aux.Cosh (W (X))));
function Tanh (X : T) return T
is (T (Aux.Tanh (W (X))));
function Pow (X, Y : T) return T
is (T (Aux.Pow (W (X), W (Y))));
end Ada.Numerics.Aux_Short_Float;
|
snippets/asm_read/osm.asm | dejbug/protocasm | 0 | 7087 |
; osm.asm - Yet another *.osm.pbf files parser.
; <https://github.com/dejbug>
; format PE GUI 4.0
format PE console 4.0
include 'win32a.inc'
include 'debug.inc'
ERROR_HANDLE_EOF = 38
LANG_NEUTRAL = 0x00
SUBLANG_DEFAULT = 0x01
LANGID = (SUBLANG_DEFAULT shl 10) + LANG_NEUTRAL
; no section defined - fasm will automatically create .flat section for both
; code and data, and set entry point at the beginning of this section
invoke GetStdHandle, STD_OUTPUT_HANDLE
cmp eax, INVALID_HANDLE_VALUE
je exit
mov [_hTerm], eax
invoke WriteConsole, [_hTerm], _filePath, 25, _bytesRead, 0
cmp eax, 0
je unk_error
invoke WriteConsole, [_hTerm], _endl, 2, _bytesRead, 0
; invoke con_out, _filePath, 25
dbg_out _szMsg1, _filePath
invoke CreateFile, _filePath, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, 0
cmp eax, INVALID_HANDLE_VALUE
je fnf_error
mov [_hFile], eax
dbg_out _szMsg3, [_hFile], _filePath
invoke ReadFile, [_hFile], _buffer, 512, _bytesRead, 0
cmp eax, 0
je read_error
cmp [_bytesRead], 0
je eof_error
dbg_out _szMsg5, [_bytesRead]
dbg_out _filePath
jmp close_and_exit
unk_error:
call print_error
jmp exit
fnf_error:
dbg_out _szMsg6, _filePath
jmp exit
eof_error:
jmp close_and_exit
read_error:
dbg_out _szMsg4, _filePath
close_and_exit:
dbg_out _szMsg2, _filePath
invoke CloseHandle, [_hFile]
exit:
invoke ExitProcess, 0
proc print_error uses ebx
invoke GetLastError
mov [_lastErrorCode], 6
invoke FormatMessage, FORMAT_MESSAGE_ALLOCATE_BUFFER + FORMAT_MESSAGE_FROM_SYSTEM + FORMAT_MESSAGE_IGNORE_INSERTS, 0, [_lastErrorCode], LANGID, _msgBuf, 0, 0
mov ebx, [_msgBuf]
mov byte [ebx+eax-2], 0
invoke WriteConsole, [_hTerm], dword [_msgBuf], eax, _bytesRead, 0
dbg_out _msgErr1, [_lastErrorCode], [_lastErrorCode], 0
; dbg_out _msgErr1, 0,0,dword [_msgBuf]
; dbg_out _msgErr2, [_lastErrorCode], eax
invoke LocalFree, dword [_msgBuf]
ret
endp
_lastErrorCode dd 0
_msgBuf dd 0
_msgErr1 db '! error %08X (%d) "%s"', 0
_msgErr2 db '! error %08X (%d)', 0
_filePath db '..\..\data\Darmstadt.osm.pbf', 0
_szMsg1 db '* opening "%s"', 0
_szMsg2 db '* closing "%s"', 0
_szMsg3 db '* [HANDLE = %08x] : "%s"', 0
_szMsg4 db '! could not read from file "%s"', 0
_szMsg5 db '* %d bytes read from file', 0
_szMsg6 db '! could not open file "%s"', 0
_endl db 0xD, 0xA, 0
_hTerm dd INVALID_HANDLE_VALUE
_hFile dd INVALID_HANDLE_VALUE
_buffer rb 512
_bytesRead dd 0
; import data in the same section
data import
library \
kernel32, 'KERNEL32.DLL', \
msvcrtd, 'MSVCRTD.dll'
import kernel32, \
ExitProcess, 'ExitProcess', \
GetLastError, 'GetLastError', \
FormatMessage, 'FormatMessageA', \
GetStdHandle, 'GetStdHandle', \
WriteConsole, 'WriteConsoleA', \
CreateFile, 'CreateFileA', \
CloseHandle, 'CloseHandle', \
LocalFree, 'LocalFree', \
ReadFile, 'ReadFile'
import msvcrtd, \
_CrtDbgReport, '_CrtDbgReport'
end data
|
test/shrd.asm | killvxk/AssemblyLine | 147 | 246248 | <reponame>killvxk/AssemblyLine<filename>test/shrd.asm
SECTION .text
GLOBAL test
test:
shrd rax, rax, 0
shrd rax, rax, 1
shrd rax, rax, 2
shrd rax, rax, 3
shrd rax, rax, 4
shrd rax, rax, 5
shrd rax, rax, 6
shrd rax, rax, 7
shrd rax, rax, 8
shrd rax, rax, 9
shrd rax, rax, 10
shrd rax, rax, 11
shrd rax, rax, 12
shrd rax, rax, 13
shrd rax, rax, 14
shrd rax, rax, 15
shrd rax, rbx, 16
shrd rax, rbx, 17
shrd rax, rbx, 18
shrd rax, rbx, 19
shrd rax, rbx, 20
shrd rax, rbx, 21
shrd rax, rbx, 22
shrd rax, rbx, 23
shrd rax, rbx, 24
shrd rax, rbx, 25
shrd rax, rbx, 26
shrd rax, rbx, 27
shrd rax, rbx, 28
shrd rax, rbx, 29
shrd rax, rbx, 30
shrd rax, rbx, 31
shrd rax, rcx, 32
shrd rax, rcx, 33
shrd rax, rcx, 34
shrd rax, rcx, 35
shrd rax, rcx, 36
shrd rax, rcx, 37
shrd rax, rcx, 38
shrd rax, rcx, 39
shrd rax, rcx, 40
shrd rax, rcx, 41
shrd rax, rcx, 42
shrd rax, rcx, 43
shrd rax, rcx, 44
shrd rax, rcx, 45
shrd rax, rcx, 46
shrd rax, rcx, 47
shrd rax, rdx, 48
shrd rax, rdx, 49
shrd rax, rdx, 50
shrd rax, rdx, 51
shrd rax, rdx, 52
shrd rax, rdx, 53
shrd rax, rdx, 54
shrd rax, rdx, 55
shrd rax, rdx, 56
shrd rax, rdx, 57
shrd rax, rdx, 58
shrd rax, rdx, 59
shrd rax, rdx, 60
shrd rax, rdx, 61
shrd rax, rdx, 62
shrd rax, rdx, 63
shrd r10, r11, 51
shrd r12, r15, 51
shrd r12, r8, 51
shrd r12, rbx, 51
shrd r12, rdx, 51
shrd r14, rcx, 51
shrd r15, rbp, 51
shrd r8, r13, 51
shrd r8, rcx, 51
shrd r8, rdx, 51
shrd r9, r8, 51
shrd rax, rbp, 51
shrd rbp, r15, 51
shrd rcx, r8, 51
|
2ndSemester/Operating Systems/Lab8/Built-in Macros/Lab8.asm | xairaven/kpi_labs | 0 | 173015 | ; Built-in macro
INIT MACRO ; Data segment initialization macro
MOV AX, data ; Initialization of register DS
MOV DS, AX ; with data segment address
XOR AX, AX ; Clear АХ
ENDM ; End of macro
EXIT_LAB MACRO ; Program completion macro
MOV AH, 4Ch ; Completion of the program
MOV AL, 0 ; Code 0 - code of successful completion
INT 21h ; Interrupt
ENDM ; End of macro
OFFSET_CALC MACRO BYTES, COLUMNS, OFFSET_VALUE ; Macro that counts the offset
MOV AX, COLUMNS ; Move the number of columns in AX
MOV BX, BYTES ; Move the dimension in bytes to ВХ
MUL BX ; Multiplication
MOV OFFSET_VALUE, AX ; Getting offset value
XOR AX, AX ; Clear registers
XOR BX, BX ; Clear registers
ENDM ; End of macro
PRINT_SYMBOL MACRO X ; Macro for displaying characters
MOV AH, 02h ; Move the function code to АH
MOV DL, X ; Move the character to DL
INT 21h ; Interrupt
XOR AX, AX ; Clear registers
ENDM ; End of macro
PRINT_STR MACRO STR ; Macro for string output
MOV AH, 09h ; Move the function code to АХ
MOV DX, OFFSET STR ; Move address to DX
INT 21h ; Interrupt
XOR AX, AX ; Clear registers
ENDM ; End of macro
PRINT_NUM MACRO X ; Macro for outputting numbers
LOCAL OUTPUT_START, PLUS, DIVISION, OUTPUT ; Local labels
OUTPUT_START: ; Label, start output
XOR AX, AX ; Reset the register АХ
MOV AX, X ; Returning result
CMP AX, 0 ; Compare with 0
XOR CX, CX ; Remainder counter
MOV BX, 10 ; Moving the basis of the 10th number system
DIVISION:
XOR DX, DX ; The remainder of the division
DIV BX ; Divide by 10
PUSH DX ; Place in a stack, LIFO
INC CX ; Increase the counter
TEST AX, AX ; Check if the whole part = 0
JNZ DIVISION ; Divide until the whole part is equal 0
MOV AH, 02h ; Removing the remainder
OUTPUT:
POP DX ; Getting numbers from the stack
ADD DL, 30h ; Translating them into ASCII-codes
INT 21h ; Interrupt
LOOP OUTPUT ; Repeat until the counter is equal 0
XOR AX, AX ; Clear registers
ENDM ; End of macro
TASK MACRO LEN, OFFSET_V, matrix ; Macro for task
LOCAL ROWS, COLS, EQUALS, DONT_EQUALS, FURTHER ; Local labels
MOV COUNTER, 1 ; COUNTER = 1
MOV AX, LEN ; The length of the line - into АХ
MOV i, AX ; Initialize row length counters
MOV j, AX ; Initialize row length counters
MOV CX, i ; The first loop - counter i
MOV BX, OFFSET matrix ; Into ВХ - offset of matrix
ROWS: ; First loop
MOV AX, LEN ; Length of the row - into АХ
MOV SI, 0 ; Register SI - for offset between elements
MOV j, AX ; Initialize row length counters
MOV CX, j ; The second loop - counter j
XOR AX, AX ; Clear registers
COLS: ; Second loop
MOV AX, i ; Into АХ - counter і
CMP AX, j ; Compare with counter j
JNE DONT_EQUALS ; If doesn't equals - jump on label
EQUALS: ; If equals - execute the code (Label for convenience)
MOV AX, 2 ; (*2) Moving 2 to AX
MUL COUNTER ; (*2) Multiply by COUNTER
JMP FURTHER ; Going further
DONT_EQUALS: ; Label if the values are unequal
MOV AX, COUNTER ; Just consistently move the values
FURTHER: ; Code to write to the array and display
MOV matrix[bx][si], AX ; Write the number in the array by index
PRINT_NUM matrix[bx][si] ; Output number, MACRO USE
PRINT_SYMBOL SPACE ; Character " " output, MACRO USE
INC COUNTER ; Increment of the number to be written
ADD SI, 2 ; 2 bytes offset
MOV CX, j ; Second loop - counter j
DEC j ; Decrement the counter
LOOP COLS ; End of loop
PRINT_STR CR_LF ; CR_LF, MACRO USE
ADD BX, OFFSET_V ; Row offset
MOV CX, i ; First loop - counter i
DEC i ; Decrement the counter
LOOP ROWS ; End of loop
MOV i, 0 ; Clear counters
MOV j, 0 ; Clear counters
MOV SI, 0 ; Clear registers
XOR AX, AX ; Clear registers
XOR BX, BX ; Clear registers
ENDM ; End of macro
title Lab8.asm ; Title of the program
.model SMALL ; Model of memory for .ехе file
.stack 100h ; Reserving memory for stack
code segment ; Code segment :)
assume CS:code, DS:data ; Connecting segment registers with names of registers
begin: INIT ; INITIALIZATION MACRO
OFFSET_CALC 2, LEN_ARR, offset_value ; OFFSET CALCULATING MACRO
PRINT_STR RESULT_MSG ; STRING PRINTING MACRO
TASK LEN_ARR, offset_value, matrix ; MACRO FOR THE TASK
EXIT_LAB ; ENDING PROGRAM MACRO
code ends ; End of code segment
data segment ; Data segment
LEN_ARR EQU 5 ; Symbolic value for line length
L_BREAK EQU 0dh, 0ah, '$' ; Symbolic value for carriage transfer
SPACE DB ' ' ; Symbol " "
CR_LF DB L_BREAK ; Carriage Return, Line Feed
RESULT_MSG DB "Result:", L_BREAK ; String for result
offset_value DW ? ; Offset in two-dimensional array between rows
COUNTER DW 1 ; Counter to fill the array with numbers from 1 to 25
i DW 0 ; Two-dimensional array row counter
j DW 0 ; Two-dimensional array column counter
matrix dw LEN_ARR dup (LEN_ARR dup(?)) ; Two-dimensional array length 5х5
data ends ; End of data segment
end begin ; End of program |
oeis/167/A167008.asm | neoneye/loda-programs | 11 | 160175 | <reponame>neoneye/loda-programs
; A167008: a(n) = Sum_{k=0..n} C(n,k)^k.
; Submitted by <NAME>
; 1,2,4,14,106,1732,66634,5745700,1058905642,461715853196,461918527950694,989913403174541980,5009399946447021173140,60070720443204091719085184,1548154498059133199618813305334,92346622775540905956057053976278584,13452832504832095449950279316144342100562,4281726180144180329253134425923339500712636244,3056427065253638079474254170033981095487311037507846,5412981766606739853919910436013371498099055966248290767228,21658863195985431666334657991860913748668917353370379694426100396
lpb $0
sub $0,1
add $2,1
mov $3,$0
add $3,$2
bin $3,$2
pow $3,$2
add $1,$3
lpe
add $1,1
mov $0,$1
|
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/lto9_pkg2.ads | best08618/asylo | 7 | 23777 | <filename>gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/lto9_pkg2.ads<gh_stars>1-10
generic
Size : in Positive;
type Element_Type (<>) is private;
type Element_Ptr is access all Element_Type;
package Lto9_Pkg2 is
subtype Index is Positive range 1 .. (Size + 1);
type List_Array is array (Index) of Element_Ptr;
type List_Type is record
Elements : List_Array;
end record;
procedure Put (List : in out List_Type;
Elem_Ptr : in Element_Ptr;
Location : in Index);
end Lto9_Pkg2;
|
wallpaper-one/emulator/Assembler/octalmonitor.asm | paulscottrobson/assorted-archives | 0 | 241011 | ; ******************************************************************************************************************
;
; Octal Monitor with Display.
;
; ******************************************************************************************************************
AddressHigh = 0 ; 0x800 Address
AddressLow = 1 ; 0x801 Address Low
Cursor = 2 ; 0x802 Vertical Cursor position
Counter = 3 ; 0x803 Counter of horizontal screen position.
DigitCount = 4 ; 0x804 Digits to print
RowCount = 5 ; 0x805 Rows to print
DigitsHigh = 6 ; 0x806 Digits (High)
DigitsLow = 7 ; 0x807 Digits (Low)
LineCounter = 8 ; 0x808 Line Counter
LinesToDraw = 9 ; 0x809 Number of lines to draw
cpu sc/mp
org 0x0000
nop
csa ; short beep.
ori 0x04
cas
dly 0xFF
ani 0xF8
cas
; ******************************************************************************************************************
; Clear the screen
; ******************************************************************************************************************
ldi 0x00 ; set P1 to screen top.
xpal p1
ldi 0x0C ! 0x10
ClearScreen: ; fill 0C00 to 0FFF
xpah p1
ldi 0
st @1(p1)
xpah p1
xri 0x10
jnz ClearScreen
ldi 0x08 ; Set P1 to point to 0x800
xpah p1
; ******************************************************************************************************************
; Set up to edit from 0x8010 onwards
; ******************************************************************************************************************
ldi 0x10 ; set start address to 0x810
st AddressLow(p1)
ldi 0x00
st AddressHigh(p1)
ldi 0x00 ; reset cursor
st Cursor(p1)
jmp RedrawScreen
CharacterSet:
include ..\fonts\octal_mon_font.asm
; ******************************************************************************************************************
; Redraw the whole display
; ******************************************************************************************************************
RedrawScreen:
ldi 0 ; clear line counter
st LineCounter(p1)
ldi 0x0C ; point P2 to 0xC3C - 2nd line (6 lines of 5)
xpah p2 ; last character
ldi 0x5C+1
xpal p2
ldi 5 ; reset the number to draw.
st LinesToDraw(p1)
; ******************************************************************************************************************
; Do next line
; ******************************************************************************************************************
NextLine:
ldi 1 ; printing two digits.
st Counter(p1)
; ******************************************************************************************************************
; Do next number
; ******************************************************************************************************************
DrawLoop:
ld AddressLow(p1) ; put address+counter in digits and P3
ccl
add LineCounter(p1)
st DigitsLow(p1)
xpal p3
ld AddressHigh(p1)
adi 0
st DigitsHigh(p1)
xpah p3
ld Counter(p1) ; get counter 0: Address 1:Data
jz DrawDigits
ld 0(p3) ; read data at address
st DigitsLow(p1)
ldi 0 ; MSB is zero.
st DigitsHigh(p1)
DrawDigits:
ld Counter(p1) ; 0 address 1 data
xri 3 ; 3 address, 2 data
st DigitCount(p1) ; number of times we print it.
; ******************************************************************************************************************
; Do next digit.
; ******************************************************************************************************************
NextDigit:
ldi 5 ; rows to print
st RowCount(p1)
ld DigitsLow(p1) ; read digits low into A
ccl
add DigitsLow(p1) ; double it
ani 15 ; lower 3 bits
ccl
adi CharacterSet-LoadPoint-1 ; offset from character - loadpoint
xae ; put in E.
LoadPoint:
db 0xC0,0x80 ; LD E(P0) ; read the low byte, put in P3.L
xpal p3
xae
scl
cai 7
xae
db 0xC0,0x80 ; LD E(P0) ; read the high byte, put in P3.H
xpah p3
; ******************************************************************************************************************
; Output bit data
; ******************************************************************************************************************
outbit macro after
xpah p3
rrl
xpah p3
xpal p3
st @after(p2)
rrl
xpal p3
endm
DrawRow:
outbit 1 ; output 3 bits, at end go to next row.
outbit 1
outbit 30
dld rowCount(p1) ; do it 5 times
jnz DrawRow
ld @-100(p2) ; back 32 x 5 + 4 = 164
ld @-64(p2) ; previous character on start row.
ldi 3 ; shift the number right 3 times
st rowCount(p1)
ShiftRight:
ld DigitsHigh(p1)
rrl
st DigitsHigh(p1)
ld DigitsLow(p1)
rrl
st DigitsLow(p1)
rrl
dld rowCount(p1)
jnz ShiftRight
dld DigitCount(p1)
jp NextDigit ; do the next digit.
ld @-2(p2) ; space between digits.
dld Counter(p1) ; decrement counter
jp DrawLoop ; do the next item.
ld @110(p2) ; point to next line
ld @114(p2)
ild LineCounter(p1) ; next line
dld LinesToDraw(p1)
jz RepaintCursor
ldi (NextLine-1) & 255 ; jump to Nextline, same page
xpal p0
; ******************************************************************************************************************
; Redraw the marker
; ******************************************************************************************************************
RepaintCursor:
ldi 0x00
xpal p2
ldi 0xC!0x10 ; repoint P2 to video
_ClearCursor:
xpah p2
ldi 0x00 ; now clear the 2 pixels on the RHS.
st @1(p2)
st @31(p2)
xpah p2
xri 0x10
jnz _ClearCursor
xpal p2
ldi 0x0C ; P2 back to video start
xpah p2
; ******************************************************************************************************************
; Draw the actual marker
; ******************************************************************************************************************
ld Cursor(p1) ; read cursor
_FindCursorPos
jz _FoundCursorPos
xae ; save in E
ld @96(p2) ; down 6 lines.
ld @96(p2)
xae ; get back.
scl ; subtract one
cai 1
jmp _FindCursorPos
_FoundCursorPos:
ld @96(p2) ; now redraw the cursor.
ldi 1
st 0(p2)
st 32(p2)
st 33(p2)
st 64(p2)
; ******************************************************************************************************************
; Handle player input
; ******************************************************************************************************************
WaitRelease: ; wait for SA, SB and Keypad to be released.
csa
ani 0x30
jnz WaitRelease
xpal p2
ldi 0x0C ; wait for toggle release
xpah p2
ld 0(p2) ; read them
jnz WaitRelease
WaitKey:
csa ; check if A pressed
ani 0x10
jnz APressed
jmp WaitKey ; still waiting .....
; ******************************************************************************************************************
; Handle pressing of 'A' (advance)
; ******************************************************************************************************************
APressed:
ild Cursor(p1) ; increment cursor
xri 5 ; reached 6
jnz RepaintCursor ; no, repaint it.
st Cursor(p1) ; zero cursor
ccl
ld AddressLow(p1) ; add four to address
adi 4
st AddressLow(p1)
ld AddressHigh(p1)
adi 0
st AddressHigh(p1)
ldi (RedrawScreen-1) & 255 ; long jump back to redraw the whole screen.
xpal p2
ldi (RedrawScreen-1) / 256
xpah p2
xppc p2
Wait: jmp Wait
|
libsrc/target/nc100/mcprintchar.asm | jpoikela/z88dk | 640 | 28325 | <reponame>jpoikela/z88dk
SECTION code_clib
PUBLIC mcprintchar
PUBLIC _mcprintchar
; Fastcall
._mcprintchar
.mcprintchar ld a, l
call 0xb851
ld hl, 0
ret c
dec hl
ret
|
src/fot/FOTC/Program/McCarthy91/McCarthy91.agda | asr/fotc | 11 | 16987 | ------------------------------------------------------------------------------
-- The McCarthy 91 function: A function with nested recursion
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K #-}
module FOTC.Program.McCarthy91.McCarthy91 where
open import FOTC.Base
open import FOTC.Data.Nat
open import FOTC.Data.Nat.Inequalities
open import FOTC.Data.Nat.UnaryNumbers
------------------------------------------------------------------------------
-- The McCarthy 91 function.
postulate
f₉₁ : D → D
f₉₁-eq : ∀ n → f₉₁ n ≡ (if (gt n 100') then n ∸ 10' else f₉₁ (f₉₁ (n + 11')))
{-# ATP axiom f₉₁-eq #-}
|
launcher/launcher.asm | nsn/vcsdev | 0 | 161537 | <gh_stars>0
; Lunar Launcher
; (c) 2018 <NAME>
;
;
; TODO
;
processor 6502
include "vcs.h"
include "macro.h"
;----------------------------
; Constants
;----------------------------
; ntsc constants
VBLANK_WAIT = 42
PLAY_SCANLINES = 160
; Game constants
PLAYER_SPEED = 300 ; subpixel speed, div by 256 for pixel speed
PLAYER_HEIGHT = 27 ; player sprite height in scanlines
PF_COLOR = $0a
PLAYER_COLOR_HEAD = $0e
PLAYER_COLOR_TORSO = $8a
PLAYER_COLOR_LEGS = $38
PLAYER_THRUST = 40 ; 2 byte constant, div by 256 for pixels/frame
PLAYER_VMAX_Y = 10 ;
PLAYER_VMIN_Y = -10 ; msb only
GRAVITY = -20 ; 2 bytes again
;--- end Constants
;----------------------------
; Macros
;----------------------------
;###################################################
; adds two two byte values
; M_ADD_CONSTANT <target> <constant>
MAC M_ADD_CONSTANT
clc
lda {1}
adc #<{2}
sta {1}
lda {1}+1
adc #>{2}
sta {1}+1
ENDM
;###################################################
; adds two two byte values
; M_ADD_WORDS <target> <operand>
MAC M_ADD_WORDS
clc
lda {1}
adc {2}
sta {1}
lda {1}+1
adc {2}+1
sta {1}+1
ENDM
;###################################################
; subtracts an 8bit constant from a 16bit variable
; M_SUB <target> <constant>
MAC M_SUB
sec
lda {1}
sbc {2}
sta {1}
bcs .subDone
.subDone:
dec {1}+1
ENDM
MAC M_ADJUST_PFPTR
ENDM
MAC M_DRAW_STRIP
lda (Vptr_S{1}_PF0),y
sta PF0
lda (Vptr_S{1}_PF1),y
sta PF1
lda (Vptr_S{1}_PF2),y
sta PF2
ENDM
;############################
; Bank1
;############################
;----------------------------
; Variables
;----------------------------
SEG.U variables
ORG $80
;Vb_tmp00 ds 1
; shadow registers
Vb_SWCHA_Shadow ds 1
; -----------
; player data
; -----------
Vb_PlayerPosX ds 1
; Player Y-pos is stored as 2 bytes,
; LO -> fractional part
; HI -> integer part
Vw_PlayerPosY ds 2
Vw_PlayerVelX ds 2
Vw_PlayerVelY ds 2
Vb_PlayerY ds 1 ; skipdraw
Vptr_PlayerSprite ds 2 ; player sprite pointer
Vptr_PlayerColor ds 2 ; player color pointer
Vb_PlayerSpriteIndex ds 1
; -----------
; in BCD
Vb_Score00 ds 1
Vb_Score01 ds 1
Vb_Score02 ds 1
; pf pointers
Vptr_S0_PF0 ds 2
Vptr_S0_PF1 ds 2
Vptr_S0_PF2 ds 2
Vptr_S1_PF0 ds 2
Vptr_S1_PF1 ds 2
Vptr_S1_PF2 ds 2
Vptr_S2_PF0 ds 2
Vptr_S2_PF1 ds 2
Vptr_S2_PF2 ds 2
Vptr_S3_PF0 ds 2
Vptr_S3_PF1 ds 2
Vptr_S3_PF2 ds 2
Vptr_S4_PF0 ds 2
Vptr_S4_PF1 ds 2
Vptr_S4_PF2 ds 2
;
Vptr_jmp_target ds 2
echo "----",($100 - *) , "bytes of RAM left"
;--- end Variables
SEG code
ORG $F000
echo "---- start code at ",(*)
Reset:
;----------------------------
; Start of program
;----------------------------
CLEAN_START
;----------------------------
; any code to be executed before
; the game actually starts
; goes here
;----------------------------
; set TIA behaviour
; set bg color to black ($0)
lda #$00
sta COLUBK
; set pf color
lda #PF_COLOR
sta COLUPF
; set pf behaviour
lda #%00000001
sta CTRLPF
; set player color
;lda #$0F
;sta COLUP0
;sta COLUP1
; set Player size
;lda #7
;sta NUSIZ0
;sta NUSIZ1
; initial player pos
lda #42
sta Vw_PlayerPosY+1
lda #90
sta Vb_PlayerPosX
; set high byte of player sprite pointer
lda #>HERO_LEFT_F0
sta Vptr_PlayerSprite+1
; set high byte of player color pointer
lda #>PlayerColors
sta Vptr_PlayerColor+1
;----------------------------
; Main Loop
;----------------------------
MainLoop:
jsr VerticalBlank
jsr GameState
jsr DrawScreen
jsr OverScan
jmp MainLoop ; loop forever
;----------------------------
; vertical blank init
; initializes TIM64T timer
;----------------------------
VerticalBlank:
ldx #0
lda #2
sta WSYNC ;
; begin vertical sync
sta VSYNC
; first two lines of vsync
sta WSYNC
sta WSYNC
; use duration 3rd line of VSYNC
; to set the vertical blank timer
lda #VBLANK_WAIT
sta TIM64T
lda #0
; end vsync period
sta WSYNC
sta VSYNC
rts ;--- VerticalBlank
;----------------------------
; calculate game state for this frame
;----------------------------
GameState:
;-- check input
; joystick input
lda SWCHA
; break if nothing has changed
;cmp Vb_SWCHA_Shadow
; beq NoMovement
;beq NoMovement
; store new SWCHA state
sta Vb_SWCHA_Shadow
; right?
CheckRightPressed:
and #%10000000
; skip to CheckLeftPressed if not equal
bne CheckLeftPressed
; move right
inc Vb_PlayerPosX
; player sprite index
lda #1
sta Vb_PlayerSpriteIndex
; left?
CheckLeftPressed:
lda Vb_SWCHA_Shadow
and #%01000000
; skip to CheckDownPressed not equal
bne CheckDownPressed
; move left
dec Vb_PlayerPosX
; player sprite index
lda #0
sta Vb_PlayerSpriteIndex
; down?
CheckDownPressed:
; check if down is pressed
lda Vb_SWCHA_Shadow
and #%00100000
; skip to CheckUpPressed if not pressed
bne CheckUpPressed
; move down
; TODO
;lda #0
;sta Vw_PlayerVelY
;sta Vw_PlayerVelY+1
M_ADD_CONSTANT Vw_PlayerVelY, GRAVITY
; up?
CheckUpPressed:
; check if up is pressed
lda Vb_SWCHA_Shadow
and #%00010000
; skip to NoMovement if not pressed
bne NoMovement
; 16bit math, adds both bytes
; of player_speed to the 2 bytes
; of Vw_PlayerPosY
M_ADD_CONSTANT Vw_PlayerVelY, PLAYER_THRUST
; player sprite index changes when moving up
lda Vb_PlayerSpriteIndex
ora #2
sta Vb_PlayerSpriteIndex
NoMovement:
; apply gravity
M_ADD_CONSTANT Vw_PlayerVelY, GRAVITY
;vmin?
; only compare hi byte
lda #PLAYER_VMIN_Y
cmp Vw_PlayerVelY+1
bmi PVgtVMin
; here player velocity is < PLAYER_VMIN_Y
sta Vw_PlayerVelY+1
PVgtVMin:
;vmax?
lda #PLAYER_VMAX_Y
cmp Vw_PlayerVelY+1
bpl PVTestEnd
; here player vel > PLAYER_VMAX_Y
sta Vw_PlayerVelY+1
PVTestEnd:
; apply veloity to position
M_ADD_WORDS Vw_PlayerPosY, Vw_PlayerVelY
;-- set player sprite pointer
ldx Vb_PlayerSpriteIndex
lda PlayerSpriteIndexTable,x
sta Vptr_PlayerSprite ;store in LO byte
;-- .. and color
lda #<(PlayerColors)
sta Vptr_PlayerColor
; reposition P0
lda Vb_PlayerPosX
ldx #0
jsr bzoneRepos
; set Vb_PlayerY to vertical position (0 = top)
; PlayerY = vertical position + Po height - 1
lda #PLAY_SCANLINES + #PLAYER_HEIGHT - #1
sec
sbc Vw_PlayerPosY+1 ;subtract integer part of position
sta Vb_PlayerY
; adjust Vptr_PlayerSprite for skipDraw
lda Vptr_PlayerSprite
sec
sbc Vw_PlayerPosY+1
clc
adc #PLAYER_HEIGHT-#1
sta Vptr_PlayerSprite
; adjust Vptr_PlayerColor
lda Vptr_PlayerColor
sec
sbc Vw_PlayerPosY+1
clc
adc #PLAYER_HEIGHT-#1
sta Vptr_PlayerColor
; PF pointers
SET_POINTER Vptr_S0_PF0, PFData0
SET_POINTER Vptr_S0_PF1, PFData1
SET_POINTER Vptr_S0_PF2, PFData2
SET_POINTER Vptr_S1_PF0, PFData0
SET_POINTER Vptr_S1_PF1, PFData1
SET_POINTER Vptr_S1_PF2, PFData2
SET_POINTER Vptr_S2_PF0, PFData0
SET_POINTER Vptr_S2_PF1, PFData1
SET_POINTER Vptr_S2_PF2, PFData2
SET_POINTER Vptr_S3_PF0, PFData0
SET_POINTER Vptr_S3_PF1, PFData1
SET_POINTER Vptr_S3_PF2, PFData2
SET_POINTER Vptr_S4_PF0, PFData0
SET_POINTER Vptr_S4_PF1, PFData1
SET_POINTER Vptr_S4_PF2, PFData2
HERE:
M_SUB Vptr_S0_PF0, #160
M_SUB Vptr_S0_PF1, #160
M_SUB Vptr_S0_PF2, #160
M_SUB Vptr_S1_PF0, #160
M_SUB Vptr_S1_PF1, #160
M_SUB Vptr_S1_PF2, #160
; sec
; lda Vptr_S0_PF0
; sbc #192
; sta Vptr_S0_PF0
; bcs ok
; dec Vptr_S0_PF0+1
;ok
rts ;--- GameState
;----------------------------
; Draw visible scanlines
; https://alienbill.com/2600/cookbook/subpixel.html
;----------------------------
DrawScreen: SUBROUTINE
lda #0
; wait until vertical blank period is over
.vblankWait:
sta WSYNC
lda INTIM
bne .vblankWait
; y will be out scanline counter
ldy #PLAY_SCANLINES
sta WSYNC
sta HMOVE
sta VBLANK ; since A = #0
.lineLoop:
; lda (Vptr_S0_PF0),y
; sta PF0
; lda (Vptr_S0_PF1),y
; sta PF1
; lda (Vptr_S0_PF2),y
; sta PF2
lda #>(.playerColor-1)
pha
lda #<(.playerColor-1)
pha
lda drawPFPtrHi
sta Vptr_jmp_target+1
lda drawPFPtrLoTbl,y
sta Vptr_jmp_target
jmp (Vptr_jmp_target)
.playerColor
lda (Vptr_PlayerColor),y
sta COLUP0
; skipDraw
; draw P0
lda #PLAYER_HEIGHT-1
dcp Vb_PlayerY
bcs .doDraw
lda #0
.byte $2c ;BIT ABS to skip 2 bytes
.doDraw:
lda (Vptr_PlayerSprite),y
sta GRP0
sta WSYNC
dey
bne .lineLoop
; clear registers to prevent bleeding
lda #2
sta WSYNC ; finish scanline
sta VBLANK ; make TIA output blank
; re-use Y which is still 0
ldy #0
sty PF0
sty PF1
sty PF2
sty GRP0
sty GRP1
sty ENAM0
sty ENAM1
sty ENABL
sty VDELP0
sty VDELP1
rts ; DrawScreen
;----------------------------
; Overscan
;----------------------------
OverScan:
lda #35
sta TIM64T
; calc stuff here
OverScanLineWait:
lda INTIM
bne OverScanLineWait
; return
rts
;----------------------------
; BattleZone-style sprite repositioning
; see https://alienbill.com/2600/cookbook/subpixel.html
; set A = desired horizontal position, then X to object
; to be positioned (0->4 = P0->BALL)
;----------------------------
bzoneRepos: SUBROUTINE
sta WSYNC ; 00 Sync to start of scanline.
sec ; 02 Set the carry flag so no borrow will be applied during the division.
.divideby15
sbc #15 ; 04 Waste the necessary amount of time dividing X-pos by 15!
bcs .divideby15 ; 06/07 11/16/21/26/31/36/41/46/51/56/61/66
tay
lda fineAdjustTable,y ; 13 -> Consume 5 cycles by guaranteeing we cross a page boundary
sta HMP0,x
sta RESP0,x ; 21/ 26/31/36/41/46/51/56/61/66/71 - Set the rough position.
rts
drawStrip0: SUBROUTINE
M_DRAW_STRIP 0
rts
drawStrip1: SUBROUTINE
M_DRAW_STRIP 1
rts
drawStrip2: SUBROUTINE
M_DRAW_STRIP 2
rts
drawStrip3: SUBROUTINE
M_DRAW_STRIP 3
rts
drawStrip4: SUBROUTINE
M_DRAW_STRIP 4
rts
;----------------------------
; Data
;----------------------------
DATA_Start ALIGN 256
echo "---- start data at ",(*)
drawPFPtrHi:
.byte >(drawStrip0)
; maps y register to drawStrip subroutine
include "draw_pf_tbl.inc"
ALIGN 256+PLAY_SCANLINES
include "hero.inc"
; -- remember kids: it's inverted...
PlayerColors:
.byte #$0e
.byte #PLAYER_COLOR_LEGS
.byte #PLAYER_COLOR_LEGS
.byte #PLAYER_COLOR_LEGS
.byte #PLAYER_COLOR_LEGS
.byte #PLAYER_COLOR_LEGS
.byte #PLAYER_COLOR_LEGS
.byte #PLAYER_COLOR_LEGS
.byte #PLAYER_COLOR_LEGS
.byte #PLAYER_COLOR_LEGS
.byte #PLAYER_COLOR_LEGS
.byte #PLAYER_COLOR_LEGS
.byte #PLAYER_COLOR_LEGS
.byte #PLAYER_COLOR_TORSO
.byte #PLAYER_COLOR_TORSO
.byte #PLAYER_COLOR_TORSO
.byte #PLAYER_COLOR_TORSO
.byte #PLAYER_COLOR_TORSO
.byte #PLAYER_COLOR_TORSO
.byte #PLAYER_COLOR_TORSO
.byte #PLAYER_COLOR_TORSO
.byte #PLAYER_COLOR_HEAD
.byte #PLAYER_COLOR_HEAD
.byte #PLAYER_COLOR_HEAD
.byte #PLAYER_COLOR_HEAD
.byte #PLAYER_COLOR_HEAD
.byte #$0e
PlayerSpriteIndexTable:
.byte <(HERO_LEFT_F0)
.byte <(HERO_RIGHT_F0)
.byte <(HERO_LEFT_F1)
.byte <(HERO_RIGHT_F1)
;-----------------------------
; This table converts the "remainder" of the division by 15 (-1 to -15) to the correct
; fine adjustment value. This table is on a page boundary to guarantee the processor
; will cross a page boundary and waste a cycle in order to be at the precise position
; for a RESP0,x write
ORG $FE00
fineAdjustBegin
DC.B %01110000 ; Left 7
DC.B %01100000 ; Left 6
DC.B %01010000 ; Left 5
DC.B %01000000 ; Left 4
DC.B %00110000 ; Left 3
DC.B %00100000 ; Left 2
DC.B %00010000 ; Left 1
DC.B %00000000 ; No movement.
DC.B %11110000 ; Right 1
DC.B %11100000 ; Right 2
DC.B %11010000 ; Right 3
DC.B %11000000 ; Right 4
DC.B %10110000 ; Right 5
DC.B %10100000 ; Right 6
DC.B %10010000 ; Right 7
fineAdjustTable EQU fineAdjustBegin - %11110001 ; NOTE: %11110001 = -15
include "pfdata.inc"
;----------------------------
; Reset/Break
;----------------------------
ORG $FFFC
; set Reset pointer (at $FFFC and $FFFD) to Reset label
.word Reset
; set BRK pointer (at $FFFE and $FFFF) to Reset label
.word Reset
|
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c6/c64105c.ada | best08618/asylo | 7 | 1027 | <reponame>best08618/asylo<gh_stars>1-10
-- C64105C.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- CHECK THAT CONSTRAINT_ERROR IS NOT RAISED FOR ACCESS PARAMETERS
-- IN THE FOLLOWING CIRCUMSTANCES:
-- (1)
-- (2) AFTER THE CALL, WHEN AN IN OUT OR OUT FORMAL
-- ACCESS VALUE IS NULL, AND THE ACTUAL PARAMETER HAS
-- DIFFERENT CONSTRAINTS.
-- (3)
-- SUBTESTS ARE:
-- (C) CASE 2, IN OUT MODE, STATIC PRIVATE DISCRIMINANT.
-- (D) CASE 2, OUT MODE, DYNAMIC TWO DIMENSIONAL BOUNDS.
-- (E) SAME AS (C), WITH TYPE CONVERSION.
-- (F) SAME AS (D), WITH TYPE CONVERSION.
-- JRK 3/20/81
-- SPS 10/26/82
-- CPP 8/8/84
WITH REPORT;
PROCEDURE C64105C IS
USE REPORT;
BEGIN
TEST ("C64105C", "CHECK THAT CONSTRAINT_ERROR IS NOT RAISED " &
"AFTER THE CALL, WHEN AN IN OUT OR OUT FORMAL " &
"ACCESS VALUE IS NULL, AND THE ACTUAL PARAMETER HAS " &
"DIFFERENT CONSTRAINTS" );
--------------------------------------------------
DECLARE -- (C)
PACKAGE PKG IS
TYPE E IS (E1, E2);
TYPE T (D : E := E1) IS PRIVATE;
PRIVATE
TYPE T (D : E := E1) IS
RECORD
I : INTEGER;
CASE D IS
WHEN E1 =>
B : BOOLEAN;
WHEN E2 =>
C : CHARACTER;
END CASE;
END RECORD;
END PKG;
USE PKG;
TYPE A IS ACCESS T;
SUBTYPE SA IS A(E2);
V : A (E1) := NULL;
ENTERED : BOOLEAN := FALSE;
PROCEDURE P (X : IN OUT SA) IS
BEGIN
ENTERED := TRUE;
X := NULL;
EXCEPTION
WHEN OTHERS =>
FAILED ("EXCEPTION RAISED IN PROCEDURE - (C)");
END P;
BEGIN -- (C)
P (V);
EXCEPTION
WHEN CONSTRAINT_ERROR =>
IF NOT ENTERED THEN
FAILED ("EXCEPTION RAISED BEFORE CALL - (C)");
ELSE
FAILED ("EXCEPTION RAISED ON RETURN - (C)");
END IF;
WHEN OTHERS =>
FAILED ("EXCEPTION RAISED - (C)");
END; -- (C)
--------------------------------------------------
DECLARE -- (D)
TYPE T IS ARRAY (CHARACTER RANGE <>, BOOLEAN RANGE <>) OF
INTEGER;
TYPE A IS ACCESS T;
SUBTYPE SA IS A ('D'..'F', FALSE..FALSE);
V : A (IDENT_CHAR('A') .. IDENT_CHAR('B'),
IDENT_BOOL(TRUE) .. IDENT_BOOL(TRUE)) := NULL;
ENTERED : BOOLEAN := FALSE;
PROCEDURE P (X : OUT SA) IS
BEGIN
ENTERED := TRUE;
X := NULL;
EXCEPTION
WHEN OTHERS =>
FAILED ("EXCEPTION RAISED IN PROCEDURE - (D)");
END P;
BEGIN -- (D)
P (V);
EXCEPTION
WHEN CONSTRAINT_ERROR =>
IF NOT ENTERED THEN
FAILED ("EXCEPTION RAISED BEFORE CALL - (D)");
ELSE
FAILED ("EXCEPTION RAISED ON RETURN - (D)");
END IF;
WHEN OTHERS =>
FAILED ("EXCEPTION RAISED - (D)");
END; -- (D)
--------------------------------------------------
DECLARE -- (E)
PACKAGE PKG IS
TYPE E IS (E1, E2);
TYPE T (D : E := E1) IS PRIVATE;
PRIVATE
TYPE T (D : E := E1) IS
RECORD
I : INTEGER;
CASE D IS
WHEN E1 =>
B : BOOLEAN;
WHEN E2 =>
C : CHARACTER;
END CASE;
END RECORD;
END PKG;
USE PKG;
TYPE A IS ACCESS T;
SUBTYPE SA IS A(E2);
V : A (E1) := NULL;
ENTERED : BOOLEAN := FALSE;
PROCEDURE P (X : IN OUT SA) IS
BEGIN
ENTERED := TRUE;
X := NULL;
EXCEPTION
WHEN OTHERS =>
FAILED ("EXCEPTION RAISED IN PROCEDURE - (C)");
END P;
BEGIN -- (E)
P (SA(V));
EXCEPTION
WHEN CONSTRAINT_ERROR =>
IF NOT ENTERED THEN
FAILED ("EXCEPTION RAISED BEFORE CALL - (E)");
ELSE
FAILED ("EXCEPTION RAISED ON RETURN - (E)");
END IF;
WHEN OTHERS =>
FAILED ("EXCEPTION RAISED - (E)");
END; -- (E)
--------------------------------------------------
DECLARE -- (F)
TYPE T IS ARRAY (CHARACTER RANGE <>, BOOLEAN RANGE <>) OF
INTEGER;
TYPE A IS ACCESS T;
SUBTYPE SA IS A ('D'..'F', FALSE..FALSE);
V : A (IDENT_CHAR('A') .. IDENT_CHAR('B'),
IDENT_BOOL(TRUE) .. IDENT_BOOL(TRUE)) := NULL;
ENTERED : BOOLEAN := FALSE;
PROCEDURE P (X : OUT SA) IS
BEGIN
ENTERED := TRUE;
X := NULL;
EXCEPTION
WHEN OTHERS =>
FAILED ("EXCEPTION RAISED IN PROCEDURE - (D)");
END P;
BEGIN -- (D)
P (SA(V));
EXCEPTION
WHEN CONSTRAINT_ERROR =>
IF NOT ENTERED THEN
FAILED ("EXCEPTION RAISED BEFORE CALL - (F)");
ELSE
FAILED ("EXCEPTION RAISED ON RETURN - (F)");
END IF;
WHEN OTHERS =>
FAILED ("EXCEPTION RAISED - (F)");
END; -- (F)
--------------------------------------------------
RESULT;
END C64105C;
|
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c4/c45632a.ada | best08618/asylo | 7 | 28165 | <filename>gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c4/c45632a.ada
-- C45632A.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- OBJECTIVE:
-- CHECK THAT FOR PREDEFINED TYPE INTEGER, CONSTRAINT_ERROR
-- IS RAISED FOR ABS (INTEGER'FIRST) IF
-- -INTEGER'LAST > INTEGER'FIRST.
-- *** NOTE: This test has been modified since ACVC version 1.11 to -- 9X
-- *** remove incompatibilities associated with the transition -- 9X
-- *** to Ada 9X. -- 9X
-- *** -- 9X
-- HISTORY:
-- RJW 02/10/86 CREATED ORIGINAL TEST.
-- JET 12/30/87 UPDATED HEADER FORMAT AND ADDED CODE TO
-- PREVENT OPTIMIZATION.
-- MRM 03/30/93 REMOVED NUMERIC ERROR FOR 9X COMPATIBILITY
WITH REPORT; USE REPORT;
PROCEDURE C45632A IS
I : INTEGER := IDENT_INT (INTEGER'FIRST);
BEGIN
TEST ( "C45632A", "CHECK THAT FOR PREDEFINED TYPE INTEGER " &
"CONSTRAINT_ERROR IS RAISED " &
"FOR ABS (INTEGER'FIRST) IF -INTEGER'LAST > " &
"INTEGER'FIRST" );
BEGIN
IF - INTEGER'LAST > INTEGER'FIRST THEN
BEGIN
IF EQUAL (ABS I, I) THEN
NULL;
ELSE
FAILED ( "WRONG RESULT FOR ABS" );
END IF;
FAILED ( "EXCEPTION NOT RAISED" );
EXCEPTION
WHEN CONSTRAINT_ERROR =>
COMMENT ( "CONSTRAINT_ERROR RAISED" );
WHEN OTHERS =>
FAILED ( "WRONG EXCEPTION RAISED" );
END;
ELSE
COMMENT ( "-INTEGER'LAST <= INTEGER'FIRST" );
END IF;
END;
RESULT;
END C45632A;
|
Transynther/x86/_processed/AVXALIGN/_ht_zr_/i3-7100_9_0x84_notsx.log_21829_2171.asm | ljhsiun2/medusa | 9 | 4601 | <reponame>ljhsiun2/medusa<filename>Transynther/x86/_processed/AVXALIGN/_ht_zr_/i3-7100_9_0x84_notsx.log_21829_2171.asm
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r15
push %r8
push %r9
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x4457, %r8
nop
sub %r9, %r9
movb $0x61, (%r8)
nop
nop
sub $45078, %r15
lea addresses_normal_ht+0x13e2b, %r8
dec %r10
mov $0x6162636465666768, %r11
movq %r11, %xmm0
vmovups %ymm0, (%r8)
nop
nop
nop
nop
sub $63014, %r8
lea addresses_A_ht+0x15e37, %r10
clflush (%r10)
nop
nop
nop
nop
cmp $4894, %r9
mov (%r10), %r8
nop
nop
inc %r8
lea addresses_UC_ht+0xe9e9, %rsi
lea addresses_A_ht+0x1e86f, %rdi
clflush (%rsi)
nop
nop
nop
nop
add $25036, %r8
mov $87, %rcx
rep movsq
nop
nop
nop
nop
cmp $40288, %rsi
lea addresses_normal_ht+0x8b37, %r9
nop
nop
nop
nop
dec %rsi
movw $0x6162, (%r9)
sub %rcx, %rcx
lea addresses_WC_ht+0xd4f7, %r8
nop
and %r11, %r11
mov (%r8), %r10
nop
nop
nop
nop
nop
add $37727, %r9
lea addresses_WC_ht+0x1df67, %rsi
lea addresses_UC_ht+0x163b7, %rdi
nop
nop
nop
nop
nop
sub $47976, %r10
mov $46, %rcx
rep movsl
nop
nop
nop
nop
nop
cmp $13352, %r15
lea addresses_A_ht+0x14a37, %r11
nop
nop
dec %r9
movl $0x61626364, (%r11)
add $20240, %rdi
lea addresses_A_ht+0xca37, %rsi
lea addresses_normal_ht+0xb49b, %rdi
nop
nop
nop
cmp %rbp, %rbp
mov $26, %rcx
rep movsb
sub $18286, %r9
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r8
pop %r15
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %r15
push %r8
push %rax
push %rdx
push %rsi
// Load
lea addresses_UC+0x1a1d, %rsi
nop
add %rax, %rax
mov (%rsi), %r15w
cmp %r8, %r8
// Store
lea addresses_WT+0x441f, %rax
clflush (%rax)
nop
nop
nop
nop
and $35398, %r13
mov $0x5152535455565758, %rdx
movq %rdx, %xmm6
vmovntdq %ymm6, (%rax)
sub $28607, %r12
// Faulty Load
lea addresses_UC+0xe637, %r8
nop
xor %rax, %rax
movaps (%r8), %xmm0
vpextrq $1, %xmm0, %r15
lea oracles, %r12
and $0xff, %r15
shlq $12, %r15
mov (%r12,%r15,1), %r15
pop %rsi
pop %rdx
pop %rax
pop %r8
pop %r15
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_UC', 'same': False, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WT', 'same': False, 'size': 32, 'congruent': 3, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_UC', 'same': True, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 1, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal_ht', 'same': True, 'size': 32, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_A_ht', 'same': False, 'size': 8, 'congruent': 11, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 2, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 8, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 4, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_A_ht', 'congruent': 7, 'same': True}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'}
{'00': 18835, '45': 2994}
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 45 00 45 00 00 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 45 00 45 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 45 00 45 00 45 00 00 00 00 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 00 00 00 45 00 45 00 45 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 45 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 45 00 45 00 45 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 00 00 00 45 00 45 00 45 00 00 00 00 00 00 00 00 45 00 45 00 45 00 00 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 45 00 45 00 45 00 00 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 00 00 00 45 00 45 00 45 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 00 45 00 45 00 45 00 45 00 00 00 00 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 45 00 45 00 45 00 00 00 00 00 00 00 00 45 00 45 00 45 00 00 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 45 00 45 00 45 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 45 00 45 00 45 00 00 00 00 00 00 00 00 45 00 45 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 00 00 00 00 45 00 45 00 45 00 00 00 00 00 00 00 00 00 00 45 00 45 00 45 00 45 00 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 00 45 45 00 00 00 00 00 00 00 00 45 00 45 00 45 00 45 00 00 00 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 45 00 45 00 45 00 00 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 00 00 00 45 00 45 00 45 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 45 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 45 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 45 00 45 00 45 00 00 00 00 00 00 00 00 00 00 45 00 45 00 45 00 00
*/
|
oeis/011/A011922.asm | neoneye/loda-programs | 11 | 246914 | ; A011922: a(n) = 15*a(n-1) - 15*a(n-2) + a(n-3).
; Submitted by <NAME>
; 1,3,33,451,6273,87363,1216801,16947843,236052993,3287794051,45793063713,637815097923,8883618307201,123732841202883,1723376158533153,24003533378261251,334326091137124353,4656561742541479683,64857538304443591201,903348974519668797123,12582028104970919568513,175245044495073205162051,2440848594826053952700193,33996635283069682132640643,473512045368149495904268801,6595171999871023260527122563,91858895952826176151475447073,1279429371339695442860129136451,17820152302802910023890332463233
mov $2,1
lpb $0
sub $0,1
add $2,$3
add $2,$3
add $3,$2
lpe
pow $3,2
mov $0,$3
mul $0,2
add $0,1
|
Library/Mailbox/VMStore/vmstoreManager.asm | steakknife/pcgeos | 504 | 97432 | <filename>Library/Mailbox/VMStore/vmstoreManager.asm<gh_stars>100-1000
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1994 -- All Rights Reserved
PROJECT: Clavin
MODULE: Intelligent VM Storage
FILE: vmstoreManager.asm
AUTHOR: <NAME>, Apr 14, 1994
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
Adam 4/14/94 Initial revision
DESCRIPTION:
Functions and structures for tracking multiple VM files among which
message bodies may be parceled.
$Id: vmstoreManager.asm,v 1.1 97/04/05 01:20:37 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
include mailboxGeode.def
include system.def
include vmstoreConstant.def
include vmstoreInit.asm
include vmstoreCode.asm
include vmstoreC.asm
|
oeis/315/A315756.asm | neoneye/loda-programs | 11 | 97394 | <reponame>neoneye/loda-programs
; A315756: Coordination sequence Gal.6.637.6 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings.
; Submitted by <NAME>
; 1,6,12,18,24,28,34,38,44,50,56,62,68,74,80,86,90,96,100,106,112,118,124,130,136,142,148,152,158,162,168,174,180,186,192,198,204,210,214,220,224,230,236,242,248,254,260,266,272,276
mov $1,$0
seq $1,315762 ; Coordination sequence Gal.6.627.5 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings.
mov $2,$0
mul $0,-12
sub $0,1
mod $0,$1
add $0,1
mul $2,6
add $0,$2
|
programs/oeis/283/A283508.asm | neoneye/loda | 22 | 104187 | <gh_stars>10-100
; A283508: Binary representation of the x-axis, from the origin to the right edge, of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 643", based on the 5-celled von Neumann neighborhood.
; 1,10,101,1011,10111,101111,1011111,10111111,101111111,1011111111,10111111111,101111111111,1011111111111,10111111111111,101111111111111,1011111111111111,10111111111111111,101111111111111111,1011111111111111111,10111111111111111111,101111111111111111111,1011111111111111111111,10111111111111111111111,101111111111111111111111,1011111111111111111111111,10111111111111111111111111,101111111111111111111111111,1011111111111111111111111111,10111111111111111111111111111,101111111111111111111111111111,1011111111111111111111111111111,10111111111111111111111111111111,101111111111111111111111111111111,1011111111111111111111111111111111,10111111111111111111111111111111111,101111111111111111111111111111111111
add $0,1
lpb $0
sub $0,1
mov $3,$2
cmp $3,0
add $4,$2
add $2,$3
mov $3,$4
cmp $3,0
add $4,$3
mod $2,$4
mul $4,10
lpe
mov $0,$4
div $0,10
|
programs/oeis/080/A080036.asm | karttu/loda | 0 | 18579 | ; A080036: a(n) = n + round(sqrt(2*n)) + 1.
; 1,3,5,6,8,9,10,12,13,14,15,17,18,19,20,21,23,24,25,26,27,28,30,31,32,33,34,35,36,38,39,40,41,42,43,44,45,47,48,49,50,51,52,53,54,55,57,58,59,60,61,62,63,64,65,66,68,69,70,71,72,73,74,75,76,77,78,80,81,82,83,84,85,86,87,88,89,90,91,93,94,95,96,97,98,99,100,101,102,103,104,105,107,108,109,110,111,112,113,114,115,116,117,118,119,120,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272
mov $1,$0
lpb $0,1
add $1,1
add $2,1
trn $0,$2
lpe
add $1,1
|
tests/syntax_examples/src/other_basic_subprogram_calls.ads | TNO/Dependency_Graph_Extractor-Ada | 1 | 1502 | <gh_stars>1-10
package Other_Basic_Subprogram_Calls is
function Other_F1 return Integer;
procedure Other_P1;
end Other_Basic_Subprogram_Calls;
|
oeis/076/A076507.asm | neoneye/loda-programs | 11 | 25773 | ; A076507: Three people (P1, P2, P3) are in a circle and are saying Hello to each other. They start with P2 saying "Hello, Hello". Thereafter Pn says "Hello" for n times the total number of Hello's so far.
; 2,6,8,32,144,192,768,3456,4608,18432,82944,110592,442368,1990656,2654208,10616832,47775744,63700992,254803968,1146617856,1528823808,6115295232,27518828544,36691771392,146767085568,660451885056
mov $3,2
mov $5,$0
lpb $3
mov $0,$5
sub $3,1
add $0,$3
trn $0,1
seq $0,76508 ; Expansion of 2*x*(1+4*x+8*x^2)/(1-24*x^3).
mov $2,$3
mul $2,$0
add $4,$2
lpe
min $5,1
mul $5,$0
mov $0,$4
sub $0,$5
|
programs/oeis/266/A266733.asm | karttu/loda | 1 | 8745 | <reponame>karttu/loda
; A266733: a(n) = 21*binomial(n+6,7).
; 0,21,168,756,2520,6930,16632,36036,72072,135135,240240,408408,668304,1058148,1627920,2441880,3581424,5148297,7268184,10094700,13813800,18648630,24864840,32776380,42751800,55221075,70682976,89713008,112971936,141214920,175301280,216204912,265025376,322999677,391514760,472120740,566544888,676706394,804731928,952972020,1124018280,1320721479,1546210512,1803912264,2097572400,2431277100,2809475760,3237004680,3719111760,4261482225,4870265400,5552102556,6314155848,7164138366,8110345320,9161686380,10327719192,11618684091,13045540032,14620001760,16354578240,18262612368,20358321984,22656842208,25174269120,27927704805,30935303784,34216320852,37791160344,41681426850,45909977400,50500975140,55479944520,60873828015,66711044400,73021548600,79836893136,87190291188,95116681296,103652793720,112837218480,122710475097,133315084056,144695640012,156898886760,169973793990,183971635848,198946071324,214953226488,232051778595,250303042080,269771056464,290522676192,312627662424,336158776800,361191877200,387806015520,416083537485,446110184520,477975197700,511771423800,547595423466,585547581528,625732219476,668257710120,713236594455,760785700752,811026265896,864084058992,920089507260,979177824240,1041489140328,1107168635664,1176366675393,1249238947320,1325946601980,1406656395144,1491540832782,1580778318504,1674553303500,1773056439000,1876484731275,1985041699200,2098937534400,2218389264000,2343620916000,2474863687296,2612356114368,2756344246656,2907081822645,3064830448680,3229859780532,3402447707736,3582880540722,3771453200760,3968469412740,4174241900808,4389092586879,4613352792048,4847363440920,5091475268880,5346049032324,5611455721872,5888076778584,6176304313200,6476541328425,6789201944280,7114711626540,7453507418280,7806038174550,8172764800200,8554160490876,8950710977208,9362914772211,9791283421920,10236341759280,10698628161312,11178694809576,11677107953952,12194448179760,12731310678240,13288305520413,13866057934344,14465208585828,15086413862520,15730346161530,16397694180504,17089163212212,17805475442664,18547370252775,19315604523600,20110952945160,20934208328880,21786181923660,22667703735600,23579622851400,24522807765456,25498146710673,26506547993016,27548940329820,28626273191880,29739517149342,30889664221416,32077728229932,33304745156760,34571773505115,35879894664768,37230213281184,38623857628608,40061979987120,41545757023680,43076390177184,44655106047552,46283156788869,47961820506600,49692401658900,51476231462040,53314668299970,55209098138040,57160934940900,59171621094600,61242627832911,63375455667888,65571634824696,67832725680720,70160319208980,72556037425872,75021533843256,77558493924912,80168635547385,82853709465240,85615499780748,88455824418024,91376535601638,94379520339720,97466700911580,100640035359864,103901517987267,107253179857824,110697089302800,114235352431200,117870113644920,121603556158560,125437902523920,129375415159200,133418396882925,137569191452616,141830184108228,146203802120376,150692515343370,155298836773080,160025323109652,164874575325096,169849239235767,174952006079760,180185613099240,185552844127728,191056530182364,196699550061168,202484830945320,208415349006480,214494130019169,220724249978232,227108835721404,233651065557000,240354169896750,247221431893800,254256188085900,261461829043800,268841800024875
add $0,6
mov $1,$0
bin $1,7
mul $1,21
|
notes/agda-interface/OptionPragmaCommandLine.agda | asr/apia | 10 | 3809 | -- Testing how the pragmas are saved in the agda interface files (using
-- the program dump-agdai) when they are used from the command-line:
-- $ agda --no-termination-check OptionPragmaCommandLine.agda
-- 17 October 2012. Because the PragmaOption --no-termination-check
-- was used from the command-line it is *not* saved in the interface
-- file.
-- iPragmaOptions = []
module OptionPragmaCommandLine where
|
inst/scripts/create-new.applescript | gaborcsardi/keynote | 27 | 4059 |
on run argv
set thm to item 1 of argv
tell application "Keynote"
if thm = "-" then
make new document
else
make new document with properties ¬
{ document theme: theme thm }
end if
end tell
end run
|
praks1/kodu/kodu1.asm | Leonid-98/AVR_ASM | 0 | 95897 | ldi r16, 0xFF
out 0x01, r16
main_loop:
out 0x02, r16
inc r16
ldi r17, 0xFF
delay_loop:
nop
nop
dec r17
brne delay_loop
rjmp main_loop
// 2 + 3 + (5*255 - 1) = 1279
// outer + inner + delay_loop |
ejercicios6/prueba_calcular_maximo_y_posicion.adb | iyan22/AprendeAda | 0 | 21971 | <gh_stars>0
with Ada.Text_Io, Ada.Integer_Text_Io, Datos;
with Crear_Lista_Vacia, Ins, Esc, Calcular_Maximo_y_Posicion;
use Datos;
use Ada.Text_Io, Ada.Integer_Text_Io;
procedure Prueba_Calcular_Maximo_y_posicion is
Lis : Lista; -- variable del programa principal
Maximo, Posicion: Integer;
procedure Pedir_Return is
begin
Put_Line("pulsa return para continuar ");
Skip_Line;
end Pedir_Return;
begin -- programa principal
-- Casos de prueba:
-- 1. Lista vacia. Resultado: cero
-- 2. Lista no vacia. Lista de un elemento
-- 3. Lista no vacia. Varios elementos
-- 3.1. El maximo al comienzo
-- 3.2. El maximo en medio
-- 3.3. El maximo al final
Put_Line("Programa de prueba: ");
Put_Line("*********");
Crear_Lista_Vacia(Lis);
Put_Line("Caso de prueba 1: Lista vacia ");
Put_Line("Ahora deberia escribir cero: ");
Calcular_Maximo_y_Posicion(Lis, Maximo, Posicion);
Put("Maximo: "); Put(Maximo); new_line; Put("Posicion: "); Put(Posicion);
New_Line;
New_Line;
Pedir_Return;
Crear_Lista_Vacia(Lis);
Ins(Lis, 4);
Put_Line("Caso de prueba 2: lista de un solo elemento.");
Put_Line("La lista inicial contiene ");
Esc(Lis);
Put_Line("Ahora deberia escribir 4, 1: ");
Calcular_Maximo_y_Posicion(Lis, Maximo, Posicion);
Put("Maximo: "); Put(Maximo); new_line; Put("Posicion: "); Put(Posicion);
New_Line;
New_Line;
Pedir_Return;
Crear_Lista_Vacia(Lis);
Ins(Lis, 6);
Ins(Lis, 8);
Ins(Lis, 9);
Ins(Lis, 10);
Put_Line("Caso de prueba 3.1: lista de varios elementos. Maximo al comienzo");
Put_Line("La lista inicial contiene ");
Esc(Lis);
Put_Line("Ahora deberia escribir 10, 1: ");
Calcular_Maximo_y_Posicion(Lis, Maximo, Posicion);
Put("Maximo: "); Put(Maximo); new_line; Put("Posicion: "); Put(Posicion);
New_Line;
New_Line;
Pedir_Return;
Crear_Lista_Vacia(Lis);
Ins(Lis, 8);
Ins(Lis, 9);
Ins(Lis, 10);
Ins(Lis, 6);
Put_Line("Caso de prueba 3.2: lista de varios elementos. Maximo en medio");
Put_Line("La lista inicial contiene ");
Esc(Lis);
Put_Line("Ahora deberia escribir 10, 2: ");
Calcular_Maximo_y_Posicion(Lis, Maximo, Posicion);
Put("Maximo: "); Put(Maximo); new_line; Put("Posicion: "); Put(Posicion);
New_Line;
New_Line;
Pedir_Return;
Crear_Lista_Vacia(Lis);
Ins(Lis, 10);
Ins(Lis, 6);
Ins(Lis, 8);
Ins(Lis, 9);
Put_Line("Caso de prueba 3.3: lista de varios elementos. Maximo al final");
Put_Line("La lista inicial contiene ");
Esc(Lis);
Put_Line("Ahora deberia escribir 10, 4: ");
Calcular_Maximo_y_Posicion(Lis, Maximo, Posicion);
Put("Maximo: "); Put(Maximo); new_line; Put("Posicion: "); Put(Posicion);
New_Line;
New_Line;
Pedir_Return;
Put_Line("Se acabo la prueba. Agurtz ");
end Prueba_Calcular_Maximo_y_posicion;
|
test/in-development/profiler.asm | jfrech/Joy-Assembler | 0 | 28024 | <filename>test/in-development/profiler.asm
pragma_embed-profiler-output := true
mov 0
mov 1
profiler start, one instruction
nop
profiler stop, one instruction
profiler start, loop test
mov 4
loop:
dec
jnz @loop
profiler stop, loop test
hlt
|
alloy4fun_models/trainstlt/models/1/AhCBdkvvNarRnw26F.als | Kaixi26/org.alloytools.alloy | 0 | 5030 | open main
pred idAhCBdkvvNarRnw26F_prop2 {
eventually Signal = Green
}
pred __repair { idAhCBdkvvNarRnw26F_prop2 }
check __repair { idAhCBdkvvNarRnw26F_prop2 <=> prop2o } |
archs/exec_x86.als | graymalkin/memalloy | 0 | 1922 | <gh_stars>0
module exec_x86[E]
open exec_H[E]
sig Exec_X86 extends Exec_H {
LOCKED : set E, // atomic events
MFENCE : set E // memory fence
}{
MFENCE in F
// only RMWs can be locked
LOCKED in univ.atom + atom.univ
// the atom relation only relates locked instructions
atom in (LOCKED -> LOCKED)
}
one sig rm_LOCKED extends PTag {}
one sig rm_MFENCE extends PTag {}
fun LOCKED[e:PTag->E, X:Exec_X86] : set E {
X.LOCKED - e[rm_EV] - e[rm_LOCKED] }
fun MFENCE[e:PTag->E, X:Exec_X86] : set E {
X.MFENCE - e[rm_EV] - e[rm_MFENCE] }
fun mfence[e:PTag->E, X:Exec_X86] : E->E { addsb[e,X,MFENCE[e,X]] }
|
Cubical/Algebra/AbGroup/Instances/NProd.agda | thomas-lamiaux/cubical | 0 | 14757 | {-# OPTIONS --safe #-}
module Cubical.Algebra.AbGroup.Instances.NProd where
open import Cubical.Foundations.Prelude
open import Cubical.Data.Nat using (ℕ)
open import Cubical.Algebra.Group
open import Cubical.Algebra.Group.Instances.NProd
open import Cubical.Algebra.AbGroup
private variable
ℓ : Level
open AbGroupStr
NProd-AbGroup : (G : (n : ℕ) → Type ℓ) → (Gstr : (n : ℕ) → AbGroupStr (G n)) → AbGroup ℓ
NProd-AbGroup G Gstr = Group→AbGroup (NProd-Group G (λ n → AbGroupStr→GroupStr (Gstr n)))
λ f g → funExt λ n → +Comm (Gstr n) _ _
|
arch/ARM/Nordic/drivers/nrf52/nrf-tasks.ads | BaderKashkash/Ada_Drivers_Library | 1 | 18949 | <filename>arch/ARM/Nordic/drivers/nrf52/nrf-tasks.ads
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2016-2020, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with System;
with NRF_SVD.POWER;
with NRF_SVD.CLOCK;
with NRF_SVD.GPIOTE;
with NRF_SVD.PPI;
with NRF_SVD.RADIO;
with NRF_SVD.TIMER;
with NRF_SVD.RTC;
with NRF_SVD.WDT;
with NRF_SVD.RNG;
with NRF_SVD.TEMP;
with NRF_SVD.ECB;
with NRF_SVD.CCM;
with NRF_SVD.AAR;
with NRF_SVD.TWI;
with NRF_SVD.UART;
with NRF_SVD.QDEC;
with NRF_SVD.SAADC;
with HAL; use HAL;
package nRF.Tasks is
procedure Trigger (T : Task_Type);
-- Software task trigger
function Get_Address (T : Task_Type) return System.Address;
function Get_Address (T : Task_Type) return UInt32;
-- Power management tasks
Power_CONSTLAT : constant Task_Type;
Power_LOWPWR : constant Task_Type;
-- Clock tasks
Clock_HFCLKSTART : constant Task_Type;
Clock_HFCLKSTOP : constant Task_Type;
Clock_LFCLKSTART : constant Task_Type;
Clock_LFCLKSTOP : constant Task_Type;
Clock_CAL : constant Task_Type;
Clock_CTSTART : constant Task_Type;
Clock_CTSTOP : constant Task_Type;
-- GPIO tasks
GPIOTE_OUT_0 : constant Task_Type;
GPIOTE_OUT_1 : constant Task_Type;
GPIOTE_OUT_2 : constant Task_Type;
GPIOTE_OUT_3 : constant Task_Type;
-- Programmable Peripheral Interconnect tasks
PPI_CHG_0_EN : constant Task_Type;
PPI_CHG_0_DIS : constant Task_Type;
PPI_CHG_1_EN : constant Task_Type;
PPI_CHG_1_DIS : constant Task_Type;
PPI_CHG_2_EN : constant Task_Type;
PPI_CHG_2_DIS : constant Task_Type;
PPI_CHG_3_EN : constant Task_Type;
PPI_CHG_3_DIS : constant Task_Type;
-- Radio tasks
Radio_TXEN : constant Task_Type;
Radio_RXEN : constant Task_Type;
Radio_START : constant Task_Type;
Radio_STOP : constant Task_Type;
Radio_DISABLE : constant Task_Type;
Radio_RSSISTART : constant Task_Type;
Radio_RSSISTOP : constant Task_Type;
Radio_BCSTART : constant Task_Type;
Radio_BCSTOP : constant Task_Type;
-- Timer 0 tasks
Timer_0_START : constant Task_Type;
Timer_0_STOP : constant Task_Type;
Timer_0_COUNT : constant Task_Type;
Timer_0_CLEAR : constant Task_Type;
Timer_0_CAPTURE_0 : constant Task_Type;
Timer_0_CAPTURE_1 : constant Task_Type;
Timer_0_CAPTURE_2 : constant Task_Type;
Timer_0_CAPTURE_3 : constant Task_Type;
-- Timer 1 tasks
Timer_1_START : constant Task_Type;
Timer_1_STOP : constant Task_Type;
Timer_1_COUNT : constant Task_Type;
Timer_1_CLEAR : constant Task_Type;
Timer_1_CAPTURE_0 : constant Task_Type;
Timer_1_CAPTURE_1 : constant Task_Type;
Timer_1_CAPTURE_2 : constant Task_Type;
Timer_1_CAPTURE_3 : constant Task_Type;
-- Timer 2 tasks
Timer_2_START : constant Task_Type;
Timer_2_STOP : constant Task_Type;
Timer_2_COUNT : constant Task_Type;
Timer_2_CLEAR : constant Task_Type;
Timer_2_CAPTURE_0 : constant Task_Type;
Timer_2_CAPTURE_1 : constant Task_Type;
Timer_2_CAPTURE_2 : constant Task_Type;
Timer_2_CAPTURE_3 : constant Task_Type;
-- RTC 0 tasks
RTC_0_START : constant Task_Type;
RTC_0_STOP : constant Task_Type;
RTC_0_CLEAR : constant Task_Type;
RTC_0_TRIGOVRFLW : constant Task_Type;
-- RTC 1 tasks
RTC_1_START : constant Task_Type;
RTC_1_STOP : constant Task_Type;
RTC_1_CLEAR : constant Task_Type;
RTC_1_TRIGOVRFLW : constant Task_Type;
-- Watchdog task
Watchdog_START : constant Task_Type;
-- Random Number Genrator tasks
RNG_START : constant Task_Type;
RNG_STOP : constant Task_Type;
-- Temperature tasks
Temperature_START : constant Task_Type;
Temperature_STOP : constant Task_Type;
-- AES Electronic Codebook mode encryption (ECB) tasks
ECB_START : constant Task_Type;
ECB_STOP : constant Task_Type;
-- AES CCM mode encryption (CCM) tasks
CCM_KSGEN : constant Task_Type;
CCM_CRYPT : constant Task_Type;
CCM_STOP : constant Task_Type;
-- Accelerated Address Resolver (AAR) tasks
AAR_START : constant Task_Type;
AAR_STOP : constant Task_Type;
-- Two Wire Interface (TWI) 0 tasks
TWI_0_STARTRX : constant Task_Type;
TWI_0_STARTTX : constant Task_Type;
TWI_0_STOP : constant Task_Type;
TWI_0_SUSPEND : constant Task_Type;
TWI_0_RESUME : constant Task_Type;
-- Two Wire Interface (TWI) 1 tasks
TWI_1_STARTRX : constant Task_Type;
TWI_1_STARTTX : constant Task_Type;
TWI_1_STOP : constant Task_Type;
TWI_1_SUSPEND : constant Task_Type;
TWI_1_RESUME : constant Task_Type;
-- Universal Asynchronous Receiver/Transmitter (UART) Tasks
UART_STARTRX : constant Task_Type;
UART_STOPRX : constant Task_Type;
UART_STARTTX : constant Task_Type;
UART_STOPTX : constant Task_Type;
-- Quadrature Decoder (QDEC)
QDEC_START : constant Task_Type;
QDEC_STOP : constant Task_Type;
QDEC_READCLRACC : constant Task_Type;
-- Analog to Digital Converter (ADC)
ADC_START : constant Task_Type;
ADC_SAMPLE : constant Task_Type;
ADC_STOP : constant Task_Type;
private
-- Power management tasks
Power_CONSTLAT : constant Task_Type :=
Task_Type (NRF_SVD.POWER.POWER_Periph.TASKS_CONSTLAT'Address);
Power_LOWPWR : constant Task_Type :=
Task_Type (NRF_SVD.POWER.POWER_Periph.TASKS_LOWPWR'Address);
-- Clock tasks
Clock_HFCLKSTART : constant Task_Type :=
Task_Type (NRF_SVD.CLOCK.CLOCK_Periph.TASKS_HFCLKSTART'Address);
Clock_HFCLKSTOP : constant Task_Type :=
Task_Type (NRF_SVD.CLOCK.CLOCK_Periph.TASKS_HFCLKSTOP'Address);
Clock_LFCLKSTART : constant Task_Type :=
Task_Type (NRF_SVD.CLOCK.CLOCK_Periph.TASKS_LFCLKSTART'Address);
Clock_LFCLKSTOP : constant Task_Type :=
Task_Type (NRF_SVD.CLOCK.CLOCK_Periph.TASKS_LFCLKSTOP'Address);
Clock_CAL : constant Task_Type :=
Task_Type (NRF_SVD.CLOCK.CLOCK_Periph.TASKS_CAL'Address);
Clock_CTSTART : constant Task_Type :=
Task_Type (NRF_SVD.CLOCK.CLOCK_Periph.TASKS_CTSTART'Address);
Clock_CTSTOP : constant Task_Type :=
Task_Type (NRF_SVD.CLOCK.CLOCK_Periph.TASKS_CTSTOP'Address);
-- GPIOTE tasks
GPIOTE_OUT_0 : constant Task_Type :=
Task_Type (NRF_SVD.GPIOTE.GPIOTE_Periph.TASKS_OUT (0)'Address);
GPIOTE_OUT_1 : constant Task_Type :=
Task_Type (NRF_SVD.GPIOTE.GPIOTE_Periph.TASKS_OUT (1)'Address);
GPIOTE_OUT_2 : constant Task_Type :=
Task_Type (NRF_SVD.GPIOTE.GPIOTE_Periph.TASKS_OUT (2)'Address);
GPIOTE_OUT_3 : constant Task_Type :=
Task_Type (NRF_SVD.GPIOTE.GPIOTE_Periph.TASKS_OUT (3)'Address);
-- Programmable Peripheral Interconnect Tasks
PPI_CHG_0_EN : constant Task_Type :=
Task_Type (NRF_SVD.PPI.PPI_Periph.TASKS_CHG (0).EN'Address);
PPI_CHG_0_DIS : constant Task_Type :=
Task_Type (NRF_SVD.PPI.PPI_Periph.TASKS_CHG (0).DIS'Address);
PPI_CHG_1_EN : constant Task_Type :=
Task_Type (NRF_SVD.PPI.PPI_Periph.TASKS_CHG (1).EN'Address);
PPI_CHG_1_DIS : constant Task_Type :=
Task_Type (NRF_SVD.PPI.PPI_Periph.TASKS_CHG (1).DIS'Address);
PPI_CHG_2_EN : constant Task_Type :=
Task_Type (NRF_SVD.PPI.PPI_Periph.TASKS_CHG (2).EN'Address);
PPI_CHG_2_DIS : constant Task_Type :=
Task_Type (NRF_SVD.PPI.PPI_Periph.TASKS_CHG (2).DIS'Address);
PPI_CHG_3_EN : constant Task_Type :=
Task_Type (NRF_SVD.PPI.PPI_Periph.TASKS_CHG (3).EN'Address);
PPI_CHG_3_DIS : constant Task_Type :=
Task_Type (NRF_SVD.PPI.PPI_Periph.TASKS_CHG (3).DIS'Address);
-- Radio tasks
Radio_TXEN : constant Task_Type :=
Task_Type (NRF_SVD.RADIO.RADIO_Periph.TASKS_TXEN'Address);
Radio_RXEN : constant Task_Type :=
Task_Type (NRF_SVD.RADIO.RADIO_Periph.TASKS_RXEN'Address);
Radio_START : constant Task_Type :=
Task_Type (NRF_SVD.RADIO.RADIO_Periph.TASKS_START'Address);
Radio_STOP : constant Task_Type :=
Task_Type (NRF_SVD.RADIO.RADIO_Periph.TASKS_STOP'Address);
Radio_DISABLE : constant Task_Type :=
Task_Type (NRF_SVD.RADIO.RADIO_Periph.TASKS_DISABLE'Address);
Radio_RSSISTART : constant Task_Type :=
Task_Type (NRF_SVD.RADIO.RADIO_Periph.TASKS_RSSISTART'Address);
Radio_RSSISTOP : constant Task_Type :=
Task_Type (NRF_SVD.RADIO.RADIO_Periph.TASKS_RSSISTOP'Address);
Radio_BCSTART : constant Task_Type :=
Task_Type (NRF_SVD.RADIO.RADIO_Periph.TASKS_BCSTART'Address);
Radio_BCSTOP : constant Task_Type :=
Task_Type (NRF_SVD.RADIO.RADIO_Periph.TASKS_BCSTOP'Address);
-- Timer 0 tasks
Timer_0_START : constant Task_Type :=
Task_Type (NRF_SVD.TIMER.TIMER0_Periph.TASKS_START'Address);
Timer_0_STOP : constant Task_Type :=
Task_Type (NRF_SVD.TIMER.TIMER0_Periph.TASKS_START'Address);
Timer_0_COUNT : constant Task_Type :=
Task_Type (NRF_SVD.TIMER.TIMER0_Periph.TASKS_START'Address);
Timer_0_CLEAR : constant Task_Type :=
Task_Type (NRF_SVD.TIMER.TIMER0_Periph.TASKS_START'Address);
Timer_0_CAPTURE_0 : constant Task_Type :=
Task_Type (NRF_SVD.TIMER.TIMER0_Periph.TASKS_START'Address);
Timer_0_CAPTURE_1 : constant Task_Type :=
Task_Type (NRF_SVD.TIMER.TIMER0_Periph.TASKS_START'Address);
Timer_0_CAPTURE_2 : constant Task_Type :=
Task_Type (NRF_SVD.TIMER.TIMER0_Periph.TASKS_START'Address);
Timer_0_CAPTURE_3 : constant Task_Type :=
Task_Type (NRF_SVD.TIMER.TIMER0_Periph.TASKS_START'Address);
-- Timer 1 tasks
Timer_1_START : constant Task_Type :=
Task_Type (NRF_SVD.TIMER.TIMER1_Periph.TASKS_START'Address);
Timer_1_STOP : constant Task_Type :=
Task_Type (NRF_SVD.TIMER.TIMER1_Periph.TASKS_START'Address);
Timer_1_COUNT : constant Task_Type :=
Task_Type (NRF_SVD.TIMER.TIMER1_Periph.TASKS_START'Address);
Timer_1_CLEAR : constant Task_Type :=
Task_Type (NRF_SVD.TIMER.TIMER1_Periph.TASKS_START'Address);
Timer_1_CAPTURE_0 : constant Task_Type :=
Task_Type (NRF_SVD.TIMER.TIMER1_Periph.TASKS_START'Address);
Timer_1_CAPTURE_1 : constant Task_Type :=
Task_Type (NRF_SVD.TIMER.TIMER1_Periph.TASKS_START'Address);
Timer_1_CAPTURE_2 : constant Task_Type :=
Task_Type (NRF_SVD.TIMER.TIMER1_Periph.TASKS_START'Address);
Timer_1_CAPTURE_3 : constant Task_Type :=
Task_Type (NRF_SVD.TIMER.TIMER1_Periph.TASKS_START'Address);
-- Timer 2 tasks
Timer_2_START : constant Task_Type :=
Task_Type (NRF_SVD.TIMER.TIMER2_Periph.TASKS_START'Address);
Timer_2_STOP : constant Task_Type :=
Task_Type (NRF_SVD.TIMER.TIMER2_Periph.TASKS_START'Address);
Timer_2_COUNT : constant Task_Type :=
Task_Type (NRF_SVD.TIMER.TIMER2_Periph.TASKS_START'Address);
Timer_2_CLEAR : constant Task_Type :=
Task_Type (NRF_SVD.TIMER.TIMER2_Periph.TASKS_START'Address);
Timer_2_CAPTURE_0 : constant Task_Type :=
Task_Type (NRF_SVD.TIMER.TIMER2_Periph.TASKS_START'Address);
Timer_2_CAPTURE_1 : constant Task_Type :=
Task_Type (NRF_SVD.TIMER.TIMER2_Periph.TASKS_START'Address);
Timer_2_CAPTURE_2 : constant Task_Type :=
Task_Type (NRF_SVD.TIMER.TIMER2_Periph.TASKS_START'Address);
Timer_2_CAPTURE_3 : constant Task_Type :=
Task_Type (NRF_SVD.TIMER.TIMER2_Periph.TASKS_START'Address);
-- RTC 0 tasks
RTC_0_START : constant Task_Type :=
Task_Type (NRF_SVD.RTC.RTC0_Periph.TASKS_START'Address);
RTC_0_STOP : constant Task_Type :=
Task_Type (NRF_SVD.RTC.RTC0_Periph.TASKS_STOP'Address);
RTC_0_CLEAR : constant Task_Type :=
Task_Type (NRF_SVD.RTC.RTC0_Periph.TASKS_CLEAR'Address);
RTC_0_TRIGOVRFLW : constant Task_Type :=
Task_Type (NRF_SVD.RTC.RTC0_Periph.TASKS_TRIGOVRFLW'Address);
-- RTC 1 tasks
RTC_1_START : constant Task_Type :=
Task_Type (NRF_SVD.RTC.RTC1_Periph.TASKS_START'Address);
RTC_1_STOP : constant Task_Type :=
Task_Type (NRF_SVD.RTC.RTC1_Periph.TASKS_STOP'Address);
RTC_1_CLEAR : constant Task_Type :=
Task_Type (NRF_SVD.RTC.RTC1_Periph.TASKS_CLEAR'Address);
RTC_1_TRIGOVRFLW : constant Task_Type :=
Task_Type (NRF_SVD.RTC.RTC1_Periph.TASKS_TRIGOVRFLW'Address);
-- Watchdog tasks
Watchdog_START : constant Task_Type :=
Task_Type (NRF_SVD.WDT.WDT_Periph.TASKS_START'Address);
-- Random Number Genrator tasks
RNG_START : constant Task_Type :=
Task_Type (NRF_SVD.RNG.RNG_Periph.TASKS_START'Address);
RNG_STOP : constant Task_Type :=
Task_Type (NRF_SVD.RNG.RNG_Periph.TASKS_START'Address);
-- Temperature tasks
Temperature_START : constant Task_Type :=
Task_Type (NRF_SVD.TEMP.TEMP_Periph.TASKS_START'Address);
Temperature_STOP : constant Task_Type :=
Task_Type (NRF_SVD.TEMP.TEMP_Periph.TASKS_STOP'Address);
-- AES Electronic Codebook mode encryption (ECB) tasks
ECB_START : constant Task_Type :=
Task_Type (NRF_SVD.ECB.ECB_Periph.TASKS_STARTECB'Address);
ECB_STOP : constant Task_Type :=
Task_Type (NRF_SVD.ECB.ECB_Periph.TASKS_STOPECB'Address);
-- AES CCM mode encryption (CCM) tasks
CCM_KSGEN : constant Task_Type :=
Task_Type (NRF_SVD.CCM.CCM_Periph.TASKS_KSGEN'Address);
CCM_CRYPT : constant Task_Type :=
Task_Type (NRF_SVD.CCM.CCM_Periph.TASKS_CRYPT'Address);
CCM_STOP : constant Task_Type :=
Task_Type (NRF_SVD.CCM.CCM_Periph.TASKS_STOP'Address);
-- Accelerated Address Resolver (AAR) tasks
AAR_START : constant Task_Type :=
Task_Type (NRF_SVD.AAR.AAR_Periph.TASKS_START'Address);
AAR_STOP : constant Task_Type :=
Task_Type (NRF_SVD.AAR.AAR_Periph.TASKS_STOP'Address);
-- Two Wire Interface (TWI) 0 tasks
TWI_0_STARTRX : constant Task_Type :=
Task_Type (NRF_SVD.TWI.TWI0_Periph.TASKS_STARTRX'Address);
TWI_0_STARTTX : constant Task_Type :=
Task_Type (NRF_SVD.TWI.TWI0_Periph.TASKS_STARTTX'Address);
TWI_0_STOP : constant Task_Type :=
Task_Type (NRF_SVD.TWI.TWI0_Periph.TASKS_STOP'Address);
TWI_0_SUSPEND : constant Task_Type :=
Task_Type (NRF_SVD.TWI.TWI0_Periph.TASKS_SUSPEND'Address);
TWI_0_RESUME : constant Task_Type :=
Task_Type (NRF_SVD.TWI.TWI0_Periph.TASKS_RESUME'Address);
-- Two Wire Interface (TWI) 1 tasks
TWI_1_STARTRX : constant Task_Type :=
Task_Type (NRF_SVD.TWI.TWI1_Periph.TASKS_STARTRX'Address);
TWI_1_STARTTX : constant Task_Type :=
Task_Type (NRF_SVD.TWI.TWI1_Periph.TASKS_STARTTX'Address);
TWI_1_STOP : constant Task_Type :=
Task_Type (NRF_SVD.TWI.TWI1_Periph.TASKS_STOP'Address);
TWI_1_SUSPEND : constant Task_Type :=
Task_Type (NRF_SVD.TWI.TWI1_Periph.TASKS_SUSPEND'Address);
TWI_1_RESUME : constant Task_Type :=
Task_Type (NRF_SVD.TWI.TWI1_Periph.TASKS_RESUME'Address);
-- Universal Asynchronous Receiver/Transmitter (UART) Tasks
UART_STARTRX : constant Task_Type :=
Task_Type (NRF_SVD.UART.UART0_Periph.TASKS_STARTRX'Address);
UART_STOPRX : constant Task_Type :=
Task_Type (NRF_SVD.UART.UART0_Periph.TASKS_STOPRX'Address);
UART_STARTTX : constant Task_Type :=
Task_Type (NRF_SVD.UART.UART0_Periph.TASKS_STARTTX'Address);
UART_STOPTX : constant Task_Type :=
Task_Type (NRF_SVD.UART.UART0_Periph.TASKS_STOPTX'Address);
-- Quadrature Decoder (QDEC)
QDEC_START : constant Task_Type :=
Task_Type (NRF_SVD.QDEC.QDEC_Periph.TASKS_START'Address);
QDEC_STOP : constant Task_Type :=
Task_Type (NRF_SVD.QDEC.QDEC_Periph.TASKS_STOP'Address);
QDEC_READCLRACC : constant Task_Type :=
Task_Type (NRF_SVD.QDEC.QDEC_Periph.TASKS_READCLRACC'Address);
-- Analog to Digital Converter (ADC)
ADC_START : constant Task_Type :=
Task_Type (NRF_SVD.SAADC.SAADC_Periph.TASKS_START'Address);
ADC_STOP : constant Task_Type :=
Task_Type (NRF_SVD.SAADC.SAADC_Periph.TASKS_STOP'Address);
ADC_SAMPLE : constant Task_Type :=
Task_Type (NRF_SVD.SAADC.SAADC_Periph.TASKS_SAMPLE'Address);
end nRF.Tasks;
|
PJ Grammar/Identifiers.g4 | Diolor/PJ | 0 | 1895 | lexer grammar Identifiers;
// IDENTIFIERS (must appear after all keywords in the grammar)
Identifier
: JavaLetter JavaLetterOrDigit*
;
fragment
JavaLetter
: [a-zA-Z$_] // these are the "java letters" below 0xFF
| // covers all characters above 0xFF which are not a surrogate
~[\u0000-\u00FF\uD800-\uDBFF]
{Character.isJavaIdentifierStart(_input.LA(-1))}?
| // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF
[\uD800-\uDBFF] [\uDC00-\uDFFF]
{Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))}?
;
fragment
JavaLetterOrDigit
: [a-zA-Z0-9$_] // these are the "java letters or digits" below 0xFF
| // covers all characters above 0xFF which are not a surrogate
~[\u0000-\u00FF\uD800-\uDBFF]
{Character.isJavaIdentifierPart(_input.LA(-1))}?
| // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF
[\uD800-\uDBFF] [\uDC00-\uDFFF]
{Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))}?
; |
boot/print16.asm | kbrsh/arc | 39 | 99460 | <gh_stars>10-100
; 16 Bit Print
[bits 16]
; Print Function
print16:
pusha ; Push registers to stack
mov ah, 0x0e ; Switch to TTY Mode
; Printing Loop
print16Loop:
mov al, [bx] ; Set register to current character pointer to memory
cmp al, 0 ; Compare index to 0 to see if string ended
je print16End ; If string ended, exit loop
int 0x10 ; Interupt and Print
add bx, 1 ; Increment Counter
jmp print16Loop ; Repeat
; End
print16End:
popa ; Pop all registers in stack
ret ; Return
|
embedvm/tests/test_pointer.asm | tcr/avrvm | 2 | 173185 | [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Label(id='label1')
PushConstantV(value=2)
GlobalLoad16(nargs=1, popoffset=True, address=8)
PushConstantV(value=1)
GlobalLoad16(nargs=1, popoffset=True, address=8)
PushConstantV(value=0)
GlobalLoad16(nargs=1, popoffset=True, address=8)
PushConstantV(value=2)
GlobalLoadS8(nargs=1, popoffset=True, address=5)
PushConstantV(value=1)
GlobalLoadS8(nargs=1, popoffset=True, address=5)
PushConstantV(value=0)
GlobalLoadS8(nargs=1, popoffset=True, address=5)
PushConstantV(value=2)
GlobalLoadU8(nargs=1, popoffset=True, address=2)
PushConstantV(value=1)
GlobalLoadU8(nargs=1, popoffset=True, address=2)
PushConstantV(value=0)
GlobalLoadU8(nargs=1, popoffset=True, address=2)
GlobalLoad16(nargs=1, popoffset=False, address=0)
PushConstantV(value=10)
CallUserFunction(funcid=1)
DropValue()
Return0()
PushZeros(n=3)
CallV(address=LabelRef('label1'))
DropValue()
PushConstantV(value=2)
PopLocal(sfa=0)
PushConstantV(value=5)
PopLocal(sfa=1)
PushConstantV(value=8)
PopLocal(sfa=2)
PushConstantV(value=65)
PushConstantV(value=0)
GlobalStoreU8(nargs=1, popoffset=True, address=2)
PushConstantV(value=100)
PushConstantV(value=2)
GlobalStoreU8(nargs=1, popoffset=True, address=2)
PushLocal(sfa=0)
PushConstantV(value=0)
Add()
GlobalLoadU8(nargs=0, popoffset=True, address=None)
PushConstantV(value=0)
GlobalStoreS8(nargs=1, popoffset=True, address=5)
PushLocal(sfa=0)
PushConstantV(value=2)
Add()
GlobalLoadU8(nargs=0, popoffset=True, address=None)
PushConstantV(value=2)
GlobalStoreS8(nargs=1, popoffset=True, address=5)
PushLocal(sfa=0)
GlobalLoadU8(nargs=0, popoffset=True, address=None)
PushConstantV(value=0)
GlobalStore16(nargs=1, popoffset=True, address=8)
PushLocal(sfa=0)
PushConstantV(value=2)
Add()
GlobalLoadU8(nargs=0, popoffset=True, address=None)
PushConstantV(value=2)
GlobalStore16(nargs=1, popoffset=True, address=8)
PushLocal(sfa=0)
Bury(k=0)
GlobalLoadU8(nargs=0, popoffset=True, address=None)
PushConstantV(value=1)
Add()
Dig(k=0)
GlobalStoreU8(nargs=0, popoffset=True, address=None)
PushConstantV(value=8)
PushLocal(sfa=0)
PushConstantV(value=1)
Add()
GlobalStoreU8(nargs=0, popoffset=True, address=None)
PushLocal(sfa=0)
PushConstantV(value=2)
Add()
Bury(k=0)
GlobalLoadU8(nargs=0, popoffset=True, address=None)
PushConstantV(value=1)
Sub()
Dig(k=0)
GlobalStoreU8(nargs=0, popoffset=True, address=None)
PushLocal(sfa=1)
Bury(k=0)
GlobalLoadU8(nargs=0, popoffset=True, address=None)
PushConstantV(value=1)
Add()
Dig(k=0)
GlobalStoreU8(nargs=0, popoffset=True, address=None)
PushConstantV(value=-8)
PushLocal(sfa=1)
PushConstantV(value=1)
Add()
GlobalStoreU8(nargs=0, popoffset=True, address=None)
PushLocal(sfa=1)
PushConstantV(value=2)
Add()
Bury(k=0)
GlobalLoadU8(nargs=0, popoffset=True, address=None)
PushConstantV(value=1)
Sub()
Dig(k=0)
GlobalStoreU8(nargs=0, popoffset=True, address=None)
PushLocal(sfa=2)
Bury(k=0)
GlobalLoad16(nargs=0, popoffset=True, address=None)
PushConstantV(value=1)
Add()
Dig(k=0)
GlobalStore16(nargs=0, popoffset=True, address=None)
PushConstantV(value=1616)
PushLocal(sfa=2)
PushConstantV(value=1)
PushConstantV(value=1)
ShiftLeft()
Add()
GlobalStore16(nargs=0, popoffset=True, address=None)
PushLocal(sfa=2)
PushConstantV(value=2)
PushConstantV(value=1)
ShiftLeft()
Add()
Bury(k=0)
GlobalLoad16(nargs=0, popoffset=True, address=None)
PushConstantV(value=1)
Sub()
Dig(k=0)
GlobalStore16(nargs=0, popoffset=True, address=None)
PushConstantV(value=0)
PopLocal(sfa=0)
PushLocal(sfa=0)
Bury(k=0)
GlobalLoad16(nargs=0, popoffset=True, address=None)
PushConstantV(value=8)
Add()
Dig(k=0)
GlobalStore16(nargs=0, popoffset=True, address=None)
CallV(address=LabelRef('label1'))
DropValue()
StackFramePointer()
PushConstantV(value=4)
Sub()
PopLocal(sfa=0)
PushLocal(sfa=2)
PushConstantV(value=2)
Add()
PushLocal(sfa=0)
GlobalStore16(nargs=0, popoffset=True, address=None)
PushLocal(sfa=1)
Bury(k=0)
GlobalLoad16(nargs=0, popoffset=True, address=None)
PushConstantV(value=1000)
Sub()
Dig(k=0)
GlobalStore16(nargs=0, popoffset=True, address=None)
PushLocal(sfa=1)
Bury(k=0)
GlobalLoad16(nargs=0, popoffset=True, address=None)
PushConstantV(value=-1)
Mul()
Dig(k=0)
GlobalStore16(nargs=0, popoffset=True, address=None)
PushConstantV(value=0)
Bury(k=0)
GlobalLoad16(nargs=0, popoffset=True, address=None)
PushConstantV(value=3)
Sub()
Dig(k=0)
GlobalStore16(nargs=0, popoffset=True, address=None)
PushConstantV(value=14)
PopLocal(sfa=3)
PushLocal(sfa=3)
CallAddress()
DropValue()
Return0() |
source/tasking/required/s-tadeca.ads | ytomino/drake | 33 | 14568 | <filename>source/tasking/required/s-tadeca.ads<gh_stars>10-100
pragma License (Unrestricted);
-- implementation unit required by compiler
with Ada.Calendar;
function System.Tasking.Async_Delays.Enqueue_Calendar (
T : Ada.Calendar.Time;
D : not null access Delay_Block)
return Boolean;
|
tests/messages-test_data-tests.adb | thindil/steamsky | 80 | 10046 | <gh_stars>10-100
-- This package has been generated automatically by GNATtest.
-- You are allowed to add your code to the bodies of test routines.
-- Such changes will be kept during further regeneration of this file.
-- All code placed outside of test routine bodies will be lost. The
-- code intended to set up and tear down the test environment should be
-- placed into Messages.Test_Data.
with AUnit.Assertions; use AUnit.Assertions;
with System.Assertions;
-- begin read only
-- id:2.2/00/
--
-- This section can be used to add with clauses if necessary.
--
-- end read only
-- begin read only
-- end read only
package body Messages.Test_Data.Tests is
-- begin read only
-- id:2.2/01/
--
-- This section can be used to add global variables and other elements.
--
-- end read only
-- begin read only
-- end read only
-- begin read only
function Wrap_Test_FormatedTime_5bb1ad_97dea1
(Time: Date_Record := Game_Date) return String is
begin
begin
pragma Assert(True);
null;
exception
when System.Assertions.Assert_Failure =>
AUnit.Assertions.Assert
(False,
"req_sloc(messages.ads:0):Test_FormattedTime test requirement violated");
end;
declare
Test_FormatedTime_5bb1ad_97dea1_Result: constant String :=
GNATtest_Generated.GNATtest_Standard.Messages.FormatedTime(Time);
begin
begin
pragma Assert(Test_FormatedTime_5bb1ad_97dea1_Result'Length > 0);
null;
exception
when System.Assertions.Assert_Failure =>
AUnit.Assertions.Assert
(False,
"ens_sloc(messages.ads:0:):Test_FormattedTime test commitment violated");
end;
return Test_FormatedTime_5bb1ad_97dea1_Result;
end;
end Wrap_Test_FormatedTime_5bb1ad_97dea1;
-- end read only
-- begin read only
procedure Test_FormatedTime_test_formattedtime(Gnattest_T: in out Test);
procedure Test_FormatedTime_5bb1ad_97dea1(Gnattest_T: in out Test) renames
Test_FormatedTime_test_formattedtime;
-- id:2.2/5bb1ad5dbd52690f/FormatedTime/1/0/test_formattedtime/
procedure Test_FormatedTime_test_formattedtime(Gnattest_T: in out Test) is
function FormatedTime
(Time: Date_Record := Game_Date) return String renames
Wrap_Test_FormatedTime_5bb1ad_97dea1;
-- end read only
pragma Unreferenced(Gnattest_T);
begin
Assert(FormatedTime /= "", "Failed to get formated game time.");
-- begin read only
end Test_FormatedTime_test_formattedtime;
-- end read only
-- begin read only
procedure Wrap_Test_AddMessage_508d2e_c15a00
(Message: String; MType: Message_Type; Color: Message_Color := WHITE) is
begin
begin
pragma Assert(Message'Length > 0);
null;
exception
when System.Assertions.Assert_Failure =>
AUnit.Assertions.Assert
(False,
"req_sloc(messages.ads:0):Test_AddMessage test requirement violated");
end;
GNATtest_Generated.GNATtest_Standard.Messages.AddMessage
(Message, MType, Color);
begin
pragma Assert(True);
null;
exception
when System.Assertions.Assert_Failure =>
AUnit.Assertions.Assert
(False,
"ens_sloc(messages.ads:0:):Test_AddMessage test commitment violated");
end;
end Wrap_Test_AddMessage_508d2e_c15a00;
-- end read only
-- begin read only
procedure Test_AddMessage_test_addmessage(Gnattest_T: in out Test);
procedure Test_AddMessage_508d2e_c15a00(Gnattest_T: in out Test) renames
Test_AddMessage_test_addmessage;
-- id:2.2/508d2ebb71c5d14a/AddMessage/1/0/test_addmessage/
procedure Test_AddMessage_test_addmessage(Gnattest_T: in out Test) is
procedure AddMessage
(Message: String; MType: Message_Type;
Color: Message_Color := WHITE) renames
Wrap_Test_AddMessage_508d2e_c15a00;
-- end read only
pragma Unreferenced(Gnattest_T);
Amount: constant Natural := MessagesAmount;
begin
AddMessage("Test message.", Default);
Assert(Amount < MessagesAmount, "Failed to add new message.");
-- begin read only
end Test_AddMessage_test_addmessage;
-- end read only
-- begin read only
function Wrap_Test_GetMessage_56cd5a_0b2a8d
(MessageIndex: Integer; MType: Message_Type := Default)
return Message_Data is
begin
declare
Test_GetMessage_56cd5a_0b2a8d_Result: constant Message_Data :=
GNATtest_Generated.GNATtest_Standard.Messages.GetMessage
(MessageIndex, MType);
begin
return Test_GetMessage_56cd5a_0b2a8d_Result;
end;
end Wrap_Test_GetMessage_56cd5a_0b2a8d;
-- end read only
-- begin read only
procedure Test_GetMessage_test_getmessage(Gnattest_T: in out Test);
procedure Test_GetMessage_56cd5a_0b2a8d(Gnattest_T: in out Test) renames
Test_GetMessage_test_getmessage;
-- id:2.2/56cd5ac704cead2b/GetMessage/1/0/test_getmessage/
procedure Test_GetMessage_test_getmessage(Gnattest_T: in out Test) is
function GetMessage
(MessageIndex: Integer; MType: Message_Type := Default)
return Message_Data renames
Wrap_Test_GetMessage_56cd5a_0b2a8d;
-- end read only
pragma Unreferenced(Gnattest_T);
begin
Assert
(GetMessage(1).Message /= Null_Unbounded_String,
"Failed to get message.");
Assert
(GetMessage(1_000).Message = Null_Unbounded_String,
"Failed to not get non-existing message.");
-- begin read only
end Test_GetMessage_test_getmessage;
-- end read only
-- begin read only
procedure Wrap_Test_ClearMessages_aeb026_267040 is
begin
GNATtest_Generated.GNATtest_Standard.Messages.ClearMessages;
end Wrap_Test_ClearMessages_aeb026_267040;
-- end read only
-- begin read only
procedure Test_ClearMessages_test_clearmessages(Gnattest_T: in out Test);
procedure Test_ClearMessages_aeb026_267040(Gnattest_T: in out Test) renames
Test_ClearMessages_test_clearmessages;
-- id:2.2/aeb0266c09a96d71/ClearMessages/1/0/test_clearmessages/
procedure Test_ClearMessages_test_clearmessages(Gnattest_T: in out Test) is
procedure ClearMessages renames Wrap_Test_ClearMessages_aeb026_267040;
-- end read only
pragma Unreferenced(Gnattest_T);
begin
ClearMessages;
Assert(MessagesAmount = 0, "Failed to clear all messages.");
AddMessage("Test message.", Default);
-- begin read only
end Test_ClearMessages_test_clearmessages;
-- end read only
-- begin read only
function Wrap_Test_MessagesAmount_922f17_8e4cbf
(MType: Message_Type := Default) return Natural is
begin
declare
Test_MessagesAmount_922f17_8e4cbf_Result: constant Natural :=
GNATtest_Generated.GNATtest_Standard.Messages.MessagesAmount(MType);
begin
return Test_MessagesAmount_922f17_8e4cbf_Result;
end;
end Wrap_Test_MessagesAmount_922f17_8e4cbf;
-- end read only
-- begin read only
procedure Test_MessagesAmount_test_messagesamount(Gnattest_T: in out Test);
procedure Test_MessagesAmount_922f17_8e4cbf(Gnattest_T: in out Test) renames
Test_MessagesAmount_test_messagesamount;
-- id:2.2/922f1712ec778778/MessagesAmount/1/0/test_messagesamount/
procedure Test_MessagesAmount_test_messagesamount
(Gnattest_T: in out Test) is
function MessagesAmount
(MType: Message_Type := Default) return Natural renames
Wrap_Test_MessagesAmount_922f17_8e4cbf;
-- end read only
pragma Unreferenced(Gnattest_T);
begin
Assert
(MessagesAmount = Natural(Messages_List.Length),
"Failed to count properly amount of messages.");
-- begin read only
end Test_MessagesAmount_test_messagesamount;
-- end read only
-- begin read only
procedure Wrap_Test_RestoreMessage_c0c9bd_0f207a
(Message: Unbounded_String; MType: Message_Type := Default;
Color: Message_Color := WHITE) is
begin
begin
pragma Assert(Message /= Null_Unbounded_String);
null;
exception
when System.Assertions.Assert_Failure =>
AUnit.Assertions.Assert
(False,
"req_sloc(messages.ads:0):Test_RestoreMessage test requirement violated");
end;
GNATtest_Generated.GNATtest_Standard.Messages.RestoreMessage
(Message, MType, Color);
begin
pragma Assert(True);
null;
exception
when System.Assertions.Assert_Failure =>
AUnit.Assertions.Assert
(False,
"ens_sloc(messages.ads:0:):Test_RestoreMessage test commitment violated");
end;
end Wrap_Test_RestoreMessage_c0c9bd_0f207a;
-- end read only
-- begin read only
procedure Test_RestoreMessage_test_restoremessage(Gnattest_T: in out Test);
procedure Test_RestoreMessage_c0c9bd_0f207a(Gnattest_T: in out Test) renames
Test_RestoreMessage_test_restoremessage;
-- id:2.2/c0c9bd3a9b2621df/RestoreMessage/1/0/test_restoremessage/
procedure Test_RestoreMessage_test_restoremessage
(Gnattest_T: in out Test) is
procedure RestoreMessage
(Message: Unbounded_String; MType: Message_Type := Default;
Color: Message_Color := WHITE) renames
Wrap_Test_RestoreMessage_c0c9bd_0f207a;
-- end read only
pragma Unreferenced(Gnattest_T);
Amount: constant Natural := MessagesAmount;
begin
RestoreMessage(To_Unbounded_String("Test message"));
Assert
(MessagesAmount = Amount + 1, "Failed to restore the game message.");
-- begin read only
end Test_RestoreMessage_test_restoremessage;
-- end read only
-- begin read only
function Wrap_Test_GetLastMessageIndex_ee1f16_517343 return Natural is
begin
declare
Test_GetLastMessageIndex_ee1f16_517343_Result: constant Natural :=
GNATtest_Generated.GNATtest_Standard.Messages.GetLastMessageIndex;
begin
return Test_GetLastMessageIndex_ee1f16_517343_Result;
end;
end Wrap_Test_GetLastMessageIndex_ee1f16_517343;
-- end read only
-- begin read only
procedure Test_GetLastMessageIndex_test_getlastmessageindex
(Gnattest_T: in out Test);
procedure Test_GetLastMessageIndex_ee1f16_517343
(Gnattest_T: in out Test) renames
Test_GetLastMessageIndex_test_getlastmessageindex;
-- id:2.2/ee1f163ccc085b43/GetLastMessageIndex/1/0/test_getlastmessageindex/
procedure Test_GetLastMessageIndex_test_getlastmessageindex
(Gnattest_T: in out Test) is
function GetLastMessageIndex return Natural renames
Wrap_Test_GetLastMessageIndex_ee1f16_517343;
-- end read only
pragma Unreferenced(Gnattest_T);
begin
Assert
(GetLastMessageIndex = Messages_List.Last_Index,
"Failed to get last message index.");
-- begin read only
end Test_GetLastMessageIndex_test_getlastmessageindex;
-- end read only
-- begin read only
-- id:2.2/02/
--
-- This section can be used to add elaboration code for the global state.
--
begin
-- end read only
null;
-- begin read only
-- end read only
end Messages.Test_Data.Tests;
|
oeis/163/A163471.asm | neoneye/loda-programs | 11 | 166227 | ; A163471: a(n) = 10*a(n-1) - 22*a(n-2) for n > 1; a(0) = 3, a(1) = 18.
; Submitted by <NAME>(s1)
; 3,18,114,744,4932,32952,221016,1485216,9989808,67223328,452457504,3045661824,20502553152,138020971392,929153544576,6255074075136,42109362770688,283481998053888,1908413999583744,12847536038651904,86490252395676672,582256731106424832,3919781758359361536,26388169499252269056,177646496308616736768,1195925234102617448448,8051029422236606275584,54199939072108478889984,364876743431879450836992,2456368774732407972790272,16536399391822731809488896,111323880874114342693502976,749438022121043327126274048
mov $1,1
lpb $0
sub $0,1
mul $1,2
mov $2,$3
mul $3,4
add $3,$1
mul $1,3
add $1,$2
lpe
mov $0,$1
mul $0,3
|
Assembler/AssemblyCode/LowLevel/FLAGS_SAVE_RESTORE.asm | KPU-RISC/KPU | 8 | 88661 | <gh_stars>1-10
; Set register D to "00000100"
SET A, "0000"
SET B, "0100"
SHL
MOV_ALU_C_TO_AB A
SHL
MOV_ALU_C_TO_AB A
SHL
MOV_ALU_C_TO_AB A
SHL
MOV_ALU_C_TO_AB A
OR
MOV_ALU_OUT D
; Set register E to "00000100"
SET A, "0000"
SET B, "0100"
SHL
MOV_ALU_C_TO_AB A
SHL
MOV_ALU_C_TO_AB A
SHL
MOV_ALU_C_TO_AB A
SHL
MOV_ALU_C_TO_AB A
OR
MOV_ALU_OUT E
; Perform a "SUB D, E" operation
MOV_ALU_IN A, E
NOT
MOV_ALU_C_TO_AB A
SET B, "0001"
ADD
MOV_ALU_C_TO_AB B
MOV_ALU_IN A, D
ADD
MOV_ALU_OUT D
; Save the flags
SAVE_FLAGS
; Set register D to "00000100"
SET A, "0000"
SET B, "0100"
SHL
MOV_ALU_C_TO_AB A
SHL
MOV_ALU_C_TO_AB A
SHL
MOV_ALU_C_TO_AB A
SHL
MOV_ALU_C_TO_AB A
OR
MOV_ALU_OUT D
; Set register E to "00000001"
SET A, "0000"
SET B, "0001"
SHL
MOV_ALU_C_TO_AB A
SHL
MOV_ALU_C_TO_AB A
SHL
MOV_ALU_C_TO_AB A
SHL
MOV_ALU_C_TO_AB A
OR
MOV_ALU_OUT E
; Perform a "SUB D, E" operation
MOV_ALU_IN A, E
NOT
MOV_ALU_C_TO_AB A
SET B, "0001"
ADD
MOV_ALU_C_TO_AB B
MOV_ALU_IN A, D
ADD
MOV_ALU_OUT D
; Restore the flags
RESTORE_FLAGS
HLT |
oeis/177/A177057.asm | neoneye/loda-programs | 11 | 247734 | <reponame>neoneye/loda-programs<filename>oeis/177/A177057.asm
; A177057: Decimal expansion of 7/6.
; Submitted by <NAME>
; 1,1,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6
div $0,2
cmp $0,0
gcd $0,6
|
Kernel/asm/interrupts.asm | mcornidez/TP2-SO | 0 | 169679 | GLOBAL _cli, _sti, picMasterMask, picSlaveMask, haltcpu, _hlt
GLOBAL _irq00Handler, _irq01Handler, _irq02Handler
GLOBAL _irq03Handler
GLOBAL _irq04Handler
GLOBAL _irq05Handler
GLOBAL _sysCallHandler
GLOBAL _exception0Handler
GLOBAL _exception6Handler
EXTERN irqDispatcher
EXTERN sysCallDispatcher
EXTERN exceptionDispatcher
EXTERN getStackBase
EXTERN scheduler
SECTION .text
%macro pushState 0
push rax
push rbx
push rcx
push rdx
push rbp
push rdi
push rsi
push r8
push r9
push r10
push r11
push r12
push r13
push r14
push r15
%endmacro
%macro popState 0
pop r15
pop r14
pop r13
pop r12
pop r11
pop r10
pop r9
pop r8
pop rsi
pop rdi
pop rbp
pop rdx
pop rcx
pop rbx
pop rax
%endmacro
%macro pushall 0
push rax
push rbx
push rcx
push rdx
push rbp
push rdi
push rsi
push r8
push r9
push r10
push r12
push r11
push r13
push r14
push r15
push fs
push gs
%endmacro
%macro popall 0
pop gs
pop fs
pop r15
pop r14
pop r13
pop r12
pop r11
pop r10
pop r9
pop r8
pop rsi
pop rdi
pop rbp
pop rdx
pop rcx
pop rbx
pop rax
%endmacro
%macro irqHandlerMaster 1
pushState
mov rdi, %1 ; pasaje de parametro
call irqDispatcher
; signal pic EOI (End of Interrupt)
mov al, 20h
out 20h, al
popState
iretq
%endmacro
%macro exceptionHandler 1
mov rsi, rsp
pushState
mov rdi, %1
call exceptionDispatcher
popState
sti
call getStackBase
mov [rsp + 3*8], rax
mov rax, 0x400000
mov [rsp], rax
iretq
%endmacro
_hlt:
sti
hlt
ret
_cli:
cli
ret
_sti:
sti
ret
picMasterMask:
push rbp
mov rbp, rsp
mov ax, di
out 21h,al
pop rbp
retn
picSlaveMask:
push rbp
mov rbp, rsp
mov ax, di ; ax = mascara de 16 bits
out 0A1h,al
pop rbp
retn
;8254 Timer (Timer Tick)
_irq00Handler:
pushall
mov rdi, 0
mov rsi, rsp
call irqDispatcher
mov rdi,rsp
call scheduler
mov rsp,rax
; signal pic EOI (End of Interrupt)
mov al, 20h
out 20h, al
popall
iretq
;Keyboard
_irq01Handler:
irqHandlerMaster 1
;Cascade pic never called
_irq02Handler:
irqHandlerMaster 2
;Serial Port 2 and 4
_irq03Handler:
irqHandlerMaster 3
;Serial Port 1 and 3
_irq04Handler:
irqHandlerMaster 4
;USB
_irq05Handler:
irqHandlerMaster 5
;SysCalls
_sysCallHandler:
call sysCallDispatcher
iretq
;Zero Division Exception
_exception0Handler:
exceptionHandler 0
;Invalid OpCode Exception
_exception6Handler:
exceptionHandler 6
haltcpu:
cli
hlt
ret
SECTION .bss
aux resq 1
|
programs/oeis/040/A040255.asm | karttu/loda | 1 | 177165 | <gh_stars>1-10
; A040255: Continued fraction for sqrt(272).
; 16,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32
sub $0,1
mod $0,2
mul $0,11
add $0,2
pow $0,2
mov $1,$0
div $1,11
mul $1,2
add $1,2
|
src/qweyboard/qweyboard-languages.ads | kqr/qweyboard | 33 | 16581 | <filename>src/qweyboard/qweyboard-languages.ads<gh_stars>10-100
with Unicode_Strings; use Unicode_Strings;
with Ada.Containers.Vectors;
with Ada.Containers.Ordered_Maps;
private with Logging;
package Qweyboard.Languages is
use Unbounded;
package Key_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Softkey);
package Layer_Maps is new Ada.Containers.Ordered_Maps (Key_Type => Softkey, Element_Type => Wide_Wide_Character);
package Layout_Maps is new Ada.Containers.Ordered_Maps (Key_Type => Softkey, Element_Type => Layer_Maps.Map, "=" => Layer_Maps."=");
package Substitution_Maps is new Ada.Containers.Ordered_Maps (Key_Type => Unbounded_Wide_Wide_String, Element_Type => Unbounded_Wide_Wide_String);
type Layout_Type is record
-- This is a vector because we want the order they're declared in to matter...
-- (except, of course, NOKEY which gets last dibs always)
Modifiers : Key_Vectors.Vector;
Layers : Layout_Maps.Map;
end record;
type Substitution_Type is (Left, Middle, Right);
type Substitution_Dictionary is array (Substitution_Type) of Substitution_Maps.Map;
-- TODO: is a protected object really the right abstraction here?
protected User_Language is
function Decode (Released : Key_Sets.Set) return Unbounded_Wide_Wide_String;
procedure Add_Key (Modifier : Softkey; Key : Softkey; Symbol : Wide_Wide_Character);
procedure Add_Substitution (Position : Substitution_Type; Pattern : Unbounded_Wide_Wide_String; Replacement : Unbounded_Wide_Wide_String);
private
Current_Layout : Layout_Type;
Substitutions : Substitution_Dictionary;
function Virtual_Layer (Layout : Layout_Type; Pressed : Key_Sets.Set) return Layer_Maps.Map;
function Mod_Layer (Layout : Layout_Type; Modifier : Softkey; Pressed : Key_Sets.Set) return Layer_Maps.Map;
function Perform_Substitutions (Text : Unbounded_Wide_Wide_String; From : Substitution_Maps.Map) return Unbounded_Wide_Wide_String;
end User_Language;
private
use Logging;
end Qweyboard.Languages;
|
src/infrastructure/infrastructure.adb | AdamSzerszen/Concurrency_v.2.0 | 0 | 4972 | <reponame>AdamSzerszen/Concurrency_v.2.0<gh_stars>0
with Ada.Text_IO; use Ada.Text_IO;
package body Infrastructure is
protected body Steering is
entry SetNumber(CorrectNumber: in SteeringNumber)
when OwnNumber = -1 is
begin
OwnNumber := CorrectNumber;
end;
entry Incoming(CurrentTram: in TramNumber)
when not CurrentlyOccupied is
begin
CurrentlyOccupied := True;
OccupierNumber := CurrentTram;
end;
entry Leaving
when CurrentlyOccupied is
begin
CurrentlyOccupied := False;
OccupierNumber := -1;
end;
entry CheckStatus
when True is
currentOccupierString: String := TramNumber'Image(OccupierNumber);
steeringNumberString: String := SteeringNumber'Image(OwnNumber);
begin
Put("Steering: ");
Put(steeringNumberString);
if CurrentlyOccupied then
Put(" occupied by tram: ");
Put_Line(currentOccupierString);
else
Put_Line(" empty");
end if;
end;
end Steering;
end Infrastructure;
|
oeis/158/A158129.asm | neoneye/loda-programs | 11 | 140 | ; A158129: 100n^2 - 2n.
; 98,396,894,1592,2490,3588,4886,6384,8082,9980,12078,14376,16874,19572,22470,25568,28866,32364,36062,39960,44058,48356,52854,57552,62450,67548,72846,78344,84042,89940,96038,102336,108834,115532,122430,129528,136826,144324,152022,159920,168018,176316,184814,193512,202410,211508,220806,230304,240002,249900,259998,270296,280794,291492,302390,313488,324786,336284,347982,359880,371978,384276,396774,409472,422370,435468,448766,462264,475962,489860,503958,518256,532754,547452,562350,577448,592746
mov $1,5
mov $2,$0
add $2,1
mul $2,2
mul $1,$2
pow $1,2
sub $1,$2
mov $0,$1
|
audio/music/unusedsong.asm | opiter09/ASM-Machina | 1 | 14184 | Music_UnusedSong_Ch1::
tempo 144
volume 7, 7
vibrato 5, 1, 6
Music_UnusedSong_branch_a91b::
note_type 12, 1, 0
octave 6
note E_, 1
rest 1
octave 5
note B_, 1
rest 1
octave 6
note C#, 1
rest 1
octave 5
note B_, 1
octave 6
note E_, 1
rest 4
note E_, 2
rest 2
note D#, 1
rest 1
octave 5
note B_, 1
rest 1
octave 6
note C#, 1
rest 1
octave 5
note B_, 1
octave 6
note D#, 1
rest 8
note C#, 1
rest 1
note D#, 1
rest 1
note C#, 1
octave 5
note B_, 1
rest 2
octave 6
note C#, 1
rest 1
note D#, 1
rest 1
note C#, 1
octave 5
note B_, 1
rest 2
octave 6
note D#, 4
note C#, 4
note D#, 1
note E_, 1
rest 1
note F#, 1
rest 1
octave 5
note B_, 2
rest 1
octave 6
note E_, 1
rest 1
octave 5
note B_, 1
rest 1
octave 6
note C#, 1
rest 1
octave 5
note B_, 1
octave 6
note E_, 1
rest 8
note D#, 1
rest 1
octave 5
note B_, 1
rest 1
octave 6
note C#, 1
rest 1
octave 5
note B_, 1
octave 6
note D#, 1
rest 4
octave 5
note B_, 2
rest 2
octave 6
note C#, 1
rest 1
note D#, 1
rest 1
note C#, 1
octave 5
note B_, 1
rest 2
octave 6
note C#, 1
rest 1
note D#, 1
rest 1
note E_, 1
note F#, 1
rest 2
note F#, 4
note E_, 4
note F#, 1
note G#, 1
rest 1
note F#, 1
rest 1
note D#, 2
rest 3
octave 5
note A_, 2
rest 2
note B_, 2
rest 2
octave 6
note C#, 2
rest 2
note E_, 2
note F#, 8
rest 2
note E_, 2
note D#, 2
note C#, 2
rest 2
octave 5
note G#, 2
rest 2
note A_, 2
rest 2
note B_, 2
rest 2
octave 6
note D#, 2
note E_, 8
rest 2
note D#, 2
note C#, 2
note D#, 2
octave 5
note A_, 2
note G#, 2
note A_, 2
note A#, 1
note B_, 1
rest 4
note F#, 2
rest 2
note B_, 2
note A#, 2
note B_, 2
octave 6
note C_, 1
note C#, 1
rest 8
octave 5
note F#, 2
note F_, 2
note F#, 2
note G#, 2
note A_, 2
octave 6
note E_, 2
note D#, 2
note C#, 2
octave 5
note B_, 2
rest 6
note B_, 2
rest 6
sound_loop 0, Music_UnusedSong_branch_a91b
sound_ret
Music_UnusedSong_Ch2::
tempo 144
volume 7, 7
toggle_perfect_pitch
vibrato 6, 1, 5
Music_UnusedSong_branch_a9d8::
note_type 12, 1, 0
octave 6
note E_, 1
rest 1
note G#, 1
rest 1
note F#, 1
rest 1
note A_, 1
note G#, 1
rest 8
note D#, 1
rest 1
note F#, 1
rest 1
note E_, 1
rest 1
note G#, 1
note F#, 1
rest 4
octave 5
note B_, 2
rest 2
octave 6
note C#, 1
rest 1
note D#, 1
rest 1
note E_, 1
note F#, 1
rest 2
note C#, 1
rest 1
note D#, 1
rest 1
note E_, 1
note F#, 1
rest 2
note F#, 4
note E_, 4
note F#, 1
note G#, 1
rest 1
note F#, 1
rest 1
note D#, 2
rest 1
note E_, 1
rest 1
note G#, 1
rest 1
note F#, 1
rest 1
note A_, 1
note G#, 1
rest 4
note E_, 2
rest 2
note D#, 1
rest 1
note F#, 1
rest 1
note E_, 1
rest 1
note G#, 1
note F#, 1
rest 8
note C#, 1
rest 1
note D#, 1
rest 1
note E_, 1
note F#, 1
rest 2
note C#, 1
rest 1
note D#, 1
rest 1
note E_, 1
note F#, 1
rest 2
note F#, 4
note E_, 4
note F#, 1
note G#, 1
rest 1
note B_, 1
rest 1
note F#, 2
rest 1
note C#, 2
rest 2
note D#, 2
rest 2
note E_, 2
rest 2
note G#, 2
rest 2
note D#, 8
rest 2
note E_, 2
note D#, 2
note C#, 2
octave 5
note B_, 2
rest 2
octave 6
note C#, 2
rest 2
note D#, 2
rest 2
note F#, 2
rest 2
note C#, 8
rest 2
note D#, 2
note C#, 2
octave 5
note B_, 2
note A_, 2
note G#, 2
note A_, 2
note G#, 1
note F#, 1
rest 8
note B_, 2
note A#, 2
note B_, 2
note A_, 1
note G#, 1
rest 4
note G#, 2
rest 2
note F#, 2
note F_, 2
note F#, 2
note G#, 2
note A_, 2
note E_, 2
note C#, 2
note E_, 2
note F#, 2
rest 6
note D#, 2
rest 6
sound_loop 0, Music_UnusedSong_branch_a9d8
sound_ret
|
3-mid/opengl/source/lean/light/opengl-light.ads | charlie5/lace | 20 | 15821 | <gh_stars>10-100
package openGL.Light
--
-- Models a light.
--
is
type Item is abstract tagged private;
function is_On (Self : in Item) return Boolean;
procedure is_On (Self : in out Item; Now : in Boolean := True);
function Site (Self : in Item) return openGL.Site;
procedure Site_is (Self : in out Item; Now : in openGL.Site);
private
type Item is abstract tagged
record
On : Boolean := False;
Site : openGL.Site := (0.0, 0.0, 1.0); -- The GL default.
end record;
end openGL.Light;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.