content
stringlengths
23
1.05M
-- AoC 2020, Day 9 with Ada.Text_IO; with Ada.Containers.Ordered_Sets; package body Day is package TIO renames Ada.Text_IO; function load_file(filename : in String) return XMAS_Vector.Vector is package Long_Integer_Text_IO is new Ada.Text_IO.Integer_IO(Long_Integer); file : TIO.File_Type; v : XMAS_Ve...
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
<?xml version="1.0" encoding="utf-8" ?> <Advertisements> <Ad> <ImageUrl>~/images/Contoso_ad.gif</ImageUrl> <NavigateUrl>AdRedirector.aspx?ad=Widgets&amp;target=http://www.contoso.com/widgets/</NavigateUrl> <AlternateText>Ad for Contoso.com</AlternateText> </Ad> <Ad> <ImageUrl>~/images/ASPNET_ad.gi...
with SPARKNaCl; use SPARKNaCl; with SPARKNaCl.Sign; use SPARKNaCl.Sign; with SPARKNaCl.Debug; use SPARKNaCl.Debug; with Ada.Command_Line; use Ada.Command_Line; with Ada.Exceptions; use Ada.Exceptions; with Ada.Streams; use Ada.Streams; with Ada.Streams.Stream_IO; use Ada.Streams.Stream_IO;...
pragma Style_Checks (Off); package Mat.Expressions.Parser_Tokens is subtype yystype is MAT.Expressions.yystype; YYLVal, YYVal : YYSType; type Token is (End_Of_Input, Error, T_Name, T_Int, T_String, T_Select, T_With, T_At, T_By, T_In, T_Not, T_Or, T_And, T_Size,...
with Loop_Optimization8_Pkg2; package body Loop_Optimization8_Pkg1 is Data : Loop_Optimization8_Pkg2.T := new Loop_Optimization8_Pkg2.Obj_T'(Length =>1, Elements => (1 => 1)); procedure Iter is begin for I in 1 .. Loop_Optimization8_Pkg2.Length (Data) loop Action (Loop_Optimization8_Pkg2.Index (D...
with STM32.ADC; use STM32.ADC; with Pins_STM32F446; use Pins_STM32F446; with HAL; use HAL; with STM32.Device; package body Analog is -- From STM32F40x datasheet: -- Channel ADC -- # 1 -- -- 0 PA0 -- 1 PA1 -- 2 PA2 -- 3 PA3 ...
package Atmosphere_Types.Objects is pragma Elaborate_Body; Object_01 : constant Orka.Behaviors.Behavior_Ptr := new Physics_Behavior' (Frame => ECI, others => <>); Object_02 : constant Orka.Behaviors.Behavior_Ptr := new Physics_Behavior' (Frame => ECEF, others => <>); Object_03 : constant Orka.Be...
package Father is type Father_Type is new Integer; private procedure Father_What (A : in out Father_Type); end Father;
with Ada.Exceptions; with Ada.Text_IO; use Ada.Text_IO; with Ada.Assertions; with Adventofcode.File_Line_Readers; procedure Adventofcode.Day_5.Main is procedure Test (Pattern : String; Expected : Seat_Id_Type) is Actual : constant Seat_Id_Type := Get_Seat_Id (From => Pattern); begin Ada.Assertions.Ass...
-- Ada_GUI implementation based on Gnoga. Adapted 2021 -- -- -- GNOGA - The GNU Omnificent GUI for Ada -- -- -- -- G N O G A . G U I...
-- -- The author disclaims copyright to this source code. In place of -- a legal notice, here is a blessing: -- -- May you do good and not evil. -- May you find forgiveness for yourself and forgive others. -- May you share freely, not taking more than you give. -- with Ada.Text_IO; package body Symbols.IO...
with Interfaces.C.Strings, System; use type System.Address; package body FLTK.Widgets.Valuators.Sliders is procedure slider_set_draw_hook (W, D : in System.Address); pragma Import (C, slider_set_draw_hook, "slider_set_draw_hook"); pragma Inline (slider_set_draw_hook); pr...
------------------------------------------------------------------------------ -- G E L A A S I S -- -- ASIS implementation for Gela project, a portable Ada compiler -- -- http://gela.ada-ru.org -- -- ...
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- ...
with Float_Support; use Float_Support; package Fractals is type Coordinate is record X : Base_Float; Y : Base_Float; end record; type Screen is record X0, Y0, Width, Height : Base_Float; end record; type Fractal is abstract tagged null record; type Fractal_Ref is access all Fract...
with Ada.Containers.Vectors; package BigInteger is type BigInt is private; function Create(l : in Long_Long_Integer) return BigInt; function Create(s : in String) return BigInt; -- Two Big Ints function "+" (Left, Right: in BigInt) return BigInt; function "-" (Left, Right: in BigInt) return BigInt; ...
with Ada.Text_IO; use Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; procedure Check_Positive is N : Integer; begin Put_Line ("Enter an integer value: "); Get (N); if N > 0 then Put_Line (N); Put_Line (" is a positive number"); end if; end Check_Positive;
------------------------------------------------------------------------------ -- G E L A A S I S -- -- ASIS implementation for Gela project, a portable Ada compiler -- -- http://gela.ada-ru.org -- -- ...
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- ...
with Ada.Text_IO; use Ada.Text_IO; procedure Main is type List_T is array (Integer range <>) of Integer; -- Is_Found will search a list for an item and will -- return True if the item is found in the list -- function Is_Found ( ? -- Sort will sort a list -- procedure Sort ( ? -- Fill will ask t...
------------------------------------------------------------------------------ -- Copyright (C) 2020 by Heisenbug Ltd. (gh+spat@heisenbug.eu) -- -- This work is free. You can redistribute it and/or modify it under the -- terms of the Do What The Fuck You Want To Public License, Version 2, -- as published by Sam Hoc...
-- SPDX-FileCopyrightText: 2020 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ---------------------------------------------------------------- with League.Strings; limited with Markdown.Visitors; package Markdown.Blocks is type Block is abstract tagged limited private; type Block_Access...
------------------------------------------------------------------------------ -- -- -- Internet Protocol Suite Package -- -- -- -- -...
with AWS.Client; with AWS.Response; with Ada.Text_IO; use Ada.Text_IO; procedure GetHttps is begin Put_Line (AWS.Response.Message_Body (AWS.Client.Get ( URL => "https://sourceforge.net/"))); end GetHttps;
pragma Ada_2012; pragma Style_Checks (Off); with Interfaces.C; use Interfaces.C; with bits_types_h; package bits_types_struct_timespec_h is -- NB: Include guard matches what <linux/time.h> uses. -- POSIX.1b structure for a time value. This is like a `struct timeval' but -- has nanoseconds instead of micr...
package body Problem_3 is function Solution_1( Comp : Int64 ) return Int64 is Primes : P.Vector := Prime_Factorization(Comp); begin return Int64(Primes.Last_Element.Prime); end Solution_1; function Prime_Factorization( Num : Int64 ) return P.Vector is Upper : constant Int64 := ...
; char *fgets(char *s, int n, FILE *stream) SECTION code_clib SECTION code_stdio PUBLIC fgets_unlocked EXTERN asm_fgets_unlocked fgets_unlocked: pop af pop ix pop bc pop de push de push bc push hl push af jp asm_fgets_unlocked
;************************* cachesize64.asm ************************************* ; Author: Agner Fog ; Date created: 2011-07-11 ; Last modified: 2013-08-14 ; Description: ; Determines the size of the data caches ; ; extern "C" site_t DataCacheSize(int level); ; Input: ; level: n = 1 - 4: level n da...
; A128222: A127701 * A128174. ; 1,1,2,3,1,3,1,4,1,4,5,1,5,1,5,1,6,1,6,1,6,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,9,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,1,10 lpb $0 mov $1,$0 mod $1,2 add $2,1 sub $0,$2 cmp $1,0 mul $1,$2 lpe add $1,1 mov $0,$1
%define USER_CODE_SEGMENT 0x18 %define USER_DATA_SEGMENT 0x20 %define RING3_MASK 0b11 %define INTERRUPT_FLAG 0x200 global proc_jump_userspace extern _esp extern _eip proc_jump_userspace: cli mov ax, USER_DATA_SEGMENT | RING3_MASK mov ds, ax mov es, ax mov fs, ax mov gs, ax mov eax, dword [_esp] push USER_DAT...
; This is the sentinel byte for all RLE routines. runIndicator .equ 0x9B ;; rleCompress [Miscellaneous] ;; Compresses data using a simple Run-Length-Encoding scheme. ;; Inputs: ;; HL: Data to compress ;; DE: Destination, cannot (yet) be the same location as original data ;; BC: Size of uncompressed data ;; Outputs...
reservedloaddata: db 'Loaded!',10,13,0 TIMES 510-($-$$) db 0 dw 0xAA55
.intel_syntax noprefix .data STR_1: .string "Enter 5 numbers:" STR_2: .string "" STR_3: .string "Your numbers:" STR_4: .string "" STR_5: .string "Your numbers doubled are:" .bss .text .extern puts .extern printf .extern exit .extern fflush .extern input_int .extern print_int .global main main: push ebp ...
APequPmulQUnsg: ; \ AP=P*Qunsg MULTU: ld a,(varQ) cp 0 jr z,.MU1 ; up, P = Acc = Xreg = 0 .MUL1: ; P*X will be done ld d,a ld a,(varP) ld e,a mul ; de = d * e ld a,d ld (varP),a ld a,e ret .MU1: ld (varP),a or a ; clear carry flag ret
; ; Enterprise 64/128 specific routines ; by Stefano Bodrato, 2011 ; ; exos_channel_read_status(unsigned char ch_number); ; ; ; $Id: exos_channel_read_status.asm,v 1.1 2011/03/15 14:34:08 stefano Exp $ ; XLIB exos_channel_read_status exos_channel_read_status: ld a,l rst 30h defb 9 ld h,0 ld l,c ret
%include "macro.asm" global _start _start: extern proc global buffer,abuflen section .text pop rcx pop rcx pop rcx mov [filename],rcx open [filename] cmp rax,-1h je error mov [filehandle],rax read [filehandle],buffer,buflen dec rax mov [abuflen],rax call proc exit: close [filehandle] mov rax,60 ...
;//////////////////////////////////////////////////////////////////////////////// ;// ;// Total Commander FTP Password Recovery Algorithm ;// ;// Bartosz Wójcik ;// ;// https://www.pelock.com/products/total-commander-ftp-password-recovery ;// ;////////////////////////////////////////////////////////////////////////////...
.byte $00 ; Unknown purpose .byte OBJ_REDPIRANHA, $0C, $14 .byte OBJ_REDPIRANHA, $13, $17 .byte OBJ_BOO, $14, $10 .byte OBJ_ROTODISCCCLOCKWISE, $18, $15 .byte OBJ_REDPIRANHA, $1D, $15 .byte OBJ_VENUSFIRETRAP, $25, $16 .byte OBJ_REDPIRANHA, $2A, $13 .byte OBJ_REDPIRANHA, $31, $18 .byte OBJ_THWOMP, $35, $0F ....
; Copyright 2016 Iceberg OS ; ; 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 writ...
; ****************************************************** ; Name: Module Functions ; Author: Peter Kleissner ; Version: 0.1 ; Date: 16.02.2008 20:40:07 ; last Update: 16.02.2008 20:40:10 ; Forensic Lockdown Software ; (C) 2008 Vienna Computer Products ; This include fil...
; unsigned char esx_f_fstat(unsigned char handle, struct esx_stat *es) SECTION code_esxdos PUBLIC esx_f_fstat_callee EXTERN asm_esx_f_fstat esx_f_fstat_callee: pop af pop hl pop de push af ld a,e jp asm_esx_f_fstat ; SDCC bridge for Classic IF __CLASSIC PUBLIC _esx_f_fstat_callee defc _esx_f...
// Minimal struct with MemberUnwind behavior - array member and local initializer // Commodore 64 PRG executable file .file [name="struct-30.prg", type="prg", segments="Program"] .segmentdef Program [segments="Basic, Code, Data"] .segmentdef Basic [start=$0801] .segmentdef Code [start=$80d] .segmentdef Data [startAft...
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1992 -- All Rights Reserved PROJECT: File Manager Tools -- 1.X Document Conversion MODULE: File Manager Tool Interface FILE: convertTool.asm AUTHOR: Adam de Boor, Aug 26, 1992 ROUTINES: Name Descr...
;******************************************************************************* ; ide.nasm - E-IDE resource manager. ; Based on Minix 2.0.0 code. ;******************************************************************************* module $eide %include "rmk.ah" %include "errors.ah" %include "module.ah" %include "thread....
; quick & dirty dot scroller ; written to try out Simon's fast PLOT_PIXEL macro ; was thinking about a fixed position (sparse) sprite plot routine for interesting scrollers ; but figured I would get it working with dots first to see if I like it ; now uses own font (pre-rotated) but currently takes up 3 pages (96 char...
bits 64 section .data pointer dq 1 argv dq 1 argc dq 1 _they_are_equal____KSM_INTERNAL_: db "they are equal", 0xa, "", 0 _all_done____KSM_INTERNAL_: db "all done", 0xa, "", 0 ;end data section section .text global main extern malloc extern print_int extern print_hex extern pr...
; ; Shared variables between the VT100 and VT52 engines MODULE conio_vars SECTION data_clib PUBLIC __upd7220_attr PUBLIC __upd7220_buffer ; PPPFIIII ; paper, flash, ink __upd7220_attr: defb $6 SECTION bss_clib __upd7220_buffer: defs 160
dw $0010 track_17_02: db $F7, $77, $86, $3C, $7B, $D8, $E0, $60, $3B, $5D db $D8, $E9, $EF, $63, $81, $80
#if a piano key in the virtual piano is pressed, then the MidiOutSync Sycall is called #you will hear a sound with the pitch you chose by pressing one of the piano keys .text initialize: #MidiOutSync Sycall (Load the service number in register a7) li a7, 33 #duration (optional/can be set in runtime with Virtual Pian...
%ifidn __OUTPUT_FORMAT__, bin msg_format: db 'This is binary format file' %elifidn __OUTPUT_FORMAT__, elf32 section .rodata msg_format: db 'This is elf32 format file' %elifidn __OUTPUT_FORMAT__, elf64 section .rodata msg_format: db 'This is elf64 format file' %elifidn __OUTPUT_FORMAT__, macho32 section ....
.386 .model flat, stdcall includelib msvcrt.lib extern exit: proc public start .data final_value dd 0 n dd 3 numbers dd 1, 2, 3 value_to_add dd 0, 0, 0 .code expression macro esi finit fild numbers[esi] fsqrt fst value_to_add[esi] finit fld value_to_add[e...
;=============================================================================== ; Copyright 2014-2018 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") co...
//Program: Add R1 and R2, store in R3 @R1 D = M @R2 D = D + M @R3 M = D (:End) @:End 0;JMP
; GDT - Implementing "Basic Flat Model" - two overlapping segments of code and data ; TL;DR: a struct for memory segments (eg. data, code) ;Some basic terms: ;Base = where code segment begins in physical memory ; For some reason, base address is fragmented. Who knows... ;Limit = segment size ;Present: if segment is pr...
bits 32 %include "metalc/x86/metalc.inc" %include "metalc/x86/setjmp.inc" global mclib_setjmp:function global mclib_longjmp:function mclib_setjmp: fxsave [FN_ARG_1_Q + tJmpBuf.j_fpu_state] mov [FN_ARG_1_Q + tJmpBuf.j_ebx], ebx mov [FN_ARG_1_Q + tJmpBuf.j_esi], esi mov [FN_ARG_1_Q + tJmp...
TITLE "Spin Locks" ;++ ; ; Copyright (c) 1989-1998 Microsoft Corporation ; ; Module Name: ; ; spinlock.asm ; ; Abstract: ; ; This module implements x86 spinlock functions for the PC+MP HAL. ; ; Author: ; ; Bryan Willman (bryanwi) 13 Dec 89 ; ; Environment: ; ; Kernel m...
; ; Z88dk Z88 Maths Library ; ; ; $Id: stkequ2.asm,v 1.1 2008/07/27 21:44:58 aralbrec Exp $ XLIB stkequ2 XREF fa ; Store the FP number in FA after executing a routine .stkequ2 ld (fa+3),hl ld a,c ld (fa+5),a exx ld (fa+1),hl ; xor a ; ...
default rel %define XMMWORD %define YMMWORD %define ZMMWORD section .text code align=64 EXTERN OPENSSL_ia32cap_P global poly1305_init global poly1305_blocks global poly1305_emit ALIGN 32 poly1305_init: mov QWORD[8+rsp],rdi ;WIN64 prologue mov QWORD[16+rsp],rsi mov rax,rsp $L$SEH_begin_poly1305_init: mov rdi...
// ------------------------------------------------------------------------------------------------ // Pixel Shader for doing bump mapping with parallax plus diffuse and specular lighting by nfz // ------------------------------------------------------------------------------------------------ // uv TEXC...
setrepeat 2 frame 0, 06 frame 4, 06 frame 5, 05 dorepeat 1 endanim
* Sprite dec * * Mode 4 * +------|-----+ * |aaaa | * |aggaaa | * |agga aa | * |agga aaaa| * -agga agga- * |agga aaaa| * |agga aa | * |aggaaa | * |aaaa | * +------|-----+ * section sprite xdef mes_dec mes_dec dc.w $0100,$0000 dc.w 12,9,6,4 dc.l sc4_dec-* xref mes_zero dc.l mes_zero-...
Name: ger_msge5.asm Type: file Size: 90062 Last-Modified: '2016-05-13T04:23:03Z' SHA-1: 7D5C4B89C9137D5935A742ECE22DA4592EF46C7D Description: null
; ; @author MITSUNARI Shigeo(@herumi) ; @license modified new BSD license ; http://opensource.org/licenses/BSD-3-Clause ; ; https://github.com/herumi/mie_string ; ; for Win64 ; nasm -f win64 -D_WIN64 mie_string_x86.asm ; for Linux 64 ; nasm -f elf64 mie_string_x86.asm ; global mie_findCharRangeSSE global mie_findCharRa...
<% from pwnlib.shellcraft.i386.cgc import syscall %> <%page args="fd, buf, count, bytes"/> <%docstring> Invokes the syscall receive. For more information, see: https://github.com/CyberGrandChallenge/libcgc/blob/master/receive.md Arguments: fd(int): fd buf(int): buf count(int): count bytes(int): by...
; ---------------------------------------------------------------- ; Z88DK INTERFACE LIBRARY FOR THE BIFROST* ENGINE - RELEASE 1.2/L ; ; See "bifrost_l.h" for further details ; ---------------------------------------------------------------- ; void BIFROSTL_fillTileAttrL(unsigned char row, unsigned char col, unsigned ...
; ; Kaypro II pseudo graphics routines ; ; Stefano Bodrato 2018 ; ; ; $Id: plot_end_83.asm $ ; SECTION code_graphics PUBLIC plot_end PUBLIC plot_decode EXTERN __gfx_coords .plot_decode ld (__gfx_coords),hl ld c,a ...
; ; MSX extension for "GFX - a small graphics library" by Jannone ; ; ; Z88 Graphics Functions - Small C+ stubs ; ; Written around the Interlogic Standard Library ; ; MSX buffered display extension ; compatibility layer for "GFX", ; a small graphics library by Rafael de Oliveira Jannone ; ; Stefano ...
SECTION code_fp_math16 PUBLIC ___slong2h_callee PUBLIC _f16_i32_fastcall EXTERN cm16_sdcc___slong2h_callee EXTERN cm16_sdcc___slong2h_fastcall defc ___slong2h_callee = cm16_sdcc___slong2h_callee defc _f16_i32_fastcall = cm16_sdcc___slong2h_fastcall
.data _x: .word 11.0 .text .globl main li $t0, 0 sw $t0, _y li $t0, 0 sw $t0, _yy li $t0, 12 sw $t0, _az li $t0, 1 sw $t0, _yy main: li $t0, 1 sw $t0, _x
0xFF0 1 // F0 0xFF1 1 // F1 0xFF2 0 // Fn 0xFF3 1 // 1 0xFFC 0 // Counter 0xFFD 10 // Limit + 2 LDV 0xc000002 // ask for limit STV 0xFFD // save limit LDV 0xFF0 STV 0xC000004 STV 0xC000004 :LOOP LDV 0xFF0 ADD 0xFF1 STV 0xFF2 STV 0xC000004 // Output Fn LDV 0xFF1 STV 0xFF0 LDV 0xFF2 STV 0xFF1 LDV 0xFFC ADD 0xFF3 S...
title "StringTable_x64" option casemap:none ;++ ; ; Copyright (c) Trent Nelson, 2016. ; ; Module Name: ; ; StringTable_x64.asm. ; ; Abstract: ; ; This module implements various StringTable routines in assembly. ; ;-- include StringTable.inc ;++ ; ; BOOL ; IsPrefixOfStringInTable_x64_SSE42( ; ...
;********************************** ;Screen output and control routines ;********************************** ;Constants for PETCII control codes c_black=144 c_white=5 c_red=28 c_cyan=159 c_purple=156 c_green=30 c_blue=31 c_yellow=158 c_brown=149 c_lt_red=150 c_grey1=151 c_grey2=1...
times (label-$) db 0 label: db 'Where am I?'
ldi c0, 3 ldsi s0, 3 ldmc c1, 3 ldms s1, 3 stmc c0, 8000 stms s0, 8000 ldmci c2, r0 ldmsi s2, r0 stmci c0, r0 stmsi s0, r0 movc c3, c2 movs s3, s2 movint r1, r0 ldmint r2, 3 stmint r0, 8000 ldminti r3, r2 stminti r3, r2 pushint r3 popint r4 ldtn r1 ldarg r5 reqbl 10 starg r5 run_tape 1, 1, 2 join_tape 3 jmpne r1, 0, 1 ...
; size_t wv_priority_queue_max_size_fastcall(wv_priority_queue_t *q) SECTION code_clib SECTION code_adt_wv_priority_queue PUBLIC _wv_priority_queue_max_size_fastcall EXTERN asm_wv_priority_queue_max_size defc _wv_priority_queue_max_size_fastcall = asm_wv_priority_queue_max_size
COMMENT @---------------------------------------------------------------------- Copyright (c) GeoWorks 1994 -- All Rights Reserved PROJECT: PC GEOS MODULE: CommonUI/COpen (gadgets code common to all specific UIs) FILE: copenButtonClass.asm ROUTINES: Name Description ---- ----------- MTD MSG_S...
.code GetKiSystemCall64 proc push rcx push rdx mov ecx,0C0000082h rdmsr shl rdx,32 and rax,0FFFFFFFFh or rax,rdx pop rdx pop rcx ret GetKiSystemCall64 endp end
TITLE MIDDLE - Copyright (C) 1994 SLR Systems INCLUDE MACROS INCLUDE RELEASE INCLUDE SYMBOLS INCLUDE SEGMENTS INCLUDE CDDATA INCLUDE MODULES INCLUDE EXES if fg_segm OR fg_pe INCLUDE SEGMSYMS endif INCLUDE WIN32DEF PUBLIC MIDDLE_STUFF,REPORT_UNDEFINEDS .DATA EXTERNDEF EXETYPE_FLAG:BYTE,OUT...
; Variant 2; laboratory 2 Dseg segment varA dw 0 varB dw 0 outA db "Input arg A: $" outB db "Input arg B: $" rez db "Result: $" ost db " and ost: $" tempor dw 0 Dseg ends include 'coollibheader.inc' lea dx,outA ; Input A outstr mov AL,2 call inint mov varA,AX ...
; ; Copyright (c) 2016, Yi-Fan Zhang. All rights reserved. ; Copyrights licensed under the BSD License. ; See the accompanying LICENSE file for terms. ; See the accompanying ATTRIB file for attributions/credits. ; ; Decimal to hexadecimal reminder. ; 2^10 (1024) = 0x400 ; 2^12 (4096) = 0x1000 ; 2^20 (mega) = 0x100000 ...
.data .text .globl __start __start: li $t1, 150 #i li $t0, 100 #j while : beq $t1, $t0, endW if: ble $t1, $t0, else then: sub $t1, $t1,$t0 b endif else: sub $t0, $t0,$t1 endif: b while endW: move $a0, $t0 li $v0, 1 syscall li $v0, 10 syscall
.area HOME (CODE) .area CSEG (CODE) .area GSINIT0 (CODE) .area GSINIT1 (CODE) .area GSINIT2 (CODE) .area GSINIT3 (CODE) .area GSINIT4 (CODE) .area GSINIT5 (CODE) .area GSINIT (CODE) .area GSFINAL (CODE) .globl __start__stack .area RSEG (ABS,DATA) .org 0x0000 _DPL0 = 0x0082 _DPH0 = ...
org #1000 relocate_start ld hl,test ld de,test2 ret test db 0 test2 db 0 dw relocate_count dw relocate_size relocate_table relocate_end
; from: https://en.wikipedia.org/wiki/Intel_8080#Example_code ; memcpy -- ; Copy a block of memory from one location to another. ; ; Entry registers ; BC - Number of bytes to copy ; DE - Address of source data block ; HL - Address of target data block ; ; Return registers ; BC - Zero ...
; Konami VRC2b: ; http://bootgod.dyndns.org:7777/search.php?unif_op=LIKE+%60%25%40%25%60&unif=KONAMI-VRC-2&ines_op=%3D%60%40%60&ines=23 ;------------------------------------------------------------------------------; ; number of 16K PRG banks PRG_BANKS = $04 ; number of 8K CHR banks CHR_BANKS = $02 ; VRC2 mirroring ...
ds 43 ds 42,1 ds 42,2 ds 43,3 ds 43,4 ds 43,5
dnl ARM mpn_mul_1 -- Multiply a limb vector with a limb and store the result dnl in a second limb vector. dnl Contributed by Robert Harley. dnl Copyright 1998, 2000, 2001, 2003, 2012 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 ...
; A130888: Triangle read by rows, A051731(n,k) dot (1, 3, 7, 15,...) with like numbers of terms. ; Submitted by Jon Maiga ; 1,1,3,1,0,7,1,3,0,15,1,0,0,0,31,1,3,7,0,0,63,1,0,0,0,0,0,127,1,3,0,15,0,0,0,255 seq $0,127093 ; Triangle read by rows: T(n,k)=k if k is a divisor of n; otherwise, T(n,k)=0 (1 <= k <= n). mov $1,2...
.byte $01 ; Unknown purpose .byte OBJ_BOSS_KOOPALING, $0D, $06 .byte $FF ; Terminator
ori $ra,$ra,0xf div $6,$ra mtlo $4 mfhi $4 addiu $2,$2,8147 addiu $2,$2,-18782 sb $0,3($0) mthi $1 multu $1,$3 lui $5,58551 div $4,$ra sb $4,11($0) mtlo $4 addu $4,$4,$5 mthi $0 mult $5,$5 divu $5,$ra lui $5,44070 ori $4,$5,6471 mthi $5 sb $4,2($0) ori $0,$2,13504 mthi $0 sll $4,$5,4 div $3,$ra divu $0,$ra addiu $1,$4,...
;-------------------------------------; ; Freeware Pokemon-Mini BIOS Ver 1.3 ; ; (Fruit of reverse enginnering!!) ; ; ; ; V1.3: ; ; Fixed Suspend System ; ; ; ; V1.2: ; ...
org 100h mov ax,0000h mov ds,ax mov ax,[3000h] mov bx,[3002h] mul bx mov [3004h],ax mov [3006h],dx hlt
dnl Power9 mpn_mul_1. dnl Copyright 2017, 2018 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 Fr...
name "fileio" ; general rules for file system emulation: ; 1. the emulator emulates all drive paths in c:\emu8086\vdrive\ ; for example: the real path for "c:\test1" is "c:\emu8086\vdrive\c\test1" ; 2. paths without drive letter are emulated to c:\emu8086\MyBuild\ ; for example: the real path for "myfi...
* CALCULE MATRICIELLE .text A .int 1,2,3,4,5,6,7,8,9 B .int 1,2,3 tab1 .word A tab2 .word B resul .word 50h ldi @tab1,AR0 ;CHARGER LE TABLEAU 1 SUR AR0 ldi @tab2,AR1 ;CHARGER LE TABLEAU 2 SUR AR1 ldi @resul,AR2 ;CHARGER LA RESULTAT SUR AR2 ldi 3,R4 ;CHARGER 3 SUR R4 loopi ldi ...
; A337747: Maximal number of 4-point circles passing through n points on a plane. ; Submitted by Christian Krause ; 0,0,0,1,1,3,6,12,14,22 mov $1,$0 bin $0,2 add $1,4 div $1,2 bin $1,2 sub $0,$1 dif $0,2 add $0,1
.include "defaults_mod.asm" table_file_jp equ "exe6-utf8.tbl" table_file_en equ "bn6-utf8.tbl" game_code_len equ 3 game_code equ 0x4252354A // BR5J game_code_2 equ 0x42523545 // BR5E game_code_3 equ 0x42523550 // BR5P card_type equ 1 card_id equ 40 card_no equ "040" card_sub equ "Mod Card 040" card_sub_x ...
section data zero: const 0 teste: const 2 tres: const 3 rot1: add teste ; section text faltando add tres div dois
; double __CALLEE__ scalbn(double x, int n) SECTION code_clib SECTION code_fp_math48 PUBLIC cm48_sccz80_scalbn_callee EXTERN cm48_sccz80p_dcallee1, am48_scalbn cm48_sccz80_scalbn_callee: pop af pop hl ; hl = n push af call cm48_sccz80p_dcallee1 ; AC'= x jp am48_scalbn