text stringlengths 1 1.05M |
|---|
; stage 2 boot loader.
; by Philip Simonson.
; =======================
[org 0x7e00]
[bits 16]
; global kernel_sectors_readed
start:
mov [iBootDrive], dl ; Save disk wee boot from
call reset_disk ; Reset the disk position
; set text mode (80x25)
mov ax, 0x0003
int 0x10
; Enable a20 line then check if a2... |
; A117717: Maximal number of regions obtained by a straight line drawing of the complete bipartite graph K_{n,n}.
; 0,2,13,45,116,250,477,833,1360,2106,3125,4477,6228,8450,11221,14625,18752,23698,29565,36461,44500,53802,64493,76705,90576,106250,123877,143613,165620,190066,217125,246977,279808,315810,355181,398125,44485... |
10 ORG 100H
20 JP MAIN
30GPF EQU 0BFD0H
40INKEY EQU 089BEH
50RPTCHR EQU 0BFEEH
60MAIN: CALL CLS
70 LD A,64
80MAIN0: PUSH AF
90 LD HL, SCR1_0
100 CALL DSPGPF
110 CALL WEHT
120 LD HL, SCR2_0
130 CALL DSPGPF
140 CALL WEHT
150 CALL WEHT
160 POP AF
170 DEC A
180 JP NZ,MAIN0
185 RET
190DSPGPF:; HL TOP ADDRESS
200 PUSH HL
2... |
; A071274: A071273 divided by 11.
; 1,2,3,4,5,6,7,8,9,10,101,192,283,374,465,556,647,738,829,20,111,202,293,384,475,566,657,748,839,30,121,212,303,394,485,576,667,758,849,40,131,222,313,404,495,586,677,768,859,50,141,232,323,414,505,596,687,778
mov $1,2
mov $3,$0
trn $3,9
mod $3,10
mov $2,$3
mul $2,90
sub $3,$3
add $3... |
<%
from pwnlib.shellcraft.i386.linux import syscall
%>
<%page args="fd, buf"/>
<%docstring>
Invokes the syscall fstat. See 'man 2 fstat' for more information.
Arguments:
fd(int): fd
buf(stat): buf
</%docstring>
${syscall('SYS_fstat', fd, buf)}
|
; NOTE: USEFUL DEBUG TOOL HERE: http://www.microchip.com/forums/m596618.aspx
;--------------------------------------------------------
; File: hi_speef_irq.asm
;--------------------------------------------------------
;
list p=18f45k50
;
radix dec
;
;--------------------------------------------------------
; public v... |
; WMAN system palette V1.02 2002 Marcel Kilgus
;
; 2005-03-25 1.01 Fixed error return of wm.jbpal (MK)
; 2017-12-13 1.02 Moved config to own file to reduce QDOS binary size (MK)
xdef wm_setsp
xdef wm_getsp
xdef wm_getspentry
xdef wm_initsp
xdef wm_jbpal
xdef wsp_winbd
xdef wsp_winbg
xdef wsp_winfg
xde... |
// Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
// de Barcelona (UAB).
//
// This work is licensed under the terms of the MIT license.
// For a copy, see <https://opensource.org/licenses/MIT>.
#include "Carla.h"
#include "Carla/Game/CarlaEpisode.h"
#include "Carla/Sensor/Sensor.h"
#incl... |
; A180033: Eight white queens and one red queen on a 3 X 3 chessboard. G.f.: (1 + x)/(1 - 5*x - 5*x^2).
; Submitted by Christian Krause
; 1,6,35,205,1200,7025,41125,240750,1409375,8250625,48300000,282753125,1655265625,9690093750,56726796875,332084453125,1944056250000,11380703515625,66623798828125,390022511718750,228323... |
// seed 3
lbi r0, 82 // icount 0
slbi r0, 95 // icount 1
lbi r1, 49 // icount 2
slbi r1, 53 // icount 3
lbi r2, 144 // icount 4
slbi r2, 55 // icount 5
lbi r3, 158 // icount 6
slbi r3, 55 // icount 7
lbi r4, 145 // icount 8
slbi r4, 129 // icount 9
lbi r5, 62 // icount 10
slbi r5, 131 // icount 11
lbi r6, 196 // icount... |
; A335439: a(n) = n*(n-1)/2 + 2^(n-1) - 1.
; 0,2,6,13,25,46,84,155,291,556,1078,2113,4173,8282,16488,32887,65671,131224,262314,524477,1048785,2097382,4194556,8388883,16777515,33554756,67109214,134218105,268435861,536871346,1073742288,2147484143,4294967823,8589935152,17179869778,34359738997,68719477401,137438954174,2748... |
if !def(_COMMON_)
_COMMON_ equ 1
; ======================
; STATES
; ======================
STATE_FADE_IN equ $00
STATE_RUN_FX equ $01
STATE_FADE_OUT equ $02
STATE_END_FX equ $03
STATE_WAIT_LOAD equ $04
; ======================
STACK_TOP equ $FFFE
; ======================
; CARILLON
; ======================
Player_... |
//
// C++ Implementation by Ajay Bhaga
//
// Modified Genetic Algorithm
// Based on Deep Learning Cars design of Samuel Arzt (March 2017)
// https://arztsamuel.github.io/en/projects/unity/deepCars/deepCars.html
//
#include "neural_layer.h"
#include <Urho3D/Math/MathDefs.h>
NeuralLayer::NeuralLayer() {
}
NeuralLayer:... |
# Made by Claudio and Beatriz
# October 31, 2019.
.data
Initial_msg: .asciiz "\nLet's play a guessing game. \nFind out the number between 1 and 10 that I generated. \nEnter 0 to give up\n\n"
Bigger_msg: .asciiz "\nMy number is bigger than that one...\n"
Smaller_msg: .asciiz "\nMy number is smaller than that one...\... |
; A048501: a(n) = 2^(n-1)*(8*n-14)+8.
; 1,2,12,48,152,424,1096,2696,6408,14856,33800,75784,167944,368648,802824,1736712,3735560,7995400,17039368,36175880,76546056,161480712,339738632,713031688,1493172232,3120562184,6509559816,13555990536,28185722888,58518929416,121332826120,251255586824,519691042824,1073741824008,22162... |
%macro display 2
mov rax, 1
mov rdi, 1
mov rsi, %1
mov rdx, %2
syscall
%endmacro
%macro accept 2
mov rax, 0
mov rdi, 0
mov rsi, %1
mov rdx, %2
syscall
%endmacro
global _start
_start:
display msg,len
accept num,3
call convert
cmp al,01h
ja fact
display msg1,len1
exit:
fact:
mov rcx,rax
dec rcx
... |
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r15
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WC_ht+0x16e4d, %rsi
lea addresses_WC_ht+0x34d5, %rdi
sub $10146, %r15
mov $37, %rcx
rep movsq
cmp %rdx, %rdx
lea addresses_UC_ht+0x18c4d, %r11
nop
nop
nop
nop
inc %rbx
movb $0x61, (%r11)
nop
... |
; A111706: a(n) = concatenation of k times the k-th digit of n.
; 1,2,3,4,5,6,7,8,9,20,21,22,23,24,25,26,27,28,29,40,41,42,43,44,45,46,47,48,49,60,61,62,63,64,65,66,67,68,69,80,81,82,83,84,85,86,87,88,89,100,101,102,103,104,105,106,107,108,109,120,121,122,123,124,125,126
add $0,1
mov $2,$0
mod $0,10
sub $0,$2
mov $1,$... |
<%
from pwnlib.shellcraft.i386.linux import syscall
%>
<%page args="mqdes, msg_ptr, msg_len, msg_prio, abs_timeout"/>
<%docstring>
Invokes the syscall mq_timedreceive. See 'man 2 mq_timedreceive' for more information.
Arguments:
mqdes(mqd_t): mqdes
msg_ptr(char): msg_ptr
msg_len(size_t): msg_len
... |
SECTION code_fp_am9511
PUBLIC round_fastcall
EXTERN _am9511_roundf
defc round_fastcall = _am9511_roundf
; SDCC bridge for Classic
IF __CLASSIC
PUBLIC _round_fastcall
defc _round_fastcall = _am9511_roundf
ENDIF
|
; A266225: Least x>1 such that prime(n)*x+x-1 is a prime, or -1 if no such x exists.
; Submitted by Jon Maiga
; 2,2,2,3,2,3,3,3,2,2,4,3,2,3,4,2,3,7,4,5,6,3,2,2,3,5,3,4,4,2,3,2,6,3,3,4,4,3,3,2,2,4,2,6,3,3,7,7,3,4,2,2,4,2,3,5,3,4,6,2,7,2,4,5,3,3,4,3,6,3,3,2,3,6,7,3,4,3,4,3,2,6,2,3,3,2,6
seq $0,40 ; The prime numbers.
se... |
mul_tbl:
.db $00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$00,$00,$01,$01,$01,$01
.db $01,$01,$01,$01,$02,$02,$02,$02
.db $02,$02,$03,$03,$03,$03,$04,$04
.db $04,$04,$05,$05,$05,$05,$06,$06
.db $06,$07,$07,$07,$08,$08,$08,$09
.db $09,$09,$0a,$0a,$0b,$0b,$0b,$0c
.db $0c,$0d,$0d,$0e,$0e,$0f... |
org 10000h
mov ax,cs
mov ds,ax
mov es,ax
mov ax,0x00
mov ss,ax
mov sp,0x7c00
;========= display on screen:Start Loader...
mov ax,1301h
mov bx,000fh
mov dx,0200h
mov cx,12
push ax
mov ax,ds
mov es,ax
pop ax
mov bp,StartLoaderMessage
int 10h
jmp $
;========= dispaly message
StartLoaderMessage: db "Start Loader" |
dnl S/390-64 mpn_submul_1
dnl Copyright 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... |
user/_grep: file format elf64-littleriscv
Disassembly of section .text:
0000000000000000 <matchstar>:
return 0;
}
// matchstar: search for c*re at beginning of text
int matchstar(int c, char *re, char *text)
{
0: 7179 addi sp,sp,-48
2: f406 sd ra,40(sp)
4: f022 ... |
;
; Copyright (c) 2021, Alliance for Open Media. All rights reserved
;
; This source code is subject to the terms of the BSD 2 Clause License and
; the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
; was not distributed with this source code in the LICENSE file, you can
; obtain it at www.aome... |
; ========================================================
COMMENT #
KEYBOARD.ASM
Copyright (c) 1991 - Microsoft Corp.
All rights reserved.
Microsoft Confidential
Functions to use the ROM BIOS for getting
input from keyboard via interrupt 16h
Video initialization function. This function
must be called bef... |
; A340368: Multiplicative with a(p^e) = (p - 1) * (p + 1)^(e-1).
; Submitted by Christian Krause
; 1,1,2,3,4,2,6,9,8,4,10,6,12,6,8,27,16,8,18,12,12,10,22,18,24,12,32,18,28,8,30,81,20,16,24,24,36,18,24,36,40,12,42,30,32,22,46,54,48,24,32,36,52,32,40,54,36,28,58,24,60,30,48,243,48,20,66,48,44,24,70,72,72,36,48,54,60,24,7... |
/*
Copyright 2016 Google Inc.
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, softwar... |
TMHMMoves:
; entries correspond to *_TMNUM enums (see constants/item_constants.asm)
; TMs
db DYNAMICPUNCH ; TM01
db HEADBUTT ; TM02
db CURSE ; TM03
db ROLLOUT ; TM04
db ROAR ; TM05
db TOXIC ; TM06
db ZAP_CANNON ; TM07
db ROCK_SMASH ; TM08
db PSYCH_UP ; TM09
db HIDDEN_POWER ; TM10
db SUNNY_DAY ; TM11
... |
; A175831: Partial sums of ceiling(n^2/12).
; 0,1,2,3,5,8,11,16,22,29,38,49,61,76,93,112,134,159,186,217,251,288,329,374,422,475,532,593,659,730,805,886,972,1063,1160,1263,1371,1486,1607,1734,1868,2009,2156,2311,2473,2642,2819,3004,3196,3397,3606,3823,4049,4284,4527,4780,5042,5313,5594,5885,6185,6496,6817,7148,7490,784... |
; double __FASTCALL__ exp(double x)
SECTION code_clib
SECTION code_fp_math48
PUBLIC cm48_sccz80_exp
EXTERN am48_exp
defc cm48_sccz80_exp = am48_exp
|
; A222068: Decimal expansion of (1/16)*Pi^2.
; Submitted by Christian Krause
; 6,1,6,8,5,0,2,7,5,0,6,8,0,8,4,9,1,3,6,7,7,1,5,5,6,8,7,4,9,2,2,5,9,4,4,5,9,5,7,1,0,6,2,1,2,9,5,2,5,4,9,4,1,4,1,5,0,8,3,4,3,3,6,0,1,3,7,5,2,8,0,1,4,0,1,2,0,0,3,2,7,6,8,7,6,1,0,8,3,7,7,3,2,4,0,9,5,1,4,4
add $0,1
mov $1,1
mov $2,1
mov $3,$0
mul... |
; A212747: Number of (w,x,y,z) with all terms in {0,...,n} and 2w=floor((x+y+z)/2)).
; 1,4,13,32,63,108,171,256,365,500,665,864,1099,1372,1687,2048,2457,2916,3429,4000,4631,5324,6083,6912,7813,8788,9841,10976,12195,13500,14895,16384,17969,19652,21437,23328,25327,27436,29659,32000
mov $15,$0
mov $17,$0
add $17,1
lpb $1... |
; A079252: Even numbers not in A079000.
; 2,10,12,14,22,24,26,28,30,32,46,48,50,52,54,56,58,60,62,64,66,68,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,190,192,194,196,198,200,202,204,206
mul $0,2
mov $1,2
lpb $0
mul $1,2
add $1,1
mov $2,$0
sub $0,$1
trn $0,1
l... |
copyright zengfr site:http://github.com/zengfr/romhack
00042A move.l D1, (A0)+
00042C dbra D0, $42a
004D26 move.l D0, (A4)+
004D28 move.l D0, (A4)+
0206FA clr.b ($72,A6) [base+7B1]
0206FE move.b #$ff, ($73,A6)
0AAACA move.l (A0), D2
0AAACC move.w D0, (A0) [123p+11A, 123p+11C, 123p+11E, 123p+12... |
#include "lm/builder/adjust_counts.hh"
#include "lm/common/ngram_stream.hh"
#include "lm/builder/payload.hh"
#include "util/scoped.hh"
#include <boost/thread/thread.hpp>
#define BOOST_TEST_MODULE AdjustCounts
#include <boost/test/unit_test.hpp>
namespace lm { namespace builder { namespace {
class KeepCopy {
publi... |
; DV3 Atari Find Partition V3.00 1992 Tony Tebby
section dv3
xdef hd_fpart
include 'dev8_keys_err'
include 'dev8_keys_qlwa'
include 'dev8_keys_atari'
include 'dev8_dv3_keys'
include 'dev8_dv3_hd_keys'
;+++
; DV3 Atari find partition.
; It starts by loading and examining the root sector.
;
; d1 r as d3 but ... |
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %rax
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_normal_ht+0x1d83d, %rdx
clflush (%rdx)
nop
nop
sub $24679, %rsi
mov $0x6162636465666768, %r11
movq %r11, %xmm5
movups %xmm5, (%rdx)
nop
nop
nop
nop
cmp %rdx, %rdx
lea addresses_WC_h... |
; Hello, World! for VGS8 by SUZUKI PLAN (PUBLIC DOMAIN)
.setcpu "6502"
.autoimport on
;-------------------------------------------------------------------------------
; Program entry point & main loop
;-------------------------------------------------------------------------------
.segment "STARTUP"
jsr initia... |
.byte $01 ; Unknown purpose
.byte OBJ_PODOBOO, $0E, $0D
.byte OBJ_PODOBOO, $12, $0F
.byte OBJ_PODOBOO, $19, $10
.byte OBJ_PODOBOO, $17, $0D
.byte OBJ_PODOBOO, $1E, $11
.byte OBJ_PODOBOO, $23, $10
.byte OBJ_PODOBOO, $2B, $0F
.byte OBJ_PODOBOO, $25, $0B
.byte OBJ_PODOBOO, $33, $0F
.byte $FF ; Terminator
|
; A153282: Numbers n such that 3*n+4 is not prime.
; Submitted by Jamie Morken(s2)
; 0,2,4,6,7,8,10,12,14,15,16,17,18,20,22,24,26,27,28,29,30,32,34,36,37,38,39,40,42,43,44,46,47,48,50,52,54,55,56,57,58,60,61,62,64,66,67,68,70,71,72,74,76,77,78,80,81,82,83,84,85,86,87,88,90,92,94,95,96,97,98,99,100,102,104,105,106,107,1... |
;
; Command-line interface parser
;
CLI_BUFFER_SIZE: equ 255
CLI: MACRO
fileInfoBlockReference:
dw 0
loops:
db 2
blackout:
db 0
fileInfoBlock:
FileInfoBlock
_size:
ENDM
; ix = this
; ix <- this
CLI_Construct:
jr CLI_Parse
; ix = this
; ix <- this
CLI_Destruct: equ System_Return
; ret
; ix = this
; ix... |
; A051673: Cubic star numbers: a(n) = n^3 + 4*Sum_{i=0..n-1} i^2.
; 0,1,12,47,120,245,436,707,1072,1545,2140,2871,3752,4797,6020,7435,9056,10897,12972,15295,17880,20741,23892,27347,31120,35225,39676,44487,49672,55245,61220,67611,74432,81697,89420,97615,106296,115477,125172,135395,146160,157481,169372,181847,194920,2086... |
; int bv_priority_queue_pop(bv_priority_queue_t *q)
SECTION code_clib
SECTION code_adt_bv_priority_queue
PUBLIC bv_priority_queue_pop
EXTERN asm_bv_priority_queue_pop
defc bv_priority_queue_pop = asm_bv_priority_queue_pop
; SDCC bridge for Classic
IF __CLASSIC
PUBLIC _bv_priority_queue_pop
defc _bv_priority_queue... |
%define sys_write 1
%define sys_exit 60
%define sys_stdout 1
%define sys_stderr 2
section .data
usage_msg: db `usage: substring <string> <start> [<end>]\n`
usage_msg_len: equ $ - usage_msg
bad_number: db `invalid positive number\n`
bad_number_len: equ $ - bad_number
section .text
global _start
_start:
m... |
; A206258: 1/8 the number of 2 X 2 -n..n arrays with a 2 X 2 -n..n inverse, i.e., with determinant +-1.
; 5,13,29,45,77,93,141,173,221,253,333,365,461,509,573,637,765,813,957,1021,1117,1197,1373,1437,1597,1693,1837,1933,2157,2221,2461,2589,2749,2877,3069,3165,3453,3597,3789,3917,4237,4333,4669,4829,5021,5197,5565,5693,... |
copyright zengfr site:http://github.com/zengfr/romhack
0013D6 beq $1442 [base+2FA]
0013E2 subq.w #1, ($2fa,A5) [base+2E8]
0013E6 move.w #$4, ($2,A1) [base+2FA]
0014D8 addq.w #1, ($2fa,A5) [base+2E8]
0014DC move.w #$6, D6 [base+2FA]
01A77A move.w A6, ($2e8,A5) [base+2FA]
copyright zengfr site:http://gith... |
.size 8000
.text@48
jp lstatint
.text@100
jp lbegin
.data@143
80
.text@150
lbegin:
ld a, ff
ldff(45), a
ld b, 91
call lwaitly_b
xor a, a
ldff(40), a
ld hl, fea0
lbegin_fill_oam:
dec l
ld(hl), a
jrnz lbegin_fill_oam
ld hl, fe00
ld d, 10
ld a, d
ld(hl), a
inc l
ld a, 08
ld(hl), a
ld a, 93
ldff(4... |
#include "../../engine/lang/old_parser.hpp"
#include "../../engine/lang/error_handling.hpp"
#include "../../engine/core/node_manager.hpp"
namespace zhetapi {
// TODO: make sure to guard for EOFs
// TODO: put elsewhere
bool is_true(Token *tptr)
{
static const Operand <bool> true_token(true);
return true_token == t... |
; sp1_RemoveUpdateStruct
; 04.2006 aralbrec, Sprite Pack v3.0
; sinclair zx version
SECTION code_clib
SECTION code_temp_sp1
PUBLIC sp1_RemoveUpdateStruct
EXTERN asm_sp1_RemoveUpdateStruct
defc sp1_RemoveUpdateStruct = asm_sp1_RemoveUpdateStruct
|
#include <iostream>
#include <map>
#include <algorithm>
#include <numeric>
#include <iomanip>
#include <string>
#include <string_view>
std::map<char, double> analyze_text(std::string_view text)
{
std::map<char, double> frequencies;
for (char ch = 'a'; ch <= 'z'; ch++)
frequencies[ch] = 0;
for (auto ch ... |
;/**
; * @file
; *
; * Agesa library 32bit
; *
; * Contains AMD AGESA Library
; *
; * @xrefitem bom "File Content Label" "Release Content"
; * @e project: AGESA
; * @e sub-project: Lib
; * @e \$Revision: 9201 $ @e \$Date: 2008-10-31 03:36:20 -0500 (Fri, 31 Oct 2008) $
; */
;*************************************... |
<%
from pwnlib.shellcraft.aarch64.linux import syscall
%>
<%page args="fd, offset, count"/>
<%docstring>
Invokes the syscall readahead. See 'man 2 readahead' for more information.
Arguments:
fd(int): fd
offset(off64_t): offset
count(size_t): count
</%docstring>
${syscall('SYS_readahead', fd, off... |
; Get information on a job V2.00 1986 Tony Tebby QJUMP
section sms
xdef sms_injb ; information on job
xdef sms_nxjb ; next job in tree
xref sms_ckjx ; check job exists
xref sms_ckid ; check job... |
; Assembly for testfmul-bytecode.bas
; compiled with mcbasic
; Equates for MC-10 MICROCOLOR BASIC 1.0
;
; Direct page equates
DP_LNUM .equ $E2 ; current line in BASIC
DP_TABW .equ $E4 ; current tab width on console
DP_LPOS .equ $E6 ; current line position on console
DP_LWID .equ $E7 ; current line width of console
; ... |
; /*******************************************************************
; *
; * Author: Kareem Omar
; * kareem.h.omar@gmail.com
; * https://github.com/komrad36
; *
; * Last updated Oct 11, 2020
; *******************************************************************/
_TEXT$FastMaxIdxI32 SEGMENT ALIGN(64)
Fast... |
; MSX C stub
;
; Stefano Bodrato - Apr. 2001
;
; $Id: msx_crt0.asm,v 1.49 2016-07-15 21:38:08 dom Exp $
;
; There are a couple of #pragma commands which affect
; this file:
;
; #pragma output nostreams - No stdio disc files
; #pragma output nofileio - No fileio at all, use in conjunction to "-l... |
; A277176: Exponential convolution of Catalan numbers and factorial numbers.
; Submitted by Jamie Morken(s3)
; 1,2,6,23,106,572,3564,25377,204446,1844876,18465556,203179902,2438366836,31699511768,443795839192,6656947282725,106511191881270,1810690391626380,32592427526913540,619256124778620450,12385122502136529420,260087... |
#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "CPlatTrigger.h"
#include "CFuncPlat.h"
BEGIN_DATADESC( CFuncPlat )
DEFINE_USEFUNC( PlatUse ),
DEFINE_THINKFUNC( CallGoDown ),
DEFINE_THINKFUNC( CallHitTop ),
DEFINE_THINKFUNC( CallHitBottom ),
END_DATADESC()
LINK_ENTITY_TO_CLASS( func_plat, CFunc... |
allram:
;; check if already in all RAM mode
lda $8000
tfr a,b
com $8000
eora $8000
beq rom
stb $8000
rts
;; copy ROMs to RAM
rom:
pshs cc
orcc #$50 ; disable interrupts
sts $fe
lds #$8000
loop@:
clr RAMROM
puls a,b,x,y,u
clr RAMRAM
pshs u,y,x,a,b
leas 8,s
cmps #$ff00
ble loop@
lds $fe
puls c... |
global _start
section .text
_start:
mov rax, 1 ; write(
mov rdi, 1 ; STDOUT_FILENO,
mov rsi, msg ; "Hello, world!\n",
mov rdx, msglen ; sizeof("Hello, world!\n")
syscall ; );
mov rax, 60 ; exit(
mov rdi, 0 ; EXIT_SUCCESS
syscall ; );
sect... |
; Test: some test for removing useless code generated some times by SDCC
xor a
ld (hl),a
xor a ; <-- this should be removed
ld (de),a
inc hl
ld (hl),0 ; <-- this should be optimized to ld (hl),a
inc hl
ld a,(ix)
ld (hl),a
inc hl
xor a ; <-- these two instructions should be optimized to ld a,10
add a,10
... |
////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2016 ArangoDB GmbH, Cologne, Germany
///
/// 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... |
/*
*
* Copyright (c) 2020-2021 Project CHIP Authors
*
* 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 r... |
// | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Jordi Cotela
//
// System includes
// External ... |
DATARES SEGMENT PUBLIC
DATARES ENDS
TRANDATA SEGMENT PUBLIC
EXTRN OVERWR:BYTE,FULDIR:BYTE,LOSTERR:BYTE
EXTRN DEVWMES:BYTE,INBDEV:BYTE,NOSPACE:BYTE
TRANDATA ENDS
TRANSPACE SEGMENT PUBLIC
EXTRN CFLAG:BYTE,NXTADD:WORD,DESTCLOSED:BYTE
EXTRN PLUS:BYTE,BINARY:B... |
;
; ZX Spectrum specific routines
; by Stefano Bodrato, 11/08/2006
;
; int zx_disciple();
;
; The result is:
; - 0 (false) DISCiPle-like interface is not present
; - 1 DISCiPle is installed
; - 2 +D is installer
;
; $Id: zx_disciple.asm,v 1.1 2008/06/29 08:25:47 aralbrec Exp $
;
XLIB zx_disciple
zx_disciple:
ld a,... |
; ASM source file created by SevenuP v1.21
; SevenuP (C) Copyright 2002-2007 by Jaime Tejedor Gomez, aka Metalbrain
;GRAPHIC DATA:
;Pixel Size: ( 24, 32)
;Char Size: ( 3, 4)
;Frames: 4
;Sort Priorities: X char, Char line, Y char, Frame number
;Data Outputted: Gfx
;Interleave: Sprite
;M... |
; A071236: a(n) = (n^10 + n^5)/2.
; 0,1,528,29646,524800,4884375,30236976,141246028,536887296,1743421725,5000050000,12968792826,30958806528,68929431571,144627596400,288325575000,549756338176,1007997660153,1785234558096,3065534366950,5120001600000,8339942531151,13279963972528,20713258824996,31701694464000,47683720703125... |
; A022129: Fibonacci sequence beginning 3, 20.
; Submitted by Jamie Morken(s4)
; 3,20,23,43,66,109,175,284,459,743,1202,1945,3147,5092,8239,13331,21570,34901,56471,91372,147843,239215,387058,626273,1013331,1639604,2652935,4292539,6945474,11238013
mov $1,3
mov $2,17
lpb $0
sub $0,1
mov $3,$2
mov $2,$1
add $1,$3... |
; A258114: E.g.f.: Sum_{n>=0} x^n * cosh(n*x).
; Submitted by Christian Krause
; 1,1,2,9,72,665,6960,85057,1199744,19070865,336372480,6522635801,137996694528,3163206890857,78085740701696,2065239729737745,58263449436979200,1746433243580269217,55428341343200280576,1856918215298125692073,65483209810866254643200,2424691204... |
;
; Copyright (C) 2019 Assured Information Security, 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... |
//*****************************************************************************
// Copyright 2017-2020 Intel Corporation
//
// 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://w... |
push ebp
mov ebp,esp
push ecx
call dword ptr ds:[95D1BCh]
mov ecx,dword ptr [dev]
mov edx,ecx
and edx,0FFFFF000h
imul edx,eax
xor edx,ecx
and edx,3F000h
xor edx,ecx
mov dword ptr [dev... |
; A004690: Fibonacci numbers written in base 7.
; 0,1,1,2,3,5,11,16,30,46,106,155,264,452,1046,1531,2610,4441,10351,15122,25503,43625,102431,146356,252120,431506,1013626,1445435,2462364,4241132,10033526,14304661,24341520,41646511,66321331,141301142,240622503,412223645,653146451,1365403426,2351553210,4050256636,64321431... |
; A137180: Number of palindromes in the range [1,n] inclusive.
; 0,1,2,3,4,5,6,7,8,9,9,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15
mov $2,11
lpb $0,1
div $0,$2
add $0,... |
; A009545: E.g.f. sin(x)*exp(x).
; 0,1,2,2,0,-4,-8,-8,0,16,32,32,0,-64,-128,-128,0,256,512,512,0,-1024,-2048,-2048,0,4096,8192,8192,0,-16384,-32768,-32768,0,65536,131072,131072,0,-262144,-524288,-524288,0,1048576,2097152,2097152,0,-4194304,-8388608,-8388608,0,16777216,33554432,33554432,0,-67108864,-134217728,-134217728... |
<%
import collections
import pwnlib.abi
import pwnlib.constants
import pwnlib.shellcraft
import six
%>
<%docstring>fsetxattr(fd, name, value, size, flags) -> str
Invokes the syscall fsetxattr.
See 'man 2 fsetxattr' for more information.
Arguments:
fd(int): fd
name(char*): name
value(void*): value
siz... |
#include "label.h"
Label::Label(int label)
{
this->label = label;
}
void LabelDestroyer::destroy(void *l)
{
delete static_cast<Label *>(l);
}
bool LabelComparator::compatible(void *m, void *n)
{
auto *l_m = (Label *)m;
auto *l_n = (Label *)n;
return l_m->label == l_n->label;
}
std::istream &operator>>(std::ist... |
; A192386: Constant term of the reduction by x^2->x+1 of the polynomial p(n,x) defined below in Comments.
; Submitted by Christian Krause
; 1,0,8,8,96,224,1408,4608,22784,86016,386048,1548288,6676480,27467776,116490240,484409344,2040135680,8521777152,35786063872,149761818624,628140015616,2630784909312,11028578435072,46... |
;; Licensed to the .NET Foundation under one or more agreements.
;; The .NET Foundation licenses this file to you under the MIT license.
;; -----------------------------------------------------------------------------------------------------------
;;#include "asmmacros.inc"
;; ----------------------------------------... |
;***************************************************************************
; DEFINE SECTION
;***************************************************************************
include "VECTREX.I" ; vectrex function includes
; start of vectrex memory with cartridge name...
org ... |
// Copyright (c) 2014-2015 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "timedata.h"
#include "netbase.h"
#include "sync.h"
#include "ui_interface.h"
#include "util.h"
#include "utilstren... |
; A175708: n-th semiprime minus n.
; Submitted by Jon Maiga
; 3,4,6,6,9,9,14,14,16,16,22,22,22,24,24,30,32,33,36,37,37,40,42,45,49,51,55,57,57,57,60,61,61,61,71,75,78,80,80,81,81,81,86,89,89,95,95,95,96,96,104,106,106,107,111,113,120,120,124,125,126,132,138,138,138,139
mov $9,$0
mov $11,$0
add $11,1
lpb $11
mov $0,$... |
.global s_prepare_buffers
s_prepare_buffers:
push %r14
push %r15
push %r9
push %rbx
push %rcx
push %rsi
lea addresses_D_ht+0x6dad, %r9
nop
nop
nop
nop
nop
and $39479, %rbx
mov (%r9), %r15d
nop
nop
nop
nop
cmp $15365, %r9
lea addresses_UC_ht+0x15ccd, %rsi
nop
nop
nop
nop
nop
xor %r14, %r14
movb $0x61, (%rsi)
nop
dec %rs... |
/* ******************************************************************************
*
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
* See the NOTICE file distributed wit... |
/*
MUTEXES
Without synchronization (by a mutex), we are not sure that result = 30000
std::lock_guard is a class template, which implements the RAII for mutex.
It wraps the mutex inside it’s object and locks the attached mutex in its constructor.
When it’s destructor is called it releases the mutex.
*/
#include <ios... |
// MusicXML Class Library
// Copyright (c) by Matthew James Briggs
// Distributed under the MIT License
#include "mx/core/elements/KeyAttributes.h"
#include "mx/core/FromXElement.h"
#include <iostream>
namespace mx
{
namespace core
{
KeyAttributes::KeyAttributes()
:number()
,defaultX()... |
.data
opt_str : .asciiz "Opzioni:\n(1) - Inserisci un elemento nello stack\n(2) - Rimuovi l'elemento in cima allo stack\n(3) - Stampa il contenuto dello stack\n(4) - Esci\n> "
x_str: .asciiz "X? "
y_str: .asciiz "Y? "
a_str: .asciiz "Angle? "
.text
.globl main
main:
loop:
li $v0, 4
la $a0, opt_str
syscall
li... |
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: SegmentationExamples.cxx
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Insight Software Consortium. All rights reserved.
See ITKCopyright.t... |
#include "reporter/impl/different_type_reporter/rp_different_type_reporter_details.hpp"
#include "model_includes/api/enums/mi_include_type.hpp"
#include "model_includes/api/mi_include.hpp"
#include "exception/ih/exc_internal_error.hpp"
//------------------------------------------------------------------------------
... |
;--- 32-bit sample: using Open Watcom's register calling convention
;--- assemble: jwasm -zf1 owfc32.asm
;--- link Win32: wlink sys nt file owfc32.obj
;--- link Linux: wlink format elf runtime linux file owfc32.obj
.386
.model flat, fastcall
includelib clib3r.lib
includelib math387r.lib
extern... |
//
// matrix_gemm.cpp
// jpcnn
//
// Created by Peter Warden on 1/9/14.
// Copyright (c) 2014 Jetpac, Inc. All rights reserved.
//
#include "matrix_ops.h"
#include <stdio.h>
#include <assert.h>
#include <stdint.h>
#include <stdlib.h>
#ifdef USE_ACCELERATE_GEMM
#include <Accelerate/Accelerate.h>
#endif
#ifdef US... |
; A014038: Inverse of 29th cyclotomic polynomial.
; 1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-1,0,0,0,0,0,0,0,0,0,0,0
sub $1,$0
mod $1,29
pow $1,$1
mov $0,$1
|
###############################################################################
# Copyright 2019 Intel Corporation
# All Rights Reserved.
#
# If this software was obtained under the Intel Simplified Software License,
# the following terms apply:
#
# The source code, information and material ("Material") containe... |
0x0000 (0x000000) 0x1800-0x602E f:00014 d: 0 | A = 24622 (0x602E)
0x0002 (0x000004) 0x291A- f:00024 d: 282 | OR[282] = A
0x0003 (0x000006) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0004 (0x000008) 0x291B- f:00024 d: 283 | OR[283] = A
... |
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r14
push %r15
push %r8
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0x2545, %rax
nop
nop
nop
nop
sub %r15, %r15
movb $0x61, (%rax)
nop
nop
nop
nop
nop
and $19218, %r8
lea addresses_A_ht+0x3755, %rdi
clflush (%rdi)
nop
nop
nop
nop
nop
x... |
// Copyright (c) 2020 fortiss GmbH
//
// Authors: Julian Bernhard, Klemens Esterle, Patrick Hart and
// Tobias Kessler
//
// This work is licensed under the terms of the MIT license.
// For a copy, see <https://opensource.org/licenses/MIT>.
#include <csignal>
#include <string>
#include "bark/commons/util/segfault_han... |
;
; ***********************************
; * (Driver for PCF8574 expander) *
; * (ATtiny85) *
; * (C)2021 by Paweł Standowicz *
; ***********************************
;
.nolist
.include "tn85def.inc" ; Define device ATtiny85
.list
;
; **********************************
; H A R D W A R E
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.