text
stringlengths
1
1.05M
// Copyright Takatoshi Kondo 2015 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include "test_main.hpp" #include "combi_test.hpp" #include "checker.hpp" BOOST_AUTO_TEST_SUITE(test_resend) BOOST_AUTO_TEST...
; ; Colour Genie EG2000 graphics routines ; Fast background restore ; ; ; $Id: bkrestore.asm,v 1.2 2016/06/20 21:47:41 dom Exp $ ; SECTION code_clib PUBLIC bkrestore PUBLIC _bkrestore EXTERN pixeladdress .bkrestore ._bkrestore ; __FASTCALL__ : sprite ptr in HL push ix ;save callers push hl p...
; A298030: Partial sums of A298029. ; 1,4,10,22,40,73,112,163,220,289,364,451,544,649,760,883,1012,1153,1300,1459,1624,1801,1984,2179,2380,2593,2812,3043,3280,3529,3784,4051,4324,4609,4900,5203,5512,5833,6160,6499,6844,7201,7564,7939,8320,8713,9112,9523,9940,10369,10804,11251,11704,12169,12640,13123,13612,14113,14620,1...
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The OFIChain developers // Copyright (c) 2011-2017 The OFIChain developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #if defined(HAVE_CONFIG_H) #in...
org 0x7c00 bits 16 %define Buffer_Seg 0x0700 %macro debug 0 pusha mov dx, 0x8A00 mov ax, dx out dx, ax mov ax, 0x8aE0 mov dx, 0x8a00 out dx, ax popa %endmacro jmp short main nop ;BPB - Bios Parameter Block BPB_OEM: Times 8 db 0x20 BPB_BytesPerSector: dw 512 BPB_SectorsPerCluster: db 1 BPB_Re...
; nasmfunc.asm ; TAB=4 section .text GLOBAL io_hlt, io_cli, io_sti, io_stihlt GLOBAL io_in8, io_in16, io_in32 GLOBAL io_out8, io_out16, io_out32 GLOBAL io_load_eflags, io_store_eflags io_hlt: ; void io_hlt(void) HLT RET io_cli: ; void io_cli(void) CLI RET io_sti: ; vo...
; A058764: Smallest number x such that cototient(x) = 2^n. ; 2,4,6,12,24,48,96,192,384,768,1536,3072,6144,12288,24576,49152,98304,196608,393216,786432,1572864,3145728,6291456,12582912,25165824,50331648,100663296,201326592,402653184,805306368,1610612736,3221225472,6442450944,12884901888,25769803776,51539607552,103079215...
/************************************************************************\ Copyright 1997 The University of North Carolina at Chapel Hill. All Rights Reserved. Permission to use, copy, modify and distribute this software and its documentation for educational, research and non-profit purposes, without fee, a...
// // GLUtilities.cpp // LearnGLFW // // Created by billthaslu on 2021/4/10. // #include "GLUtilities.hpp" #include <OpenGL/OpenGL.h> #include <OpenGL/gl.h> #include <OpenGL/glext.h> #include <iostream> #include "GLUtilities.hpp" GLuint compileShaders(void) { GLuint vertexShader = -1; GLuint fragmentShade...
; A189050: a(n) = if n even then P((n-2)/2)+P(n/2) otherwise 3*P((n+1)/2)+P((n-1)/2) where P(i) are the Pell numbers (A000129). ; Submitted by Jamie Morken(s3) ; 3,1,7,3,17,7,41,17,99,41,239,99,577,239,1393,577,3363,1393,8119,3363,19601,8119,47321,19601,114243,47321,275807,114243,665857,275807,1607521,665857,3880899,16...
Name: ys_w17.asm Type: file Size: 13158 Last-Modified: '2016-05-13T04:51:15Z' SHA-1: 740A54D60C11977CB5B98DA1873644429CFD3F5C Description: null
//////////////////////////////////////////////////////////////////////////////// // $Workfile: ZipPathComponent.cpp $ // $Archive: /ZipArchive/ZipPathComponent.cpp $ // $Date: 2003-07-21 21:10:30 -0500 (Mon, 21 Jul 2003) $ $Author: gmaynard $ /////////////////////////////////////////////////////////////////////////////...
; A215502: a(n) = (1+sqrt(3))^n + (-2)^n + (1-sqrt(3))^n + 1. ; Submitted by Christian Krause ; 4,1,13,13,73,121,481,1009,3361,7969,24193,61249,177025,464257,1307137,3493633,9699841,26190337,72173569,195941377,537802753,1464342529,4010582017,10937266177,29920862209,81665925121,223274237953,609678999553,1666309128193,45...
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r13 push %r15 push %rcx push %rdi push %rdx push %rsi lea addresses_normal_ht+0xa204, %r13 nop nop nop nop nop cmp %r12, %r12 movb $0x61, (%r13) nop nop nop and $14380, %rcx lea addresses_D_ht+0x3084, %rsi lea addresses_normal_ht+0x509c, %rdi nop xor $13985, ...
; Options: ; startup=1 --> RAM mode ; startup=2 --> ROM mode (position code at location 0 and provide minimal interrupt services) ; ; CRT_ORG_CODE = start address ; CRT_ORG_BSS = address for bss variables ; CRT_MODEL = 0 (RAM), 1 = (ROM, code copied), 2 = (ROM, code comp...
; Copyright © 2021, VideoLAN and dav1d authors ; Copyright © 2021, Two Orioles, LLC ; All rights reserved. ; ; Redistribution and use in source and binary forms, with or without ; modification, are permitted provided that the following conditions are met: ; ; 1. Redistributions of source code must retain the above copy...
; A137584: a(n) = 3*a(n-1) - 2*a(n-2) + a(n-3), n > 3. ; 0,3,6,13,30,70,163,379,881,2048,4761,11068,25730,59815,139053,323259,751486,1746993,4061266,9441298,21948355,51023735,118615793,275748264,641036941,1490230088,3464364646,8053670703,18722512905,43524561955,101182330758,235220381269 mov $3,2 mov $5,$0 lpb $3 mov...
; A326725: a(n) = (1/2)*n*(5*n - 7); row 5 of A326728. ; 0,-1,3,12,26,45,69,98,132,171,215,264,318,377,441,510,584,663,747,836,930,1029,1133,1242,1356,1475,1599,1728,1862,2001,2145,2294,2448,2607,2771,2940,3114,3293,3477,3666,3860,4059,4263,4472,4686,4905,5129,5358,5592,5831,6075,6324,6578,6837,7101,7370,7644,7923,8207...
; A027656: Expansion of 1/(1-x^2)^2 (included only for completeness - the policy is always to omit the zeros from such sequences). ; 1,0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,0,29,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,4...
// Time: O(n) on average // Space: O(n) // reference: https://en.wikipedia.org/wiki/Smallest-circle_problem class Solution { public: vector<double> outerTrees(vector<vector<int>>& trees) { random_shuffle(begin(trees), end(trees)); vector<vector<double>> boundaries; const auto& result = Wel...
.MODEL SMALL .STACK 100H .DATA PROMPT1 DB 10, 13, "Enter a string: $" PROMPT2 DB 10, 13, "Length: $" STR1 DB 10 DUP('$') .CODE MAIN PROC MOV AX, @DATA MOV DS, AX ;DATA SEGMENT INITIALIZATION MOV ES, AX ;EXTRA SEGMENT INITIALIZATION SO STRING INTRUCTIONS CAN USE ES:DI LEA DX, PROMPT1 MOV AH, 09H INT 2...
#include "stdafx.h" using namespace std; const int N = 45; void fill(int* a,int n) { for(int i=0;i<n;i++) { a[i] = rand()%10000; } } void sort(int* a, int n) { int i,j,k; int t; for(k = n/2; k > 0; k /=2) for(i = k; i < n; i++) { t = a[i]; for(j = i; j>=k; j-=k) { if(t < a[j-k]) ...
// // Created by JJJai on 12/19/2021. // #include <main.h> #include "material.h" scratch::Material::Material(unsigned int id, std::vector<std::shared_ptr<Texture>> textures) : _id(id), _index(-1), _textures(std::move( ...
ctarget: file format elf64-x86-64 Disassembly of section .init: 0000000000400c48 <_init>: 400c48: 48 83 ec 08 sub $0x8,%rsp 400c4c: e8 6b 02 00 00 callq 400ebc <call_gmon_start> 400c51: 48 83 c4 08 add $0x8,%rsp 400c55: c3 retq Disassembly of sect...
.686 .model flat .xmm .code _test proc push ebp mov ebp,esp sub esp,104 push edi push esi ; start of inline function test1 mov eax,256 imul eax,512 sub eax,131072 ; end of inline function test1 cmp ...
extern setAttr public _printChar public print public printAttr public printChar public font section CODE_4 #include "defs.inc" ; ; Display a char at the specified location. ; Callable from 'C', parameters are passed on ...
<% from pwnlib.shellcraft.i386.linux import syscall %> <%page args="timerid, value"/> <%docstring> Invokes the syscall timer_gettime. See 'man 2 timer_gettime' for more information. Arguments: timerid(timer_t): timerid value(itimerspec): value </%docstring> ${syscall('SYS_timer_gettime', timerid, val...
; EFM8UB1 SFRs WDTCN = 0x97 CKCON0 = 0x8E SFRPAGE = 0xA7 CLKSEL = 0xA9 P3 = 0xB0 ; page 0x20 REG1CN = 0xC6 P3MDOUT = 0x9C ; Interrupt vector .area INTV (ABS) .org 0x0000 _int_reset: ljmp _start .org 0x0003 _int_ex0: reti .org 0x000b _int_t0: ljmp T0_ISR .ds 5 .are...
/* * Copyright 2015 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "GrDrawPathBatch.h" #include "GrRenderTargetPriv.h" static void pre_translate_transform_values(const float* xforms, GrPat...
;****************************************************************************** ;* x86 optimized Format Conversion Utils ;* Copyright (c) 2008 Loren Merritt ;* ;* This file is part of FFmpeg. ;* ;* FFmpeg is free software; you can redistribute it and/or ;* modify it under the terms of the GNU Lesser General Public ;* L...
//#include "apue.h" #include <stdio.h> #include <syslog.h> #include <fcntl.h> #include <unistd.h> #include <stdlib.h> #include <sys/resource.h> /** * 注释1:因为我们从shell创建的daemon子进程,所以daemon子进程会继承shell的umask,如果不清除的话,会导致daemon进程创建文件时屏蔽某些权限。 * 注释2:fork后让父进程退出,子进程获得新的pid,肯定不为进程组组长,这是setsid前提。 * 注释3:调用setsid来创建新的进程会话。这使得dae...
/****************************************************************************** * Copyright (c) 2010-2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. * Modifications Copyright (c) 2017-2020, Advanced Micro Devices, Inc. All rights reserved. * * Redist...
%include "../UltimaPatcher.asm" %include "include/uw1.asm" %include "include/uw1-eop.asm" [bits 16] startPatch EXE_LENGTH, \ expanded overlay procedure: mapControl startBlockAt addr_eop_mapControl push bp mov bp, sp ; bp-based stack frame: %assign arg_mapControl 0x04 %assign ____callerIp ...
scope VI: { Init: addi sp, 8 sw ra, -8(sp) // Clear screen before enabling VI la t0, framebuffer0 ls_gp(sw t0, active_framebuffer) jal FillScreen lli a0, 0x0001 lui t0, VI_BASE la t1, framebuffer0 sw t1, VI_ORIGIN(t0) // Setup VI // 16-bit color (0), no AA, resampling only (8) lli t1, (%10 << 0...
; A070385: a(n) = 5^n mod 38. ; 1,5,25,11,17,9,7,35,23,1,5,25,11,17,9,7,35,23,1,5,25,11,17,9,7,35,23,1,5,25,11,17,9,7,35,23,1,5,25,11,17,9,7,35,23,1,5,25,11,17,9,7,35,23,1,5,25,11,17,9,7,35,23,1,5,25,11,17,9,7,35,23,1,5,25,11,17,9,7,35,23,1,5,25,11,17,9,7,35,23,1,5,25,11,17,9,7,35,23,1 mov $1,1 mov $2,$0 lpb $2 mul ...
; some flags here for build configuration i guess ;;; actual code to do with the file starts here ;;; .include "defines.inc" .include "global.inc" .import NMI_HANDLER, RESET_HANDLER, IRQ_HANDLER .segment "HEADER" ; comments regarding header format taken from ; https://wiki.nesdev.org/w/index.php?title=INES#iNES_...
//================================================================================================= /*! // \file src/mathtest/dmatdmatmult/MDbLDb.cpp // \brief Source file for the MDbLDb dense matrix/dense matrix multiplication math test // // Copyright (C) 2012-2018 Klaus Iglberger - All Rights Reserved // // This...
; Z88 Small C+ Run time Library ; Moved functions over to proper libdefs ; To make startup code smaller and neater! ; ; 6/9/98 djm SECTION code_l_sccz80 PUBLIC l_pint EXTERN l_pint_pop_pint defc l_pint = l_pint_pop_pint
; A079273: Octo numbers (a polygonal sequence): a(n) = 5*n^2 - 6*n + 2 = (n-1)^2 + (2*n-1)^2. ; 1,10,29,58,97,146,205,274,353,442,541,650,769,898,1037,1186,1345,1514,1693,1882,2081,2290,2509,2738,2977,3226,3485,3754,4033,4322,4621,4930,5249,5578,5917,6266,6625,6994,7373,7762,8161,8570,8989,9418,9857,10306,10765,11234,1...
; ; MSX specific routines ; ; Improved functions by Rafael de Oliveira Jannone ; Originally released in 2004 for GFX - a small graphics library ; ; int msx_vpeek(int address); ; ; Read the MSX video memory ; ; $Id: msx_vpeek.asm,v 1.9 2015/01/19 01:32:57 pauloscustodio Exp $ ; PUBLIC msx_vpeek INCLUDE "msx/vdp.inc...
; int printf(const char *fmt, ...) ; 05.2008 aralbrec PUBLIC printf EXTERN vfprintf_callee, stdio_varg EXTERN ASMDISP_VFPRINTF_CALLEE EXTERN _stdout .printf call stdio_varg ; de = char *fmt ld c,l ld b,h ; bc = top of parameter list ld ix,(_stdout) jp vfprintf_c...
global utils_number_to_decimal_ascii global utils_get_decimal_length global utils_are_three_equals extern console_print extern console_print_nl segment .data base_10: dd 10 segment .bss segment .text ; Convert a 32 bit unsigned dezimal number to its ascii representation and store it in given ; adress paramet...
; ; jdmerge.asm - merged upsampling/color conversion (AVX2) ; ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB ; Copyright (C) 2009, 2016, D. R. Commander. ; Copyright (C) 2015, Intel Corporation. ; ; Based on the x86 SIMD extension for IJG JPEG library ; Copyright (C) 1999-2006, MIYASAKA Masaru. ; For c...
; Copyright 2005-2014 Intel Corporation. All Rights Reserved. ; ; This file is part of Threading Building Blocks. Threading Building Blocks is free software; ; you can redistribute it and/or modify it under the terms of the GNU General Public License ; version 2 as published by the Free Software Foundation. Thre...
; Z88 Small C+ Run Time Library ; Long functions ; ; feilipu 10/2021 SECTION code_clib SECTION code_l_sccz80 PUBLIC l_long_cpl_mde ;primary = 1s complement primary ;enter with primary in (de) .l_long_cpl_mde ld a,(de) cpl ld (de),a inc de ld a,(de) cp...
// Copyright 2016 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "devfs.h" #include <fcntl.h> #include <fidl/fuchsia.io/cpp/wire.h> #include <lib/async/cpp/wait.h> #include <lib/ddk/driver.h> #include <lib/fdio...
; A175228: Remaining sequence of step 3 of sieve from A175227. ; 1,4,8,10,14,16,20,22,25,27,30,33,35,38,40,44,46,49,51,54,56,58,62,64,66,69,72,75,77,80,82,85,87,90,92,94,96,99,102 mul $0,2 cal $0,65090 ; Natural numbers which are not odd primes: composites plus 1 and 2. mov $1,$0
; A265024: a(n) = n! * Sum_{d in D(n+1)} (-1)^(d+1)*(n+1)/d, D(n) the divisors of n. ; Submitted by Christian Krause ; 1,1,8,6,144,480,5760,5040,524160,2177280,43545600,159667200,6706022400,49816166400,2092278988800,1307674368000,376610217984000,4623936565248000,128047474114560000,729870602452992000,7785286426165248000...
//////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2012 Bryce Adelstein-Lelbach // // SPDX-License-Identifier: BSL-1.0 // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.tx...
; A256539: Number of partitions of 4n into at most 5 parts. ; Submitted by Jamie Morken(s2) ; 1,5,18,47,101,192,333,540,831,1226,1747,2418,3266,4319,5608,7166,9027,11229,13811,16814,20282,24260,28796,33940,39744,46262,53550,61667,70673,80631,91606,103664,116875,131310,147042,164147,182702,202787,224484,247877,273052,30...
; A003984: Table of max(x,y), where (x,y) = (0,0),(0,1),(1,0),(0,2),(1,1),(2,0),... ; 0,1,1,2,1,2,3,2,2,3,4,3,2,3,4,5,4,3,3,4,5,6,5,4,3,4,5,6,7,6,5,4,4,5,6,7,8,7,6,5,4,5,6,7,8,9,8,7,6,5,5,6,7,8,9,10,9,8,7,6,5,6,7,8,9,10,11,10,9,8,7,6,6,7,8,9,10,11,12,11,10,9,8,7,6,7,8,9,10,11,12,13,12,11,10,9,8,7,7,8 lpb $0 sub $0,1...
FX_PLAYER_SHOOT equ SONIDO5 ;No destaca FX_ZOMBIE_BYE equ SONIDO6 FX_ZOMBIE_EXPLODE equ SONIDO8 FX_TAKE equ SONIDO7 FX_PLAYER_BIG_SHOOT equ SONIDO10 INIT_MUSIC DI CALL PLAYER_OFF LD HL, MWORK.BUFF_CANAL_A LD [CANAL_A],HL ...
INCLUDE "graphics/grafix.inc" SECTION code_clib PUBLIC setxy PUBLIC _setxy EXTERN l_cmp EXTERN __gfx_coords ; ; $Id: w_setxy.asm,v 1.5 2016-07-02 09:01:35 dom Exp $ ; ; ****************************************************************** ; ; Move current pixel coordinate to (x0,y0). Only legal coordinates ; are ...
.size 8000 .text@48 jp lstatint .text@100 jp lbegin .data@143 80 .text@150 lbegin: ld c, 41 ld b, 02 ld d, 03 lbegin_waitm2: ldff a, (c) and a, d cmp a, b jrnz lbegin_waitm2 ld a, 08 ldff(c), a xor a, a ldff(0f), a ld a, 02 ldff(ff), a ei ld c, 0f .text@1000 lstatint: ld a, 48 ldff(41), a ldff...
; A210000: Number of unimodular 2 X 2 matrices having all terms in {0,1,...,n}. ; 0,6,14,30,46,78,94,142,174,222,254,334,366,462,510,574,638,766,814,958,1022,1118,1198,1374,1438,1598,1694,1838,1934,2158,2222,2462,2590,2750,2878,3070,3166,3454,3598,3790,3918,4238,4334,4670,4830 mov $2,$0 add $2,1 mov $4,$0 lpb $2 mov...
; nrv2x decoder in pure 68k asm for Rygar AGA ; On entry: ; a0 buffer start ; d0 offset inside buffer for packed data ; On exit: ; buffer filled with unpacked data ; all registers preserved nrv2x_decoder: movem.l d0-d5/a0-a4,-(sp) move.l d0,d3 lea (a0),a1 adda.l d0,a0 ; common setup moveq #-$80,d0 mov...
; A032793: Numbers that are congruent to {1, 2, 4} mod 5. ; 1,2,4,6,7,9,11,12,14,16,17,19,21,22,24,26,27,29,31,32,34,36,37,39,41,42,44,46,47,49,51,52,54,56,57,59,61,62,64,66,67,69,71,72,74,76,77,79,81,82,84,86,87,89,91,92,94,96,97,99,101,102,104,106,107,109 mul $0,5 mov $1,$0 div $1,3 add $1,1
; A145289: Duplicate of A016777. ; 1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58,61,64,67,70,73,76,79,82,85,88,91,94,97,100,103 mov $1,$0 mul $1,3 add $1,1
; A177881: Partial sums of round(3^n/10). ; 0,0,1,4,12,36,109,328,984,2952,8857,26572,79716,239148,717445,2152336,6457008,19371024,58113073,174339220,523017660,1569052980,4707158941,14121476824,42364430472,127093291416,381279874249,1143839622748,3431518868244,10294556604732,30883669814197,92651009442592,277953028327776...
; A005728: Number of fractions in Farey series of order n. ; 1,2,3,5,7,11,13,19,23,29,33,43,47,59,65,73,81,97,103,121,129,141,151,173,181,201,213,231,243,271,279,309,325,345,361,385,397,433,451,475,491,531,543,585,605,629,651,697,713,755,775,807,831,883,901,941,965,1001,1029,1087,1103,1163,1193,1229,1261,1309,1329,1395...
addi $1, $0, 1 addi $2, $0, 2 add $3, $2, $1 sub $1, $3, $2 addi $10, $11, -23 add $11, $3, $10 sub $1, $10, $11 mult $8, $3, $2 mult $9, $1, $1 and $7, $1, $2 and $7, $2, $2 or $7, $1, $2 or $7, $2, $2 nor $7, $1, $2 nor $7, $2, $2 slt $0, $2, $7 slt $2, $0, $7 beq $0, $0, 1 j 8 addi $5, $0, 5 beq $0, $2, 10 bne $0, $...
// Autogenerated from CppHeaderCreator // Created by Sc2ad // ========================================================================= #pragma once // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" #include "beatsaber-hook/shared/utils/byref.hpp" // Including type: OVR.OpenVR.IVROverlay #include "OVR...
; A168669: Numbers n such that sqrt(36*n+49) is prime. ; Submitted by Simon Strandgaard ; 0,2,22,50,60,102,172,190,260,282,520,632,830,1012,1380,1430,1612,1920,2130,2192,2720,2790,3042,3382,3460,3740,4202,4922,5352,5450,5800,5902,6372,8310,8992,9570,10032,10642,11412,12062,12580,12730,13262,13962,14680,18722,19552,2021...
//StaticTest @111 D=A @SP A=M M=D @SP M=M+1 @333 D=A @SP A=M M=D @SP M=M+1 @888 D=A @SP A=M M=D @SP M=M+1 @StaticTest.8 D=A @R15 M=D @SP M=M-1 @SP A=M D=M @R15 A=M M=D @StaticTest.3 D=A @R15 M=D @SP M=M-1 @SP A=M D=M @R15 A=M M=D @StaticTest.1 D=A @R15 M=D @SP M=M-1 @SP A=M D=M @R15 A=M M=D @StaticTest.3 D=M @SP A=M M=...
/* * Load_dtm.cpp * ------------ * Purpose: Digital Tracker / Digital Home Studio module Loader (DTM) * Notes : (currently none) * Authors: OpenMPT Devs * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. */ #include "stdafx.h" #include "Loaders.h" OPENMPT_NAMESPACE_BE...
; /***************************************************************************** ; * ugBASIC - an isomorphic BASIC language compiler for retrocomputers * ; ***************************************************************************** ; * Copyright 2021-2022 Marco Spedaletti (asimov@mclink.it) ; * ; * Licens...
// Copyright (c) 2012-2015 The Bitcoinold Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "compat/sanity.h" #include "key.h" #include "test/test_bitcoinold.h" #include <boost/test/unit_test.hpp> BOOST_...
; A067082: If n = abc...def in decimal notation then the right digit sum function = abc...def + bc...def + c...def + ... + def + ef + f. ; 0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,22,24,26,28,20,22,24,26,28,30,32,34,36,38,30,32,34,36,38,40,42,44,46,48,40,42,44,46,48,50,52,54,56,58,50,52,54,56,58,60,62,64,66,68,60,62,64,66...
; A127984: a(n) = (n/3 + 7/9)*2^(n - 1) + (-1)^n/9. ; 1,3,7,17,39,89,199,441,967,2105,4551,9785,20935,44601,94663,200249,422343,888377,1864135,3903033,8155591,17010233,35418567,73633337,152859079,316902969,656175559,1357090361,2803659207,5786275385,11930464711,24576757305,50585170375,104033652281,213793927623,439041101...
; $Id: ASMWrMsrEx.asm 69111 2017-10-17 14:26:02Z vboxsync $ ;; @file ; IPRT - ASMWrMsrEx(). ; ; ; Copyright (C) 2013-2017 Oracle Corporation ; ; This file is part of VirtualBox Open Source Edition (OSE), as ; available from http://www.virtualbox.org. This file is free software; ; you can redistribute it and/or modify ...
SECTION code_clib SECTION code_fp_math48 PUBLIC _atanh_fastcall EXTERN cm48_sdcciy_atanh_fastcall defc _atanh_fastcall = cm48_sdcciy_atanh_fastcall
; A262450: Number of (n+3) X (1+3) 0..1 arrays with each row and column divisible by 15, read as a binary number with top and left being the most significant bits. ; 2,3,5,9,18,35,69,137,274,547,1093,2185,4370,8739,17477,34953,69906,139811,279621,559241,1118482,2236963,4473925,8947849,17895698,35791395,71582789,1431655...
_ps: file format elf32-i386 Disassembly of section .text: 00000000 <main>: #include "user.h" #include "fcntl.h" int main(int argc, char *argv[]) { 0: 8d 4c 24 04 lea 0x4(%esp),%ecx 4: 83 e4 f0 and $0xfffffff0,%esp 7: ff 71 fc pushl -0x4(%ecx) a: 55 ...
mov a #$05 add a #$0A mov b a
#include "cpu_profiler.h" #include "cpu_profile.h" namespace nodex { using v8::CpuProfile; using v8::Local; using v8::Object; using v8::Array; using v8::String; CpuProfiler::CpuProfiler () {} CpuProfiler::~CpuProfiler () {} #if (NODE_MODULE_VERSION > 0x0039) v8::CpuProfiler* current_cpuprofiler = v8::CpuProfiler::Ne...
; Copyright 2015-2021 Matt "MateoConLechuga" Waltz ; ; Redistribution and use in source and binary forms, with or without ; modification, are permitted provided that the following conditions are met: ; ; 1. Redistributions of source code must retain the above copyright notice, ; this list of conditions and the follo...
LKS_BackgroundY: lda LKS_BG.EnableY cmp #0 bne + rtl +: ;BG1 ldx LKS_BG.V_vadd1 stx VMADDL ldx LKS_BG.Dadd1_1 lda LKS_BG.Address1+2 ldy #$20 stx DMA_ADDL+$00 sta DMA_BANK+$00 sty DMA_SIZEL+$00 ldx LKS_BG.Dadd2_1 stx DMA_ADDL+$10 sta DMA_BANK+$10 sty DMA_SIZEL+$10 SNES_MDMA...
; A071724: a(n) = 3*binomial(2n,n-1)/(n+2), n > 0. a(0)=1. ; 1,1,3,9,28,90,297,1001,3432,11934,41990,149226,534888,1931540,7020405,25662825,94287120,347993910,1289624490,4796857230,17902146600,67016296620,251577050010,946844533674,3572042254128,13505406670700,51166197843852,194214400834356,738494264901008,2812744285440...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: FSEGTGameOverRuleController.cpp * Author: demensdeum * * Created on March 23, 2017, 11:45 PM */ #include "BRGameO...
dnl AMD64 mpn_addlsh2_n -- rp[] = up[] + (vp[] << 1) dnl AMD64 mpn_rsblsh2_n -- rp[] = (vp[] << 1) - up[] dnl Contributed to the GNU project by Torbjorn Granlund. dnl Copyright 2008, 2010-2012 Free Software Foundation, Inc. dnl This file is part of the GNU MP Library. dnl dnl The GNU MP Library is free softwar...
//---------------------------------------------------------------------------- // // TSDuck - The MPEG Transport Stream Toolkit // Copyright (c) 2005-2022, Thierry Lelegard // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the f...
LDA 2200H MOV B,A ; place value of N in register B to use as counter LXI H,2500H ; set up HL to point to first byte MVI A,00 ; clear accumulator to store sum MVI C,00 ; clear register C to store carry LOOP: ADC M ; add the content of addess specified by HL pair to accumulator ...
; A036044: BCR(n): write in binary, complement, reverse. ; 1,0,2,0,6,2,4,0,14,6,10,2,12,4,8,0,30,14,22,6,26,10,18,2,28,12,20,4,24,8,16,0,62,30,46,14,54,22,38,6,58,26,42,10,50,18,34,2,60,28,44,12,52,20,36,4,56,24,40,8,48,16,32,0,126,62,94,30,110,46,78,14,118,54,86,22,102,38,70,6,122,58,90,26,106,42,74,10,114,50,82,18,98...
#include <iostream> #include <fstream> #include <string> #include <new> #include <cstdio> #include <sstream> #include <cmath> using namespace std; int File_size(string name){ ifstream input( name ); int counter = 0; string str; while (std::getline(input, str)){ counter++; } return count...
; A175657: Eight bishops and one elephant on a 3 X 3 chessboard: a(n) = 3*2^n - 2*F(n+1), with F(n) = A000045(n). ; Submitted by Christian Krause ; 1,4,8,18,38,80,166,342,700,1426,2894,5856,11822,23822,47932,96330,193414,388048,778070,1559334,3123836,6256034,12525598,25073088,50181598,100420510,200933756,402017562,8042...
//============================================================================== // Copyright 2003 - 2011 LASMEA UMR 6602 CNRS/Univ. Clermont II // Copyright 2009 - 2011 LRI UMR 8623 CNRS/Univ Paris Sud XI // // Distributed under the Boost Software License, Version 1.0. // ...
[BITS 32] section .text [GLOBAL gdt_flush] gdt_flush: mov eax, [esp + 4] lgdt [eax] mov ax, 0x10 mov ds, ax mov es, ax mov fs, ax mov gs, ax mov ss, ax jmp 0x08:.flush .flush: ret
data segment ;a DW 0H,1H,2H,3H,4H,5H,6H,7H,8H,9H,40 DUP(10H) ;a DW 11H,02H,15H,32H,05H,08H,07H,09H,10H,09H,12H,07H,25H,19H,99H,45H,18H,32H,16H,64H, 30 DUP(5) a DW 40 DUP(10H),9H,8H,7H,6H,5H,4H,3H,2H,1H, 0H ;a DW 9995H, 7D4FH, 0FF56H, 0AD55H, 4521H, 45 DUP(1234H) ;注,将需要排序的数视为有符号数! LT DW 0H R...
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r13 push %r14 push %rbx push %rcx push %rdi push %rsi lea addresses_normal_ht+0x17ed0, %rsi lea addresses_UC_ht+0x1c388, %rdi nop nop nop and $29567, %r14 mov $49, %rcx rep movsl nop nop add $30214, %rbx lea addresses_normal_ht+0x12d6e, %r14 nop nop nop cmp %...
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2018 The Worldcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. // NOTE: This file is intended to be customised by the end user, and includes o...
; A192460: Constant term of the reduction by x^2->x+1 of the polynomial p(n,x) defined below in Comments. ; Submitted by Jamie Morken(w1) ; 0,2,13,123,1487,21871,378942,7557722,170519635,4293742365,119359055585,3630473717035,119930672906880,4275825418586810,163638018718726915,6690920298998362845,291099044600505086165,1...
# $s0 -> i, $s1 -> j # $a0 -> v[], $a1 -> n sort: # Save n ($a1) and $ra with stack addi $sp, $sp, -16 sw $ra, 12($sp) sw $a1, 8($sp) sw $s0, 4($sp) sw $s1, 0($sp) add $s0, $zero, $zero # i = 0 for_i: slt $t0, $s0, $a1 # Check i < n beq $t0, $zero, for_i_exit # If i >= n addi $s1, $s0, ...
SECTION code_fp_math48 PUBLIC asm_log2 EXTERN am48_log2 defc asm_log2 = am48_log2
<% from pwnlib.shellcraft import i386 %> <%page args="gid='egid'"/> <%docstring> Args: [gid (imm/reg) = egid] Sets the real and effective group id. </%docstring> % if gid == 'egid': /* getegid */ ${i386.linux.syscall('SYS_getegid')} ${i386.mov('ebx', 'eax')} % else: ${i386.mov('ebx', gid)} % endif...
; section .text ; global sum_to_n, loop, done ; sum_to_n: ; ; rdi = n ; xor rax, rax ; total = 0 ; xor rsi, rsi ; i = 0 (where do I save local vars)? ; cmp rsi, rdi ; i > n ? ; jg done ; loop: ; add rax, rsi ; total = total + i; ; inc rsi ; i++ ; cmp rsi, rdi ; i <= n ? ; jle ...
; A156331: a(n)=8*A154811(n). ; 8,16,40,32,56,64,64,56,32,40,16,8,8,16,40,32,56,64,64,56,32,40,16,8,8,16,40,32,56,64,64,56,32,40,16,8,8,16,40,32,56,64,64,56,32,40,16,8,8,16,40,32,56,64,64,56,32,40,16,8,8,16,40,32,56,64,64,56,32,40,16,8,8,16,40 mov $1,1 lpb $0 sub $0,1 add $2,$1 add $1,$2 mod $1,9 lpe sub $1,1 ...
#ifndef _UT_CSTL_AVL_TREE_PRIVATE_H_ #define _UT_CSTL_AVL_TREE_PRIVATE_H_ UT_SUIT_DECLARATION(cstl_avl_tree_private) UT_CASE_DECLARATION(_create_avl_tree_auxiliary) void test__create_avl_tree_auxiliary__null_avl_tree(void** state); void test__create_avl_tree_auxiliary__null_typename(void** state); void test__create_a...
#include "python_panel.hpp" #include "core_logging/logging.hpp" #include "core_reflection/reflected_object.hpp" #include "core_reflection/i_definition_manager.hpp" #include "core_reflection/reflection_macros.hpp" #include "core_reflection/metadata/meta_types.hpp" #include "core_reflection/function_property.hpp" #includ...
; A027689: a(n) = n^2 + n + 4. ; 4,6,10,16,24,34,46,60,76,94,114,136,160,186,214,244,276,310,346,384,424,466,510,556,604,654,706,760,816,874,934,996,1060,1126,1194,1264,1336,1410,1486,1564,1644,1726,1810,1896,1984,2074,2166,2260,2356,2454,2554,2656,2760,2866,2974,3084,3196,3310,3426,3544,3664,3786,3910,4036,4164,4294,4...