content stringlengths 23 1.05M |
|---|
; ===============================================================
; Jan 2015
; ===============================================================
;
; char *strnset(char *s, int c, size_t n)
;
; Write at most n chars c into s.
;
; ===============================================================
SECTION code_clib
SECTION ... |
; void __CALLEE__ *adt_ListSearch_callee(struct adt_List *list, void *match, void *item1)
; 02.2003, 08.2005 aralbrec
SECTION code_clib
PUBLIC adt_ListSearch_callee
PUBLIC _adt_ListSearch_callee
PUBLIC ASMDISP_ADT_LISTSEARCH_CALLEE
EXTERN ADTListSearch, l_jpiy
.adt_ListSearch_callee
._adt_ListSearch_callee
pop h... |
; size_t b_array_capacity_fastcall(b_array_t *a)
SECTION code_adt_b_array
PUBLIC _b_array_capacity_fastcall
defc _b_array_capacity_fastcall = asm_b_array_capacity
INCLUDE "adt/b_array/z80/asm_b_array_capacity.asm"
|
XSEG AT 0
result: DS 2
CSEG AT 0
jmp START
input: DB 0x83,0xE7
START:
clr a
// Transform from 2-d
// r0 - sign true/false
// r1 - low
// r2 - high
// r3 - result low
// r4 - result high
mov r2, P1 // high
mov r1, P0 // low
mov a, r2
anl a, #0x80
mov r0, a
//result = (high... |
;
; Copyright (c) 2010 The WebM project authors. All Rights Reserved.
;
; Use of this source code is governed by a BSD-style license
; that can be found in the LICENSE file in the root of the source
; tree. An additional intellectual property rights grant can be found
; in the file PATENTS. All contributing proje... |
; Luis Maya
; CS 218 Section #1002
; Assignment #7
; Example Solution.
; Sort a list of number using the bubble sort algorithm.
; Also finds the minimum, median, maximum, and average of the list.
; -----
; Bubble Sort Algorithm
; for ( i = (len-1) to 0 ) {
; swapped = false
; for ( j = 0 to i ) {
; ... |
// Original test: ./ashwini/hw4/problem6/sle_test.asm
// Author: ashwini
// Test source code follows
//sle Rd, Rs, Rt: if (Rs <= Rt) then Rd <- 1 else Rd <- 0
// ------------------------------------UNSIGNED
//sle_0.asm
lbi r1, 55
lbi r2, 49
sle r3, r2, r1 // r2<r1. r3=1
//sle_1.asm
lbi r1, 55
lbi r2, 55
sle r... |
db "BAT@" ; species name
dw 207, 170 ; height, weight
db "During the day, it"
next "gathers with"
next "others and hangs"
page "from the ceilings"
next "of old buildings"
next "and caves.@"
|
bits 16
; glb color_t : int
; glb combinacion_t : struct <something>
; RPN'ized expression: "7 "
; Expanded expression: "7 "
; Expression value: 7
; glb combinacion : [7u] struct <something>
; RPN'ized expression: "7 "
; Expanded expression: "7 "
; Expression value: 7
; glb combinacion : [7u] struct <something>
sectio... |
; A132652: Sum of divisors of n, Sigma(n) raised to power Sigma(n).
; 1,27,256,823543,46656,8916100448256,16777216,437893890380859375,302875106592253,39346408075296537575424,8916100448256
seq $0,203 ; a(n) = sigma(n), the sum of the divisors of n. Also called sigma_1(n).
pow $0,$0
|
global _start
extern ExitProcess
%include "lib.h"
section .data
in_MSG db "Please input a positive number (<65,535): ", 0
outMSG db "/4 = ", 0
query_MSG db "Do you want to terminate the program (Y/N): ", 0
nwln db 10, 0
section .bss
inBuffer resb 8
outBuffer resb 8
section .code
_start:
p... |
global _start
extern aoc_day02_1, aoc_day02_2, printlb
section .text
;;------------------;;
;; START POINT ;;
;;------------------;;
_start:
call aoc_day02_1
call printlb
call aoc_day02_2
mov eax, 1
xor ebx, ebx
int 0x80 |
; calculate size of the (emulated) processor prefetch queue
bits 16
org 100h
lea bx, target
mov al, 40h
jmp loop
loop:
mov [bx], al
target:
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp al, 40h
jne done
mov byte [bx], 90h
... |
vChars0 EQU $8000
vChars1 EQU $8800
vChars2 EQU $9000
vBGMap0 EQU $9800
vBGMap1 EQU $9c00
; Battle/Menu
vSprites EQU vChars0
vFont EQU vChars1
vFrontPic EQU vChars2
vBackPic EQU vFrontPic + 7 * 7 * $10
; Overworld
vNPCSprites EQU vChars0
vNPCSprites2 EQU vChars1
vTileset EQU vChars2
; Title
vTitleLogo EQ... |
db "JET@" ; species name
dw 211, 630 ; height, weight
db "Its instinct is to"
next "bury itself in"
next "holes. It often"
page "steals the nesting"
next "holes of others to"
next "sleep in them.@"
|
UnknownDungeon2Object:
db $7d ; border block
db $6 ; warps
db $1, $1d, $2, UNKNOWN_DUNGEON_1
db $6, $16, $3, UNKNOWN_DUNGEON_1
db $7, $13, $4, UNKNOWN_DUNGEON_1
db $1, $9, $5, UNKNOWN_DUNGEON_1
db $3, $1, $6, UNKNOWN_DUNGEON_1
db $b, $3, $7, UNKNOWN_DUNGEON_1
db $0 ; signs
db $4 ; objects
object SPRITE_BA... |
CriticalHitMoves:
db KARATE_CHOP
db RAZOR_WIND
db RAZOR_LEAF
db CRABHAMMER
db SLASH
db AEROBLAST
db CROSS_CHOP
db -1
|
; The 8x8 VWF font is already partially implemented in the game.
; The drawing func (080713D0) doesn't blend correctly, so it's not used.
; widthIndex is stored as 0xFD (means normal char) in 0806FA50.
; This patches both of those functions.
@WidthIndex equ 0x08649C4C
.org 0x0806FA50
.region 0x0806FAB8-.,0x00
.func G... |
ori $1, $0, 10
ori $2, $0, 13
ori $3, $0, 4
ori $4, $0, 13
sw $3, 0($0)
sw $1, 4($0)
sw $4, 8($0)
sw $1, 12($0)
sw $4, 16($0)
sw $3, 20($0)
sw $2, 24($0)
sw $2, 28($0)
sw $1, 32($0)
sw $2, 36($0)
sw $1, 40($0)
sw $1, 44($0)
sw $4, 48($0)
sw $2, 52($0)
sw $1, 56($0)
sw $1, 60($0)
sw $1, 64($0)
sw $3, 68($0)
sw $1, 72($0... |
MACRO MYMACRO1 addr, string, term
ld de,addr
ENDM
MACRO MYMACRO2 addr, string
ld de,addr
ENDM
MACRO MYMACRO3 _addr, _string, _term
ld de,_addr
ENDM
MACRO MYMACRO4 addr?, string?, term?
ld de,addr?
ENDM
ORG 0x1234
; this will fail with "Label no... |
;
;
; Copyright (C) Microsoft Corporation, 1987-89
;
; This Module contains Proprietary Information of Microsoft
; Corporation and should be treated as Confidential.
;
title emoem.asm - OEM dependent code for 8087
;--------------------------------------------------------------------
;
... |
; Listing generated by Microsoft (R) Optimizing Compiler Version 18.00.21005.1
TITLE D:\Development\electronic\project\zlib-1.2.8\inflate.c
.686P
.XMM
include listing.inc
.model flat
INCLUDELIB MSVCRTD
INCLUDELIB OLDNAMES
CONST SEGMENT
?lenfix@?1??fixedtables@@9@9 DB 060H ; `fixedtables'::`2'::lenfix
DB 07H... |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1989 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: Calendar/Alarm
FILE: alarmAlarm.asm
AUTHOR: Don Reeves, September 1, 1989
ROUTINES:
Name Description
---- -----------
AlarmClockStart St... |
.model small
.data
.code
main proc
mov ax,1010H
dec al
endp
end main |
section .text
extern printf
global main
main:
; eax = tmp
; ebx = fib1
; ecx = fib2
; edx = counter
mov ebx, 1
mov ecx, 1
mov edx, 100
lp:
mov eax, ecx
add eax, ebx
mov ecx, ebx
mov ebx, eax
dec edx
cmp edx, 0
jle end
jmp lp
end:
mov [storage], eax
push storage
push format
call printf
mov... |
Map_228246: dc.w Frame_228248-Map_228246 ; ...
Frame_228248: dc.w $A
dc.b $D8, $E,$20,$38,$FF,$E0
dc.b $D8, $E,$28,$38, 0, 0
dc.b $F0, $C, 0,$44,$FF,$E0
dc.b $F0, $C, 8,$44, 0, 0
dc.b $F8, $E,$20,$38,$FF,$E0
dc.b $F8, $E,$28,$38, 0, 0
dc.b $10, $C, 0,$44,$FF,$E0
dc.b $10, $C, 8,$44, 0, 0
d... |
ori $ra,$ra,0xf
lb $5,12($0)
mtlo $4
ori $1,$4,8406
mtlo $4
addu $1,$2,$3
mult $5,$3
mult $0,$5
div $1,$ra
srav $3,$4,$3
mfhi $0
sb $1,9($0)
sll $0,$0,6
mfhi $0
addu $2,$1,$2
addiu $0,$6,-25310
sb $6,16($0)
ori $3,$3,54814
sll $4,$5,9
mflo $0
lui $4,4001
mflo $4
mfhi $4
lui $1,65199
mtlo $4
sll $1,$2,27
sll $1,$2,29
mf... |
//push constant 123
@123 //A=index
D=A //D is now the constant
@SP
A=M //A = @SP
M=D //M[A] = value to push
@SP
M=M+1 //sp+1
//push constant 456
@456 //A=index
D=A //D is now the constant
@SP
A=M //A = @SP
M=D //M[A] = value to push
@SP
M=M+1 //sp+1
//push returnAddress
@returnAddress0
D=A //D=returnAdd... |
*
* SC1602 LCD Display program 1 for COSMAC
* SB-Assembler
*
.CR 1802 ;To load the 1802 cross overlay
.OR $0000
*
* CDP1802 SC1602LCD
* TPB---AND----> E(6)
* N2-----+
* Q -----------> RS(4)
* BUS0 --------> DB4(11)
* BUS1 --------> DB5(12)
* BUS2 --------> DB6(13)
* BUS3 --------> DB7(14)
* GND--> R/W... |
;hmm.,.,.,.,without a name.,.,.,.,
;this file is much like the 606, only it
;is much more harmful...it has a special suprise
;for three diffrent dates....hehehehe.,.,,..,.,
;i had planned to have it in with the other TR-
;series, but this was much to large to add in with.,.,
;enjoy!....
; nUcLeii
; ... |
;************************************************************************************
;TABLES AND INCLUDES
;************************************************************************************
baseCounterLUT ;counter values for octave 6, all other counter values are derived from this
;dw #4000, #43CE, #47D6, #4C1C... |
; SYNTAX TEST "Packages/User/x86_64 Assembly.tmbundle/Syntaxes/Nasm Assembly.sublime-syntax"
lock
; ^^^^ storage.modifier
rep
; ^^^ storage.modifier
repe
; ^^^^ storage.modifier
repz
; ^^^^ storage.modifier
repne
; ^^^^^ storage.modifier
repnz
; ^^^^^ storage.modifier
xacquire
; ^^^^^^^^ storage.modifier... |
; .........................................................
; : ____ ___.__. ____ ____ _______ ___ :
; : _/ ___< | |/ \_/ __ \/ _ \ \/ / :
; : \ \___\___ | | \ ___( <_> > < :
; : \___ > ____|___| /\___ >____/__/\_ \ :
... |
StdScripts::
; entries correspond to constants/std_constants.asm
dba PokecenterNurseScript
dba DifficultBookshelfScript
dba PictureBookshelfScript
dba MagazineBookshelfScript
dba TeamRocketOathScript
dba IncenseBurnerScript
dba MerchandiseShelfScript
dba TownMapScript
dba WindowScript
dba TVScript
dba Homepa... |
;--------------------------------------------------------------------------------
; JOYPAD READING
;--------------------------------------------------------------------------------
;
;Scan joypad, returning dynamic & debounced values
;
readPad1: ;rts
@a: jsr @read_bits ;debounce joypad
ldx PAD1_jt ... |
; nasm nibbles.asm -o nibbles.img
; qemu-system-i386 -fda floppy.img
; Pragma, tells the assembler that we are in 16 bit mode
; (which is the state of x86 when booting from a floppy).
[bits 16]
; Pragma, tell the assembler where the code will be loaded.
[org 0x7C00]
mov bl, 1 ; Starting direction for the... |
SilphCo5F_Object:
db $2e ; border block
db 7 ; warps
warp 24, 0, 1, SILPH_CO_6F
warp 26, 0, 1, SILPH_CO_4F
warp 20, 0, 0, SILPH_CO_ELEVATOR
warp 27, 3, 5, SILPH_CO_7F
warp 9, 15, 4, SILPH_CO_9F
warp 11, 5, 4, SILPH_CO_3F
warp 3, 15, 5, SILPH_CO_3F
db 0 ; signs
db 11 ; objects
object SPRITE_LAPRAS_GIVER, ... |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) Berkeley Softworks 1990 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: toshiba 24-pin print driver
FILE: toshiba24Cursor.asm
AUTHOR: Dave Durran, 14 March 1990
ROUTINES:
Name Description
---- ------... |
; ********************************************************************************
; The language entry point
;
; In the original beebrail project this was a simple command line interface
; Here we will have a menu system
; ********************************************************************************
; switchLangua... |
;
; Sample Mixer for sound effect playback
; By Mike Dailly, (c) Copyright 2020 all rights reserved.
;
; ********************************************************************************************
; A = root bank of MOD file (tune always starts at 0)
; B = InitSamples (0 = no)
; **********************************... |
; Calculate Colourway colours 1989 Jochen Merz
section utility
white equ 7
green equ 4
red equ 2
black equ 0
xdef ut_cccol
;+++
; Calculate Colourway colours.
;
; Entry Exit
; D2.b colourway (0-3) normal paper.w... |
bits 32
foo: ; Backwards reference
mov eax,[foo - $]
mov ebx,[ebx + foo - $]
mov ecx,foo - $
mov edx,foo - bar
mov eax,[bar - $]
mov ebx,[ebx + bar - $]
mov ecx,bar - $
mov edx,bar - foo
mov eax,[baz - $]
mov ebx,[ebx + baz - $]
mov esi,[baz - bar]
mov ecx,baz - $
mov edx,baz - bar
bits 64
default... |
; void __CALLEE__ adt_ListConcat_callee(struct adt_List *list1, struct adt_List *list2)
; 02.2003, 06.2005 aralbrec
SECTION code_clib
PUBLIC adt_ListConcat_callee
PUBLIC _adt_ListConcat_callee
PUBLIC asm_adt_ListConcat
EXTERN _u_free
.adt_ListConcat_callee
._adt_ListConcat_callee
pop bc
pop hl
pop de
pu... |
; Test case:
ONE: equ 1
ld ix,list
ld a,(ix+ONE) ; this should be optimized to use hl
ld (var),a
ld ix,list2
ld a,(ix) ; this should be optimized to use hl too
ld (var),a
ld hl,#ffff
ld ix,list
ld a,(ix) ; this should not be optimized, as we would modify hl
ld (var),a
ld a,(hl)
ld (var),a
end:
jp end
... |
; float lround(float x) __z88dk_fastcall
SECTION code_fp_math48
PUBLIC cm48_sdcciy_lround_fastcall
EXTERN cm48_sdcciyp_dx2m48, am48_lround, cm48_sdcciyp_m482d
cm48_sdcciy_lround_fastcall:
call cm48_sdcciyp_dx2m48
call am48_lround
jp cm48_sdcciyp_m482d
|
lda {m1}+1
bne {la1}
stx $ff
lda {m1}
cmp $ff
bcs {la1}
!: |
Name: progmain.asm
Type: file
Size: 21115
Last-Modified: '1992-09-24T02:25:46Z'
SHA-1: 9402174EF22350E2B94FFD8646567CE37CE20EA1
Description: null
|
Name: maped3.asm
Type: file
Size: 48917
Last-Modified: '1992-11-18T01:42:26Z'
SHA-1: 7D3D6BD067C1045A8E8D1B3B64EA4AA87DC3EEA3
Description: null
|
; calculates the difference |a-b|, setting carry flag if a<b
CalcDifference::
sub b
ret nc
cpl
add $1
scf
ret
MoveSprite::
; move the sprite [hSpriteIndex] with the movement pointed to by de
; actually only copies the movement data to wNPCMovementDirections for later
call SetSpriteMovementBytesToFF
MoveSprite_:... |
; uchar esxdos_f_readdir(uchar handle, void *buf)
SECTION code_clib
SECTION code_esxdos
PUBLIC _esxdos_f_readdir_callee
PUBLIC l0_esxdos_f_readdir_callee
EXTERN asm_esxdos_f_readdir
_esxdos_f_readdir_callee:
pop hl
dec sp
pop af
ex (sp),hl
l0_esxdos_f_readdir_callee:
push iy
call asm_esxdos... |
; intmax_t imaxabs(intmax_t j)
SECTION code_clib
SECTION code_inttypes
PUBLIC _imaxabs
EXTERN _llabs
defc _imaxabs = _llabs
|
;
; SEGA SC-3000 C Library
;
; Print character to the screen
;
; $Id: fputc_cons.asm,v 1.1 2010/06/24 09:05:52 stefano Exp $
;
XLIB fputc_cons
;
; Entry: a= char to print
;
.fputc_cons
ld hl,2
add hl,sp
ld a,(hl)
cp 13
jr nz,nocr
call $2400
ld a,10
.nocr
jp $2400
|
OneHitKOEffect_:
ld hl, wDamage
xor a
ld [hli], a
ld [hl], a ; set the damage output to zero
dec a
ld [wCriticalHitOrOHKO], a
ld hl, wBattleMonLevel
ld de, wEnemyMonLevel
ld a, [H_WHOSETURN]
and a
jr z, .compareLevel
ld hl, wEnemyMonLevel
ld de, wBattleMonLevel
.compareLevel
; set damage to 65535 and OHKO ... |
;==============================================================
; CONSTANTS
;==============================================================
; VDP port addresses
vdp_control equ $00C00004
vdp_data equ $00C00000
; VDP commands
vdp_cmd_vram_write equ $40000000
vdp_cmd_cram_write equ $C0000000
vdp_cmd_vsram_write... |
[bits 16]
; Get the number of KB of conventional memory up to 64KB.
; Output:
; AX - The number of KB of conventional memory or -1 if error.
%macro m_bios_get_conventional_memory_size 0
int 0x12
jc short .error_1
test ax, ax ; If size=0
je short .error_1
cmp ah, 0x86 ; Unsupported function
je short .er... |
SECTION code_driver
SECTION code_driver_terminal_input
PUBLIC rc_01_input_hbios1_stdio_msg_flsh
EXTERN __BF_CIOINIT
EXTERN asm_hbios
EXTERN console_01_input_stdio_msg_flsh
rc_01_input_hbios1_stdio_msg_flsh:
; get rid of any pending chars in the hbios1 buffer
ld bc,__BF_CIOINIT<<8|0x01
ld de,0xffff
call... |
; ---------------------------------------------------------------------------
; Object 26 - monitors
; ---------------------------------------------------------------------------
Monitor:
moveq #0,d0
move.b obRoutine(a0),d0
move.w Mon_Index(pc,d0.w),d1
jmp Mon_Index(pc,d1.w)
; =================================... |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright(c) 2011-2016 Intel Corporation All rights reserved.
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions
; are met:
; * Redistributions of so... |
; float frexp(float value, int *exp) __z88dk_callee
SECTION code_clib
SECTION code_fp_math48
PUBLIC cm48_sdccix_frexp_callee, l0_cm48_sdccix_frexp_callee
EXTERN cm48_sdccixp_d2m48, am48_frexp, cm48_sdccixp_m482d
cm48_sdccix_frexp_callee:
pop af
pop de
pop hl ; hlde' = float value... |
# Test 2 - sub
pushi 2
pushi 5
sub
halt |
include w2.inc
include noxport.inc
include consts.inc
include structs.inc
createSeg inssubs_PCODE,inssubs,byte,public,CODE
; DEBUGGING DECLARATIONS
ifdef DEBUG
midInssubsn equ 12 ; module ID, for native asserts
endif
; EXTERNAL FUNCTIONS
externFP <ReloadSb>
externFP <N_HpchGetPn>
e... |
main.elf: file format elf32-avr
Disassembly of section .data:
00800100 <__data_start>:
__bad_interrupt():
../../../../crt1/gcrt1.S:195
800100: 63 00 .word 0x0063 ; ????
800102: 68 00 .word 0x0068 ; ????
800104: 6d 00 .word 0x006d ; ????
800106: 71 00 .word 0x0071 ; ????
800... |
TITLE des-586.asm
IF @Version LT 800
ECHO MASM version 8.00 or later is strongly recommended.
ENDIF
.486
.MODEL FLAT
OPTION DOTNAME
IF @Version LT 800
.text$ SEGMENT PAGE 'CODE'
ELSE
.text$ SEGMENT ALIGN(64) 'CODE'
ENDIF
PUBLIC _DES_SPtrans
ALIGN 16
__x86_DES_encrypt PROC PRIVATE
push ecx
; Round 0
mov eax,DWORD PTR... |
;; @file
; SEC CAR function
;
; Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
; SPDX-License-Identifier: BSD-2-Clause-Patent
;;
;
; Define assembler characteristics
;
%macro RET_RSI 0
movd rsi, mm7 ; move ReturnAddress from MM7 to RSI
jmp rsi
%endma... |
org 0x7C00
bits 16
%define ENDL 0x0D, 0x0A
start:
jmp main
;
; Prints a string to the screen
; Params:
; - ds:si points to string
;
puts:
; save registers we will modify
push si
push ax
push bx
.loop:
lodsb ; loads next character in al
or al, al ; verify if n... |
; Arquivo: Div.nasm
; Curso: Elementos de Sistemas
; Criado por: Luciano Soares
; Data: 27/03/2017
; Divide R0 por R1 e armazena o resultado em R2.
; (R0, R1, R2 refer to RAM[0], RAM[1], and RAM[2], respectively.)
; divisao para numeros inteiros positivos
leaw $0, %A
movw (%A), %D
leaw $1, %A
WHILE: ... |
; Verifies PHA PLA PHP PLP
.segment "VECTORS"
.word $eaea
.word init
.word $eaea
.code
init:
ldx #$FF ; Initialize the stack pointer
txs
pha ; A will have $42 in it.
pha ; A will have $00 in it.
pha ; A will have %10010101 in it.
pla ; Accumulator will get cleared befo... |
@This represents the tables for text/number printing used by the equipment viewing screen
@For use with an unmodified Dawn of Souls ROM
@Copy/paste to $321B0
.thumb
WeaponStatIndexes:
.byte 0x04
.byte 0x05
.byte 0x0F
.byte 0x06
.org 0x08
ArmorStatIndexes:
.byte 0x04
.byte 0x05
.byte 0x06
.org 0x10
... |
; Eggs are negative now
INCBIN "gfx/pokemon/egg/front.gbcpal", middle_colors
INCLUDE "gfx/pokemon/egg/shiny.pal"
; -2
RGB 30, 26, 11
RGB 23, 16, 00
; -2 shiny
RGB 30, 26, 11
RGB 23, 16, 00
; -1
RGB 23, 23, 23
RGB 17, 17, 17
; -1 shiny
RGB 23, 23, 23
RGB 17, 17, 17
PokemonPalettes:
; entries correspond to Pok... |
; void w_vector_empty(w_vector_t *v)
SECTION code_clib
SECTION code_adt_w_vector
PUBLIC w_vector_empty
EXTERN asm_w_vector_empty
defc w_vector_empty = asm_w_vector_empty
|
#if (x < 0)
#y = -x;
#else
#y = x;
# $t0= x
# $t1= y
#Do it in assembly
#addi $t0, $zero, 4
#addi $t1, $zero, 4
addi $t3, $zero, 1
slt $t2 , $t0, $zero
beq $t2,$zero, ELSE
nop
sub $t1, $zero, $t0
j END
nop
ELSE: add $t1, $t0, $zero
END:
|
TITLE prsctl.asm - Parser Control-Flow NonTerminal Functions
;==========================================================================
;
; Module: prsctl.asm - Parser Control-Flow NonTerminal Functions
; Subsystem: Parser
; System: Quick BASIC Interpreter
; Copyright <C> 1985, Microsoft Corporation
;
; NOTE... |
TITLE Prompt For Integers (_prompt.asm)
; Last update: 8/29/01
INCLUDE sum.inc
.code
;-----------------------------------------------------
PromptForIntegers PROC,
ptrPrompt:PTR BYTE, ; prompt string
ptrArray:PTR DWORD, ; pointer to array
arraySize:DWORD ; size of the array
;
; Prompts th... |
;------------------------------------------------------------------------------
; @file
; Main routine of the pre-SEC code up through the jump into SEC
;
; Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.<BR>
; This program and the accompanying materials
; are licensed and made available under t... |
;
; PC-8801 specific routines
; by Stefano Bodrato, 2018
;
; void pc88_cursoroff();
;
; Hide the text cursor
;
; $Id: pc88_cursoroff.asm $
;
SECTION code_clib
PUBLIC pc88_cursoroff
PUBLIC _pc88_cursoroff
pc88_cursoroff:
_pc88_cursoroff:
; jp 428Bh
ld a,($E6A7) ; CursorMode
res 0,a ; hide cursor
l... |
.data
vector: .word 10, 7, 9
.text
# sumar los elementos del vector
li $t2, 0
lw $t1, vector
add $t2, $t2, $t1
lw $t1, vector + 4
add $t2, $t2, $t1
lw $t1, vector + 8
add $t2, $t2, $t1
la $a0, 0x10010100
sw $t2, ($a0)
# multiplicar x 8
sll $t2, $t2, 3
la $a0, 0x10010120
sw $t2, ($a0)
# copia el conten... |
.model small
CR equ 0dh
LF equ 0ah
.stack
.data
FileName db 256 dup (?) ; Nome do arquivo a ser lido
FileBuffer db 10 dup (?) ; Buffer de leitura do arquivo
FileHandle dw 0 ; Handler do arquivo
FileNameBuffer db 150 dup (?)
MsgPedeArquivo db "Nome do arquivo: ", 0
MsgErroOpenFile db "Erro na abertur... |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1994 -- All Rights Reserved
PROJECT:
MODULE:
FILE: outboxTransportMenu.asm
AUTHOR: Adam de Boor, Sep 22, 1994
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date ... |
main:
PUSH %14
MOV %15,%14
SUBS %15,$8,%15
SUBS %15,$16,%15
SUBS %15,$4,%15
@main_body:
MOV $1,-4(%14)
MOV $2,-8(%14)
MOV $0,-16(%14)
MOV $3,-20(%14)
MOV $1,-24(%14)
MOV $3,-28(%14)
SUBS -20(%14),$3,%0
MOV -24(%14),%1
ADDS $1,-24(%14),-24(%14)
ADDS %0,%1,%0
MOV %0,-12(%14)
MOV... |
;-----------------------------------------------
; User interface sound effects
SFX_ui_move:
db 7,#b8 ;; SFX all channels to tone
db 10,#0b ;; volume
db 4,0, 5+MUSIC_CMD_TIME_STEP_FLAG,#02 ;; frequency
db MUSIC_CMD_SKIP
db MUSIC_CMD_SKIP
db 10,#00 ;; silence
db SFX_CMD_END
SFX_u... |
PUBLIC M_s_hex
EXTRN M_u_hex:NEAR
CodeSeg SEGMENT PUBLIC
ASSUME CS:CodeSeg
M_s_hex PROC NEAR
begin:
PUSH BP
MOV BP,SP
get_param:
MOV AX,[BP+4]
CMP AX, 0
JGE Call_print16
make_neg:
PUSH AX
MOV AH, 2h
MOV DL, '-'
INT 21h
POP AX
NEG A... |
section "code", rom0
nop
nop
ld bc, var000
ld a, 17
ld [bc], a
ld h, b
ld l, c
ld d, [hl]
ld a, 22
add a, d
cp 39
jr z, success
halt
success:
ld e, d
halt
section "ram", wram0
var000:
ds 1 |
[bits 16]
; To switch to protected mode, we:
; 1. Disable all interrupts
; 2. Set the "protected mode" flag to 1
; 3. Make a far jump to flush the pipeline
switch_to_32bit_protected_mode:
cli ; Disable interrupts
lgdt [gdt_descriptor] ; Load GDT
; Set "Protected Mode" flag to 1
mov eax, cr0
or eax,... |
; CRT0 for the Sharp X1 -
;
; Karl Von Dyson (for X1s.org)
;
; $Id: x1_crt0.asm,v 1.17 2016-07-20 05:45:02 stefano Exp $
;
if (CRT_ORG_CODE < 32768)
defs ZORG_TOO_LOW
endif
INCLUDE "crt/classic/crt_init_sp.asm"
INCLUDE "crt/classic/crt_init_atexit.asm"
call crt0_init_bss
IF DEFINED_USING_a... |
;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, DISPLAYI... |
SECTION .text
GLOBAL square_p521
square_p521:
sub rsp, 0x128 ; last 0x30 (6) for Caller - save regs
mov [ rsp + 0xf8 ], rbx; saving to stack
mov [ rsp + 0x100 ], rbp; saving to stack
mov [ rsp + 0x108 ], r12; saving to stack
mov [ rsp + 0x110 ], r13; saving to stack
mov [ rsp + 0x118 ], r14; saving to stack
mov [ rsp... |
; suffer, you tasm sukkerz! use nasm or a386
; this one compiles only through a386 though
db "VIZNUT'97" ; signature
; does something, pushes 4 extra bytes
; segmentation:
; cs+$0000 code, all the smaller tabs
; cs+$1000 videobuffer
; cs+$2000 effect precalc tab (sphere/tunnel)
; cs+$3000 ... |
# provide_key-0--0
ldint r0, 0 # 0
pushint r0 # 1
# provide_key-0-begin-loop-1
popint r1 # 2
private_input s0, 0, 0 # 3
ldint r2, 8192 # 4
addint r3, r1, r2 # 5
stmsi s0, r3 # 6
ldint r4, 1 # 7
addint r5, r1, r4 # 8
pushint r5 # 9
ldint r6, 32 # 10
ltint r7, r5, r6 # 11
jmpnz r7, -11 # 12
# provide_key-0-end-loop-2
pop... |
#include <P16F84A.inc>
movlw 5 ; Assign the value 5 to 0x33 register
movwf 0x33
movlw 8 ; Assign the value 5 to 0x11 register
movwf 0x11
; I use a new register to save the value of 0x0E
movf 0x33,0
movwf 0x0C
movf 0x11,0
movwf 0x33
movf 0x0c,0
movwf 0x11
nop
nop
nop
end
|
_CableClubNPCPleaseComeAgainText::
text "Please come again!"
done
_CableClubNPCMakingPreparationsText::
text "We're making"
line "preparations."
cont "Please wait."
done
_UsedStrengthText::
text_ram wcd6d
text " used"
line "STRENGTH.@"
text_end
_CanMoveBouldersText::
text_ram wcd6d
text " can"
line "mov... |
; double __FASTCALL__ acosh(double x)
SECTION code_fp_math48
PUBLIC cm48_sccz80_acosh
EXTERN am48_acosh
defc cm48_sccz80_acosh = am48_acosh
|
; A001277: Number of permutations of length n by rises.
; 1,3,12,56,321,2175,17008,150504,1485465,16170035,192384876,2483177808,34554278857,515620794591,8212685046336
add $0,2
seq $0,173184 ; Partial sums of A000166.
sub $0,1
|
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) Geoworks 1995 -- All Rights Reserved
PROJECT: Tiramisu
MODULE: Preferences
FILE: preffax2DialingCodeList.asm
AUTHOR: Peter Trinh, Feb 5, 1995
ROUTINES:
Name Description
---- -----------
PrefDialing... |
copyright zengfr site:http://github.com/zengfr/romhack
001430 movea.w (A4)+, A1 [base+2F2]
001436 subq.w #1, ($304,A5) [base+2F2]
001514 move.w A0, -(A4) [base+2F2]
00151A addq.w #1, ($304,A5) [base+2F2]
01A806 move.w A6, ($2f2,A5) [base+304]
01A80A lea ($6bbc,A5), A0 [base+2F2]
copyright zengfr site:htt... |
/*****************************************************************************
Name : sgxinit_primary.pds.asm
Title : PDS Assembly Code
Author : Imagination Technologies
Created : 23/05/2009
Copyright : 2009 by Imagination Technologies Limited. All rights reserved.
No part of this software, either mat... |
.include "defines.inc"
.include "global.inc"
.segment "BANK0"
.proc NMI_HANDLER ; push regs onto stack to preserve them and we can pop them off later
PHA
TYA
PHA
TXA
PHA
; transfer OAM data from $02xx
LDA #0
STA OAMADDR
LDA #$02
STA OAMDMA
NOP
; controller state is in controller_1
JSR CON... |
title search_array_proc (Ergasia_5_a.asm)
; Check user input if is in limit and search for it in array.
include Irvine32.inc
; Globals.
max_limit equ 10d
min_limit equ -10d
array_size equ 10d
.data
tableContent sdword -5d, 5d, -6d, -7d, 9d, -6d, 10d, -3d, 5d, -6d
enterMsg byte "Enter a va... |
;--------------------LIBRARY SPECIFICATION-------------------
;
; NAME : Serial Communications Library
;
; FUNCTIONS : USART_init
; USART_TxISR
; USART_RxISR
; USART_putc
; USART_getc
; USART_puts
; USART_gets
;
; REQUIRES :
;
; NOTES :
;
;-------------------------------... |
;****************************************************************
.include "m48def.inc"
.include "service.inc"
.include "display.inc"
;****************************************************************
; Data
;****************************************************************
.dseg
.org SRAM_START ; because avra ignores d... |
ASSUME cs:code
code SEGMENT
mov ax, 2
add ax, ax
add ax, ax
mov ax, 4c00H
int 21h
code ENDS
END |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.