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
libsrc/graphics/gray/grpage.asm
andydansby/z88dk-mk2
1
84709
<gh_stars>1-10 ; ; TI Gray Library Functions ; ; Written by <NAME> - Mar 2001 ; ; $Id: grpage.asm,v 1.2 2001/04/18 13:21:38 stefano Exp $ ; ; ; A trick to be used with the dafault graph functions ; ; IN: A=Page Number (0/1) ; all registers are saved XLIB graypage XREF base_graphics XREF graybit1 XREF graybit2 .graypage push hl and a jr nz,flippage ld hl,(graybit1) ld (base_graphics),hl pop hl ret .flippage ld hl,(graybit2) ld (base_graphics),hl pop hl ret
oeis/189/A189316.asm
neoneye/loda-programs
11
164497
; A189316: Expansion of 5*(1-x-x^2)/((1+x)*(1-3*x+x^2)) ; 5,5,15,35,95,245,645,1685,4415,11555,30255,79205,207365,542885,1421295,3720995,9741695,25504085,66770565,174807605,457652255,1198149155,3136795215,8212236485,21499914245,56287506245,147362604495,385800307235,1010038317215 seq $0,5248 ; Bisection of Lucas numbers: a(n) = L(2*n) = A000032(2*n). div $0,5 mul $0,10 add $0,5
oeis/052/A052875.asm
neoneye/loda-programs
11
93806
; A052875: E.g.f.: (exp(x)-1)^2/(2-exp(x)). ; Submitted by <NAME> ; 0,0,2,12,74,540,4682,47292,545834,7087260,102247562,1622632572,28091567594,526858348380,10641342970442,230283190977852,5315654681981354,130370767029135900,3385534663256845322,92801587319328411132,2677687796244384203114,81124824998504073881820,2574844419803190384544202,85438451336745709294580412,2958279121074145472650648874,106697365438475775825583498140,4002225759844168492486127539082,155897763918621623249276226253692,6297562064950066033518373935334634,263478385263023690020893329044576860 seq $0,2050 ; Number of simplices in barycentric subdivision of n-simplex. div $0,2
tests/typing/good/testfile-rec-3.adb
xuedong/mini-ada
0
14392
with Ada.Text_IO; use Ada.Text_IO; procedure Test is function Oups(N: Integer) return Integer is L : Integer := Oups(N); begin return 0; end; begin New_Line; end;
spreadsheet_to_csv.scpt
phoeniex/papyrus
3
3439
<reponame>phoeniex/papyrus<filename>spreadsheet_to_csv.scpt #!/usr/bin/osascript on run argv set theFilePath to POSIX file (item 1 of argv) set theExportFilePath to POSIX file (item 2 of argv) set theFilePathAlias to theFilePath as alias -- ensureUTF8Encoding do shell script "/usr/bin/defaults write com.apple.iWork.Numbers CSVExportEncoding -int 4" set exportName to theExportFilePath as text set aDoc to theFilePathAlias as text tell application "Numbers" set theDoc to open aDoc export theDoc to file exportName as CSV close theDoc end tell end run
libtool/src/gmp-6.1.2/mpn/sh/sh2/submul_1.asm
kroggen/aergo
1,602
5317
dnl SH2 mpn_submul_1 -- Multiply a limb vector with a limb and subtract the dnl result from a second limb vector. dnl Copyright 1995, 2000, 2011 Free Software Foundation, Inc. dnl This file is part of the GNU MP Library. dnl dnl The GNU MP Library is free software; you can redistribute it and/or modify dnl it under the terms of either: dnl dnl * the GNU Lesser General Public License as published by the Free dnl Software Foundation; either version 3 of the License, or (at your dnl option) any later version. dnl dnl or dnl dnl * the GNU General Public License as published by the Free Software dnl Foundation; either version 2 of the License, or (at your option) any dnl later version. dnl dnl or both in parallel, as here. dnl dnl The GNU MP Library is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License dnl for more details. dnl dnl You should have received copies of the GNU General Public License and the dnl GNU Lesser General Public License along with the GNU MP Library. If not, dnl see https://www.gnu.org/licenses/. include(`../config.m4') C INPUT PARAMETERS C res_ptr r4 C s1_ptr r5 C size r6 C s2_limb r7 changecom(blah) C disable # to make all C comments below work ASM_START() PROLOGUE(mpn_submul_1) mov #0,r2 C cy_limb = 0 mov #0,r0 C Keep r0 = 0 for entire loop clrt L(top): mov.l @r5+,r3 dmulu.l r3,r7 sts macl,r1 addc r2,r1 C lo_prod += old cy_limb sts mach,r2 C new cy_limb = hi_prod mov.l @r4,r3 addc r0,r2 C cy_limb += T, T = 0 subc r1,r3 addc r0,r2 C cy_limb += T, T = 0 dt r6 mov.l r3,@r4 bf.s L(top) add #4,r4 rts mov r2,r0 EPILOGUE()
Global/zoom-toggle-mute.applescript
boisy/AppleScripts
116
529
<reponame>boisy/AppleScripts -- -- Created by: <NAME> -- Created on: 9/15/20 -- try if not (application "AnyBar" exists) then error "AnyBar not installed, either remove line 23 or download AnyBar from 'https://github.com/tonsky/AnyBar'" end if if notInMeeting() then error "not in a meeting" tell application "System Events" tell process "zoom.us" tell menu bar 1 tell menu bar item 3 tell menu "Meeting" if menu item "Mute Audio" exists then click menu item "Mute Audio" set diag to "Audio is muted" set c to "white" else if menu item "Unmute Audio" exists then click menu item "Unmute Audio" set c to "red" set diag to "Audio is Unmuted" end if end tell end tell end tell end tell end tell do shell script "/bin/echo -n " & c & " | nc -4u -w0 localhost ${2:-1738}" display notification (diag) with title ("Toggle zoom audio") on error errMsg number errNum display dialog (errMsg & return & return & errNum) ¬ buttons {"Cancel", "OK"} ¬ default button ("OK") ¬ with icon caution end try on notInMeeting() if application "zoom.us" is not running then return false tell application "System Events" tell process "zoom.us" tell menu bar 1 tell menu bar item "zoom.us" tell menu 1 return (enabled of menu item "Join Meeting...") end tell end tell end tell end tell end tell end notInMeeting
PRG/levels/Plains/5-7Lower.asm
narfman0/smb3_pp1
0
29406
; Original address was $A4F9 ; 5-7 lower part (broken LoadLevel_LittleCloudSolidRun fails to load in editor) .word W507L ; Alternate level layout .word W507O ; Alternate object layout .byte LEVEL1_SIZE_07 | LEVEL1_YSTART_170 .byte LEVEL2_BGPAL_00 | LEVEL2_OBJPAL_08 | LEVEL2_XSTART_18 | LEVEL2_UNUSEDFLAG .byte LEVEL3_TILESET_13 | LEVEL3_VSCROLL_FREE | LEVEL3_PIPENOTEXIT .byte LEVEL4_BGBANK_INDEX(1) | LEVEL4_INITACT_NOTHING .byte LEVEL5_BGM_ATHLETIC | LEVEL5_TIME_300 .byte $00, $00, $03, $60, $00, $19, $20, $02, $D5, $1A, $00, $C0, $2A, $19, $03, $92 .byte $09, $05, $E2, $0F, $07, $E3, $61, $08, $16, $19, $08, $90, $14, $0A, $43, $17 .byte $0C, $22, $0C, $0B, $E2, $62, $0D, $15, $12, $10, $02, $20, $13, $14, $20, $19 .byte $16, $21, $13, $14, $21, $19, $16, $22, $13, $14, $22, $19, $16, $23, $15, $18 .byte $24, $17, $14, $25, $19, $10, $23, $18, $0D, $0A, $13, $E2, $34, $15, $84, $37 .byte $16, $09, $38, $16, $40, $39, $16, $40, $19, $1B, $92, $08, $1D, $E3, $34, $1D .byte $84, $36, $1F, $40, $37, $1F, $40, $38, $1F, $40, $39, $1F, $40, $12, $21, $02 .byte $60, $20, $1E, $02, $22, $E2, $04, $26, $E3, $34, $26, $84, $57, $28, $05, $38 .byte $28, $40, $39, $28, $40, $1A, $2D, $C0, $11, $14, $2E, $33, $20, $2F, $18, $36 .byte $2D, $09, $21, $31, $14, $22, $33, $10, $18, $31, $13, $32, $35, $41, $36, $37 .byte $61, $2E, $39, $41, $2A, $3B, $41, $19, $3A, $92, $56, $37, $03, $2A, $39, $09 .byte $20, $3B, $C4, $E3, $61, $05, $40, $40, $BF, $0F, $50, $40, $BA, $0F, $58, $50 .byte $22, $1A, $50, $BF, $1A, $60, $BF, $40, $5A, $09, $FF
MdePkg/Library/BaseLib/X64/TdVmcall.nasm
mefff/edk2
0
7357
<reponame>mefff/edk2 ;------------------------------------------------------------------------------ ;* ;* Copyright (c) 2020 - 2021, Intel Corporation. All rights reserved.<BR> ;* SPDX-License-Identifier: BSD-2-Clause-Patent ;* ;* ;------------------------------------------------------------------------------ DEFAULT REL SECTION .text %define TDVMCALL_EXPOSE_REGS_MASK 0xffec %define TDVMCALL 0x0 %macro tdcall 0 db 0x66,0x0f,0x01,0xcc %endmacro %macro tdcall_push_regs 0 push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rsi push rdi %endmacro %macro tdcall_pop_regs 0 pop rdi pop rsi pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp %endmacro %define number_of_regs_pushed 8 %define number_of_parameters 4 ; ; Keep these in sync for push_regs/pop_regs, code below ; uses them to find 5th or greater parameters ; %define first_variable_on_stack_offset \ ((number_of_regs_pushed * 8) + (number_of_parameters * 8) + 8) %define second_variable_on_stack_offset \ ((first_variable_on_stack_offset) + 8) %macro tdcall_regs_preamble 2 mov rax, %1 xor rcx, rcx mov ecx, %2 ; R10 = 0 (standard TDVMCALL) xor r10d, r10d ; Zero out unused (for standard TDVMCALL) registers to avoid leaking ; secrets to the VMM. xor ebx, ebx xor esi, esi xor edi, edi xor edx, edx xor ebp, ebp xor r8d, r8d xor r9d, r9d %endmacro %macro tdcall_regs_postamble 0 xor ebx, ebx xor esi, esi xor edi, edi xor ecx, ecx xor edx, edx xor r8d, r8d xor r9d, r9d xor r10d, r10d xor r11d, r11d %endmacro ;------------------------------------------------------------------------------ ; 0 => RAX = TDCALL leaf ; M => RCX = TDVMCALL register behavior ; 1 => R10 = standard vs. vendor ; RDI => R11 = TDVMCALL function / nr ; RSI = R12 = p1 ; RDX => R13 = p2 ; RCX => R14 = p3 ; R8 => R15 = p4 ; UINT64 ; EFIAPI ; TdVmCall ( ; UINT64 Leaf, // Rcx ; UINT64 P1, // Rdx ; UINT64 P2, // R8 ; UINT64 P3, // R9 ; UINT64 P4, // rsp + 0x28 ; UINT64 *Val // rsp + 0x30 ; ) global ASM_PFX(TdVmCall) ASM_PFX(TdVmCall): tdcall_push_regs mov r11, rcx mov r12, rdx mov r13, r8 mov r14, r9 mov r15, [rsp + first_variable_on_stack_offset ] tdcall_regs_preamble TDVMCALL, TDVMCALL_EXPOSE_REGS_MASK tdcall ; ignore return dataif TDCALL reports failure. test rax, rax jnz .no_return_data ; Propagate TDVMCALL success/failure to return value. mov rax, r10 ; Retrieve the Val pointer. mov r9, [rsp + second_variable_on_stack_offset ] test r9, r9 jz .no_return_data ; On success, propagate TDVMCALL output value to output param test rax, rax jnz .no_return_data mov [r9], r11 .no_return_data: tdcall_regs_postamble tdcall_pop_regs ret
libsrc/_DEVELOPMENT/adt/bv_priority_queue/c/sdcc_iy/bv_priority_queue_pop_fastcall.asm
jpoikela/z88dk
640
168832
<gh_stars>100-1000 ; int bv_priority_queue_pop_fastcall(bv_priority_queue_t *q) SECTION code_clib SECTION code_adt_bv_priority_queue PUBLIC _bv_priority_queue_pop_fastcall EXTERN _ba_priority_queue_pop_fastcall defc _bv_priority_queue_pop_fastcall = _ba_priority_queue_pop_fastcall
Cubical/Data/Prod/Properties.agda
borsiemir/cubical
0
14747
<filename>Cubical/Data/Prod/Properties.agda {-# OPTIONS --cubical --safe #-} module Cubical.Data.Prod.Properties where open import Cubical.Core.Everything open import Cubical.Data.Prod.Base open import Cubical.Data.Sigma open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.HLevels open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Univalence private variable ℓ ℓ' : Level A : Type ℓ B : Type ℓ' -- Swapping is an equivalence swap : A × B → B × A swap (x , y) = (y , x) swap-invol : (xy : A × B) → swap (swap xy) ≡ xy swap-invol (_ , _) = refl isEquivSwap : (A : Type ℓ) (B : Type ℓ') → isEquiv (λ (xy : A × B) → swap xy) isEquivSwap A B = isoToIsEquiv (iso swap swap swap-invol swap-invol) swapEquiv : (A : Type ℓ) (B : Type ℓ') → A × B ≃ B × A swapEquiv A B = (swap , isEquivSwap A B) swapEq : (A : Type ℓ) (B : Type ℓ') → A × B ≡ B × A swapEq A B = ua (swapEquiv A B) private open import Cubical.Data.Nat -- As × is defined as a datatype this computes as expected -- (i.e. "C-c C-n test1" reduces to (2 , 1)). If × is implemented -- using Sigma this would be "transp (λ i → swapEq ℕ ℕ i) i0 (1 , 2)" test : ℕ × ℕ test = transp (λ i → swapEq ℕ ℕ i) i0 (1 , 2) testrefl : test ≡ (2 , 1) testrefl = refl -- equivalence between the sigma-based definition and the inductive one A×B≃A×ΣB : A × B ≃ A ×Σ B A×B≃A×ΣB = isoToEquiv (iso (λ { (a , b) → (a , b)}) (λ { (a , b) → (a , b)}) (λ _ → refl) (λ { (a , b) → refl })) A×B≡A×ΣB : A × B ≡ A ×Σ B A×B≡A×ΣB = ua A×B≃A×ΣB swapΣEquiv : (A : Type ℓ) (B : Type ℓ') → A ×Σ B ≃ B ×Σ A swapΣEquiv A B = compEquiv (compEquiv (invEquiv A×B≃A×ΣB) (swapEquiv A B)) A×B≃A×ΣB -- truncation for products isOfHLevelProd : (n : ℕ) → isOfHLevel n A → isOfHLevel n B → isOfHLevel n (A × B) isOfHLevelProd {A = A} {B = B} n h1 h2 = let h : isOfHLevel n (A ×Σ B) h = isOfHLevelΣ n h1 (λ _ → h2) in transport (λ i → isOfHLevel n (A×B≡A×ΣB {A = A} {B = B} (~ i))) h ×-≃ : ∀ {ℓ₁ ℓ₂ ℓ₃ ℓ₄} {A : Type ℓ₁} {B : Type ℓ₂} {C : Type ℓ₃} {D : Type ℓ₄} → A ≃ C → B ≃ D → A × B ≃ C × D ×-≃ {A = A} {B = B} {C = C} {D = D} f g = isoToEquiv (iso φ ψ η ε) where φ : A × B → C × D φ (a , b) = equivFun f a , equivFun g b ψ : C × D → A × B ψ (c , d) = equivFun (invEquiv f) c , equivFun (invEquiv g) d η : section φ ψ η (c , d) i = retEq f c i , retEq g d i ε : retract φ ψ ε (a , b) i = secEq f a i , secEq g b i
tests/tk-image-bitmap-test_data-tests.adb
thindil/tashy2
2
27584
<reponame>thindil/tashy2 -- 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 Tk.Image.Bitmap.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 with Ada.Environment_Variables; use Ada.Environment_Variables; -- begin read only -- end read only package body Tk.Image.Bitmap.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_Get_Option_e3d52c_aaa578 (Bitmap_Image: Tk_Image; Name: String; Interpreter: Tcl_Interpreter := Get_Interpreter) return String is begin begin pragma Assert (Bitmap_Image'Length > 0 and Name'Length > 0 and Interpreter /= Null_Interpreter); null; exception when System.Assertions.Assert_Failure => AUnit.Assertions.Assert (False, "req_sloc(tk-image-bitmap.ads:0):Tests_Get_Option_Bitmap test requirement violated"); end; declare Test_Get_Option_e3d52c_aaa578_Result: constant String := GNATtest_Generated.GNATtest_Standard.Tk.Image.Bitmap.Get_Option (Bitmap_Image, Name, Interpreter); begin begin pragma Assert(True); null; exception when System.Assertions.Assert_Failure => AUnit.Assertions.Assert (False, "ens_sloc(tk-image-bitmap.ads:0:):Tests_Get_Option_Bitmap test commitment violated"); end; return Test_Get_Option_e3d52c_aaa578_Result; end; end Wrap_Test_Get_Option_e3d52c_aaa578; -- end read only -- begin read only procedure Test_Get_Option_tests_get_option_bitmap(Gnattest_T: in out Test); procedure Test_Get_Option_e3d52c_aaa578(Gnattest_T: in out Test) renames Test_Get_Option_tests_get_option_bitmap; -- id:2.2/e3d52c2e49e4f170/Get_Option/1/0/tests_get_option_bitmap/ procedure Test_Get_Option_tests_get_option_bitmap (Gnattest_T: in out Test) is function Get_Option (Bitmap_Image: Tk_Image; Name: String; Interpreter: Tcl_Interpreter := Get_Interpreter) return String renames Wrap_Test_Get_Option_e3d52c_aaa578; -- end read only pragma Unreferenced(Gnattest_T); begin if Value("DISPLAY", "")'Length = 0 then Assert(True, "No display, can't test"); return; end if; Assert (Get_Option("mybitmap", "background") = "black", "Failed to get option of the selected image"); -- begin read only end Test_Get_Option_tests_get_option_bitmap; -- 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 Tk.Image.Bitmap.Test_Data.Tests;
constants/gfx_constants.asm
opiter09/ASM-Machina
1
101954
TILE_WIDTH EQU 8 ; pixels LEN_1BPP_TILE EQU 1 * TILE_WIDTH ; bytes LEN_2BPP_TILE EQU 2 * TILE_WIDTH ; bytes SCREEN_WIDTH EQU 20 SCREEN_HEIGHT EQU 18 SCREEN_WIDTH_PX EQU SCREEN_WIDTH * TILE_WIDTH ; pixels SCREEN_HEIGHT_PX EQU SCREEN_HEIGHT * TILE_WIDTH ; pixels BG_MAP_WIDTH EQU 32 ; tiles BG_MAP_HEIGHT EQU 32 ; tiles SPRITEBUFFERSIZE EQU 7 * 7 * LEN_1BPP_TILE ; HP bar HP_BAR_GREEN EQU 0 HP_BAR_YELLOW EQU 1 HP_BAR_RED EQU 2 ; wOAMBuffer NUM_SPRITE_OAM_STRUCTS EQU 40 ; hAutoBGTransferEnabled TRANSFERTOP EQU 0 TRANSFERMIDDLE EQU 1 TRANSFERBOTTOM EQU 2 ; hRedrawRowOrColumnMode REDRAW_COL EQU 1 REDRAW_ROW EQU 2 ; tile list ids ; TileIDListPointerTable indexes (see data/tilemaps.asm) const_def const TILEMAP_MON_PIC const TILEMAP_SLIDE_DOWN_MON_PIC_7X5 const TILEMAP_SLIDE_DOWN_MON_PIC_7X3 const TILEMAP_GENGAR_INTRO_1 const TILEMAP_GENGAR_INTRO_2 const TILEMAP_GENGAR_INTRO_3 const TILEMAP_GAME_BOY const TILEMAP_LINK_CABLE NUM_TILEMAPS EQU const_value
deps/FreeTypeAda/src/ft-glyphs.adb
Roldak/OpenGLAda
1
11236
<reponame>Roldak/OpenGLAda -- part of FreeTypeAda, (c) 2017 <NAME> -- released under the terms of the MIT license, see the file "COPYING" with FT.Errors; with FT.API.Glyphs; package body FT.Glyphs is use type Errors.Error_Code; procedure Check_Glyph (Object : Glyph_Reference) is begin if Object.Data = null then raise Constraint_Error with "Glyph_Reference is not initialized"; end if; end Check_Glyph; -- ------------------------------------------------------------------------- procedure Finalize (Object : in out Glyph_Reference) is Ptr : constant Glyph_Ptr := Object.Data; begin Object.Data := null; if Ptr /= null then API.Glyphs.FT_Done_Glyph (Ptr); end if; end Finalize; -- ------------------------------------------------------------------------- procedure Get_Glyph (Object : Glyph_Slot_Reference; Target : out Glyph_Reference) is Ret : aliased Glyph_Ptr; Code : Errors.Error_Code; begin Code := API.Glyphs.FT_Get_Glyph (Object.Data, Ret'Unchecked_Access); if Code /= Errors.Ok then raise FreeType_Exception with "FT.Faces.Glyphs.Get_Glyph error :" & Errors.Description (Code); end if; Target.Finalize; Target.Data := Ret; end Get_Glyph; -- ------------------------------------------------------------------------- function Bitmap (Object : Glyph_Slot_Reference) return Bitmap_Record is begin return Object.Data.Bitmap; end Bitmap; -- ------------------------------------------------------------------------- function Bitmap_Left (Object : Glyph_Slot_Reference) return Interfaces.C.int is begin return Object.Data.Bitmap_Left; end Bitmap_Left; -- ------------------------------------------------------------------ function Bitmap_Top (Object : Glyph_Slot_Reference) return Interfaces.C.int is begin return Object.Data.Bitmap_Top; end Bitmap_Top; -- ------------------------------------------------------------------ function Advance (Object : Glyph_Slot_Reference) return Vector is begin return Object.Data.Advance; end Advance; -- ------------------------------------------------------------------------- function Format (Object : Glyph_Slot_Reference) return Glyph_Format is begin return Object.Data.Format; end Format; -- ------------------------------------------------------------------------- procedure Glyph_To_Bitmap (Object : Glyph_Reference; Mode : FT.Faces.Render_Mode; Origin : access Vector; Destroy : Boolean) is use Errors; begin Check_Glyph (Object); declare Code : constant Errors.Error_Code := API.Glyphs.FT_Glyph_To_Bitmap (Object.Data, Mode, Origin, FT.API.Bool (Destroy)); begin if Code /= Errors.Ok then raise FT.FreeType_Exception with "FT.Glyphs.Glyph_To_Bitmap error: " & Errors.Description (Code); end if; end; end Glyph_To_Bitmap; -- ------------------------------------------------------------------------- procedure Render_Glyph (Object : Glyph_Slot_Reference; Mode : FT.Faces.Render_Mode) is Code : Errors.Error_Code; begin Code := FT.API.Glyphs.FT_Render_Glyph (Object.Data, Mode); if Code /= Errors.Ok then raise FT.FreeType_Exception with "FT.Glyphs.Render_Glyph error: " & Errors.Description (Code); end if; end Render_Glyph; -- ------------------------------------------------------------------------- end FT.Glyphs;
lcd/last_ly_clocks/main.asm
AntonioND/gbc-hw-tests
6
172290
<reponame>AntonioND/gbc-hw-tests INCLUDE "hardware.inc" INCLUDE "header.inc" SECTION "var",BSS repeat_loop: DS 1 SECTION "Main",HOME GLOBAL LCD_function LCD_function:: push af ld a,[rLY] cp a,152 jr nz,._not_152 ; 152 xor a,a ld [rLYC],a pop af xor a,a reti ._not_152: pop af ld [hl+],a ret ;-------------------------------------------------------------------------- ;- Main() - ;-------------------------------------------------------------------------- Main: ld hl,$A000 ld a,LCDCF_ON ld [rLCDC],a ld a,[Init_Reg_A] cp a,$11 jr nz,.skip1 ld a,0 ld [repeat_loop],a call CPU_slow .skip1: .repeat_all: ; ------------------------------------------------------- ld a,$0A ld [$0000],a ; enable ram ; ------------------------------------------------------- di ld a,IEF_LCDC ld [rIE],a ld a,152 ld [rLYC],a ld a,STATF_LYC ld [rSTAT],a ld b,152 call wait_ly ld b,151 call wait_ly ld a,0 ld [rIF],a ei REPT 2048 inc a ENDR ; ------------------------------------------------------- push hl ; magic number ld [hl],$12 inc hl ld [hl],$34 inc hl ld [hl],$56 inc hl ld [hl],$78 pop hl ld a,$00 ld [$0000],a ; disable ram ; ------------------------------------------------------- ld a,[Init_Reg_A] cp a,$11 jr nz,.dontchange ld a,[repeat_loop] and a,a jr nz,.endloop ; ------------------------------------------------------- call CPU_fast ld a,1 ld [repeat_loop],a jp .repeat_all .dontchange: .endloop: halt jr .endloop
test/asset/agda-stdlib-1.0/Data/List/Relation/Binary/Sublist/Heterogeneous/Solver.agda
omega12345/agda-mode
0
9344
------------------------------------------------------------------------ -- The Agda standard library -- -- A solver for proving that one list is a sublist of the other. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary using (Rel; Reflexive; Decidable) module Data.List.Relation.Binary.Sublist.Heterogeneous.Solver {a r} {A : Set a} (R : Rel A r) (R-refl : Reflexive R) (R? : Decidable R) where -- Note that we only need the above two constraints to define the -- solver itself. The data structures do not depend on them. However, -- having the whole module parametrised by them means that we can -- instantiate them upon import. open import Level using (_⊔_) open import Data.Fin as Fin open import Data.Maybe as M open import Data.Nat.Base as Nat using (ℕ) open import Data.Product open import Data.Vec as Vec using (Vec ; lookup) open import Data.List hiding (lookup) open import Data.List.Properties open import Data.List.Relation.Binary.Sublist.Heterogeneous hiding (lookup) open import Data.List.Relation.Binary.Sublist.Heterogeneous.Properties open import Function open import Relation.Binary.PropositionalEquality as P using (_≡_; _≗_; sym; cong; cong₂; subst₂) open import Relation.Nullary open P.≡-Reasoning ------------------------------------------------------------------------ -- Reified list expressions -- Basic building blocks: variables and values data Item (n : ℕ) : Set a where var : Fin n → Item n val : A → Item n -- Abstract Syntax Trees infixr 5 _<>_ data TList (n : ℕ) : Set a where It : Item n → TList n _<>_ : TList n → TList n → TList n [] : TList n -- Equivalent linearised representation RList : ∀ n → Set a RList n = List (Item n) -- Semantics ⟦_⟧I : ∀ {n} → Item n → Vec (List A) n → List A ⟦ var k ⟧I ρ = lookup ρ k ⟦ val a ⟧I ρ = [ a ] ⟦_⟧T : ∀ {n} → TList n → Vec (List A) n → List A ⟦ It it ⟧T ρ = ⟦ it ⟧I ρ ⟦ t <> u ⟧T ρ = ⟦ t ⟧T ρ ++ ⟦ u ⟧T ρ ⟦ [] ⟧T ρ = [] ⟦_⟧R : ∀ {n} → RList n → Vec (List A) n → List A ⟦ [] ⟧R ρ = [] ⟦ x ∷ xs ⟧R ρ = ⟦ x ⟧I ρ ++ ⟦ xs ⟧R ρ -- Orders data _⊆I_ {n} : (d e : Item n) → Set (a ⊔ r) where var : ∀ {k l} → k ≡ l → var k ⊆I var l val : ∀ {a b} → R a b → val a ⊆I val b _⊆T_ : ∀ {n} → (d e : TList n) → Set (a ⊔ r) d ⊆T e = ∀ ρ → Sublist R (⟦ d ⟧T ρ) (⟦ e ⟧T ρ) _⊆R_ : ∀ {n} (d e : RList n) → Set (a ⊔ r) d ⊆R e = ∀ ρ → Sublist R (⟦ d ⟧R ρ) (⟦ e ⟧R ρ) -- Flattening in a semantics-respecting manner ⟦++⟧R : ∀ {n} xs ys (ρ : Vec (List A) n) → ⟦ xs ++ ys ⟧R ρ ≡ ⟦ xs ⟧R ρ ++ ⟦ ys ⟧R ρ ⟦++⟧R [] ys ρ = P.refl ⟦++⟧R (x ∷ xs) ys ρ = begin ⟦ x ⟧I ρ ++ ⟦ xs ++ ys ⟧R ρ ≡⟨ cong (⟦ x ⟧I ρ ++_) (⟦++⟧R xs ys ρ) ⟩ ⟦ x ⟧I ρ ++ ⟦ xs ⟧R ρ ++ ⟦ ys ⟧R ρ ≡⟨ sym $ ++-assoc (⟦ x ⟧I ρ) (⟦ xs ⟧R ρ) (⟦ ys ⟧R ρ) ⟩ (⟦ x ⟧I ρ ++ ⟦ xs ⟧R ρ) ++ ⟦ ys ⟧R ρ ∎ flatten : ∀ {n} (t : TList n) → Σ[ r ∈ RList n ] ⟦ r ⟧R ≗ ⟦ t ⟧T flatten [] = [] , λ _ → P.refl flatten (It it) = it ∷ [] , λ ρ → ++-identityʳ (⟦ It it ⟧T ρ) flatten (t <> u) = let (rt , eqt) = flatten t (ru , equ) = flatten u in rt ++ ru , λ ρ → begin ⟦ rt ++ ru ⟧R ρ ≡⟨ ⟦++⟧R rt ru ρ ⟩ ⟦ rt ⟧R ρ ++ ⟦ ru ⟧R ρ ≡⟨ cong₂ _++_ (eqt ρ) (equ ρ) ⟩ ⟦ t ⟧T ρ ++ ⟦ u ⟧T ρ ≡⟨⟩ ⟦ t <> u ⟧T ρ ∎ ------------------------------------------------------------------------ -- Solver for the sublist problem -- auxiliary lemmas private keep-it : ∀ {n a b} → a ⊆I b → (xs ys : RList n) → xs ⊆R ys → (a ∷ xs) ⊆R (b ∷ ys) keep-it (var a≡b) xs ys hyp ρ = ++⁺ (reflexive R-refl (cong _ a≡b)) (hyp ρ) keep-it (val rab) xs ys hyp ρ = rab ∷ hyp ρ skip-it : ∀ {n} it (d e : RList n) → d ⊆R e → d ⊆R (it ∷ e) skip-it it d ys hyp ρ = ++ˡ (⟦ it ⟧I ρ) (hyp ρ) -- Solver for items solveI : ∀ {n} (a b : Item n) → Maybe (a ⊆I b) solveI (var k) (var l) = M.map var $ decToMaybe (k Fin.≟ l) solveI (val a) (val b) = M.map val $ decToMaybe (R? a b) solveI _ _ = nothing -- Solver for linearised expressions solveR : ∀ {n} (d e : RList n) → Maybe (d ⊆R e) -- trivial solveR [] e = just (λ ρ → minimum _) solveR d [] = nothing -- actual work solveR (a ∷ d) (b ∷ e) with solveI a b ... | just it = M.map (keep-it it d e) (solveR d e) ... | nothing = M.map (skip-it b (a ∷ d) e) (solveR (a ∷ d) e) -- Coming back to ASTs thanks to flatten solveT : ∀ {n} (t u : TList n) → Maybe (t ⊆T u) solveT t u = let (rt , eqt) = flatten t (ru , equ) = flatten u in case solveR rt ru of λ where (just hyp) → just (λ ρ → subst₂ (Sublist R) (eqt ρ) (equ ρ) (hyp ρ)) nothing → nothing -- Prover for ASTs prove : ∀ {n} (d e : TList n) → From-just (solveT d e) prove d e = from-just (solveT d e)
programs/oeis/136/A136437.asm
neoneye/loda
22
81001
; A136437: a(n) = prime(n) - k! where k is the greatest number such that k! <= prime(n). ; 0,1,3,1,5,7,11,13,17,5,7,13,17,19,23,29,35,37,43,47,49,55,59,65,73,77,79,83,85,89,7,11,17,19,29,31,37,43,47,53,59,61,71,73,77,79,91,103,107,109,113,119,121,131,137,143,149,151,157,161,163,173,187,191,193,197,211,217,227,229,233,239,247,253,259,263,269,277,281,289,299,301,311,313,319,323,329,337,341,343,347,359,367,371,379,383,389,401,403,421 seq $0,40 ; The prime numbers. sub $0,1 seq $0,212598 ; a(n) = n - m!, where m is the largest number such that m! <= n.
attic/p42/SysCore/proc/Debug/main.asm
mooseman/plan_42
7
100697
; Listing generated by Microsoft (R) Optimizing Compiler Version 14.00.50727.42 TITLE c:\Documents and Settings\Michael\Desktop\Neptune\OSDev\demo24\SysCore\proc\main.cpp .686P .XMM include listing.inc .model flat INCLUDELIB LIBCMT INCLUDELIB OLDNAMES CONST SEGMENT $SG2531 DB 0aH, 0dH, 'Hello world!', 00H CONST ENDS PUBLIC ?processEntry@@YAXXZ ; processEntry ; Function compile flags: /Odtpy ; File c:\documents and settings\michael\desktop\neptune\osdev\demo24\syscore\proc\main.cpp _TEXT SEGMENT _str$ = -4 ; size = 4 ?processEntry@@YAXXZ PROC ; processEntry ; 12 : void processEntry () { push ebp mov ebp, esp push ecx push ebx ; 13 : ; 14 : char* str="\n\rHello world!"; mov DWORD PTR _str$[ebp], OFFSET $SG2531 ; 15 : ; 16 : __asm { ; 17 : ; 18 : /* display message through kernel terminal */ ; 19 : mov ebx, str mov ebx, DWORD PTR _str$[ebp] ; 20 : mov eax, 0 mov eax, 0 ; 21 : int 0x80 int -128 ; ffffff80H ; 22 : ; 23 : /* terminate */ ; 24 : mov eax, 1 mov eax, 1 ; 25 : int 0x80 int -128 ; ffffff80H $LN2@processEnt: ; 26 : } ; 27 : for (;;); jmp SHORT $LN2@processEnt ; 28 : } pop ebx mov esp, ebp pop ebp ret 0 ?processEntry@@YAXXZ ENDP ; processEntry _TEXT ENDS END
oeis/345/A345890.asm
neoneye/loda-programs
11
83489
<reponame>neoneye/loda-programs<filename>oeis/345/A345890.asm ; A345890: a(n) = n + (n - 1) * (n - pi(n)). ; 1,3,5,10,13,21,25,36,49,64,71,89,97,118,141,166,177,205,217,248,281,316,331,369,409,451,495,541,561,610,631,683,737,793,851,911,937,1000,1065,1132,1161,1231,1261,1334,1409,1486,1519,1599,1681,1765,1851,1939,1977,2068 mov $1,$0 seq $1,62298 ; Number of nonprimes <= n. mul $1,$0 add $0,$1 add $0,1
MathProgs/CirProgs.asm
bbernardoni/MathTI83
0
179121
UNIT_CIRCLE: bcall(_ClrLCD) bcall(_GrBufClr) ld hl, UNIT_CIRCLE_DATA push hl ld a, 68 ld (curGX2), a ld (curGX), a ld a, 31 ld (curGY2), a ld a, 5 ld (curGY), a set useFastCirc, (iy+plotFlag3) bcall(_GrphCirc) res useFastCirc, (iy+plotFlag3) UNIT_CIRCLE_LOOP: ld bc, 68*256+31 pop hl ld d, (hl) inc hl ld e, (hl) dec hl push de push hl ld h, 1 bcall(_ILine) call AppendStrInlineInit .db "rad=",0 pop hl push hl or a ld de, UNIT_CIRCLE_DATA sbc hl, de ld a, l srl a push af ld hl, UNIT_CIRCLE_RAD_TEXT call FindAthStr call AppendStr ld hl, 0*256+1 ld e, 40 call PrintToE ;sin call AppendStrInlineInit .db "sin=",0 pop af push af ld hl, UNIT_CIRCLE_SIN_TEXT call FindAthStr call AppendStr ld hl, 10*256+1 ld e, 40 call PrintToE ;cos call AppendStrInlineInit .db "cos=",0 pop af push af add a, 4 and 1111b ld hl, UNIT_CIRCLE_SIN_TEXT call FindAthStr call AppendStr ld hl, 17*256+1 ld e, 40 call PrintToE ;tan call AppendStrInlineInit .db "tan=",0 pop af push af and 111b ld hl, UNIT_CIRCLE_TAN_TEXT call FindAthStr call AppendStr ld hl, 24*256+1 ld e, 40 call PrintToE ;cot call AppendStrInlineInit .db "cot=",0 pop af push af sub 4 neg and 111b ld hl, UNIT_CIRCLE_TAN_TEXT call FindAthStr call AppendStr ld hl, 31*256+1 ld e, 40 call PrintToE ;sec call AppendStrInlineInit .db "sec=",0 pop af push af ld hl, UNIT_CIRCLE_SEC_TEXT call FindAthStr call AppendStr ld hl, 38*256+1 ld e, 40 call PrintToE ;csc call AppendStrInlineInit .db "csc=",0 pop af push af add a, 12 and 1111b ld hl, UNIT_CIRCLE_SEC_TEXT call FindAthStr call AppendStr ld hl, 45*256+1 ld e, 40 call PrintToE ;(x,y) call AppendStrInlineInit .db "(",0 pop af push af add a, 4 and 1111b ld hl, UNIT_CIRCLE_SIN_TEXT call FindAthStr call AppendStr call AppendStrInline .db ",",0 pop af ld hl, UNIT_CIRCLE_SIN_TEXT call FindAthStr call AppendStr call AppendStrInline .db ")",0 ld hl, 57*256+1 ld e, 48 call PrintToE bcall(_GetKey) pop hl cp kQuit jr z, UNIT_CIRCLE_QUIT cp kUp jr z, UNIT_CIRCLE_UP cp kDown jr z, UNIT_CIRCLE_DOWN cp kLeft jr z, UNIT_CIRCLE_UP cp kRight jr z, UNIT_CIRCLE_DOWN pop de push hl jp UNIT_CIRCLE_LOOP UNIT_CIRCLE_CONTINUE: pop de push hl ld bc, 68*256+31 ld h, 0 bcall(_ILine) jp UNIT_CIRCLE_LOOP UNIT_CIRCLE_QUIT: pop de set graphDraw, (iy+graphFlags) jp Menu_Start UNIT_CIRCLE_UP: inc hl inc hl ld a, (UNIT_CIRCLE_DATA+32) / 100h cp h jr nz, UNIT_CIRCLE_CONTINUE ld a, (UNIT_CIRCLE_DATA+32) & FFh cp l jr nz, UNIT_CIRCLE_CONTINUE ld hl, UNIT_CIRCLE_DATA jr UNIT_CIRCLE_CONTINUE UNIT_CIRCLE_DOWN: dec hl dec hl ld a, (UNIT_CIRCLE_DATA-2) / 100h cp h jr nz, UNIT_CIRCLE_CONTINUE ld a, (UNIT_CIRCLE_DATA-2) & FFh cp l jr nz, UNIT_CIRCLE_CONTINUE ld hl, UNIT_CIRCLE_DATA+30 jr UNIT_CIRCLE_CONTINUE UNIT_CIRCLE_DATA: .db 93, 31, 90, 44, 85, 48, 81, 53 .db 68, 56, 55, 53, 51, 48, 46, 44 .db 43, 31, 46, 18, 51, 14, 55, 9 .db 68, 6, 81, 9, 85, 14, 90, 18 UNIT_CIRCLE_RAD_TEXT: .db "0" ,0,"π/6" ,0,"π/4" ,0,"π/3" ,0 .db "π/2" ,0,"2π/3",0,"3π/4",0,"5π/6" ,0 .db "π" ,0,"7π/6",0,"5π/4",0,"4π/3" ,0 .db "3π/2",0,"5π/3",0,"7π/4",0,"11π/6",0 UNIT_CIRCLE_SIN_TEXT: .db "0" ,0,"1/2" ,0,"√2/2" ,0,"√3/2" ,0 .db "1" ,0,"√3/2" ,0,"√2/2" ,0,"1/2" ,0 .db "0" ,0,"-1/2" ,0,"-√2/2",0,"-√3/2",0 .db "-1",0,"-√3/2",0,"-√2/2",0,"-1/2" ,0 UNIT_CIRCLE_TAN_TEXT: .db "0" ,0,"√3/3",0,"1" ,0,"√3" ,0 .db "und",0,"-√3" ,0,"-1",0,"-√3/3",0 UNIT_CIRCLE_SEC_TEXT: .db "1" ,0,"2√3/3" ,0,"√2" ,0,"2" ,0 .db "und",0,"-2" ,0,"-√2",0,"-2√3/3",0 .db "-1" ,0,"-2√3/3",0,"-√2",0,"-2" ,0 .db "und",0,"2" ,0,"√2" ,0,"2√3/3" ,0 ARC_LENGTH: bit trigDeg, (iy+trigFlags) jr z, ARC_LENGTH_RAD call PutLine .db "(θ/180)πR",0 ld a, tX call Prompt .db "ANGLE=",0 ld a, tY call Prompt .db "RADIUS=",0 call ParseExpr ;XYπ/180 .db tX,tY,tDiv,t1,t8,t0,0 call PrintPi call Pause jp Menu_Start ARC_LENGTH_RAD: call PutLine .db "θR",0 ld a, tX call Prompt .db "ANGLE=",0 ld a, tY call Prompt .db "RADIUS=",0 call ParseExpr ;XY .db tX,tY,0 call PrintPause jp Menu_Start SECTOR_AREA: bit trigDeg, (iy+trigFlags) jr z, SECTOR_AREA_RAD call PutLine .db "(θ/360)πR²",0 ld a, tX call Prompt .db "DEGREES=",0 ld a, tY call Prompt .db "RADIUS=",0 call ParseExpr ;XY²π/360 .db tX,tY,tSqr,tDiv,t3,t6,t0,0 call PrintPi call Pause jp Menu_Start SECTOR_AREA_RAD: call PutLine .db "θR²/2",0 ld a, tX call Prompt .db "DEGREES=",0 ld a, tY call Prompt .db "RADIUS=",0 call ParseExpr ;XY²/2 .db tX,tY,tSqr,tDiv,t2,0 call PrintPause jp Menu_Start SEGMENT_AREA: bit trigDeg, (iy+trigFlags) jr z, SEGMENT_AREA_RAD call PutLine .db "θπR²/360-",0 call AppendStrInlineInit .db "R²sin(θ)/2",0 call PrintRightAlignStr ld a, tX call Prompt .db "ANGLE=",0 ld a, tY call Prompt .db "RADIUS=",0 call ParseExpr ;XπY²/360-Y²/2sin(X .db tX,tPi,tY,tSqr,tDiv,t3,t6,t0,tSub,tY,tSqr,tDiv,t2,tSin,tX,0 call PrintPause jp Menu_Start SEGMENT_AREA_RAD: call PutLine .db "R²/2(θ-sin(θ))",0 ld a, tX call Prompt .db "ANGLE=",0 ld a, tY call Prompt .db "RADIUS=",0 call ParseExpr ;Y²/2(X-sin(X .db tY,tSqr,tDiv,t2,tLParen,tX,tSub,tSin,tX,0 call PrintPause jp Menu_Start CIRCLE_ANGLES: call SubMenu .db "CIRCLE ANGLES",0 .db 6 .db "1: INSCRIBED ANGLE",0 .db "2: TAN CHORD ANGLE",0 .db "3: CHORD CHORD ANGLE",0 .db "4: SEC SEC ANGLE",0 .db "5: TAN TAN ANGLE",0 .db "6: SEC TAN ANGLE",0 .dw INSCRIBED_ANGLE .dw INSCRIBED_ANGLE .dw CHORD_CHORD_ANGLE .dw SEC_TAN_ANGLE .dw SEC_TAN_ANGLE .dw SEC_TAN_ANGLE INSCRIBED_ANGLE: call PutLine .db "A/2",0 ld a, tAns call Prompt .db "ANGLE=",0 call ParseExpr ;Ans/2 .db tAns,tDiv,t2,0 call PrintPause jp Menu_Start CHORD_CHORD_ANGLE: call PutLine .db "(A1+A2)/2",0 ld a, tX call Prompt .db "ANGLE=",0 ld a, tY call Prompt .db "ANGLE=",0 call ParseExpr ;(X+Y)/2 .db tLParen,tX,tAdd,tY,tRParen,tDiv,t2,0 call PrintPause jp Menu_Start SEC_TAN_ANGLE: call PutLine .db "(O-I)/2",0 ld a, tX call Prompt .db "OUT ANGLE=",0 ld a, tY call Prompt .db "IN ANGLE=",0 call ParseExpr ;(X-Y)/2 .db tLParen,tX,tSub,tY,tRParen,tDiv,t2,0 call PrintPause jp Menu_Start CIRCLE_LENGTHS: call SubMenu .db "CIRCLE ANGLES",0 .db 6 .db "1: CHORD-CHORD",0 .db "2: SEC-SEC IN",0 .db "3: SEC-SEC OUT",0 .db "4: TAN-SEC IN",0 .db "5: TAN-SEC OUT",0 .db "6: TAN-SEC TAN",0 .dw CHORD_CHORD_LENGTH .dw SEC_SEC_IN_LENGTH .dw SEC_SEC_OUT_LENGTH .dw TAN_SEC_IN_LENGTH .dw TAN_SEC_OUT_LENGTH .dw TAN_SEC_TAN_LENGTH CHORD_CHORD_LENGTH: call PutLine .db "OO/A",0 ld a, tX call Prompt .db "OPP LEN=",0 ld a, tY call Prompt .db "OPP LEN=",0 ld a, tAns call Prompt .db "ADJ LEN=",0 call ParseExpr ;XY/Ans .db tX,tY,tDiv,tAns,0 call PrintPause jp Menu_Start SEC_SEC_IN_LENGTH: call PutLine .db "Oo(Oo+Oi)/Ao-Ao",0 ld a, tX call Prompt .db "OPP IN=",0 ld a, tY call Prompt .db "OPP OUT=",0 ld a, tAns call Prompt .db "ADJ OUT=",0 call ParseExpr ;Y(Y+X)/Ans-Ans .db tY,tLParen,tY,tAdd,tX,tRParen,tDiv,tAns,tSub,tAns,0 call PrintPause jp Menu_Start SEC_SEC_OUT_LENGTH: call PutLine .db "(√(Ai²+4Oo²+4OiOo)-Ai)/2",0 ld a, tX call Prompt .db "OPP IN=",0 ld a, tY call Prompt .db "OPP OUT=",0 ld a, tAns call Prompt .db "ADJ IN=",0 call ParseExpr ;(√(Ans²+4Y²+4XY)-Ans)/2 .db tLParen,tSqrt,tAns,tSqr,tAdd,t4,tY,tSqr,tAdd,t4,tX,tY,tRParen,tSub,tAns,tRParen,tDiv,t2,0 call PrintPause jp Menu_Start TAN_SEC_IN_LENGTH: call PutLine .db "T²/O-O",0 ld a, tX call Prompt .db "TAN=",0 ld a, tY call Prompt .db "OUT=",0 call ParseExpr ;X²/Y-Y .db tX,tSqr,tDiv,tY,tSub,tY,0 call PrintPause jp Menu_Start TAN_SEC_OUT_LENGTH: call PutLine .db "(√(I²+4T²)-I)/2",0 ld a, tX call Prompt .db "TAN=",0 ld a, tY call Prompt .db "IN=",0 call ParseExpr ;(√(Y²+4X²)-Y)/2 .db tLParen,tSqrt,tY,tSqr,tAdd,t4,tX,tSqr,tRParen,tSub,tY,tRParen,tDiv,t2,0 call PrintPause jp Menu_Start TAN_SEC_TAN_LENGTH: call PutLine .db "√(O(O+I))",0 ld a, tX call Prompt .db "OUT=",0 ld a, tY call Prompt .db "IN=",0 call ParseExpr ;√(X(X+Y .db tSqrt,tX,tLParen,tX,tAdd,tY,0 call PrintPause jp Menu_Start
Transynther/x86/_processed/US/_zr_/i7-7700_9_0x48.log_21829_750.asm
ljhsiun2/medusa
9
96364
<reponame>ljhsiun2/medusa .global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %r14 push %r15 push %r8 push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_UC_ht+0x168a3, %rdx clflush (%rdx) and %r11, %r11 mov $0x6162636465666768, %r13 movq %r13, %xmm5 and $0xffffffffffffffc0, %rdx movntdq %xmm5, (%rdx) add $24744, %r13 lea addresses_D_ht+0x11e23, %r14 nop nop nop nop and %rbp, %rbp movw $0x6162, (%r14) nop nop nop nop xor $42174, %r15 lea addresses_A_ht+0x9fa3, %r13 clflush (%r13) xor %r8, %r8 movups (%r13), %xmm7 vpextrq $0, %xmm7, %rdx nop nop nop add %r13, %r13 lea addresses_WT_ht+0x64b5, %rdx sub %r15, %r15 mov $0x6162636465666768, %r13 movq %r13, %xmm6 vmovups %ymm6, (%rdx) nop nop nop nop and $1974, %r15 lea addresses_WC_ht+0x10443, %rsi lea addresses_WC_ht+0xced1, %rdi xor %r11, %r11 mov $100, %rcx rep movsq nop nop nop sub %rcx, %rcx lea addresses_normal_ht+0x73a3, %r8 nop nop nop cmp $12790, %rdx mov $0x6162636465666768, %rbp movq %rbp, %xmm0 movups %xmm0, (%r8) nop add %r8, %r8 lea addresses_normal_ht+0x1b8a3, %rbp nop nop and %r13, %r13 movb $0x61, (%rbp) nop cmp %r13, %r13 lea addresses_WT_ht+0x16abd, %rcx nop nop nop cmp %r13, %r13 mov $0x6162636465666768, %r11 movq %r11, (%rcx) nop nop nop nop cmp $19585, %r8 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %r8 pop %r15 pop %r14 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r13 push %r8 push %rdi push %rdx // Faulty Load lea addresses_US+0x18ca3, %r12 nop nop and %rdi, %rdi mov (%r12), %r13 lea oracles, %r8 and $0xff, %r13 shlq $12, %r13 mov (%r8,%r13,1), %r13 pop %rdx pop %rdi pop %r8 pop %r13 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 8, 'size': 16, 'same': False, 'NT': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 7, 'size': 2, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 6, 'size': 16, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 1, 'size': 32, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 8, 'size': 16, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 8, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 1, 'size': 8, 'same': False, 'NT': False}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
src/natools-web-filters-stores.ads
faelys/natools-web
1
18705
<reponame>faelys/natools-web ------------------------------------------------------------------------------ -- Copyright (c) 2015, <NAME> -- -- -- -- Permission to use, copy, modify, and distribute this software for any -- -- purpose with or without fee is hereby granted, provided that the above -- -- copyright notice and this permission notice appear in all copies. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- -- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -- -- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- -- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -- -- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -- -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -- ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- Natools.Web.Filters.Stores provides a database of filter constructors -- -- and instances. -- ------------------------------------------------------------------------------ with Natools.S_Expressions.Lockable; private with Natools.Constant_Indefinite_Ordered_Maps; package Natools.Web.Filters.Stores is pragma Preelaborate; No_Filter : exception; -- Raised by a constructor when unable to return a valid filter -- or by Get_Filter called with an unknown name. type Constructor is not null access function (Arguments : in out S_Expressions.Lockable.Descriptor'Class) return Filter'Class; -- Build a filter using Arguments type Store is tagged private; function Duplicate (Source : in Store) return Store; -- Return a new store, copying the constructor database but with -- a clean filter database. function Get_Filter (Container : in Store; Name : in S_Expressions.Atom) return Filter'Class; -- Return the filter whose name is given, or raise No_Filter procedure Populate (Container : in out Store; Expression : in out S_Expressions.Lockable.Descriptor'Class); -- Populate the filter database using expression and the constructors procedure Register (Container : in out Store; Name : in S_Expressions.Atom; Callback : in Constructor); -- Register a container into Container procedure Register (Container : in out Store; Name : in S_Expressions.Atom; Filter : in Filters.Filter'Class); -- Register a filter into Container private package Constructor_Maps is new Constant_Indefinite_Ordered_Maps (S_Expressions.Atom, Constructor, S_Expressions.Less_Than); package Filter_Maps is new Constant_Indefinite_Ordered_Maps (S_Expressions.Atom, Filter'Class, S_Expressions.Less_Than); type Store is tagged record Constructors : Constructor_Maps.Constant_Map; Filters : Filter_Maps.Constant_Map; end record; end Natools.Web.Filters.Stores;
oeis/003/A003623.asm
neoneye/loda-programs
11
240607
; A003623: Wythoff AB-numbers: floor(floor(n*phi^2)*phi), where phi = (1+sqrt(5))/2. ; Submitted by <NAME> ; 3,8,11,16,21,24,29,32,37,42,45,50,55,58,63,66,71,76,79,84,87,92,97,100,105,110,113,118,121,126,131,134,139,144,147,152,155,160,165,168,173,176,181,186,189,194,199,202,207,210,215,220,223,228,231,236,241,244,249,254,257,262,265,270,275,278,283,288,291,296,299,304,309,312,317,320,325,330,333,338,343,346,351,354,359,364,367,372,377,380,385,388,393,398,401,406,409,414,419,422 mov $1,$0 seq $0,283233 ; 2*A000201. add $0,$1 add $0,1
Agda/rational-numbers.agda
UlrikBuchholtz/HoTT-Intro
333
13520
{-# OPTIONS --without-K --exact-split #-} module rational-numbers where import integers open integers public -------------------------------------------------------------------------------- {- We introduce the type of non-zero integers. -} ℤ\0 : UU lzero ℤ\0 = Σ ℤ (λ k → ¬ (Id zero-ℤ k)) int-ℤ\0 : ℤ\0 → ℤ int-ℤ\0 = pr1 {- We first show that multiplication by a non-zero integer is an injective function. -} mul-ℤ-ℤ\0 : ℤ → ℤ\0 → ℤ mul-ℤ-ℤ\0 x y = mul-ℤ x (int-ℤ\0 y) mul-ℤ\0 : ℤ\0 → ℤ\0 → ℤ\0 mul-ℤ\0 (pair x Hx) (pair y Hy) = pair (mul-ℤ x y) (neq-zero-mul-ℤ x y Hx Hy) postulate is-emb-mul-ℤ-ℤ\0 : (y : ℤ\0) → is-emb (λ x → mul-ℤ-ℤ\0 x y) is-injective-mul-ℤ-ℤ\0 : (y : ℤ\0) (x1 x2 : ℤ) → Id (mul-ℤ-ℤ\0 x1 y) (mul-ℤ-ℤ\0 x2 y) → Id x1 x2 is-injective-mul-ℤ-ℤ\0 y x1 x2 = inv-is-equiv (is-emb-mul-ℤ-ℤ\0 y x1 x2) -------------------------------------------------------------------------------- {- We introduce the prerational numbers. -} ℚ' : UU lzero ℚ' = ℤ × ℤ\0 -------------------------------------------------------------------------------- {- We introduce the equivalence relation on the prerational numbers that will define the rational numbers. -} equiv-ℚ' : ℚ' → ℚ' → UU lzero equiv-ℚ' (pair x1 x2) (pair y1 y2) = Id (mul-ℤ-ℤ\0 x1 y2) (mul-ℤ-ℤ\0 y1 x2) refl-equiv-ℚ' : (x : ℚ') → equiv-ℚ' x x refl-equiv-ℚ' (pair x1 x2) = refl symmetric-equiv-ℚ' : (x y : ℚ') → equiv-ℚ' x y → equiv-ℚ' y x symmetric-equiv-ℚ' (pair x1 x2) (pair y1 y2) = inv transitive-equiv-ℚ' : (x y z : ℚ') → equiv-ℚ' x y → equiv-ℚ' y z → equiv-ℚ' x z transitive-equiv-ℚ' (pair x1 x2) (pair y1 y2) (pair z1 z2) p q = is-injective-mul-ℤ-ℤ\0 y2 ( mul-ℤ-ℤ\0 x1 z2) ( mul-ℤ-ℤ\0 z1 x2) ( ( associative-mul-ℤ x1 (int-ℤ\0 z2) (int-ℤ\0 y2)) ∙ ( ( ap ( mul-ℤ x1) ( commutative-mul-ℤ (int-ℤ\0 z2) (int-ℤ\0 y2))) ∙ ( ( inv (associative-mul-ℤ x1 (int-ℤ\0 y2) (int-ℤ\0 z2))) ∙ ( ( ap ( λ t → mul-ℤ t (int-ℤ\0 z2)) ( p ∙ (commutative-mul-ℤ y1 (int-ℤ\0 x2)))) ∙ ( ( associative-mul-ℤ (int-ℤ\0 x2) y1 (int-ℤ\0 z2)) ∙ ( ( ap (mul-ℤ (int-ℤ\0 x2)) q) ∙ ( ( inv (associative-mul-ℤ (int-ℤ\0 x2) z1 (int-ℤ\0 y2))) ∙ ( ap ( λ t → mul-ℤ-ℤ\0 t y2) ( commutative-mul-ℤ (int-ℤ\0 x2) z1))))))))) -------------------------------------------------------------------------------- {- We define addition on the prerational numbers. -} add-ℚ' : ℚ' → ℚ' → ℚ' add-ℚ' (pair x1 x2) (pair y1 y2) = pair (add-ℤ (mul-ℤ-ℤ\0 x1 y2) (mul-ℤ-ℤ\0 y1 x2)) (mul-ℤ\0 x2 y2) equiv-add-ℚ' : (x y x' y' : ℚ') → equiv-ℚ' x x' → equiv-ℚ' y y' → equiv-ℚ' (add-ℚ' x y) (add-ℚ' x' y') equiv-add-ℚ' ( pair x1 (pair x2 Hx)) ( pair y1 (pair y2 Hy)) ( pair x1' (pair x2' Hx')) ( pair y1' (pair y2' Hy')) e f = ( right-distributive-mul-add-ℤ ( mul-ℤ x1 y2) ( mul-ℤ y1 x2) ( mul-ℤ x2' y2')) ∙ ( ( ap-add-ℤ ( ( interchange-2-3-mul-ℤ {x1}) ∙ ( ( ap (λ t → mul-ℤ t (mul-ℤ y2 y2')) e) ∙ ( move-four-mul-ℤ {x1'}))) ( ( move-five-mul-ℤ {y1}) ∙ ( ( ap (mul-ℤ (mul-ℤ x2 x2')) f) ∙ ( interchange-1-3-mul-ℤ {x2} {x2'} {y1'})))) ∙ ( inv ( right-distributive-mul-add-ℤ ( mul-ℤ x1' y2') ( mul-ℤ y1' x2') ( mul-ℤ x2 y2)))) -------------------------------------------------------------------------------- {- We define multiplication on the prerational numbers. -} mul-ℚ' : ℚ' → ℚ' → ℚ' mul-ℚ' (pair x1 x2) (pair y1 y2) = pair (mul-ℤ x1 y1) (mul-ℤ\0 x2 y2) ap-mul-ℤ : {a b a' b' : ℤ} → Id a a' → Id b b' → Id (mul-ℤ a b) (mul-ℤ a' b') ap-mul-ℤ refl refl = refl equiv-mul-ℚ' : (x y x' y' : ℚ') → equiv-ℚ' x x' → equiv-ℚ' y y' → equiv-ℚ' (mul-ℚ' x y) (mul-ℚ' x' y') equiv-mul-ℚ' ( pair x1 (pair x2 Hx)) ( pair y1 (pair y2 Hy)) ( pair x1' (pair x2' Hx')) ( pair y1' (pair y2' Hy')) e f = ( interchange-2-3-mul-ℤ {x1} {y1} {x2'}) ∙ ( ( ap-mul-ℤ e f) ∙ ( interchange-2-3-mul-ℤ {x1'}))
Desktop/piMASS/HTML/rob.mass/b3.asm
AliveMOon/piMASSpub
2
103137
a = 10; b = 20; c = a+b * (a + b) *b/a , d = c%4; 0x2100 a= 10, //0x2110 10= 0x0a, 0x2120 b= 20, //0x2130 20= 0x14, 0x2140 c= 0, //0x2170 , 0x2190 d= 0, //0x21b0 4= 0x04, 0x000021c0 xor.q D0,D0 0x000021d8 move.l 0x2110,A0 ; //10, 0x000021f0 move.b (A0),D0 0x00002208 move.l 0x2100,A0 ; //0, 0x00002220 move.L D0,(A0) 0x00002238 nop; //---------------- 0x00002250 xor.q D0,D0 0x00002268 move.l 0x2130,A0 ; //20, 0x00002280 move.b (A0),D0 0x00002298 move.l 0x2120,A0 ; //0, 0x000022b0 move.L D0,(A0) 0x000022c8 nop; //---------------- 0x000022e0 move.l 0x0,A0 ; //0, 0x000022f8 move.L D0,(A0) 0x00002310 nop; //---------------- 0x00002328 move.l 0x2120,A0 ; //0, 0x00002340 move.L (A0),D0 0x00002358 move.l 0x2120,A0 ; //0, 0x00002370 move.L (A0),D1 0x00002388 mul.L D1,D0 0x000023a0 move.l 0x2100,A0 ; //0, 0x000023b8 move.L (A0),D1 0x000023d0 div.L D1,D0 0x000023e8 move.l 0x2180,A0 ; //0, 0x00002400 move.L D0,(A0) 0x00002418 nop; //---------------- 0x00002430 move.l 0x0,A0 ; //0, 0x00002448 move.L D0,(A0) 0x00002460 nop; //---------------- 0x00002478 move.l 0x2140,A0 ; //0, 0x00002490 move.L (A0),D0 0x000024a8 move.l 0x21b0,A0 ; //4, 0x000024c0 xor.q D1,D1 0x000024d8 move.b (A0),D1 0x000024f0 rem.L D1,D0 0x00002508 move.l 0x21a0,A0 ; //0, 0x00002520 move.L D0,(A0) 0x00002538 nop; //---------------- 0x00002550 xor.q D0,D0 0x00002568 move.l 0x21a0,A0 ; //0, 0x00002580 move.L (A0),D0 0x00002598 move.l 0x2190,A0 ; //0, 0x000025b0 move.L D0,(A0) 0x000025c8 nop; //---------------- 0x000025e0 move.l 0x2180,A0 ; //0, 0x000025f8 move.L (A0),D0 0x00002610 move.l 0x2190,A0 ; //0, 0x00002628 move.L (A0),D1 0x00002640 stk.L D1,D0 0x00002658 move.l 0x0,A0 ; //0, 0x00002670 move.L D0,(A0) 0x00002688 nop; //----------------
src/nanomsg-errors.ads
landgraf/nanomsg-ada
2
20999
-- The MIT License (MIT) -- Copyright (c) 2015 <NAME> <<EMAIL>> -- 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. package Nanomsg.Errors is function Errno return Integer; function Errno_Text return String; function Errno_Id return String; end Nanomsg.Errors;
oeis/098/A098172.asm
neoneye/loda-programs
11
23273
<filename>oeis/098/A098172.asm ; A098172: Triangle T(n,k) with diagonals T(n,n-k) = binomial(n,3k). ; Submitted by <NAME> ; 1,0,1,0,0,1,0,0,1,1,0,0,0,4,1,0,0,0,0,10,1,0,0,0,0,1,20,1,0,0,0,0,0,7,35,1,0,0,0,0,0,0,28,56,1,0,0,0,0,0,0,1,84,84,1,0,0,0,0,0,0,0,10,210,120,1,0,0,0,0,0,0,0,0,55,462,165,1,0,0,0,0,0,0,0,0,1,220,924,220,1,0,0,0,0,0,0,0,0,0 lpb $0 sub $0,1 add $1,1 mov $2,$1 sub $2,$0 trn $0,$1 lpe mul $2,3 bin $1,$2 mov $0,$1
specs/ada/server/ike/tkmrpc-dispatchers-ike.adb
DrenfongWong/tkm-rpc
0
12126
with Tkmrpc.Operations.Ike; with Tkmrpc.Operation_Handlers.Ike.Tkm_Version; with Tkmrpc.Operation_Handlers.Ike.Tkm_Limits; with Tkmrpc.Operation_Handlers.Ike.Tkm_Reset; with Tkmrpc.Operation_Handlers.Ike.Nc_Reset; with Tkmrpc.Operation_Handlers.Ike.Nc_Create; with Tkmrpc.Operation_Handlers.Ike.Dh_Reset; with Tkmrpc.Operation_Handlers.Ike.Dh_Create; with Tkmrpc.Operation_Handlers.Ike.Dh_Generate_Key; with Tkmrpc.Operation_Handlers.Ike.Cc_Reset; with Tkmrpc.Operation_Handlers.Ike.Cc_Set_User_Certificate; with Tkmrpc.Operation_Handlers.Ike.Cc_Add_Certificate; with Tkmrpc.Operation_Handlers.Ike.Cc_Check_Ca; with Tkmrpc.Operation_Handlers.Ike.Ae_Reset; with Tkmrpc.Operation_Handlers.Ike.Isa_Reset; with Tkmrpc.Operation_Handlers.Ike.Isa_Create; with Tkmrpc.Operation_Handlers.Ike.Isa_Sign; with Tkmrpc.Operation_Handlers.Ike.Isa_Auth; with Tkmrpc.Operation_Handlers.Ike.Isa_Create_Child; with Tkmrpc.Operation_Handlers.Ike.Isa_Skip_Create_First; with Tkmrpc.Operation_Handlers.Ike.Esa_Reset; with Tkmrpc.Operation_Handlers.Ike.Esa_Create; with Tkmrpc.Operation_Handlers.Ike.Esa_Create_No_Pfs; with Tkmrpc.Operation_Handlers.Ike.Esa_Create_First; with Tkmrpc.Operation_Handlers.Ike.Esa_Select; package body Tkmrpc.Dispatchers.Ike is ------------------------------------------------------------------------- procedure Dispatch (Req : Request.Data_Type; Res : out Response.Data_Type) is begin case Req.Header.Operation is when Operations.Ike.Tkm_Version => Operation_Handlers.Ike.Tkm_Version.Handle (Req => Req, Res => Res); when Operations.Ike.Tkm_Limits => Operation_Handlers.Ike.Tkm_Limits.Handle (Req => Req, Res => Res); when Operations.Ike.Tkm_Reset => Operation_Handlers.Ike.Tkm_Reset.Handle (Req => Req, Res => Res); when Operations.Ike.Nc_Reset => Operation_Handlers.Ike.Nc_Reset.Handle (Req => Req, Res => Res); when Operations.Ike.Nc_Create => Operation_Handlers.Ike.Nc_Create.Handle (Req => Req, Res => Res); when Operations.Ike.Dh_Reset => Operation_Handlers.Ike.Dh_Reset.Handle (Req => Req, Res => Res); when Operations.Ike.Dh_Create => Operation_Handlers.Ike.Dh_Create.Handle (Req => Req, Res => Res); when Operations.Ike.Dh_Generate_Key => Operation_Handlers.Ike.Dh_Generate_Key.Handle (Req => Req, Res => Res); when Operations.Ike.Cc_Reset => Operation_Handlers.Ike.Cc_Reset.Handle (Req => Req, Res => Res); when Operations.Ike.Cc_Set_User_Certificate => Operation_Handlers.Ike.Cc_Set_User_Certificate.Handle (Req => Req, Res => Res); when Operations.Ike.Cc_Add_Certificate => Operation_Handlers.Ike.Cc_Add_Certificate.Handle (Req => Req, Res => Res); when Operations.Ike.Cc_Check_Ca => Operation_Handlers.Ike.Cc_Check_Ca.Handle (Req => Req, Res => Res); when Operations.Ike.Ae_Reset => Operation_Handlers.Ike.Ae_Reset.Handle (Req => Req, Res => Res); when Operations.Ike.Isa_Reset => Operation_Handlers.Ike.Isa_Reset.Handle (Req => Req, Res => Res); when Operations.Ike.Isa_Create => Operation_Handlers.Ike.Isa_Create.Handle (Req => Req, Res => Res); when Operations.Ike.Isa_Sign => Operation_Handlers.Ike.Isa_Sign.Handle (Req => Req, Res => Res); when Operations.Ike.Isa_Auth => Operation_Handlers.Ike.Isa_Auth.Handle (Req => Req, Res => Res); when Operations.Ike.Isa_Create_Child => Operation_Handlers.Ike.Isa_Create_Child.Handle (Req => Req, Res => Res); when Operations.Ike.Isa_Skip_Create_First => Operation_Handlers.Ike.Isa_Skip_Create_First.Handle (Req => Req, Res => Res); when Operations.Ike.Esa_Reset => Operation_Handlers.Ike.Esa_Reset.Handle (Req => Req, Res => Res); when Operations.Ike.Esa_Create => Operation_Handlers.Ike.Esa_Create.Handle (Req => Req, Res => Res); when Operations.Ike.Esa_Create_No_Pfs => Operation_Handlers.Ike.Esa_Create_No_Pfs.Handle (Req => Req, Res => Res); when Operations.Ike.Esa_Create_First => Operation_Handlers.Ike.Esa_Create_First.Handle (Req => Req, Res => Res); when Operations.Ike.Esa_Select => Operation_Handlers.Ike.Esa_Select.Handle (Req => Req, Res => Res); when others => Res := Response.Null_Data; Res.Header.Operation := Req.Header.Operation; end case; Res.Header.Request_Id := Req.Header.Request_Id; end Dispatch; end Tkmrpc.Dispatchers.Ike;
test/Succeed/Issue1755b.agda
shlevy/agda
1,989
1413
{-# TERMINATING #-} {-# NO_POSITIVITY_CHECK #-} mutual data D₁ : Set where lam : (D₁ → D₁) → D₁ Foo₁ : Set Foo₁ = Foo₁ {-# NON_TERMINATING #-} {-# NO_POSITIVITY_CHECK #-} mutual data D₂ : Set where lam : (D₂ → D₂) → D₂ Foo₂ : Set Foo₂ = Foo₂
programs/oeis/290/A290391.asm
neoneye/loda
22
88002
; A290391: Number of 5-cycles in the n-triangular honeycomb obtuse knight graph. ; 0,0,0,0,0,0,30,120,294,552,894,1320,1830,2424,3102,3864,4710,5640,6654,7752,8934,10200,11550,12984,14502,16104,17790,19560,21414,23352,25374,27480,29670,31944,34302,36744,39270,41880,44574,47352,50214,53160,56190,59304,62502 mov $2,$0 mov $4,$0 lpb $2 mov $0,$4 sub $2,1 sub $0,$2 mov $5,$0 mov $6,0 mov $7,$0 lpb $5 mov $0,$7 sub $5,1 sub $0,$5 mov $9,$0 mov $10,0 mov $15,$0 lpb $9 mov $0,$15 sub $9,1 sub $0,$9 mov $11,$0 mov $13,2 lpb $13 mov $0,$11 sub $13,1 add $0,$13 sub $0,1 trn $0,5 mov $8,5 lpb $0 mov $0,2 mov $8,7 lpe mul $0,$8 mov $3,$0 mov $14,$13 lpb $14 mov $12,$3 sub $14,1 lpe lpe lpb $11 mov $11,0 sub $12,$3 lpe mov $3,$12 mul $3,6 add $10,$3 lpe add $6,$10 lpe add $1,$6 lpe mov $0,$1
Sources/cncurses/Ada95/samples/sample-curses_demo-mouse.adb
brightdigit/NCurses
269
16729
<reponame>brightdigit/NCurses ------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding Samples -- -- -- -- Sample.Curses_Demo.Mouse -- -- -- -- B O D Y -- -- -- ------------------------------------------------------------------------------ -- Copyright 2020 <NAME> -- -- Copyright 1998-2006,2008 Free Software Foundation, Inc. -- -- -- -- 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, distribute with modifications, 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 ABOVE 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. -- -- -- -- Except as contained in this notice, the name(s) of the above copyright -- -- holders shall not be used in advertising or otherwise to promote the -- -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ -- Author: <NAME>, 1996 -- Version Control -- $Revision: 1.17 $ -- $Date: 2020/02/02 23:34:34 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; with Terminal_Interface.Curses.Panels; use Terminal_Interface.Curses.Panels; with Terminal_Interface.Curses.Mouse; use Terminal_Interface.Curses.Mouse; with Terminal_Interface.Curses.Text_IO; use Terminal_Interface.Curses.Text_IO; with Terminal_Interface.Curses.Text_IO.Integer_IO; with Terminal_Interface.Curses.Text_IO.Enumeration_IO; with Sample.Helpers; use Sample.Helpers; with Sample.Manifest; use Sample.Manifest; with Sample.Keyboard_Handler; use Sample.Keyboard_Handler; with Sample.Function_Key_Setting; use Sample.Function_Key_Setting; with Sample.Explanation; use Sample.Explanation; package body Sample.Curses_Demo.Mouse is package Int_IO is new Terminal_Interface.Curses.Text_IO.Integer_IO (Integer); use Int_IO; package Button_IO is new Terminal_Interface.Curses.Text_IO.Enumeration_IO (Mouse_Button); use Button_IO; package State_IO is new Terminal_Interface.Curses.Text_IO.Enumeration_IO (Button_State); use State_IO; procedure Demo is type Controls is array (1 .. 3) of Panel; Frame : Window; Msg : Window; Ctl : Controls; Pan : Panel; K : Real_Key_Code; V : Cursor_Visibility := Invisible; W : Window; Note : Window; Msg_L : constant Line_Count := 8; Lins : Line_Position := Lines; Cols : Column_Position; Mask : Event_Mask; procedure Show_Mouse_Event; procedure Show_Mouse_Event is Evt : constant Mouse_Event := Get_Mouse; Y : Line_Position; X : Column_Position; Button : Mouse_Button; State : Button_State; W : Window; begin Get_Event (Evt, Y, X, Button, State); Put (Msg, "Event at"); Put (Msg, " X="); Put (Msg, Integer (X), 3); Put (Msg, ", Y="); Put (Msg, Integer (Y), 3); Put (Msg, ", Btn="); Put (Msg, Button, 10); Put (Msg, ", Stat="); Put (Msg, State, 15); for I in Ctl'Range loop W := Get_Window (Ctl (I)); if Enclosed_In_Window (W, Evt) then Transform_Coordinates (W, Y, X, From_Screen); Put (Msg, ",Box("); Put (Msg, (I), 1); Put (Msg, ","); Put (Msg, Integer (Y), 1); Put (Msg, ","); Put (Msg, Integer (X), 1); Put (Msg, ")"); end if; end loop; New_Line (Msg); Flush (Msg); Update_Panels; Update_Screen; end Show_Mouse_Event; begin Push_Environment ("MOUSE00"); Notepad ("MOUSE-PAD00"); Default_Labels; Set_Cursor_Visibility (V); Note := Notepad_Window; if Note /= Null_Window then Get_Window_Position (Note, Lins, Cols); end if; Frame := Create (Msg_L, Columns, Lins - Msg_L, 0); if Has_Colors then Set_Background (Win => Frame, Ch => (Color => Default_Colors, Attr => Normal_Video, Ch => ' ')); Set_Character_Attributes (Win => Frame, Attr => Normal_Video, Color => Default_Colors); Erase (Frame); end if; Msg := Derived_Window (Frame, Msg_L - 2, Columns - 2, 1, 1); Pan := Create (Frame); Set_Meta_Mode; Set_KeyPad_Mode; Mask := Start_Mouse; Box (Frame); Window_Title (Frame, "Mouse Protocol"); Refresh_Without_Update (Frame); Allow_Scrolling (Msg, True); declare Middle_Column : constant Integer := Integer (Columns) / 2; Middle_Index : constant Natural := Ctl'First + (Ctl'Length / 2); Width : constant Column_Count := 5; Height : constant Line_Count := 3; Half : constant Column_Count := Width / 2; Space : constant Column_Count := 3; Position : Integer; W : Window; begin for I in Ctl'Range loop Position := ((I) - Integer (Middle_Index)) * Integer (Half + Space + Width) + Middle_Column; W := Create (Height, Width, 1, Column_Position (Position)); if Has_Colors then Set_Background (Win => W, Ch => (Color => Menu_Back_Color, Attr => Normal_Video, Ch => ' ')); Set_Character_Attributes (Win => W, Attr => Normal_Video, Color => Menu_Fore_Color); Erase (W); end if; Ctl (I) := Create (W); Box (W); Move_Cursor (W, 1, Half); Put (W, (I), 1); Refresh_Without_Update (W); end loop; end; Update_Panels; Update_Screen; loop K := Get_Key; if K in Special_Key_Code'Range then case K is when QUIT_CODE => exit; when HELP_CODE => Explain_Context; when EXPLAIN_CODE => Explain ("MOUSEKEYS"); when Key_Mouse => Show_Mouse_Event; when others => null; end case; end if; end loop; for I in Ctl'Range loop W := Get_Window (Ctl (I)); Clear (W); Delete (Ctl (I)); Delete (W); end loop; Clear (Frame); Delete (Pan); Delete (Msg); Delete (Frame); Set_Cursor_Visibility (V); End_Mouse (Mask); Pop_Environment; Update_Panels; Update_Screen; end Demo; end Sample.Curses_Demo.Mouse;
alloy4fun_models/trashltl/models/7/TYEM268SK7vZNfRrA.als
Kaixi26/org.alloytools.alloy
0
4680
<reponame>Kaixi26/org.alloytools.alloy open main pred idTYEM268SK7vZNfRrA_prop8 { eventually link.File in Trash } pred __repair { idTYEM268SK7vZNfRrA_prop8 } check __repair { idTYEM268SK7vZNfRrA_prop8 <=> prop8o }
programs/oeis/017/A017041.asm
karttu/loda
1
15405
; A017041: a(n) = 7*n + 5. ; 5,12,19,26,33,40,47,54,61,68,75,82,89,96,103,110,117,124,131,138,145,152,159,166,173,180,187,194,201,208,215,222,229,236,243,250,257,264,271,278,285,292,299,306,313,320,327,334,341,348,355,362,369,376,383,390,397,404,411,418,425,432,439,446,453,460,467,474,481,488,495,502,509,516,523,530,537,544,551,558,565,572,579,586,593,600,607,614,621,628,635,642,649,656,663,670,677,684,691,698,705,712,719,726,733,740,747,754,761,768,775,782,789,796,803,810,817,824,831,838,845,852,859,866,873,880,887,894,901,908,915,922,929,936,943,950,957,964,971,978,985,992,999,1006,1013,1020,1027,1034,1041,1048,1055,1062,1069,1076,1083,1090,1097,1104,1111,1118,1125,1132,1139,1146,1153,1160,1167,1174,1181,1188,1195,1202,1209,1216,1223,1230,1237,1244,1251,1258,1265,1272,1279,1286,1293,1300,1307,1314,1321,1328,1335,1342,1349,1356,1363,1370,1377,1384,1391,1398,1405,1412,1419,1426,1433,1440,1447,1454,1461,1468,1475,1482,1489,1496,1503,1510,1517,1524,1531,1538,1545,1552,1559,1566,1573,1580,1587,1594,1601,1608,1615,1622,1629,1636,1643,1650,1657,1664,1671,1678,1685,1692,1699,1706,1713,1720,1727,1734,1741,1748 mov $1,$0 mul $1,7 add $1,5
PRG/levels/Fortress/4-K.asm
narfman0/smb3_pp1
0
7704
<reponame>narfman0/smb3_pp1 ; Original address was $A807 ; King's Room W4 .word W4Airship_IntroL ; Alternate level layout .word WAirship_IntroO ; Alternate object layout .byte LEVEL1_SIZE_01 | LEVEL1_YSTART_170 .byte LEVEL2_BGPAL_01 | LEVEL2_OBJPAL_10 | LEVEL2_XSTART_70 | LEVEL2_UNUSEDFLAG .byte LEVEL3_TILESET_10 | LEVEL3_VSCROLL_LOCKED | LEVEL3_PIPENOTEXIT .byte LEVEL4_BGBANK_INDEX(22) | LEVEL4_INITACT_NOTHING .byte LEVEL5_BGM_THRONEROOM | LEVEL5_TIME_300 .byte $00, $00, $03, $E0, $63, $20, $FF
test/interaction/NiceGoals.agda
asr/agda-kanso
1
5881
{-# OPTIONS --universe-polymorphism #-} module NiceGoals where ------------------------------------------------------------------------ postulate Level : Set zero : Level suc : (i : Level) → Level _⊔_ : Level → Level → Level {-# BUILTIN LEVEL Level #-} {-# BUILTIN LEVELZERO zero #-} {-# BUILTIN LEVELSUC suc #-} {-# BUILTIN LEVELMAX _⊔_ #-} ------------------------------------------------------------------------ record RawMonoid c ℓ : Set (suc (c ⊔ ℓ)) where infixl 7 _∙_ infix 4 _≈_ field Carrier : Set c _≈_ : Carrier → Carrier → Set ℓ _∙_ : Carrier → Carrier → Carrier ε : Carrier module M (rm : RawMonoid zero zero) where open RawMonoid rm thm : ∀ x → x ∙ ε ≈ x thm = {!!} -- agda2-goal-and-context: -- rm : RawMonoid zero zero -- ------------------------ -- Goal: (x : RawMonoid.Carrier rm) → -- RawMonoid._≈_ rm (RawMonoid._∙_ rm x (RawMonoid.ε rm)) x ------------------------------------------------------------------------ record RawMonoid′ : Set₁ where infixl 7 _∙_ infix 4 _≈_ field Carrier : Set _≈_ : Carrier → Carrier → Set _∙_ : Carrier → Carrier → Carrier ε : Carrier module M′ (rm : RawMonoid′) where open RawMonoid′ rm thm′ : ∀ x → x ∙ ε ≈ x thm′ = {!!} -- agda2-goal-and-context: -- rm : RawMonoid′ -- --------------- -- Goal: (x : Carrier) → x ∙ ε ≈ x ------------------------------------------------------------------------ -- UP isn't relevant. record RawMonoid″ (Carrier : Set) : Set₁ where infixl 7 _∙_ infix 4 _≈_ field _≈_ : Carrier → Carrier → Set _∙_ : Carrier → Carrier → Carrier ε : Carrier data Bool : Set where true false : Bool data List (A : Set) : Set where [] : List A _∷_ : (x : A)(xs : List A) → List A module M″ (rm : RawMonoid″ (List Bool)) where open RawMonoid″ rm thm″ : ∀ x → x ∙ ε ≈ x thm″ = {!!} -- agda2-goal-and-context: -- rm : RawMonoid″ (List Bool) -- --------------------------- -- Goal: (x : List Bool) → -- RawMonoid″._≈_ rm (RawMonoid″._∙_ rm x (RawMonoid″.ε rm)) x module M₁ (Z : Set₁) where postulate P : Set Q : Set → Set module M₂ (X Y : Set) where module M₁′ = M₁ Set open M₁′ p : P p = {!!} q : Q X q = {!!} postulate X : Set pp : M₂.M₁′.P X X pp = {!!}
test/Succeed/Issue5339.agda
cruhland/agda
1,989
17202
<reponame>cruhland/agda<gh_stars>1000+ -- Andreas, 2021-04-22, issue #5339 -- Allow constructors of the same name in `constructor` block. module _ where module Works where interleaved mutual data Nat : Set data Fin : Nat → Set data _ where zero : Nat data _ where suc : Nat → Nat zero : ∀ {n} → Fin (suc n) data _ where suc : ∀ {n} (i : Fin n) → Fin (suc n) interleaved mutual data Nat : Set data Fin : Nat → Set data _ where zero : Nat suc : Nat → Nat zero : ∀ {n} → Fin (suc n) suc : ∀ {n} (i : Fin n) → Fin (suc n) -- `data _ where` block should be accepted despite duplicate constructor names. wkFin : ∀{n} → Fin n → Fin (suc n) wkFin zero = zero wkFin (suc i) = suc (wkFin i)
programs/oeis/304/A304840.asm
karttu/loda
1
165325
; A304840: a(n) = 52*n - 2 (n>=1). ; 50,102,154,206,258,310,362,414,466,518,570,622,674,726,778,830,882,934,986,1038,1090,1142,1194,1246,1298,1350,1402,1454,1506,1558,1610,1662,1714,1766,1818,1870,1922,1974,2026,2078,2130,2182,2234,2286,2338,2390,2442,2494,2546,2598,2650,2702,2754,2806,2858,2910,2962,3014,3066,3118,3170,3222,3274,3326,3378,3430,3482,3534,3586,3638,3690,3742,3794,3846,3898,3950,4002,4054,4106,4158,4210,4262,4314,4366,4418,4470,4522,4574,4626,4678,4730,4782,4834,4886,4938,4990,5042,5094,5146,5198,5250,5302,5354,5406,5458,5510,5562,5614,5666,5718,5770,5822,5874,5926,5978,6030,6082,6134,6186,6238,6290,6342,6394,6446,6498,6550,6602,6654,6706,6758,6810,6862,6914,6966,7018,7070,7122,7174,7226,7278,7330,7382,7434,7486,7538,7590,7642,7694,7746,7798,7850,7902,7954,8006,8058,8110,8162,8214,8266,8318,8370,8422,8474,8526,8578,8630,8682,8734,8786,8838,8890,8942,8994,9046,9098,9150,9202,9254,9306,9358,9410,9462,9514,9566,9618,9670,9722,9774,9826,9878,9930,9982,10034,10086,10138,10190,10242,10294,10346,10398,10450,10502,10554,10606,10658,10710,10762,10814,10866,10918,10970,11022,11074,11126,11178,11230,11282,11334,11386,11438,11490,11542,11594,11646,11698,11750,11802,11854,11906,11958,12010,12062,12114,12166,12218,12270,12322,12374,12426,12478,12530,12582,12634,12686,12738,12790,12842,12894,12946,12998 mov $1,$0 mul $1,52 add $1,50
PocketCfg/PocketCfg.Pkt/Pkt.g4
dresswithpockets/pocketcfg
0
3044
grammar Pkt; value : STRING_LIT | IDENT | NUMBER; statement : value+; statementList : statement ((';'|NL) statement?)*; fragment Quote : '"' | '\''; STRING_LIT : Quote .*? Quote; IDENT : [a-zA-Z_][a-zA-Z0-9_]*; NUMBER : [+-]?([0-9]*[.])?[0-9]+; NL : [\n\r]+; WS : [ \t]+ -> channel(HIDDEN);
a4/a4_rshift_test.asm
JasonD94/2015-Fall-91.305
0
97992
<reponame>JasonD94/2015-Fall-91.305<gh_stars>0 ; test for the new RSHIFT assembly instruction start: LODD d1: RSHIFT 0 HALT ; AC has shifted value LODD d2: RSHIFT 3 HALT ; AC has shifted value LODD d3: RSHIFT 7 HALT ; AC has shifted value LODD d4: RSHIFT 15 HALT ; AC has shifted value LODD d5: RSHIFT 4 HALT ; AC has shifted value .LOC 20 d1: 3451 d2: 8192 d3: -8192 d4: -32768 d5: 944
demo/src/stm32f4-i2c.adb
e3l6/SSMDev
0
5571
------------------------------------------------------------------------------ -- -- -- GNAT EXAMPLE -- -- -- -- Copyright (C) 2014, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- 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. -- -- -- ------------------------------------------------------------------------------ with STM32F4.Reset_Clock_Control; use STM32F4.Reset_Clock_Control; package body STM32F4.I2C is subtype I2C_SR1_Flag is I2C_Flag range SB .. SMBALERT; subtype I2C_SR2_Flag is I2C_Flag range MSL .. DUALF; SR1_Flag_Pos : constant array (I2C_SR1_Flag) of Natural := (0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 14, 15); SR2_Flag_Pos : constant array (I2C_SR2_Flag) of Natural := (0, 1, 2, 4, 5, 6, 7); --------------- -- Configure -- --------------- procedure Configure (Port : out I2C_Port; Conf : I2C_Config) is CR2, CR1 : Half_Word; CCR : Half_Word := 0; Pclk1 : Word; Freq_Range : Half_Word; begin -- Load CR2 and clear FREQ -- the Reference Manual, RM0090, Doc ID 018909 Rev 6 843 specifies that the -- reset value for Cr2 is zero so we just clear it -- CR2 := Port.CR2 and (not 16#3F#); CR2 := 0; -- Compute frequency from pclk1 Pclk1 := Get_Clock_Frequency.Pclk1; Freq_Range := Half_Word (Pclk1 / 1_000_000); if Freq_Range < 2 or else Freq_Range > 42 then raise Program_Error; end if; Port.CR2 := CR2 or Freq_Range; Set_State (Port, Disabled); if Conf.Clock_Speed <= 100_000 then CCR := Half_Word (Pclk1 / (Conf.Clock_Speed * 2)); if CCR < 4 then CCR := 4; end if; Port.TRISE := Freq_Range + 1; else -- Fast mode if Conf.Duty_Cycle = I2C_DutyCycle_2 then CCR := Half_Word (Pclk1 / (Conf.Clock_Speed * 3)); else CCR := Half_Word (Pclk1 / (Conf.Clock_Speed * 25)); CCR := CCR or I2C_DutyCycle_16_9; end if; if (CCR and 16#0FFF#) = 0 then CCR := 1; end if; CCR := CCR or 16#80#; Port.TRISE := (Freq_Range * 300) / 1000 + 1; end if; Port.CCR := CCR; Set_State (Port, Enabled); CR1 := Port.CR1; CR1 := CR1 and 16#FBF5#; CR1 := CR1 or Conf.Mode or Conf.Ack; Port.CR1 := CR1; Port.OAR1 := Conf.Ack_Address or Conf.Own_Address; end Configure; --------------- -- Set_State -- --------------- procedure Set_State (Port : in out I2C_Port; State : I2C_State) is begin if State = Enabled then Port.CR1 := Port.CR1 or CR1_PE; else Port.CR1 := Port.CR1 and (not CR1_PE); end if; end Set_State; ---------------- -- Is_Enabled -- ---------------- function Is_Enabled (Port : I2C_Port) return Boolean is begin return (Port.CR1 and 16#01#) /= 0; end Is_Enabled; -------------------- -- Generate_Start -- -------------------- procedure Generate_Start (Port : in out I2C_Port; State : I2C_State) is begin if State = Enabled then Port.CR1 := Port.CR1 or CR1_START; else Port.CR1 := Port.CR1 and (not CR1_START); end if; end Generate_Start; ------------------- -- Generate_Stop -- ------------------- procedure Generate_Stop (Port : in out I2C_Port; State : I2C_State) is begin if State = Enabled then Port.CR1 := Port.CR1 or CR1_STOP; else Port.CR1 := Port.CR1 and (not CR1_STOP); end if; end Generate_Stop; -------------------- -- Send_7Bit_Addr -- -------------------- procedure Send_7Bit_Addr (Port : in out I2C_Port; Addr : Byte; Dir : I2C_Direction) is Address : Half_Word := Half_Word (Addr); begin if Dir = Receiver then Address := Address or I2C_OAR1_ADD0; else Address := Address and (not I2C_OAR1_ADD0); end if; Port.DR := Address; end Send_7Bit_Addr; -------------- -- Get_Flag -- -------------- function Get_Flag (Port : I2C_Port; Flag : I2C_Flag) return Boolean is begin if Flag in I2C_SR1_Flag then return (Port.SR1 and (2**SR1_Flag_Pos (Flag))) /= 0; else return (Port.SR2 and (2**SR2_Flag_Pos (Flag))) /= 0; end if; end Get_Flag; ---------------- -- Clear_Flag -- ---------------- procedure Clear_Flag (Port : in out I2C_Port; Flag : I2C_Flag) is Unref : Half_Word with Unreferenced; begin if Flag = ADDR then -- To clear the ADDR flag we have to read SR2 after reading SR1 Unref := Port.SR1; Unref := Port.SR2; else if Flag in I2C_SR1_Flag then Port.SR1 := Port.SR1 and (not (2**SR1_Flag_Pos (Flag))); else Port.SR2 := Port.SR2 and (not (2**SR2_Flag_Pos (Flag))); end if; end if; end Clear_Flag; ------------------- -- Wait_For_Flag -- ------------------- procedure Wait_For_Flag (Port : I2C_Port; Flag : I2C_Flag; State : I2C_State; Time_Out : Natural := 1_000_000) is pragma Unreferenced (Time_Out); Expected : constant Boolean := (if State = Enabled then True else False); -- Cnt : Natural := Time_Out; begin while Get_Flag (Port, Flag) /= Expected loop -- Cnt := Cnt - 1; -- if Cnt = 0 then -- raise Program_Error; -- end if; null; end loop; end Wait_For_Flag; --------------- -- Send_Data -- --------------- procedure Send_Data (Port : in out I2C_Port; Data : Byte) is begin Port.DR := Half_Word (Data); end Send_Data; --------------- -- Read_Data -- --------------- function Read_Data (Port : I2C_Port) return Byte is begin return Byte (Port.DR); end Read_Data; -------------------- -- Set_Ack_Config -- -------------------- procedure Set_Ack_Config (Port : in out I2C_Port; State : I2C_State) is begin if State = Enabled then Port.CR1 := Port.CR1 or CR1_ACK; else Port.CR1 := Port.CR1 and (not CR1_ACK); end if; end Set_Ack_Config; --------------------- -- Set_Nack_Config -- --------------------- procedure Set_Nack_Config (Port : in out I2C_Port; Pos : I2C_Nack_Position) is begin if Pos = Next then Port.CR1 := Port.CR1 or CR1_POS; else Port.CR1 := Port.CR1 and (not CR1_POS); end if; end Set_Nack_Config; end STM32F4.I2C;
libsrc/_DEVELOPMENT/arch/sms/vram/z80/asm_sms_setw_vram_unsafe.asm
jpoikela/z88dk
640
19630
; ======================================================================== ; ; void *sms_setw_vram_unsafe(void *dst, unsigned int c, unsigned int n) ; ; memset VRAM word at a time unsafe; VRAM addresses are assumed to be stable. ; ; ======================================================================== ; unsafe version has not been written yet SECTION code_clib SECTION code_crt_common PUBLIC asm_sms_setw_vram_unsafe EXTERN asm_sms_setw_vram defc asm_sms_setw_vram_unsafe = asm_sms_setw_vram ; memset vram by word ; ; enter : de = unsigned int c ; bc = unsigned int n > 0 ; ; VRAM DESTINATION ADDRESS ALREADY SET! ; ; exit : de = unsigned int c ; bc = 0 ; ; uses : af, bc, hl
out/euler39.adb
FardaleM/metalang
22
30609
<filename>out/euler39.adb with ada.text_io, ada.Integer_text_IO, Ada.Text_IO.Text_Streams, Ada.Strings.Fixed, Interfaces.C; use ada.text_io, ada.Integer_text_IO, Ada.Strings, Ada.Strings.Fixed, Interfaces.C; with Ada.Numerics.Elementary_Functions; procedure euler39 is type stringptr is access all char_array; procedure PInt(i : in Integer) is begin String'Write (Text_Streams.Stream (Current_Output), Trim(Integer'Image(i), Left)); end; type d is Array (Integer range <>) of Integer; type d_PTR is access d; t : d_PTR; p : Integer; j : Integer; c2 : Integer; c : Integer; begin t := new d (0..1000); for i in integer range 0..1000 loop t(i) := 0; end loop; for a in integer range 1..1000 loop for b in integer range 1..1000 loop c2 := a * a + b * b; c := Integer(Float'Truncation(Ada.Numerics.Elementary_Functions.Sqrt(Float(c2)))); if c * c = c2 then p := a + b + c; if p < 1001 then t(p) := t(p) + 1; end if; end if; end loop; end loop; j := 0; for k in integer range 1..1000 loop if t(k) > t(j) then j := k; end if; end loop; PInt(j); end;
examples/outdated-and-incorrect/clowns/Functor.agda
asr/agda-kanso
1
2383
{-# OPTIONS --no-positivity-check #-} module Functor where import Sets open Sets infixr 40 _+_ _+₂_ infixr 60 _×_ _×₂_ infix 80 _[_] data U : Set1 where K : Set -> U Id : U _+_ : U -> U -> U _×_ : U -> U -> U data U₂ : Set1 where K₂ : (A : Set) -> U₂ ↖ : U -> U₂ ↗ : U -> U₂ _+₂_ : U₂ -> U₂ -> U₂ _×₂_ : U₂ -> U₂ -> U₂ -- Functor composition _[_] : U -> U -> U K A [ H ] = K A Id [ H ] = H (F + G) [ H ] = F [ H ] + G [ H ] (F × G) [ H ] = F [ H ] × G [ H ] module Semantics where -- The semantic of a functor ⟦_⟧ : U -> Set -> Set ⟦ K A ⟧ X = A ⟦ Id ⟧ X = X ⟦ F + G ⟧ X = ⟦ F ⟧ X [+] ⟦ G ⟧ X ⟦ F × G ⟧ X = ⟦ F ⟧ X [×] ⟦ G ⟧ X ⟦_⟧₂ : (F : U₂) -> Set -> Set -> Set ⟦ K₂ A ⟧₂ C J = A ⟦ ↖ F ⟧₂ C J = ⟦ F ⟧ C ⟦ ↗ F ⟧₂ C J = ⟦ F ⟧ J ⟦ F +₂ G ⟧₂ C J = ⟦ F ⟧₂ C J [+] ⟦ G ⟧₂ C J ⟦ F ×₂ G ⟧₂ C J = ⟦ F ⟧₂ C J [×] ⟦ G ⟧₂ C J module Recursive where -- Fixed points (we need to turn off positivity checking since we can't see -- that ⟦ F ⟧ is covariant). open Semantics data μ (F : U) : Set where inn : ⟦ F ⟧ (μ F) -> μ F out : {F : U} -> μ F -> ⟦ F ⟧ (μ F) out (inn f) = f
test/Succeed/Issue2888.agda
shlevy/agda
1,989
9935
{-# OPTIONS --allow-unsolved-metas #-} module _ where open import Agda.Primitive open import Agda.Builtin.Nat module Test₁ where record ⊤ {a} : Set a where constructor tt data G : (A : Set) → ⊤ {_} → Set where d : (x : ⊤) → G ⊤ x test : (g : G ⊤ tt) → Set test (d x) = ⊤ module Test₂ where postulate A : Set a : A record R {a} : Set a where constructor mkR field x : A data G : (A : Set) → R {_} → Set where d : (x : R) → G R x test : (g : G R (mkR a)) → R test (d x) = x module Test₃ where postulate A : Set a : A record R {a} : Set a where constructor mkR field x y : A data G : (A : Set) → R {_} → Set where d : (x : R) → G R x -- Forced: mkR x y test₁ : ∀ x y → (g : G R (mkR x y)) → Set test₁ x y (d (mkR x y)) = A -- .(mkR x y) turns into z with x = .(R.x z) and y = .(R.y z) test₂ : ∀ x y → (g : G R (mkR x y)) → Set test₂ x y (d .(mkR x y)) = A test₃ : ∀ x y → (g : G R (mkR x y)) → Set test₃ .(R.x z) .(R.y z) (d z) = A
oeis/137/A137319.asm
neoneye/loda-programs
11
246687
; A137319: Start with the set of natural numbers. Add 1 to every 2nd term, 2 to every 3rd term, 3 to every 4th term, etc. ; Submitted by <NAME>(w2) ; 1,3,5,8,9,14,13,19,19,24,21,34,25,34,35,42,33,51,37,56,49,54,45,76,53,64,63,78,57,94,61,89,77,84,79,118,73,94,91,122,81,130,85,122,117,114,93,162,103,137,119,144,105,166,123,168,133,144,117,216,121,154,161,184 add $0,1 mov $2,$0 lpb $0 mov $3,$0 sub $0,1 mov $4,$2 gcd $4,$3 trn $4,$0 pow $3,$4 add $1,$3 lpe mul $1,6 mov $0,$1 sub $0,6 div $0,6 add $0,1
libsrc/sos/break_key.asm
meesokim/z88dk
0
86808
; ; S-OS specific routines ; by <NAME>, 2013 ; ;; int break_key() ; ; $Id: break_key.asm,v 1.3 2015/01/19 01:33:07 pauloscustodio Exp $ ; ;---------------------------------------------------------------- ; ; Check if BREAK is being pressed ; ( 1 = pressed; 0 = not pressed ) ; ;---------------------------------------------------------------- PUBLIC break_key break_key: call $1fcd ld hl,0 ; assume break is not pressed ret nz inc l ret
programs/oeis/017/A017662.asm
neoneye/loda
22
24969
; A017662: (12n+11)^10. ; 25937424601,41426511213649,2758547353515625,52599132235830049,511116753300641401,3255243551009881201,15516041187205853449,59873693923837890625,196715135728956532249,569468379011812486801 mul $0,12 add $0,11 pow $0,10
src/tests/ahven/util-xunit.ads
RREE/ada-util
60
7103
----------------------------------------------------------------------- -- util-xunit - Unit tests on top of AHven -- Copyright (C) 2011, 2018, 2019 <NAME> -- Written by <NAME> (<EMAIL>) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ahven; with Ahven.Framework; with Ahven.Results; with GNAT.Source_Info; -- The <b>Util.XUnit</b> package exposes a common package definition used by the Ada testutil -- library. This implementation exposes an implementation on top of Ahven. -- -- Ahven is written by <NAME> and licensed under permissive ISC license. -- See http://ahven.stronglytyped.org/ package Util.XUnit is Assertion_Error : exception renames Ahven.Assertion_Error; type Status is (Success, Failure); subtype Message_String is String; subtype Test_Suite is Ahven.Framework.Test_Suite; type Access_Test_Suite is access all Test_Suite; type Test_Access is access all Ahven.Framework.Test_Case'Class; type Test_Object; type Test_Object_Access is access all Test_Object; type Test_Object is record Test : Test_Access; Next : Test_Object_Access; end record; -- Register a test object in the test suite. procedure Register (T : in Test_Object_Access); -- Build a message from a string (Adaptation for AUnit API). function Format (S : in String) return Message_String; -- Build a message with the source and line number. function Build_Message (Message : in String; Source : in String; Line : in Natural) return String; -- ------------------------------ -- A simple test case -- ------------------------------ type Test_Case is abstract new Ahven.Framework.Test_Case with null record; overriding procedure Initialize (T : in out Test_Case); procedure Assert (T : in Test_Case; Condition : in Boolean; Message : in String := "Test failed"; Source : in String := GNAT.Source_Info.File; Line : in Natural := GNAT.Source_Info.Line); -- Return the name of the test case. overriding function Get_Name (T : Test_Case) return String; -- Test case name (this is the AUnit function that must be implemented). function Name (T : in Test_Case) return Message_String is abstract; -- Perform the test (AUnit function to implement). procedure Run_Test (T : in out Test_Case) is abstract; -- ------------------------------ -- A test with fixture -- ------------------------------ type Test is new Ahven.Framework.Test_Case with null record; -- Check that the value matches what we expect. procedure Assert (T : in Test; Condition : in Boolean; Message : in String := "Test failed"; Source : String := GNAT.Source_Info.File; Line : Natural := GNAT.Source_Info.Line); -- Report passes, skips, failures, and errors from the result collection. procedure Report_Results (Result : in Ahven.Results.Result_Collection; Label : in String; Time : in Duration); -- The main testsuite program. This launches the tests, collects the -- results, create performance logs and set the program exit status -- according to the testsuite execution status. generic with function Suite return Access_Test_Suite; procedure Harness (Output : in String; XML : in Boolean; Label : in String; Result : out Status); end Util.XUnit;
Task/String-matching/AppleScript/string-matching-1.applescript
LaudateCorpus1/RosettaCodeData
1
317
set stringA to "I felt happy because I saw the others were happy and because I knew I should feel happy, but I wasn’t really happy." set string1 to "I felt happy" set string2 to "I should feel happy" set string3 to "I wasn't really happy" -- Determining if the first string starts with second string stringA starts with string1 --> true -- Determining if the first string contains the second string at any location stringA contains string2 --> true -- Determining if the first string ends with the second string stringA ends with string3 --> false -- Print the location of the match for part 2 offset of string2 in stringA --> 69
2019/Compiladores1/trabalhos/T1/src/t1/Lua.g4
LorhanSohaky/UFSCar
1
5458
grammar Lua; @members { public static String grupo="740951 743602 743586"; } programa: trecho EOF; //Regra principal trecho: (comando (';')?)* (ultimocomando (';')?)?; // Sequência de comandos bloco: trecho; // É uma lista de comandos comando: listavar '=' listaexp // Atribuindo expressões a uma lista de variáveis | chamadadefuncao | 'do' bloco 'end' | 'while' exp 'do' bloco 'end' // Laço de repecição enquanto | 'repeat' bloco 'until' exp // Laço de repecição repita até | 'if' exp 'then' bloco ('elseif' exp 'then' bloco)* ( 'else' bloco )? 'end' // Comando condicional | 'for' nomeVar '=' exp ',' exp (',' exp)? 'do' bloco 'end' // Laço de repetição para numérica | 'for' listadenomes 'in' listaexp 'do' bloco 'end' // Laço de repetição para genérica | 'function' nomedafuncao corpodafuncao // Declaração da função | 'local' 'function' nomeFuncao corpodafuncao // Declaração local da função | 'local' listadenomes ('=' listaexp)?; // Atribuição local das expressões à lista de variáveis ultimocomando: 'return' (listaexp)? // Para retorno de função | 'break'; //Para terminar um laço de repetição nomedafuncao: // Declaração do nome da função nomeFuncao ('.' nomeFuncao)* (':' nomeFuncao)?; fragment Caracter: ('a' ..'z') | ('A' ..'Z') | '_'; fragment Numero: ('0' ..'9'); Nome: Caracter (Caracter | Numero)*; // Sequência válida de nomes listavar: var (',' var)*; // lista de variaveis var: nomeVar | expprefixo '[' exp ']' | expprefixo '.' nomeVar; // Declaração de variavel locais, globais e campos de tabelas listadenomes: nomeVar (',' nomeVar)*; //lista de nomes listaexp: (exp ',')* exp; //lista de expressões exp: //expressões básicas 'nil' | 'false' | 'true' | Cadeia | '...' | Num | Decimal | funcao | expprefixo | construtortabela | exp opbin exp | opunaria exp; //Define o prefixo de uma expressão expprefixo: nomeVar | expprefixo '[' exp ']' | expprefixo '.' nomeVar | expprefixo args | expprefixo ':' nomeFuncao args | '(' exp ')'; chamadadefuncao: expprefixo args | expprefixo ':' nomeFuncao args; args: '(' (listaexp)? ')' | construtortabela | Cadeia; //Passa argumentos para funções por listas, tabelas ou cadeias funcao: 'function' corpodafuncao; //declarar uma função Cadeia: '\'' (~('\'' | '\n'))* '\''; //cadeia de caracteres envoltas por aspas simples corpodafuncao: '(' (listapar)? ')' bloco 'end'; //Determina lista de parametros passados à função e seu fim (end) listapar: listadenomes (',' '...')? | '...'; //Lista de parâmetros construtortabela: '{' (listadecampos)? '}'; //Lista de campos que será passada como argumento. Exemplo: f{campos} = f({campos}) listadecampos: //Lista de campos campo (separadordecampos campo)* (separadordecampos)?; campo: '[' exp ']' '=' exp | nomeVar '=' exp | exp; //Definição de campo (espaço que é preenchido por pelo menos uma exp) separadordecampos: ',' | ';'; //Delimitador de campos opbin: //Operadores binários '+' | '-' | '*' | '/' | '^' | '%' | '..' | '<' | '<=' | '>' | '>=' | '==' | '~=' | 'and' | 'or'; opunaria: '-' | 'not' | '#'; //Operadores unários Comentario: '--' .*? '\n' -> skip; //Ignora comentários de linha única (denotados por '--') Decimal: Numero+ ('.' Numero+)?; Num: Decimal; nomeVar: Nome {TabelaDeSimbolos.adicionarSimbolo($Nome.text, Tipo.VARIAVEL);}; nomeFuncao: Nome {TabelaDeSimbolos.adicionarSimbolo($Nome.text, Tipo.FUNCAO);}; Format: ('\n' | '\t' | '\r' | ' ') -> skip; //Ignora whitespaces e indentações
Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xca.log_21829_116.asm
ljhsiun2/medusa
9
174829
<reponame>ljhsiun2/medusa<filename>Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xca.log_21829_116.asm .global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r14 push %r8 push %rcx push %rdi push %rsi lea addresses_A_ht+0x19118, %rdi nop nop nop nop nop sub %r8, %r8 movups (%rdi), %xmm7 vpextrq $1, %xmm7, %r14 nop cmp %r8, %r8 lea addresses_D_ht+0x1e33c, %rsi nop nop nop nop and %r10, %r10 and $0xffffffffffffffc0, %rsi vmovntdqa (%rsi), %ymm3 vextracti128 $1, %ymm3, %xmm3 vpextrq $1, %xmm3, %r11 nop nop nop nop nop lfence lea addresses_A_ht+0x189f8, %r8 nop nop nop nop sub %rcx, %rcx vmovups (%r8), %ymm3 vextracti128 $0, %ymm3, %xmm3 vpextrq $1, %xmm3, %r14 dec %r8 pop %rsi pop %rdi pop %rcx pop %r8 pop %r14 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r13 push %r9 push %rax push %rbx push %rcx push %rdi push %rdx // Store lea addresses_WC+0x49b8, %rax sub %rdi, %rdi movw $0x5152, (%rax) nop nop nop nop nop add %rbx, %rbx // Store mov $0x483b7a00000001a4, %r13 nop and %r9, %r9 mov $0x5152535455565758, %rbx movq %rbx, (%r13) nop nop nop nop and $8635, %r9 // Load mov $0x380, %r13 nop nop and %rdx, %rdx mov (%r13), %r9w nop nop nop sub $3311, %rdi // Store lea addresses_RW+0x49f8, %rax nop nop nop sub %rcx, %rcx movw $0x5152, (%rax) xor %r9, %r9 // Store lea addresses_A+0x10af8, %rdi nop sub $46470, %r13 movw $0x5152, (%rdi) nop nop nop add %rdi, %rdi // Faulty Load lea addresses_RW+0x49f8, %rdx nop nop nop nop and $8947, %rax movntdqa (%rdx), %xmm3 vpextrq $1, %xmm3, %rcx lea oracles, %r9 and $0xff, %rcx shlq $12, %rcx mov (%r9,%rcx,1), %rcx pop %rdx pop %rdi pop %rcx pop %rbx pop %rax pop %r9 pop %r13 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_RW', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_WC', 'same': False, 'AVXalign': False, 'congruent': 6}} {'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_NC', 'same': False, 'AVXalign': False, 'congruent': 2}} {'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_P', 'same': False, 'AVXalign': False, 'congruent': 3}} {'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_RW', 'same': True, 'AVXalign': True, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_A', 'same': False, 'AVXalign': False, 'congruent': 7}} [Faulty Load] {'OP': 'LOAD', 'src': {'size': 16, 'NT': True, 'type': 'addresses_RW', 'same': True, 'AVXalign': False, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 4}} {'OP': 'LOAD', 'src': {'size': 32, 'NT': True, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 2}} {'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_A_ht', 'same': True, 'AVXalign': False, 'congruent': 9}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
apps/bootloader/board.adb
ekoeppen/MSP430_Generic_Ada_Drivers
0
5169
<filename>apps/bootloader/board.adb with System.Storage_Elements; use System.Storage_Elements; with MSP430_SVD; use MSP430_SVD; with MSP430_SVD.SYSTEM_CLOCK; use MSP430_SVD.SYSTEM_CLOCK; with MSPGD.GPIO; use MSPGD.GPIO; with MSPGD.GPIO.Pin; with Startup; package body Board is CALDCO_1MHz : DCOCTL_Register with Import, Address => System'To_Address (16#10FE#); CALBC1_1MHz : BCSCTL1_Register with Import, Address => System'To_Address (16#10FF#); CALDCO_8MHz : DCOCTL_Register with Import, Address => System'To_Address (16#10FC#); CALBC1_8MHz : BCSCTL1_Register with Import, Address => System'To_Address (16#10FD#); package RX is new MSPGD.GPIO.Pin (Port => 1, Pin => 1, Alt_Func => Secondary); package TX is new MSPGD.GPIO.Pin (Port => 1, Pin => 2, Alt_Func => Secondary); procedure Init is begin -- SYSTEM_CLOCK_Periph.BCSCTL1 := CALBC1_8MHz; -- SYSTEM_CLOCK_Periph.DCOCTL := CALDCO_8MHz; Clock.Init; RX.Init; TX.Init; UART.Init; end Init; end Board;
libsrc/math/mbf32/c/asm/___mbf32_POW.asm
Frodevan/z88dk
640
242103
SECTION code_fp_mbf32 PUBLIC ___mbf32_POW EXTERN POWER defc ___mbf32_POW = POWER + 2
tests/typing/bad/testfile-type-2.adb
xuedong/mini-ada
0
21025
<filename>tests/typing/bad/testfile-type-2.adb with Ada.Text_IO; use Ada.Text_IO; procedure P is type t; x: t; begin put('a'); end;
3-mid/opengl/source/lean/buffer/opengl-buffer.adb
charlie5/lace-alire
1
29467
<gh_stars>1-10 with openGL.Errors, openGL.Tasks, ada.unchecked_Deallocation; package body openGL.Buffer is use type a_Name; --------------- -- Buffer Name -- function new_vbo_Name return a_Name is Name : aliased a_Name; begin Tasks.check; glGenBuffers (1, Name'unchecked_Access); return Name; end new_vbo_Name; procedure free (vbo_Name : in a_Name) is Name : aliased a_Name := vbo_Name; begin Tasks.check; glDeleteBuffers (1, Name'unchecked_Access); end free; pragma Unreferenced (free); ---------- -- Object -- procedure verify_Name (Self : in out Object'Class) is begin if Self.Name = 0 then Self.Name := new_vbo_Name; end if; end verify_Name; function Name (Self : in Object) return Buffer.a_Name is begin return Self.Name; end Name; procedure enable (Self : in Object'Class) is pragma assert (Self.Name > 0); begin Tasks.check; glBindBuffer (to_GL_Enum (Self.Kind), Self.Name); openGL.Errors.log; end enable; procedure destroy (Self : in out Object'Class) is begin Tasks.check; glBindBuffer (to_GL_Enum (Self.Kind), 0); openGL.Errors.log; glDeleteBuffers (1, Self.Name'Access); openGL.Errors.log; Self.Name := 0; end destroy; procedure free (Self : in out View) is procedure deallocate is new ada.unchecked_Deallocation (Buffer.Object'Class, Buffer.view); begin if Self /= null then Self.destroy; deallocate (Self); end if; end free; function Length (Self : in Object) return Positive is begin return Self.Length; end Length; ------------------------- -- 'array' Buffer Object -- overriding function Kind (Self : in array_Object) return Buffer.a_Kind is pragma Unreferenced (Self); begin return array_Buffer; end Kind; --------------------------------- -- 'element array' Buffer object -- overriding function Kind (Self : in element_array_Object) return Buffer.a_Kind is pragma Unreferenced (Self); begin return element_array_Buffer; end Kind; end openGL.Buffer;
src/net-utils.adb
stcarrez/ada-enet
16
21870
----------------------------------------------------------------------- -- net-utils -- Network utilities -- Copyright (C) 2016 <NAME> -- Written by <NAME> (<EMAIL>) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Interfaces; package body Net.Utils is function Hex (Value : in Uint8) return String; function Image (Value : in Uint8) return String; Hex_String : constant String := "0123456789ABCDEF"; -- Get a 32-bit random number. function Random return Uint32 is separate; function Hex (Value : in Uint8) return String is use Interfaces; Result : String (1 .. 2); begin Result (1) := Hex_String (Positive (Shift_Right (Value, 4) + 1)); Result (2) := Hex_String (Positive ((Value and 16#0f#) + 1)); return Result; end Hex; function Image (Value : in Uint8) return String is Result : constant String := Value'Image; begin return Result (Result'First + 1 .. Result'Last); end Image; -- ------------------------------ -- Convert the IPv4 address to a dot string representation. -- ------------------------------ function To_String (Ip : in Ip_Addr) return String is begin return Image (Ip (Ip'First)) & "." & Image (Ip (Ip'First + 1)) & "." & Image (Ip (Ip'First + 2)) & "." & Image (Ip (Ip'First + 3)); end To_String; -- ------------------------------ -- Convert the Ethernet address to a string representation. -- ------------------------------ function To_String (Mac : in Ether_Addr) return String is begin return Hex (Mac (Mac'First)) & ":" & Hex (Mac (Mac'First + 1)) & ":" & Hex (Mac (Mac'First + 2)) & ":" & Hex (Mac (Mac'First + 3)) & ":" & Hex (Mac (Mac'First + 4)) & ":" & Hex (Mac (Mac'First + 5)); end To_String; end Net.Utils;
Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0xca_notsx.log_21829_352.asm
ljhsiun2/medusa
9
102691
<filename>Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0xca_notsx.log_21829_352.asm .global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r8 push %rax push %rcx push %rdi push %rsi lea addresses_D_ht+0x125c0, %rcx nop nop nop cmp %r11, %r11 vmovups (%rcx), %ymm6 vextracti128 $1, %ymm6, %xmm6 vpextrq $0, %xmm6, %rdi nop nop nop cmp $58707, %rax lea addresses_UC_ht+0x1ec40, %rsi lea addresses_normal_ht+0x1e940, %rdi sub $17456, %r12 mov $43, %rcx rep movsb nop nop nop and %rdi, %rdi lea addresses_WT_ht+0x99c0, %rsi lea addresses_normal_ht+0x9940, %rdi nop nop nop dec %r8 mov $115, %rcx rep movsq nop add %rdi, %rdi lea addresses_UC_ht+0x13980, %rax nop nop nop nop add %rsi, %rsi mov $0x6162636465666768, %rdi movq %rdi, %xmm6 movups %xmm6, (%rax) and $29149, %r12 lea addresses_D_ht+0x2dc0, %rsi lea addresses_normal_ht+0x15cc7, %rdi clflush (%rsi) nop nop nop nop sub %r8, %r8 mov $42, %rcx rep movsw nop nop nop xor $43148, %r11 lea addresses_normal_ht+0x8456, %rsi lea addresses_UC_ht+0x1a6c0, %rdi nop nop add %rax, %rax mov $7, %rcx rep movsw nop nop nop nop nop dec %rdi pop %rsi pop %rdi pop %rcx pop %rax pop %r8 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r14 push %r15 push %rax push %rbx push %rcx push %rdi push %rsi // Store lea addresses_WT+0x29c0, %rax nop add %rbx, %rbx movw $0x5152, (%rax) cmp %rsi, %rsi // REPMOV lea addresses_UC+0xfcc0, %rsi mov $0x2e6dfa0000000452, %rdi nop xor %rax, %rax mov $6, %rcx rep movsl nop nop nop nop nop sub $25529, %r13 // Store lea addresses_RW+0x16e38, %rsi and %r15, %r15 movl $0x51525354, (%rsi) nop nop nop nop and $26611, %r12 // Faulty Load lea addresses_WT+0x29c0, %rbx nop nop sub %rsi, %rsi vmovups (%rbx), %ymm3 vextracti128 $0, %ymm3, %xmm3 vpextrq $0, %xmm3, %r14 lea oracles, %rsi and $0xff, %r14 shlq $12, %r14 mov (%rsi,%r14,1), %r14 pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r15 pop %r14 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': True, 'type': 'addresses_WT'}, 'OP': 'STOR'} {'src': {'congruent': 7, 'same': False, 'type': 'addresses_UC'}, 'dst': {'congruent': 1, 'same': False, 'type': 'addresses_NC'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 3, 'same': False, 'type': 'addresses_RW'}, 'OP': 'STOR'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': True, 'type': 'addresses_WT'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 5, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 7, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'} {'src': {'congruent': 11, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 6, 'same': True, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'} {'src': {'congruent': 3, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 0, 'same': True, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'} {'src': {'congruent': 1, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'} {'52': 21829} 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 */
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0xca_notsx.log_214_1492.asm
ljhsiun2/medusa
9
101318
<reponame>ljhsiun2/medusa .global s_prepare_buffers s_prepare_buffers: push %r10 push %r14 push %r8 push %rax push %rbx push %rcx push %rdi push %rsi lea addresses_UC_ht+0x48b7, %rsi lea addresses_WC_ht+0x4ce1, %rdi nop nop sub $34353, %rbx mov $54, %rcx rep movsq nop add $60362, %rdi lea addresses_D_ht+0x11cb7, %rsi lea addresses_A_ht+0xd5c7, %rdi clflush (%rsi) nop nop add %r14, %r14 mov $121, %rcx rep movsb nop nop add $39160, %rsi lea addresses_WT_ht+0x13cb2, %r14 nop nop nop cmp $30374, %r10 mov (%r14), %rbx and $40956, %rbx lea addresses_normal_ht+0x1407, %rsi lea addresses_WC_ht+0x31b7, %rdi sub %rax, %rax mov $124, %rcx rep movsq nop nop nop nop nop and %rcx, %rcx lea addresses_WT_ht+0x1d4b7, %rcx xor %r10, %r10 movl $0x61626364, (%rcx) nop sub %r14, %r14 lea addresses_UC_ht+0xe2b7, %r14 sub $32564, %r10 mov (%r14), %bx nop cmp $20331, %r10 lea addresses_WT_ht+0x8537, %rdi clflush (%rdi) nop nop nop add $54528, %rsi movb $0x61, (%rdi) nop nop nop nop and $51223, %r10 lea addresses_D_ht+0x11d37, %r10 nop nop nop nop nop add $9150, %rdi mov (%r10), %r14w nop nop nop inc %r10 lea addresses_D_ht+0x17e17, %rcx nop nop nop nop nop xor %rbx, %rbx movb (%rcx), %r10b dec %rbx lea addresses_UC_ht+0x1caaa, %rsi lea addresses_A_ht+0xebd7, %rdi clflush (%rsi) nop nop nop nop inc %rbx mov $6, %rcx rep movsq nop nop nop nop xor $49764, %rdi lea addresses_UC_ht+0x16073, %rsi lea addresses_WT_ht+0x14b7, %rdi nop sub $22778, %r8 mov $58, %rcx rep movsl xor %r8, %r8 lea addresses_WC_ht+0xa477, %r14 nop nop nop nop nop inc %rsi movb (%r14), %al nop sub %rcx, %rcx pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r8 pop %r14 pop %r10 ret .global s_faulty_load s_faulty_load: push %r15 push %r9 push %rbp push %rbx push %rdi push %rdx push %rsi // Store lea addresses_A+0x46e7, %rdx nop nop nop add %rdi, %rdi mov $0x5152535455565758, %rbp movq %rbp, %xmm5 vmovups %ymm5, (%rdx) nop nop cmp %rbp, %rbp // Store mov $0x5472310000000dcb, %rbx nop nop nop nop nop add %rdi, %rdi movl $0x51525354, (%rbx) nop nop nop nop nop cmp $836, %rdi // Store lea addresses_US+0x98b7, %rbx nop nop nop and %rdx, %rdx mov $0x5152535455565758, %r9 movq %r9, %xmm4 movups %xmm4, (%rbx) nop and %rbp, %rbp // Store lea addresses_A+0xfbad, %rdx nop nop nop nop cmp %rsi, %rsi mov $0x5152535455565758, %r9 movq %r9, (%rdx) and $39969, %rbx // Store lea addresses_WC+0x1ee53, %rbp clflush (%rbp) nop add $4445, %r15 movw $0x5152, (%rbp) nop nop nop xor %rdx, %rdx // Faulty Load lea addresses_PSE+0x184b7, %r15 nop nop nop and $52749, %rbp movntdqa (%r15), %xmm3 vpextrq $0, %xmm3, %r9 lea oracles, %rdx and $0xff, %r9 shlq $12, %r9 mov (%rdx,%r9,1), %r9 pop %rsi pop %rdx pop %rdi pop %rbx pop %rbp pop %r9 pop %r15 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': False, 'type': 'addresses_PSE'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 3, 'same': False, 'type': 'addresses_A'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 1, 'same': False, 'type': 'addresses_NC'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 10, 'same': False, 'type': 'addresses_US'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': False, 'type': 'addresses_A'}, 'OP': 'STOR'} {'dst': {'NT': True, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_WC'}, 'OP': 'STOR'} [Faulty Load] {'src': {'NT': True, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': True, 'type': 'addresses_PSE'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 10, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 1, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'} {'src': {'congruent': 10, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 4, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'src': {'NT': True, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': True, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 3, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 11, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 9, 'same': True, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 7, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 6, 'same': True, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 5, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 0, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'src': {'congruent': 1, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'} {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 3, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'00': 214} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
programs/oeis/060/A060354.asm
karttu/loda
1
87729
<reponame>karttu/loda<gh_stars>1-10 ; A060354: The n-th n-gonal number: a(n) = n*(n^2-3*n+4)/2. ; 0,1,2,6,16,35,66,112,176,261,370,506,672,871,1106,1380,1696,2057,2466,2926,3440,4011,4642,5336,6096,6925,7826,8802,9856,10991,12210,13516,14912,16401,17986,19670,21456,23347,25346,27456,29680,32021,34482,37066,39776,42615,45586,48692,51936,55321,58850,62526,66352,70331,74466,78760,83216,87837,92626,97586,102720,108031,113522,119196,125056,131105,137346,143782,150416,157251,164290,171536,178992,186661,194546,202650,210976,219527,228306,237316,246560,256041,265762,275726,285936,296395,307106,318072,329296,340781,352530,364546,376832,389391,402226,415340,428736,442417,456386,470646,485200,500051,515202,530656,546416,562485,578866,595562,612576,629911,647570,665556,683872,702521,721506,740830,760496,780507,800866,821576,842640,864061,885842,907986,930496,953375,976626,1000252,1024256,1048641,1073410,1098566,1124112,1150051,1176386,1203120,1230256,1257797,1285746,1314106,1342880,1372071,1401682,1431716,1462176,1493065,1524386,1556142,1588336,1620971,1654050,1687576,1721552,1755981,1790866,1826210,1862016,1898287,1935026,1972236,2009920,2048081,2086722,2125846,2165456,2205555,2246146,2287232,2328816,2370901,2413490,2456586,2500192,2544311,2588946,2634100,2679776,2725977,2772706,2819966,2867760,2916091,2964962,3014376,3064336,3114845,3165906,3217522,3269696,3322431,3375730,3429596,3484032,3539041,3594626,3650790,3707536,3764867,3822786,3881296,3940400,4000101,4060402,4121306,4182816,4244935,4307666,4371012,4434976,4499561,4564770,4630606,4697072,4764171,4831906,4900280,4969296,5038957,5109266,5180226,5251840,5324111,5397042,5470636,5544896,5619825,5695426,5771702,5848656,5926291,6004610,6083616,6163312,6243701,6324786,6406570,6489056,6572247,6656146,6740756,6826080,6912121,6998882,7086366,7174576,7263515,7353186,7443592,7534736,7626621 mov $2,$0 bin $2,3 mul $2,3 add $0,$2 mov $1,$0
src/TemporalOps/Box.agda
DimaSamoz/temporal-type-systems
4
2408
<gh_stars>1-10 {- Box operator. -} module TemporalOps.Box where open import CategoryTheory.Categories open import CategoryTheory.Instances.Sets open import CategoryTheory.Instances.Reactive open import CategoryTheory.BCCCs open import CategoryTheory.Functor open import CategoryTheory.CartesianStrength open import CategoryTheory.NatTrans open import CategoryTheory.Adjunction open import CategoryTheory.Comonad open import TemporalOps.Common -- The box operator can be derived as a comonad from an adjunction K ⊣ G K : Functor 𝕊et ℝeactive K = record { omap = λ A -> (λ n -> A) ; fmap = λ f -> (λ n -> λ x -> f x) ; fmap-id = refl ; fmap-∘ = refl ; fmap-cong = λ z → z } G : Functor ℝeactive 𝕊et G = record { omap = λ A -> (∀(n : ℕ) -> A n) ; fmap = λ f -> λ a -> (λ n -> f n (a n)) ; fmap-id = refl ; fmap-∘ = refl ; fmap-cong = λ pf → ext (λ n → pf) } K⊣G : K ⊣ G K⊣G = record { η = record { at = λ A x n → x ; nat-cond = refl } ; ε = record { at = λ A n a → a n ; nat-cond = refl } ; tri1 = refl ; tri2 = refl } -- | Box operator -- Comonad instance from adjunction W-□ : Comonad ℝeactive W-□ = AdjComonad K⊣G -- Endofunctor from comonad F-□ : Endofunctor ℝeactive F-□ = Comonad.W W-□ -- Operator from functor □_ : τ -> τ □_ = Functor.omap (Comonad.W W-□) infixr 65 □_ -- Extensional equality for boxed values □-≡ : ∀{A} n l {v : (□ A) n}{w : (□ A) l} -> v ≡ w -> ∀ m -> v m ≡ w m □-≡ n l refl m = refl -- □ is a Cartesian functor F-cart-□ : CartesianFunctor F-□ ℝeactive-cart ℝeactive-cart F-cart-□ = record { u = λ n a _ → a ; m = m-□ ; m-nat₁ = λ f → refl ; m-nat₂ = λ f → refl ; associative = refl ; unital-right = refl ; unital-left = refl } where m-□ : ∀(A B : τ) -> □ A ⊗ □ B ⇴ □ (A ⊗ B) m-□ A B n (a , b) = λ k → a k , b k open CartesianFunctor F-cart-□ public -- □ is a Cartesian comonad W-cart-□ : CartesianComonad W-□ ℝeactive-cart W-cart-□ = record { cart-fun = F-cart-□ ; u-ε = refl ; u-δ = refl ; m-ε = refl ; m-δ = refl } open CartesianComonad W-cart-□ public
oeis/053/A053809.asm
neoneye/loda-programs
11
83850
<gh_stars>10-100 ; A053809: Second partial sums of A001891. ; 1,6,21,57,133,281,554,1039,1878,3302,5686,9638,16143,26796,44179,72471,118435,193015,313920,509805,827036,1340636,2171996,3517532,5695053,9218786,14920769,24147269,39076593,63233317,102320326,165565083,267897938,433476706,701389554,1134882466,1836289595,2971191080,4807501215,7778714435,12586239471,20364979491,32951246396,53316255257,86267533048,139583821816,225851390584,365435250424,591286681433,956721974782,1548008701741,2504730724753,4052739477533,6557470256241,10610209790754,17167680107111 lpb $0 mov $2,$0 sub $0,1 seq $2,53808 ; Partial sums of A001891. add $3,$2 lpe mov $0,$3 add $0,1
libmikeos/src.os/os_check_for_key.asm
mynameispyo/InpyoOS
0
7135
; @@@ int mikeos_check_for_key(void); %include "os_vector.inc" section .text use16 global _mikeos_check_for_key _mikeos_check_for_key: mov bx, os_check_for_key call bx xor ah, ah ret
programs/oeis/021/A021529.asm
neoneye/loda
22
173168
; A021529: Decimal expansion of 1/525. ; 0,0,1,9,0,4,7,6,1,9,0,4,7,6,1,9,0,4,7,6,1,9,0,4,7,6,1,9,0,4,7,6,1,9,0,4,7,6,1,9,0,4,7,6,1,9,0,4,7,6,1,9,0,4,7,6,1,9,0,4,7,6,1,9,0,4,7,6,1,9,0,4,7,6,1,9,0,4,7,6,1,9,0,4,7,6,1,9,0,4,7,6,1,9,0,4,7,6,1 add $0,1 mov $1,10 pow $1,$0 mul $1,6 div $1,3150 mod $1,10 mov $0,$1
src/header/mpr100.asm
freem/nesmon
2
100829
;==============================================================================; ; nesmon/src/header/mpr100.asm ; NES 2.0 header for Mapper 100 (exclusively for Nintendulator) ;==============================================================================; ; Primarily made so I can see what Nintendulator's Mapper 100/Debug Mapper is ; all about. I think it's what I'm looking for in terms of RAM cart emulation. ;==============================================================================; ; Configuration .ignorenl ; Mirroring: 0=Horizontal, 1=Vertical HDR_MIRRORING = 1 ; Not permanent; you can change the mirroring and mapping on the fly. ; Battery-backed SRAM HDR_BATTERY = 0 ;HDR_PRGRAM_SIZE ;HDR_PRGRAMB_SIZE .endinl ;==============================================================================; ; begin header .db "NES",$1A .db 1 ;number of 16K PRG ROM pages .db 0 ;number of 8K CHR ROM pages (or 0 for CHR-RAM) ;flags 6 .db %01000000 | HDR_BATTERY<<1 | HDR_MIRRORING ; | ||||| ; | |||||_ Mirroring (set above) ; | ||||__ Battery backed SRAM (set above) ; | |||___ 512 byte "Trainer" at $7000-$71FF ; | ||____ Four screen mode ; |__|_____ Mapper number bits 3-0 ;flags 7 .db %01101000 ; | ||||| ; | |||||_ VS system ; | ||||__ Playchoice 10 ; | ||L___ NES 2.0 indicator ; |__|_____ Mapper number bits 7-4 ;Byte 8/Mapper Variant .db %00000000 ; |__||__| ; | | ; | |___ Mapper number bits 11-8 ; |_______ Submapper number (0=no submapper) ;Byte 9/ROM size upper bits .db %00000000 ; |__||__| ; | | ; | |___ PRG ROM ; |_______ CHR ROM ;Byte 10/RAM size .db %00000000 ; |__||__| ; | | ; | |___ Non-battery backed PRG RAM ; |_______ Battery backed PRG RAM/Serial EEPROM ;Byte 11/Video RAM size .db %00000111 ; |__||__| ; | | ; | |___ Non-battery backed CHR RAM: (8K for now) ; |_______ Battery backed CHR RAM ;Byte 12/TV System .db %00000000 ; || ; ||_ NTSC/PAL flag (0=NTSC, 1=PAL) ; |__ Dual compatibility flag (game detects and adjusts accordingly) ;Byte 13/VS Hardware .db %00000000 ; |__||__| ; | | ; | |___ PPU ; |_______ Mode .db $00,$00 ;filler
Chrome Tabs.lbaction/Contents/Scripts/default.applescript
universvm/lb6-actions
0
4124
on run set tabs_result to [] if is_running("Google Chrome") then set browserName to "Google Chrome" else if is_running("Chromium") then set browserName to "Chromium" else if is_running("Vivaldi") then set browserName to "Vivaldi" else return end if using terms from application "Google Chrome" tell application browserName set win_list to every window -- Cycle through every Chrome window set win_id to 1 repeat with the_window in win_list set tab_list to every tab in the_window --set active_tab to active tab in the_window -- Cycle through every tab in this window set tab_id to 1 repeat with the_tab in tab_list set tab_title to the title of the_tab set tab_url to the URL of the_tab if tab_title is "" then set tab_title to tab_url set tab_url to "" end if set |title| to (win_id & ": " & tab_title) as string set subtitle to tab_url set icon to "tab" if tab_url is "chrome://newtab/" then set icon to icon & "_new" else if ("//localhost" is in tab_url) or ("view-source:" is in tab_title) then set icon to icon & "_dev" end if set icon to icon & "_activeTemplate" set tabs_result to tabs_result & [{tab_id:tab_id, win_id:win_id, |title|:|title|, subtitle:subtitle, icon:icon, action:"switch_tab", actionRunsInBackground:true, actionReturnsItems:true}] set tab_id to tab_id + 1 end repeat set win_id to win_id + 1 end repeat end tell end using terms from return tabs_result end run on switch_tab(argv) set win_id to win_id of argv set tab_id to tab_id of argv if is_running("Google Chrome") then set browserName to "Google Chrome" else if is_running("Chromium") then set browserName to "Chromium" else if is_running("Vivaldi") then set browserName to "Vivaldi" else return end if using terms from application "Google Chrome" tell application browserName set (active tab index of (window win_id)) to tab_id set index of window win_id to 1 activate end tell end using terms from -- If we return something, then we can keep the window open while -- we switch tabs. return {} end switch_tab on is_running(appName) tell application "System Events" to (name of processes) contains appName end is_running
engine/events/cinnabar_lab.asm
opiter09/ASM-Machina
1
29604
<reponame>opiter09/ASM-Machina GiveFossilToCinnabarLab:: ld hl, wd730 set 6, [hl] xor a ld [wCurrentMenuItem], a ld a, A_BUTTON | B_BUTTON ld [wMenuWatchedKeys], a ld a, [wFilteredBagItemsCount] dec a ld [wMaxMenuItem], a ld a, 2 ld [wTopMenuItemY], a ld a, 1 ld [wTopMenuItemX], a ld a, [wFilteredBagItemsCount] dec a ld bc, 2 ld hl, 3 call AddNTimes dec l ld b, l ld c, $d hlcoord 0, 0 call TextBoxBorder call UpdateSprites call PrintFossilsInBag ld hl, wd730 res 6, [hl] call HandleMenuInput bit 1, a ; pressed B? jr nz, .cancelledGivingFossil ld hl, wFilteredBagItems ld a, [wCurrentMenuItem] ld d, 0 ld e, a add hl, de ld a, [hl] ldh [hItemToRemoveID], a cp DOME_FOSSIL jr z, .choseDomeFossil cp HELIX_FOSSIL jr z, .choseHelixFossil ld b, AERODACTYL jr .fossilSelected .choseHelixFossil ld b, OMANYTE jr .fossilSelected .choseDomeFossil ld b, KABUTO .fossilSelected ld [wFossilItem], a ld a, b ld [wFossilMon], a call LoadFossilItemAndMonName ld hl, LabFossil_610ae call PrintText call YesNoChoice ld a, [wCurrentMenuItem] and a jr nz, .cancelledGivingFossil ld hl, LabFossil_610b3 call PrintText ld a, [wFossilItem] ldh [hItemToRemoveID], a farcall RemoveItemByID ld hl, LabFossil_610b8 call PrintText SetEvents EVENT_GAVE_FOSSIL_TO_LAB, EVENT_LAB_STILL_REVIVING_FOSSIL ret .cancelledGivingFossil ld hl, LabFossil_610bd call PrintText ret LabFossil_610ae: text_far _Lab4Text_610ae text_end LabFossil_610b3: text_far _Lab4Text_610b3 text_end LabFossil_610b8: text_far _Lab4Text_610b8 text_end LabFossil_610bd: text_far _Lab4Text_610bd text_end PrintFossilsInBag: ; Prints each fossil in the player's bag on a separate line in the menu. ld hl, wFilteredBagItems xor a ldh [hItemCounter], a .loop ld a, [hli] cp $ff ret z push hl ld [wd11e], a call GetItemName hlcoord 2, 2 ldh a, [hItemCounter] ld bc, SCREEN_WIDTH * 2 call AddNTimes ld de, wcd6d call PlaceString ld hl, hItemCounter inc [hl] pop hl jr .loop ; loads the names of the fossil item and the resulting mon LoadFossilItemAndMonName:: ld a, [wFossilMon] ld [wd11e], a call GetMonName call CopyStringToCF4B ld a, [wFossilItem] ld [wd11e], a call GetItemName ret
Yosemite Javascript XQuery demo/QueryAFolderOfOPMLFiles.applescript
RobTrew/txtquery-tools
69
2249
// Simple demonstration of using XQuery from OS X Yosemite Javascript for Applications // To get a menu of custom perspectives across several files (using OS X (NSXML) XQUERY from Javascript): // 1. Copy the accompanying OPML files (tagged with attributes from FoldingText / TaskPaper) into a folder // 2. Run this script, choosing (from the dialog which pops up) the folder containing the OPML files // Copyright <NAME> 2015 function run() { 'use strict'; /* jshint multistr: true */ // OPEN OUTPUT IN [Marked 2](http://marked2app.com) ? var blnOpenPerspectiveInMarked = true; // OPEN SOURCE FILE FOR SELECTED ACTIONS ? var blnOpenSelected = false; // Temporary output file for "Marked 2.app" to preview var strTestFile = "~/Desktop/TestXQuery01.txt"; // WILL BE OVERWRITTEN - CHECK THAT THIS DOESN'T CLASH // EXTENSION OF <XML/HTML> FILES TO QUERY var strExtn = "opml"; var strExtnUpper = strExtn.toUpperCase(); // MENU OF CUSTOM PERSPECTIVES - DEFINED (OVER A SET OF OPML FILES) IN NSXMLNODE XQUERY 1.0 var dctXQuery = { 'Grouped by Priority level - sorted by descending @due date': ' \ let $v := distinct-values(//outline/@priority) \ for $i in $v \ order by $i \ return ( \ concat("\n### <font color=red>Priority ", $i, "</font>"), \ for $o in //outline[@priority=$i] \ let $d := $o/@due \ order by $d empty greatest \ return ( \ concat( \ "- ", $o/@text, \ if ($d) then concat(" @due(<b>",$d,"</b>)") else () \ ) \ ) \ )', 'Starting in March': ' \ let $v := distinct-values( \ //outline[@start > "2015-02-30" and @start < "2015-04-01"]/substring(@start,1,10) \ ) \ for $d in $v \ order by $d \ return ( \ concat("\n#### <font color=silver>", substring($d, 1, 7), "</font> <font color=red>", substring($d, 9), "</font>"), \ for $o in //outline[@start=$d]\ let $r := $o/ancestor::outline[@file], \ $f := $r/@file, \ $fp := $r/@path, \ $t := $o/@text \ order by $t \ return ( \ concat( \ "- ", $t, \ " [", $f, "](file://", $fp, $f, ")" \ ) \ ) \ )', 'Immediate priorities': ' \ let $v := distinct-values(//outline[@priority=1 and @due]/substring(@due,1,10)) \ for $d in $v \ let $dte := xs:date($d), \ $e := xs:date("1901-01-06") \ order by $d \ return (\ concat( \ "\n#### <font color=gray>", \ ("Sun", "Mon", "Tue", "Wed","Thu", "Fri", "Sat")[ \ (days-from-duration($dte - $e) mod 7) + 1 \ ], \ "</font> <font color=silver>", substring($d, 1, 7), \ "</font> <font color=red>", substring($d, 9, 2), "</font> " \ ), \ for $i in //outline[@priority=1 and starts-with(@due, $d)] \ let $it := $i/@due, \ $t := substring($it, 12), \ $tme := if ($t) then xs:time(concat($t, ":00")) else xs:time("00:00:00")\ order by $t empty least \ return concat( \ if ($t) then concat("<b>",$t,"</b> ") else (), \ $i/@text \ ) \ )', 'Due and urgent': ' \ for $p in //outline[@priority=1 and @due] \ let $d := $p/@due, \ $r := $p/ancestor::outline[@file], \ $f := $r/@file, \ $fp := $r/@path \ order by $d \ return concat( \ "- ", $p/@text, " ", \ if ($d) then \ concat("<font color=gray>@due(<font color=red>", $d, "</font>)</font>") \ else (), \ " [", $f, "](file://", $fp, $f, ")" \ )', 'Projects with alert dates': ' \ for $p in //outline[@type="heading" and @alert] \ let $a := $p/@alert, \ $r := $p/ancestor::outline[@file], \ $f := $r/@file, \ $fp := $r/@path \ order by $a \ return concat( \ "- ", $p/@text, " ", \ "<font color=gray>@alert(<font color=red>", $a, "</font>)</font>", \ " [", $f, "](file://", $fp, $f, ")" \ )' }; // strPath --> [strFileName] function filesInFolder(strPath) { var fm = $.NSFileManager.defaultManager, lstFiles = ObjC.unwrap(fm.contentsOfDirectoryAtPathError(strPath, null)), lst = []; for (var i = 0, lng = lstFiles.length; i < lng; i++) { lst.push(ObjC.unwrap(lstFiles[i])); } return lst; } // strFolderPath --> strExtension --> [strFilePath] function filesInFolderWithExtn(strPath, strExtn) { var lst = filesInFolder(strPath), lstMatch = [], strBase = (strPath.charAt(strPath.length - 1) === '/') ? strPath : strPath + '/', strFileName, lstParts, lngParts; for (var i = 0, lng = lst.length; i < lng; i++) { strFileName = lst[i]; lstParts = strFileName.split('.'); lngParts = lstParts.length; if ((lngParts > 1) && (lstParts[lngParts - 1] === strExtn)) lstMatch.push(strBase + strFileName); } return lstMatch; } // XInclude LIST OF FILES TO INCLUDE IN THE COMPOSITE NSXMLDOCUMENT WHICH WE WILL QUERY // [filePath] --> strWrapElementName --> strInnerElementName --> strIncludeXML function xIncludeXML(lstFilePaths, strWrapElement, strInnerElement) { var lst = [ '<?xml version="1.0" encoding="utf-8"?>', '<' + strWrapElement + ' xmlns:xi="http://www.w3.org/2003/XInclude">' ], strXML; function fileEntry(strPath, strElement) { var lstParts = strPath.split('/'), strFile = encodeURI(lstParts.pop()); return [ '\t<' + strElement + ' text="" path="' + encodeURI(lstParts.join( '/')) + '/" file="' + strFile + '">', '\t\t<xi:include href="' + encodeURI('file://' + strPath) + '"/>', '\t</' + strElement + '>' ].join('\n'); } i = lstFilePaths.length; while (i--) { lst.push(fileEntry(lstFilePaths[i], strInnerElement)); } strXML = lst.join('\n') + '\n</' + strWrapElement + '>'; //console.log(strXML); return strXML; } /////// MAIN //////////////////////////////////////////////////////////////////////////////////// var rgxFileURL = /\((file.*)\)$/, varChoice = true, oMatch, docXML, lstMenu, lst, lstFiles, strURL, strMenuKey, strTitle, strXML, strTXT, strPATH, lng, i, blnWritten; // PREPARE FOR USE OF DIALOGS var app = Application.currentApplication(); app.includeStandardAdditions = true; app.activate(); // CHOOSE THE FOLDER CONTAINING THE FOUR DEMO .OPML FILES (TAGGED WITH VARIOUS ATTRIBUTE VALUES) var strFolderPath = app.chooseFolder({ withPrompt: "CHOOSE FOLDER CONTAINING SAMPLE " + strExtnUpper + " FILES" }).toString(); // SHOW A MENU OF PERSPECTIVES while (varChoice) { lstMenu = Object.keys(dctXQuery); varChoice = lstMenu.length ? app.chooseFromList(lstMenu, { withTitle: "xQuery across several files", withPrompt: "Select Perspective:", defaultItems: [lstMenu[0]] }) : false; // USE THE MENU NAME AS THE REPORT TITLE strMenuKey = varChoice[0]; // REFERENCE EACH FILE IN AN XINCLUDE DOCUMENT lstFiles = filesInFolderWithExtn(strFolderPath, strExtn); if (lstFiles.length) { strXML = xIncludeXML( filesInFolderWithExtn(strFolderPath, strExtn), 'body', 'outline' ); } else { app.displayDialog("No " + strExtnUpper + " files found in " + strFolderPath); return; } // READ THE XINCLUSIONS INTO A COMPOSITE XML FILE docXML = $.NSXMLDocument.alloc.initWithXMLStringOptionsError( strXML, $.NSXMLDocumentXInclude, null ); // THEN APPLY THE QUERY ... lst = ObjC.unwrap(docXML.objectsForXQueryError( dctXQuery[strMenuKey], null )); // debug return lst for quick harvest check // return lst; // AND HARVEST ANY RESULT if (!lst) return; i = lst.length; if (i) { while (i--) lst[i] = ObjC.unwrap(lst[i]); if (blnOpenPerspectiveInMarked) { // WRITE OUT PERSPECTIVE AS TEXT FILE strTXT = $.NSString.alloc.initWithUTF8String( '## <font color=gray>' + strMenuKey + '</font>\n\n' + lst.join('\n') ); strPATH = $.NSString.alloc.initWithUTF8String( strTestFile ); strPATH = ObjC.unwrap(strPATH.stringByExpandingTildeInPath); blnWritten = strTXT.writeToFileAtomically(strPATH, true); // AND OPEN IT IN [MARKED 2](http://marked2app.com) if (blnWritten) { app.doShellScript( 'open -a "Marked 2" ' + strPATH ); } } else { varChoice = app.chooseFromList(lst, { withTitle: strMenuKey, withPrompt: "Select from actions matching [" + strMenuKey + "]:", defaultItems: lst[0], multipleSelectionsAllowed: true }); // OPEN THE OPML FILE(S) FOR THE CHOSEN ACTION(S) IN THE DEFAULT OPML EDITOR ? if (blnOpenSelected) { if (varChoice) { i = varChoice.length; while (i--) { oMatch = rgxFileURL.exec(varChoice[i]); if (oMatch) { app.doShellScript('open ' + oMatch[1]); } } break; } } } } else { app.displayAlert( "No matches for " + strMenuKey + " found in " + strFolderPath + " .opml files" ); } } return true; }
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-strops.adb
orb-zhuchen/Orb
0
29117
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- S Y S T E M . S T R I N G _ O P S -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2019, 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. -- -- -- ------------------------------------------------------------------------------ -- NOTE: This package is obsolescent. It is no longer used by the compiler -- which now generates concatenation inline. It is retained only because -- it may be used during bootstrapping using old versions of the compiler. pragma Compiler_Unit_Warning; package body System.String_Ops is ---------------- -- Str_Concat -- ---------------- function Str_Concat (X, Y : String) return String is begin if X'Length = 0 then return Y; else declare L : constant Natural := X'Length + Y'Length; R : String (X'First .. X'First + L - 1); begin R (X'Range) := X; R (X'First + X'Length .. R'Last) := Y; return R; end; end if; end Str_Concat; ------------------- -- Str_Concat_CC -- ------------------- function Str_Concat_CC (X, Y : Character) return String is R : String (1 .. 2); begin R (1) := X; R (2) := Y; return R; end Str_Concat_CC; ------------------- -- Str_Concat_CS -- ------------------- function Str_Concat_CS (X : Character; Y : String) return String is R : String (1 .. Y'Length + 1); begin R (1) := X; R (2 .. R'Last) := Y; return R; end Str_Concat_CS; ------------------- -- Str_Concat_SC -- ------------------- function Str_Concat_SC (X : String; Y : Character) return String is begin if X'Length = 0 then return (1 => Y); else declare R : String (X'First .. X'Last + 1); begin R (X'Range) := X; R (R'Last) := Y; return R; end; end if; end Str_Concat_SC; end System.String_Ops;
ffight/lcs/boss/88.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
6
84712
<filename>ffight/lcs/boss/88.asm copyright zengfr site:http://github.com/zengfr/romhack 03D5BE move.b #$f0, ($89,A6) [boss+88] copyright zengfr site:http://github.com/zengfr/romhack
grep/src/main/resources/runDFA-debug.asm
factcenter/inchworm-examples
0
80875
<filename>grep/src/main/resources/runDFA-debug.asm // // Run a DFA. We use only 7 LSB bits of the inputs, and limit to at most 63 states. // .header wordsize: 16 // We actually only need 8-bit regs, but we'll pack 2 in each word. regptrsize: 5 // Don't need many regs romptrsize: 1 // Tiny program (actually only 1 instruction) ramptrsize: 13 // 4096 words (we use 64 words for each state, so this lets us have 64 states) instruction: xor out in rol rol and xor load mux rol and .const MAX_STATES = 64 WORDSIZE = 16 STATE = state .data czero: %r[0] = 0 // constant 0 cone: 1 csix: 6 ceight: 8 rightshift1: (WORDSIZE - 1) statemask: (MAX_STATES - 1) tmp1: 0 tmp2: 0 state: %r[freeregs - 1] db 0 // Start with state 0. (only the 6 LSBs matter) %r[ctrl] = 1 // The transition table is stored packed in RAM; // to find the next state when starting at state i and receiving input x: // read the word (two bytes) at pos 64*i+x/2; the next state is the MSB if x%2=1 and the LSB if x%2=0 .code // Output state (for debugging) xor %out2 < %state, %czero out in // Input from user to %in // Compute tmp1 = 64*state+[in]/2 rol %tmp1 < %state, %csix // tmp1 = ROL(state, 6) == state << 6 (we only use the 6 LSBs, so the 6 MSBs are always 0) rol %tmp2 < %in, %rightshift1 // tmp2 = ROR(in, 1) and %tmp2 < %tmp2, %statemask // tmp2 &= statemask xor %tmp1 < %tmp1, %tmp2 // tmp1 += tmp2; (tmp1 == now) load %tmp1 < %tmp1 // tmp1 = RAM[tmp1] mux %tmp2 < %in, %czero, %ceight // tmp2 = x & 1 == 0 ? 0 : 8 rol %tmp1 < %tmp1, %tmp2 // tmp1 = ROL(tmp1, tmp2) [this swaps bytes if in%2 == 1 and %state < %tmp1, %statemask // state = tmp1 & 0x3f // We actually don't need the next command here -- there's only one instruction! ---
data/pokemon/base_stats/sentret.asm
AtmaBuster/pokeplat-gen2
6
246769
db 0 ; species ID placeholder db 35, 46, 34, 20, 35, 45 ; hp atk def spd sat sdf db NORMAL, NORMAL ; type db 255 ; catch rate db 57 ; base exp db NO_ITEM, BERRY ; items db GENDER_F50 ; gender ratio db 15 ; step cycles to hatch INCBIN "gfx/pokemon/sentret/front.dimensions" db GROWTH_MEDIUM_FAST ; growth rate dn EGG_GROUND, EGG_GROUND ; egg groups db 70 ; happiness ; tm/hm learnset tmhm FOCUS_PUNCH, WATER_PULSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, ICE_BEAM, PROTECT, RAIN_DANCE, FRUSTRATION, SOLARBEAM, IRON_TAIL, THUNDERBOLT, RETURN, DIG, SHADOW_BALL, BRICK_BREAK, DOUBLE_TEAM, SHOCK_WAVE, FLAMETHROWER, FACADE, SECRET_POWER, REST, ATTRACT, THIEF, FLING, CHARGE_BEAM, ENDURE, SHADOW_CLAW, CAPTIVATE, SLEEP_TALK, NATURAL_GIFT, GRASS_KNOT, SWAGGER, U_TURN, SUBSTITUTE, CUT, SURF, AQUA_TAIL, FIRE_PUNCH, FURY_CUTTER, HELPING_HAND, ICE_PUNCH, KNOCK_OFF, LAST_RESORT, MUD_SLAP, ROLLOUT, SNORE, SUCKER_PUNCH, SWIFT, THUNDERPUNCH, UPROAR ; end
oeis/304/A304831.asm
neoneye/loda-programs
11
9249
<gh_stars>10-100 ; A304831: a(n) = 123*2^n - 135. ; 111,357,849,1833,3801,7737,15609,31353,62841,125817,251769,503673,1007481,2015097,4030329,8060793,16121721,32243577,64487289,128974713,257949561,515899257,1031798649,2063597433,4127195001,8254390137,16508780409,33017560953,66035122041,132070244217,264140488569,528280977273,1056561954681,2113123909497,4226247819129,8452495638393,16904991276921,33809982553977,67619965108089,135239930216313,270479860432761,540959720865657,1081919441731449,2163838883463033,4327677766926201,8655355533852537 mov $1,2 pow $1,$0 sub $1,1 mul $1,246 add $1,111 mov $0,$1
registrar-protected_map.adb
annexi-strayline/AURA
13
15997
<filename>registrar-protected_map.adb ------------------------------------------------------------------------------ -- -- -- Ada User Repository Annex (AURA) -- -- ANNEXI-STRAYLINE Reference Implementation -- -- -- -- Core -- -- -- -- ------------------------------------------------------------------------ -- -- -- -- Copyright (C) 2020, ANNEXI-STRAYLINE Trans-Human Ltd. -- -- All rights reserved. -- -- -- -- Original Contributors: -- -- * <NAME> (ANNEXI-STRAYLINE) -- -- -- -- 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 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 -- -- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ package body Registrar.Protected_Map is ---------------------- -- Protected_Master -- ---------------------- protected Protected_Master is ------------- -- Queries -- ------------- function Contains_Element (Key: Key_Type) return Boolean; function Extract_Element (Key: Key_Type) return Element_Type; ------------------- -- Modifications -- ------------------- procedure Insert (Key : in Key_Type; New_Item: in Element_Type; Position: out Maps.Cursor; Inserted: out Boolean); procedure Modify (Key : in Key_Type; Process: not null access procedure (Item: in out Element_Type)); procedure Insert_Or_Modify (Key : in Key_Type; New_Item : in Element_Type; Process_Existing: not null access procedure (Item: in out Element_Type)); private Master: aliased Maps.Map; end Protected_Master; ---------------------------------------------------------------------------- protected body Protected_Master is ---------------------- -- Contains_Element -- ---------------------- function Contains_Element (Key: Key_Type) return Boolean is (Master.Contains (Key)); --------------------- -- Extract_Element -- --------------------- function Extract_Element (Key: Key_Type) return Element_Type is begin return Master(Master.Find (Key)); end Extract_Element; ------------ -- Insert -- ------------ procedure Insert (Key : in Key_Type; New_Item: in Element_Type; Position: out Maps.Cursor; Inserted: out Boolean) is begin Master.Insert (Key => Key, New_Item => New_Item, Position => Position, Inserted => Inserted); end Insert; ------------ -- Modify -- ------------ procedure Modify (Key : in Key_Type; Process: not null access procedure (Item: in out Element_Type)) is I: constant Maps.Cursor := Master.Find (Key); procedure Process_Without_Key (Key : in Key_Type; Element: in out Element_Type) is begin Process (Element); end Process_Without_Key; begin Master.Update_Element (Position => I, Process => Process_Without_Key'Access); end Modify; ---------------------- -- Insert_Or_Modify -- ---------------------- procedure Insert_Or_Modify (Key : in Key_Type; New_Item : in Element_Type; Process_Existing: not null access procedure (Item: in out Element_Type)) is Position: Maps.Cursor; Inserted: Boolean; begin Insert (Key => Key, New_Item => New_Item, Position => Position, Inserted => Inserted); if not Inserted then Process_Existing (Master (Position)); end if; end Insert_Or_Modify; end Protected_Master; ---------------------- -- Contains_Element -- ---------------------- function Contains_Element (Key: Key_Type) return Boolean is (Protected_Master.Contains_Element (Key)); --------------------- -- Extract_Element -- --------------------- function Extract_Element (Key: Key_Type) return Element_Type is (Protected_Master.Extract_Element (Key)); ------------ -- Insert -- ------------ procedure Insert (Key : in Key_Type; New_Item: in Element_Type; Inserted: out Boolean) is Dont_Care: Maps.Cursor; begin Protected_Master.Insert (Key => Key, New_Item => New_Item, Position => Dont_Care, Inserted => Inserted); end Insert; ------------ -- Modify -- ------------ procedure Modify (Key : in Key_Type; Process: not null access procedure (Item: in out Element_Type)) is begin Protected_Master.Modify (Key => Key, Process => Process); end Modify; ---------------------- -- Insert_Or_Modify -- ---------------------- procedure Insert_Or_Modify (Key : in Key_Type; New_Item : in Element_Type; Process_Existing: not null access procedure (Item: in out Element_Type)) is begin Protected_Master.Insert_Or_Modify (Key => Key, New_Item => New_Item, Process_Existing => Process_Existing); end Insert_Or_Modify; end Registrar.Protected_Map;
libsrc/_DEVELOPMENT/arch/ts2068/misc/c/sccz80/tshc_scroll_up.asm
Frodevan/z88dk
640
161368
; void tshc_scroll_up(uchar prows, uchar attr) SECTION code_clib SECTION code_arch PUBLIC tshc_scroll_up EXTERN asm0_tshc_scroll_up tshc_scroll_up: pop af pop hl pop de push de push hl push af jp asm0_tshc_scroll_up ; SDCC bridge for Classic IF __CLASSIC PUBLIC _tshc_scroll_up defc _tshc_scroll_up = tshc_scroll_up ENDIF
programs/oeis/074/A074941.asm
neoneye/loda
22
171847
<reponame>neoneye/loda ; A074941: a(n) = sigma(n) mod 3. ; 1,0,1,1,0,0,2,0,1,0,0,1,2,0,0,1,0,0,2,0,2,0,0,0,1,0,1,2,0,0,2,0,0,0,0,1,2,0,2,0,0,0,2,0,0,0,0,1,0,0,0,2,0,0,0,0,2,0,0,0,2,0,2,1,0,0,2,0,0,0,0,0,2,0,1,2,0,0,2,0,1,0,0,2,0,0,0,0,0,0,1,0,2,0,0,0,2,0,0,1 seq $0,203 ; a(n) = sigma(n), the sum of the divisors of n. Also called sigma_1(n). mod $0,3
libsrc/target/zx/stdio/__zx_scrollup.asm
ahjelm/z88dk
640
101730
<reponame>ahjelm/z88dk ; Scroll Spectrum/TS2068 up ; ; Relies on ROM routines to perform the scroll ; ; Toggle on __zx_screenmode to determine whether to scroll ; the second display ; MODULE __zx_scrollup SECTION code_driver PUBLIC __zx_scrollup EXTERN call_rom3 EXTERN __zx_screenmode EXTERN __zx_console_attr EXTERN zx_rowtab EXTERN generic_console_zxn_tile_scrollup IF FORsam defc NOROMCALLS = 1 EXTERN SCREEN_BASE EXTERN __sam_graphics_pagein EXTERN __sam_graphics_pageout ENDIF __zx_scrollup: IF FORzxn ld a,(__zx_screenmode) bit 6,a jp nz,generic_console_zxn_tile_scrollup ENDIF push de push bc IF NOROMCALLS ; TODO: Do this better without the big table ; Code to be used when the original ROM is missing or not available IF FORsam call __sam_graphics_pagein ENDIF push ix ld ix,zx_rowtab ld a,8 .outer_loop push af push ix ld a,23 .inner_loop ex af,af ld l,(ix+16) IF FORsam ld a,(ix+17) sub 64 -(SCREEN_BASE / 256) ld h,a ELSE ld h,(ix+17) ENDIF ld e,(ix+0) IF FORsam ld a,(ix+1) sub 64 -(SCREEN_BASE / 256) ld d,a ELSE ld d,(ix+1) ENDIF ld bc,32 ldir ld bc,16 add ix,bc ex af,af dec a jr nz,inner_loop pop ix pop af inc ix inc ix dec a jr nz,outer_loop ; clear ld ix,zx_rowtab + (192 - 8) * 2 ld a,8 .clear_loop ex af,af ld e,(ix+0) IF FORsam ld a,(ix+1) sub 64 -(SCREEN_BASE / 256) ld d,a ELSE ld d,(ix+1) ENDIF ld h,d ld l,e ld (hl),0 inc de ld bc,31 ldir inc ix inc ix ex af,af dec a jr nz,clear_loop IF FORsam ld hl,SCREEN_BASE + 6144 + 32 ld de,SCREEN_BASE + 6144 ELSE ld hl,22528 + 32 ld de,22528 ENDIF ld bc,768-32 ldir ex de,hl ld d,h ld e,l inc de ld a,(__zx_console_attr) ld (hl),a ld bc,31 ldir pop ix IF FORsam call __sam_graphics_pageout ENDIF pop bc pop de ret ELSE IF FORts2068 | FORzxn ld a,(__zx_screenmode) cp 6 ;Hires jr z,hrgscroll cp 2 ;High colour jr z,hrgscroll cp 1 ;Screen 1 jr z,hrgscroll ENDIF ld a,($dff) cp $17 jr nz,ts2068_rom call call_rom3 defw 3582 ;scrollup pop bc pop de ret .ts2068_rom call call_rom3 defw $939 ; TS2068 scrollup pop bc pop de ret ENDIF IF FORts2068 | FORzxn .hrgscroll push ix ld ix,zx_rowtab ld a,8 .outer_loophr push af push ix ld a,(__zx_screenmode) ld b,23 .inner_loophr push bc ld e,(ix+16) ld d,(ix+17) ex de,hl ld e,(ix+0) ld d,(ix+1) cp 1 jr z,just_screen_1 push de push hl ld bc,32 ldir pop hl pop de just_screen_1: set 5,d set 5,h ld bc,32 ldir ld bc,16 add ix,bc pop bc djnz inner_loophr pop ix pop af inc ix inc ix dec a jr nz,outer_loophr ; clear ld ix,zx_rowtab + (192 - 8) * 2 ld a,(__zx_screenmode) ld b,8 .clear_loophr push bc push ix ld e,(ix+0) ld d,(ix+1) ld h,d ld l,e inc de push de push hl cp 1 jr z,clear_screen1_only ld (hl),0 ld bc,31 ldir ; second display clear_screen1_only: pop hl pop de set 5,d set 5,h cp 4 ex af,af ld a,(__zx_console_attr) ld c,a ex af,af jr z,clear_hires2 ld c,0 clear_hires2: ld (hl),c ld bc,31 ldir pop ix inc ix inc ix pop bc djnz clear_loophr pop ix pop bc pop de ret ENDIF
sfx_engine/note_values.asm
GSoftwareDevelopment/sfx-tracker
9
22532
<gh_stars>1-10 ; pure tones from RMT :P note_tuneTab_pure ; c c# d d# e f f# g g# a a# b dta $F3,$E6,$D9,$CC,$C1,$B5,$AD,$A2,$99,$90,$88 dta $80,$79,$72,$6C,$66,$60,$5B,$55,$51,$4C,$48 dta $44,$40,$3C,$39,$35,$32,$2F,$2D,$2A,$28,$25 dta $23,$21,$1F,$1D,$1C,$1A,$18,$17,$16,$14,$13 dta $12,$11,$10,$0F,$0E,$0D,$0C,$0B,$0A,$09,$08 dta $07,$06,$05,$04,$03,$02,$01,$00,$00 note_tuneTab_bass1 dta $BF,$B6,$AA,$A1,$98,$8F,$89,$80,$F2,$E6,$DA dta $CE,$BF,$B6,$AA,$A1,$98,$8F,$89,$80,$7A,$71 dta $6B,$65,$5F,$5C,$56,$50,$4D,$47,$44,$3E,$3C dta $38,$35,$32,$2F,$2D,$2A,$28,$25,$23,$21,$1F dta $1D,$1C,$1A,$18,$17,$16,$14,$13,$12,$11,$10 dta $0F,$0E,$0D,$0C,$0B,$0A,$09,$08,$07 note_tuneTab_bass2 dta $FF,$F1,$E4,$D8,$CA,$C0,$B5,$AB,$A2,$99,$8E dta $87,$7F,$79,$73,$70,$66,$61,$5A,$55,$52,$4B dta $48,$43,$3F,$3C,$39,$37,$33,$30,$2D,$2A,$28 dta $25,$24,$21,$1F,$1E,$1C,$1B,$19,$17,$16,$15 dta $13,$12,$11,$10,$0F,$0E,$0D,$0C,$0B,$0A,$09 dta $08,$07,$06,$05,$04,$03,$02,$01,$00 note_tuneTab_user dta $07,$07,$07,$07,$07,$07,$07,$07,$07,$07,$07 dta $07,$07,$07,$07,$07,$07,$07,$07,$07,$07,$07 dta $07,$07,$07,$07,$07,$07,$07,$07,$07,$07,$07 dta $07,$07,$07,$07,$07,$07,$07,$07,$07,$07,$07 dta $07,$07,$07,$07,$07,$07,$07,$07,$07,$07,$07 dta $07,$07,$07,$07,$07,$07,$07,$07,$07
bootloader/psboot.asm
ps64project/kernel-legacy
2
241052
<filename>bootloader/psboot.asm<gh_stars>1-10 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Filename : psldr.asm ; ; Author : P.Knowledge, 2016- ; ; Data since : 20171208 15:43, KST ; ; Purpose : PS64 16-bit Realmode Bootloader ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [ORG 0x00] [BITS 16] SECTION .text jmp 0x07C0:BEGIN ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Environment Values ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; KERNEL32SECTORS : dw 3 TOTALSECTORCOUNT: dw 15 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Bootloader Procedure ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; BEGIN: mov ah, 2 mov bh, 1 mov dh, 1 mov dl, 8 int 10h ; initialize data segment register with bootloader begin address mov ax, 0x07C0 mov ds, ax mov ax, 0xB800 mov es, ax ; create 64Kilobytes stack mov ax, 0x0000 mov ss, ax mov sp, 0xFFFE mov bp, 0xFFFE INITSI: mov si, 0 CLEARSCR: mov BYTE[es:si], 0 add si, 2 cmp si, 80 * 25 * 2 jl CLEARSCR LOADOSIMG: mov ax, 0 ; Drive # mov dl, 0 int 0x13 jc DISKERR ; PS64 starts from 0x1000 mov si, 0x1000 mov es, si mov bx, 0x0000 mov di, word[TOTALSECTORCOUNT] READ: cmp di, 0 je LOAD sub di, 0x1 ; BIOS service 2, read 1 sector mov ah, 0x02 mov al, 0x1 mov ch, byte[TRACKNO] mov cl, byte[SECTORNO] mov dh, byte[HEADNO] mov dl, 0x00 int 0x13 jc DISKERR2 add si, 0x0020 mov es, si mov al, byte[SECTORNO] add al, 0x01 mov byte[SECTORNO], al cmp al, 19 jl READ xor byte[HEADNO], 0x01 mov byte[SECTORNO], 0x01 cmp byte[HEADNO], 0x00 jne READ add byte[TRACKNO], 0x01 jmp READ LOAD: ; Start PS64 Protected Mode Kernel jmp 0x1000:0x0000 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Functions ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; DISKERR() ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; DISKERR: push 0x0C push DISKERRMSG push 1 push 1 call PRINTSTR jmp $ DISKERR2: push 0x0C push DISKREADERR push 0 push 0 call PRINTSTR jmp $ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; PRINTSTR(color, msg, xpos, ypos) ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; PRINTSTR: push bp mov bp, sp push es push si push di push ax push cx push dx mov ax, 0xB800 mov es, ax mov ax, word[bp + 4] ; ypos mov si, 160 mul si mov di, ax mov ax, word[bp + 6] ; xpos mov si, 2 mul si add di, ax mov si, word[bp + 8] ; msg mov al, byte[bp + 10] ; color MSGLOOP: mov cl, byte[si] cmp cl, 0 je CLEAR cmp cl, 0x10 je LINEFEED mov byte[es:di], cl mov byte[es:di+1], al add si, 1 add di, 2 jmp MSGLOOP LINEFEED: add si, 1 add di, 160 jmp MSGLOOP CLEAR: pop dx pop cx pop ax pop di pop si pop es pop bp ret ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Data ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; DISKERRMSG: db 'DISK INIT ERROR!', 0 DISKREADERR:db 'DISK READ EEROR!', 0 SECTORNO: db 0x02 HEADNO: db 0x00 TRACKNO: db 0x00 NOTATION: times 510 - ( $ - $$ ) db 0xFF dw 0xAA55
cwiczenia1/hello_c.asm
adamczykpiotr/AGH_WIMiIP_Architektury_Komputerow
1
166119
<filename>cwiczenia1/hello_c.asm extern printf section .data text db "Hello World!",10,0 section .text global main main: xor rax, rax mov rdi, text call printf mov rax, 1 mov rbx, 0 int 80h
src/search-filters-stemmers.adb
stcarrez/ada-search
9
14109
<filename>src/search-filters-stemmers.adb ----------------------------------------------------------------------- -- search-filters-stemmers -- Filter to stem words -- Copyright (C) 2020 <NAME> -- Written by <NAME> (<EMAIL>) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package body Search.Filters.Stemmers is overriding procedure Push_Token (Filter : in out Filter_Type; Token : in String; Consumer : not null access procedure (Token : in String)) is Result : Boolean; begin Filter.Context.Stem_Word (Token, Result); if not Result then Search.Filters.Filter_Type (Filter).Push_Token (Token, Consumer); else Search.Filters.Filter_Type (Filter).Push_Token (Filter.Context.Get_Result, Consumer); end if; end Push_Token; end Search.Filters.Stemmers;
part1/induction/Bin-laws.agda
akiomik/plfa-solutions
1
10886
<gh_stars>1-10 module Bin-laws where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; sym; cong) open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; step-≡; _∎) open import Data.Nat using (ℕ; zero; suc; _+_; _*_) open import Induction′ using (+-suc; +-identityʳ; +-comm; +-assoc) -- 2進数の表現 data Bin : Set where ⟨⟩ : Bin _O : Bin → Bin _I : Bin → Bin -- 2進数のインクリメント inc : Bin → Bin inc ⟨⟩ = ⟨⟩ I inc (b O) = b I inc (b I) = inc b O -- 自然数から2進数への変換 to : ℕ → Bin to zero = ⟨⟩ O to (suc n) = inc (to n) -- 2進数から自然数への変換 from : Bin → ℕ from ⟨⟩ = zero from (b O) = 2 * (from b) from (b I) = 2 * (from b) + 1 2*n≡n+n : ∀ (n : ℕ) → 2 * n ≡ n + n 2*n≡n+n n = begin 2 * n ≡⟨⟩ n + (1 * n) ≡⟨⟩ n + (n + (0 * n)) ≡⟨⟩ n + (n + 0) ≡⟨ cong (n +_) (+-identityʳ n) ⟩ n + n ∎ +-suc-suc : ∀ (m n : ℕ) → (suc m) + (suc n) ≡ suc (suc (m + n)) +-suc-suc m n = begin (suc m) + (suc n) ≡⟨ +-suc (suc m) n ⟩ suc ((suc m) + n) ≡⟨ cong suc (sym (+-assoc 1 m n)) ⟩ suc (suc (m + n)) ∎ -- 変換の前後どちらでインクリメントしても結果は等しい from∘inc≡suc∘from : ∀ (b : Bin) → from (inc b) ≡ suc (from b) from∘inc≡suc∘from ⟨⟩ = begin from (inc ⟨⟩) ≡⟨⟩ from (⟨⟩ I) ≡⟨⟩ suc zero ≡⟨⟩ suc (from ⟨⟩) ∎ from∘inc≡suc∘from (b O) = begin from (inc (b O)) ≡⟨⟩ from (b I) ≡⟨⟩ 2 * (from b) + 1 ≡⟨⟩ from (b O) + 1 ≡⟨ +-suc (from (b O)) zero ⟩ suc (from (b O) + zero) ≡⟨ cong suc (+-identityʳ (from (b O))) ⟩ suc (from (b O)) ∎ from∘inc≡suc∘from (b I) = begin from (inc (b I)) ≡⟨⟩ from ((inc b) O) ≡⟨⟩ 2 * (from (inc b)) ≡⟨ cong (2 *_) (from∘inc≡suc∘from b) ⟩ 2 * (suc (from b)) ≡⟨ 2*n≡n+n (suc (from b)) ⟩ (suc (from b)) + (suc (from b)) ≡⟨ +-suc-suc (from b) (from b) ⟩ suc (suc ((from b) + (from b))) ≡⟨ cong (λ 2*fromb → suc (suc 2*fromb)) (sym (2*n≡n+n (from b))) ⟩ suc (suc (2 * (from b))) ≡⟨ cong suc (+-comm 1 (2 * (from b))) ⟩ suc (2 * (from b) + 1) ≡⟨⟩ suc (from (b I)) ∎ -- to∘from : ∀ (b : Bin) → to (from b) ≡ b -- to∘from ⟨⟩ = {!!} -- (to zero) が (⟨⟩ O) にエンコードされるため成り立たない -- to∘from (b O) = {!!} -- to∘from (b I) = {!!} from∘to : ∀ (n : ℕ) → from (to n) ≡ n from∘to zero = begin from (to zero) ≡⟨⟩ from (⟨⟩ O) ≡⟨⟩ 2 * (from ⟨⟩) ≡⟨⟩ 2 * zero ≡⟨⟩ zero ∎ from∘to (suc n) = begin from (to (suc n)) ≡⟨⟩ from (inc (to n)) ≡⟨ from∘inc≡suc∘from (to n) ⟩ suc (from (to n)) ≡⟨ cong suc (from∘to n) ⟩ suc n ∎
agda/hott/types.agda
piyush-kurur/hott
0
2119
{-# OPTIONS --without-K #-} module hott.types where open import hott.types.nat public open import hott.types.coproduct public
programs/oeis/047/A047471.asm
karttu/loda
1
93090
; A047471: Numbers that are congruent to {1, 3} mod 8. ; 1,3,9,11,17,19,25,27,33,35,41,43,49,51,57,59,65,67,73,75,81,83,89,91,97,99,105,107,113,115,121,123,129,131,137,139,145,147,153,155,161,163,169,171,177,179,185,187,193,195,201,203,209,211,217,219,225,227,233,235,241,243,249,251,257,259,265,267,273,275,281,283,289,291,297,299,305,307,313,315,321,323,329,331,337,339,345,347,353,355,361,363,369,371,377,379,385,387,393,395,401,403,409,411,417,419,425,427,433,435,441,443,449,451,457,459,465,467,473,475,481,483,489,491,497,499,505,507,513,515,521,523,529,531,537,539,545,547,553,555,561,563,569,571,577,579,585,587,593,595,601,603,609,611,617,619,625,627,633,635,641,643,649,651,657,659,665,667,673,675,681,683,689,691,697,699,705,707,713,715,721,723,729,731,737,739,745,747,753,755,761,763,769,771,777,779,785,787,793,795,801,803,809,811,817,819,825,827,833,835,841,843,849,851,857,859,865,867,873,875,881,883,889,891,897,899,905,907,913,915,921,923,929,931,937,939,945,947,953,955,961,963,969,971,977,979,985,987,993,995 mov $1,$0 mod $0,2 mul $1,2 sub $1,$0 mul $1,2 add $1,1
orka/src/orka/implementation/orka-rendering-textures.adb
onox/orka
52
11344
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2017 onox <<EMAIL>> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. with GL.Low_Level.Enums; with GL.Pixels; with GL.Types; with Orka.Strings; package body Orka.Rendering.Textures is procedure Bind (Object : GL.Objects.Textures.Texture_Base'Class; Target : Indexed_Texture_Target; Index : Natural) is begin case Target is when Texture => Object.Bind_Texture_Unit (GL.Types.UInt (Index)); when Image => Object.Bind_Image_Texture (GL.Types.UInt (Index)); end case; end Bind; function Bayer_Dithering_Pattern return GL.Objects.Samplers.Sampler is use all type GL.Objects.Textures.Minifying_Function; use all type GL.Objects.Textures.Wrapping_Mode; begin return Result : GL.Objects.Samplers.Sampler do Result.Set_X_Wrapping (Repeat); Result.Set_Y_Wrapping (Repeat); Result.Set_Minifying_Filter (Nearest); Result.Set_Magnifying_Filter (Nearest); end return; end Bayer_Dithering_Pattern; function Bayer_Dithering_Pattern return GL.Objects.Textures.Texture is Pixels : aliased constant GL.Types.UByte_Array := (0, 32, 8, 40, 2, 34, 10, 42, 48, 16, 56, 24, 50, 18, 58, 26, 12, 44, 4, 36, 14, 46, 6, 38, 60, 28, 52, 20, 62, 30, 54, 22, 3, 35, 11, 43, 1, 33, 9, 41, 51, 19, 59, 27, 49, 17, 57, 25, 15, 47, 7, 39, 13, 45, 5, 37, 63, 31, 55, 23, 61, 29, 53, 21); -- * <NAME>. (1973). An optimum method for two-level rendition of -- continuous-tone pictures. In IEEE Int. Conf. on Communications -- (Vol. 26, pp. 11-15). -- * http://www.anisopteragames.com/how-to-fix-color-banding-with-dithering/ begin return Result : GL.Objects.Textures.Texture (GL.Low_Level.Enums.Texture_2D) do Result.Allocate_Storage (1, 1, GL.Pixels.R8, Width => 8, Height => 8, Depth => 1); Result.Load_From_Data (Level => 0, Width => 8, Height => 8, Depth => 1, Source_Format => GL.Pixels.Red, Source_Type => GL.Pixels.Unsigned_Byte, Source => Pixels'Address); end return; end Bayer_Dithering_Pattern; function Image (Texture : GL.Objects.Textures.Texture; Level : GL.Objects.Textures.Mipmap_Level := 0) return String is Width : constant String := Orka.Strings.Trim (Texture.Width (Level)'Image); Height : constant String := Orka.Strings.Trim (Texture.Height (Level)'Image); Depth : constant String := Orka.Strings.Trim (Texture.Depth (Level)'Image); begin return (if Texture.Allocated then "" else "unallocated ") & Width & " × " & Height & " × " & Depth & " " & Texture.Kind'Image & " with " & (if Texture.Compressed then Texture.Compressed_Format'Image else Texture.Internal_Format'Image) & " format"; end Image; end Orka.Rendering.Textures;
Micro/Tests/andi/andi.asm
JavierOramas/CP_AC
0
101936
addi r3 r0 -1 andi r4 r3 65 tty r4 halt # prints A
Univalence/Obsolete/T.agda
JacquesCarette/pi-dual
14
549
{-# OPTIONS --without-K #-} module T where open import Level open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym; trans; cong; subst; module ≡-Reasoning) open import Data.Nat using (ℕ; _+_) open import Data.Fin using (Fin) data Exp : Set where ONE : Exp PLUS : Exp → Exp → Exp val : Exp → ℕ val ONE = 1 val (PLUS e₁ e₂) = val e₁ + val e₂ data eqExp : Exp → Exp → Set where idExp : {e : Exp} → eqExp e e transExp : {e₁ e₂ e₃ : Exp} → (eqExp e₁ e₂) → (eqExp e₂ e₃) → (eqExp e₁ e₃) val≡ : {e₁ e₂ : Exp} → (eqExp e₁ e₂) → (val e₁ ≡ val e₂) val≡ idExp = refl val≡ (transExp α₁ α₂) = trans (val≡ α₁) (val≡ α₂) trans-assoc : {A : Set} {x y z w : A} → (p : x ≡ y) (q : y ≡ z) (r : z ≡ w) → trans (trans p q) r ≡ trans p (trans q r) trans-assoc refl refl refl = refl subst-trans : (P : ℕ → Set) (p : (n : ℕ) → P n) {e₁ e₂ e₃ : Exp} → (α : eqExp e₁ e₂) (β : eqExp e₂ e₃) (v : P (val e₁)) → subst P (trans (val≡ α) (val≡ β)) v ≡ subst P (val≡ β) (subst P (val≡ α) v) subst-trans P p idExp β v = refl subst-trans P p (transExp α₁ α₂) β v = begin (subst P (trans (trans (val≡ α₁) (val≡ α₂)) (val≡ β)) v ≡⟨ cong (λ x → subst P x v) (trans-assoc (val≡ α₁) (val≡ α₂) (val≡ β)) ⟩ subst P (trans (val≡ α₁) (trans (val≡ α₂) (val≡ β))) v ≡⟨ refl ⟩ subst P (trans (val≡ α₁) (val≡ (transExp α₂ β))) v ≡⟨ subst-trans P p α₁ (transExp α₂ β) v ⟩ subst P (val≡ (transExp α₂ β)) (subst P (val≡ α₁) v) ≡⟨ refl ⟩ subst P (trans (val≡ α₂) (val≡ β)) (subst P (val≡ α₁) v) ≡⟨ subst-trans P p α₂ β (subst P (val≡ α₁) v) ⟩ subst P (val≡ β) (subst P (val≡ α₂) (subst P (val≡ α₁) v)) ≡⟨ cong (λ x → subst P (val≡ β) x) (sym (subst-trans P p α₁ α₂ v)) ⟩ subst P (val≡ β) (subst P (trans (val≡ α₁) (val≡ α₂)) v) ≡⟨ refl ⟩ subst P (val≡ β) (subst P (val≡ (transExp α₁ α₂)) v) ∎) where open ≡-Reasoning pr : {P : ℕ → Set} {p : (n : ℕ) → P n} {e₁ e₂ : Exp} {α : eqExp e₁ e₂} → subst P (val≡ α) (p (val e₁)) ≡ p (val e₂) pr {P} {p} {e} {.e} {idExp} = refl pr {P} {p} {e₁} {e₃} {transExp {e₂ = e₂} α β} = begin (subst P (val≡ (transExp α β)) (p (val e₁)) ≡⟨ refl ⟩ subst P (trans (val≡ α) (val≡ β)) (p (val e₁)) ≡⟨ subst-trans P p α β (p (val e₁)) ⟩ subst P (val≡ β) (subst P (val≡ α) (p (val e₁))) ≡⟨ cong (λ x → subst P (val≡ β) x) (pr {P} {p} {e₁} {e₂} {α}) ⟩ subst P (val≡ β) (p (val e₂)) ≡⟨ pr {P} {p} {e₂} {e₃} {β} ⟩ p (val e₃) ∎) where open ≡-Reasoning
tests/nonsmoke/functional/CompileTests/experimental_ada_tests/tests/simpleada.ads
ouankou/rose
488
27738
<filename>tests/nonsmoke/functional/CompileTests/experimental_ada_tests/tests/simpleada.ads package SimpleAda is type Device is new Integer; end SimpleAda;
data/pokemon/dex_entries/starmie.asm
Dev727/ancientplatinum
28
169045
db "MYSTERIOUS@" ; species name dw 307, 1760 ; height, weight db "It is said that it" next "uses the seven-" next "colored core of" page "its body to send" next "electric waves" next "into outer space.@"
caustic-compiler/src/main/antlr/Caustic.g4
ashwin153/caustic
37
4204
<filename>caustic-compiler/src/main/antlr/Caustic.g4 grammar Caustic; /** * All terminal symbols in the grammar. */ comment : BlockComment | LineComment+ ; constant : True // true | False // false | Number // 5.0, -1 | String // "Hello" | Null // null ; name : Identifier ('.' Identifier)* Ampersand? // x, x.foo ; funcall : name '(' (expression ',')* expression? ')' // x.foo(1.3, false) ; /** * An expression corresponds to a sequence of logical, relational, arithmetic operations performed * on some names, function calls, or constants. Expressions are ordered in descending order of * precedence. */ primaryExpression : funcall | constant | name | '(' expression ')' // (2 + 5) * 3 ; prefixExpression : (Add | Sub | Not)? primaryExpression // +2.0, -1.2, !true ; multiplicativeExpression : prefixExpression | multiplicativeExpression Mul prefixExpression // 2.3 * 1 | multiplicativeExpression Div prefixExpression // 3 / 2 (equal to 1.5) | multiplicativeExpression Mod prefixExpression // 4 % 2 ; additiveExpression : multiplicativeExpression | additiveExpression Add multiplicativeExpression // 4 - 3.1 | additiveExpression Sub multiplicativeExpression // x.foo + 1 ; relationalExpression : additiveExpression | relationalExpression LessThan additiveExpression // x.foo < 8.4 | relationalExpression GreaterThan additiveExpression // x.bar > x.foo | relationalExpression LessEqual additiveExpression // 3 <= 9 | relationalExpression GreaterEqual additiveExpression // x.foo >= 1 ; equalityExpression : relationalExpression | equalityExpression Equal relationalExpression // 1 == 1 | equalityExpression NotEqual relationalExpression // x.foo != x.bar ; logicalAndExpression : equalityExpression | logicalAndExpression And equalityExpression // x.foo && x.bar ; logicalOrExpression : logicalAndExpression | logicalOrExpression Or logicalAndExpression // x.foo || x. bar ; expression : logicalOrExpression ; /** * A basic block corresponds to a sequence of statements. Statements generate transactions for all * operations that mutate state (read, store, etc.), alter control flow (branch, repeat, etc.), or * cause side-effects (funcall). */ conditional : If expression block (Elif expression block)* (Else block)? // if (x) foo() else bar() ; loop : While expression block // while (true) { foo() } ; deletion : Del name // del x.foo ; definition : Var Identifier Assign expression // var x = "foo" ; assignment : name Assign expression // x.foo = y.foo | name MulAssign expression // x *= 2.4 | name DivAssign expression // x /= x.bar | name ModAssign expression // x %= 3 | name AddAssign expression // x += "bar" | name SubAssign expression // x -= 8.4 ; rollback : Rollback expression // rollback "message" ; statement : definition | conditional | deletion | loop | assignment | rollback | funcall | expression | comment ; block : statement ';'? // if (x = 3) x += 2 | '{' (statement ';'?)* '}' // if (x = 3) { x += 2 } ; /** * A program corresponds to a namespaced sequence of record and service declarations. Records are * object schemas that are persisted in the database and services consist of function definitions. */ type : Identifier ('[' (Identifier ',')* Identifier ']')? Ampersand? ; parameter : Identifier ':' type // x: &Foo ; parameters : (parameter ',')* parameter? // x: String, y: Integer ; function : comment? Def Identifier '(' parameters ')' ':' type '=' block // def foo(): Unit = 3 ; service : comment? Service Identifier '{' function* '}' // service Bar { } ; struct : comment? Struct Identifier '{' parameters '}' // rec Foo { x: String } ; declaration : struct | service ; module : Module Identifier ('.' Identifier)* // module caustic.example ; include : Import String ; program : module? include* declaration* ; Def : 'def'; Del : 'del'; Elif : 'elif'; Else : 'else'; False : 'false'; If : 'if'; Import : 'import'; Module : 'module'; Null : 'null'; Rollback : 'rollback'; Service : 'service'; Struct : 'struct'; While : 'while'; True : 'true'; Var : 'var'; Add : '+'; AddAssign : '+='; Ampersand : '&'; And : '&&'; Arrow : '=>'; Assign : '='; Colon : ':'; Comma : ','; Div : '/'; DivAssign : '/='; Equal : '=='; GreaterEqual : '>='; GreaterThan : '>'; LeftBlock : '['; LeftBracket : '{'; LeftParen : '('; LessEqual : '<='; LessThan : '<'; Mod : '%'; ModAssign : '%='; Mul : '*'; MulAssign : '*='; Not : '!'; NotEqual : '!='; Or : '||'; Period : '.'; Question : '?'; RightBlock : ']'; RightBracket : '}'; RightParen : ')'; Semicolon : ';'; Sub : '-'; SubAssign : '-='; Underscore : '_'; fragment Digit : [0-9] ; Number : Digit+ ('.' Digit+)? ; fragment Nondigit : [a-zA-Z_] ; Identifier : Nondigit (Nondigit | Digit)* ; fragment EscapeSequence : '\\' ['"?abfnrtv\\] ; fragment Character : ~["\\\r\n] | EscapeSequence | '\\\n' | '\\\r\n' ; String : '"' Character* '"' | '\'' Character* '\'' ; BlockComment : '/*' .*? '*/' ; LineComment : '//' ~[\r\n]* ; Whitespace : [ \t\r\n\f]+ -> skip ;
src/monsters.ads
thomas070605/shoot-n-loot
0
5836
<filename>src/monsters.ads -- Shoot'n'loot -- Copyright (c) 2020 <NAME> with Game_Assets; use Game_Assets; with GESTE; package Monsters is Max_Nbr_Of_Monsters : constant := 5; procedure Init (Objects : Object_Array) with Pre => Objects'Length <= Max_Nbr_Of_Monsters; function Check_Hit (Pt : GESTE.Pix_Point; Lethal : Boolean) return Boolean; -- Return True if the Pt is within one of the monter. If Lethal is True, the -- monster is killed. function All_Killed return Boolean; procedure Update; end Monsters;
mc-sema/validator/x86_64/tests/ADC32ri.asm
randolphwong/mcsema
2
90091
BITS 64 ;TEST_FILE_META_BEGIN ;TEST_TYPE=TEST_F ;TEST_IGNOREFLAGS= ;TEST_FILE_META_END ; ADC32ri mov ebx, 0x6789 ;TEST_BEGIN_RECORDING adc ebx, 0x44444 ;TEST_END_RECORDING
src/Optics.agda
crisoagf/agda-optics
0
11669
module Optics where open import Agda.Primitive using (_⊔_; lsuc) open import Data.Maybe using (Maybe; just) open import Data.Sum using (_⊎_; inj₁) open import Function using (const; id) open import Category.Functor.Arr open import Category.Functor.Const open import Category.Functor.Either open import Category.Profunctor.Joker open import Category.Profunctor.Star Optic : ∀ {l p} (c : (Set l → Set l → Set l) → Set p) (s t a b : Set l) → Set (lsuc l ⊔ p) Optic {l} c s t a b = ∀ {p : Set l → Set l → Set l} (isClass : c p) → p a b → p s t setOptic : ∀ {l p} (S T A B : Set l) {c : (Set l → Set l → Set l) → Set p} (isClass : c (Star (Arr B))) → Optic c S T A B → S → B → T setOptic _ _ _ _ isClass l = l isClass (const id) putOptic : ∀ {l p} (S T A B : Set l) {c : (Set l → Set l → Set l) → Set p} (isClass : c (Joker (Arr B))) → Optic c S T A B → B → T putOptic _ _ _ _ isClass l = l isClass id getOptic : ∀ {l p} (S T A B : Set l) {c : (Set l → Set l → Set l) → Set p} (isClass : c (Star (Const A))) → Optic c S T A B → S → A getOptic _ _ _ _ isClass l = l isClass id matchingOptic : ∀ {l p} (S T A B : Set l) {c : (Set l → Set l → Set l) → Set p} (isClass : c (Star (Either A))) → Optic c S T A B → S → A ⊎ T matchingOptic _ _ _ _ isClass l = l isClass inj₁ previewOptic : ∀ {l p} (S T A B : Set l) {c : (Set l → Set l → Set l) → Set p} (isClass : c (Star (Const (Maybe A)))) → Optic c S T A B → S → Maybe A previewOptic _ _ _ _ isClass l = l isClass just
test/Fail/Issue2858-conflict.agda
shlevy/agda
0
12883
<filename>test/Fail/Issue2858-conflict.agda interleaved mutual data Foo : Set → Set data Foo_Bar : Set constructor foobar : Foo Bar
tests/secretbox8.adb
yannickmoy/SPARKNaCl
76
29228
with SPARKNaCl; use SPARKNaCl; with SPARKNaCl.Core; with SPARKNaCl.Secretbox; use SPARKNaCl.Secretbox; with SPARKNaCl.Cryptobox; with SPARKNaCl.Stream; with Random; use Random; with Ada.Text_IO; use Ada.Text_IO; with Interfaces; use Interfaces; with Ada.Numerics.Discrete_Random; procedure Secretbox8 is RK : Bytes_32; K : Core.Salsa20_Key; N : Stream.HSalsa20_Nonce; S, S2 : Boolean; begin for MLen in N32 range 0 .. 999 loop Random_Bytes (RK); Core.Construct (K, RK); Random_Bytes (Bytes_24 (N)); Put ("Secretbox8 - iteration" & MLen'Img); declare subtype Index is N32 range 0 .. Cryptobox.Plaintext_Zero_Bytes + MLen - 1; subtype CIndex is N32 range Cryptobox.Ciphertext_Zero_Bytes .. Index'Last; subtype Text is Byte_Seq (Index); package RI is new Ada.Numerics.Discrete_Random (CIndex); G : RI.Generator; M, C, M2 : Text := (others => 0); Caught : Integer := 0; begin RI.Reset (G); Random_Bytes (M (Cryptobox.Plaintext_Zero_Bytes .. M'Last)); Create (C, S, M, N, K); if S then while (Caught < 10) loop C (RI.Random (G)) := Random_Byte; Open (M2, S2, C, N, K); if S2 then if not Equal (M, M2) then Put (" forgery!"); exit; end if; else Caught := Caught + 1; end if; end loop; New_Line; else Put_Line ("bad encryption"); end if; end; end loop; end Secretbox8;
sbsext/tk2/net/init.asm
olifink/smsqe
0
21363
; SBSEXT_TK2_NET_INIT - TK2 network part initialisation 2018 <NAME> section tk2 xdef init xref nd_init xref.l tk2_vers include 'dev8_keys_qlv' include 'dev8_keys_sys' include 'dev8_keys_qdos_sms' include 'dev8_mac_proc' init suba.l a0,a0 lea banner(pc),a1 move.w ut.wtext,a2 jsr (a2) moveq #sms.info,d0 trap #1 movea.l a0,a4 ; SysVar jsr nd_init lea net_procs,a1 move.w sb.inipr,a2 jmp (a2) net_procs proc_stt proc_def FSERVE ; file server proc_def NFS_USE proc_end proc_stt proc_end banner dc.w 39 dc.b 'Toolkit II v' dc.l tk2_vers dc.b 'network QJUMP/M.Kilgus',10,0 end
astro_ship_shield_code.asm
nealvis/astroblast
0
3027
////////////////////////////////////////////////////////////////////////////// // astro_ship_shield_code.asm // Copyright(c) 2021 <NAME>. // License: MIT. See LICENSE file in root directory. ////////////////////////////////////////////////////////////////////////////// // The following subroutines should be called from the main engine // as follows // ShipShieldInit: Call once before main loop // ShipShieldStep: Call once every raster frame through the main loop // ShipShieldStart: Call to start the effect // ShipShieldForceStop: Call to force effect to stop if it is active // ShipShieldCleanup: Call at end of program after main loop to clean up ////////////////////////////////////////////////////////////////////////////// #importonce #import "astro_ship_shield_data.asm" #import "astro_ships_code.asm" ////////////////////////////////////////////////////////////////////////////// // Call once before main loop ShipShieldInit: { lda #$00 sta ship_1_shield_count sta ship_2_shield_count rts } // ShipShieldInit end ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // Call once every raster frame through the main loop. // will step each ship that is dead ShipShieldStep: { ShipShieldStepTryShip1: lda ship_1_shield_count beq ShipShieldStepTryShip2 jsr Ship1ShieldStep ShipShieldStepTryShip2: lda ship_2_shield_count beq ShipShieldStepDone jsr Ship2ShieldStep ShipShieldStepDone: rts } // end - ShipShieldStep ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // Ship1ShieldStep: { lda ship_1_shield_count bne ShipShielding rts ShipShielding: // get zero based frame number into y reg // then multiply by two to get the index // into our sprite data ptr address table lda #SHIP_SHIELD_FRAMES sec sbc ship_1_shield_count cmp #SHIP_SHIELD_ANIMATION_FRAMES bcs ShieldOnAnimationDone asl tay // y reg now holds zero based index into table of the // byte that has the LSB of the sprite data ptr // LSB of sprite's data ptr to x and // MSB to Accum so we can call the SetDataPtr ldx shield_sprite_data_ptr_table, y iny lda shield_sprite_data_ptr_table, y jsr ship_1.SetDataPtr ShieldOnAnimationDone: ShipShieldDecCount: dec ship_1_shield_count bne ShipShieldCountContinues ShipShieldDone: // do shield done stuff here ldx #<sprite_ship lda #>sprite_ship jsr ship_1.SetDataPtr ShipShieldCountContinues: rts } // Ship1ShieldStep end ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // Ship2ShieldStep: { lda ship_2_shield_count bne ShipShielding rts ShipShielding: // get zero based frame number into y reg // then multiply by two to get the index // into our sprite data ptr address table lda #SHIP_SHIELD_FRAMES sec sbc ship_2_shield_count cmp #SHIP_SHIELD_ANIMATION_FRAMES bcs ShieldOnAnimationDone asl tay // y reg now holds zero based index into table of the // byte that has the LSB of the sprite data ptr // LSB of sprite's data ptr to x and // MSB to Accum so we can call the SetDataPtr ldx shield_sprite_data_ptr_table, y iny lda shield_sprite_data_ptr_table, y jsr ship_2.SetDataPtr ShieldOnAnimationDone: ShipShieldDecCount: dec ship_2_shield_count bne ShipShieldCountContinues ShipShieldDone: // do shield done stuff here ldx #<sprite_ship lda #>sprite_ship jsr ship_2.SetDataPtr ShipShieldCountContinues: rts } // Ship1ShieldStep end ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // Call to start the effect // params: // accum: set to 1 or 2 for ship 1 or ship 2 ShipShieldStart: { ShipShieldStartTryShip1: cmp #1 bne ShipShieldStartTryShip2 lda #SHIP_SHIELD_FRAMES sta ship_1_shield_count rts ShipShieldStartTryShip2: cmp #2 bne ShipShieldStartDone lda #SHIP_SHIELD_FRAMES sta ship_2_shield_count ShipShieldStartDone: rts } // ShipShieldStart end subroutine ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // Call check if shield is active for specified ship // subroutine params: // accum: pass 1 for ship 1, or 2 for ship 2 // Accum: upon return will have a zero if shield not active or nonzero if is // X Reg: unchanged // Y Reg: unchanged ShipShieldIsActive: { TryShip1: pha and #$01 beq TryShip2 pla lda ship_1_shield_count rts TryShip2: pla and #$02 beq Done lda ship_2_shield_count Done: rts } // ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // Call to force effect to stop if it is active // load accum with 1 for ship 1, or 2 for ship 2 or 3 for both ships ShipShieldForceStop: { TryShip1: pha and #$01 beq TryShip2 ldx #$00 stx ship_1_shield_count // LSB of sprite's data ptr to x and // MSB to Accum so we can call the SetDataPtr ldx #<sprite_ship lda #>sprite_ship jsr ship_1.SetDataPtr // fall through and try ship 2 TryShip2: pla and #$02 beq Done ldx #$00 sta ship_2_shield_count // LSB of sprite's data ptr to x and // MSB to Accum so we can call the SetDataPtr ldx #<sprite_ship lda #>sprite_ship jsr ship_2.SetDataPtr Done: rts } // ShipShieldForceStop end ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // Call at end of program after main loop to clean up ShipShieldCleanup: { lda #3 jsr ShipShieldForceStop rts } // ShipShieldCleanup end //////////////////////////////////////////////////////////////////////////////
Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca_notsx.log_21829_1210.asm
ljhsiun2/medusa
9
702
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r15 push %rax push %rbp push %rcx push %rdi push %rsi lea addresses_WT_ht+0xac53, %r12 nop nop nop nop nop cmp $5857, %r15 movw $0x6162, (%r12) nop nop nop nop inc %rcx lea addresses_UC_ht+0x9f8f, %r12 and %rsi, %rsi mov $0x6162636465666768, %rdi movq %rdi, (%r12) nop nop nop nop xor %rsi, %rsi lea addresses_A_ht+0x118e7, %rbp nop nop nop nop nop add %r12, %r12 movups (%rbp), %xmm5 vpextrq $1, %xmm5, %rdi nop nop nop nop nop add %rsi, %rsi lea addresses_WT_ht+0xd87, %r12 nop nop nop add %rax, %rax mov $0x6162636465666768, %r15 movq %r15, %xmm3 movups %xmm3, (%r12) nop nop nop add $64323, %r12 lea addresses_D_ht+0xe38f, %rdi nop nop sub $1040, %r15 movw $0x6162, (%rdi) sub $50899, %rdi pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r15 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r13 push %r14 push %r9 push %rbp // Store mov $0xb47, %r14 clflush (%r14) sub $50298, %r9 movw $0x5152, (%r14) nop nop nop nop cmp $4730, %rbp // Faulty Load lea addresses_A+0xbb8f, %r10 nop xor $20162, %r9 mov (%r10), %ebp lea oracles, %r12 and $0xff, %rbp shlq $12, %rbp mov (%r12,%rbp,1), %rbp pop %rbp pop %r9 pop %r14 pop %r13 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_P', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 3}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_A', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': True, 'AVXalign': False, 'size': 2, 'congruent': 2}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 10}} {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 1}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 2}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 7}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
helpdesk.interpretador.impl/LabeledExpr.g4
RuiAP/HelpDeskAsService
0
1696
grammar LabeledExpr; prog: method; method: statement* (returnStatement)?; identifier: Identifier; statement : ifElseStatement | whileStatement | printStatement | variableAssignmentStatement | returnStatement | allRecordsStatement | findRecordStatement | findFirstRecordStatement | sendEmailStatement | getSubStringStatement | '{' statement* '}' | sleepStatement ; variableAssignmentStatement: identifier EQ ((expression SC)|statement) #variableAssignmentExpression; getSubStringStatement: 'getSubString' LP expression ',' expression ',' expression RP SC #getSubStringExpression; printStatement: 'print' LP(expression) RP SC #printExpression; whileStatement: 'forAll' LP identifier ':' identifier RP statement #whileExpression; ifElseStatement: 'if' LP expression RP statement ('else' statement)? #ifElseExpression; returnStatement: 'return' expression SC #returnExpression; allRecordsStatement: 'allRecords' LP expression RP SC #allRecordsExpression; findRecordStatement: 'findRecords' LP expression ',' expression ',' expression RP SC #findRecordExpression; findFirstRecordStatement: 'findFirstRecord' LP expression ',' expression ',' expression RP SC #findFirstRecordExpression; sendEmailStatement: 'sendEmail' LP expression ',' expression RP SC #sendEmailExpression; sleepStatement : 'sleep' LP expression RP SC #sleepExpression; expression : NOT expression # notExpression | expression TIMES expression # mulExpression | expression DIV expression # divExpression | expression PLUS expression # addExpression | expression MINUS expression # subExpression | expression MOD expression # modExpression | expression LT(EQ)? expression # lessThanExpression | expression GT(EQ)? expression # greaterthanExpression | expression (EQ|NOT) EQ expression # equalityExpression | expression AND expression # andExpression | expression OR expression # orExpression | identifier ISFILLED # filledExpression | expression CONCAT expression # concatExpression | identifier (TAG|ATTRIBUTE) expression # memoryAccessObjectXMLExpression | identifier COLUMN expression #memoryAccessColumnCSVExpression | COLUMN expression #columnCSVExpression | (TAG|ATTRIBUTE) expression #objectXMLExpression | '(' expression ')' # ParenthesesExpression | STRING # stringExpression | CHAR # characterExpression | ('+'|'-')? IntegerLiteral #integerLitExpression | ('+'|'-')? identifier #identifierExpression | BooleanLiteral # boolLitExpression ; TAG:'tag'; ATTRIBUTE:'attribute'; COLUMN:'column'; CONCAT:'$'; ISFILLED:'.IsFilled'; DIV:'/'; OR:'||'; GT:'>'; AND:'&&'; MOD:'%'; LT:'<'; PLUS:'+'; MINUS:'-'; TIMES:'*'; NOT:'!'; LSB:'['; RSB:']'; LP:'('; RP:')'; RETURN:'return'; EQ:'='; BooleanLiteral:'true'| 'false'; SC:';'; Identifier:JavaLetter JavaLetterOrDigit*; WS: [ \r\t\n]+ -> skip ; STRING: '"'(ESC_SEQ| ~( '\\' | '"' ))* '"' ; CHAR: '\''(ESC_SEQ| ~( '\'' | '\\' )) '\'' ; IntegerLiteral: DecimalIntegerLiteral ; fragment JavaLetter : [a-zA-Z$_] ; fragment JavaLetterOrDigit:[a-zA-Z0-9$_] ; fragment DecimalIntegerLiteral: DecimalNumeral IntegertypeSuffix? ; fragment IntegertypeSuffix: [lL] ; fragment DecimalNumeral: '0' | NonZeroDigit (Digits?| Underscores Digits) ; fragment Digits: Digit (DigitsAndUnderscores? Digit)? ; fragment Digit:'0'| NonZeroDigit ; fragment NonZeroDigit:[1-9] ; fragment DigitsAndUnderscores: DigitOrUnderscore+ ; fragment DigitOrUnderscore: Digit| '_' ; fragment Underscores: '.'+ ; fragment HEX_DIGIT: ( '0' .. '9'| 'a' .. 'f'| 'A' .. 'F') ; fragment ESC_SEQ: '\\'('b'| 't'| 'n'| 'f'| 'r'| '"'| '\''| '\\')| UNICODE_ESC| OCTAL_ESC ; fragment OCTAL_ESC: '\\'('0' .. '3')('0' .. '7')('0' .. '7') | '\\'('0' .. '7')('0' .. '7') | '\\'('0' .. '7') ; fragment UNICODE_ESC: '\\' 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT ;
src/nxlib/syscalls.asm
TheDarkBomber/XLS
0
7008
<filename>src/nxlib/syscalls.asm %include "common.inc" %macro defsyscall 2 global %1:function %1: mov rax, %2 syscall ret %endmacro section .text defsyscall READ, 0 defsyscall WRITE, 1 defsyscall GETPID, 39 defsyscall FORK, 57 defsyscall EXIT, 60 defsyscall TERMINATE, 62
ada/gui/demo/myeventhandler.ads
auzkok/libagar
286
26162
<reponame>auzkok/libagar<gh_stars>100-1000 with Agar; with Agar.Event; package myeventhandler is package EV renames Agar.Event; procedure Ping (Event : EV.Event_Access) with Convention => C; procedure Some_Event (Event : EV.Event_Access) with Convention => C; end myeventhandler;