content stringlengths 23 1.05M |
|---|
; A152915: Exponacci (or exponential Fibonacci) numbers.
; 1,1,2,9,64,3125,1679616,96889010407,9223372036854775808,278128389443693511257285776231761
mov $1,$0
seq $1,45 ; Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.
pow $0,$1
|
bits 32
global gdt_load
gdtr:
dw 0
dd 0
gdt_load:
mov [gdtr + 2], ecx
mov [gdtr], dx
lgdt [gdtr]
jmp 0x08:.reload_cs
.reload_cs:
mov ax, 0x10
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
mov ax, 0x28
ltr ax
ret
|
audio_header: MACRO
db (_NARG - 2) << 6 | \2
dw \1_\2
IF _NARG > 2
db \3
dw \1_\3
ENDC
IF _NARG > 3
db \4
dw \1_\4
ENDC
IF _NARG > 4
db \5
dw \1_\5
ENDC
ENDM
const_def $10
; arguments: length [0, 7], pitch change [-7, 7]
; length: length of time between pitch shifts
; sometimes used with ... |
MVI C,00 // CONTAINS THE NUMBERS OF 0'S
MVI B,00 // CONTAINS THE NUMBERS OF 1'S
MVI E,08
LXI H,2060
MOV A,M
L1: STC
CMC
RAL
JC L2
INR C
L3: DCR E
JNZ L1
MOV A,B // 1'S
STA 2070
MOV A,C // 0'S
STA 2071
HLT
L2: INR B
JMP L3
# ORG 2060H
# DB 44
|
# Authors: Miriam Penger, Lena Gerken, Tina Hoeflich
# Test for the function in move_ball.asm
# Drawing the ball in the top left corner of the display.
# Then, moving the ball from coordinates (3/3) to (5/6).
.include "cesplib_rars.asm"
.text
li a1, 3
li a2, 3
li a3, 0xffffff
jal draw_ball
# cesp_sleep
li a0, 50
l... |
# Exception Handler
# Interrupt: Excode = 0
# Overflow: ExCode = 12
# Status $12
# Cause $13
# EPC $14
.kdata 0x90000000
# Espa�o para salvamento de contexto:
save: .word 0,0,0,0
# Espa�o para salvamento do valor que est� sendo digitado:
_temp: .word 0
.ktext 0x80000180 # Reloca o tratador para residir no en... |
; *******************************************************************************************
; *******************************************************************************************
;
; Name : interface_tools.asm
; Purpose : Interface routines
; Date : 16th August 2019
; Author : Paul Robson (paul@robsons... |
#####################################
# QUICKSORT #
# #
# Implemented in DLX assembly. #
# #
# Luca Nassi 194675 #
# Daniele Jahier Pagliari 196046 #
# #
################... |
; DV3 QLSD Find "Partition" (= container file) V1.02 2018 W.Lenerz
;
; 2018-06-25 1.01 Keep error codes from sector read calls (MK)
; 2020-01-16 1.02 Allow direct QLWA format (MK)
section dv3
xdef hd_fpart
xdef hd_fpart_internal
xref hd_rscard
include 'dev8_dv3_qlsd_keys'
include 'dev8_keys_err'
includ... |
[bits 32]
os.hopToRealMode equ realModeExec ; for backwards compatibility
os_RealMode_functionPointer equ rmfunc
rmfunc :
dd 0x0
realModeExec :
pusha
cli
call rmeDisablePIC
cli
mov [rmeStackSave], esp
sgdt [rmeGDTsave]
lgdt [RMGDT]
jmp rmCodeOffs:rmeBeginRealMode
.ret :
popa
ret
[bits 16]
rm... |
; Add Extension to filename V2.00 1990 Tony Tebby QJUMP
section cv
xdef cv_addex
include 'dev8_keys_hdr'
include 'dev8_keys_err'
;+++
; Copies string, adding extension (_xxx). If the extension makes the name
; longer than a permitted filename, the name is truncated.
;
;... |
0:MOV [0] 7
3: XOR [0] 15
6:DPRINT [0]
8 :HALT
|
;;----------------------------------------------------------------------------;;
;; Char to upper case for familar wiki search function.
;; Copyright 2015 Benito Palacios (aka pleonex)
;;
;; Licensed under the Apache License, Version 2.0 (the "License");
;; you may not use this file except in compliance with the Li... |
;;
;; aPLib compression library - the smaller the better :)
;;
;; fasm 64-bit safe assembler crc checker
;;
;; Copyright (c) 1998-2014 Joergen Ibsen
;; All Rights Reserved
;;
;; http://www.ibsensoftware.com/
;;
format MS64 COFF
public aPsafe_check
extrn aP_crc32
; ================================... |
; This code is adapted from Kernel Toolkit 0.2
; and Linux version 2.2.x, so the following copyrights apply:
; Copyright (C) 1991, 1992 Linus Torvalds
; modified by Drew Eckhardt
; modified by Bruce Evans (bde)
; adapted for Kernel Toolkit by Luigi Sgro
%ifndef UTIL_ASM
%define UTIL_ASM
; The following were copied f... |
dnl mc68020 mpn_rshift -- mpn right shift.
dnl Copyright 1996, 1999-2003 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 Lice... |
andi $4,$4,16449
addu $1,$1,$3
sllv $0,$0,$3
ori $3,$5,59801
xori $3,$4,18570
and $4,$3,$3
addiu $5,$1,-23976
subu $1,$4,$3
andi $4,$4,1290
slt $4,$1,$3
xori $1,$1,16825
lw $5,4($0)
lb $6,13($0)
subu $5,$5,$3
and $3,$4,$3
lb $6,7($0)
xor $2,$2,$3
sltiu $3,$3,2809
slti $4,$4,13986
sltiu $3,$3,-28962
ori $3,$3,6686
or $5... |
; Sprinter fcntl library
;
; $Id: mkdir.asm,v 1.1 2002/11/20 20:28:44 dom Exp $
;
XLIB mkdir
;int mkdir(char *path, mode_t mode)
.mkdir
pop bc
pop de
pop hl
push hl
push de
push bc
ld c,$1B ;MKDIR
rst $10
ld hl,0
ret nc
dec hl ;-1
ret
|
.rsset $0000 ;;start variables at ram location 0
WrapperVariableLocation:
pointerLow .rs 1
pointerHigh .rs 1
pointerLow2 .rs 1
pointerHigh2 .rs 1
randomValue .rs 1
buttons1 .rs 1
buttons2 .rs 1
temp1 .rs 1
temp2 .rs 1
temp3 .rs 1
temp4 .rs 1
temp5 .rs 1
arg1 .rs 1
arg2 .rs 1
arg3 .rs 1
ar... |
; Find all matching items held by all party members and return their ibos in a
; (near-allocated) linked list.
[bits 16]
startPatch EXE_LENGTH, eop-findAllPartyItems
startBlockAt addr_eop_findAllPartyItems
push bp
mov bp, sp
; bp-based stack frame:
%assign arg_itemFrame 0x08
%assign arg_it... |
;; xOS32
;; Copyright (C) 2016-2017 by Omar Mohammad.
use32
; Address Resolution Protocol..
ARP_PROTOCOL_TYPE = 0x0806
ARP_REQUEST = 0x0001
ARP_REPLY = 0x0002
; arp_gratuitous:
; Sends a gratuitous ARP request
arp_gratuitous:
cmp [network_available], 0
je .done
mov ecx, 8192
call kmalloc
mov [.packet], ... |
ALIGN 256
SCREEN_OFFSET_X = 39 ;128
SCREEN_OFFSET_Y = 37
MAX_VERTS = 64
;----------------------------------------------------------------------------------------------------------
; screen space 3D perspective projection table
;------------------------------------------------------------------------------------------... |
;
; BASIC-DOS Disk Services
;
; @author Jeff Parsons <Jeff@pcjs.org>
; @copyright (c) 2020-2021 Jeff Parsons
; @license MIT <https://basicdos.com/LICENSE.txt>
;
; This file is part of PCjs, a computer emulation software project at pcjs.org
;
include macros.inc
include bios.inc
include disk.inc
include d... |
; A089105: Values taken by least witness function W(n).
; 2,3,5,6,7,10,11,12,13,14,15,17,18,19,20,21,22,23,24,26
mov $2,$0
lpb $2
add $0,1
mov $2,4
lpe
seq $0,37 ; Numbers that are not squares (or, the nonsquares).
|
<% from pwnlib.shellcraft import aarch64, pretty, common %>
<%docstring>Copies memory.
Args:
dest: Destination address
src: Source address
n: Number of bytes
</%docstring>
<%page args="dest, src, n"/>
<%
memcpy_loop = common.label("memcpy_loop")
%>
/* memcpy(${pretty(dest)}, ${pretty(src)}, ${pretty(n)... |
ori $1, $0, 4
ori $2, $0, 11
ori $3, $0, 8
ori $4, $0, 11
sw $2, 0($0)
sw $1, 4($0)
sw $4, 8($0)
sw $2, 12($0)
sw $1, 16($0)
sw $2, 20($0)
sw $1, 24($0)
sw $1, 28($0)
sw $2, 32($0)
sw $3, 36($0)
sw $3, 40($0)
sw $1, 44($0)
sw $2, 48($0)
sw $1, 52($0)
sw $2, 56($0)
sw $1, 60($0)
sw $3, 64($0)
sw $3,... |
;.XMM
.model flat, stdcall
ExitProcess PROTO STDCALL :DWORD
includelib kernel32.lib
includelib libcmt.lib
includelib legacy_stdio_definitions.lib
printf PROTO C :ptr sbyte, :VARARG
.DATA
lpFmt db "%f",0ah, 0dh, 0
X REAL4 3.14
Y REAL4 5.701
Z REAL4 0.0
.STACK 200
.CODE
main proc c
mov... |
; uint zx_aaddr2cx_fastcall(void *attraddr)
SECTION code_arch
PUBLIC _zx_aaddr2cx_fastcall
_zx_aaddr2cx_fastcall:
INCLUDE "arch/zx/display/z80/asm_zx_aaddr2cx.asm"
|
INCLUDE "hc800.i"
INCLUDE "math.i"
INCLUDE "rc800.i"
; ---------------------------------------------------------------------------
; -- Multiply two integers
; --
; -- Inputs:
; -- bc - pointer to multiplicand and result
; -- ft - multiplier
; --
SECTION "MathMultiplyUnsigned_32x16_p32",CODE
MathMultiplyUn... |
[bits 64]
corrupt_pdf:
push rax
push rbx
push rcx
push rdx
push rsi
push rdi
push rbp
push r8
push r9
push r10
push r11
push r12
push r13
push r14
push r15
XMMPUSH xmm5
call start_log
; Pick a random base PDF input
call rand_pdf
mov [gs:thread_local.fuzz_input_len], rcx
mov rdi, [gs:thread_l... |
_set_bkg_data_rle::
add sp, #-8
; count = n * 16
ldhl sp,#11
ld l, (hl)
ld h, #0x00
add hl,hl
add hl,hl
add hl,hl
add hl,hl
inc sp
inc sp
push hl
; out 0x9000 + (first * 16)
ldhl sp,#10
ld l,(hl)
ld h,#0x00
add hl,hl
add hl,hl
add hl,hl
add hl,hl
ld bc, #0x9000
add hl, bc
l... |
; Program 5.4
; while Loop - MASM (32-bit)
; Copyright (c) 2019 Hall & Slonka
.386
.MODEL FLAT, stdcall
.STACK 4096
ExitProcess PROTO, dwExitCode:DWORD
.code
_main PROC
mov eax, 30
while_loop:
cmp eax, 50
jae done
inc eax
jmp while_loop
done:
INVOKE ExitProcess, 0
_main ENDP
END
|
; int getchar(void)
INCLUDE "config_private.inc"
SECTION code_clib
SECTION code_stdio
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
IF __CLIB_OPT_MULTITHREAD & $02
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
PUBLIC _getchar
EXTERN asm_getchar
_getchar:
push ix
call asm_getchar
pop ix
ret
;;;;;;;;;;;;;;;;;;;;;;;;;;;;... |
E:
INY ; increment index
BNE $50 ; branch until page dont
DDD:
INC $11 ; increment high byte of pointer
LDA $11 ; load page number as colour
CPX $14 ; compare with max value
BRK
JMP DDD |
;This will be a multiboot compatible kernel :)
; The bootloader has loaded us into 32-bit protected mode on a x86
; machine. Interrupts are disabled. Paging is disabled. The processor
; state is as defined in the multiboot standard. The kernel has full
; control of the CPU. The kernel can only make use of hardware feat... |
kernel: file format elf32-i386
Disassembly of section .text:
80100000 <multiboot_header>:
80100000: 02 b0 ad 1b 00 00 add 0x1bad(%eax),%dh
80100006: 00 00 add %al,(%eax)
80100008: fe 4f 52 decb 0x52(%edi)
8010000b: e4 0f in $0xf,%al
8010000c <entry>:... |
;==========================================
; Random Access File Handling
;==========================================
CMD_SEEK = $16
CMD_FILE_OPEN_RANDOM_READ = $31
CMD_FILE_OPEN_RANDOM_WRITE = $37
STATUS_FILEHANDLE = $60
STATUS_EOF = $60
;-------------------------------------------------------------... |
; Actually program something into the flash
PROGRAM_ROM = 1
; Read bank ID from here (written by Makefile)
INCLUDE "bank_to_program.inc"
INCLUDE "common.asm"
SAVE "flash_rom.bin", entry_point, end_of_code
|
export DeathmatchScoreboardMessage
code
proc DeathmatchScoreboardMessage 2488 68
ADDRLP4 1040
CNSTI1 0
ASGNI1
ADDRLP4 2456
CNSTI4 0
ASGNI4
ADDRLP4 1032
ADDRLP4 2456
INDIRI4
ASGNI4
ADDRLP4 2452
ADDRLP4 2456
INDIRI4
ASGNI4
ADDRLP4 2448
ADDRGP4 level+72
INDIRI4
ASGNI4
ADDRLP4 4
ADDRLP4 2456
INDIRI4
ASGNI4
ADDRGP4 $58
JUMP... |
; Test case: test to see if MDL can track the file names / line numbers properly
; when optimizing code form macros defined in another file.
include "test29-include.asm"
ld_val 0
ld_val 1
ld_val 0
end:
jp end
val:
db 0 |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: Spell
MODULE: ICS
FILE: icsThread.asm
AUTHOR: Andrew Wilson, Aug 12, 1992
REVISION HISTORY:
Name Date Description
---- ---- -----------
atw 8/12/92 Initi... |
; =======================================================================>
PING equ 0BF1h ; a worthless DOS function
PONG equ 0DEAFh ; response to residency test
code segment
org 100h
assume cs:code,ds:code
start:
jmp virus_be... |
BITS 32
;TEST_FILE_META_BEGIN
;TEST_TYPE=TEST_F
;TEST_IGNOREFLAGS=FLAG_SF|FLAG_PF
;TEST_FILE_META_END
;TEST_BEGIN_RECORDING
lea ecx, [esp-0x30]
and ecx, 0xFFFFFFF0
mov dword [ecx+0x00], 0xAAAAAAAA
mov dword [ecx+0x04], 0xBBBBBBBB
mov dword [ecx+0x08], 0xCCCCCCCC
mov dword [ecx+0x0C], 0xDDDDDDDD
movdqu xmm1, [ecx]
mo... |
; Licensed to the .NET Foundation under one or more agreements.
; The .NET Foundation licenses this file to you under the MIT license.
; See the LICENSE file in the project root for more information.
; ==++==
;
;
; ==--==
; ***********************************************************************
; File: JitHelpers_Sin... |
; https://gist.github.com/ruyrybeyro/e4af49aa29086b3a5b61a0d52c5d0d8f
; Adapted for Z80 Spectrum syntax, assembled with pasmo
ORG 50000
LD A,2 ; upper screen
CALL 5633 ; open channel
LD DE,0 ; first address to dissassembly
LD BC,30 ; number of lines
CALL _disz80
... |
ORG $8000
dc.b $00,$00,$10,$02,$01,$43,$03,$01,$10,$13,$36,$56,$01,$00,$00,$33
dc.b $11,$15,$33,$33,$03,$31,$43,$43,$13,$51,$05,$05,$13,$02,$76,$00
dc.b $00,$00,$00,$50,$10,$01,$52,$01,$00,$10,$00,$30,$75,$57,$33,$03
dc.b $30,$00,$32,$33,$33,$00,$50,$54,$54,$33,$45,$03,$33,$43,$65,$33
dc.b $53,$67,$35,$03,$53,$03... |
// Test provided by Karu
// btr_2.asm
// Test symmetry case 1
slbi r1, 0x96 // 1001 0110
slbi r1, 0x69 // 0110 1001
btr r1, r1
halt
|
[bits 64]
get_thread equ 0x0100
get_priority equ 0x010C
set_priority equ 0x011C
exit_process equ 0x0210
section .text
mov eax,get_thread
syscall
mov ebx,eax
step:
mov edx,ebx
mov eax,get_priority
syscall
dec eax
js exit
mov edx,ebx
mov r8d,eax
mov eax,set_priority
syscall
test eax,eax
jz step
exit:
mov edx,eax
... |
song337restored_pri equ 100
song337restored_rev equ 0
song337restored_mvl equ 127
song337restored_key equ 0
song337restored_tbs equ 1
song337restored_exg equ 0
song337restored_cmp equ 1
.align 4
;**************** Track 1 (Midi-Chn.7) ****************;
@song337restored_1:
.byte KEYSH , song337restored_key+... |
// from BasicLoop.vm
// push 0 onto the stack
@0
D=A
@SP
A=M
M=D
@SP
M=M+1
// pop off the stack onto LCL[0]
@LCL
D=M
@0
D=D+A
@R13
M=D
@SP
AM=M-1
D=M
@R13
A=M
M=D
// label Sys.init$LOOP_START
(Sys.init$LOOP_START)
// push ARG[0] onto the stack
@ARG
D=M
@0
A=D+A
D=M
@SP
A=M
M=D
@SP
M=M+1
// push LCL[0] onto the stack
@L... |
;
; MSX specific routines
; by Stefano Bodrato, 29/11/2007
;
; int msx_vpeek(int address);
;
; Read the MSX video memory
;
; $Id: msx_vpeek.asm,v 1.2 2007/12/07 11:28:59 stefano Exp $
;
XLIB msx_vpeek
LIB msxbios
INCLUDE "#msxbios.def"
msx_vpeek:
; (FASTCALL) -> HL = address
ld ix,RDVR... |
;Example of file operation API calls using pread and pwrite. API calls found in this example program:
; open, close, pread, pwrite, write, exit
; High level description of what theis example program does:
; Creates a new file with open() call and a filename specified at 'newfile' buffer.
; Writes the contents in 'cont... |
; Ensures that we jump straight into the kernel's entry function
[bits 32] ; We're in protected mode by now, so use 32-bit instructions
[extern main] ; Declate that we will be referencing the external symbol 'main',
; so the linker can sbustitute the final address
call main ; invoke main(... |
GLOBAL(rmt_memcpy)
pushw %si
pushw %di
movw %ax, %di
movw %dx, %si
pushw %cx
shrw $2, %cx
rep; movsl
popw %cx
andw $3, %cx
rep; movsb
popw %di
popw %si
retl
ENDPROC(rmt_memcpy)
|
// add two integers together
// RAM[2] = RAM[0] + RAM[1]
@R0
D=M
@R1
D=M+D
@R2
M=D
(END)
@END
0;JEQ |
page ,132
title strspn - search for init substring of chars from control str
;***
;strspn.asm - find length of initial substring of chars from a control string
;
; Copyright (c) 1985-2001, Microsoft Corporation. All rights reserved.
;
;Purpose:
; defines strspn() - finds the length of the initial substring of... |
Music_LookLass:
musicheader 4, 1, Music_LookLass_Ch1
musicheader 1, 2, Music_LookLass_Ch2
musicheader 1, 3, Music_LookLass_Ch3
musicheader 1, 4, Music_LookLass_Ch4
Music_LookLass_Ch1:
tempo 132
volume $77
tone $0001
dutycycle $2
notetype $c, $c7
octave 3
note B_, 1
note __, 1
octave 4
note B_, 14
stereo... |
enum_start
enum_elem THREAD2_DISABLED
enum_elem THREAD2_LOADINGWALK
enum_elem THREAD2_LOADINGWALKUP
enum_elem THREAD2_LOADINGWALKDOWN
enum_elem THREAD2_LOADINGWALKLEFT
enum_elem THREAD2_LOADINGWALKRIGHT
enum_elem THREAD2_AFTERLOADINGWALKUP
enum_elem THREAD2_AFTERLOADINGWALKDOWN
enum_elem T... |
;
; Copyright (C) 2017-2017 Intel Corporation.
; SPDX-License-Identifier: MIT
;
PUBLIC iretTest
PUBLIC iret_func
.686
.XMM
.model flat,c
.code
iret_func PROC
mov eax,-1
iretd
iret_func ENDP
iretTest PROC
; We have to build the stack frame ourselves
sub esp,12
mov eax... |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) Geoworks 1994 -- All Rights Reserved
PROJECT: InkSample
MODULE:
FILE: inksample.asm
AUTHOR: Allen Yuen, Jan 25, 1994
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date De... |
;*!
;* \copy
;* Copyright (c) 2009-2013, Cisco Systems
;* 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 retain the abo... |
; ---------------------------------------------------------------------------
; Animation script - Crabmeat enemy
; ---------------------------------------------------------------------------
Ani_Crab: dc.w @stand-Ani_Crab, @standslope-Ani_Crab, @standsloperev-Ani_Crab
dc.w @walk-Ani_Crab, @walkslope-Ani_Crab, @walks... |
[00000] {:noop}
[00001] {:noop}
[00002] {:out, {:value, 'Welcome to the Synacor Challenge!'}}
[00068] {:out_newline, {:value, :newline}}
[00070] {:out, {:value, 'Please record your progress by putting codes like'}}
[00168] {:out_newline, {:value, :newline}}
[00170] {:out, {:value, 'this one into the challenge we... |
module SYSTEM
;------------------------------------
run:
ld sp,#8000
call SOUND_PLAYER.SET_SOUND.mute
xor a
ld hl,varsStart
ld de,varsStart + 1
ld bc,tablesEnd - varsStart - 1
ld (hl),a
ldir
; inc a ; remove later
out (254),a
; The main loop of the program.
; The main loop calls the required system by ide... |
; Z88DK Small C+ Graphics Functions
; Fills a screen area
;
; Generic and simple version, slower and wasting a bit of memory
;
; $Id: w_fill.asm $
;
INCLUDE "graphics/grafix.inc"
IF !__CPU_INTEL__
SECTION code_graphics
PUBLIC fill
PUBLIC _fill
EXTERN l_graphics_cmp
... |
;/*
; * Microsoft Confidential
; * Copyright (C) Microsoft Corporation 1991
; * All Rights Reserved.
; */
PAGE ,132
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; FILENAME: CPS Device Driver -- Font Parser
;; MODULE N... |
MENU_SUPPORT_SCREEN_BANK_NUMBER = CURRENT_BANK_NUMBER
#include "game/data/menu_support/nametable_bg.asm"
.(
Q0 = 144
Q1 = Q0+1
Q2 = Q0+2
Q3 = Q0+3
Q4 = Q0+4
Q5 = Q0+5
Q6 = Q0+6
Q7 = Q0+7
Q8 = Q0+8
Q9 = Q0+9
QA = Q0+10
QB = Q0+11
QC = Q0+12
QD = Q0+13
QE = Q0+14
QF = Q0+15
&palette_support:
; Background
; 0-sky/bo... |
; Tiny test to try rgbds. Break scroll and see...
INCLUDE "header.asm"
FRAMES EQU $20
SECTION "default", ROM0
main:
LD B, FRAMES ; Number of frames between changes
; Initialize SCY to high position
LD A, $32
LD [$FF00+$42], A
; Enable VBlank interrupt
LD A, $01
LD [$FF00+$FF], A
EI
endless:
JR endless
;... |
NOP
CONST_Z R0 true
CONST_B R1 -0x10
CONST_BU R2 0xF0
CONST_S R3 -0xF0F
CONST_SU R4 0xF00F
CONST_I R5 -0x100FF00F
CONST_IU R6 0xF00FF00F
CONST_L R7 -0x100FF00FF00FF00F
CONST_LU R8 0xF00FF00FF00FF00F
CONST_F R9 3.141592
CONST_D R10 3.141592
HALT
|
IDEAL
CR EQU 0DH
SEGMENT SEG1
ASSUME CS: SEG1
start:
int 20h
DD 1,2,3
val DD CR, -1, '*'
DD 12345678H
ENDS SEG1
GROUP GROUP1 SEG1
END start
|
; size_t ftoa(float x, char *buf, uint16_t prec, uint16_t flag)
SECTION code_clib
SECTION code_stdlib
PUBLIC ftoa_callee
EXTERN dtoa_callee
defc ftoa_callee = dtoa_callee
|
# load/store
mov r0, [m2]
mov [m1], r0
mov r0, 2
mov [m2], r0
halt
.data
m1:
data 1
m2:
data 99
|
;
; Font extracted from 64-4.tap
;
; Tap file downloaded from: http://mdfs.net/Software/Spectrum/Coding/Printout/
SECTION rodata_font
SECTION rodata_font_4x8
PUBLIC _font_4x8_64_omni2
PUBLIC _font_4x8_64_omni2_end
_font_4x8_64_omni2:
BINARY "font_4x8_64_omni2.bin"
_font_4x8_64_omni2_end:
|
SECTION code_clib
SECTION code_arch
PUBLIC asm_cpm_bdos_alt
asm_cpm_bdos_alt:
; bdos call but most alt z80 registers saved
;
; enter : c = bdos function
; de = argument
;
; exit : registers set by cpm
;
; saves : bc', de', hl', ix, iy
exx
push bc
push de
push hl... |
.fun x64_syscall_write SIGNATURE [S32] = [S32 A64 U64]
.fun x64_syscall_exit SIGNATURE [] = [S32]
.mem msg 4 RO
.data 1 "hello world\n"
.fun _start NORMAL [] = []
.bbl start
lea m:A64 = msg
pusharg 12:U64
pusharg m
pusharg 1:S32
syscall x64_syscall_write 1:U8
poparg dummy:S32
pusharg 0... |
; Strings
; Various string utility functions
;
; 2017 Scott Lawrence
;
; This code is free for any use. MIT License, etc.
.module Strings
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; U_Streq - string equality compare
; compares the string in hl with the string in de
; if equal returns 0
; destructi... |
page 49,132
TITLE exstmisc.asm - misc. statement executors
;***
;exstmisc.asm - statement executors for QBI
;
; Copyright <C> 1986, Microsoft Corporation
;
;Purpose:
;
;
;****************************************************************************
.xlist
include version.inc
EXSTMISC_ASM = ON
IncludeOnce architec
... |
EXTERN _text_x
EXTERN _text_y
EXTERN asm_zx_cxy2saddr
PUBLIC _text_ui_write
PUBLIC _text_pagein
PUBLIC text_decompress
include "../include/spectranet.inc"
include "memory.inc"
defc _text_ui_write = 0x1000
_text_pagein:
ld a, (PAGE_FONT_RENDER)
call SETPAGEA
ret
compressed_pagea:
binary "../build/fon... |
INCLUDE "src/memory/MemCopy.asm"
INCLUDE "src/memory/MemSet.asm"
INCLUDE "src/memory/MemSetSmall.asm"
|
db "FLOWER@" ; species name
dw 311, 410 ; height, weight
db "By shaking its big"
next "petals, it scat-"
next "ters toxic pollen"
page "into the air,"
next "turning the air"
next "yellow.@"
|
.thumb
.macro blh to, reg=r3
ldr \reg, =\to
mov lr, \reg
.short 0xf800
.endm
.equ GetUnitEquippedWeaponSlot, 0x08016B58
.equ GetBallistaItemAt, 0x0803798C
.equ pDefenderBattleStruct, 0x0203a56c
Start:
mov r5, r0
mov r3, r1
mov r0, #0x1
neg r0, r0
cmp r3, r0
bne EnemyExists
mov r0, r5
blh GetUnitEquippedWeaponS... |
Ani_31BF6: dc.w byte_31BFC-Ani_31BF6
dc.w byte_31BFF-Ani_31BF6
dc.w byte_31C04-Ani_31BF6
byte_31BFC: dc.b $7F, 0, $FF
byte_31BFF: dc.b 7, 1, 2, $FE, 1
byte_31C04: dc.b 3, 2, 1, 0, $FE, 1
|
// ---------------------------------------------------------------------------
// Indirect JMP "unrolled" sequence example
.false
{
Inline:
// "InlineA" Timing: 25.00 = 5+3.66+3.66+5.33+4+3.33
sta $_IO_Temp
php
rep #0x20
lda $0x00
and #0xe0ff
xba
// "InlineB" Timing: 18.33 = 6+5.33+7
sta $_JMPiU_A... |
PrintCardKeyText:
ld hl, SilphCoMapList
ld a, [wCurMap]
ld b, a
.silphCoMapListLoop
ld a, [hli]
cp $ff
ret z
cp b
jr nz, .silphCoMapListLoop
predef GetTileAndCoordsInFrontOfPlayer
ld a, [wTileInFrontOfPlayer]
cp $18
jr z, .cardKeyDoorInFrontOfPlayer
cp $24
jr z, .cardKeyDoorInFrontOfPlayer
ld b, a
ld a,... |
#include P18F8722.inc
;*********************************************************************
;** PIC18Cxx MPASM Initialized Data Startup File, Version 0.01 **
;** (c) Copyright 1997 Microchip Technology **
;** (c) Copyright 2007 S'L ava **
;************************... |
;
; Page the graphics bank in/out - used by all gfx functions
; Doesn't really page on the MSX.
;
;
; $Id: swapgfxbk.asm,v 1.5 2015/01/19 01:32:49 pauloscustodio Exp $
;
PUBLIC swapgfxbk
EXTERN pixeladdress
PUBLIC swapgfxbk1
.swapgfxbk
di
ret
.swapgfxbk1
ei
r... |
#walkthrough/9.jpg
#SIGNAL AMPLIFIER
#READ A VALUE FROM IN.A
#DOUBLE THE VALUE
#WRITE THE VALUE TO OUT.A
MOV UP, ACC
ADD ACC
MOV ACC, DOWN
MOV UP, DOWN
MOV UP, RIGHT
MOV LEFT, DOWN
|
;***** Imprime uma string armazenada em RAM (STR) na SCREEN IV ***************
; POSY e passada via BASIC representa a linha da impressao
; POSX tambem passada via BASIC representa a coluna
; WIDT e calculada em outras rotinas que usam NPRIN e tem o tamanho da string
PTSTR:
call CALCXY ;Posicio... |
; ----- int point_callee(int x, int y)
;Result is true/false
IF !__CPU_INTEL__ && !__CPU_GBZ80__
SECTION code_graphics
PUBLIC point_callee
PUBLIC _point_callee
PUBLIC asm_point
EXTERN swapgfxbk
EXTERN swapgfxbk1
EXTERN w_pointxy
INCLUDE "graphics/grafix.inc"
.point_... |
; void mymemset(void* dest, UBYTE value, UWORD count) {
_mymemset::
; copy dest to de
ldhl sp,#2
ld e, (hl)
inc hl
ld d, (hl)
inc hl
; copy value to a
ld a, (hl+)
; copy count to bc
ld c, (hl)
inc hl
ld b, (hl)
; copy de to hl
ld h, d
ld l, e
;ld hl, de
... |
MtMoonB1F_Object:
db $3 ; border block
db 8 ; warps
warp 5, 5, 2, MT_MOON_1F
warp 17, 11, 0, MT_MOON_B2F
warp 25, 9, 3, MT_MOON_1F
warp 25, 15, 4, MT_MOON_1F
warp 21, 17, 1, MT_MOON_B2F
warp 13, 27, 2, MT_MOON_B2F
warp 23, 3, 3, MT_MOON_B2F
warp 27, 3, 2, -1
db 0 ; signs
db 0 ; objects
; warp-to
warp_... |
;
; Generic pseudo graphics routines for text-only platforms
; Version for the 2x3 graphics symbols using generic console
;
INCLUDE "graphics/grafix.inc"
EXTERN textpixl
EXTERN div3
EXTERN generic_console_printc
EXTERN generic_console_vpeek
EXTERN generic_console_plotc
EXTERN generic_console_pointxy
... |
; code_driver to ensure we don't page ourselves out
SECTION code_driver
PUBLIC generic_console_vpeek
EXTERN __spc1000_mode
EXTERN vpeek_MODE1
EXTERN vpeek_MODE2
EXTERN generic_console_calc_xypos
EXTERN __tms9918_console_vpeek
;Entry: c = x,
; b = y
; e = rawmode
;Exit: nc = suc... |
;
; Camputers Lynx C Library
;
; Print character to the screen
;
; Stefano Bodrato - 2014
;
;
; $Id: fputc_cons.asm,v 1.3 2015/01/21 08:09:27 stefano Exp $
;
PUBLIC fputc_cons
.fputc_cons
ld hl,2
add hl,sp
ld a,(hl)
cp 12
jr nz,nocls
ld hl,$6255
ld a,5 ; reset vert. cursor positi... |
SECTION code_fp_math32
PUBLIC cm32_sdcc___slong2fs
EXTERN m32_float32
cm32_sdcc___slong2fs:
pop bc ;return
pop hl ;value
pop de
push de
push hl
push bc
jp m32_float32
|
.loadtable "m12-give-strings/m12-give-table.tbl"
.str "@\csender rearrenged \csenderpossessive own\n items and the\n \citem moved."
|
; Copyright 2001, 2002 Free Software Foundation, Inc.
;
; This file is part of the GNU MP Library.
;
; The GNU MP Library is free software; you can redistribute it and/or
; modify it under the terms of the GNU Lesser General Public License as
; published by the Free Software Foundation; either version 2.1 of th... |
; See:
; kernel/include/gramado/
%include "gramado/head.inc"
; segment .head_x86_64
__HEAD
[bits 64]
extern _magic
extern _kernel_main
; See:
; kernel.h
__SYSTEM_BOOTING EQU 1
extern _system_state
;========================================================
; _kernel_begin:
;
; Entry point.
; This is t... |
#include "OS/OS.inc"
#bank program
Title: str("Fibonacci sequence:\n")
#align 32
MAIN_PROGRAM:
; Print title in cyan
mov a0, COLOR.CYAN
syscall OUTPUT.SetColor
mov a0, Title
syscall PRINT.string
; Print rest of lines in white
mov a0, COLOR.WHITE
syscall OUTPUT.SetColor
; ... |
;
; Fast background restore
;
; VZ200/300 version
;
;
; $Id: bkrestore.asm,v 1.7 2016-06-20 21:47:41 dom Exp $
;
SECTION code_clib
PUBLIC bkrestore
PUBLIC _bkrestore
EXTERN pixeladdress
.bkrestore
._bkrestore
; __FASTCALL__ : sprite ptr in HL
push ix ;save callers
push hl
pop ix
ld h,(ix+2) ; restore... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.