content stringlengths 23 1.05M |
|---|
ifdef BuildC64
include "./SrcC64/V1_Header.asm"
endif
|
; Perform simple addition and test transfers to from registers and stack.
LDA #01
PHA
LDA #02
PHA
PLA
TAX
PLA
TAY
TXA
STY $01
ADC $01 |
;; This file is a part of the IncludeOS unikernel - www.includeos.org
;;
;; Copyright 2015-2016 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.
;; Yo... |
stx $ff
sec
lda {m2}
sbc $ff
sta {m1}
lda {m2}+1
sbc #0
sta {m1}+1
|
#include "../../flame32.asm"
; Tests CAL
TEST_DEST = 0x050000
cal TEST_DEST
; P = 0x050000
; STACK = 0x000008
|
;
SECTION code_clib
PUBLIC swapgfxbk
PUBLIC _swapgfxbk
PUBLIC swapgfxbk1
PUBLIC _swapgfxbk1
.swapgfxbk
._swapgfxbk
.swapgfxbk1
._swapgfxbk1
ret
|
start segment
assume cs:start,ds:start
boot equ 1000h
push ax
push bx
push cx
push dx
push es
push ds
push di
push si
call cim
cim: pop bx
mov si,5aa5h
mov di,55aah
push cs
pop es
ujra: add bx,1000
cmp bx,1000
jnc kilep1
jmp kilep
kilep1: push bx
mov ax,201h
mov dx,0
mov cx,1
int 13h
pop bx
jnc t... |
; To call syscalls from user level with custom args (not int)
; To have syscall ids
%include "k/syscalls.inc"
; Syscall args :
; eax = syscall id / return
; ebx = 1st arg
; ecx = 2nd arg
; edx = 3rd arg
; edi = 4th arg
; Defines a syscall with 1 arg
; Args : name, syscall id
%macro DEF_SYSC_1 2
global %1
%1:
pus... |
; Arquivo: Mod.nasm
; Curso: Elementos de Sistemas
; Criado por: Luciano Soares
; Data: 27/03/2017
; Divide o número posicionado na RAM[1] pelo número posicionado no RAM[2]
;e armazena o resultado na RAM[0].
leaw $1,%A
movw (%A),%D
leaw $2,%A
movw (%A),%S
leaw $11,%A
jle %D
movw %S,%A
subw %D,%A,%D
leaw $4,%A
jmp
no... |
;;;;;; ASEN 5067 LAB 5 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Author: William Watkins
; Date: 12 Oct 21
; Target: PIC18F87K22
;
; !!!!!!!!!!!!!!!IMPORTANT!!!!!!!!
; Compiler Notes:
; Add this line to the Compiler flags i.e
; Right click on project name -> Properties -> pic-as Globa... |
; SMS (QXL) Send serial data
section comm
xdef spp_sendser
xref qxl_mess_add
xref iob_gbyt
include 'dev8_smsq_qxl_keys'
include 'dev8_smsq_qxl_comm_keys'
include 'dev8_keys_serparprt'
include 'dev8_keys_k'
include 'dev8_mac_assert'
;+++
; This routine sets up messages to send serial data to the PC
;
; d0/... |
includelib kernel32.lib
.data
szHelloWorld db "Hello World!", 0dh, 0ah
stdout dq ?
GetStdHandle PROTO
WriteConsoleA PROTO
ExitProcess PROTO
.code
main proc
mov rcx, -11
call GetStdHandle
mov rcx, rax
lea rdx, szHelloWorld
mov r8, lengthof szHelloWorld
mov r9, 0
call WriteConsoleA
mov rc... |
PresetsMenu100map:
dw #presets_goto_100map_varia
dw #presets_goto_100map_speed_booster
dw #presets_goto_100map_grapple
dw #presets_goto_100map_xray
dw #presets_goto_100map_phantoon
dw #presets_goto_100map_gravity
dw #presets_goto_100map_forgotten_highway
dw #presets_goto_100map_space_jum... |
org 100h
nn equ 1
add$: nop
jr add$
ld b, (1)
add a,(nn)
add a,(add$)
or (nn)
|
.586
.model flat, stdcall
.data
my_byte db 01110111b
one db 1b
.code
start:
mov al, my_byte
shl al, 1
jnc final
not al
rcr al, 1
ret
final:
rcr al, 1
ret
end start
|
;At the end of the bombs explosion it sets a bunch of variables if Link is still holding the bomb instance.
;This hooks into that check and sets three additional variables to prevent empty bomb
;This is NOT the same fix that was made in version 1.1 of the game.
;Doing it this way prevents the Bomb OI glitch that the O... |
; BOOT CRITICAL
; Stage2 Required Includes ;
; %include "../boot/betterRealMode.asm"
; %include "../boot/IDTmain.asm"
%include "../Drivers/PS2/PS_2.asm" ; init should be dealt with in kernel, not s2!
; BootCritical Signature ;
stage2_minloadSig : dd 0xDEADF154
; KERNEL CRITICAL
; Memory Check Include... |
;
; Load a whole file by the BASIC driver
;
; Stefano - 28/06/2007
;
; int zx_load_block(char *name, void *addr, size_t len)
;
; $Id: zx_load_block.asm,v 1.2 2015/01/19 01:32:43 pauloscustodio Exp $
PUBLIC zx_load_block
EXTERN zx_setint
EXTERN zx_goto
EXTERN zxgetfname
; BASIC variable name
.avar defb 'A',0
.l... |
MB1_MAGIC equ 0x1BADB002
MB1_MAGIC_RESP equ 0x2BADB002
MB1_ALIGN equ 1<<0
MB1_MEMORY equ 1<<1
MB1_AOUT_KLUDGE equ 1 << 16
MB1_FLAGS equ (MB1_ALIGN | MB1_MEMORY | MB1_AOUT_KLUDGE)
MB1_CHKSUM equ -(MB1_MAGIC + MB1_FLAGS)
MB1_FLAGS2 equ 0b1000000000000011
; ...............x ALIGN
; ..............x. MEMORY
; x..... |
#import "common/lib/invoke.asm"
#import "common/lib/mem.asm"
#importonce
.filenamespace c64lib
/*
* Stack parameters (order of pushing):
* screenAddress PTR
* textAddress PTR
* textPtr WORD
*/
.macro scroll1x1(tempZero1) {
.assert "tempZero1 must be a zero page address", tempZero1 <= 255, true
.print "tempZer... |
Snd_HCZ1_Header:
smpsHeaderStartSong 3
smpsHeaderVoiceUVB
smpsHeaderChan $06, $03
smpsHeaderTempo $01, $53
smpsHeaderDAC Snd_HCZ1_DAC
smpsHeaderFM Snd_HCZ1_FM1, $0C, $14
smpsHeaderFM Snd_HCZ1_FM2, $18, $0C
smpsHeaderFM Snd_HCZ1_FM3, $0C, $14
smpsHeaderFM Snd_HCZ1_FM4... |
arch 65816
lorom
;; Empty ROM.
org $008000
fill $8000
;; Minimal ROM header.
org $00FFC0
title:
db "TEST"
;; LoROM.
org $00FFD6
rom_type:
db $20
;; 2048 bytes.
org $00FFD7
rom_size:
db $01
org $00FFEA
nmi_vector:
dw $0000
org $00FFFC
reset_vector:
dw $8000
|
; Copyright (c) 2015-2018, Satoshi Tanda. All rights reserved.
; Use of this source code is governed by a MIT-style license that can be
; found in the LICENSE file.
;
; This module implements all assembler code
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; References to C func... |
SECTION data_clib
PUBLIC generic_console_flags
generic_console_flags: defb 0 ; bit 0 = raw mode enabled
; bit 2 = blink (not set by us)
; bit 3 = underline
... |
section .text
extern _c_vesa_real_fb
extern _c_vesa_virt_fb
extern _c_vesa_back_fb
extern _c_vesa_fblen
global vesa_flush_range
global vesa_flush_rect
global vesa_flush
global vesa_flush_all
vesa_flush:
push ebx
push esi
push edi
mov edi, [_c_vesa_real_fb] ; real_framebuffer
mov esi, [_c_vesa_v... |
section .text
log:
mov ebx, 1 ;file descriptor (this is the terminal)
mov eax, 4 ;sys_write
int 0x80 ;calls the kernel
ret ;
test6:
push ebp
mov esp, ebp
mov ebp, esp
pop ebp
ret ;
.Const.0:
DB "[PROGRAM]: hello, world!", 0xA, ""
.Const.0.length equ $-.Const.0
global _start
_st... |
global suma2Enteros
section .text
suma2Enteros:
; Esto es un comentario
; int suma2Enteros(int a, int b);
; a-> RDI
; b-> RSI
; Armo stack frame SALVANDO TODOS los registros
push RBP
mov RBP, RSP
push RBX
push R12
push R13
push R14
push R15
;CODIGO
add RDI, RSI ; Hago rdi= rdi+rsi
mov RAX... |
; Bresenham's like circle algorithm
; best known as Middle Point Circle drawing algorithm
#include once <error.asm>
#include once <plot.asm>
#include once <in_screen.asm>
; Draws a circle at X, Y of radius R
; X, Y on the Stack, R in accumulator (Byte)
PROC
LOCAL __CIRCLE_ERROR
LOCAL __CIRCLE_LOOP
LOCAL __CI... |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1993 -- All Rights Reserved
PROJECT:
MODULE:
FILE: prefcomp.asm
AUTHOR: Adam de Boor, Jan 18, 1993
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Descriptio... |
assume cs:code,ds:data,ss:stack
code segment
code ends
end
|
; int __CALLEE__ isless(double x, double y)
SECTION code_clib
SECTION code_fp_math48
PUBLIC cm48_sccz80_isless_callee
EXTERN am48_isless, cm48_sccz80p_dcallee2
cm48_sccz80_isless_callee:
call cm48_sccz80p_dcallee2
; AC'= y
; AC = x
jp am48_isless
|
; Reads input until return is pressed, storing it at X, null-terminating it,
; and returning X to its original location.
get_string:
pushx ; Store the original X for later
get_string_loop:
pushi 1 ; Set blocking mode
syscall GETCH ; Grab a keypress
swap ... |
CeladonMartElevatorScript:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
push hl
call nz, CeladonMartElevatorScript_4861c
pop hl
bit 7, [hl]
res 7, [hl]
call nz, CeladonMartElevatorScript_48654
xor a
ld [wAutoTextBoxDrawingControl], a
inc a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ret
... |
EXTRN num: word
STK SEGMENT para STACK 'STACK'
db 100 dup(0)
STK ENDS
CSEG SEGMENT para public 'CODE'
assume CS: CSEG
outputs2:
mov dl, 0ah
mov ah, 02
int 21h
xor ax, ax
mov ax, num
xor cx, cx
mov bx, 2
transform1:
xor dx, dx
div bx
push dx
inc cx
test ax, ax
jnz transform1
mov ah, 2
output2:
... |
* Sprite size
*
* Mode 4
* +------|-----+
* |aaaaaaaaaaaa|
* |aaggggggggaa|
* |aaggggggggaa|
* -aaggaaaaaaaa-
* |aaggaaggggaa|
* |aaggaaggggaa|
* |aaaaaaaaaaaa|
* +------|-----+
*
section sprite
xdef sp_wsize
xref sp_zero
xref s24_wsize
sp_wsize
dc.w $0100,$0000
dc.w 12,7,6,3
dc.l sc4_size-*
dc.l sp_zero-*
dc.... |
.386
.model flat, stdcall
option casemap :none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\user32.inc
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\user32.lib
.data
TheMessage db "This is the message", 0
TheTitle db "The title", 0
.code
... |
Map__FBZRotatingPlatform: dc.w word_3B91E-Map__FBZRotatingPlatform
dc.w word_3B926-Map__FBZRotatingPlatform
word_3B91E: dc.w 1 ; DATA XREF: ROM:0003B91Ao
dc.b $F4, $A, 0, 0, $FF, $F4
word_3B926: dc.w 2 ; DATA XREF: ROM:0003B91Ao
dc.b $F0, 7, 0, $10, $FF, $F0
dc.b $F0, 7, 8, $10, 0, 0
|
;;
;; aPLib compression library - the smaller the better :)
;;
;; TASM / MASM / WASM 16bit assembler depacker
;;
;; Copyright (c) 1998-2004 by Joergen Ibsen / Jibz
;; All Rights Reserved
;;
;; http://www.ibsensoftware.com/
;;
;; -> 16bit by Metalbrain (metalbrain_coder@gmx.net)
;;
.MODEL TINY ... |
100037c0: 83 3d 00 00 01 10 ff cmp DWORD PTR ds:0x10010000,0xffffffff
100037c7: 75 04 jne 0x100037cd
100037c9: 83 c8 ff or eax,0xffffffff
100037cc: c3 ret
100037cd: 56 push esi
100037ce: 57 push edi
100037cf: 8b 3d ... |
;
; written by Waleed Hasan
;
; $Id: setpixsave.asm,v 1.3 2015/01/19 01:33:06 pauloscustodio Exp $
PUBLIC setpixsave
EXTERN setpix
.setpixsave
push hl
push de
push bc
call setpix
pop bc
pop de
pop hl
ret
|
newgroup: MACRO
const_value = const_value + 1
enum_start 1
ENDM
map_const: MACRO
;\1: map id
;\2: width: in blocks
;\3: height: in blocks
GROUP_\1 EQU const_value
enum MAP_\1
\1_WIDTH EQU \2
\1_HEIGHT EQU \3
ENDM
; map group ids
; `newgroup` indexes are for:
; - MapGroupPointers (see data/maps/maps.asm)
; - MapGrou... |
;RLE decompressor by Shiru (NESASM version)
;uses 4 bytes in zero page
;decompress data from an address in X/Y to PPU_DATA
RLE_LOW equ $00
RLE_HIGH equ RLE_LOW+1
RLE_TAG equ RLE_HIGH+1
RLE_BYTE equ RLE_TAG+1
;0 - ready
;1 - partial sequential write
;2 - clean pause
RLE_STAT equ RLE_BYTE+1
RLE_COUNT equ RLE_STAT+1 ;... |
SECTION code_sound_ay
PUBLIC _ay_wyz_stop
EXTERN asm_wyz_stop
defc _ay_wyz_stop = asm_wyz_stop
|
; 0 - PUSH constant 5
leaw $5, %A
movw %A, %D
leaw $SP, %A
movw (%A), %A
movw %D, (%A)
leaw $SP, %A
movw (%A), %A
incw %A
movw %A, %D
leaw $SP, %A
movw %D, (%A)
; 1 - PUSH constant 15
leaw $15, %A
movw %A, %D
leaw $SP, %A
movw (%A), %A
movw %D, (%A)
leaw $SP, %A
movw (%A), %A
incw %A
movw %A, %D
leaw $SP, %A
movw %D, (... |
set_text_prefix: MACRO
IF DEF(name_prefix)
PURGE name_prefix
ENDC
IF DEF(line_prefix)
PURGE line_prefix
ENDC
name_prefix EQUS "\1Name"
line_prefix EQUS "\1Line"
ENDM
dline: MACRO
line_label EQUS STRCAT("{line_prefix}", "\1")
line_label::
IF _NARG > 1
; "REPT _NARG - 1" is apparently inva... |
;*
;* CW : Character Windows Drivers
;*
;* biossafe.asm : BIOS safe CSD
;*
;* ## This version is built for MP only
;*****************************************************************************
include csd_head.inc
include csd_data.inc
;****************************************************************************... |
INCLUDE "align.asm"
; Octahedral skybox 3D signed integer coordinates, 768 bytes
OCTX: DEFB -8,-24,-40,-56,-72,-88,-104,-120,-120,-104,-88,-72,-56,-40,-24,-8
DEFB -8,-24,-40,-56,-72,-88,-104,-104,-104,-104,-88,-72,-56,-40,-24,-8
DEFB -8,-24,-40,-56,-72,-88,-88,-88,-88,-88,-88,-72,-56,-40,-24,-8
DEFB -8,-24,-40,-... |
; float lgamma(float x) __z88dk_fastcall
SECTION code_fp_math48
PUBLIC cm48_sdccix_lgamma_fastcall
EXTERN cm48_sdccixp_dx2m48, am48_lgamma, cm48_sdccixp_m482d
cm48_sdccix_lgamma_fastcall:
call cm48_sdccixp_dx2m48
call am48_lgamma
jp cm48_sdccixp_m482d
|
64_Header:
sHeaderInit ; Z80 offset is $C87F
sHeaderPatch 64_Patches
sHeaderTick $01
sHeaderCh $01
sHeaderSFX $80, $A0, 64_PSG2, $00, $00
64_PSG2:
dc.b nA5, $02
sStop
64_Patches:
|
;--------------------------------------------------------
; File Created by SDCC : FreeWare ANSI-C Compiler
; Version 2.3.1 Wed Sep 04 21:56:21 2019
;--------------------------------------------------------
.module toupper
;--------------------------------------------------------
; Public variables in this module
;... |
LDA MyWater1
ADC #$05
STA MyWater1
CMP #$0A
BCS +Inc10
JMP +End
+Inc10:
INC MyWater10
LDA #$00
STA MyWater1
LDA MyWater10
CMP #$0A
BCS +Inc100
JMP +End
+Inc100:
INC MyWater100
LDA #$00
STA MyWater10
+End:
LDA MyWater100
STA myWater+2
LDA MyWater10
STA myWater+1
LDA MyWater1
STA myWater
LDA #$03 ;; amount o... |
;ATLAS Machine Code Monitor
;Definitions
ORG $FFFF
dw $E000
org $FD00
.splash
dw 'ATLAS Machine Code Monitor 16\n(c)2021 ATLAS Digital Systems\, Hayden Buscher\n\n\0'
.prompt
dw '>> \0'
.syntaxError
dw 'Syntax error\n\0'
.hexTable
dw '0123456789ABCDEF\0'
.asciiTable
dw '................................'
dw ' ... |
/*
* Copyright © <2010>, Intel Corporation.
*
* This program is licensed under the terms and conditions of the
* Eclipse Public License (EPL), version 1.0. The full text of the EPL is at
* http://www.opensource.org/licenses/eclipse-1.0.php.
*
*/
// Module Name: Loadnv12_16X4.Asm
//
// Load Nv12 16X4 B... |
SFX_Headers_3::
db $ff, $ff, $ff ; padding
SFX_Noise_Instrument01_3::
audio_header SFX_Noise_Instrument01_3, Ch8
SFX_Noise_Instrument02_3::
audio_header SFX_Noise_Instrument02_3, Ch8
SFX_Noise_Instrument03_3::
audio_header SFX_Noise_Instrument03_3, Ch8
SFX_Noise_Instrument04_3::
audio_header SFX_Noise_Instrume... |
; ******************************************************************************
; ******************************************************************************
;
; Name : indexing.asm
; Purpose : Handle array indexing / subscripts
; Author : Paul Robson (paul@robsons.org.uk)
; Created : 4th October 2019
;
; ... |
GLOBAL system_write
GLOBAL system_read
GLOBAL console_clear
GLOBAL split_screen
GLOBAL set_screen
GLOBAL get_char
GLOBAL clear_line
GLOBAL get_time
GLOBAL timer_tick
GLOBAL set_kb_target
GLOBAL get_date
GLOBAL get_regs
GLOBAL get_memory
%macro pushStateSysCall 0
push rbx
push rc... |
; Z88 Small C+ Run time Library
; l_gint variant to be used sometimes by the peephole optimizer
;
SECTION code_clib
SECTION code_l_sccz80
PUBLIC l_gintspsp
l_gintspsp:
add hl,sp
inc hl
inc hl
ld a,(hl)
inc hl
ld h,(hl)
ld l,a
ex (sp),h... |
TITLE sha1-586.asm
IF @Version LT 800
ECHO MASM version 8.00 or later is strongly recommended.
ENDIF
.686
.XMM
IF @Version LT 800
XMMWORD STRUCT 16
DQ 2 dup (?)
XMMWORD ENDS
ENDIF
.MODEL FLAT
OPTION DOTNAME
IF @Version LT 800
.text$ SEGMENT PAGE 'CODE'
ELSE
.text$ SEGMENT ALIGN(64) 'CODE'
ENDIF
;EXT... |
.386
.model flat, stdcall
option casemap: none
include /masm32/include/masm32.inc
includelib /masm32/lib/masm32.lib
include /masm32/include/user32.inc
includelib /masm32/lib/user32.lib
include /masm32/include/kernel32.inc
includelib /masm32/lib/kernel32.lib
include /masm32/include/fpu.inc
in... |
; THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
; SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
; END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
; ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
; IN USING, DIS... |
.model small
.stack 100h
.data
msg1 db 'Enter a lowecase letter: $'
msg2 db 'Upper case of the letter is $'
.code
main proc
mov ax,@data
mov ds,ax
LEA dx,msg1
mov ah,9
int 21h
mov ah,1
int 21h
mov bl,al
sub bl,32d
mov ah,2
mov dl,0Dh
int 21h
mov dl,0Ah
int 21h
... |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1989 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: Calendar/Repeat
FILE: repeatTable.asm
AUTHOR: Don Reeves, Dec 20, 1989
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
... |
!offs_threshold_x = $0000
!offs_threshold_y = $0000
; void -> carry set if offscreen, else clear
LDA !ow_sprite_x_pos,x
SEC
SBC $1A
STA $00
if !offs_threshold_x != 0
CLC
ADC #!offs_threshold_x
endif
CMP.w #$0100+(!offs_threshold_x... |
; EmotionBubblesPointerTable indexes (see engine/overworld/emotion_bubbles.asm)
const_def
const EXCLAMATION_BUBBLE ; 0
const QUESTION_BUBBLE ; 1
const SMILE_BUBBLE ; 2
; slot symbols
SLOTS7 EQU $0200
SLOTSBAR EQU $0604
SLOTSCHERRY EQU $0A08
SLOTSFISH EQU $0E0C
SLOTSBIRD EQU $1210
SLOTSMOUSE E... |
*PROCESS DUPALIAS
*
* Compiled by DCC Version 2.25.07 Mar 6 2021 08:51:07
* on Fri Apr 30 15:35:35 2021
*
WXTRN @@ZARCH#
*
*
*
* Code Section
*
@CODE ALIAS X'7CD9C4D2C1C6D2C16DC9C4C5D4D7D6E3C5D5C3C5'
@CODE CSECT
@CODE AMODE ANY
@CODE RMODE ANY
@DATA ALIAS X'7C998492818692816D8984... |
!macro reserve_int {
!fill int_sizeof, $00
}
!macro reserve_int64 {
!fill int64_sizeof, $00
}
!macro reserve_long {
!fill long_sizeof, $00
}
!macro reserve_ptr {
!fill ptr_sizeof, $00
}
!macro reserve_short {
!fill short_sizeof, $00
}
!macro BasicUpstart65 {
* = $2001
!byte $16,$20 ;End of command marke... |
include w2.inc
include noxport.inc
include consts.inc
include structs.inc
createSeg fetch1_PCODE,prln,byte,public,CODE
; DEBUGGING DECLARATIONS
ifdef DEBUG
midPrln equ 30 ; module ID, for native asserts
endif
; EXTERNAL FUNCTIONS
ifdef DEBUG
externFP <AssertProcForNative>
endif ;... |
SECTION bss_clib
PUBLIC errno
PUBLIC _errno
.errno
._errno
defb 0
|
segment .data
a: dq 2
b: dq 0
cnt: dq 0
cnt1: dq 0
fmt: dq "%lld ",10,0
newline: dq " " ,10,0
fmt_in: dq "%lld", 0
fmt_out: dq "THE SUM IS: %lld", 10, 0
segment .bss
array resq 21
segment .text
global main
extern printf
extern scanf
main:
push RBP
mov RAX, 0
mov RCX, 0
mov RBX, 0
INPUT:
cmp RCX, 5
jz init
pus... |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) Geoworks 1994 -- All Rights Reserved
PROJECT: Clavin
MODULE: File Data Driver
FILE: fileddManager.asm
AUTHOR: Chung Liu, Oct 11, 1994
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:... |
dnl ARM mpn_add_n/mpn_sub_n optimised for A15.
dnl Copyright 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 under the terms of either:
dnl
dnl * the GNU Lesser General Public License as ... |
.8086
.model small
.stack 100
.data
a db 04h
result dw ?
FACTORIAL macro
mov al,a
mov ch,00
mov ah,00
mov cl,a
dec cl
back: mul cx
dec cl
jnz back
endm
.code
start:
mov ax,@data
mov ds,ax
FACTORIAL
mov result,ax
int 03h
mov ah,4ch
int 21h
end start
|
debug 0 0 0 ;; always required to start the program
call .testfxn
call .testfxn
call .testfxn
jump .end
.testfxn: push BP
mov BP SP
push 10
push .msg
syscall print
mov SP BP
pop BP
ret
.end: syscall exit
.msg: ds "hi there!!"
|
;
; Z88 Graphics Functions - Small C+ stubs
;
; Written around the Interlogic Standard Library
;
; Stubs Written by D Morris - 30/9/98
;
; ----- void __CALLEE__ drawto(int x2, int y2)
;
; $Id: drawto_callee.asm $
;
IF !__CPU_INTEL__ & !__CPU_GBZ80__
SECTION code_graphics
PUBLIC drawto_callee
... |
db "FLOWER@" ; species name
dw 204, 90 ; height, weight
db "If it notices"
next "anything that"
next "moves, it"
page "immediately flings"
next "its vine at the"
next "object.@"
|
org #1200
SCREEN_WIDTH = 40
SCREEN_HEIGHT = 25
PALETTE = 9
WIDTH = 25
HEIGHT = 25
FRAME_COUNT = 64
hblnk = 0xe008
vblnk = 0xe002
macro bump_pallete.load index
ld hl, bump_palette+({index}*9)
ld de, bump_palette
ld bc, 9
ldir
mend
main:
di
im 1
ld hl, histogram.blue
ld (fill... |
; int isalpha(int c)
SECTION code_ctype
PUBLIC isalpha
EXTERN asm_isalpha, error_zc
isalpha:
inc h
dec h
jp nz, error_zc
ld a,l
call asm_isalpha
ld l,h
ret c
inc l
ret
|
; A091284: Exponent of 2 in -1+prime[n]^s, if s is an exponent of form 16k-8. Except a(1)=0, a(n)=1+A091283(n).
; Submitted by Jon Maiga
; 0,5,5,6,5,5,7,5,6,5,8,5,6,5,7,5,5,5,5,6,6,7,5,6,8,5,6,5,5,7,10,5,6,5,5,6,5,5,6,5,5,5,9,9,5,6,5,8,5,5
seq $0,6005 ; The odd prime numbers together with 1.
pow $0,8
sub $0,1
lpb $0
... |
LDA 2050
ANI 01
JZ EVEN
MVI A,11
JMP EXIT
EVEN: MVI A,22
EXIT: STA 3050
HLT
|
%ifdef CONFIG
{
"RegData": {
"RAX": "10",
"RBX": "0xFF00000000000000",
"RCX": "0xFE00000000000000",
"RDX": "10",
"RSI": "0xFF000000",
"RDI": "0xFE000000"
}
}
%endif
; Trivial test, this should result in 10.
mov rax, 11
blsr rax, rax
; Results in 0xFE00000000000000 being placed ... |
SECTION code_clib
PUBLIC cleargraphics
PUBLIC _cleargraphics
EXTERN generic_console_cls
defc cleargraphics = generic_console_cls
defc _cleargraphics = generic_console_cls
|
; void p_forward_list_alt_clear_fastcall(p_forward_list_alt_t *list)
SECTION code_clib
SECTION code_adt_p_forward_list_alt
PUBLIC _p_forward_list_alt_clear_fastcall
EXTERN asm_p_forward_list_alt_clear
defc _p_forward_list_alt_clear_fastcall = asm_p_forward_list_alt_clear
|
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: Communication Driver
FILE: CommUtil.asm
AUTHOR: In Sik Rhee, 4/92
ROUTINES:
Name Description
---- -----------
strncpy String copy
Ve... |
;Original RLE decompressor by Shiru.
;Rewritten for use with ca65 by FrankenGraphics.
;uses 4 bytes in zero page
;decompress data from an address in X/Y to PPU_DATA
;put these 4 reservations where they belong in your project.
;alternately, you can use any memory in zp you've defined temp vars for.
RLE_lo: .res 1
... |
.macosx_version_min 10, 11
.section __TEXT,__text,regular,pure_instructions
.align 4, 0x90
.globl _c1
_c1:
pushq %rbp
movq %rsp, %rbp
popq %rbp
ret
# ----------------------
.align 4, 0x90
.globl _main
_main:
pushq %rbp
movq %rsp, %rbp
subq $16, %rsp
movl $0, -... |
:START
MOV XL, 0xAB
MOV XH, 0xFF
MOV Y, X
; Initialize the D and E registers
MOV D, [Y] ; 253d
MOV E, 01100100b ; 100d
ADD D, E
; Write register D to the Output Port
OUTB D
JNC :DONE
MOV D, [Y + 1]
MOV E, 00000001b ; Carry Bit
ADD D, E
; Write register D to the Output Port
OUTB D
:DONE
; Stops the CPU execution... |
CPU 686
BITS 32
section .text
%include 'kbc.inc'
extern _indice
extern _array_bytes
global _handler_rato
_handler_rato:
push eax
push ecx
xor ecx,ecx
mov cl,byte [_indice]
cmp cl,0x03
je indice
leitura:
in al,DATA_REG
mov byte [_array_bytes+ecx],al
inc cl
mov byte [_indice],cl
jmp fim
... |
TITLE DEMANGLE - Copyright (C) SLR Systems 1992
INCLUDE MACROS
.CODE PASS2_TEXT
DEMANGLE PROC
;
;TAKE STRING IN DS:SI AND DEMANGLE IT INTO ES:DI
;DS AND ES ARE DGROUP...
;
MOV AL,2[SI]
MOV CX,[SI]
CMP AL,'?'
JNZ 9$
ADD SI,3
DEC CX
|
;
; Old School Computer Architecture - interfacing FLOS
; Stefano Bodrato, 2011
;
; $Id: get_pen.asm,v 1.4 2016-06-22 22:13:09 dom Exp $
;
INCLUDE "flos.def"
SECTION code_clib
PUBLIC get_pen
PUBLIC _get_pen
get_pen:
_get_pen:
call kjt_get_pen
ld h,0
ld l,a
ret
|
;/*****************************************************************************
; * This file is part of Kvazaar HEVC encoder.
; *
; * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors
; * All rights reserved.
; *
; * Redistribution and use in source and binary forms, with or without modificati... |
.import Reset
.include "util.asm"
; EXEHDR is expected to be at $0801
; NOTE: This block should be 15 or less bytes long.
.segment "EXEHDR"
; BASIC boot (SYS Reset)
BasicBoot:
.word @firstBasicLine
@firstBasicLine:
.word 10 ; 10, BASIC line number.
.byte $9e ; SYS + "####"
... |
ORG $100
LDY #$00 ;CLEAR Y-REGISTER
LDA $00,Y ;GET A BYTE FROM 0+Y
STA $2000,Y ;STORE AT 2000+Y
LDA $0100,Y ;THEN FROM 100+Y
STA $2100,Y ;TO 2100+Y
LDA $0200,Y ;AND SO ON UNTIL
STA $2200,Y ;WE HAVE COVERED
LDA $0300,Y ;ALL THE MEMORY
STA $2300,Y ;'PAGES' FROM 0 TO 8
LDA $0400,Y ;AN... |
PAGE 60,132
;
XSEG SEGMENT
; Seg=01387H
; Org=00000H
ASSUME CS:XSEG
XPROC PROC FAR
JMP L6551
DEC BX
PUSH BX
PUSH CX
CALL L0009
L0009: POP SI
SUB SI,+09H
PUSH SI
CLD
MOV DI,0100H
MOV CX,0005H
MOVSB
JMP L01CE
L001A: PUSHF
PUSH CS
CALL WORD PTR CS:[08C0H]
DB 0C3H; RET
STI
CMP AH,4BH
JE L0061
CMP AH,... |
;--------------------------------------------------------
; File Created by SDCC : free open source ANSI-C Compiler
; Version 3.5.0 #9253 (Jun 20 2015) (MINGW64)
; This file was generated Thu Aug 25 09:48:37 2016
;--------------------------------------------------------
; PIC16 port for the Microchip 16-bit core micros... |
copyright zengfr site:http://github.com/zengfr/romhack
001E28 swap D0 [base+18A]
01A610 dbra D1, $1a60e
copyright zengfr site:http://github.com/zengfr/romhack
|
;*
;* COW : Character Oriented Windows
;*
;* gcompact.asm : global compaction
;* * NOTE :assumes stack never moves !
TITLE GCOMPACT - Global memory compactor
.xlist
include kernel.inc
include galloc.inc
.list
;*****************************************************************************
sBegin DATA
externW ... |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC/GEOS
MODULE: uiSort.asm
FILE: uiSort.asm
AUTHOR: Gene Anderson, May 22, 1992
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name ... |
SYS_EXIT equ 1
SYS_WRITE equ 4
STDIN equ 0
STDOUT equ 1
section .text
global _start ;must be declared for using gcc
_start: ;tell linker entry point
mov eax, SYS_WRITE
mov ebx, STDOUT
mov ecx, msg1
mov edx, len1
int 0x80
mov ea... |
;*****************************************************************************
;* MMX optimized DSP utils
;*****************************************************************************
;* Copyright (c) 2000, 2001 Fabrice Bellard
;* Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
;*
;* This file is part o... |
disk_load:
push dx
mov ah, 0x02 ; BOIS read sector function
mov al, dh ; Read DH amount of sectors
mov ch, 0x00 ; Select cylinder 0
mov dh, 0x00 ; Select head 1 of the disk since it starts at 0
mov cl, 0x02 ; Select the 2nd (after the boot sector)
int 0x13 ; BIOS interrupt for read disk function
jc d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.