content stringlengths 23 1.05M |
|---|
global _start
section .data
align 16
quad0low:
dd 1
quad0high:
dd 2
quad1low:
dd -1234567
quad1high:
dd 0
myaddress:
dd 0xdeadbeef
%include "header.inc"
cvtpi2ps xmm0, [quad0low]
; fill xmm1 in order to ensure that the high quadword remain inchanged
pshufd xmm1, xmm0, 0
cvtpi2ps xmm1, [qu... |
TITLE DISMAP
INCLUDE MACROS
PUBLIC DISABLE_MAPOUT,_FLUSH_DISABLE_MAPOUT
.DATA
EXTERNDEF MAP_DEVICE:DWORD
EXTERNDEF LOUTALL:DWORD
.CODE ROOT_TEXT
EXTERNDEF _flush_trunc_close:proc,ROOT_RET:PROC
_FLUSH_DISABLE_MAPOUT PROC
;
;
;
BITT MAP_FLUSHED
JNZ L2$
PUSHAD
SETT MAP_FLUSHED
... |
/*
* FreeRTOS V202112.00
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* 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, incl... |
GLOBAL _exit, _get_pid, _ps, _create_process, _kill, _block, _nice, _wait, _yield_process
GLOBAL _print, _get_char, _clear_window
GLOBAL _alloc, _free, _dump_mem
GLOBAL _open_pipe, _write_pipe, _read_pipe, _close_pipe, _dump_pipes
GLOBAL _open_sem, _wait_sem, _post_sem, _close_sem, _dump_sems
GLOBAL _seconds_elaps... |
;###############################################################################
;# This file is part of "Patrick's Programming Library", Version 7 (PPL7).
;# Web: http://www.pfp.de/ppl/
;#
;# $Author$
;# $Revision$
;# $Date$
;# $Id$
;#
;###############################################################################
;#... |
assume cs:codesg ds:datasg ss:stacksg
datasg segment
db 'welcome to masm!'
db 02h, 24h, 71h
datasg ends
stacksg segment
dw 8 dup(0)
stacksg ends
codesg segment
start: mov ax, datasg
mov ds, ax
mov ax, stacksg
mov ss, ax
mov sp, 10h ;指向栈顶
xor bx, bx
mov ax, 07C8h
mov cs, 3
s3:... |
//////////////////////////////////////////////////////////////////////////////
// astro_turret_code.asm
// Copyright(c) 2021 Neal Smith.
// License: MIT. See LICENSE file in root directory.
//////////////////////////////////////////////////////////////////////////////
// The following subroutines should be called from ... |
frame 1, 07
frame 2, 30
setrepeat 2
frame 2, 08
frame 3, 08
dorepeat 3
frame 2, 30
endanim
|
; code sizes (bytes): 1572 (incl. 0 frags, and 0 lits); src size 0
; assembly: 1294 lines; density: 74.86 bytes/stmt
; total bytes: 206372 (85.0% of 237.0k flash with 36316 free)
; peep hole pass: 6 instructions removed and 17 updated
; peep hole pass: 4 instructions removed and 4 updated
; peep hole pass: 0 instructio... |
IO_URARAM EQU $FD0F
IO_MMR_SWITCH EQU $FD93
IO_MMR_SEGMENT EQU $FD90
IO_MMR_POINTER EQU $FD80
IO_MMR_6000 EQU $FD86
MMR_MAP_ADDRESS EQU $6000
BIOS_VECTOR EQU $FBFA
ORG $1200
BRA FM77AV ; EXEC &H1200
BRA FM7 ; EXEC &H1202
LBRA TRANSMIT_RS232C ; EXEC &... |
; ===============================================================
; Apr 2014
; ===============================================================
;
; FILE *fopen(const char *filename, const char *mode)
;
; Open a file.
;
; ===============================================================
SECTION code_stdio
PUBLIC asm_fo... |
db DEX_ONIX ; pokedex id
db 35 ; base hp
db 45 ; base attack
db 160 ; base defense
db 70 ; base speed
db 30 ; base special
db ROCK ; species type 1
db GROUND ; species type 2
db 45 ; catch rate
db 108 ; base exp yield
INCBIN "pic/ymon/onix.pic",0,1 ; 77, sprite dimensions
dw OnixPicFront
dw OnixPicBack
; attacks known ... |
; ===========================================================================
; uz80as, an assembler for the Zilog Z80 and several other microprocessors.
;
; Sharp LR25902 (Nintendo Gameboy CPU).
; ===========================================================================
#define equ .equ
#define end .end
n: ... |
; third.asm
; Implements a really dumb stack. Just to test memory handling and junk.
;
; compile with:
; nasm -f elf second.asm
; ld --oformat=elf32-i386 -Ttext 100000 first.o -o kernel
;
;
; Simon Heath
; 21/5/2003
global _start
_start:
jmp start2
align 4
dd 0x1badb002
dd 0
dd 0 - 0x1badb002
start2:
mov ea... |
.386
.model flat,stdcall
.stack 4096
option casemap:none
include .\header.inc
.data
endl EQU<0Dh,0Ah>
buffer BYTE BufSize DUP(?),0,0 ;输入暂存区
stdInHandle HANDLE ? ;输入句柄
stdOutHandle HANDLE ? ;输出句柄
bytesRead DWORD ? ;读取字节数
bytesWrite DWORD ? ;写入字节数
userName BYTE BufSize DUP(?),0,0 ;用户名... |
db "COLOR SWAP@" ; species name
db "It changes its"
next "shading to match"
next "its surroundings"
page "so it can sneak up"
next "on prey. Its belly"
next "pattern is fixed.@"
|
;;; ------------------------------------------------------------------------
;;; Macro to simplify function lookup in KERNEL32.DLL
;;; ------------------------------------------------------------------------
%macro GetProcAddress 2
; %warning %3 table index: offset
%xdefine %2 [ r15 + offset ]
%assign offset offset ... |
; Don't even think of reading this code
; It was automatically generated by md5-586.pl
; Which is a perl program used to generate the x86 assember for
; any of elf, a.out, BSDI,Win32, or Solaris
; eric <eay@cryptsoft.com>
;
TITLE md5-586.asm
.486
.model FLAT
_TEXT SEGMENT
PUBLIC _md5_block_x86
_md5_blo... |
;***********************************************************
; Version 2.40.00
;***********************************************************
; Note: a symbol "SI_BUGS" is used to make a work around for silicon
; 5510 version1.0. If you are going to use the code on 5510 vers... |
global CrcUpdateT8:function
global _CrcUpdateT8:function
SECTION .text
%macro CRC1b 0
movzx EDX, BYTE [RSI]
inc RSI
movzx EBX, AL
xor EDX, EBX
shr EAX, 8
xor EAX, [RDI + RDX * 4]
dec R8
%endmacro
align 16
CrcUpdateT8:
_CrcUpdateT8:
push RBX
; push RSI
; push RDI
push ... |
ld a, 3
ld (basescradr + #096b), a
ld (basescradr + #098c), a
ld (basescradr + #0a4e), a
ld (basescradr + #0acf), a
ld (basescradr + #0b6b), a
ld (basescradr + #0c14), a
ld (basescradr + #0df1), a
ld (basescradr + #0f2f), a
ld (basescradr + #0f8d), a
ld (basescradr + #1033), a
ld (basescradr + #... |
include w2.inc
include noxport.inc
include consts.inc
include structs.inc
createSeg res_PCODE,resn,byte,public,CODE
; DEBUGGING DECLARATIONS
ifdef DEBUG
midResn equ 7 ; module ID, for native asserts
endif ;/* DEBUG */
; EXPORTED LABELS
; EXTERNAL FUNCTIONS
externFP <ReloadSb>
externFP <AdjustHplcCpsT... |
BITS 32
;TEST_FILE_META_BEGIN
;TEST_TYPE=TEST_F
;TEST_IGNOREFLAGS=
;TEST_FILE_META_END
; allocate 16 byte aligned stack space for the packed values
lea ecx, [esp-33]
and ecx, 0xfffffff0
; load a 128 bit value into xmm1
mov DWORD [ecx], 0x8e1efe2e
mov DWORD [ecx+4], 0x00adb002
mov DWORD [ecx+8], 0x00adb002
mov DWORD [... |
; -----------------------------------------------------------------------------
; A 64-bit Linux application that writes the first 90 Fibonacci numbers. To
; assemble and run:
;
; nasm -felf64 fib.asm && gcc fib.o && ./a.out
; -----------------------------------------------------------------------------
gl... |
rain START 0
.blue je 195, general 100
first JSUB gene
JSUB init
infJ LDX #0
.main endless loop, sets previous position of drop to black, loads new one, moves it and checks if it is
.off-screen and gets new starting position with offset subroutine
iDrop LDA #0
LDS drops,X
STS pos
STCH @pos
L... |
.cseg
.org 0x00
rcall main_thread
; include components interrupts
;.include "../../../../../src/kernel/drivers/{driver_name}_int.asm"
; include SoC defaults
.include "m8def.inc"
; include components definitions
.include "../../../../../src/kernel/kernel_def.asm"
;.include "../../../../../src/kernel/drivers/{driver_nam... |
ldl $1
and r7,r7,r0
ldl $8
and r7,r7,r1
ldl $8
and r7,r7,r2
xor r3,r3,r3
xor r4,r4,r4
>loop
add r0,r3,r3
add r1,r4,r4
ldl #out
cmp r3,r2,r0
je r6,r7,r0
ldl #loop
jmp r6,r7,r0
>out
hlt
|
.model small
.stack
.data
nombre db 10,13, 'Ingresa tu nombre:', 10, 13, '$' ; Cadena que indica que muestre su nombre
mayuscula db 10,13, 'Su nombre en mayuscula es:', 10, 13, '$' ; Su nombre en mayuscula es
vtext db 100 dup('$') ; Declaracion de vector de 100 b
aux db ?; variable auxili... |
;-----------------------------------------------------------------------------
;
; LOADFNS.286
;
; Copyright (c) 1991, 1995-Present Robert Collins
;
; You have my permission to copy and distribute this software for
; non-commercial purposes. Any commercial use of this software or
; source code... |
; void *zx_saddrpleft_callee(void *saddr, uchar bitmask)
SECTION code_clib
SECTION code_arch
PUBLIC _zx_saddrpleft_callee
EXTERN asm_zx_saddrpleft
_zx_saddrpleft_callee:
pop af
pop hl
dec sp
pop de
push af
ld e,d
jp asm_zx_saddrpleft
|
startMenu:
call drawMap ; erase the screen [drawMap.asm]
call drawPlayer ; player was erased in the call above
xor a ; default option selected
ld hl,startMenuTxt
call drawMenu
call menuGetkey
jp main ;if they cancel out of the menu with [Alpha], go back to the main loop
dispStats:
call clearGbuf
ld bc... |
Music_Routes1_Ch1::
tempo 152
volume 7, 7
vibrato 4, 2, 3
duty_cycle 2
toggle_perfect_pitch
Music_Routes1_branch_9be9::
note_type 12, 10, 1
rest 4
octave 4
note D_, 2
note D_, 6
note D_, 2
note D_, 6
note D_, 2
note D_, 1
note C#, 1
octave 3
note B_, 1
octave 4
note C#, 1
octave 3
note A_, 2
note... |
#####################################################################
## ARQUITETURA MIPS_S - teste de todas as instru��es
## Autor: Ney Calazans (ney.calazans@pucrs.br)
## Teste � exaustivo quanto ao total de instru��es, n�o quanto a
## cobertura de caso de testes poss�veis
##
## Para simular este programa no MIPS_S,... |
; char *addr, *count;
.data #3
START:
; addr = (char*)0xA000;
LDX :#0
LDY #$A000
STY, X
; *count = 0;
LDX :#2
LDA #0
STA, X
; loop:
; *addr = random(33, 126);
LOOP:
LDX #33
LDY #126
INT #1
LDX [:#0]
STB, X
; char tmp = *addr;
; tmp++;
; tmp++;
; *addr = tmp;
LDY [:#0]
INCY
INCY
LDX :... |
subttl emfmul.asm - Multiplication
page
;*******************************************************************************
; Copyright (c) Microsoft Corporation 1991
; All Rights Reserved
;
;emfmul.asm - long double multiply
; by Tim Paterson
;
;Purpose:
; Long double multiplication.
;Inputs:
; ebx:esi =... |
ASSUME CS: code, DS:data
; 8. Print of the screen, for each number between 32 and 126, the value
; of the number (in base 10) and the character whose ASCII code the number is.
data SEGMENT public
i_start DB 32
i_end DB 126
data ENDS
code SEGMENT public
; import print procedure
extrn print:proc
start:
mo... |
COMMENT @----------------------------------------------------------------------
Copyright (c) GeoWorks 1993 -- All Rights Reserved
PROJECT: PC/GEOS
MODULE: Loader
FILE: videoMCGA.asm
ROUTINES:
Name Description
---- -----------
LoaderDisplayMCGA Switch to MCGA, and display the splash screen.
R... |
; Linux x64 basic rest endpoint
; Compile: nasm "-felf64" hello_rest.asm -l hello_rest.lst -o hello_rest.o
; Link: ld -s -melf_x86_64 -o hello_rest hello_rest.o
; Set NASM environment: EXPORT NASMENV=-I/home/nico/repos/linux-nasm/install/includes/
bits 64
[list -]
%include "unistd.inc"
%include "sys/wait.... |
; Herding game for Chip16
; Coding: Tim Kelsall
; Art: Chris Kelsall
;-------------------------------------------------------------------------------
; Outline:
; You are a sheep dog, you get round the sheep, and reach the exit,
; at the top of the screen, without colliding into sheep or fencing.
; A path counter... |
processor 6502
org $1000
lda $4710
sta $d020
sta $d021
ldx #$00
loaddccimage:
lda $3f40,x
sta $0400,x
lda $4040,x
sta $0500,x
lda $4140,x
sta $0600,x
lda $4240,x
sta $0700,x
lda $4328,x
sta $d800,x
lda $4428,x
sta $d900,x
lda $4528,x
sta $da00,x
lda $4628,x
sta $db00,x
inx
bne loaddccimage
l... |
Sound68_QuickDoorSlam_Header:
smpsHeaderStartSong 2
smpsHeaderVoice Sound68_QuickDoorSlam_Voices
smpsHeaderTempoSFX $01
smpsHeaderChanSFX $01
smpsHeaderSFXChannel cFM5, Sound68_QuickDoorSlam_FM5, $F4, $00
; FM5 Data
Sound68_QuickDoorSlam_FM5:
smpsSetvoice $00
dc.b nD2, $04, nC3, $06
smpsStop
So... |
; =============================================================================
; Ultima VII: The Black Gate Hacks -- expanded overlay 2
; -----------------------------------------------------------------------------
; a second eop segment for offloading large, less frequently called procedures
; from the primary ... |
PAGE ,132
TITLE MS DOS 5.0 - NLS Support - KEYB Command
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; MS DOS 5.0 - NLS Support - KEYB Command
; (C) Copyright Microsoft Corp 1987-1991
;
; File Name: COMMSUBS.ASM
; ----------
;
; Description:
; ------------
; Common subroutines used by NLS suppo... |
;
; Z88 Graphics Functions
;
; Written around the Interlogic Standard Library
;
; $Id: getmaxy.asm,v 1.3 2015/01/19 01:32:46 pauloscustodio Exp $
;
INCLUDE "graphics/grafix.inc"
PUBLIC getmaxy
.getmaxy
ld hl,maxy-1
ret
|
SECTION code_fp_am9511
PUBLIC l_f32_div
EXTERN cam32_sccz80_fdiv_callee
defc l_f32_div = cam32_sccz80_fdiv_callee
|
frame 1, 05
frame 2, 10
frame 3, 10
frame 4, 10
frame 3, 10
frame 1, 10
frame 0, 10
frame 5, 10
endanim
|
; A085130: Duplicate of A080194.
; 7,14,21,28,35,42,49,56,63,70,84,98,105,112,126,140,147,168,175,189,196
mov $7,$0
mov $9,$0
add $9,1
lpb $9,1
clr $0,7
mov $0,$7
sub $9,1
sub $0,$9
mov $1,$0
div $0,2
add $1,1
lpb $0,1
sub $0,2
mov $2,1
mov $6,$0
pow $6,2
sub $6,1
mod $6,$1
... |
; ===============================================================
; May 2017
; ===============================================================
;
; void *tshc_pxy2aaddr(uchar x, uchar y)
;
; Attribute address of byte containing pixel at coordinate x, y.
;
; ===============================================================... |
; Copyright (C) 2021 Mateus de Lima Oliveira
[bits 32]
section .text
global load_gdt
load_gdt:
mov eax, DWORD [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
|
mon_prob: MACRO
; percent, index
db \1, \2 * 2
ENDM
GrassMonProbTable:
mon_prob 30, 0 ; 30% chance
mon_prob 60, 1 ; 30% chance
mon_prob 80, 2 ; 20% chance
mon_prob 90, 3 ; 10% chance
mon_prob 95, 4 ; 5% chance
mon_prob 99, 5 ; 4% chance
mon_prob 100, 6 ; 1% chance
WaterMonProbTable:
mon_prob 60, 0 ... |
; 0 - POP this 0
leaw $SP, %A
movw (%A), %A
decw %A
movw (%A), %D
leaw $THIS, %A
movw (%A), %S
leaw $0, %A
addw %S, %A, %S
movw %S, %A
movw %D, (%A)
leaw $SP, %A
movw (%A), %A
decw %A
movw %A, %D
leaw $SP, %A
movw %D, (%A)
; 1 - POP this 1
leaw $SP, %A
movw (%A), %A
decw %A
movw (%A), %D
leaw $THIS, %A
movw (%A), %S
le... |
;
; Small C+ Runtime Library
;
; CP/M functions
;
; CPM Plus "userf" custom Amstrad calls, for Amstrad CPC & PCW and ZX Spectrum +3
;
; WARNING:
; This function does not work under PCW or +3 CP/M (and probably not CPC CP/M either),
; because the values in B and C are always reset to zero before the... |
;--------------------------------------------------
; Vector
.org $FFFA
.dw NMI
.dw Reset
.dw Interrupt
.org $FFF0
NMI:
Interrupt:
BRK
RTI
.org $8000
Reset:
LDA #$42
STA <Argument_A
LDA #42
STA <Argument_B
JSR Multiply
NOP
BRK
;--------------------------------------------------
; Calculation
Argument... |
;============================================================
;=== Win32.SMOG virus. Coded by Necronomikon[Zer0Gravity] ===
;============================================================
;Virusname: Win32.Smog
;------------------------------------------------------------
;Author: Necronomikon
;--------------------... |
section .data
fizz_msg db "Fizz"
fizz_len equ $ - fizz_msg
buzz_msg db "Buzz"
buzz_len equ $ - buzz_msg
new_line db 0xA
section .text
global _start
_start:
mov ebp, esp
mov dword [ebp - 4], 1
mov byte [ebp - 5], 0
check_fizz:
mov eax, [ebp - 4]
mov ebx, 3
cdq
... |
; ------------------------------------------------------------------
; MichalOS Music Player - mono MMF decoder
; ------------------------------------------------------------------
start_mono_mmf:
push bx
mov ax, bx
mov cx, buffer
call os_load_file
sub bx, 3
mov [.filesize], bx
mov cx, [buffer]
call os_set... |
.data
.word 0x1
.word 0x2
.word 0x3
.word 0x4
.text
.word 0x8001
.word 0x8002
.word 0x8003
.word 0x8004
.data
.word 0x11
.word 0x12
.word 0x13
.word 0x14
.text
.word 0x8011
.word 0x8012
.word 0x8013
.word 0x8014
|
section .text
global zamien
zamien:
mov r12, rdi ;adres tablicy
mov r13, rsi ;l.el
_petla:
cmp dword [r12+r13*4], 5
jne _dalej
mov dword[r12+r13*4], 20
_dalej:
dec r13,
cmp r13, 0
ja _petla
mov rax, r13
ret
|
section .text
align 4
extern GDT
global gdt_flush
gdt_flush:
lgdt [GDT]
gdt_flush_code:
jmp 0x08: gdt_flush_data
; The following 7 lines of code were taken from Micro-OS (Amit Saroussi is the real king)
gdt_flush_data:
mov ax, 0x10 ;; data segment
mov ds, ax ;; update all data segments
mov ss... |
default rel
%define XMMWORD
section .text code align=64
EXTERN fips_openssl_ia32cap_p
global fips_sha1_block_data_order
ALIGN 16
fips_sha1_block_data_order:
mov QWORD[8+rsp],rdi ;WIN64 prologue
mov QWORD[16+rsp],rsi
mov rax,rsp
$L$SEH_begin_sha1_block_data_order:
mov rdi,rcx
mov rsi,rdx
mov rdx,r8
mov r9d,D... |
SECTION rodata_font_fzx
PUBLIC _ff_utz_TinyTexanXS
_ff_utz_TinyTexanXS:
BINARY "font/fzx/fonts/utz/TinyTexan/tinytexanXS.fzx"
|
PROGRAM 208
LDGADDR 0
LDCINT 0
STOREW
L0:
LDGADDR 0
LOADW
LDCINT 4
CMP
BGE L1
LDGADDR 4
LDCINT 0
STOREW
L4:
LDGADDR 4
LOADW
LDCINT 10
CMP
BGE L5
LDGADDR 8
LDGADDR 0
LOADW
LDCINT 40
MUL
ADD
LDGADDR 4
LOADW
LDCINT 4
MUL
ADD
LDGADDR 0
... |
LancesRoom_Object:
db $3 ; border block
db 3 ; warps
warp 24, 16, 2, AGATHAS_ROOM
warp 5, 0, 0, CHAMPIONS_ROOM
warp 6, 0, 0, CHAMPIONS_ROOM
db 0 ; signs
db 1 ; objects
object SPRITE_LANCE, 6, 1, STAY, DOWN, 1, OPP_LANCE, 1
; warp-to
warp_to 24, 16, LANCES_ROOM_WIDTH ; AGATHAS_ROOM
warp_to 5, 0, LANCES_RO... |
; This program prompts the user to enter a base 16 number
; It prints the number entered in both binary and hex
org 100h
section .data
prompt1: db "Please enter a decimal number: $"
prompt2: db 0Dh,0Ah, "In binary, the number you entered is: $"
prompt3: db 0Dh,0Ah, "In hexadecimal, the number you entered i... |
; A036501: Number of inequivalent Golomb rulers with n marks and shortest length.
; 1,1,1,2,4,5,1,1,1,2,1,1,1,1,1,1,1,1
mov $2,$0
mod $0,2
add $0,$2
mul $0,2
sub $0,$2
mul $2,3
lpb $0
sub $2,2
mov $0,$2
add $3,2
div $0,$3
sub $0,$3
mov $4,$0
lpe
mov $0,$4
add $0,1
|
; vi:filetype=nasm
gdtr dw 0
dd 0
; TODO: Think about moving to "higher half kernel"
global gdt_load
gdt_load:
mov eax, [esp + 4] ; load gdt address
mov [gdtr + 2], eax
mov ax, [esp + 8] ; load gdt size
mov [gdtr], ax
lgdt [gdtr] ; load idt
ret
global reload_segments
... |
; inode handling ;
define KERNEL_VFS_INODE 0
define KERNEL_VFS_INODE_FLAGS 0 ; 1 byte, inode flag
define KERNEL_VFS_INODE_ATOMIC_LOCK 1 ; rw lock, 5 bytes
define KERNEL_VFS_INODE_REFERENCE 6 ; 1 byte, number of reference to this inode
define KERNEL_VFS_INODE_SIZE 7 ; 3 bytes, size of the inode
define KERNEL_VFS... |
[bits 16]
; print char from al
printChar:
mov ah, 0x0e ; enable print mode
int 0x10 ; print interrupt
ret
; print new line
printEndl:
mov al, 0
stosb
mov al, 0x0d ; vertical tab
call printChar
mov al, 0x0a ; new line
call printChar
ret
; print string from si
printString16:
.... |
KEY_VALUE_BASIC_INFORMATION struc
TitleIndex dd ?
_Type dd ?
NameLength dd ?
_Name dw ?
KEY_VALUE_BASIC_INFORMATION ends
KEY_VALUE_FULL_INFORMATION struc
TitleIndex dd ?
_Type dd ?
DataOffset dd ?
DataLength dd ?
NameLength dd ?
_Name dw ?
KEY_VALUE_FULL_INFORMATION en... |
;_________________from 0_init.asm_________________
.include "m64def.inc"
APP_INIT:
ldi lcd_temp, low(RAMEND)
out SPL, lcd_temp
ldi lcd_temp, high(RAMEND)
out SPH, lcd_temp
rcall LCD_INIT_ALL
QUIT: rjmp QUIT
;_________________from lcd_module.asm_________________
.def lcd_temp = r16
.def LCD_SETTINGS = r17
.def LCD = ... |
<%
from pwnlib.shellcraft.amd64.linux import encode
from pwnlib import asm
from pwnlib.shellcraft import amd64
%>
<%page args="code, flex=None"/>
<%docstring>
Execute a different process.
>>> p = run_assembly(shellcraft.flexshell())
>>> p.sendline(b'echo Hello')
>>> p.recv()
b'Hello\n'
</%docstring>
<... |
GLOBAL clearScreen
GLOBAL getChar
GLOBAL putChar
GLOBAL getTime
GLOBAL drawPixel
GLOBAL setInterval
GLOBAL stopInterval
GLOBAL getScreenDimentions
GLOBAL getMem
GLOBAL getRegisters
GLOBAL checkException
GLOBAL invalidOpCode
section .text
%macro handler 1
push rbp
mov rbp, rsp
mov rax, %1
int 80h
mov rsp, rbp
po... |
[bits 16]
section .text
global _mode_set
global _plot_pixel
global _set_dac
_mode_set:
push bp
mov bp, sp
mov ah, 0 ; Set Mode
mov al, [bp + 4] ; Mode to set to
int 10h
pop bp
ret
_plot_pixel:
push bp
mov bp, sp
mov ax, [bp + 6] ; Y coord
mov bx, 320
mul bx
add ax, [bp + 4] ; ... |
; ===============================================================
; Jan 2014
; ===============================================================
;
; void *p_list_insert_after(p_list_t *list, void *list_item, void *item)
;
; Insert item after list_item, which is already in the list.
;
; =================================... |
.text
.globl main
main:
li $t0, 12
li $t2, 15
move $t3, $t0
sub $t1, $t2, $t3
move $t0, $t1
li $v0, 1
move $a0, $t0
syscall
li $a0, 10
li $v0, 11
syscall
li $t4, 4
li $t6, 6
move $t7, $t4
sub $t5, $t6, $t7
move $t9, $t5
li $t0, 1
sub $t8, $t9, $t0
move $t4, $t8
li $v0, 1
move $a0, $t4
syscall
li $a0, 10
li $v0, 11
sysc... |
Sound49_Bonus_Header:
smpsHeaderStartSong 2
smpsHeaderVoice Sound49_Bonus_Voices
smpsHeaderTempoSFX $01
smpsHeaderChanSFX $01
smpsHeaderSFXChannel cFM5, Sound49_Bonus_FM5, $0E, $00
; FM5 Data
Sound49_Bonus_FM5:
smpsSetvoice $00
smpsModSet $01, $01, $33, $18
dc.b nAb4, $1A
smpsStop
Sou... |
dnl AMD64 mpn_mul_1 using mulx optimised for Intel Haswell.
dnl Contributed to the GNU project by Torbjörn Granlund.
dnl Copyright 2012, 2013 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 und... |
;Testname=unoptimized; Arguments=-O0 -fbin -obr3187743.bin; Files=stdout stderr br3187743.bin
;Testname=optimized; Arguments=-Ox -fbin -obr3187743.bin; Files=stdout stderr br3187743.bin
bits 64
vlddqu xmm0,[edi]
vlddqu ymm0,[edi]
|
// Note: All macro names are not case-sensitive
.macro .f_CalSaveChecksum, ramAddr, numBytes, upper16
li a0, ramAddr
li a1, numBytes
jal 0x8027939C
li.l a2, upper16
.endmacro
.macro .f_CheckCurrObjBehavior, behAddr
li.u a0, behAddr
jal 0x802A14FC
li.l a0, behAddr
.endmacro
.macro .f_CheckObjBehavior, objPtr, ... |
; Original address was $B6BA
.word W802L ; Alternate level layout
.word W802O ; Alternate object layout
.byte LEVEL1_SIZE_03 | LEVEL1_YSTART_170
.byte LEVEL2_BGPAL_05 | LEVEL2_OBJPAL_08 | LEVEL2_XSTART_18
.byte LEVEL3_TILESET_14 | LEVEL3_VSCROLL_FREE | LEVEL3_PIPENOTEXIT
.byte LEVEL4_BGBANK_INDEX(1) | LEVEL4_INI... |
tests:
.db 38 ; number of tests
.dw testTrivial
.dw testIsLeapYear
.dw testMonthLength
.dw testConvertTimeToTicks1
.dw testConvertTimeToTicks2
.dw testConvertTimeToTicks3
.dw testConvertTimeToTicks4
.dw testConvertTimeToTicks5
.dw testConvertTimeToTicks6
.dw testConvertTimeTo... |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: SndPlay (Sample PC GEOS application)
FILE: sndplayUI.asm
REVISION HISTORY:
Name Date Description
---- ---- -----------
TS 6/16/93 Initial ver... |
; ******************************************************************************
; ******************************************************************************
;
; Name : crunch.asm
; Purpose : Remove locals from user dictionary
; Author : Paul Robson (paul@robsons.org.uk)
; Created : 27th October 2019
;
; *... |
BITS 64
%include "bmj.asm"
section .text
global _start
_start:
is_root ; Returns 1 in RAX if UID=0
cmp rax, 1 ; Check above condition
jne xit ; If not rut, quit execution flow with exit(0)
run_bg "echo pvvned" ; Desired command to run
r... |
;; nmi
;; detect joy
readJoy: ; [skip]
LDA #$01
STA JOY1 ; start reading
STA down@input
LSR a
STA JOY1
@loop: ;
LDA JOY1
LSR a
ROL down@input
BCC @loop
;;
saveJoy: ; [skip]
LDA down@input
CMP last@input
... |
ifdef RAX
.code
extern OriginalFuncs_winmm:QWORD
CloseDriver proc
jmp QWORD ptr OriginalFuncs_winmm[0 * 8]
CloseDriver endp
DefDriverProc proc
jmp QWORD ptr OriginalFuncs_winmm[1 * 8]
DefDriverProc endp
DriverCallback proc
jmp QWORD ptr OriginalFuncs_winmm[2 * 8]
DriverCallback endp
DrvGetModu... |
; Executable name : execve_01_bash_shell
; Version : 1.0
; Created date : 06/08/2020
; Last update : 06/08/2020
; Author : bigb0ss
; Description : 1) This is to run "/bin/bash" using execve function
; 2) This will leverage a technique called JMP-CALL-POP to read "/bin/bash"... |
INCLUDE "hardware.inc"
; Sound array header:
; Byte 1 = FX Channel to play on (NOT the same as hardware audio channel!) (0 or 1)
; Byte 2 = Starting Sound Priority
; Format of sound array entries:
; Byte 1 = Command
; FF = Stop Sound
; FE = Change Priority
; FD = Change CH1 Pan
; FC = Change CH2 Pan
; FB = Change CH3... |
; ===============
; Project defines
; ===============
; Hardware defines
include "hardware.inc"
; ================
; Global constants
; ================
sys_DMG equ 0
sys_GBP equ 1
sys_SGB equ 2
sys_SGB2 equ 3
sys_GBC equ 4
sys_GBA equ 5
btnA ... |
;
; Sharp OZ family functions
;
; ported from the OZ-7xx SDK by by Alexander R. Pruss
; by Stefano Bodrato - Oct. 2003
;
;
; custom interrupt code + key scanning
; waits for a keystroke, serial data, or interrupt event
;
;
; ------
; $Id: ozintwait.asm,v 1.4 2016/06/27 21:25:36 dom Exp $
;
SECTION code_clib
P... |
main:
PUSH %14
MOV %15,%14
SUBS %15,$4,%15
MOV $0,-4(%14)
@main_body:
branch_0:
CMPS -4(%14),$1
JEQ branch_first_0
CMPS -4(%14),$3
JEQ branch_second_0
CMPS -4(%14),$5
JEQ branch_third_0
JMP branch_otherwise_0
branch_first_0:
ADDS -4(%14),$1,%0
MOV %0,-4(%14)
JMP branch_exit_0
branch_se... |
; void SMS_loadSpritePaletteHalfBrightness(void *palette)
SECTION code_clib
SECTION code_SMSlib
PUBLIC SMS_loadSpritePaletteHalfBrightness
EXTERN asm_SMSlib_loadSpritePaletteHalfBrightness
defc SMS_loadSpritePaletteHalfBrightness = asm_SMSlib_loadSpritePaletteHalfBrightness
|
; Text string for overwrite query V2.00 1990 Tony Tebby QJUMP
section language
include 'dev8_mac_text'
mktext okov,{OK to Overwrite}
end
|
Name: mario.asm
Type: file
Size: 1621
Last-Modified: '1992-12-15T02:20:26Z'
SHA-1: 362A6348C937FBA232792B87C7DBA23009FBFB4B
Description: null
|
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1988 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: MEGA screen driver
FILE: megaEscTab.asm
AUTHOR: Jim DeFrisco
REVISION HISTORY:
Name Date Description
---- ---- -----------
jad 4/88 initi... |
; Nathan Lowe
; EECS 2110 - Computer Architecture and Organization
; Spring 2016 at the University of Toledo
;
; Description: Given the length, width, and height in feet and inches,
; calculate the volume in cubic feet and inches or total
; cubic inches
;
; ===================================================... |
;
; FILENAME : f64_nextafter.asm
;
; DESCRIPTION :
; double nextupd(double v)
; double nextdownd(double v)
; double nextafterd(double u, double v)
;
; assembly module written for MASM/NASM
;
; AUTHOR : Rainer Erdmann
;
; Copyright 2016-2019 Rainer Erdmann
;
; License: see accompany... |
Sound_84_Header:
smpsHeaderStartSong 3
smpsHeaderVoice Sound_84_Voices
smpsHeaderTempoSFX $01
smpsHeaderChanSFX $01
smpsHeaderSFXChannel cFM5, Sound_84_FM5, $03, $05
; FM5 Data
Sound_84_FM5:
smpsSetvoice $00
smpsModSet $01, $01, $08, $C5
dc.b nCs1, $66
smpsStop
Sound_84_Voices:
; Voic... |
;
; ANSI Video handling for the ZX81
; By Stefano Bodrato - Sept 2007
;
; CLS - Clear the screen
;
;
; $Id: f_ansi_cls.asm,v 1.5 2015/01/19 01:33:20 pauloscustodio Exp $
;
PUBLIC ansi_cls
EXTERN _clg_hr ; we use the graphics CLS routine
IF MTHRG
XREF text_rows
XREF MTCH_P2
ENDIF
.ansi_cls
call _clg_hr
IF MTH... |
SECTION rodata_font
SECTION rodata_font_8x8
PUBLIC _font_8x8_zx_system
PUBLIC _font_8x8_zx_system_end
_font_8x8_zx_system:
IF __CPU_GBZ80__
INCLUDE "target/gb/fonts/lower.asm"
ENDIF
BINARY "font_8x8_zx_system.bin"
_font_8x8_zx_system_end:
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.