content stringlengths 23 1.05M |
|---|
;crti.asm
;Function prologues for init/fini functions in C runtime
;Bryan E. Topp <betopp@betopp.com> 2021
bits 64
section .init
;Linked at the beginning of the .init section
push RBP
mov RBP, RSP
bits 64
section .fini
;Linked at the beginning of the .fini section
push RBP
mov RBP, RSP
|
; BEGIN_LEGAL
; Intel Open Source License
;
; Copyright (c) 2002-2016 Intel Corporation. All rights reserved.
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions are
; met:
;
; Redistributions of source code must reta... |
SECTION code_l
PUBLIC l_fast_utoh
EXTERN l_hex_nibble_hi, l_hex_nibble_lo
l_fast_utoh:
; write unsigned hexadecimal integer to ascii buffer in uppercase
; derived from section 5.2 of http://baze.au.com/misc/z80bits.html
;
; enter : hl = unsigned integer
; de = char *buffer
; carry... |
; Simplify the algorithm in the right conditions.
;
; Input:
; x0: [bp + 12] -> [bp + x0]
; y0: [bp + 10] -> [bp + y0]
; x1: [bp + 8] -> [bp + x1]
; y1: [bp + 6] -> [bp + y1]
; straight: [bp - 2] -> [bp - straight]
Graphics_Line_Test_Straight:
push si
mov si, word... |
<%
from pwnlib.regsort import regsort
from pwnlib.constants import Constant, eval
from pwnlib.shellcraft import registers
from pwnlib.shellcraft.mips import mov
%>
<%page args="reg_context, stack_allowed = True"/>
<%docstring>
Sets multiple registers, taking any register dependencies into account
(i.e., given e... |
db "TENDER@" ; species name
db "It's said that"
next "looking at MILOTIC"
next "and its beauty"
page "will calm any"
next "hostile emotions"
next "you're feeling.@"
|
[bits 32]
[org 0x0]
_start:
mov eax,0
mov ecx,'A'
_sec:
int 0x40
inc ecx
cmp ecx,'Z'+1
jne _sec
mov eax,0x50 ;exit call
mov ebx,0x0
int 0x40
jmp $ |
%ifndef __memory_asm
%define __memory_asm
bits 16
struc MemoryMapEntry
.baseAddress resq 1
.length resq 1
.type resd 1
.acpi_null resd 1
endstruc
; Returns memory size for >64M configuations
; return: ax - KB between 1MB and 16MB
; bx - Number of 64K blocks above 16MB
; On... |
; Test case:
ld a,1 ; should be optimized (easy case)
ld a,1
ld (val),a
ld a,1 ; should also be optimized (harder case)
ld (val2),a
l2: ld a,2 ; this one should have the label kept!
ld (val),a
nop
ld a,2 ; this one should be optimized
ld (val),a
ld a,3
ld (val),a
l3: nop
ld a,3 ; this one should not ... |
RESULTS_START EQU $c000
RESULTS_N_ROWS EQU 2
include "base.inc"
; This test verifies restarting the channel after
; triggering the NRx2 write glitch works as expected
CorrectResults:
db $02, $02, $02, $02, $02, $02, $02, $02
db $02, $02, $02, $02, $02, $02, $02, $00
SubTest: MACRO
xor a
ldh [rNR52], a
... |
.586
.model flat
.code
_conta_occorrenze proc
push ebp
mov ebp,esp
push esi
push edi
push ebx
mov ebx, dword ptr[ebp+8] ; stringa
mov ecx, dword ptr[ebp+12] ; parola da trovare
mov esi, 0
mov edi,0
mov eax, 0
stringa:
cmp byte ptr[ebx+esi], 0
je fine
mov dl, byte ptr[ebx+esi] ; sentence
cmp dl, byte ptr[ecx] ... |
.686
.model flat,stdcall
option casemap:none
include .\bnlib.inc
include .\bignum.inc
.code
_bn_adddw_ignoresign proc c; uses edi,esi,eax,ecx,edx
lea edx,[edi].BN.dwArray[0*4]
mov ecx,[edi].BN.dwSize
clc
.repeat
adc [edx],eax
mov eax,0
lea edx,[edx+4]
jnc @F
dec ecx
.until zero?
adc eax,eax
jz @F
ca... |
format ELF64 executable 3
entry start
segment readable executable
start:
mov edx, msglen
mov rsi, msg
mov edi, 1
mov eax, 1
syscall
segment readable writeable
msg db 'Hello world!', 0Ah
msglen = $ - msg
|
; En bootladdare måste sluta med 0x55,0xaa
; En bootladdare måste vara 512 bytes
; Sector 1: Bootladdare
; Sector 2: Operativsystemet
; Bootladdaren laddas in till 0x7c00
org 0x7c00
mov bx, 0x8000 ; mål
mov ah, 2 ; 2 = read from disk
mov al, 1 ; 1 = antal sektorer att läsa
mov ch, 0 ; cylinder
mov cl, 2 ; sector 2 (s... |
#######
# Get random unoccupied cell from board
# ------------
# inputs: a0 - array address
# ------------
# outputs: a0 - random cell
#######
random_ai:
# callee save
addi sp, sp, -20
sw a0, 0(sp)
sw a7, 4(sp)
sw t3, 8(sp)
sw t4, 12(sp)
sw ra, 16(sp)
get_rand:
## random number rars ecall
li a1, 9 # generate ... |
MACRO filler x1, x2, y1, y2
ld hl,y1*2
add hl,sp
ld sp,hl
DUP (y2 - y1)
ld de,x1
pop hl
add hl,de
DUP (x2 - x1)
ld (hl),a
inc l
EDUP
ld (hl),a
EDUP
ENDM
OUTPUT "dup_var.bin"
filler 15, 20, 35, 40
|
TITLE GETNAME - Copyright (c) SLR Systems 1994
INCLUDE MACROS
PUBLIC GET_OMF_NAME_LENGTH_ROUTINE,GET_OMF_NAME_LENGTH_EDI,TOO_LONG
.DATA
.CODE PASS1_TEXT
EXTERNDEF ERR_ABORT:PROC
EXTERNDEF TOO_LONG_ERR:ABS
GET_OMF_NAME_LENGTH_ROUTINE PROC
;
;
;
XOR EAX,EAX
MOV AL,[ESI]
INC ESI
CMP... |
; /*******************************************************************
; *
; * Author: Kareem Omar
; * kareem.h.omar@gmail.com
; * https://github.com/komrad36
; *
; * Last updated Mar 12, 2021
; *******************************************************************/
_TEXT$FastContains64 SEGMENT ALIGN(64)
Fas... |
;
; Z88dk Generic Floating Point Math Library
;
; set z and Z flags per fa
;
; $Id: sgn.asm,v 1.4 2016/06/21 21:16:49 dom Exp $:
SECTION code_fp
PUBLIC sgn
PUBLIC setflgs
EXTERN fa
.sgn LD A,(fa+5)
OR A
RET Z
LD A,(fa+4)
DEFB $FE ;... |
global start
extern long_mode_start
section .bss
align 4096
p4_table:
resb 4096
p3_table:
resb 4096
p2_table:
resb 4096
stack_bottom:
resb 4096 * 4 ; 16KB
stack_top:
section .rodata
gdt64:
dq 0
.code: equ $ - gdt64
dq (1<<41) | (1<<44) | (1<<47) | (1<<43) | (1<<53)
.data: equ $ - gdt64
... |
; A170895: First differences of A170894.
; Submitted by Christian Krause
; 0,1,1,2,3,3,3,6,8,6,4
mov $1,2
lpb $0
add $2,1
sub $0,$2
add $1,1
lpe
bin $1,$0
add $0,1
bin $2,$0
sub $2,$0
add $2,$1
mov $0,$2
|
code
proc swapfunc 24 0
ADDRFP4 12
INDIRI4
CNSTI4 1
GTI4 $24
ADDRLP4 8
ADDRFP4 8
INDIRI4
CVIU4 4
CNSTI4 2
RSHU4
CVUI4 4
ASGNI4
ADDRLP4 0
ADDRFP4 0
INDIRP4
ASGNP4
ADDRLP4 4
ADDRFP4 4
INDIRP4
ASGNP4
LABELV $26
ADDRLP4 12
ADDRLP4 0
INDIRP4
INDIRI4
ASGNI4
ADDRLP4 16
ADDRLP4 0
INDIRP4
ASGNP4
ADDRLP4 0
ADDRLP4 16
INDIRP4
CNS... |
acc = 0x00
sp = 0x02
clkmd = 0x03
ihrcr = 0x0b
misc = 0x3b
pa = 0x10
pac = 0x11
paph = 0x12
ACC_ZERO_FLAG = 0
CLKMD_ENABLE_ILRC = 1<<2
CLKMD_ENABLE_IHRC = 1<<4
CLKMD_IHRC_DIV2 = 1<<5
CLKMD_IHRC_DIV4 = 0
CLKMD_IHRC_DIV8 = (1<<5) | (1<<3)
CLKMD_IHRC_DIV16 = (0<<5) | (1<<3)
TYPE_IHRC = 1
M... |
lui $1,21127
ori $1,$1,14712
lui $2,44086
ori $2,$2,40596
lui $3,61576
ori $3,$3,39849
lui $4,55309
ori $4,$4,56269
lui $5,14203
ori $5,$5,43259
lui $6,7505
ori $6,$6,18920
mthi $1
mtlo $2
sec0:
nop
nop
nop
subu $2,$6,$2
sec1:
nop
nop
nor $6,$2,$5
subu $2,$6,$2
sec2:
nop
nop
slti $6,$4,-4530
subu $1,$6,$2
s... |
segment code
..start:
mov ax, data
mov ds, ax
mov ax, stack
mov ss, ax
mov sp, stacktop
equalize:
mov si, histogram
mov di, eqhistogram
mov ax, [si]
mov [di], ax
add si, 2
mov cx, 9
.iter:
mov ax, [si]
add [di+2], ax
mov ax, [di]
add [di+2], ax
add di, 2
loop .iter
exit:
mov ah, 4Ch
int 21h
segme... |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) Berkeley Softworks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: Canon 64-pin print drivers
FILE: graphicsHiRedwood.asm
AUTHOR: Dave Durran
ROUTINES:
Name Description
---- -----------
RE... |
MtMoon3Script:
call EnableAutoTextBoxDrawing
ld hl, MtMoon3TrainerHeaders
ld de, MtMoon3ScriptPointers
ld a, [wMtMoon3CurScript]
call ExecuteCurMapScriptInTable
ld [wMtMoon3CurScript], a
CheckEvent EVENT_BEAT_MT_MOON_EXIT_SUPER_NERD
ret z
ld hl, CoordsData_49d37
call ArePlayerCoordsInArray
jr nc, .asm_49d31
... |
;; encoding: utf-8
;; ff3_menu_utils.asm
;;
;; re-implementation of utility functions around menu handling
;;
;; version:
;; 0.1.0
;;=================================================================================================
__FF3_MENU_UTILS_INCLUDED__
;;--------------------------------------------------... |
# Author: Jason Downing
# Date: 9/14/2014
.data # Data portion of the program (variables, constants, etc)
prompt: .asciiz "Enter the first integer: " # Load the first prompt into memory
prompt2:.asciiz "Enter the second integer: " # Load the second prompt into mem... |
EQ1: EQU 1
TRIANGULO: EQU 1
SECTION TEXT
INPUT B
INPUT H
LOAD B
MULT H
IF TRIANGULO
DIV DOIS
STORE R
OUTPUT R
STOP
SECTION DATA
B: SPACE
H: SPACE
R: SPACE
DOIS: CONST 2
UM: CONST EQ1 |
; Arreglos parte 1
; manejo de arreglos - impresion de un arreglo de números de forma manual
; macros
%macro imprime 2 ; 2 - indica el numero de parametros a imprimir
mov eax, 4 ; indica a la maquina que se va a escribir
mov ebx, 1 ; indica a la maquina que se va a escribir en panta... |
Name: z00_isub.asm
Type: file
Size: 255544
Last-Modified: '2016-05-13T04:36:32Z'
SHA-1: ACF0A1EABA985EC46B6E9AA789667397EE5C9855
Description: null
|
INCLUDE "constants.asm"
; PokemonPicPointers and UnownPicPointers are assumed to start at the same
; address, but in different banks. This is enforced in pokecrystal.link.
SECTION "Pic Pointers", ROMX
INCLUDE "data/pokemon/pic_pointers.asm"
SECTION "Unown Pic Pointers", ROMX
INCLUDE "data/pokemon/unown_pic_poin... |
Comparing Strings (Cmpsb.asm)
; This program uses CMPSB to compare two strings
; of equal length.
INCLUDE Irvine32.inc
.data
source BYTE "MARTIN "
dest BYTE "MARTINEZ"
str1 BYTE "Source is smaller",0dh,0ah,0
str2 BYTE "Source is not smaller",0dh,0ah,0
.code
main PROC
cld ; dire... |
; Johto Pokémon in water
JohtoWaterWildMons:
map_id RUINS_OF_ALPH_OUTSIDE
db 2 percent ; encounter rate
db 15, WOOPER
db 20, QUAGSIRE
db 15, QUAGSIRE
map_id UNION_CAVE_1F
db 2 percent ; encounter rate
db 15, WOOPER
db 20, QUAGSIRE
db 15, QUAGSIRE
map_id UNION_CAVE_B1F
db 2 percent ; encounter rate
db 1... |
bits 64
section .text
global start
start:
xor rax, rax
ret
|
ALIGN 2
public _prtt,_txtx,_txty,_prttcol
_txtx dw 0
_txty dw 0
_prttcol dw 0
public _font3x5
_font3x5 dw 0,0
truerowsadd dw 0
prtmacro MACRO
local prt41,prt42,prt43,prt44,prt45
push di
out dx,al
mov al,byte ptr cs:_prttcol
rcr bl,1
jnc prt41
mov es:[di],al
prt41: add di,cs:truerowsadd
rcr bh... |
.DATA
return_address dq 0
real_rbx dq 0
.CODE
_call_asm PROC
mov real_rbx, rbx
mov r9, [rsp]
mov return_address, r9
lea rbx, _ret_asm
mov [rsp], r8
jmp rdx
_call_asm ENDP
_ret_asm PROC
mov rbx, real_rbx
mov rcx, return_address
jmp rcx
_re... |
.686p ;enable instructions
.xmm ;enable instructions
.model flat, stdcall ;use C naming convention (stdcall is default)
.data ;initialized data
message1 db "consoleprint long test message 1",0dh,0ah,0
message1_end... |
#####################################################################
# MIPS 2048 on MARS4.5
# Program require
# 1. Bitmap Display
# 2. Keyboary and Display MMIO Simulator
#
# Setting in Bitmap Display
# unit width: 8,
# unit height: 8,
# display width: 512,
# display height: 512,
# base address: $gp
#
# Play Us... |
MODULE generic_console_ioctl
PUBLIC generic_console_ioctl
SECTION code_graphics
INCLUDE "ioctl.def"
EXTERN generic_console_cls
EXTERN __kayproii_gfxmode
; a = ioctl
; de = arg
generic_console_ioctl:
ex de,hl
ld c,(hl) ;bc = where we poi... |
; locates kernel32.dll base address
; requires legacy_stdio_definitions.lib while linking
global main
extern printf
section .data
fmt: db "%p", 0xA, 0
section .text
main:
push r15 ; usage of not clobber registers seems
push r12 ; so hacky (requires releasing)
sub rsp, 38h ; re... |
SECTION .text
GLOBAL square_curve25519
square_curve25519:
sub rsp, 0x30 ; last 0x30 (6) for Caller - save regs
mov [ rsp + 0x0 ], rbx; saving to stack
mov [ rsp + 0x8 ], rbp; saving to stack
mov [ rsp + 0x10 ], r12; saving to stack
mov [ rsp + 0x18 ], r13; saving to stack
mov [ rsp + 0x20 ], r14; saving to stack
mov ... |
; SBSEXT_TK2_BASE - TK2 loadable version 2017 Marcel Kilgus
section base
xdef base
xref banner
xref init
include 'dev8_keys_qlv'
base
suba.l a0,a0
lea banner(pc),a1
move.w ut.wtext,a2
jsr (a2)
bra.s init
end
|
;This software is ment to be used to create a loopback on the UART
;It is went to be used with an 8 bit processor and the minimal set of peripherals
;R2 should contain the base address for the UART
;R1 should contain the base address for the interrupt manager
label uart_int_routine
cpy R4 ;storing the working register... |
; Super Sudoku - A Sudoku game for the SNES
; Copyright 2019-2022 Raphaël Assenat <raph@raphnet.net>
;
; 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 l... |
// Original test: ./mshi/hw4/problem6/bnez_1.asm
// Author: mshi
// Test source code follows
lbi r1, 1
bnez r1, .Label2
.Label1:
lbi r2,0
.Label2:
lbi r2,1
halt
|
# Turn on the red, green, and blue LEDs on the HiFive1 Rev B
include ../bronzebeard/definitions/FE310-G002.asm
# jump to "main" since programs execute top to bottom
# we do this to enable writing helper funcs at the top
j main
# LED Locations
# (based on schematic)
# --------------------
# Red: GPIO Pin 22 (active... |
;===============================================================================
; Copyright 2014-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") co... |
; (Super)Gold card date read / set / adjust
section patch
xdef gl_rdate
xdef gl_sdate
xdef gl_adate
xref gl_rtc_status
xref gl_rtc_fail
include 'dev8_sys_gold_keys'
include 'dev8_keys_err'
include 'dev8_mac_assert'
;+++
; Read date taking the Year Month Day Hour Minute and Second from the RTC
;
; d1 r d... |
SECTION code_fp_am9511
PUBLIC hypot
EXTERN cam32_sccz80_hypot
defc hypot = cam32_sccz80_hypot
; SDCC bridge for Classic
IF __CLASSIC
PUBLIC _hypot
EXTERN cam32_sdcc_hypot
defc _hypot = cam32_sdcc_hypot
ENDIF
|
;
; CPM Stdio
;
; getk() Read key status
;
; Stefano Bodrato - Apr. 2000
; Stefano Bodrato - Mar. 2004 - fixed
; Stefano Bodrato - 2019 - using BIOS rather than BDOS
;
;
; $Id: getk.asm $
;
SECTION code_clib
PUBLIC getk
PUBLIC _getk
.getk
._getk
IF !__CPU_INTEL__
push ix
ENDIF
call const
and a
jr z,getk_en... |
#include "p16f873.inc"
org 0x00
c1 equ 0x20
c2 equ 0x21
temp equ 0x22
a equ 0x22
goto Main
Main:
call LCD_Init
movlw 'A'
movwf temp
call LCD_Char
LCD_Init:
bsf STATUS,5 ;select bank 1
movlw 0x06 ;make them digital pins.else cannot ... |
;
; PC-8801 clock()
;
; Stefano 2013
;
; ------
; $Id: clock.asm $
;
SECTION code_clib
PUBLIC clock
PUBLIC _clock
EXTERN FRAMES
.clock
._clock
ld hl,(FRAMES)
ld de,(FRAMES+2)
ret
|
COMMENT }%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: common Graphics routines
FILE: graphicsPCLScanline.asm
AUTHOR: Dave Durran
ROUTINES:
Name Description
---- -----------
REVISION HIST... |
; unsigned char esx_f_opendir(unsigned char *dirname)
SECTION code_esxdos
PUBLIC esx_f_opendir
EXTERN asm_esx_f_opendir
defc esx_f_opendir = asm_esx_f_opendir
; SDCC bridge for Classic
IF __CLASSIC
PUBLIC _esx_f_opendir
defc _esx_f_opendir = esx_f_opendir
ENDIF
|
Fish:
; Using a fishing rod.
; Fish for monsters with rod e in encounter group d.
; Return monster e at level d.
push af
push bc
push hl
ld b, e
call GetFishGroupIndex
ld hl, FishGroups
rept FISHGROUP_DATA_LENGTH
add hl, de
endr
call .Fish
pop hl
pop bc
pop af
ret
.Fish:
; Fish for monsters with rod b ... |
BITS 64
%define x 5
%if x == 10
mov rax, 100
%elif x == 15
mov rax, 115
%elif x == 200
mov rax, 0
%else
mov rax, rbx
%endif |
.data
f: .word 1
g: .word 2
h: .word 3
i: .word 4
j: .word 5
.text
lw $s0, f
lw $s1, g
lw $s2, h
lw $s3, i
lw $s4, j
bne $s3, $s4, Else
add $s0, $s1, $s2
j Exit
Else: sub $s0, $s1, $s2
Exit:
sw $s0, f |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Nacitajte zo suboru retazec znakov ukonceny znakom "konca suboru".
; Nech slovo je postupnost znakov medzi 2 znakmi "medzera".
; Urcte pocet slov, v ktorych sucet ASCII kodov je vacsi ako 100.
; Pocet vytlacit desiatkovo.
;
; Autor: LALA ... |
; 0 - PUSH constant 17
leaw $17,%A
movw %A,%D
leaw $SP,%A
movw (%A),%A
movw %D,(%A)
leaw $SP,%A
movw (%A),%D
incw %D
movw %D,(%A)
; 1 - PUSH constant 17
leaw $17,%A
movw %A,%D
leaw $SP,%A
movw (%A),%A
movw %D,(%A)
leaw $SP,%A
movw (%A),%D
incw %D
movw %D,(%A)
; 2 - EQ
leaw $SP,%A
movw (%A),%D
decw %D
movw %D,(%A)
movw ... |
leo: Dateiformat elf64-x86-64
Disassembly of section .init:
0000000000400ec8 <_init>:
400ec8: 48 83 ec 08 sub $0x8,%rsp
400ecc: 48 8b 05 25 31 20 00 mov 0x203125(%rip),%rax # 603ff8 <_fini+0x2018e4>
400ed3: 48 85 c0 test %rax,%rax
400ed6: 74 05 je ... |
; sound driver code and data (NES-specific)
;==============================================================================;
; Target is the sound portion of the 2A03/2A07.
; DPCM, PCM, and expansion sound are not handled.
; 4 sound channels are available:
; 1) Pulse/Square 1
; 2) Pulse/Square 2
; 3) Triangle
; 4)... |
; Подпрограмма суммирования слов с нечетными значениями в чётных столбцах.
nata segment 'code'
assume cs:nata, ds:nata, ss:nata, es:nata
org 100h
begin: jmp main
;------------Для ввода ---------------------
Buf db 7,7 DUP(?)
datev dw 0
mnoj dw ?
ps dw 10,13,'$'
N dw 3 ; количество строк
M dw 4 ; количество... |
.text
# tmp = $v0
# j = $t0
main:
li $t0,0
li $t1,0
li $t3,0
loop:
# branch on greater than (desvie se for maior que)
bgt $t0,5,exit # if $t0 > 5 goto exit
addi $t0,$t0,1
j loop
mul $t1,$t1,2
add $t3,$t1,3
exit:
move $a0, $t0
li $v0, 1
syscall
li $v0,10
syscall
.data
mensa... |
%include "include/u7bg-all-includes.asm"
%macro copyAudioStateStringToVar 2
jmp afterStrings
audioEnabledString:
db 'Audio on', 0
audioEnabledString_end:
audioDisabledString:
db 'Audio off', 0
audioDisabledString_end:
afterStrings:
test %1, %1
jz copyDisabledString
copyEnabledString:
mov s... |
//Comment
@2 //Comment but in middle
D = A //comment to let you know that there is a space in this inst
@3
D=D+ A
@0
M=D
//comment but in end
|
%include "macros/patch.inc"
%include "macros/datatypes.inc"
; hifi <3 CCHyper, he's a nice chap!
; - Disruptor tank drawing error that resulted in a Internal Error on some computers is fixed, hopefully...
hack 0x006703C1 ;_sonic_beam_fix
cdq
xor eax, edx
sub eax, edx
cmp eax, 9
jl ... |
dnl AMD64 SSSE3/XOP mpn_popcount -- population count.
dnl Copyright 2010-2017 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... |
#!/usr/local/bin/zasm -o original/
;
;
;
#target rom ; declare target file format
#code ROM,$3800,$0800 ; declare code segment name, start and size
#if 1
;
; ZX81 ROM addresses
;
NEW equ $03C3
CLS equ $0A2A
SET_FIELD equ $090B
PR_STR_4 equ $0B6B
SCROLL equ $0C0E
DECODE equ $07BD
;
; ZX81... |
; void *balloc_alloc_fastcall(unsigned int queue)
SECTION code_alloc_balloc
PUBLIC _balloc_alloc_fastcall
_balloc_alloc_fastcall:
INCLUDE "alloc/balloc/z80/asm_balloc_alloc.asm"
|
; ========================================================================
;
; Curso de Assembly para Microcontroladores PIC 002
; Link do curso: https://www.youtube.com/channel/UCazAvTtoRlOrFDWDJDB2DKQ
;
; MCU: PIC16F84A Clock: 4MHz
;
; Autor: https://github.com/Guilherme-De-Marchi
; Data: 10-21
;
; =====... |
; A059135: A hierarchical sequence (S(W2{3}c) - see A059126).
; Submitted by Jon Maiga
; 11,54,161,396,887,1890,3917,7992,16163,32526,65273,130788,261839,523962,1048229
add $0,3
mov $1,2
pow $1,$0
sub $1,$0
sub $1,$0
mul $1,8
mov $2,$0
mul $2,5
sub $1,$2
mov $0,$1
add $0,10
|
; sounds.asm - makes sounds 'n' stuff
SUBROUTINE
LDA stepVol
STA AUDV0
LDA stepSnd
STA AUDC0
LDA #NULL
STA stepVol
|
IF !DEF(INC_LoadFont)
INC_LoadFont = 1
INCLUDE "src/memory/MemCopy.asm"
; Load the font into VRAM starting at address $8000.
; The LCD must be turned off before calling this function.
;
; @destroys all
LoadFont8000::
ld de, $8000
jr LoadFont.skip
; Load the font into VRAM starting at address $9000.
; The LC... |
_main:
;MyProject.mbas,7 :: org 0x1000
;MyProject.mbas,9 :: TRISC = %00000000
CLRF TRISC+0
;MyProject.mbas,11 :: PORTC.1 = 0
BCF PORTC+0, 1
;MyProject.mbas,12 :: PORTC.2 = 0
BCF PORTC+0, 2
;MyProject.mbas,14 :: PWM1_Init(100000)
BCF T2CON+0, 0, 0
BCF T2CON+0, 1... |
.DATA
codeCoul DW 0
coordX DW 0
coordY DW 0
largeur DW 255
hauteur DW 16
nbBandes DW 0 ; compteur du nb de bandes déssinées
.CODE
LEA SP, STACK
LD R1, nbBandes
LD R0,0
OUT R0,5 ;on efface l'écran
boucle:
CMP R1, 16 ;Si nombre de bandes >= 17, on arrete de dessiner
BGTU fin
PUSH codeCoul ;On ajoute les va... |
;
; Hello, BIOS
;
; print.asm
;
[bits 16]
; Define function print_bios
; Input pointer to string in bx
print_bios:
; We'll be using registers ax and bx, so we'll need to save
; their current values on the stack so we don't mess anything
; up once the function is complete. We use the 'push' and
; 'pop... |
INCLUDE "defines.inc"
SECTION "Cookie Position Table", WRAM0, ALIGN[8]
; Positions of cookies (Y, X) in pixels, relative to screen
wCookiePosTable::
DS MAX_COOKIE_COUNT * ACTOR_SIZE
.end::
SECTION "Cookie Speed Table", WRAM0, ALIGN[8]
; Speeds of cookies, (Y, X) in 16ths subpixels (4.4 fixed point)
wCookieSpeed... |
COMMENT }%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: VGA16 Video Driver
FILE: vga16Admin.asm
AUTHOR: Jim DeFrisco
ROUTINES:
Name Description
---- -----------
VidScreenOn turn... |
; first setup of a window
include win1_mac_oli
include win1_keys_wman
include win1_keys_wwork
section utility
xdef xwm_fset
;+++
; first setup of a window
;
; Entry Exit
; d1.l size (or 0, or -1)
; a2 wman vector
; a3 primary block
; a6 global status area
;---
xwm_fset subr a3/d1-d3
move.l d1,d2 ; size
... |
cseg
r1: db 0
dseg
r2: db 1
ld a , r1 - r2
|
;;
; wodOS Operating System
; Copyright © 2021-2022 wodOS Operating System Developers. All rights reserved.
;
; Use of this source code is governed by a BSD-style license that can be
; found in the LICENSE file.
;
; Contributor(s):
; - Ashwin Paudel <ashwonixer123@gmail.com>
;;
[bits 32]
global i686_gdt_loa... |
; ===========================================================================
; Copyright (C) 2011 Thilo Schulz <thilo@tjps.eu>
;
; This file is part of Quake III Arena source code.
;
; Quake III Arena source code is free software; you can redistribute it
; and/or modify it under the terms of the GNU General Public L... |
lw $2, 0($0)
j 24
sw $2, 0($0)
j 24
sw $2, 4($0)
j 1000
# method start
# multiplies the value on $2 by 4
# $2 -> 4 * $2
sll $2, $2, 2
jb
|
ori $ra,$ra,0xf
lui $5,45011
mfhi $5
addiu $1,$4,-31156
sb $1,4($0)
ori $4,$2,7810
ori $4,$2,18958
lui $2,45923
mtlo $0
mflo $1
mtlo $0
sll $6,$4,12
ori $6,$1,47363
addu $5,$1,$5
lui $4,40175
addiu $4,$4,-970
lb $5,1($0)
lui $6,29143
mtlo $4
divu $4,$ra
mflo $1
lb $1,14($0)
sb $4,7($0)
divu $6,$ra
addu $2,$6,$2
ori $5,... |
Sound_39_Header:
smpsHeaderStartSong 3
smpsHeaderVoice Sound_39_57_6C_Voices
smpsHeaderTempoSFX $01
smpsHeaderChanSFX $02
smpsHeaderSFXChannel cPSG3, Sound_39_6C_PSG3, $0C, $03
smpsHeaderSFXChannel cFM5, Sound_39_57_6C_FM5, $00, $06
; PSG3 Data
Sound_39_6C_PSG3:
smpsPSGvoice sTone_0D
smpsPSGform... |
// Assembler: KickAssembler 4.4
// left to right scroller
BasicUpstart2(start)
.var scr_clear_char = ' '
.var scr_clear_color = $0f
.var scroll_screen = $400
.var debug = true
* = $810 "start"
start:
jsr scr_clear
lda #$00
sta $d020
sta $d021
jsr irq_init
jmp *
#import "../irq/krnl1.asm"
irq:
asl $d019
... |
C9_Header:
sHeaderInit ; Z80 offset is $DAB7
sHeaderPatch C9_Patches
sHeaderTick $01
sHeaderCh $01
sHeaderSFX $80, $05, C9_FM5, $09, $05
C9_FM5:
sPatFM $00
dc.b nC5, $02, nC5, $08
sStop
C9_Patches:
; Patch $00
; $0B
; $53, $55, $07, $0A, $1F, $1F, $0F, $0F
; $00, $00, $00, $00, $00, $00, $00, $00
... |
; void *balloc_firstfit(unsigned char queue, unsigned char num)
SECTION code_clib
SECTION code_alloc_balloc
PUBLIC balloc_firstfit_callee
EXTERN asm_balloc_firstfit
balloc_firstfit_callee:
pop hl
pop de
ex (sp),hl
ld h,e
jp asm_balloc_firstfit
; SDCC bridge for Classic
IF __CLASSIC
PUBLIC _balloc_firs... |
Music_GameCorner_Ch1::
tempo 120
volume 7, 7
duty 3
vibrato 12, 3, 4
toggleperfectpitch
notetype 12, 11, 5
octave 3
A_ 6
notetype 12, 11, 1
G# 2
F# 2
E_ 2
D# 2
C# 2
D# 16
Music_GameCorner_branch_7e222::
notetype 12, 11, 5
octave 3
C# 4
octave 2
G# 4
octave 3
E_ 4
octave 2
B_ 4
octave 3
A_ 2
... |
;@DOES create a new file, in RAM
;@INPUT HL = file name (8b name, 3b extension = 11 bytes)
;@INPUT DE = file size
;@INPUT CurDir = Directory to place file
;@OUTPUT HL = pointer to VAT entry
;@OUTPUT DE = pointer to file data section
;@OUTPUT C flag is set if failed
;@DESTROYS AF,BC
fs_CreateFile:
ex hl,de
ld bc,12
a... |
ARROW_LEFT_ADDR = $9925
ARROW_RIGHT_ADDR = $992E
mainMenu::
di
call waitVBLANK
reset lcdCtrl
reset VBLANKRegister
reg VRAMBankSelect, 1
ld de, VRAMBgStart
xor a
ld [bgScrollX], a
ld bc, $800
call fillMemory
reg ARROW_LEFT_ADDR, 1 << 5
reg ROMBankSelect, 2
reset VRAMBankSelect
ld de, VRAMWinStart
ld b... |
SECTION code_clib
SECTION code_fp_am9511
PUBLIC cam32_sdcc___mulsint2slong_callee
EXTERN asm_am9511_imul
cam32_sdcc___mulsint2slong_callee:
; 16-bit multiplication, 32-bit result
;
; enter : stack = multiplicand, multiplicand, ret
;
; exit : dehl = product
pop hl
pop de
ex (sp),hl
jp ... |
xor a
ld hl, basescradr + #00f4
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #02ca
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #02cb
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
... |
; MyOS version 0.0.1 Loader
; Copyright 2008 Josh Wyant
bits 16
%include "defines.inc"
global _start
_start:
; Setup stack frame (SS:SP = 0000:7C00)
cli
xor ax,ax
mov ss,ax
mov sp,0x7C00
sti
; Segments (DS = ES = 0x0000)
mov bx,0x0000
mov ds,bx
mov es,bx
; Save drive number
mov [DriveNumber],dl
; Call in... |
Name: ys_koopa.asm
Type: file
Size: 150369
Last-Modified: '2016-05-13T04:50:34Z'
SHA-1: 6683BA9A96D86F46A5FF32451405D72DCA6FDE8A
Description: null
|
;
;
; Support char table (pseudo graph symbols) for the Super80-vduem
; Sequence: blank, top-left, top-right, top-half, bottom-left, left-half, etc..
;
;
; .. X. .X XX
; .. .. .. ..
;
; .. X. .X XX
; X. X. X. X.
;
; .. X. .X XX
; .X .X .X .X
;
; .. X. .X XX
; XX XX XX XX
... |
if 1
println "taken if"
elif 2 / 0 ; avoided fatal "Division by zero" error
println "untaken elif"
elif 3 / 0 ; avoided fatal "Division by zero" error
println "untaken after untaken"
endc
if 0
println "untaken if"
elif 1
println "taken elif"
elif !@#$ ; avoided fatal syntax error
println "untaken elif"
elif %^&*... |
dnl mpn_double
dnl Copyright 2011 The Code Cavern
dnl This file is part of the MPIR Library.
dnl The MPIR Library is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU Lesser General Public License as published
dnl by the Free Software Foundation; either version 2.1 of the L... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.